query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
627c1ea6989e0986f8815fdf900c162e
Create a new controller instance.
[ { "docid": "292dce0fb25f89abb8c64bf979c1cafd", "score": "0.0", "text": "public function __construct()\n {\n $this->middleware('auth');\n }", "title": "" } ]
[ { "docid": "bd1ee0eb805b9537f7b5fffd7bc75869", "score": "0.7934717", "text": "protected function createController()\n\t{\n\t\t$this->createParentControllerIfNotExists();\n\n\t\t$this->create('Controller', $this->data->get('controller.path'), [\n\t\t\t'name' => $this->data->get('controller.name'),\n\t\t\t'namespace' => $this->data->get('controller.namespace'),\n\t\t\t'parent' => $this->data->get('base_controller.name'),\n\t\t\t'parent_namespaced' => $this->data->get('base_controller.namespaced'),\n\t\t]);\n\t}", "title": "" }, { "docid": "8fc472ca59d683f1b71ce35c8d9cd840", "score": "0.79196423", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n ]);\n }", "title": "" }, { "docid": "586d07833162bcc0f3d9ef3beb9597eb", "score": "0.75784665", "text": "private function makeController()\r\n {\r\n\r\n new MakeController($this, $this->files);\r\n\r\n }", "title": "" }, { "docid": "c93c248aa366a21a75f395554a1b6d92", "score": "0.7545241", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('tenant:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n ]);\n }", "title": "" }, { "docid": "6d22add10fa68cef458f5bce88d0fc82", "score": "0.7471624", "text": "public static function create()\n\t{\n\t\t//check, if an ObjectController instance already exists\n\t\tif(ObjectController::$objectController == null)\n\t\t{\n\t\t\tObjectController::$objectController = new ObjectController();\n\t\t}\n\n\t\treturn ObjectController::$objectController;\n\t}", "title": "" }, { "docid": "0b66faaecec66cfdcab2e8144eedde9c", "score": "0.7285359", "text": "public function create()\n {\n // See register controller\n }", "title": "" }, { "docid": "5905a13dea41ead7716acf26c8e1b561", "score": "0.72167856", "text": "public function createController() \n\t{\n if (!class_exists($this->controller))\n {\n new InvalidPageException(Method::GET, null);\n header('Location: /document/pagenotfound'); \n }\n \n return new $this->controller($this->action,$this->urlvalues, $this->postvalues, $this->filevalues, $this->id, $this->userid, $this->state, $this->admin);\n\t}", "title": "" }, { "docid": "44397456b6f80012d882544513cb3343", "score": "0.71994245", "text": "private function makeContoller()\n {\n $this->warn(\"Creating Controller\");\n\n $contents = file_get_contents( __DIR__.'../../../resources/base_files/controller.php');\n $updated_contents = $this->updateFileContents($contents);\n $path = base_path() .'/packages/'.$this->packageName.'/Http/Controllers/'.$this->packageName.'Controller.php';\n\n file_put_contents($path, $updated_contents);\n }", "title": "" }, { "docid": "e221633d04fc2f4f5f4d8a2362428823", "score": "0.69536394", "text": "abstract protected function controllerConstruct();", "title": "" }, { "docid": "fb60484fbf762e91b17b69f41086c2c6", "score": "0.6904606", "text": "private function makeController($controllerClassName)\n {\n if ($this->controllerFactory !== null) {\n return call_user_func($this->controllerFactory, $controllerClassName);\n }\n\n return new $controllerClassName;\n }", "title": "" }, { "docid": "88a72e1c8a3b541250666d8d876df9b1", "score": "0.6892876", "text": "public function createController($pi, array $params)\n {\n $container = include __DIR__ . '/dic.php';\n $class = __NAMESPACE__ . '\\\\Controller';\n\n return $container->get($class);\n }", "title": "" }, { "docid": "f5c573357e8982b856f3cf95f34207d4", "score": "0.6804621", "text": "public function controller()\n {\n $this->setClassname($this->getArgument(0));\n\n $this->generateClass('Http/Controllers', 'controller.stub', [\n 'classname' => $this->getClassname(),\n ]);\n }", "title": "" }, { "docid": "7768e52ada3641234c165223358c3965", "score": "0.66875744", "text": "private function getController(): IndexController\n {\n return new IndexController($this->getContainer());\n }", "title": "" }, { "docid": "d57ef5a3ee0ea199899f50a3bc03b48b", "score": "0.65677804", "text": "public function createController($pi, array $params)\n {\n $page = isset($params['page']) ? $params['page'] : 'main';\n $page = preg_replace('/_page$/', '', $page);\n $class = 'phpList\\plugin\\\\' . $pi . '\\\\' . ucfirst($page) . 'Controller';\n\n return new $class();\n }", "title": "" }, { "docid": "72d5a441f81890687fc2dd00df3baf73", "score": "0.65138745", "text": "public static function getInstance() \n {\n $class = __CLASS__;\n if (!isset(self::$_Controller)) {\n return new $class();\n }\n return self::$_Controller;\n }", "title": "" }, { "docid": "75acb5ec39d0d68eed980ebdb37bc967", "score": "0.6485421", "text": "public static function ctrl_maker($ctrl_name)\n \t{\n \t\tif (file_exists(\"app/controllers/{$ctrl_name}.php\")) {\n \t\t\techo \"Existing [{$ctrl_name}] Controller found, try again \\n\";\n \t\t\texit;\n \t\t}\n\n \t\t//Create and write File to controller Dir\n \t\t$controller = fopen(\"app/controllers/{$ctrl_name}.php\",\"w\");\n \t\tfwrite($controller, self::wfile($ctrl_name));\n\n \t\t//Throw response\n \t\techo \"Controller [{$ctrl_name}] created successfully \\n\";\n \t}", "title": "" }, { "docid": "cb636a4bd71a574d37ddab166dd7fcc1", "score": "0.6446192", "text": "private function createController($name, $option = \"false\")\n {\n $container = controllers_path();\n $name = preg_replace('/controller/i', 'Controller', ucfirst($name));\n $append = <<<EOF\n\n /**\n * Controller Index\n *\n * @return mixed\n **/\n public function index()\n {\n\n }\n\n\n /**\n * Fetch resource\n *\n * @return mixed\n **/\n public function fetch()\n {\n\n }\n\n\n /**\n * Show all/a resource(s)\n *\n * @param \\$id\n * @return mixed\n **/\n public function show(\\$id)\n\t{\n\n\t}\n\n\n /**\n * Create a resource\n *\n * @return mixed\n * */\n public function create()\n {\n\n }\n\n\n /**\n * Store the resource\n *\n * @return mixed\n * */\n public function store()\n {\n\n }\n\n\n /**\n * Edit a resource\n *\n * @param \\$id\n * @return mixed\n */\n public function edit(\\$id)\n {\n\n }\n\n\n /**\n * update the resource\n *\n * @return mixed\n */\n public function update()\n {\n\n }\n\n\n /**\n * Destroy a resource\n *\n * @param \\$id\n */\n public function destroy(\\$id)\n {\n\n }\n\n\nEOF;\n\n /**\n * if $option is 'empty', return an empty class\n */\n $methods = ($option == \"true\") ? '' : $append;\n\n $sub = preg_replace('/(.*)\\/(.*)/', '$2', $name);\n $data = <<<EOF\n<?php\n\nclass {$sub}\n{\n {$methods}\n}\n\nEOF;\n\n if (file_exists(\"{$container}/{$name}.php\")):\n return die(\"controller '{$name}' already exists.\\n\");\n endif;\n\n $file = fopen(\"{$container}/{$name}.php\", 'x');\n fwrite($file, $data);\n\n return die(\"'{$sub}' class created.\\n\");\n }", "title": "" }, { "docid": "e7d30d8ef2c251016e0dac7a6ede050c", "score": "0.6426407", "text": "public static function factory($controllerName, $layoutName, $action, $agent)\n {\n // Determine full classname\n $className = self::getClassName($controllerName);\n\n // Construct and return Controller\n return new $className($layoutName, $action, $agent);\n }", "title": "" }, { "docid": "2340da4739a3d4f3af4a806c3b40163c", "score": "0.6424097", "text": "public function incluirController() {\n $controller = $this->name . 'Controller';\n $this->controller = new $controller;\n }", "title": "" }, { "docid": "62acacd9eda2a0af65323ac3d09ec0fd", "score": "0.63956344", "text": "protected function createController( ezcMvcRoutingInformation $routingInformation, ezcMvcRequest $request )\n {\n $controllerClass = $routingInformation->controllerClass;\n $controller = new $controllerClass( $routingInformation->action, $request );\n return $controller;\n }", "title": "" }, { "docid": "9964315b7852ff5fa78452a1123ffbf4", "score": "0.63953257", "text": "public function postController(Request $request){\n $data = $request->json()->all();\n $controller = Controller::create([\n 'controller'=> $data['controller'],\n ]);\n return response()->json($controller, 201);\n }", "title": "" }, { "docid": "6dfca3c8cec5e1689beed63c582777e1", "score": "0.63864696", "text": "public function createController($class) {\n\t\t$replace = [];\n\t\t$file = [];\n\n\t\t$stub='/stubs/EditoraController.20220812.stub';\n\t\tif ($this->old_school_controllers)\n\t\t{\n\t\t\t$stub='/stubs/EditoraController.stub';\n\t\t}\n\n\t\tif (!file_exists(app_path() . '/Http/Controllers/Editora/'))\n\t\t\tmkdir(app_path() . '/Http/Controllers/Editora/', 0755, true);\n\n\t\tif (!file_exists(app_path() . '/Http/Controllers/Editora/' . $class->name . '.php') || $this->force_overwrite_controllers) {\n\n\t\t\tif (file_exists(__DIR__ . $stub)) {\n\t\t\t\t$file = file_get_contents(__DIR__ . $stub);\n\n\t\t\t\t$repositoryNamespace = 'App\\Http\\Controllers\\Editora';\n\t\t\t\t$replace[\"DummyNamespace\"] = 'App\\Http\\Controllers\\Editora';\n\t\t\t\t$replace[\"DummyModelClass\"] = $class->name . 'Extraction';\n\t\t\t\t$replace[\"DummyClass\"] = $class->name;\n\t\t\t\t$replace[\"DummyLowerCaseClass\"] = strtolower($class->name);\n\n\t\t\t\t$file = str_replace(array_keys($replace), array_values($replace), $file);\n\n\t\t\t\t$file_php = fopen(app_path() . '/Http/Controllers/Editora/' . $class->name . '.php', \"w\");\n\t\t\t\tfwrite($file_php, $file);\n\t\t\t\tfclose($file_php);\n\n\t\t\t\techo(\"Create \" . $class->name . \" Controller \\n\");\n\t\t\t} else {\n\t\t\t\techo \"Not exist stub controller \\n\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"Exist \" . $class->name . \" Controller \\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "cbd895cf654881e4d256ac3844370a33", "score": "0.6360979", "text": "private function initController($controller) {\n\n $file = __DIR__ . '/../controllers/' . $controller . 'Controller.php';\n include_once $file;\n $controller = $controller . 'Controller';\n return new $controller;\n }", "title": "" }, { "docid": "c0c517ef5bcb5856fd2a2deeb4b02326", "score": "0.6323563", "text": "public function createController(): void\n {\n $this->checkDsToken();\n // Call the worker method\n $args = $this->getTemplateArgs();\n $results = $this->addActiveUser($args[\"envelope_args\"]);\n\n if ($results) {\n $this->clientService->showDoneTemplate(\n \"Create a new active eSignature user\",\n \"Create a new active eSignature user\",\n \"Results from eSignUserManagement:createUser method:\",\n json_encode(($results->__toString()))\n );\n }\n }", "title": "" }, { "docid": "53355a54bdfca52319b0b386c404dc0c", "score": "0.63204664", "text": "private function instantiateControllers()\n {\n $this->app['payments.controller'] = function () {\n return new PaymentsController($this->app['payments.service'], $this->app['payments.validator']);\n };\n }", "title": "" }, { "docid": "9a984469cd357201ffb0fbfd42e53081", "score": "0.62975997", "text": "public static function inst($controller) {\n $controllerName = $controller.'Controller';\n $fname = str_replace('_', '/', $controller).'.php';\n if (!class_exists($controllerName)) {\n if (!include(wheel::$conf['local_inc_dir'].'/controllers/'.$fname))\n throw new wheelException('Could not load file for controller '. $controller.' - please verify file is in the right location');\n }\n return new $controllerName();\n }", "title": "" }, { "docid": "adb31cc89366698aa5547192a77b1f97", "score": "0.6294923", "text": "public function criarControllerAction()\n {\n $form = $this->getServiceLocator()->get('Gerador\\Form\\CriarControllerForm');\n $service = $this->getServiceLocator()->get('Gerador\\Service\\GeradorService');\n\n $objRequest = $this->getRequest();\n\n if ($objRequest->isPost()) {\n $form->setData($objRequest->getPost());\n if ($form->isValid()) {\n $arrDataFromForm = $form->getData();\n\n try {\n $service->createController($arrDataFromForm);\n //return $this->redirect()\n // ->toRoute($this->route, array('controller' => 'gerador', 'action' => 'criarController'));\n } catch (\\Exception $objException) {\n $this->flashMessenger()->addErrorMessage($objException->getMessage());\n }\n } else {\n echo (\"Form Inválido\");\n }\n }\n\n return new ViewModel(compact('form'));\n }", "title": "" }, { "docid": "75c68b107831d5c640d18447761d5a7d", "score": "0.6283691", "text": "public static function factory(App $app, $controller_name)\n {\n if (!isset($app) || (isset($app) && !$app instanceof App))\n Throw new Error('Controller factory needs an app object.');\n\n // App or framework controller?\n $class = ($app->isSecure() ? '\\\\Web\\\\Framework\\\\AppsSec' : '\\\\Web\\\\Apps') . \"\\\\\" . $app->getName() . '\\\\Controller\\\\' . $controller_name . 'Controller';\n\n // Create controller object\n return new $class($controller_name, $app);\n }", "title": "" }, { "docid": "d9df194088048f2e2b032f201a82e8b3", "score": "0.6262158", "text": "protected function instantiateController($class) {\n\t\treturn new $class();\n\t}", "title": "" }, { "docid": "97d8642dd6ae6270fb8b77bde9f1de31", "score": "0.626122", "text": "public function new_route_controller( $namespace ) {\n\t\t// Do we want to auto start our controllers?\n\t\tif ( $this->config['routing']['auto_start_controllers'] ) {\n\t\t\t// Let's get our class name from the namespace\n\t\t\t$name_parts = explode( '/', $namespace ); \n\n\t\t\t// Let's convert our url endpoint name to a legit classname\n\t\t\t$name_parts = array_map(\n\t\t\t\tfunction( $string ) {\n\t\t\t\t\t$string = str_replace( '-', '_', $string ); // Turn all hyphens to underscores\n\t\t\t\t\t$string = str_replace( '_', ' ', $string ); // Turn all underscores to spaces (for easy casing)\n\t\t\t\t\t$string = ucwords( $string ); // Uppercase each first letter of each \"word\"\n\t\t\t\t\t$string = str_replace( ' ', '', $string ); // Remove spaces. BOOM! Zend-compatible camel casing\n\n\t\t\t\t\treturn $string;\n\t\t\t\t},\n\t\t\t\t$name_parts\n\t\t\t);\n\n\t\t\t// Create a callable classname\n\t\t\t$classname = implode( '\\\\', $name_parts );\n\t\t\t$class = $this->config['routing']['controller_base_namespace'] . $classname;\n\n\t\t\t// Does the class exist? (Autoload it if its not loaded/included yet)\n\t\t\tif ( class_exists( $class, true ) ) {\n\t\t\t\t// Instanciate the controller and keep an easy reference to it\n\t\t\t\t$this->controller = new $class( $this->request, $this->response, $this->service, $this );\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "1eb2ffcd396865a14ff746907387f0c6", "score": "0.62481457", "text": "protected function getController($className, array $controllerArgs = null)\n {\n $class = new ReflectionClass($className);\n if ($controllerArgs === null) {\n $controller = $class->newInstance();\n } else {\n $controller = $class->newInstanceArgs($controllerArgs);\n }\n $controller->setContainer($this->getContainer());\n $controller->setLogger($this->getLogger());\n $controller->init();\n return $controller;\n }", "title": "" }, { "docid": "1f3acdf88cb0b7dccd1cab7a0e225b29", "score": "0.6216539", "text": "public static function createController($config, $comm = null) {\n\n $templateDirectory = __DIR__.'/stubs';\n\n CoreHelper::log(\"info\", \"Creating controller...\", $comm);\n $md = file_get_contents($templateDirectory.\"/controller.stub\");\n\n $md = str_replace(\"__controller_class_name__\", $config->controllerName, $md);\n $md = str_replace(\"__model_name__\", $config->modelName, $md);\n $md = str_replace(\"__crud_name__\", $config->crudName, $md);\n $md = str_replace(\"__view_column__\", $config->crud->view_col, $md);\n\n // Listing columns\n $listing_cols = \"\";\n foreach ($config->crud->fields as $field) {\n $listing_cols .= \"'\".$field['colname'].\"', \";\n }\n $listing_cols = trim($listing_cols, \", \");\n\n // Module\n $module = Module::where('slug', $config->crud->module);\n\n $md = str_replace(\"__listing_cols__\", $listing_cols, $md);\n $md = str_replace(\"__view_folder__\", snake_case($config->crudName), $md);\n $md = str_replace(\"__route_resource__\", snake_case($config->crudName), $md);\n $md = str_replace(\"__db_table_name__\", $config->dbTableName, $md);\n $md = str_replace(\"__singular_var__\", $config->singularVar, $md);\n $md = str_replace(\"__module__\", $module['name'], $md);\n\n file_put_contents(base_path('app/Modules/'.$module['name'].'/Http/Controllers/'.$config->controllerName.\".php\"), $md);\n }", "title": "" }, { "docid": "9a1cc018242715a0160a8ba04e04d0bd", "score": "0.61998004", "text": "private static function createController ($name)\r\n {\r\n if (strpbrk($name, \"\\\\/?%*:|\\\"<>\")) {\r\n echo $name . ' isn\\'t a valid controller name' . \"\\n\";\r\n return;\r\n }\r\n\r\n $name = ucwords(strtolower($name));\r\n $filer = new WalrusFileManager(ROOT_PATH);\r\n\r\n if (!file_exists(ROOT_PATH . 'engine/controllers/' . $name . 'Controller.php')) {\r\n\r\n // @TODO: catch isn't working ?\r\n try {\r\n $filer->setCurrentElem('Walrus/core/sample/controller.sample');\r\n $controller = $filer->getFileContent();\r\n $controller = str_replace('%name%', $name, $controller);\r\n\r\n $filer->setCurrentElem('engine/controllers');\r\n $filer->fileCreate($name . 'Controller.php');\r\n $filer->setCurrentElem('engine/controllers/' . $name . 'Controller.php');\r\n $filer->changeFileContent($controller);\r\n echo 'New controller created in engine/controllers with the name ' . $name . 'Controller.php' . \"\\n\";\r\n } catch (Exception $e) {\r\n echo 'Exception: ' . $e->getMessage() . \"\\n\";\r\n return;\r\n }\r\n } else {\r\n echo $name . 'Controller.php already exist' . \"\\n\";\r\n }\r\n\r\n if (!file_exists(ROOT_PATH . 'www/templates/' . $name)) {\r\n\r\n try {\r\n\r\n $filer->setCurrentElem('www/templates');\r\n $filer->folderCreate(strtolower($name));\r\n\r\n echo 'New templates directory created in www/templates with the name ' . $name . \"\\n\";\r\n } catch (Exception $e) {\r\n echo 'Exception: ' . $e->getMessage() . \"\\n\";\r\n return;\r\n }\r\n } else {\r\n echo $name . ' template directory already exist' . \"\\n\";\r\n }\r\n\r\n }", "title": "" }, { "docid": "7991aa5da4a05993d0bcdb2cd110d8c1", "score": "0.6191357", "text": "function getController($controller)\n{\n $ctrl_name = ucfirst($controller) . 'Controller';\n include_once(APP_CONTROLLERS . $ctrl_name . '.php');\n return new $ctrl_name();\n}", "title": "" }, { "docid": "ece691d92559c8f2397b402a34c03523", "score": "0.61910933", "text": "protected function createRegisterController()\r\n {\r\n file_put_contents(\r\n path('app/Controllers/Auth/RegisterController.php'),\r\n $this->compileRegisterControllerTemp()\r\n );\r\n }", "title": "" }, { "docid": "5443c2363b3d31c386455f04837cdb5c", "score": "0.6187821", "text": "protected static function createInstance()\n {\n\n if (defined('BUIZ_CONTROLLER'))\n $flowController = 'LibFlow'.ucfirst(BUIZ_CONTROLLER);\n else\n $flowController = 'LibFlowApachemod';\n\n self::$instance = new $flowController();\n\n }", "title": "" }, { "docid": "20d843346cbe0a3b4e3d2a396049130d", "score": "0.6175614", "text": "public function create()\n {\n dd('ehExamplesController@create()');\n }", "title": "" }, { "docid": "09aab347ece7f5d31ce863e81c0aeb5c", "score": "0.6171574", "text": "protected function createController($controller)\n {\n $this->checkClass($controller);\n $handler = Application::container()->make($controller);\n if (! $handler instanceof ControllerInterface) {\n throw new InvalidControllerException(\n \"The class '{$controller}' does not implement ControllerInterface.\"\n );\n }\n return $handler;\n }", "title": "" }, { "docid": "320e267b303f4685e52514f9cdbd0cf6", "score": "0.61517256", "text": "public function createControllerByID($id)\r\n {\r\n $ret = parent::createControllerByID($id);\r\n if (!empty($ret)) {\r\n return $ret;\r\n } else {\r\n $this->controllerNamespace = $this->fallbackControllerNamespace;\r\n return parent::createControllerByID($id);\r\n }\r\n }", "title": "" }, { "docid": "1c6937b6ddb8471e5090c844698c096a", "score": "0.6137554", "text": "protected function createHomeController()\r\n {\r\n file_put_contents(\r\n path('app/Controllers/HomeController.php'),\r\n $this->compileHomeControllerTemp()\r\n );\r\n }", "title": "" }, { "docid": "feaa9cda25e1119c8673a0964cb215d5", "score": "0.61270726", "text": "protected function getMaker_AutoCommand_MakeControllerService()\n {\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\console\\\\Command\\\\Command.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\Command\\\\MakerCommand.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\MakerInterface.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\Maker\\\\AbstractMaker.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\Maker\\\\MakeController.php';\n\n $a = ($this->privates['maker.file_manager'] ?? $this->getMaker_FileManagerService());\n\n $this->privates['maker.auto_command.make_controller'] = $instance = new \\Symfony\\Bundle\\MakerBundle\\Command\\MakerCommand(new \\Symfony\\Bundle\\MakerBundle\\Maker\\MakeController($a), $a, ($this->privates['maker.generator'] ?? $this->getMaker_GeneratorService()));\n\n $instance->setName('make:controller');\n\n return $instance;\n }", "title": "" }, { "docid": "dfb02f31f17c5fb00847b5714a26516e", "score": "0.6124433", "text": "protected function generateController(array $options) \n\t{\n\t\t$this->progress[] = 'Create controller';\n\n\t\t$controllersPath = $options['paths']['controllers_path'];\n\t\t$servicesPath = $options['paths']['services_path'];\n\t\t$requestsPath = $options['paths']['requests_path'];\n\t\t$viewsPath = $options['paths']['views_path'];\n\t\t$entityName = $options['entity_name'];\n\t\t$files = $options['files'];\n\n\t\tif ($this->fileSystem->exists(base_path($controllersPath) . $entityName . 'Controller.php')) {\n\t\t\t$this->progress[] = 'Controller already exists';\n\t\t\treturn;\n\t\t}\n\n\t\t$config['namespace'] = $this->getNamespaceFromPath($controllersPath);\n\t\t$config['servicesNamespace'] = $this->getNamespaceFromPath($servicesPath);\n\t\t$config['requestsNamespace'] = $this->getNamespaceFromPath($requestsPath);\n\t\t$config['viewsPath'] = $this->getFullViewsPathFromPath($viewsPath);\n\t\t$config['createRequest'] = (in_array('createrequest', $files) ? \"{$entityName}CreateRequest\" : 'Request' );\n\t\t$config['updateRequest'] = (in_array('updaterequest', $files) ? \"{$entityName}UpdateRequest\" : 'Request' );\n\t\t$config = $this->addEntityNameVariations($config, $entityName);\n\n\t\t$useClasses = [];\n\t\t$useClasses[] = $config['servicesNamespace'] . '\\\\' . $entityName . 'Service';\n\t\tif (in_array('createrequest', $files)) {\n\t\t\t$useClasses[] = $config['requestsNamespace'] . '\\\\' . $config['createRequest'];\n\t\t}\n\t\tif (in_array('updaterequest', $files)) {\n\t\t\t$useClasses[] = $config['requestsNamespace'] . '\\\\' . $config['updateRequest'];\n\t\t}\n\t\tif (count($useClasses) === 1) {\n\t\t\t$config['requestsNamespace'] = 'Illuminate\\Http';\n\t\t\t$useClasses[] = 'Illuminate\\Http\\Request';\n\t\t}\n\n\t\t$config['useStatements'] = '';\n\t\tforeach ($useClasses as $useClass) {\n\t\t\t$config['useStatements'] .= \"use {$useClass}; \\n\";\n\t\t}\n\t\t$config['useStatements'] = rtrim($config['useStatements']);\n\t\t\n\t\t$controllerTemplate = $this->controllerBuilder->create($config);\n\t\t$this->makeDirectoryIfNecessary($controllersPath);\n\t\t$this->fileSystem->put(base_path($controllersPath) . $entityName . 'Controller.php', $controllerTemplate);\n\n\t\t$this->progress[] = 'Success';\n\t}", "title": "" }, { "docid": "40f73be6ff50aaa31634ebfff605297a", "score": "0.6120663", "text": "private function _createControllerModel()\n {\n\n //echo \"creando archivo de controller\";\n\n $model_controller = new \\application\\modules\\system\\model\\ControllerModel();\n $model_module = new \\application\\modules\\system\\model\\ModuleModel();\n\n // lets set the controller params\n $model_controller->controller_description = 'Controller created automatically '\n . ' from model';\n $model_controller->controller_model_id = $this->_id_value;\n $model_controller->controller_name = strtolower($this->_model_name);\n $model_controller->controller_module = $model_module->find('module', ['id_module' => $this->_module_id], 'one')->module;\n $model_controller->controller_module_id = $this->_module_id;\n $model_controller->view_dependency = $this->_controller_dependencys;\n $model_controller->controller_path = __MODULEFOLDER__ . '/' . $model_controller->controller_module . '/controller/';\n\n //create a new controller for this model\n $model_controller->createController();\n\n // create asociatcion , module,controller->model\n $model_controller_model = new ModuleControllerModel();\n $model_controller_model->id_controller = $model_controller->_id_value;\n $model_controller_model->id_module = $this->_module_id;\n $model_controller_model->id_model = $this->_id_value;\n $model_controller_model->createModelControllerModule();\n }", "title": "" }, { "docid": "0dabd0b6625b8176c59d525592b88eb1", "score": "0.60779977", "text": "public function makeController($controllerPath, $controller, $action)\n\t{\n\t\tif (!$this->frontController)\n\t\t\tthrow new \\RuntimeException('You must set frontController before calling this func.');\n\n\t\t$className = $this->createClassName($controllerPath, $controller);\n\t\t$actionName = $this->getActionMethod($action);\n\n\t\ttry {\n\t\t\tif (!class_exists($className) || !method_exists($className, $actionName))\n\t\t\t\treturn false;\n\t\t} catch (\\Exception $e) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$class = new $className($this->frontController);\n\t\tif (!$class instanceof \\KZ\\Controller)\n\t\t\tthrow new \\RuntimeException('Controller must be instance of \\KZ\\Controller.');\n\n\t\treturn $class;\n\t}", "title": "" }, { "docid": "46a9eceb74f42943d037f0f8fb2b933a", "score": "0.6077509", "text": "public function createRequestController(Request $aRequest)\n {\n \t$sControllerName = $aRequest->string($this->sControllerParam) ;\n \t\n \t$sControllerClass = $this->transControllerClass($sControllerName) ;\n \t\n \treturn $sControllerClass? new $sControllerClass($aRequest): null ;\n }", "title": "" }, { "docid": "c6ec4073881c5196194e82ee78c6155e", "score": "0.6073948", "text": "public function CreateController(\\Doctrine\\ORM\\EntityManager $entityManager) {\r\n\r\n //does the class exist? \r\n if (class_exists($this->controller)) {\r\n $parents = class_parents($this->controller);\r\n //does the class extend the controller class?\r\n if (in_array(\"Alt68\\\\Sys\\\\BaseController\", $parents)) {\r\n //does the class contain the requested method?\r\n if (method_exists($this->controller, $this->action)) {\r\n return new $this->controller($entityManager, $this->action, $this->urlvalues);\r\n }\r\n }\r\n }\r\n\r\n // if any error create error page\r\n\r\n $this->controller = $this->controllerNamespaceName .\r\n CommonService::getConfigValue('mainController');\r\n $this->action = 'error';\r\n\r\n return new $this->controller($entityManager, $this->action, $this->urlvalues);\r\n }", "title": "" }, { "docid": "414cc4037aacb1536e895af52a5753cd", "score": "0.60387444", "text": "private function getController(): SecurityController\n {\n return new SecurityController(\n $this->alert,\n $this->config,\n $this->repository,\n $this->toggleTwoFactorService,\n $this->twoFactorSetupService\n );\n }", "title": "" }, { "docid": "7024dca89692e6831b1a364e33d90086", "score": "0.60160553", "text": "public static function createController($inputName)\n {\n $pluginName = StringHelper::camelCase($inputName);\n\n mkdir('craft/plugins/' . $pluginName . '/controllers');\n\n $controller = fopen('craft/plugins/' . $pluginName . '/controllers/' . StringHelper::upperNoSpaces($inputName) . 'Controller.php', 'w');\n fwrite($controller, ContentHelper::generateControllerContent($inputName));\n fclose($controller);\n return;\n }", "title": "" }, { "docid": "6d3db3d7f88034ec7c0db252b9d435c0", "score": "0.6002788", "text": "public function __construct(){\n\t\t$this->crimeController = new crimeController();\n\t}", "title": "" }, { "docid": "9b5c2275d9ffcaf65871350494345c0c", "score": "0.6000697", "text": "function &get_instance(){\n\t return Controller::get_instance();\n\t }", "title": "" }, { "docid": "95c55b5934df2b2fef9a9c0ba3e78c91", "score": "0.5998441", "text": "protected function setupController()\n {\n }", "title": "" }, { "docid": "0d085febcc69eecde78c718eff8bb5b2", "score": "0.5995643", "text": "private function create_migration_controller()\n {\n $controller = $this->location . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . $this->controller_name . '.php';\n if (is_file($controller))\n {\n throw new RuntimeException('The ' . $this->controller_name . ' controller aleardy exists!');\n }\n else\n {\n $template_name = \"migration_controller\";\n $args = array(\n 'class_name' => ApplicationHelpers::camelize($this->controller_name),\n );\n\n if ($this->run_from_web === FALSE)\n {\n $args['extra'] = ' $this->input->is_cli_request() or exit(\"Execute via command line: php index.php migrate\");';\n }\n else\n {\n $args['extra'] = PHP_EOL;\n }\n\n $template = new TemplateScanner($template_name, $args);\n $controller_contents = $template->parse();\n\n if (!file_put_contents($controller, $controller_contents))\n {\n throw new RuntimeException('Could not create migration controller...' . PHP_EOL);\n }\n\n return TRUE;\n }\n }", "title": "" }, { "docid": "d100a28ce6d77b6f197f6d776534f5a9", "score": "0.59911996", "text": "function __construct(Controller $controller)\n {\n $this->_controller = $controller;\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "3d68780a3dae015b84166f917045917b", "score": "0.5978511", "text": "function __construct($class){\n\t\t$this->controller = new $class();\n\t\t}", "title": "" }, { "docid": "7e39a9533343a65165e1fb5bb10d9c81", "score": "0.5962812", "text": "private function addController($controller)\r\n {\r\n try {\r\n $object = new $controller($this->app);\r\n\r\n // App\\Controllers\\HomeController\r\n $this->controllers[$controller] = $object;\r\n } catch (Exception $e) {\r\n echo $e->getMessage();\r\n pred($e->getTrace());\r\n }\r\n }", "title": "" }, { "docid": "e764e6e99310cc69470cb81487b06f38", "score": "0.5956204", "text": "protected function createLoginController()\r\n {\r\n file_put_contents(\r\n path('app/Controllers/Auth/LoginController.php'),\r\n $this->compileLoginControllerTemp()\r\n );\r\n }", "title": "" }, { "docid": "85ce2faaab2f738d464b8e593b227bbc", "score": "0.5949653", "text": "private function use_controller() {\n\n\t\t// Find out which controller to use.\n\t\tif ( $this->request->is_front ) {\n\n\t\t\t$Controller = new Front;\n\n\t\t} elseif ( $this->request->is_dashboard ) {\n\n\t\t\t$Controller = new Dashboard;\n\n\t\t} elseif ( $this->request->is_system ) {\n\n\t\t\t$Controller = new System;\n\n\t\t} elseif ( $this->request->is_auth ) {\n\n\t\t\t$Controller = new Auth;\n\n\t\t} elseif ( $this->request->is_api ) {\n\n\t\t\t$Controller = new API;\n\n\t\t}\n\n\t\t// Load the route.\n\t\t$Controller->load_route( $this->request );\n\n\t}", "title": "" }, { "docid": "3931ba5a979acbd9aa891f561cae7af4", "score": "0.5931807", "text": "public static function GetController($action)\n\t{\n\t\t$controller = null;\n\n\t\tswitch ($action) {\n\t\t\tcase 'search':\n\t\t\t\t$controller = new Controller_Search();\n\t\t\t\tbreak;\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('plain', true);\n\t\t\t\tbreak;\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('plain', true);\n\t\t\t\tbreak;\n\t\t\tcase 'history':\n\t\t\t\t$controller = new Controller_History();\n\t\t\t\tbreak;\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new Controller_Snapshot();\n\t\t\t\tbreak;\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new Controller_Tag();\n\t\t\t\tbreak;\n\t\t\tcase 'tags':\n\t\t\t\t$controller = new Controller_Tags();\n\t\t\t\tbreak;\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new Controller_Heads();\n\t\t\t\tbreak;\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new Controller_Blame();\n\t\t\t\tbreak;\n\t\t\tcase 'blob':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('plain', true);\n\t\t\t\tbreak;\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GITPHP_FEED_FORMAT_RSS);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GITPHP_FEED_FORMAT_ATOM);\n\t\t\t\tbreak;\n\t\t\tcase 'commit':\n\t\t\t\t$controller = new Controller_Commit();\n\t\t\t\tbreak;\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new Controller_Project();\n\t\t\t\tbreak;\n case 'tree':\n\t\t\tdefault:\n $controller = new Controller_Tree();\n\t\t}\n\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "d57a13e96b207607fc9ba7327e52d77e", "score": "0.5927687", "text": "private function _buildController($controller_name) {\r\n\t\t\r\n\t\t$model_name = Inflector::singularize($controller_name);\r\n\t\t$controller_name = Inflector::pluralize($controller_name);\r\n\r\n\t\t$this->controller = new Controller();\r\n\t\t$collection = new ComponentCollection();\r\n\t\t$this->controller->request = new CakeRequest();\r\n\t\t$this->Image =& new ImageComponent($collection);\r\n\t\t$this->PDFMenu =& new PDFMenuComponent($collection);\r\n\r\n\t\t$this->controller->name = $controller_name;\r\n\t\t$this->controller->{$model_name} = $this->{$model_name};\r\n\r\n\t\t$this->Image->initialize($this->controller, $this->files_dry_run);\r\n\t\t$this->PDFMenu->initialize($this->controller, $this->files_dry_run);\r\n\r\n\t}", "title": "" }, { "docid": "181c88b44dd8c624423841bce0a25ad4", "score": "0.59190243", "text": "protected function controller($name)\n {\n $space = explode('/', $name);\n $className = last($space);\n $namespace = 'App\\Http\\Controllers';\n $modelPath = str_replace('/', '\\\\', $name);\n $requestPath = $modelPath . 'Request';\n $servicePath = $modelPath . 'Service';\n $resourcePath = $modelPath . 'Resource';\n\n if (count($space) > 1) {\n $namespace .= \"\\\\\" . str_replace('/', '\\\\', str_replace(\"/\". $className, '', $name));\n }\n\n $direcotory = app_path(str_replace('App/', '', str_replace('\\\\', '/', $namespace)));\n\n $controllerTemplate = str_replace(\n [\n '{{DummyNamespace}}',\n '{{requestPath}}',\n '{{servicePath}}',\n '{{resourcePath}}',\n '{{modelName}}',\n '{{modelNamePluralLowerCase}}',\n '{{modelNameSingularLowerCase}}'\n ],\n [\n $namespace,\n $requestPath,\n $servicePath,\n $resourcePath,\n $className,\n strtolower(str_plural($className)),\n strtolower($className)\n ],\n $this->getStub('ControllerAjax')\n );\n\n if(!file_exists($direcotory))\n mkdir($direcotory, 0777, true);\n\n file_put_contents(app_path(\"/Http/Controllers/{$name}Controller.php\"), $controllerTemplate);\n }", "title": "" }, { "docid": "a8d8aed9f45c7f10fa763f95b96cb019", "score": "0.59000975", "text": "public static function factory($name)\n {\n $class = self::toClass($name);\n include APPLICATION_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . $class . '.php';\n return new $class();\n }", "title": "" }, { "docid": "29b809a46b9dbf7606b6a90ce383619a", "score": "0.589585", "text": "private function getController(string $dir) {\n $dir = str_replace('/', '\\\\', $dir);\n $class = 'Controller\\\\' . $dir;\n \n $controller = new $class($this, $this->library, $this->session, $this->cache);\n return $controller;\n }", "title": "" }, { "docid": "7651f62b6c93723a9c372dc1a5f871df", "score": "0.589468", "text": "public function initController($controller, $path)\n {\n if($path)\n {\n $controller = $this->name . '\\\\Controller\\\\' . $path . '\\\\' . $controller;\n }\n else\n {\n $controller = $this->name . '\\\\Controller\\\\' . $controller;\n }\n\n return new $controller();\n }", "title": "" }, { "docid": "903cd6f46161ed593e91fd8d1e441e4e", "score": "0.588756", "text": "private function load_controller()\n\t{\n\t\t// If no controller is set through the uri array then set it to default\n\t\tif (Router::uri(1) === null)\n\t\t\tRouter::uri(1, Config::$config[$this->data['app']['name']]['default_controller']);\n\n\t\trequire DOC_ROOT . 'apps/' . $this->app_name . '/controllers/controller.' . Router::uri(1) . '.php';\n\t\t\n\t\t$controller_name = String::uc_slug(Router::uri(1), '_') . '_Controller';\n\t\t$controller_obj = new $controller_name($this->data);\n\t}", "title": "" }, { "docid": "18f6b019957cbd45ff8dd1ea670e90a4", "score": "0.58828807", "text": "public function action_controller( $params ) \n\t{\t\n\t\t$options = \\CCDataObject::assign( $params );\n\t\t\n\t\t$name = $options->get( 0, null );\n\t\t$parent = $options->get( 1, null );\n\t\t\n\t\t// get name if we dont have one\n\t\twhile( !$name ) \n\t\t{\n\t\t\t$name = $this->read( 'Please enter the controller name: ' );\n\t\t}\n\t\t\n\t\t// fix controller suffix\n\t\tif ( substr( $name, ( strlen( 'Controller' ) * -1 ) ) != 'Controller' )\n\t\t{\n\t\t\t$name .= 'Controller';\n\t\t}\n\t\t\n\t\t// try to resolve the path\n\t\tif ( !$path = \\CCPath::controllers( str_replace( '_', '/', $name ), EXT ) )\n\t\t{\n\t\t\t$this->error( 'Could not resolve the path. Check if the namespace is registered.' ); return;\n\t\t}\n\t\t\n\t\t// parent\n\t\tif ( is_null( $parent ) )\n\t\t{\n\t\t\t$parent = '\\\\CCController';\n\t\t} \n\t\t\n\t\t// view controller\n\t\tif ( $options->get( 'view', false ) )\n\t\t{\n\t\t\t$parent = '\\\\CCViewController';\n\t\t}\n\t\t\n\t\t// create the class\n\t\t$class = \\CCShipyard::create( 'class', $name, $parent );\n\t\t\n\t\t// get the actions\n\t\t$actions = array( 'index' );\n\t\t\n\t\tif ( $options->get( 'actions', false ) )\n\t\t{\n\t\t\t$actions = array_merge( $actions, explode( ',', $options->get( 'actions' ) ) );\n\t\t}\n\t\t\n\t\tforeach( $actions as $action )\n\t\t{\n\t\t\t$action = trim( $action );\n\t\t\t\n\t\t\t$class->add( 'function', 'action_'.$action, 'protected', 'echo \"'.$name.' '.$action.' action\";', ucfirst($action).\" action\\n@return void|CCResponse\" );\n\t\t\t$class->add( 'line', 2 );\n\t\t}\n\t\t\n\t\t// add static init\n\t\tif ( !$options->get( 'no-events', false ) )\n\t\t{\n\t\t\t$class->add( 'function', 'wake', 'protected', '//', \"Controller wake\\n@return void|CCResponse\" );\n\t\t\t$class->add( 'line', 2 );\n\t\t\t$class->add( 'function', 'sleep', 'protected', '//', \"Controller wake\\n@return void\" );\n\t\t}\n\t\t\t\t\t\t\n\t\t// check for overwrite\n\t\tif ( file_exists( $path ) )\n\t\t{\n\t\t\tif ( !$this->confirm( \"The class already exists. Do you wish to overwrite it?\", true ) ) \n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// write file\n\t\t\\CCFile::write( $path, $class->output() );\n\t}", "title": "" }, { "docid": "986593fadac4a233b16d6411512510b2", "score": "0.5880932", "text": "public function getController($controller_name)\n {\n return Controller::factory($this, $controller_name);\n }", "title": "" }, { "docid": "48be68f2d9bd5c305c8873ab5aff62d3", "score": "0.58794177", "text": "public function create()\n\t{\n\t\t//\n\n return view ('control.create');\n\t}", "title": "" }, { "docid": "cd98ae6932161ed0431f62e5eec26b70", "score": "0.587036", "text": "function __contruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contruct();//Chamando o construtor da classe pai\n\t}", "title": "" }, { "docid": "df206b51af190c78d40f349a9ca3622c", "score": "0.58663046", "text": "private function buildController(Request $request) {\n // With redirection, all incoming URLs are like :\n // index.php?controller=XXX&action=YYY&id=ZZZ\n $controllerSuffix = \"Home\"; // Default controller suffix is \"Home\" to call ControllerHome\n if ($request->existsParameter('controller')) {\n $controllerSuffix = $request->getParameter('controller');\n // First letter to uppercase\n $controllerSuffix = ucfirst(strtolower($controllerSuffix));\n }\n // Once we have the Suffix we can create the controller filename\n $controllerClass = \"Controller\" . $controllerSuffix;\n $controllerFilePath = \"Controller/\" . $controllerClass . \".php\";\n if (file_exists($controllerFilePath)) {\n // Now the right controller matching with the url request is required\n require($controllerFilePath);\n // We instantiate a new controller object \n $controller = new $controllerClass();\n $controller->setRequest($request);\n return $controller;\n }\n else\n throw new Exception(\"File '$controllerFilePath' not found\");\n }", "title": "" }, { "docid": "4dfca9238fe442ba82b785971608ec5d", "score": "0.5859159", "text": "public function testCreateController()\n {\n $module = new Module('app');\n $module->setModule('base', new Module('base'));\n $defaultController = ['class' => 'yii\\web\\Controller'];\n $otherController = ['class' => 'yii\\web\\Controller'];\n $module->getModule('base')->controllerMap = [\n 'default' => $defaultController,\n 'other' => $otherController,\n ];\n\n list($controller, $action) = $module->createController('base');\n $this->assertSame('', $action);\n $this->assertSame('app/base/default', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/default');\n $this->assertSame('', $action);\n $this->assertSame('app/base/default', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/other');\n $this->assertSame('', $action);\n $this->assertSame('app/base/other', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/default/index');\n $this->assertSame('index', $action);\n $this->assertSame('app/base/default', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/other/index');\n $this->assertSame('index', $action);\n $this->assertSame('app/base/other', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/other/someaction');\n $this->assertSame('someaction', $action);\n $this->assertSame('app/base/other', $controller->uniqueId);\n\n $controller = $module->createController('bases/default/index');\n $this->assertFalse($controller);\n\n $controller = $module->createController('nocontroller');\n $this->assertFalse($controller);\n }", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "c012a06c01a8723b409f5711fd9f32fc", "score": "0.58479625", "text": "public function __construct()\n {\n $this->ctrlHome = new HomeController();\n $this->ctrlAdministration = new AdministrationController();\n }", "title": "" }, { "docid": "e391ad7de7d9c70f4f5ada285f6f9e34", "score": "0.58444035", "text": "public function __construct()\n {\n $model = 'Model'.str_replace('Controller','',static::class);\n $this->request = $GLOBALS['request'];\n $this->response = $GLOBALS['response'];\n $this->model = new $model;\n }", "title": "" }, { "docid": "9e818a4d637c746887563487d241a1a2", "score": "0.5828917", "text": "public static function getInstance() {\n\n if( isset( $_REQUEST['api'] ) && filter_input( INPUT_GET, 'api', FILTER_VALIDATE_BOOLEAN ) ){\n\n if( !isset( $_REQUEST['action'] ) || empty( $_REQUEST['action'] ) ){\n header( \"Location: \" . INIT::$HTTPHOST . INIT::$BASEURL . \"api/docs\", true, 303 ); //Redirect 303 See Other\n die();\n }\n\n $_REQUEST[ 'action' ][0] = strtoupper( $_REQUEST[ 'action' ][ 0 ] );\n\n //PHP 5.2 compatibility, don't use a lambda function\n $func = create_function( '$c', 'return strtoupper($c[1]);' );\n\n $_REQUEST[ 'action' ] = preg_replace_callback( '/_([a-z])/', $func, $_REQUEST[ 'action' ] );\n $_POST[ 'action' ] = $_REQUEST[ 'action' ];\n\n //set the log to the API Log\n Log::$fileName = 'API.log';\n\n }\n\n //Default : catController\n $action = ( isset( $_POST[ 'action' ] ) ) ? $_POST[ 'action' ] : ( isset( $_GET[ 'action' ] ) ? $_GET[ 'action' ] : 'cat' );\n $className = $action . \"Controller\";\n\n //Put here all actions we want to be performed by ALL controllers\n require_once INIT::$MODEL_ROOT . '/queries.php';\n\n return new $className();\n\n }", "title": "" }, { "docid": "c167b1ad8a774d33f321682f8bf85138", "score": "0.58256966", "text": "public function createEndpoint()\n {\n $stack = $this->getMiddleware(Controller\\CreateActionController::class);\n $this->app->post(\"/{$this->name}\", $stack, \"{$this->name}.create\");\n return $this;\n }", "title": "" }, { "docid": "441ddd8ff482b1f4a290fc202d094f4f", "score": "0.5820733", "text": "public function __construct(\\Jazzee\\Interfaces\\AdminController $controller);", "title": "" }, { "docid": "ab1cb66e4ea5f6709ca6b9444df42925", "score": "0.5819755", "text": "public function __construct () \r\n\t\t{\r\n\t\t\t// Get the controller values, action and parameter from URL and set class properties.\r\n\t\t\t$this->get_url_data();\r\n\r\n\t\t\t/**\r\n\t\t\t * Check if controller exists.\r\n\t\t\t * If not add the standard controller (controllers/home-controller.php) and call index() method.\r\n\t\t\t*/\r\n\t\t\tif ( ! $this->controlador )\r\n\t\t\t{\r\n\t\t\t\t// Add the standard controller\r\n\t\t\t\trequire_once ABSPATH . '/controllers/home-controller.php';\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Generate controller object \"home-controller.php\"\r\n\t\t\t\t * This controller should have a class called HomeController\r\n\t\t\t\t*/\r\n\t\t\t\t$this->controlador = new HomeController();\r\n\r\n\t\t\t\t// Call index() method\r\n\t\t\t\t$this->controlador->index();\r\n\t\t\t\treturn;\t\t\t\r\n\t\t\t} // ! $this->controlador\r\n\r\n\t\t\t// If controller doesn't exist, nothing happens\r\n\t\t\tif ( ! file_exists( ABSPATH . '/controllers/' . $this->controlador . '.php' ) ) \r\n\t\t\t{\r\n\t\t\t\t// Page not found\r\n\t\t\t\trequire_once ABSPATH . $this->not_found;\r\n\t\t\t\treturn;\r\n\t\t\t} // file_exists\r\n\r\n\t\t\t// Include controller file\r\n\t\t\trequire_once ABSPATH . '/controllers/' . $this->controlador . '.php';\r\n\r\n\t\t\t/**\r\n\t\t\t * Remove invalid characters from controller name to generate class name.\r\n\t\t\t * e.g: If file name is \"news-controller.php\", the class should be named NewsController.\r\n\t\t\t*/\r\n\t\t\t$this->controlador = preg_replace( '/[^a-zA-Z]/i', '', $this->controlador );\r\n\r\n\t\t\t// If controller's class doesn't exist, nothing happens\r\n\t\t\tif ( ! class_exists( $this->controlador ) ) \r\n\t\t\t{\r\n\t\t\t\t// Page not found\r\n\t\t\t\trequire_once ABSPATH . $this->not_found;\r\n\t\t\t\treturn;\r\n\t\t\t} // class_exists\r\n\r\n\t\t\t// Generate controller class's object and send the parameters\r\n\t\t\t$this->controlador = new $this->controlador( $this->parametros );\r\n\r\n\t\t\t// Remove invalid characters fromethod name.\r\n\t\t\t$this->acao = preg_replace( '/[^a-zA-Z]/i', '', $this->acao );\r\n\r\n\t\t\t// If the method exists, run it and send the parameters\r\n\t\t\tif ( method_exists( $this->controlador, $this->acao ) )\r\n\t\t\t{\r\n\t\t\t\t$this->controlador->{$this->acao}( $this->parametros );\r\n\t\t\t\treturn;\r\n\t\t\t} // method_exists\r\n\r\n\t\t\t// Without action, calls index method\r\n\t\t\tif ( ! $this->acao && method_exists( $this->controlador, 'index' ) ) \r\n\t\t\t{\r\n\t\t\t\t$this->controlador->index( $this->parametros );\t\t\r\n\t\t\t\treturn;\r\n\t\t\t} // ! $this->acao \r\n\r\n\t\t\t// Page not found\r\n\t\t\trequire_once ABSPATH . $this->not_found;\r\n\t\t\treturn;\r\n\t\t}", "title": "" }, { "docid": "34844035a0c313ec42e7eaf1afa3065d", "score": "0.58110505", "text": "public function setupController()\n {\n \t$serviceLocator = $this->getApplicationServiceLocator();\n \t\n $this->setController(new ComponentsController( $serviceLocator ));\n $this->getController()->setServiceLocator( $serviceLocator );\n $this->setRequest(new Request());\n $this->setRouteMatch(new RouteMatch(array('controller' => '\\UIComponents\\Controller\\Components', 'action' => 'index')));\n $this->setEvent(new MvcEvent());\n $config = $serviceLocator->get('Config');\n $routerConfig = isset($config['router']) ? $config['router'] : array();\n $router = HttpRouter::factory($routerConfig);\n $this->getEvent()->setRouter($router);\n $this->getEvent()->setRouteMatch($this->getRouteMatch());\n $this->getController()->setEvent($this->getEvent());\n $this->setResponse(new Response());\n \n $this->setZfcUserValidAuthMock();\n }", "title": "" }, { "docid": "a5957a33fd679962035a8954188adc3d", "score": "0.5803588", "text": "public function testCreateTheControllerClass()\n {\n $controller = new DiceGame();\n $this->assertInstanceOf(\"\\Ampheris\\ampController\\DiceGame\", $controller);\n }", "title": "" }, { "docid": "3c8672a4ab44565b758888a22784fc6a", "score": "0.58019835", "text": "private function _loadExistingController() {\n $file = $this->_controllerPath . $this->_url[1] . '.php';\n \n if (file_exists($file)) {\n require $file;\n $this->_controller = new $this->_url[1];\n $this->_controller->loadModel($this->_url[1], $this->_modelPath);\n } else {\n $this->_error();\n }\n }", "title": "" }, { "docid": "8ed601196501353ac907825ec55208f4", "score": "0.5797926", "text": "protected function getAuthController(): AuthController\n {\n return new AuthCtrl();\n }", "title": "" }, { "docid": "35c04f36e6686376a85a41edc2a73614", "score": "0.57961756", "text": "public function run()\n {\n $url = self::parseUrl(); // Get sanitized url array\n\n if (file_exists(Path::CONTROLLER_PATH . ucfirst($url[0]) . self::CONTROLLER . \".php\")) {\n $this->controller = ucfirst($url[0]) . self::CONTROLLER; // Capitalize firts letter of controller file\n unset($url[0]); // Remove controller name from url\n }\n \n // Create a new instance of founded controller.\n $className = $this->namespace . $this->controller;\n $this->controller = new $className;\n\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]); // Remove method name from url\n }\n }\n\n $this->params = $url ? array_values($url) : [];\n\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "title": "" }, { "docid": "5404dfc85e5adc922cf24c054703a005", "score": "0.57896876", "text": "public static function getController()\n {\n return self::$instance;\n }", "title": "" }, { "docid": "fc9c9115cba804e7db3b3d49bf5e7a27", "score": "0.5785685", "text": "public function create(){\n\t\t//non-cli request\n\t}", "title": "" }, { "docid": "9078992e89b7bb474dff25ce94989df2", "score": "0.5785085", "text": "public static function create () {}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "f5f543afe38b9e29fb7131e5b7ce724f", "score": "0.5768897", "text": "public static function getController ()\n {\n self::getInstance();\n return self::$_controller;\n }", "title": "" }, { "docid": "06e437b3d8f0ef39c9c2664758c0c1ed", "score": "0.5759767", "text": "public function setController($val)\n {\n $this->_propDict[\"controller\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "b327f30a2114560543450f05e31a181b", "score": "0.57568383", "text": "public function __construct()\n\t\t{\n\t\t\t$this->Controller = $this->getController().'Controller';\n\n\t\t\t// On inclut le model de la class controller\n\t\t\t$model = $this->getController().'Model';\n\t\t\t// on test que le fichier model existe\n\t\t\tif(file_exists(ROOT_PAGES.$this->getController().__DS__.$model.'.php'))\n\t\t\t{\n\t\t\t\tinclude ROOT_PAGES.$this->getController().__DS__.$model.'.php';\t\n\t\t\t\t$this->$model = new $model($this->getController());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4b21a26d8fd938d2bfbcd330533a6d54", "score": "0.57491434", "text": "public function create(Request $request){\n $ProductController = BuyMakeProduct::create($request->all());\n return view('welcome');\n }", "title": "" }, { "docid": "4646ca16c9933666e66043139537df93", "score": "0.574532", "text": "function UserController() // constructor\n {\n }", "title": "" }, { "docid": "4970bdf134efda6be8fc94534eec2ec8", "score": "0.5742138", "text": "protected function handleController() {\n $c = Config::getInstance();\n \n $controllerName = $c->getControllerName();\n $action_name = $c->getActionName();\n if (!empty($_GET[$controllerName])) {\n $controller = $_GET[$controllerName];\n } else {\n $controller = \"home\"; // If any controller, this is the default.\n }\n\n $class = ucfirst($controller) . 'Controller';\n $c = new $class();\n $c->setup();\n }", "title": "" }, { "docid": "0a7d4148e0bb3ee841aa635d286b1157", "score": "0.57387894", "text": "public function __construct() {\n $url = $this->getUrl();\n\n // Check for 1st part if the url: localhost/mm/pages\n if (isset($url[0])) {\n\n // Prepare the class name\n $controller = ucwords(strtolower($url[0]));\n\n // Check if controller exists\n if (file_exists(\"../app/controllers/\" . $controller . \".php\")) {\n\n // If exists, set as controller\n $this->currentController = $controller;\n\n // Unset the first word\n unset($url[0]);\n }\n }\n\n // Require the controller\n require_once \"../app/controllers/\" . $this->currentController . \".php\";\n\n // Instantiate controller class\n $this->currentController = new $this->currentController;\n\n // Check for 2nd part if the url: localhost/mm/pages/about\n if (isset($url[1])) {\n\n // Prepare the method name\n $method = strtolower($url[1]);\n\n // check if methed exits in the currentController\n if (method_exists($this->currentController, $method)) {\n\n $this->currentMethod = $method;\n\n // Unset the second word\n unset($url[1]);\n }\n }\n\n // Move other params from URL to params array\n $this->params = $url ? array_values($url) : [];\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "title": "" }, { "docid": "4b83dec6b24f4f923c1ce547a3d9c6db", "score": "0.57330596", "text": "public function GenerateController()\n {\n $fileName2='../application/controller/'.$this->className.\"sController.php\";\n\n $fn=fopen($fileName2,'w') or die(\"can't open file\");\n $stringData=\"<?php \\n \\n require_once('controller.php');\\n\";\n\n fwrite($fn,$stringData);\n $string=\"\\n if(isset($\".\"_REQUEST['\".\"action\".\"'])){\\n $\".\"controller_templet=new Controller($\".\"_REQUEST['action']);\\n\\t if($\".\"controller_templet->getAction()=='view'){\\n\";\n $string.=\"\\t\\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \\t\\t echo json_encode( $\".$this->className.\"->view());\\n }\";\n fwrite($fn,$string);\n //fwrite($fn,$stringData);\n $string2=\"\\t else if($\".\"controller_templet->getAction()=='add'){\\n\";\n $string2.=\"\\t \\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \";\n fwrite($fn,$string2);\n //set varible\n for($i=1;$i<sizeof($this->table_names);$i++){\n\n $string3=\"\\t \\t $\".$this->className.\"->set\".$this->table_names[$i].\"($\".\"_REQUEST['\".$this->table_names[$i].\"']);\\n\";\n fwrite($fn,$string3);\n }\n $string4=\"\\t \\t echo json_encode( $\".$this->className.\"->save());\\n }\\n else if($\".\"controller_templet->getAction()=='edit'){\\n \\t \\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \";\n fwrite($fn,$string4);\n for($i=0;$i<sizeof($this->table_names);$i++){\n\n $string3=\"\\t \\t $\".$this->className.\"->set\".$this->table_names[$i].\"($\".\"_REQUEST['\".$this->table_names[$i].\"']);\\n\";\n fwrite($fn,$string3);\n }\n $string4=\"\\t \\t echo json_encode( $\".$this->className.\"->update()); }\\n else if($\".\"controller_templet->getAction()=='delete'){\\n \\t \\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \";\n fwrite($fn,$string4);\n $string3=\"\\t \\t $\".$this->className.\"->set\".$this->table_names[0].\"($\".\"_REQUEST['\".$this->table_names[0].\"']);\\n\";\n fwrite($fn,$string3);\n $string5=\"echo json_encode( $\".$this->className.\"->delete()); \\n}else if($\".\"controller_templet->getAction()=='viewCombo'){ \\n\\t\\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \\t\\t echo json_encode( $\".$this->className.\"->viewConbox());\\n\\t\\t} \\n} ?>\";\n fwrite($fn,$string5);\n fclose($fn);\n }", "title": "" } ]
31c13b60edf0f64906e1ccbe65578961
Returns list of entity attributes.
[ { "docid": "494eca0fb6af1703ac7b257c50ffc981", "score": "0.0", "text": "abstract public function fetchEntityFields();", "title": "" } ]
[ { "docid": "87ba5b449859da91a2424af56486c054", "score": "0.8412373", "text": "public function getEntityAttributes()\n {\n return $this->entity->getEntityAttributes();\n }", "title": "" }, { "docid": "2d70d3fd4f7ba2f1e931a4c926cec7e9", "score": "0.80207556", "text": "public function getAttributes($entity);", "title": "" }, { "docid": "8691d46faca3172495ffd3fd57a794d1", "score": "0.7683983", "text": "public function getCustomAttributes()\n {\n return $this->getEntity()->getCustomAttributes();\n }", "title": "" }, { "docid": "b1b9025eb8819873ed80d78031439cc3", "score": "0.7604026", "text": "public function getAttributes() {\n\t\treturn $this->orm->getAttributes();\n\t}", "title": "" }, { "docid": "de9c3c11d5eb4277e8cc6f2d47e329dc", "score": "0.75371563", "text": "private function getAttributes(): array\n {\n $select = $this->resource->getConnection()\n ->select()\n ->from(\n ['eav_attribute' => $this->resource->getTableName('eav_attribute')],\n self::EAV_ATTRIBUTES_DATA_SET\n )->joinLeft(\n ['eav_entity_type' => $this->resource->getTableName('eav_entity_type')],\n 'eav_attribute.entity_type_id = eav_entity_type.entity_type_id',\n ['entity_table']\n )->where('eav_entity_type.entity_type_code = ?', $this->entityTypeCode)\n ->where('eav_attribute.attribute_code IN (?)', $this->map);\n return $this->resource->getConnection()->fetchAll($select);\n }", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.75294334", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.75294334", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.75294334", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.75294334", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.75294334", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.75294334", "text": "public function getAttributes();", "title": "" }, { "docid": "c9dbc786a18c3c1bdbe92b25d7f8b24a", "score": "0.75067323", "text": "private function getAttributeProperties()\n {\n /** @var \\Shopware\\Bundle\\AttributeBundle\\Service\\CrudServiceInterface $crud */\n $crud = $this->getContainer()->get('shopware_attribute.crud_service');\n $attributeNames = $crud->getList('s_articles_attributes');\n $fields = [];\n foreach ($attributeNames as $property) {\n $fields[] = '__attribute_' . $property->getColumnName();\n }\n\n return $fields;\n }", "title": "" }, { "docid": "2bc84ba243d400d62ebdfa9ba6499f81", "score": "0.7487695", "text": "function getAllAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "b0e0ec8506dceb76fc0f8e395cbe7ebb", "score": "0.7472281", "text": "public function getEntityListAttribute()\n {\n return $this->entities->pluck('id')->all();\n }", "title": "" }, { "docid": "821eb62567609cc206e7006967afb5a4", "score": "0.7451977", "text": "public function getAttributes() {\r\n\t\treturn array_keys($this->definition->persistent_attributes);\r\n\t}", "title": "" }, { "docid": "140a4e5436b047b24fafb3c3435eab89", "score": "0.74305403", "text": "function getAttributesList() {\n $arrClms = array('pkAttributeID', 'AttributeLabel', 'AttributeCode');\n $varTable = TABLE_ATTRIBUTE;\n $arrRes = $this->select($varTable, $arrClms, $varID);\n return $arrRes;\n }", "title": "" }, { "docid": "42834ed5a36e51a0f06eb31853efe93a", "score": "0.7388231", "text": "public function getAllAttributes(): array\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "c77fc66646ebe1309330df140b4ae5c7", "score": "0.73542213", "text": "public function attributes()\n {\n return array_merge(parent::attributes(), ['entityModel.name']);\n }", "title": "" }, { "docid": "84c96ae1418c95f468bd3183cd01173e", "score": "0.73349005", "text": "public function attributes()\n {\n return [\n \"Entity\" => $this->entity->name,\n \"ReportingPeriod\" => $this->reportingPeriod,\n \"Balances\" => $this->balances\n ];\n }", "title": "" }, { "docid": "b3f2d5224eec1b68675dfdb138b17d03", "score": "0.7312992", "text": "final public function attributes()\n {\n return $this->getProperties();\n }", "title": "" }, { "docid": "d2ca83c0c6221a4c4855f285a42ca9e5", "score": "0.73105925", "text": "public function getAttributes(): iterable;", "title": "" }, { "docid": "44a247ff9635f7985a600e8292e6c665", "score": "0.72791594", "text": "public function getAttributes(): array {\r\n return $this -> attributes;\r\n }", "title": "" }, { "docid": "d2e1fc4fea4f33f634e891ea481e72ce", "score": "0.7267629", "text": "public function getAttributes()\n {\n if ($this->_attributes === null) {\n $this->_attributes = array();\n $attributeCodes = $this->getAttributeCodes();\n $entity = Mage::getSingleton('eav/config')->getEntityType($this->getEntityType())->getEntity();\n foreach ($attributeCodes as $attributeCode) {\n $attribute = Mage::getSingleton('eav/config')\n ->getAttribute($this->getEntityType(), $attributeCode)->setEntity($entity);\n try {\n // check if exists source and backend model.\n // To prevent exception when some module was disabled\n $attribute->usesSource() && $attribute->getSource();\n $attribute->getBackend();\n $this->_attributes[$attributeCode] = $attribute;\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n }\n\n return $this->_attributes;\n }", "title": "" }, { "docid": "f09bd57105c53a794c5f3be2d612fdd3", "score": "0.72572494", "text": "public function getAttributes()\n {\n return $this->properties['attributes'];\n }", "title": "" }, { "docid": "6d79fb3d3f047ae1ebc2821866d7e960", "score": "0.72195965", "text": "public function getAttributeList() {\n return $this->attributeList;\n }", "title": "" }, { "docid": "a57406dd4ed66bf2a532c8042dc684a5", "score": "0.7195311", "text": "public function attributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "a57406dd4ed66bf2a532c8042dc684a5", "score": "0.7195311", "text": "public function attributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "a57406dd4ed66bf2a532c8042dc684a5", "score": "0.7195311", "text": "public function attributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "62af36399bccc16640f32c4a1ee609da", "score": "0.7187177", "text": "public function getAttributes(): array\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "62af36399bccc16640f32c4a1ee609da", "score": "0.7187177", "text": "public function getAttributes(): array\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "62af36399bccc16640f32c4a1ee609da", "score": "0.7187177", "text": "public function getAttributes(): array\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "62af36399bccc16640f32c4a1ee609da", "score": "0.7187177", "text": "public function getAttributes(): array\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "62af36399bccc16640f32c4a1ee609da", "score": "0.7187177", "text": "public function getAttributes(): array\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "62af36399bccc16640f32c4a1ee609da", "score": "0.7187177", "text": "public function getAttributes(): array\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "62af36399bccc16640f32c4a1ee609da", "score": "0.7187177", "text": "public function getAttributes(): array\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "d16c08a70b963a7db182225967311d52", "score": "0.71702266", "text": "public function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "dfc9136c8285e33cfadb55db307360f4", "score": "0.7154572", "text": "public function attributes()\n {\n return $this->__properties();\n }", "title": "" }, { "docid": "f9fb731ef98b68dec538635b3ca01fcf", "score": "0.7150082", "text": "public function getAttributes() {\n return $this->attributes;\n }", "title": "" }, { "docid": "4624c2e36f62e0f0f2a65c5933549083", "score": "0.7139402", "text": "public function attributes()\n {\n return $this->attributesArray;\n }", "title": "" }, { "docid": "856df0bb81615a7a2b47b4da3dab0582", "score": "0.71367496", "text": "public function getAttributes()\n {\n $sql = 'SHOW FIELDS FROM ' . $this->getTableName();\n $stmt = $this->_connection->prepare($sql);\n $stmt->execute();\n $res = $stmt->fetchAll(\\PDO::FETCH_COLUMN);\n return $res;\n }", "title": "" }, { "docid": "0263918b8a281f11b93a780080b5fbba", "score": "0.711469", "text": "function getAttributes() {\n\n return $this->attributes;\n\n }", "title": "" }, { "docid": "58633d454d594ee500f1b8fb947120d1", "score": "0.71132153", "text": "public function getAttributes()\n {\n return array();\n }", "title": "" }, { "docid": "e5231cc6c1dbf94c9deb9383d94d3b9c", "score": "0.7113097", "text": "public function getAttributes(){\n return $this->attributes;\n }", "title": "" }, { "docid": "79f3d0446901f3321e88df38a264a036", "score": "0.71097565", "text": "public function getAttributes(){\r\n\t\treturn $this->attributes;\r\n\t}", "title": "" }, { "docid": "f88de8270c6730f403ca28692a8bf1f2", "score": "0.7083468", "text": "public function getAttributes()\n {\n return $this->_attributes;\n }", "title": "" }, { "docid": "dcc6cb858d5ffa71506f62cce96ab8cb", "score": "0.70813096", "text": "public function getAttributes(){ \r\n\t\treturn $this->attributes;\r\n\t}", "title": "" }, { "docid": "40aeea09fb4581cf3bc32619015edf43", "score": "0.7079682", "text": "function getAttributes()\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "34ad526ce7f03f778eacc2dc154cd7cd", "score": "0.7069054", "text": "public function getAttributes()\n {\n return $this->getValueJSONDecoded('nb_commerce_product_attributes');\n }", "title": "" }, { "docid": "8566e9efa90fcfd392202a02dd147064", "score": "0.7063629", "text": "public function attributes()\n\t{\n\t\treturn $this->attributes;\n\t}", "title": "" }, { "docid": "9669f01785919822eb0fe737cf95da70", "score": "0.7060829", "text": "abstract public function getAttributes();", "title": "" }, { "docid": "01f7bb5f076cecac4a1e0dcabfd9050f", "score": "0.70583737", "text": "public function getAttributes() {\n\t\treturn $this->attributes;\n\t}", "title": "" }, { "docid": "2154f1cb9160c7a13493622cdd3c7325", "score": "0.70558023", "text": "public function getAttributes(): array;", "title": "" }, { "docid": "0a9ce85569897113e94cd93fc37ae62d", "score": "0.7050394", "text": "public function getAttributes()\n\t{\n\t\treturn $this->attributes;\n\t}", "title": "" }, { "docid": "0a9ce85569897113e94cd93fc37ae62d", "score": "0.7050394", "text": "public function getAttributes()\n\t{\n\t\treturn $this->attributes;\n\t}", "title": "" }, { "docid": "661bd56dade984bdaa48cbabc054c312", "score": "0.7033651", "text": "public function getAttributes()\n {\n return $this->item->getAttributes();\n }", "title": "" }, { "docid": "07aead26c2fece0741835c365b334885", "score": "0.70266145", "text": "public function getAttributes()\n {\n return $this->product_attributes->transform(function($attr) {\n return [\n 'attribute_value_id' => $attr->attribute_value_id,\n 'attribute_name' => $attr->attrvalue['name'],\n 'attribute_value' => $attr->value,\n ];\n });\n }", "title": "" }, { "docid": "7ce4855667e85bfe55a26a96a3e99082", "score": "0.70240724", "text": "public function attributes()\n {\n return [\n 'code' => 'código',\n 'coordinator_id' => 'coordinador',\n 'company_id' => 'empresa',\n 'teacher_id' => 'profesor',\n 'idioma_id' => 'idioma',\n 'max_class' => 'número maximo de alumnos',\n 'date_init' => 'fecha de inicio',\n 'type_student_id' => 'tipo de estudiantes',\n 'level_id' => 'nivel',\n 'class_type_id' => 'tipo de clases',\n 'material_id' => 'material',\n 'days' => 'días',\n 'coursestate_id' => 'estado del curso'\n ];\n }", "title": "" }, { "docid": "10d58177491faeeaad328580f28a50e6", "score": "0.701693", "text": "public function getAttributes(){\n\t\treturn $this->_attributes;\n\t}", "title": "" }, { "docid": "793db4b5ecbe59709e7470e09b8f66f1", "score": "0.7014229", "text": "public function getAll()\n {\n return $this->attrs;\n }", "title": "" }, { "docid": "e090fec60e8bb91c56cb35218dd3126f", "score": "0.7011438", "text": "public function attributes()\n\t{\n\t\treturn $this->_attributes;\n\t}", "title": "" }, { "docid": "6ce445b17bb3f14b8fb1ecbcae9aca4a", "score": "0.70074975", "text": "public function getAttributes()\n {\n if ($this->translation) {\n return $this->getTranslationAttributes();\n }\n\n return $this->getModelAttributes();\n }", "title": "" }, { "docid": "7e9090324652779b746b62fbdccd5e28", "score": "0.70032316", "text": "function attributes() {\n return $this->attributes;\n }", "title": "" }, { "docid": "123654b04ceeffd3f2d673f2c1944dda", "score": "0.6996092", "text": "public function getAttributes() { return $this->attributes; }", "title": "" }, { "docid": "4f0d59cb8902e0cafe01ce4aa86bdf5f", "score": "0.6987187", "text": "public function getAttributes()\n\t{\n\t\treturn $this->_attributes;\n\t}", "title": "" }, { "docid": "231c4dd4e94f21070a84e833f863d41e", "score": "0.6981756", "text": "protected function _getAttributesById()\n {\n $entityType = Mage::getModel('eav/entity_type')->loadByCode($this->_entityType);\n $attributes = Mage::getResourceModel($this->_attributeCollectionModel)\n ->setEntityTypeFilter($entityType->getEntityTypeId());\n\n $attributesById = array();\n\n foreach ($attributes as $attribute) {\n if ($this->_canIndexAttribute($attribute) && $attribute->getBackendType() != 'static') {\n $attributesById[$attribute->getAttributeId()] = $attribute;\n }\n }\n\n return $attributesById;\n }", "title": "" }, { "docid": "6d8ca79ebf2f0fb4092e0d2c977f281c", "score": "0.6981483", "text": "public function getAttributes(): array\n {\n return \\array_values(\\array_filter($this->getFields(), function ($field) {\n return $field instanceof AttributeField;\n }));\n }", "title": "" }, { "docid": "e633bbc7f020ff197c0ac6ea0ab61cc7", "score": "0.6977444", "text": "public function getAttributes()\n {\n if ($this->_attributes === null) {\n $this->_attributes = $this->_getResource()->loadAllAttributes($this)->getSortedAttributes();\n }\n return $this->_attributes;\n }", "title": "" }, { "docid": "4eb89f87e46bf376ef56e52172516694", "score": "0.6973105", "text": "public function attributes()\n {\n return parent::attributes();\n }", "title": "" }, { "docid": "abe0f088b63e9d8254507e767a3c9ef1", "score": "0.69719136", "text": "public function attributes()\n {\n return $this->fields->mapWithKeys(function($field, $idx) {\n return [\"fields.{$idx}.{$this->attributeByType($field)}\" => $field->description];\n })->toArray();\n \n }", "title": "" }, { "docid": "dd9775c244ab82e3b142b61fd6464e2d", "score": "0.69716823", "text": "function listAttributes() {\n $this->baseDisplayTask('ListAttributes', 'attributes');\n }", "title": "" }, { "docid": "b6f784e0bc3828c8e08c1c237ad539f4", "score": "0.6968922", "text": "public function getCustomAttributes()\n {\n static $attributes;\n\n if ($attributes) {\n return $attributes;\n }\n\n return $attributes = app(AttributeRepository::class)->where('entity_type', $this->getTable())->get();\n }", "title": "" }, { "docid": "03dfbe9be39f800c430d0041026d6e7d", "score": "0.69618165", "text": "function getAttributes()\n {\n return $this->_attributes;\n }", "title": "" }, { "docid": "5fa4e30af2dc832ea5ee3f0eb21e0517", "score": "0.6955226", "text": "public function getAttributes(){\n\t\tif (!$this->_preparedAttributes){\n\t\t\t$this->_prepareAttributes();\n\t\t}\n\t\treturn $this->_attribtues;\n\t}", "title": "" }, { "docid": "4aadc477e12de80aa7760df059976d66", "score": "0.6941501", "text": "public function attributes()\n {\n return [];\n }", "title": "" }, { "docid": "2628e86b226856f9453768445d6b5f89", "score": "0.69380605", "text": "public function getAttributesToGet()\n {\n return $this->get(self::REQUEST_ATTRIBUTES_TO_GET);\n }", "title": "" }, { "docid": "ac0060411606e633dc1c601dedb7bcde", "score": "0.6900589", "text": "public function attribute_values()\n {\n return $this->morphMany(AttributeValueProxy::modelClass(), 'entity');\n }", "title": "" }, { "docid": "85e589151cecc9eb3485d298dbf0d378", "score": "0.6899255", "text": "public function getAttributes()\n {\n $attributes = (array) $this->serializer->getAttributes($this->data, $this->getOwnFields());\n\n $attributes = $this->filterFields($attributes);\n\n $attributes = $this->mergeAttributes($attributes);\n\n return $attributes;\n }", "title": "" }, { "docid": "6aadb194886c1798e5eeeeb3e8d29c26", "score": "0.68989635", "text": "public function getAttributes() {\n $attributes = [];\n\n foreach($this->attributeNames() as $name) {\n $attributes[$name] = $this->$name;\n }\n\n return $attributes;\n }", "title": "" }, { "docid": "bf996f947f5dcea0c74693f0c58758a8", "score": "0.6889403", "text": "public function getAttributesAttribute()\n\t{\n\t\treturn $this->attributes();\n\t}", "title": "" }, { "docid": "7d78551ebb56469f9bfdaad23557cdde", "score": "0.6856764", "text": "public function attributes()\n {\n return [\n ];\n }", "title": "" }, { "docid": "7d78551ebb56469f9bfdaad23557cdde", "score": "0.6856764", "text": "public function attributes()\n {\n return [\n ];\n }", "title": "" }, { "docid": "1f8b948a4fd8a1d3a34ec0b1eb85d12a", "score": "0.6844633", "text": "public function attributes()\n {\n return [\n 'nomeCompleto' => \"Nome Completo\",\n 'cpf' => \"CPF\",\n 'sexo' => \"Sexo\",\n 'dataNascimento' => \"Data de Nascimento\",\n 'logradouro' => \"Logradouro\",\n 'numero' => \"Número\",\n 'bairro' => \"Bairro\",\n 'cep' => \"CEP\",\n 'estado' => \"Estado\",\n 'cidade' => \"Cidade\",\n 'email' => \"E-mail\",\n ];\n }", "title": "" }, { "docid": "7a022be1cc80a54303665eda323d3d57", "score": "0.6842204", "text": "public function all(): array\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "20087d2bf6a377cd9bc0cffffb891c74", "score": "0.68410224", "text": "function getAttributes();", "title": "" }, { "docid": "20087d2bf6a377cd9bc0cffffb891c74", "score": "0.68410224", "text": "function getAttributes();", "title": "" } ]
314d33e77ea4a2243f53829b9626cb5d
Get all submissions from a form.
[ { "docid": "0fa424aa772b5b37976519279aa1c897", "score": "0.624384", "text": "public function getSubmissions($form_guid, array $params = [])\n {\n $endpoint = \"https://api.hubapi.com/form-integrations/v1/submissions/forms/{$form_guid}\";\n\n $queryString = build_query_string($params);\n\n return $this->client->request('get', $endpoint, [], $queryString);\n }", "title": "" } ]
[ { "docid": "6daeb26c08fae6d25b4530ffe5cad6ea", "score": "0.6774427", "text": "public function getFormEntriesStream()\n {\n return $this->dispatch(new GetFormEntriesStream($this));\n }", "title": "" }, { "docid": "edc70189ae652935fce79002b8a02a97", "score": "0.6719032", "text": "public function forms()\n {\n if (!$forms = $this->dispatch(new GetMultiformFromValue($this))) {\n return [];\n }\n\n return array_map(\n function (FormBuilder $form) {\n return $form\n ->make()\n ->getForm();\n },\n $forms->getForms()->all()\n );\n }", "title": "" }, { "docid": "9e13c22e6554cac6b1b7cf26eada9289", "score": "0.6599917", "text": "public function all()\n {\n $endpoint = 'https://api.hubapi.com/forms/v2/forms';\n\n return $this->client->request('get', $endpoint);\n }", "title": "" }, { "docid": "f32fb7026e470ef1c103e70337fe396e", "score": "0.6436802", "text": "public function getFormEntries() {\r\n return $this->dbConn->queryAssoc(\"SELECT `id` FROM `form_entries` WHERE `form_id` = \".intval($this->id).\" ORDER BY `updated_at` DESC\");\r\n }", "title": "" }, { "docid": "3325fcf3a01222360b5a522685c51a3b", "score": "0.64284366", "text": "public function getMySubmissions() {\n\t\tif (null==$this->_db)$this->_db = & bfCompat::getDBO ();\n\t\t$user = bfUser::getInstance ();\n\t\t\n\t\t$tables = $this->getAllSubmissionsTables ();\n\t\t$mine = array ();\n\t\tforeach ( $tables as $table ) {\n\t\t\t$this->_db->setQuery ( \"select * from \" . $table . \" where bf_user_id = '\" . ( int ) $user->get ( 'id' ) . \"'\" );\n\t\t\t$minefromthistable = $this->_db->loadObjectList ();\n\t\t\tforeach ( $minefromthistable as $row ) {\n\t\t\t\t$row->bf_form_id = str_replace ( 'jos_form_submitteddata_form', '', $table );\n\t\t\t\t$mine [] = $row;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$mineRet = array ();\n\t\t$formnames = array ();\n\t\tforeach ( $mine as $row ) {\n\t\t\tif (! array_key_exists ( $row->bf_form_id, $formnames )) {\n\t\t\t\t$this->_db->setQuery ( \"select form_name from #__form_forms where id = '\" . $row->bf_form_id . \"'\" );\n\t\t\t\t$formnames [$row->bf_form_id] = $this->_db->loadResult ();\n\t\t\t}\n\t\t\t$row->bf_form_name = $formnames [$row->bf_form_id];\n\t\t}\n\t\t\n\t\treturn $mine;\n\t}", "title": "" }, { "docid": "45742a239912601327a654c0179abd74", "score": "0.6291804", "text": "static public function get_all_form_pages() {\n global $wpdb;\n\n $form_pages = array();\n\n if( $cache = wp_cache_get( 'wpp::feps::all_form_pages' )) {\n return $cache;\n }\n\n $results = $wpdb->get_results( \"\n SELECT ID, post_title, post_content\n FROM $wpdb->posts\n WHERE post_type = 'page'\n AND post_content LIKE '%wpp_feps_form%';\n \", ARRAY_A );\n\n if( !empty( $results ) && !is_wp_error( $results ) ) {\n foreach( $results as $result ) {\n preg_match( '/(\\[)(\\s*wpp_feps_form.*)(\\])/', $result[ 'post_content' ], $matches );\n if( $matches ) {\n array_push( $form_pages, array(\n 'ID' => $result[ 'ID' ],\n 'post_title' => $result[ 'post_title' ],\n ) );\n }\n }\n }\n\n wp_cache_add( 'wpp::feps::all_form_pages', $form_pages );\n\n return $form_pages;\n }", "title": "" }, { "docid": "d1a6b65d47f4930e4475fc05a9b4ab44", "score": "0.6283515", "text": "public function submissions(): HasMany\n {\n return $this->hasMany(FormSubmission::class)->orderBy('order');\n }", "title": "" }, { "docid": "71b3006a14a9a64d985ffffd2d16f692", "score": "0.62455964", "text": "public function getForms();", "title": "" }, { "docid": "1e0c88ecf47a9b3d734a7610ec0c5ff3", "score": "0.6118244", "text": "public function index()\n {\n return \\App\\Http\\Resources\\Submission::collection(Submission::all());\n }", "title": "" }, { "docid": "7298c3d3a7d85dbf7c6708d207bd3c29", "score": "0.60620546", "text": "public static function getAllRequestForAssistanceForm() // Get All Request For Assistance Form\n\t\t{\n\t\t\ttry {\n\t\t\t\t$data = DB::table('req_ast_form')->get();\n\t\t\t\t$list = DB::table('req_ast')->get();\n\t\t\t\t$reqs = array();\n\t\t\t\t$IDs = array();\n\n\t\t\t\t// gets reqs list\t\n\t\t\t\tforeach ($list as $key => $value) {\n\t\t\t\t\t$reqs[] = $value;\n\t\t\t\t}\n\n\t\t\t\t// translate\n\t\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t\t// gets reqs IDs\n\t\t\t\t\t$temp = array();\n\t\t\t\t\t$temp = explode(', ', $value->reqs); // explodes to array\n\t\t\t\t\tfor($i=0; $i<count($temp); $i++) { // transform codes into actual desc\n\t\t\t\t\t\tif(is_numeric($temp[$i])) {\n\t\t\t\t\t\t\tfor ($j=0; $j<count($reqs) ; $j++) { \n\t\t\t\t\t\t\t\tif($temp[$i] == $reqs[$j]->rq_id){\n\t\t\t\t\t\t\t\t\t$temp[$i] = $reqs[$j]->rq_desc;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$temp[$i] = \"Others: \".$temp[$i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$data[$key]->reqs = $temp;\n\t\t\t\t\t// $data[$key]->reqs = implode(\", \", $temp);\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t\t} catch (Exception $e) {\n\t\t\t\tAjaxController::SystemLogs($e->getMessage());\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "91fba96e284785e585c838fb5b0aa090", "score": "0.6057301", "text": "public function getSubmittedValues() {\n\t\t$request = $this->formOptions['method'] == 'POST' ? $_POST : $_GET;\n\n\t\tif ( ! empty( $this->formOptions['form_prefix'] ) && isset( $request[ $this->formOptions['form_prefix'] ] ) ) {\n\t\t\treturn $request[ $this->formOptions['form_prefix'] ];\n\t\t}\n\n\t\treturn [];\n\t}", "title": "" }, { "docid": "38c703719d401e5e6901f7bb25e44e1b", "score": "0.6053267", "text": "public function getAll($contextId) {\n\t\timport('lib.pkp.classes.submission.Submission');\n\t\treturn Services::get('submission')->getMany([\n\t\t\t'contextId' => $contextId,\n\t\t\t'status' => STATUS_PUBLISHED,\n\t\t]);\n\t}", "title": "" }, { "docid": "3731f8cf2f43e5e0d971133bc40a2a8d", "score": "0.6019408", "text": "public function getAllForms()\n\t{\n\t\t$attributes\t= array('order' => 'name');\n\n\t\treturn $this->getCriteria($attributes)->find();\n\t}", "title": "" }, { "docid": "81a70bb10fac3b361a68c246b270df6f", "score": "0.59716624", "text": "public function getBookmarkedSubmissions()\n {\n return SubmissionResource::collection(\n Auth::user()->bookmarkedSubmissions()->simplePaginate(20)\n );\n }", "title": "" }, { "docid": "bf860625c7837067607d8e258bc5eb0b", "score": "0.5953039", "text": "public function getAllForms()\n {\n $records = $this->formRecord->findAll(array('order'=>'name'));\n return SproutForms_FormModel::populateModels($records);\n }", "title": "" }, { "docid": "dacfe3a9052ccd7dd3f9459434c95b7e", "score": "0.59479094", "text": "public function get_form()\n\t{\n\t\t$sql = \"SELECT *\n\t\t\t\tFROM FORM;\";\n\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "2b6a2e5dd63c3ddee53a859b92dc011f", "score": "0.5946698", "text": "public function getUnsubmittedEloquaforms();", "title": "" }, { "docid": "17b561f21e5a0dde41c92da263115a13", "score": "0.5909341", "text": "public function getSubmittedValues() {\n $values = array();\n \n foreach ($_POST as $key => $field) {\n if ($key == 'submit') {\n continue;\n }\n $values[$key] = $field;\n }\n \n return $values;\n }", "title": "" }, { "docid": "5d6c09a642f95e6c97cae3277f4ebf87", "score": "0.5903183", "text": "protected function getArrayCollection(): array\n {\n return $this->getSubmissions();\n }", "title": "" }, { "docid": "3acd87c9d3084cb7cb13f3f8a75e1668", "score": "0.5861866", "text": "public function getForms()\n {\n return $this->forms;\n }", "title": "" }, { "docid": "db371fbab0f1436bb414cbfccd5ef134", "score": "0.5861743", "text": "public function getForm();", "title": "" }, { "docid": "db371fbab0f1436bb414cbfccd5ef134", "score": "0.5861743", "text": "public function getForm();", "title": "" }, { "docid": "00dfbd5a7b09b758ecf6146ae283e1fa", "score": "0.5860215", "text": "function submit() {\n return $this->getValues(); \n }", "title": "" }, { "docid": "caa1ead52357c2b4e5f86e5cd1972c4b", "score": "0.583245", "text": "public function get_all_forms($package_guid = null)\n {\n $retval = array();\n\n $storage = new midgard_query_storage('com_meego_package_forms_posted');\n\n $q = new midgard_query_select($storage);\n\n $q->set_constraint(new midgard_query_constraint(\n new midgard_query_property('packageguid'),\n '=',\n new midgard_query_value($package_guid)\n ));\n\n // using set_limit and set_offset would work here, but let's try our universal pager\n //$q->set_limit($limit);\n //$q->set_offset($page * $limit);\n\n $q->execute();\n\n $forms = $q->list_objects();\n\n foreach ($forms as $form)\n {\n // don't return duplicates\n $retval[$form->forminstanceguid] = $form;\n }\n\n return $retval;\n }", "title": "" }, { "docid": "1615fd1e08c877ff051ae45e39d93c83", "score": "0.5814943", "text": "public function index($form_id)\n {\n $user = auth()->user();\n $form_id = Crypt::decrypt($form_id);\n $form = Form::where(['user_id' => $user->id, 'id' => $form_id])\n ->with(['user'])\n ->firstOrFail();\n\n $submissions = $form->submissions()\n ->with('user')\n ->latest()\n ->paginate(100);\n\n // get the header for the entries in the form\n $form_headers = $form->getEntriesHeader();\n\n $pageTitle = \"Submitted Entries for '{$form->name}'\";\n\n // return view(\n // 'formbuilder::submissions.index',\n // compact('form', 'submissions', 'pageTitle', 'form_headers')\n // );\n return view(\n 'Submissions.index',\n compact('form', 'submissions', 'pageTitle', 'form_headers')\n );\n }", "title": "" }, { "docid": "b4738331b20f8e8d3af72e00ecd1e62a", "score": "0.57977384", "text": "public function getSubmissionData();", "title": "" }, { "docid": "d3e6c159c362563bd6316cbe9f15653a", "score": "0.5790547", "text": "public function submission($key = null)\n {\n\n if (is_null($key)) {\n return request()->all();\n }\n\n return request()->get($key);\n }", "title": "" }, { "docid": "d3e6c159c362563bd6316cbe9f15653a", "score": "0.5790547", "text": "public function submission($key = null)\n {\n\n if (is_null($key)) {\n return request()->all();\n }\n\n return request()->get($key);\n }", "title": "" }, { "docid": "e0f2b4ae23b190f860a7e06aeb4c7483", "score": "0.56606984", "text": "function get_form_submission() {\n\t$input_filters = array_merge(\n\t\t// Inputs that correspond to meta values.\n\t\twp_list_pluck( PledgeMeta\\get_pledge_meta_config( 'user_input' ), 'php_filter' ),\n\t\t// Inputs with no corresponding meta value.\n\t\tarray(\n\t\t\t'pledge-contributors' => FILTER_UNSAFE_RAW,\n\t\t\t'pledge-agreement' => FILTER_VALIDATE_BOOLEAN,\n\t\t)\n\t);\n\n\t$result = filter_input_array( INPUT_POST, $input_filters );\n\tif ( ! $result ) {\n\t\t$result = array_fill_keys( array_keys( $input_filters ), '' );\n\t\t$result['empty_post'] = true;\n\t}\n\n\treturn $result;\n}", "title": "" }, { "docid": "da214f099f1f42aff6c47012efddd0b0", "score": "0.5654181", "text": "function ReadSubmissions()\n {\n $where=\n array\n (\n \"Unit\" => $this->Unit(\"ID\"),\n \"Event\" => $this->Event(\"ID\"),\n );\n\n $submissions=$this->SubmissionsObj()->Sql_Select_Hashes_ByID($where,$this->SubmissionsData(),\"ID\",\"Name,Title\");\n \n $this->Submissions=array();\n foreach (array_keys($submissions) as $sid)\n {\n $this->SubmissionsObj()->ReadSubmission($submissions[ $sid ]);\n \n $submissions[ $sid ][ \"Authors\" ]=join(\", \",$submissions[ $sid ][ \"Authors\" ]);\n \n $this->Submissions[ $sid ]=$submissions[ $sid ];\n }\n }", "title": "" }, { "docid": "b84dd9a2aff15e9e13210f3456115b54", "score": "0.5621114", "text": "public function index_action()\n {\n // capture the form action selected\n $submitteddata = $this->request->getRaw($this->name) ?: array();\n $error = $callback = false;\n foreach ($this->fields as $field) {\n $submittedvalue = array_key_exists($field->getName(), $submitteddata) ? $submitteddata[$field->getName()] : null;\n if ($field instanceof SubmitFormField && isset($submittedvalue)) {\n $callback = $field->getCallback();\n }\n }\n\n // if this is a submission validate and set data on fields\n if ($callback) {\n foreach ($this->fields as $field) {\n $submittedvalue = array_key_exists($field->getName(), $submitteddata) ? $submitteddata[$field->getName()] : null;\n $error = $field->validate($submittedvalue) ? $error : true;\n $field->setValue($submittedvalue);\n }\n if ($error) {\n $this->setMessage('An error occurred', 'error');\n } else {\n return call_user_func($callback, $this);\n }\n }\n\n return array();\n }", "title": "" }, { "docid": "424a4102782a3b562c23635ac5dbd7b0", "score": "0.5600802", "text": "public function get_forms() {\n\t\t$forms = array( 0 => __( 'Please select a form', 'wp-job-manager-contact-listing' ) );\n\n\t\t$_forms = ninja_forms_get_all_forms();\n\n\t\tif ( ! empty( $_forms ) ) {\n\n\t\t\tforeach ( $_forms as $_form ) {\n\t\t\t\t$forms[ $_form['id'] ] = $_form['data']['form_title'];\n\t\t\t}\n\t\t}\n\n\t\treturn $forms;\n\t}", "title": "" }, { "docid": "2e73d4565046d4eab56d9475067d415d", "score": "0.5593687", "text": "public function all()\n {\n return $this->getRequestInputByType()->all();\n }", "title": "" }, { "docid": "02c9c1c1f506baf0b99f4bd9be5bee2c", "score": "0.557074", "text": "function Submissions($sid=0,$key=\"\")\n {\n $this->ReadSubmissions();\n \n if (!empty($sid))\n {\n if (!empty($key))\n {\n return $this->Submissions[ $sid ][ $key ];\n }\n \n return $this->Submissions[ $sid ];\n }\n \n return $this->Submissions;\n }", "title": "" }, { "docid": "8326384dbe23b5cb14fa901eaa7ac843", "score": "0.55632836", "text": "protected function submitted_form_files() {\n\t\t$files = array();\n\n\t\t// Checks the form method\n\t\tif ( 0 < count( $_FILES ) ) {\n\t\t\t$files = $_FILES;\n\t\t}\n\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "c7ce8dc764508c2cebbbb99a8b916d31", "score": "0.5554369", "text": "public static function all(){\n\t\tif(sizeof($_POST)<=0) die('Post no definido');\n\t\treturn $_POST;\n\t}", "title": "" }, { "docid": "15089835cbc390ea195c179d1070d5ca", "score": "0.55467355", "text": "public function index()\n {\n return FormResource::collection(Form::all()->sortBy('id'));\n }", "title": "" }, { "docid": "2b807ca766834b949c205dd4f300174a", "score": "0.5532919", "text": "public function getForms()\n {\n $forms = [];\n $items = (new NF_Database_FormsController())->getFormsData();\n foreach ($items as $item) {\n $fields = Ninja_Forms()->form($item->id)->get_fields();\n $field_settings = [];\n foreach ($fields as $key => $field) {\n $field_settings[$key] = $field->get_settings();\n }\n $forms[] = [\n 'ID' => $item->id,\n 'name' => $item->title,\n 'fields' => $field_settings,\n ];\n }\n return $forms;\n }", "title": "" }, { "docid": "fbe5a507072ef3207f0f89c86c425dd2", "score": "0.5531651", "text": "public function listAction()\n {\n $reader = $this->get('app_main.submission.reader');\n\n $submissions = $reader->findAllNotValidated();\n\n return $this->render('AppMainBundle:Submission:list.html.twig', [\n 'submissions' => $submissions,\n ]);\n }", "title": "" }, { "docid": "78d785226dec6dbf3b6dcb30fbaf7a52", "score": "0.55207676", "text": "public function admin_SubmissionsList()\n {\n //AsmissionFormFields\n $submissions = ApplicationSubmissions::all();\n \n return response()->json([\n 'success' => true,\n 'message' => 'gotten',\n 'data' => $submissions\n ], 200);\n \n }", "title": "" }, { "docid": "d22dd0e05a588bda0f3ba6858bf3500a", "score": "0.55197847", "text": "public static function getForms(){\n\t\tif(!empty(self::$forms)){\n\t\t\treturn self::$forms;\n\t\t}else{\n\t\t\t// Otherwise throw error.\n\t\t\techo 'You do not have any forms on this page.';\n\t\t}\n\t}", "title": "" }, { "docid": "2ac2492fa47f4934b3db490f4f5a7d74", "score": "0.5486179", "text": "protected function form_elements() {\n return array();\n }", "title": "" }, { "docid": "d3c89505acbdf4763928177aaf099209", "score": "0.545136", "text": "public function getGridFormValues()\n {\n global $CurrentForm;\n // Get row count\n $CurrentForm->Index = -1;\n $rowcnt = strval($CurrentForm->getValue($this->FormKeyCountName));\n if ($rowcnt == \"\" || !is_numeric($rowcnt)) {\n $rowcnt = 0;\n }\n $rows = [];\n\n // Loop through all records\n for ($rowindex = 1; $rowindex <= $rowcnt; $rowindex++) {\n // Load current row values\n $CurrentForm->Index = $rowindex;\n $rowaction = strval($CurrentForm->getValue($this->FormActionName));\n if ($rowaction != \"delete\" && $rowaction != \"insertdelete\") {\n $this->loadFormValues(); // Get form values\n if ($rowaction == \"insert\" && $this->emptyRow()) {\n // Ignore\n } else {\n $rows[] = $this->getFieldValues(\"FormValue\"); // Return row as array\n }\n }\n }\n return $rows; // Return as array of array\n }", "title": "" }, { "docid": "3360e0cd57f30d55e5237499fe749329", "score": "0.5446958", "text": "public function getGridFormValues()\n\t{\n\t\tglobal $CurrentForm;\n\n\t\t// Get row count\n\t\t$CurrentForm->Index = -1;\n\t\t$rowcnt = strval($CurrentForm->getValue($this->FormKeyCountName));\n\t\tif ($rowcnt == \"\" || !is_numeric($rowcnt))\n\t\t\t$rowcnt = 0;\n\t\t$rows = [];\n\n\t\t// Loop through all records\n\t\tfor ($rowindex = 1; $rowindex <= $rowcnt; $rowindex++) {\n\n\t\t\t// Load current row values\n\t\t\t$CurrentForm->Index = $rowindex;\n\t\t\t$rowaction = strval($CurrentForm->getValue($this->FormActionName));\n\t\t\tif ($rowaction != \"delete\" && $rowaction != \"insertdelete\") {\n\t\t\t\t$this->loadFormValues(); // Get form values\n\t\t\t\tif ($rowaction == \"insert\" && $this->emptyRow()) {\n\n\t\t\t\t\t// Ignore\n\t\t\t\t} else {\n\t\t\t\t\t$rows[] = $this->getFieldValues(\"FormValue\"); // Return row as array\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $rows; // Return as array of array\n\t}", "title": "" }, { "docid": "3360e0cd57f30d55e5237499fe749329", "score": "0.5446958", "text": "public function getGridFormValues()\n\t{\n\t\tglobal $CurrentForm;\n\n\t\t// Get row count\n\t\t$CurrentForm->Index = -1;\n\t\t$rowcnt = strval($CurrentForm->getValue($this->FormKeyCountName));\n\t\tif ($rowcnt == \"\" || !is_numeric($rowcnt))\n\t\t\t$rowcnt = 0;\n\t\t$rows = [];\n\n\t\t// Loop through all records\n\t\tfor ($rowindex = 1; $rowindex <= $rowcnt; $rowindex++) {\n\n\t\t\t// Load current row values\n\t\t\t$CurrentForm->Index = $rowindex;\n\t\t\t$rowaction = strval($CurrentForm->getValue($this->FormActionName));\n\t\t\tif ($rowaction != \"delete\" && $rowaction != \"insertdelete\") {\n\t\t\t\t$this->loadFormValues(); // Get form values\n\t\t\t\tif ($rowaction == \"insert\" && $this->emptyRow()) {\n\n\t\t\t\t\t// Ignore\n\t\t\t\t} else {\n\t\t\t\t\t$rows[] = $this->getFieldValues(\"FormValue\"); // Return row as array\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $rows; // Return as array of array\n\t}", "title": "" }, { "docid": "d520a018e32b1dcd5eeb7278f5132197", "score": "0.54438806", "text": "private function availableUserForms()\n {\n return UserDefinedForm::get()->map()->toArray();\n }", "title": "" }, { "docid": "d4eb005454f3f3806ab795509098e4c2", "score": "0.5423779", "text": "public function getEntries($formId)\n {\n return SproutForms_ContentRecord::model()->with('form')->findAll(array(\n 'order' => 't.dateCreated desc',\n 'condition' => 'formId=' . $formId\n ));\n }", "title": "" }, { "docid": "dd380577e9315fa7e7676e8720561f56", "score": "0.5422734", "text": "function bpoc_contest_get_submissions($nid) {\n $node = node_load($nid);\n $contest_type = $node->field_contest_type[0]['value'];\n if ($contest_type == 'Photo') {\n $result = db_query(\"SELECT n.nid FROM {node} n LEFT JOIN {content_field_contest_ref} s ON n.nid = s.nid WHERE s.field_contest_ref_nid = %d\", $nid);\n }\n else if ($contest_type == 'Video') {\n $result = db_query(\"SELECT n.nid FROM {node} n LEFT JOIN {content_field_contest_ref} s ON n.nid = s.nid WHERE s.field_contest_ref_nid = %d\", $nid);\n }\n $submissions = array();\n while ($record = db_fetch_object($result)) {\n $submissions[] = $record->nid;\n }\n return $submissions;\n}", "title": "" }, { "docid": "040e8f516d646a45cb00d963f35f9561", "score": "0.5412184", "text": "public function query() {\r\n\r\n\t\t$orderby\t= isset( $_GET['orderby'] ) ? $_GET['orderby'] : 'date';\r\n\t\t$order\t\t= isset( $_GET['order'] ) ? $_GET['order'] : 'DESC';\r\n\t\t$endDay\t\t= date(\"t\", strtotime(sprintf(\"%1u-%02u-01\", $this->get_to_year(), $this->get_to_month())));\r\n\r\n\t\t$args = array(\r\n\t\t\t'post_type' \t\t=> 'ecsl_submission',\r\n\t\t\t'posts_per_page' \t=> -1,\r\n\t\t\t'fields'\t\t\t=> 'ids',\r\n\t\t\t'post_status'\t\t=> array('publish',STATE_UNKNOWN,STATE_NOT_SUBMITTED,STATE_ACKNOWLEDGED,STATE_FAILED,STATE_SUBMITTED ),\r\n\t\t\t'orderby'\t\t\t=> array( \"$orderby\" => \"$order\" ),\r\n\t\t\t'date_query' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'after' => array(\r\n\t\t\t\t\t\t'year' => $this->get_from_year(),\r\n\t\t\t\t\t\t'month' => $this->get_from_month(),\r\n\t\t\t\t\t\t'day' => 1,\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'before' => array(\r\n\t\t\t\t\t\t'year' => $this->get_to_year(),\r\n\t\t\t\t\t\t'month' => $this->get_to_month(),\r\n\t\t\t\t\t\t'day' => $endDay,\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'inclusive' => true,\r\n\t\t\t\t),\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t$submissions = new \\WP_Query( $args );\r\n\r\n\t\t$this->submissions = $submissions->posts;\r\n\t}", "title": "" }, { "docid": "eba0e9a90c711eec107a5bfe783e3ccf", "score": "0.5400784", "text": "function get_all_campaign_forms()\n {\n return $this->db->get('aq2emp_campaign_forms')->result_array();\n }", "title": "" }, { "docid": "6d4ae6f2a28974d8eda95f32e546b899", "score": "0.53909224", "text": "public function recent()\n {\n $submissions = Submission::with(['question' => function (BelongsTo $query) {\n $query->getBaseQuery()->select(['id', 'uuid', 'title']);\n }])\n ->where('user_id', request_user(true))\n ->orderBy('submitted_at', 'desc')\n ->paginate(5);\n\n return $submissions;\n }", "title": "" }, { "docid": "cd15ff2661e63320beebe0770bc8489b", "score": "0.53797364", "text": "function get_entries() {\n\t\t$entries = $this->ci->forms->get_entries();\n\t\t\n\t\tif(!is_null($entries)) {\n\t\t\tforeach ($entries->result() as $row)\n\t {\n\t $data[] = array(\n\t \t\t\t\t\t'entry_id' => $row->entry_id,\n\t 'forms_id' => $row->forms_id,\n\t 'autor_id' => $row->autor_id,\n\t 'titulo' => $row->titulo,\n\t 'entry_date' => $row->entry_date,\n\t 'form' => $this->get_form_by_id($row->forms_id)->forms_nombre,\n\t 'autor' => $this->ci->auth_frr->get_username_by_id($row->autor_id)\n\t );\n\t }\n\t\t\t\n\t\t\treturn $data;\n\t\t} else {\n\t\t\treturn NULL;\n\t\t}\n\t}", "title": "" }, { "docid": "b6f8fe5d9250fea8e0df83852326c054", "score": "0.5372335", "text": "public function submissions()\n {\n return $this->belongsToMany('App\\Submission')->withTimestamps();\n }", "title": "" }, { "docid": "7752f8f9294d21b10c31f093f365e1d3", "score": "0.53619367", "text": "public function forms_for_feed_setting() {\n\t\t\n\t\t$forms = array(\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Choose a Double Opt-In Form', 'gravityformscleverreach' ),\n\t\t\t\t'value' => ''\n\t\t\t)\n\t\t);\n\n\t\t/* If CleverReach API credentials are invalid, return the forms array. */\n\t\tif ( ! $this->initialize_api() ) {\n\t\t\treturn $forms;\n\t\t}\n\t\t\t\n\t\t/* Get list ID. */\n\t\t$current_feed = $this->get_current_feed();\n\t\t$group_id = rgpost( '_gaddon_setting_group' ) ? rgpost( '_gaddon_setting_group' ) : $current_feed['meta']['group'] ;\n\t\t\n\t\t/* Get available CleverReach forms. */\n\t\t$cr_forms = $this->api->formsGetList( $this->api_key, $group_id );\n\t\t\n\t\t/* Add CleverReach forms to array and return it. */\n\t\tif ( ! empty( $cr_forms->data ) ) {\n\t\t\t\n\t\t\tforeach ( $cr_forms->data as $form ) {\n\t\t\t\t\n\t\t\t\t$forms[] = array(\n\t\t\t\t\t'label' => $form->name,\n\t\t\t\t\t'value' => $form->id\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\treturn $forms;\n\n\t\t\n\t}", "title": "" }, { "docid": "5d3b03a73d2e6a38817487a62f38d93d", "score": "0.52891445", "text": "function iwacontact_recent_submissions() {\n\n\tglobal $ajaxcontact, $post;\n\n\t$submissions = get_posts( array(\n\t\t'post_type' => 'iwacontactsubmission',\n\t\t'post_status' => 'publish',\n\t\t'meta_key' => '_form_id',\n\t\t'meta_value' => $post->ID,\n\t\t'limit' => 5\n\t) );\n\n\tif ( count( $submissions ) < 1 ) {\n\t\techo '<p class=\"no-results\">'\n\t\t\t. '<em>' . __( 'No submissions have been made using this form yet.', 'iwacontact' ) . '</em>'\n\t\t\t. '</p>';\n\t\treturn;\n\t}\n\n\techo '<ul class=\"recent-submissions\">';\n\n\tforeach ( $submissions as $submission ) {\n\t\t$ts = strtotime( $submission->post_date );\n\t\t$date = sprintf( __( '%1$s at %2$s', 'iwacontact' ), date( get_option( 'date_format' ), $ts ), date( get_option( 'time_format' ), $ts ) );\n\t\techo '<li class=\"submission\">'\n\t\t\t. '<a href=\"' . get_edit_post_link( $submission->ID ) . '\">'\n\t\t\t. get_the_title( $submission->ID )\n\t\t\t. '</a>'\n\t\t\t. '<span class=\"date\">' . $date . '</span>'\n\t\t\t. '</li>';\n\t}\n\n\techo '</ul>';\n\n}", "title": "" }, { "docid": "4d6b61fb474cb997ffe79365b53748cd", "score": "0.52872247", "text": "public function getPost()\n {\n foreach ($_POST as $key => $value) {\n $this->allPost[$key] = $value; \n }\n return $this->allPost;\n }", "title": "" }, { "docid": "a458a7d8e64d122c895554f90e30e92c", "score": "0.5273484", "text": "public function formsForTarget()\n {\n \t$location = \\Target\\Office::$location;\n \t$entries = Data::table('form_builder_entries');\n \t$check = $entries->get(\"area_officeid like '%$location%' and published = 1\");\n\n \t$forms = [];\n\n \tif ($check->num_rows > 0)\n \t{\t\n \t\twhile ($c = Data::fetch($check))\n \t\t{\n \t\t\t$offices = array_flip(explode(\",\", $c->area_officeid));\n\n \t\t\tif (isset($offices[$location]))\n {\n $forms[] = $c;\n }\n \t\t}\n \t}\n\n \treturn $forms;\n }", "title": "" }, { "docid": "1789b300aba98ef0f20e5c37c05474d6", "score": "0.5254601", "text": "function list_forms(){\t\n\t\treturn $this->available_forms;\n\t}", "title": "" }, { "docid": "fd423f76775968a2ea1333ffb8fe8059", "score": "0.524085", "text": "function bum_get_registered_forms()\n\t{\n\t\treturn bum_register_form();\n\t}", "title": "" }, { "docid": "7cdbc67a4e38a3edb87cf5595993ec55", "score": "0.52399004", "text": "public function findAllFormsAction(Request $request, $siteName)\n {\n return WFormPostAction::jsonFindAllFormsAction(\n $request, WFormConfigManager::MODULE_ID);\n }", "title": "" }, { "docid": "aa7431d43250fc8dea53c12459e073f9", "score": "0.52358043", "text": "public function get_posted_forms($package_guid = null, $page = 1)\n {\n $cnt = 0;\n $retval = array();\n\n $retval['forms'] = null;\n $retval['previous_page'] = 1;\n $retval['next_page'] = 1;\n\n // @todo: maybe do a GUID check here?\n if (! $package_guid)\n {\n return $retval;\n }\n\n $posts = self::get_all_forms($package_guid);\n\n if ( is_array($posts)\n && count($posts))\n {\n $total = count($posts);\n $limit = $this->mvc->configuration->rows_per_page * $this->mvc->configuration->items_per_row;\n $paged_posts = com_meego_packages_pager::page($limit, $page, $posts);\n\n $retval['total'] = $total;\n $retval['items_shown'] = $paged_posts['items_shown'];\n $retval['previous_page'] = $paged_posts['previous_page'];\n $retval['next_page'] = $paged_posts['next_page'];\n\n foreach ($paged_posts['content'] as $post)\n {\n (++$cnt % 2 == 0) ? $post->rawclass = 'even' : $post->rawclass = 'odd';\n\n $post->localurl = $this->mvc->dispatcher->generate_url\n (\n 'package_posted_form_instance',\n array\n (\n 'forminstance' => $post->forminstanceguid,\n ),\n $this->request\n );\n\n $post->submitter = \"n/a\";\n // get the login name for the submitter\n $user = com_meego_packages_utils::get_user_by_person_guid($post->submitterguid);\n\n if ($user)\n {\n $post->submitter = $user->login;\n }\n\n if (! isset($retval['forms'][$post->formtitle]['title']))\n {\n $retval['forms'][$post->formtitle]['title'] = $post->formtitle;\n }\n $retval['forms'][$post->formtitle]['posts'][$post->forminstanceguid] = $post;\n }\n }\n return $retval;\n }", "title": "" }, { "docid": "cd7f136eee1cefce3b557dc935740766", "score": "0.52327883", "text": "public function findAllAction(Request $request, $siteName, $formName)\n {\n $wfc = WFCoreService::getInstance()\n ->getFormConfigMgr()->findOneByName($formName);\n $response = WFormPostAction::jsonCheckRequest($request, $wfc);\n if (is_null($response)) {\n return WFormPostAction::jsonFindAllAction($request, $wfc);\n } else {\n return $response;\n }\n }", "title": "" }, { "docid": "4b100b7c7ffb3e734d6d8d0444e0fa9f", "score": "0.5219167", "text": "public static function getFormById(int $id): array\n\t{\n\t\t$forms = self::getFormsByFilter(['ID' => $id]);\n\n\t\treturn !empty($forms) ? array_shift($forms) : [];\n\t}", "title": "" }, { "docid": "917519b83822682e8146bd7a0a12a804", "score": "0.52059287", "text": "public function getMergedForms()\n {\n return $this->merged_forms;\n }", "title": "" }, { "docid": "4265c5f5f5c28b173b5552e4a83e8a6e", "score": "0.52021295", "text": "public static function getAllSubmissions($siteID){\n\t\t$elementsResult = Site::getQueryResult(\"SELECT * FROM tbl_surveys NATURAL JOIN tbl_orders WHERE siteID = \" . $siteID);\n\t\tif(is_null($elementsResult) || (is_numeric($elementsResult) && $elementsResult==-1)){\n\t\t\treturn $elementsResult;\n\t\t}\n\t\t$result = array();\n\t\twhile($tuple = mysqli_fetch_assoc($elementsResult)) {\n\t\t\t$result[] = array('orderArthropod' => strval($tuple['orderArthropod']),\n\t\t\t\t'orderCount' => intval($tuple['orderCount']),\n\t\t\t\t'plantSpecies' => strval($tuple['plantSpecies']));\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "893cc3fcbde940fa5c0a5172aeb324c1", "score": "0.5197476", "text": "public function knack_get_forms_ajax_calls(){\n\n\t\t# FRONT END AJAX ARRAY CALLS\n\t\t$array = array(\n\t\t\tarray('action' => 'knack_check_forms','method' => 'knack_check_forms'),\n\t\t);\n\n\t\t# RETURN\n\t\treturn $array;\n\n\t}", "title": "" }, { "docid": "8b88b50ba5b3fae8ee3dba324584b089", "score": "0.5185702", "text": "public function all()\n {\n return $this->request->json()->all();\n }", "title": "" }, { "docid": "53b7959a016b9b95b8ff3a387e9f21ee", "score": "0.5184593", "text": "public function index()\n {\n $forms = [];\n\n foreach( DB::table('forms')->orderBy('id', 'desc')->get() as $form ) {\n $forms[] = [\n 'id' => $form->id,\n 'form_name' => $form->form_name,\n 'form_data' => json_decode($form->form_data)\n ];\n }\n return $forms;\n // return view('forms.index', ['forms' => $forms]);\n }", "title": "" }, { "docid": "0e1b72a4d357a6afd9ad6c704d373a83", "score": "0.5170407", "text": "public function getForm ()\n {\n return $this->form;\n }", "title": "" }, { "docid": "0fab2789608e699db039f036b574a118", "score": "0.5167215", "text": "public function synchronizeForms(): void {\n $config = $this->configFactory->get(static::SETTINGS);\n $queue = $this->queueFactory->get($config->get('mautic.sync.queue'));\n if ($queue->numberOfItems() !== 0) {\n return;\n }\n\n $api = $this->apiFactory->get('forms');\n $forms = $api->makeRequest('forms', [\n 'published' => TRUE,\n 'limit' => '9999999',\n ])['forms'] ?? [];\n\n foreach ($forms as $form) {\n $queue->createItem($form);\n }\n }", "title": "" }, { "docid": "3b3b9e6f385b68869a66e24d44da0786", "score": "0.51567847", "text": "public function getFormValues() {\n\n $items = $this->getItems();\n $values = array();\n foreach ($items as $key => $item) {\n $values[$key] = $item->getValue();\n }\n return $values;\n }", "title": "" }, { "docid": "a92c0aef6bdeb9e282e067fa1bd7bd8e", "score": "0.5121212", "text": "public function getForm()\n {\n return $this->form;\n }", "title": "" }, { "docid": "a92c0aef6bdeb9e282e067fa1bd7bd8e", "score": "0.5121212", "text": "public function getForm()\n {\n return $this->form;\n }", "title": "" }, { "docid": "a92c0aef6bdeb9e282e067fa1bd7bd8e", "score": "0.5121212", "text": "public function getForm()\n {\n return $this->form;\n }", "title": "" }, { "docid": "a92c0aef6bdeb9e282e067fa1bd7bd8e", "score": "0.5121212", "text": "public function getForm()\n {\n return $this->form;\n }", "title": "" }, { "docid": "1b7eb28511da973e0c80421835faa631", "score": "0.5109061", "text": "public function getRequestEntries()\n {\n return $this->data;\n }", "title": "" }, { "docid": "1fb4ad5603ad6d4eb18916bf5b28e1bf", "score": "0.5107946", "text": "protected static function createDefaultForm(): array\n\t{\n\t\tif ($formId = self::createForm([]))\n\t\t{\n\t\t\treturn self::getFormsByFilter(['ID' => $formId]);\n\t\t}\n\n\t\treturn [];\n\t}", "title": "" }, { "docid": "296dba104eca674509050dae5d627760", "score": "0.5103193", "text": "public function getForm() {\n\t\treturn $this->form;\n\t}", "title": "" }, { "docid": "369aac7b0093f1ac586a591d97c5d3e8", "score": "0.5101652", "text": "private function getAllSubmissionsTables() {\n\t\tif (null==$this->_db)$this->_db = & bfCompat::getDBO ();\n\t\t$this->_db->setQuery ( \"SHOW TABLES LIKE 'jos_form_submitteddata_form%'\" );\n\t\t$tables = $this->_db->loadResultArray ();\n\t\treturn $tables;\n\t}", "title": "" }, { "docid": "1868a3d9005130b33033148e9c656b8f", "score": "0.5101346", "text": "public function getForm()\n {\n return $this->form;\n }", "title": "" }, { "docid": "819a72928bcfa3fcf035d637104b77cd", "score": "0.5094512", "text": "function get_forms() {\n\t \t\n\t\t$forms = $this->ci->forms->get_forms();\n\t\tif(isset($forms)) {\n\t\t\tforeach ($forms->result() as $row){\n \n\t\t $data[] = array(\n\t\t 'forms_id' => $row->forms_id,\n\t\t 'forms_nombre' => $row->forms_nombre,\n\t\t 'forms_nombre_action' => $row->forms_nombre_action,\n\t\t 'grupos_fields_id' => $row->grupos_fields_id,\n\t\t 'grupos_fields_nombre' => $this->get_grupo_field_by_id($row->grupos_fields_id),\n\t\t 'forms_descripcion' => $row->forms_descripcion,\n\t\t 'forms_titulo' => $row->forms_titulo,\n\t\t 'forms_texto_boton_enviar' => $row->forms_texto_boton_enviar,\n\t\t );\n\t\t }\n\t\t\n\t\t return $data;\n\t\t}\n\t\treturn NULL;\n\t }", "title": "" }, { "docid": "7a758232c9bea74ca1c661576940d01d", "score": "0.50840783", "text": "function get_kwds_submissions() {\n return $this->query(\n \"SELECT id, CONCAT('KWDS ',id) as name\n FROM \".DB_NAME.\".kwds\n WHERE NOW() <= ADDTIME(class_date, '23:59:00')\"\n );\n }", "title": "" }, { "docid": "7932bd7eabb27ffd5bd0cb9136bf15b2", "score": "0.50793767", "text": "public function index()\n {\n return Form::latest()->paginate(10);\n\n }", "title": "" }, { "docid": "e78259a264dc3c9fbd2153dccb8b1194", "score": "0.5060744", "text": "public function getSubmitValue() {\n $submission = [];\n foreach ($this->getOptionFields() as $box) {\n if ($box->attrExists(\"checked\")) {\n $submission[] = $box->getValue();\n }\n }\n return $submission;\n }", "title": "" }, { "docid": "e8e8b4be3b2af41c51a1420cf134ce5c", "score": "0.50601256", "text": "public function getSubmissionData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "e8e8b4be3b2af41c51a1420cf134ce5c", "score": "0.50601256", "text": "public function getSubmissionData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "94afcedbe8f1bc4ace751967c1c416f9", "score": "0.50588053", "text": "public function actionIndex()\r\n {\r\n $searchModel = new FormSearch();\r\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\r\n\r\n // Only for admin users\r\n if (!empty(Yii::$app->user) && Yii::$app->user->can(\"admin\") && ($dataProvider->totalCount == 0)) {\r\n Yii::$app->getSession()->setFlash(\r\n 'warning',\r\n Html::tag('strong', Yii::t(\"app\", \"You don't have any forms!\")) . ' ' .\r\n Yii::t(\"app\", \"Click the blue button on the left to start building your first form.\")\r\n );\r\n }\r\n\r\n // Select slug & name of all promoted templates in the system. Limit to 5 results.\r\n $templates = Template::find()->select(['slug', 'name'])->where([\r\n 'promoted' => Template::PROMOTED_ON,\r\n ])->limit(5)->orderBy('updated_at DESC')->asArray()->all();\r\n return $this->render('index', [\r\n 'searchModel' => $searchModel,\r\n 'dataProvider' => $dataProvider,\r\n 'templates' => $templates,\r\n ]);\r\n }", "title": "" }, { "docid": "5f284df2163ce958c51f70f406f733b7", "score": "0.50585705", "text": "function submissions() {\n\n global $CFG, $USER;\n \n $quiz = get_record('quiz', 'id', $this->mainobject->secondary_id);\n $courseid = $quiz->course;\n\n //permission to grade?\n $coursemodule = get_record('course_modules', 'course', $quiz->course, 'module', $this->mainobject->modulesettings['quiz']->id, 'instance', $quiz->id) ;\n $modulecontext = get_context_instance(CONTEXT_MODULE, $coursemodule->id);\n \n if (!has_capability($this->capability, $modulecontext, $USER->id)) {\n return;\n }\n\n $student_sql = $this->get_role_users_sql($this->mainobject->courses[$courseid]->context);\n\n $this->mainobject->get_course_students($quiz->course);\n\n $sql = \"SELECT COUNT(qst.id) AS count, qa.userid, qs.questionid, MIN(qst.timestamp) as timestamp\n FROM {$CFG->prefix}question_states qst\n INNER JOIN {$CFG->prefix}question_sessions qs\n ON qs.newest = qst.id\n INNER JOIN {$CFG->prefix}quiz_attempts qa\n ON qs.attemptid = qa.uniqueid\n \n WHERE qa.quiz = {$this->mainobject->secondary_id}\n AND qa.timefinish > 0\n AND qa.preview = 0\n AND (qa.userid IN ({$student_sql}))\n AND qs.questionid = {$this->mainobject->id}\n AND qst.event NOT IN (3,6,9)\n GROUP BY qa.userid, qs.questionid\n ORDER BY timestamp ASC\";\n\n $question_attempts = get_records_sql($sql);\n\n if($question_attempts) {\n\n $this->mainobject->output = '[{\"type\":\"submissions\"}';\n\n foreach ($question_attempts as $question_attempt) {\n if (!isset($question_attempt->userid)) {\n continue;\n }\n // If this is a group node, ignore those where the student is not in the right group\n $groupnode = $this->mainobject->group &&\n $inrightgroup = $this->mainobject->check_group_membership($this->mainobject->group, $question_attempt->userid);\n if ($groupnode && !$inrightgroup) {\n continue;\n }\n\n $name = $this->mainobject->get_fullname($question_attempt->userid);\n // Sometimes, a person will have more than 1 attempt for the question.\n // No need to list them twice, so we add a count after their name.\n if ($question_attempt->count > 1) {\n $name .=' ('.$question_attempt->count.')';\n }\n\n $now = time();\n $seconds = ($now - $question_attempt->timestamp);\n $summary = $this->mainobject->make_time_summary($seconds);\n\n $this->output .= $this->mainobject->make_submission_node($name,\n $question_attempt->userid,\n $this->mainobject->id,\n $summary, \n 'quiz_final',\n $seconds,\n $question_attempt->timestamp,\n $question_attempt->count);\n\n }\n $this->mainobject->output .= \"]\"; \n }\n }", "title": "" }, { "docid": "cccc27e234e8703f7865ded5c4fcbe6a", "score": "0.50563085", "text": "public function actionIndex()\n {\n try {\n $this->requirePostRequest();\n\n $formData = Craft::$app->getRequest()->post();\n\n // Get Settings\n $settings = Formstack::getInstance()->getSettings();\n\n // Parse field data\n foreach ( $formData as $key => $value) {\n if ($key !== 'action' && $key !== 'redirect' && $key !== '_submit' && $key !== 'CRAFT_CSRF_TOKEN' ) {\n if (strpos($key, '-') != 0) {\n $fieldName = substr($key, 0, strpos($key, '-'));\n $fieldSubname = substr($key, strpos($key, '-')+1);\n $fields[] = $fieldName . '[' . $fieldSubname . ']=' . $value;\n } else {\n $fields[] = $key . '=' . $value;\n }\n }\n }\n $postFields = implode ('&', $fields);\n\n // Create request URL\n $submissionUrl = 'https://www.formstack.com/api/v2/form/' . $formData['form'] . '/submission.json?oauth_token=' . $settings->formstackOAuth;\n\n $curl = curl_init($submissionUrl);\n curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLINFO_HEADER_OUT, true);\n\n $result = curl_exec($curl);\n $result = json_decode($result);\n\n curl_close($curl);\n\n $result->message = isset($formData['success']) ? $formData['success'] : '';\n\n // Check if not ajax request\n if (!Formstack::$plugin->request->getIsAjax()) {\n $url = $formData['redirect'] . '?message=' . urlencode($result->message) . '&submitted=true';\n $this->redirect($url);\n }\n\n $result = json_encode($result);\n\n return $result;\n\n } catch (\\Exception $e ) {\n return $e;\n }\n }", "title": "" }, { "docid": "bc2075a1d709beac2c8419933ce92276", "score": "0.5036012", "text": "public function query() {\n\n\t\t$orderby = isset( $_GET['orderby'] ) ? $_GET['orderby'] : 'title';\n\t\t$order = isset( $_GET['order'] ) ? $_GET['order'] : 'DESC';\n\t\t$category = $this->get_category();\n\n\t\t$args = array(\n\t\t\t'post_type' => 'give_forms',\n\t\t\t'post_status' => 'publish',\n\t\t\t'order' => $order,\n\t\t\t'fields' => 'ids',\n\t\t\t'posts_per_page' => $this->per_page,\n\t\t\t'paged' => $this->get_paged(),\n\t\t\t'suppress_filters' => true\n\t\t);\n\n\t\tif ( ! empty( $category ) ) {\n\t\t\t$args['tax_query'] = array(\n\t\t\t\tarray(\n\t\t\t\t\t'taxonomy' => 'form_category',\n\t\t\t\t\t'terms' => $category\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tswitch ( $orderby ) :\n\t\t\tcase 'title' :\n\t\t\t\t$args['orderby'] = 'title';\n\t\t\t\tbreak;\n\n\t\t\tcase 'sales' :\n\t\t\t\t$args['orderby'] = 'meta_value_num';\n\t\t\t\t$args['meta_key'] = '_give_form_sales';\n\t\t\t\tbreak;\n\n\t\t\tcase 'earnings' :\n\t\t\t\t$args['orderby'] = 'meta_value_num';\n\t\t\t\t$args['meta_key'] = '_give_form_earnings';\n\t\t\t\tbreak;\n\t\tendswitch;\n\n\t\t$args = apply_filters( 'give_form_reports_prepare_items_args', $args, $this );\n\n\t\t$this->donation_forms = new WP_Query( $args );\n\n\t\t// Store total number of donation forms count.\n\t\t$this->count = $this->donation_forms->found_posts;\n\n\t}", "title": "" }, { "docid": "58675a16950668fb94c32cba29af7569", "score": "0.5027615", "text": "protected function getSavedForms()\n {\n return \\XLite\\Core\\Session::getInstance()->get(self::SAVED_FORMS);\n }", "title": "" }, { "docid": "1a0debf82a58b56e4b11f1f3baae2dff", "score": "0.5027057", "text": "public function requests($form = '')\n\t{\n\t\t# $this->timber->bench->start();\n\n\t\t$this->services->ProjectsRequests->setRequest($form);\n\t\t$this->services->ProjectsRequests->processRequest(\n\t\t\tarray(\n\t\t\t\t'add' => array('admin'),\n\t\t\t\t'edit' => array('admin'),\n\t\t\t\t'delete' => array('admin'),\n\t\t\t\t'mark' => array('admin'),\n\n\t\t\t\t'sync' => array('client', 'staff', 'admin'),\n\n\t\t\t\t'edit_milestone' => array('admin'),\n\t\t\t\t'add_milestone' => array('admin'),\n\t\t\t\t'delete_milestone' => array('admin'),\n\n\t\t\t\t'edit_task' => array('admin'),\n\t\t\t\t'add_task' => array('admin'),\n\t\t\t\t'delete_task' => array('admin'),\n\t\t\t\t'mark_task' => array('staff', 'admin'),\n\n\t\t\t\t'add_ticket' => array('client', 'staff', 'admin'),\n\t\t\t\t'edit_ticket' => array('client', 'staff', 'admin'),\n\t\t\t\t'delete_ticket' => array('admin'),\n\t\t\t\t'mark_ticket' => array('client', 'staff', 'admin'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'add' => array('real_admin'),\n\t\t\t\t'edit' => array('real_admin'),\n\t\t\t\t'delete' => array('real_admin'),\n\t\t\t\t'mark' => array('real_admin'),\n\n\t\t\t\t'sync' => array('real_client', 'real_staff', 'real_admin'),\n\n\t\t\t\t'edit_milestone' => array('real_admin'),\n\t\t\t\t'add_milestone' => array('real_admin'),\n\t\t\t\t'delete_milestone' => array('real_admin'),\n\n\t\t\t\t'edit_task' => array('real_admin'),\n\t\t\t\t'add_task' => array('real_admin'),\n\t\t\t\t'delete_task' => array('real_admin'),\n\t\t\t\t'mark_task' => array('real_staff', 'real_admin'),\n\n\t\t\t\t'add_ticket' => array('real_client', 'real_staff', 'real_admin'),\n\t\t\t\t'edit_ticket' => array('real_client', 'real_staff', 'real_admin'),\n\t\t\t\t'delete_ticket' => array('real_admin'),\n\t\t\t\t'mark_ticket' => array('real_client', 'real_staff', 'real_admin'),\n\t\t\t),\n\t\t\t$form,\n\t\t\t$this->services->ProjectsRequests,\n\t\t\tarray(\n\t\t\t\t'add' => 'addProject',\n\t\t\t\t'edit' => 'editProject',\n\t\t\t\t'delete' => 'deleteProject',\n\t\t\t\t'mark' => 'markProject',\n\n\t\t\t\t'sync' => 'syncFiles',\n\n\t\t\t\t'edit_milestone' => 'editMilestone',\n\t\t\t\t'add_milestone' => 'addMilestone',\n\t\t\t\t'delete_milestone' => 'deleteMilestone',\n\n\t\t\t\t'edit_task' => 'editTask',\n\t\t\t\t'add_task' => 'addTask',\n\t\t\t\t'delete_task' => 'deleteTask',\n\t\t\t\t'mark_task' => 'markTask',\n\n\t\t\t\t'add_ticket' => 'addTicket',\n\t\t\t\t'edit_ticket' => 'editTicket',\n\t\t\t\t'delete_ticket' => 'deleteTicket',\n\t\t\t\t'mark_ticket' => 'markTicket',\n\t\t\t)\n\t\t);\n\t\t$this->services->ProjectsRequests->getResponse();\n\n\t\t# $this->timber->bench->end();\n\t\t# $this->timber->bench->log();\n\t}", "title": "" }, { "docid": "402cea9642a4d7701959dc1b654d0f9b", "score": "0.5022946", "text": "final public function all() : array\n {\n return $this->httpRequest->attributes->all()\n + $this->httpRequest->query->all()\n + $this->httpRequest->request->all()\n + $this->httpRequest->files->all();\n }", "title": "" }, { "docid": "8b024aa7db3e7c2e91b9e62740f478c4", "score": "0.5021749", "text": "public function testListSubmissions() {\n $client = $this->makeAuthenticatedClient();\n\n $client->request('GET', '/list_submissions');\n $this->assertStatusCode(200, $client);\n\n $client->request('GET', '/list_submissions/01-01-2020');\n $this->assertStatusCode(200, $client);\n }", "title": "" }, { "docid": "4b0c3ffc908315df31a81f172e28b685", "score": "0.5013699", "text": "public function getValue(): array\n {\n $values = [];\n\n /** @var ElementInterface $element */\n foreach ($this as $key => $element) {\n if (($form = $this->getForm()) &&\n $form->isSubmitted() &&\n !in_array($key, $this->submittedKeys)) {\n continue;\n }\n\n $values[$key] = $element->getValue();\n }\n\n return $values;\n }", "title": "" }, { "docid": "12861bcedb9553bc3d52d42c8f343b80", "score": "0.5009087", "text": "public function get_form_elements($grade, MoodleQuickForm $mform, stdClass $data) {\n return $this->get_form_elements_for_user($grade, $mform,$data,0);\n }", "title": "" }, { "docid": "68806f72c57b478b8d97b8dd1e18a4de", "score": "0.5001762", "text": "public function getFormAsArray(Zend_Form $form)\n {\n $array = array();\n $array['action'] = $form->getAction();\n $array['method'] = $form->getMethod();\n foreach ($form->getElements() as $element) {\n $element->removeDecorator('HtmlTag');\n $element->removeDecorator('Label');\n $element->removeDecorator('DtDdWrapper');\n $array[$element->getName()] = $element;\n }\n\n return $array;\n }", "title": "" }, { "docid": "c21f8b39e53a307d7f2409b846d59113", "score": "0.49961185", "text": "protected function processSubmission() {\n\t\treturn $this->buildContent();\n\t}", "title": "" }, { "docid": "4725d3314336165185d2f0fdda2aae3e", "score": "0.49950972", "text": "public function getAll()\n {\n return $this->job->all();\n }", "title": "" }, { "docid": "321f24dd27eb35000fd4aa89b18f1e62", "score": "0.4984618", "text": "public function getNeoSubmissions ( $PSISession ) {\n $sql = \"select epoch_mjd, survey_mode,\n ra_deg, dec_deg, filter_id, mag, obscode,\n desig, mpc_desig,\n digest, dbname, tracklet_id, disposition from mpc_sub\n where disposition not in ('T', 'J', 'O', 'D')\n group by desig\n order by epoch_mjd desc\n limit \" . self::NeoSubmissionLimit;\n $result = $this->runMopsQuery($PSISession, $PSISession->getDefaultMopsExportSchema(), \"get NEO submissions\", $sql);\n\n $this->storeDesigs($result, \"submissions\");\n\n return $result;\n }", "title": "" } ]
0306cf4349a73bd097299140a110fdb8
Overrides abstract function in Test.
[ { "docid": "84281a43bca4b8634cb7a012c8741c4e", "score": "0.0", "text": "public function get_message() {\n return \"Search Users Trending test\";\n }", "title": "" } ]
[ { "docid": "f332d3563739028dd44ca408fbc9374f", "score": "0.74128616", "text": "abstract public function test();", "title": "" }, { "docid": "f332d3563739028dd44ca408fbc9374f", "score": "0.74128616", "text": "abstract public function test();", "title": "" }, { "docid": "1acf760e9f679eeb30c9109a3cc42e73", "score": "0.7309134", "text": "abstract protected function getTestCase() : TestCase;", "title": "" }, { "docid": "5b209935c3f62808d365527aa7115b15", "score": "0.72012794", "text": "public function set_up_test() { /* Overload */ }", "title": "" }, { "docid": "7c3d2c2c0211c5182b7bc03df3630c10", "score": "0.7034086", "text": "protected abstract function getTestCase() : TestCase;", "title": "" }, { "docid": "7dc3187d6566ecb44796dc15f90095df", "score": "0.70314497", "text": "abstract public function setUp() : void;", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6979953", "text": "protected function setUp() {}", "title": "" }, { "docid": "7de6cd953aa60e4e3b96ed9d04a0d9be", "score": "0.694456", "text": "protected function _setUp() {}", "title": "" }, { "docid": "29c8b3ee59e28d5b417d0dc4e340b8e7", "score": "0.69423276", "text": "abstract public function test_create();", "title": "" }, { "docid": "f585be046b4317b845dab229ce8d5c73", "score": "0.68316567", "text": "abstract public function test_show();", "title": "" }, { "docid": "7d3b98d5925aeac4a7af6151b0dbe527", "score": "0.68277824", "text": "public function testInstance() { }", "title": "" }, { "docid": "5f6ab9a963309d8f1a42541013cd3ff8", "score": "0.67975724", "text": "abstract public function test_store();", "title": "" }, { "docid": "d1aceab7e80e04eca9105e600218f028", "score": "0.67367315", "text": "public function testAbstractTrait()\n {\n }", "title": "" }, { "docid": "0efcce98d72f6a2de2ecc71eb1b82227", "score": "0.6710906", "text": "public function test_self();", "title": "" }, { "docid": "21f5fc29397a279b6542ed6020f3cd6c", "score": "0.67059374", "text": "public function testMe()\n {\n }", "title": "" }, { "docid": "0c608e2149c92a4748ebf1b87603fbef", "score": "0.6689959", "text": "public function setUp(){}", "title": "" }, { "docid": "2720012d4a0ba48dfc14172079f3ec2a", "score": "0.66746366", "text": "public function setUp();", "title": "" }, { "docid": "a711b03cdf26228790ea803f5e40f710", "score": "0.6653301", "text": "public function tests()\n {\n\n }", "title": "" }, { "docid": "eccf5004604e9b4a8036bc9641cf8f10", "score": "0.66527945", "text": "protected function setUp() {\n \n }", "title": "" }, { "docid": "eccf5004604e9b4a8036bc9641cf8f10", "score": "0.66527945", "text": "protected function setUp() {\n \n }", "title": "" }, { "docid": "e3ec27e3ce7d2f8c0013025efb93c472", "score": "0.6641132", "text": "protected function setUp(){\r\n \r\n }", "title": "" }, { "docid": "0ae42861e4f29a888292e81521b9e74e", "score": "0.6633922", "text": "public function setUp() {\n\t\t// Override me\n\t}", "title": "" }, { "docid": "744e26d54ebda127ff3de697584622ba", "score": "0.66185707", "text": "abstract public function test_update();", "title": "" }, { "docid": "e3f7462cfb94e46264b9cc429553225a", "score": "0.6590762", "text": "public function setUp() {}", "title": "" }, { "docid": "c7dff28af99710b44e3a97d132035994", "score": "0.65851533", "text": "public function test1_old() {\n parent::test1();\n }", "title": "" }, { "docid": "140cd40d97cef887416c83fad4dd5f97", "score": "0.6538924", "text": "public function testGetLinkedSubfunctionalExpertise()\n {\n }", "title": "" }, { "docid": "d9b4442d862cbfb0d10b418cbcda4644", "score": "0.65340686", "text": "abstract protected function getTestBackend();", "title": "" }, { "docid": "fc2025adb94ec394b08f19d3408ef0ed", "score": "0.6520426", "text": "protected function setUp()\n {\n \n }", "title": "" }, { "docid": "fc2025adb94ec394b08f19d3408ef0ed", "score": "0.6520426", "text": "protected function setUp()\n {\n \n }", "title": "" }, { "docid": "30ba207bc11db21451cf4431b33ea877", "score": "0.6489046", "text": "public function setUp() {\n \n }", "title": "" }, { "docid": "d973a88f89bedd4e767c3b02878d30b0", "score": "0.64768314", "text": "abstract public function test_index();", "title": "" }, { "docid": "3533d1c495644d9a1cdf4c6e6483a145", "score": "0.64753145", "text": "protected function setUp() {\n\t\t\n\t}", "title": "" }, { "docid": "88b632fa2e4f2de858a32fd69605a238", "score": "0.6473936", "text": "protected function setUp()\n {\n\n }", "title": "" }, { "docid": "fbc207139eeb1cafa6d80e5979b8d6ed", "score": "0.6463531", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "4f24c702d4faee4654936604bd5c9303", "score": "0.6457786", "text": "protected function setUp() {\n parent::setUp();\n }", "title": "" }, { "docid": "e7d06b2118ec422ccc348d6b49a8ba74", "score": "0.6419853", "text": "protected function setUp() {\n\n }", "title": "" }, { "docid": "47b70b33d194f0d268d53d16a4366d6e", "score": "0.64155793", "text": "protected function setUp()\n {\n\n }", "title": "" }, { "docid": "ed0f885b8cbc32e436b3af27c9047006", "score": "0.6414923", "text": "protected function setUp()\r\n {\r\n }", "title": "" }, { "docid": "ed0f885b8cbc32e436b3af27c9047006", "score": "0.6414923", "text": "protected function setUp()\r\n {\r\n }", "title": "" }, { "docid": "ed0f885b8cbc32e436b3af27c9047006", "score": "0.6414923", "text": "protected function setUp()\r\n {\r\n }", "title": "" }, { "docid": "ed0f885b8cbc32e436b3af27c9047006", "score": "0.6414923", "text": "protected function setUp()\r\n {\r\n }", "title": "" }, { "docid": "af251b7683f79704391e3ee40d5fafde", "score": "0.6401972", "text": "protected function setUp() {\n }", "title": "" }, { "docid": "4fe4fb91f13f18c83ed1264b559b70c9", "score": "0.6394229", "text": "public function setUp() {\n\t\t\n\t}", "title": "" }, { "docid": "9c7c47fcf5b898a0b73379a3ac18e3b4", "score": "0.6393706", "text": "public function setUp(): void\n {\n // phpunit 9 calls the method getName(), phpunit 10 name()\n $name = method_exists($this, 'name') ? $this->name() : $this->getName(); /* @phpstan-ignore-line */\n $this->mode = 'testHashRequestFailure' === $name ? 'failure' : 'cache';\n\n parent::setUp();\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.63929486", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.63929486", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.63929486", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.63929486", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.63929486", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.63929486", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.63929486", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.63929486", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.63929486", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.63929486", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.63929486", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.63929486", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "50c4f05e1674d5e0d0a46637cb18251b", "score": "0.63929486", "text": "protected function setUp()\n {\n }", "title": "" }, { "docid": "900b3ccdfe62026c9dcd83b9d7c7362d", "score": "0.6367978", "text": "protected function setUp()\n {\n parent::setUp();\n }", "title": "" }, { "docid": "900b3ccdfe62026c9dcd83b9d7c7362d", "score": "0.6367978", "text": "protected function setUp()\n {\n parent::setUp();\n }", "title": "" }, { "docid": "900b3ccdfe62026c9dcd83b9d7c7362d", "score": "0.6367978", "text": "protected function setUp()\n {\n parent::setUp();\n }", "title": "" }, { "docid": "900b3ccdfe62026c9dcd83b9d7c7362d", "score": "0.6367978", "text": "protected function setUp()\n {\n parent::setUp();\n }", "title": "" }, { "docid": "900b3ccdfe62026c9dcd83b9d7c7362d", "score": "0.6367978", "text": "protected function setUp()\n {\n parent::setUp();\n }", "title": "" }, { "docid": "0d23ef100c12f159b86e2b5e1550d443", "score": "0.6361929", "text": "protected function setUp ()\n\t{\n\n\t}", "title": "" }, { "docid": "80c7a8a617960bed053b8c3d4cce1e0e", "score": "0.6355686", "text": "public function setUp(){ }", "title": "" }, { "docid": "825c52f6bdedb070eb47dc1f99a6add7", "score": "0.63420856", "text": "abstract public function test_edit();", "title": "" }, { "docid": "b385d01502e3e3cd4c12080d386361f3", "score": "0.633144", "text": "function setUp()\n {\n }", "title": "" }, { "docid": "8a50e98791e528d5bdb8e7b920ae2c85", "score": "0.63288", "text": "public function setUp()\n {\n \n }", "title": "" }, { "docid": "8a50e98791e528d5bdb8e7b920ae2c85", "score": "0.63288", "text": "public function setUp()\n {\n \n }", "title": "" }, { "docid": "aeae89b3e54bea79b102b4ed44e51075", "score": "0.63226104", "text": "public function setUp()\r\n {\r\n }", "title": "" }, { "docid": "72b98a705cf2406c305458adc75f213b", "score": "0.6322393", "text": "public function testHack()\n\t{\n }", "title": "" }, { "docid": "3e92521fef95bcff3fb78da03da08eb0", "score": "0.63221526", "text": "public function testCreate() {\n }", "title": "" }, { "docid": "3e636cb47305ddc66822e88f0cdfa4d6", "score": "0.6308766", "text": "public function setUp() {\n\t\t\t\n\t}", "title": "" }, { "docid": "3e636cb47305ddc66822e88f0cdfa4d6", "score": "0.6308766", "text": "public function setUp() {\n\t\t\t\n\t}", "title": "" }, { "docid": "3e636cb47305ddc66822e88f0cdfa4d6", "score": "0.6308766", "text": "public function setUp() {\n\t\t\t\n\t}", "title": "" }, { "docid": "2203854a7ac3d9e7f95932db3f4e75f6", "score": "0.63024795", "text": "protected function setUp(){\n }", "title": "" }, { "docid": "f169945faff48a3dd60341456f310bf2", "score": "0.63011485", "text": "protected function setUp() {\n\t}", "title": "" }, { "docid": "f169945faff48a3dd60341456f310bf2", "score": "0.63011485", "text": "protected function setUp() {\n\t}", "title": "" }, { "docid": "bb0a5137b5f40396db4d541812af1eac", "score": "0.6297915", "text": "public function testFake(): void\n {\n }", "title": "" }, { "docid": "5a519d3c6b105f6980cdd60a3b6e9b24", "score": "0.6289277", "text": "public function testRun1()\n {\n }", "title": "" }, { "docid": "a8c37baf5ec334b077ae7b58c24032c7", "score": "0.628816", "text": "protected function setUp() {\n }", "title": "" }, { "docid": "a8c37baf5ec334b077ae7b58c24032c7", "score": "0.628816", "text": "protected function setUp() {\n }", "title": "" }, { "docid": "587962d28a45d3ab49584f0c6c99814e", "score": "0.62853587", "text": "public function testAdd()\n {\n }", "title": "" }, { "docid": "2571b71f806a869960e1ad0f928f1cab", "score": "0.6285261", "text": "public function setUp()\n {\n # code...\n }", "title": "" }, { "docid": "6051491a9e9487343da33d8941c034f0", "score": "0.62839323", "text": "function setUp() {\n }", "title": "" }, { "docid": "274145b66453e905ae6ec330e77191e5", "score": "0.62801844", "text": "abstract protected function onTest(PageResultInterface $pageResult): bool;", "title": "" }, { "docid": "2165a697de4048d9b27b43c0f50d8817", "score": "0.6277354", "text": "public function __construct()\n {\n parent::setUp();\n }", "title": "" }, { "docid": "63533490bb70c4541cb1327190514536", "score": "0.62645453", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n $this->testedObject = new MultipleReturnSniff();\n }", "title": "" }, { "docid": "2f00ac8ecb1368d5c95a1890ea3bfb94", "score": "0.626139", "text": "public function runTest();", "title": "" }, { "docid": "2f00ac8ecb1368d5c95a1890ea3bfb94", "score": "0.626139", "text": "public function runTest();", "title": "" }, { "docid": "b54921597c39dbc431843744739b8589", "score": "0.62612104", "text": "public function setUp()\n {\n }", "title": "" }, { "docid": "b54921597c39dbc431843744739b8589", "score": "0.62612104", "text": "public function setUp()\n {\n }", "title": "" }, { "docid": "b54921597c39dbc431843744739b8589", "score": "0.62612104", "text": "public function setUp()\n {\n }", "title": "" }, { "docid": "b54921597c39dbc431843744739b8589", "score": "0.62612104", "text": "public function setUp()\n {\n }", "title": "" }, { "docid": "b54921597c39dbc431843744739b8589", "score": "0.62612104", "text": "public function setUp()\n {\n }", "title": "" }, { "docid": "b54921597c39dbc431843744739b8589", "score": "0.62612104", "text": "public function setUp()\n {\n }", "title": "" }, { "docid": "b54921597c39dbc431843744739b8589", "score": "0.62612104", "text": "public function setUp()\n {\n }", "title": "" }, { "docid": "b54921597c39dbc431843744739b8589", "score": "0.62612104", "text": "public function setUp()\n {\n }", "title": "" }, { "docid": "b54921597c39dbc431843744739b8589", "score": "0.62612104", "text": "public function setUp()\n {\n }", "title": "" }, { "docid": "b54921597c39dbc431843744739b8589", "score": "0.62612104", "text": "public function setUp()\n {\n }", "title": "" }, { "docid": "b54921597c39dbc431843744739b8589", "score": "0.62612104", "text": "public function setUp()\n {\n }", "title": "" }, { "docid": "b54921597c39dbc431843744739b8589", "score": "0.62612104", "text": "public function setUp()\n {\n }", "title": "" } ]
61a49ac9189f26e923124d4f9f3a88f6
de function agregar_RMA($nro_orden,$nrocaso,$ordprod) Funcion que descuenta del stock correspondiente los productos de la orden de compra El parametro $id_dep es el id de deposito de los productos a descontar (SOLO SE DEBE INVOCAR SI EL PROVEEDOR DE LA ORDEN ES UNO DE LOS STOCKS DE LA EMPRESA)
[ { "docid": "e6d436b26d3c5e2357836edb57e4bdec", "score": "0.60689765", "text": "function descontar_stock($id_dep)\r\n{global $db,$msg, $nro_orden,$_ses_user;\r\n//descontamos del stock seleccionado los items de la orden de compra\r\n $items=get_items();\r\n $db->StartTrans();\r\n for($r=0;$r<$items['cantidad'];$r++)\r\n {\r\n\r\n $obs=\"Productos reservados por OC Nº $nro_orden\";\r\n $id_prod=$items[$r]['id_producto'];\r\n\r\n //si la fila fue creada, no hay que descontar aqui del stock\r\n //porque ya se desconto la primera vez que se creo la fila\r\n if($items[$r]['id_fila']==\"\")\r\n {\r\n //recorremos el arreglo de proveedores seleccionados para la reserva\r\n //y vamos haciendo los descuentos respectivos\r\n $tam_prov_cant=sizeof($items[$r]['proveedores']);\r\n for($gh=0;$gh<$tam_prov_cant;$gh++)\r\n {\r\n $cantidad=$items[$r]['proveedores'][$gh]['cantidad'];\r\n $id_prov=$items[$r]['proveedores'][$gh]['id_proveedor'];;\r\n\r\n //traemos la cantidad actual para ese producto, en ese proveedor\r\n //en ese deposito\r\n $query=\"select cant_disp from stock where id_deposito=$id_dep and id_proveedor=$id_prov and id_producto=$id_prod\";\r\n $result_stock=sql($query) or fin_pagina();\r\n //si hay cantidad disponible, lo descontamos\r\n\r\n if($cantidad<=$result_stock->fields['cant_disp'])\r\n {\r\n $sql=\"update stock set \";\r\n \t $sql.=\"cant_disp=cant_disp-$cantidad,\";\r\n \t $sql.=\" comentario='$obs' \";\r\n\t $sql.=\" where \";\r\n\t $sql.=\"id_producto=$id_prod \";\r\n\t $sql.=\" AND id_deposito=$id_dep \";\r\n\t $sql.=\" AND id_proveedor=$id_prov\";\r\n\t sql($sql) or fin_pagina();;\r\n\r\n\t //registramos en el historial el descuento de stock\r\n $query=\"select nextval('control_stock_id_control_stock_seq') as id_control_stock\";\r\n $id_control_stock=sql($query) or fin_pagina();\r\n\r\n $fecha_modif=date(\"Y-m-d H:i:s\",mktime());\r\n $query=\"insert into control_stock(id_control_stock,fecha_modif,usuario,comentario,estado)\r\n values(\".$id_control_stock->fields['id_control_stock'].\",'$fecha_modif','OC Nº $nro_orden','Productos reservados por la Orden de Compra Nº $nro_orden','res_up')\";\r\n\t sql($query) or fin_pagina();\r\n\r\n\t $query=\"insert into descuento (id_deposito,id_producto,id_proveedor,id_control_stock,cant_desc)\r\n\t values($id_dep,$id_prod,$id_prov,\".$id_control_stock->fields['id_control_stock'].\",$cantidad)\";\r\n\t sql($query) or fin_pagina();\r\n\r\n\t $query=\"insert into log_stock(id_control_stock,usuario,fecha,tipo)\r\n\t values (\".$id_control_stock->fields['id_control_stock'].\",'\".$_ses_user['name'].\"','$fecha_modif','Productos Reservados por OC Nº $nro_orden')\";\r\n\t sql($query) or fin_pagina();\r\n }\r\n else\r\n {//sino damos el error y detenemos el for\r\n $msg=\"<center><b>La Orden de Compra no se puede guardar: <br>Las cantidades a reservar del stock son mayores que las actualmente disponibles</b></center>\";\r\n $r=$items['cantidad']+1;\r\n return 0;\r\n }\r\n }//de for($gh=0;$gh<$tam_prov_cant;$gh++)\r\n }//de if($ff->fields['id_fila']==\"\")\r\n }//de for($r=0;$r<$items['cantidad'];$r++)\r\n $db->CompleteTrans();\r\n return 1;\r\n}", "title": "" } ]
[ { "docid": "d40cfdeebaea984ed2d8baaa7e7343fe", "score": "0.76287246", "text": "function agregar_RMA($nro_orden,$nrocaso,$ordprod)\r\n{global $db,$_ses_user;\r\n\r\n $db->StartTrans();\r\n //agregamos cada producto por separado al stock RMA con el proveedor\r\n //seleccionado en la OC (el proveedor que viene en proveedor_reclamo)\r\n //y luego completamos la informacion correspondiente en la tabla info_rma\r\n $items_rma=get_items();\r\n\r\n //seleccionamos el id del deposito RMA\r\n $query=\"select id_deposito from depositos where nombre='RMA'\";\r\n $dep_rma=sql($query) or fin_pagina();\r\n $id_dep=$dep_rma->fields['id_deposito'];\r\n $id_prov=$_POST['proveedor_reclamo'];\r\n $obs=\"Modificación automática para Orden de Compra Nº $nro_orden\";\r\n for($i=0;$i<$items_rma['cantidad'];$i++)\r\n {\r\n $id_prod=$items_rma[$i][\"id_producto\"];\r\n $cantidad=$items_rma[$i][\"cantidad\"];\r\n $precio=$items_rma[$i][\"precio_unitario\"];\r\n //primero busco si tiene precio ese producto\r\n //con ese proveedor\r\n\t $sql=\" select id_producto from precios \";\r\n\t $sql.=\"where id_producto=$id_prod \";\r\n\t $sql.=\"and id_proveedor=$id_prov \";\r\n\t $result=sql($sql) or fin_pagina();\r\n\t $cant_precios=$result->recordcount();\r\n\t if($cant_precios==0)\r\n\t {\r\n\t insertar_precio($id_prod,$id_prov,$precio);\r\n\t }\r\n\r\n if($cantidad!=\"\" && $cantidad>0)\r\n {\r\n \t//revisamos si esta la entrada para ese producto, proveedor, deposito, en el stock.\r\n \t$query=\"select count(*)as cuenta from stock where id_producto=$id_prod and id_deposito=$id_dep and id_proveedor=$id_prov\";\r\n \t$esta=sql($query) or fin_pagina();\r\n\r\n \tif($esta->fields['cuenta']==0)\r\n \t{$fecha_modif=date(\"Y-m-d H:i:s\",mktime());\r\n \t $sql=\"insert into stock(id_producto,id_deposito,id_proveedor,cant_disp,comentario,last_user,last_modif)\r\n \t values($id_prod,$id_dep,$id_prov,$cantidad,'$obs','\".$_ses_user['login'].\"','$fecha_modif')\";\r\n\r\n \t}\r\n \telse\r\n \t{\r\n \t $sql=\"update stock set \";\r\n\t $sql.=\"cant_disp=cant_disp+$cantidad,\";\r\n\t $sql.=\" comentario='$obs' \";\r\n\t $sql.=\" where \";\r\n\t $sql.=\"id_producto=$id_prod \";\r\n\t $sql.=\" AND id_deposito=$id_dep \";\r\n\t $sql.=\" AND id_proveedor=$id_prov\";\r\n\r\n \t}\r\n\r\n\t sql($sql) or fin_pagina();\r\n\r\n\t //registramos en el historial el incremento de stock\r\n $query=\"select nextval('control_stock_id_control_stock_seq') as id_control_stock\";\r\n $id_control_stock=sql($query) or fin_pagina();\r\n\r\n $fecha_modif=date(\"Y-m-d H:i:s\",mktime());\r\n $query=\"insert into control_stock(id_control_stock,fecha_modif,usuario,comentario,estado)\r\n values(\".$id_control_stock->fields['id_control_stock'].\",'$fecha_modif','Orden de Compra Nº $nro_orden','Incremento generado por la Orden de Compra Nº $nro_orden','is')\";\r\n sql($query) or fin_pagina();\r\n\r\n //Insertamos en la tabla info_rma los datos correspondientes\r\n\t //a la orden de compra y demas datos necesarios\r\n\t $query=\"select nextval('info_rma_id_info_rma_seq')as id_info_rma\";\r\n\t $id_info=sql($query) or fin_pagina();\r\n\t $id_info_rma=$id_info->fields['id_info_rma'];\r\n\r\n\t /////////////////////////////////Broggi//////////////////////////////////////////////////////////////////////\r\n\t //////////////////////TRAIGO EL IDE DE LA UBICACION EN TRANSITO//////////////////////////////////////////////\r\n\t $sql_tran=\"select id_ubicacion from stock.ubicacion where lugar='Tránsito'\";\r\n\t $resul_tran=sql($sql_tran,\"error al traer el id_ubicacion\") or fin_pagina();\r\n\t $id_ubicacion=$resul_tran->fields['id_ubicacion'];\r\n\t /////////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n\t $query=\"insert into info_rma(id_info_rma,id_deposito,id_producto,id_proveedor,id_ubicacion,nro_ordenc,nro_ordenp,nrocaso,cantidad)\r\n\t values ($id_info_rma,$id_dep,$id_prod,$id_prov,$id_ubicacion,$nro_orden,$ordprod,$nrocaso,$cantidad)\";\r\n sql($query) or fin_pagina();\r\n\r\n\t $query=\"insert into descuento (id_deposito,id_producto,id_proveedor,id_control_stock,cant_desc,id_info_rma)\r\n\t values($id_dep,$id_prod,$id_prov,\".$id_control_stock->fields['id_control_stock'].\",$cantidad,$id_info_rma)\";\r\n\t sql($query) or fin_pagina();\r\n\r\n\t $query=\"insert into log_stock(id_control_stock,usuario,fecha,tipo)\r\n\t values (\".$id_control_stock->fields['id_control_stock'].\",'\".$_ses_user['name'].\"','$fecha_modif','Incremento por Orden de Compra Nº $nro_orden')\";\r\n\t sql($query) or fin_pagina();\r\n\r\n\r\n\r\n }//de if($cantidad!=\"\" && $cantidad>0)\r\n\r\n }//de for($i=0;$i<$items_rma['cantidad'];$i++)\r\n\r\n $db->CompleteTrans();\r\n}", "title": "" }, { "docid": "6ee48ef17fd3036778036f40a08af3f8", "score": "0.6024488", "text": "function borrar_rma_x_anular_oc($nro_orden){\r\n\t\r\n global $db;\r\n $query=\"select id_info_rma,id_deposito,id_producto,id_proveedor,cantidad\r\n from info_rma\r\n where nro_ordenc=$nro_orden\";\r\n $datos_rma=sql($query,\"<br>Error al traer datos de RMA a borrar<br>\") or fin_pagina();\r\n\r\n while (!$datos_rma->EOF)\r\n {\r\n \t$id_info_rma=$datos_rma->fields[\"id_info_rma\"];\r\n \t$id_producto=$datos_rma->fields[\"id_producto\"];\r\n \t$id_proveedor=$datos_rma->fields[\"id_proveedor\"];\r\n \t$id_deposito=$datos_rma->fields[\"id_deposito\"];\r\n \t$cantidad=$datos_rma->fields[\"cantidad\"];\r\n\r\n //borramos los datos de las tablas relacionadas directamente con info_rma\r\n //log_cambio_prod\r\n $query=\"delete from log_cambio_prod where id_info_rma=$id_info_rma\";\r\n sql($query,\"<br>Error al eliminar de log de cambio de producto<br>\") or fin_pagina();\r\n //log_ubicacion\r\n $query=\"delete from log_ubicacion where id_info_rma=$id_info_rma\";\r\n sql($query,\"<br>Error al eliminar del log de ubicacion<br>\") or fin_pagina();\r\n //archivos_subidos\r\n $query=\"delete from archivos_subidos where id_info_rma=$id_info_rma\";\r\n sql($query,\"<br>Error al eliminar de los archivos subidos<br>\") or fin_pagina();\r\n\r\n //borramos de la tabla info_rma la entrada correspondiente\r\n $query=\"delete from info_rma where id_info_rma=$id_info_rma\";\r\n sql($query,\"<br>Error al eliminar la informacion de RMA<br>\") or fin_pagina();\r\n\r\n //descontamos la cantidad que se habia insertado en la tabla stock y generamos el correspondiente descuento en la tabla\r\n //stock\r\n $query=\"update stock set cant_disp=cant_disp-$cantidad\r\n where id_deposito=$id_deposito and id_producto=$id_producto and id_proveedor=$id_proveedor\";\r\n\r\n //control_stock, descuento y log_stock\r\n //obtenemos el id_control_stock para poder eliminar las entradas en estas 3 tablas\r\n $query=\"select id_control_stock from descuento where id_info_rma=$id_info_rma\";\r\n $control_stock=sql($query,\"<br>Error al traer el id de control de stock<br>\") or fin_pagina();\r\n $id_control_stock=$control_stock->fields[\"id_control_stock\"];\r\n\r\n //log_stock\r\n $query=\"delete from log_stock where id_control_stock=$id_control_stock\";\r\n sql($query,\"<br>Error al eliminar del log de stock<br>\") or fin_pagina();\r\n //descuento\r\n $query=\"delete from descuento where id_control_stock=$id_control_stock\";\r\n sql($query,\"<br>Error al eliminar de los descuentos de stock<br>\") or fin_pagina();\r\n //control_stock\r\n $query=\"delete from control_stock where id_control_stock=$id_control_stock\";\r\n sql($query,\"<br>Error al eliminar del control de stock<br>\") or fin_pagina();\r\n\r\n $datos_rma->MoveNext();\r\n }//de while(!$datos_rma->EOF)\r\n\r\n $db->CompleteTrans();\r\n\r\n}", "title": "" }, { "docid": "ecfc057c5bae5120f524d30bd9ba1dba", "score": "0.5932772", "text": "public function AddStockArt($idarticulo,$disp,$tipo,$iddeposito,$cantidad,$valor)\r\n {\r\n $num_elementos=0;\r\n $sw=true;\r\n\r\n while ($num_elementos < count($idarticulo)) \r\n {\r\n switch ($disp[$num_elementos]) {\r\n \r\n case 'null':\r\n if ($tipo[$num_elementos]!='Servicio') {\r\n \r\n $sql_detalle =\"INSERT INTO tbstock(idarticulo,iddeposito,cantidad) \r\n SELECT '$idarticulo[$num_elementos]','$iddeposito[$num_elementos]',($cantidad[$num_elementos]*$valor[$num_elementos])\r\n FROM DUAL WHERE NOT EXISTS (SELECT idarticulo,iddeposito FROM tbstock \r\n WHERE idarticulo='$idarticulo[$num_elementos]' AND iddeposito='$iddeposito[$num_elementos]')\";\r\n ejecutarConsulta($sql_detalle) or $sw = false;\r\n }\r\n $num_elementos=$num_elementos + 1;\r\n break;\r\n \r\n default:\r\n $sql_detalle =\"UPDATE tbstock SET\r\n cantidad=cantidad +('$cantidad[$num_elementos]'*'$valor[$num_elementos]')\r\n WHERE idarticulo='$idarticulo[$num_elementos]' AND iddeposito='$iddeposito[$num_elementos]'\r\n AND (SELECT tipo FROM tbarticulo WHERE idarticulo='$idarticulo[$num_elementos]')<>'Servicio'\";\r\n ejecutarConsulta($sql_detalle) or $sw = false;\r\n $num_elementos=$num_elementos + 1;\r\n break;\r\n }\r\n }\r\n return $sw;\r\n }", "title": "" }, { "docid": "27e05db9f20278b5ee94a38bbdc6231a", "score": "0.5892041", "text": "static public function ctrAgregarProductosReceta(){\r\n\t\r\n\t\tif (isset($_POST[\"idProductoCrearReceta\"])&&\r\n\t\t\tisset($_POST[\"idReceta\"])&&\r\n\t\t\tisset($_POST[\"unidadesNecesariasCrearReceta\"])){\r\n\r\n\t\t\t\t#Crea el Array de PRODUCTO por receta\r\n\t\t\t\t\t$longitud2=count( $_POST[\"idProductoCrearReceta\"]);\t\r\n\t\t\t\t\t$datos4= array(\t'idProducto_'\t\t=> $_POST[\"idProductoCrearReceta\"],\r\n\t\t\t\t\t\t\t\t\t'idReceta_'\t\t\t=>array_fill(0,$longitud2,$_POST[\"idReceta\"]),\r\n\t\t\t\t\t\t\t\t\t'unidadesNecesarias_'=> $_POST[\"unidadesNecesariasCrearReceta\"]);\r\n\r\n\t\t\t\t\t$respuesta=ModeloFormularios::mdlEliminarProductosReceta($_POST[\"idReceta\"]);\r\n\r\n\t\t\t\t#Recorre el Array de PRODUCTO agregandolos en la BD\r\n\t\t\t\t\tfor ($i=0; $i <$longitud2 ; $i++) { \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$datos5= array_column($datos4,$i);\r\n\t\t\t\t\t\t$respuesta=ModeloFormularios::mdlAltaProductosReceta($datos5);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t#Si no dio error sigue el loop\r\n\t\t\t\t\t\tif ($respuesta != \"OK\") { return $respuesta;}\r\n\t\t\t\t\t} #exit for OK\r\n\r\n\t\t\treturn $respuesta;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "52e9beb8d59e33cd72a1279e76b6bd82", "score": "0.586979", "text": "static public function ctrMovCarneAltaOP($carnesOP,$idOrdenProd){\r\n\r\n\t\t$longitud=count($carnesOP['idCarnes']);\r\n\t\t#Con este for navego las carnes que componene a la op\r\n\t\tfor ($z=0; $z <$longitud ; $z++) { \r\n\t\t\r\n\t\t\t$stockCarnes_composicion=ModeloFormularios::mdlComposicionStockCarnes($carnesOP['idCarnes'][$z]);\r\n\r\n\t\t\t$resta=$carnesOP['cantidad'][$z];\r\n\t\t\t\r\n\t\t\tif ($resta>0) {\r\n\t\t\t\t$i=0;\r\n\t\t\t\t#Navego los desposte para descontarle la carne\r\n\t\t\t\twhile ( $resta != 0) {\r\n\r\n\t\t\t\t\t#IF el stock de ese desposte en menor a lo que resta, descuento toda la carne de ese desposte, ELSE solo lo que resta\r\n\t\t\t\t\tif ($resta>$stockCarnes_composicion[$i]['stock']) {\r\n\t\t\t\t\t\t$cantidad=$stockCarnes_composicion[$i]['stock'];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$cantidad=$resta;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t#Armo el array\r\n\t\t\t\t\t\t$datosMC= array(\t'idCarne_'\t\t=> [$stockCarnes_composicion[$i]['id_carne']],\r\n\t\t\t\t\t\t\t\t\t\t\t'idCuenta_'\t\t=> [2], #VariableFIJA!\r\n\t\t\t\t\t\t\t\t\t\t\t'idDesposte_'\t=> [$stockCarnes_composicion[$i]['id_desposte']],\r\n\t\t\t\t\t\t\t\t\t\t\t'cantidad_'\t\t=> [$cantidad],\r\n\t\t\t\t\t\t\t\t\t\t\t'idOrenProd_'\t=> [$idOrdenProd],\r\n\t\t\t\t\t\t\t\t\t\t\t'idDecomiso_'\t=> [null],\r\n\t\t\t\t\t\t\t\t\t\t\t'idAjusteStock_'=> [null],\r\n\t\t\t\t\t\t\t\t\t\t\t'idUsuario_'\t=> [$_SESSION['userId']],\r\n\t\t\t\t\t\t\t\t\t\t\t'descripcion_'\t=> [null],\r\n\t\t\t\t\t\t\t\t\t\t\t'funcion_'\t\t=> ['OrdenProd']);\r\n\r\n\t\t\t\t\t\t#Agregar el registro en la BD\r\n\t\t\t\t\t\t$respuesta=ModeloFormularios::mdlMovimientoCarne(array_column($datosMC,0));\r\n\t\t\t\t\t\tif ($respuesta != \"OK\") { return $respuesta;}\r\n\r\n\t\t\t\t\t#A lo que falta repartir le resto la cantidad del desposte anterior\r\n\t\t\t\t\t$resta=$resta-$cantidad;\r\n\t\t\t\t\t$i++;#siguiente desposte\r\n\r\n\t\t\t\t}#cierra el while de despostes\r\n\t\t\t}#Cierra el if\r\n\t\t}#cierra el for de carnes\r\n\r\n\treturn \"OK\";\r\n\t}", "title": "" }, { "docid": "d28f38385d533133f7175ae5d96bc6f8", "score": "0.5787117", "text": "static public function ctrFinOPAjusteInsumoProductos($id_OrdenProd){\r\n\r\n\t#1)tomar el valor de la id_orden_alta\r\n\t#$id_OrdenProd=1;\r\n#2)Ir a buscar a la vista \"v_productos_op_1_esperado\" el ajuste de stock \r\n\t$productosTabla=ModeloFormularios::mdlDiferenciaOPProductos($id_OrdenProd);\t\r\n#3)genero un array al cual debero recorrer\r\n\t$longitud=count($productosTabla);\r\n#4)recorrer el array con la lista de producto\r\n\tfor ($i=0; $i <$longitud ; $i++) { \r\n\t\t#Si el ejuste es != a 0, caso contrario no tiene sentido\r\n\t\tif ($productosTabla[$i]['ajuste'] !== 0){\r\n\t\t\t#5)Armar el array para ajustar los insumos por el producto\r\n\t\t\t$datos1 = array('ajuste_' \t\t=>$productosTabla[$i]['ajuste'],\r\n\t\t\t\t\t\t\t'idUsuario_'\t=>$_SESSION['userId'],\r\n\t\t\t\t\t\t\t'idOrdenFin_'\t=>$productosTabla[$i]['id_orden_fin'],\r\n\t\t\t\t\t\t\t'idProducto_'\t=>$productosTabla[$i]['id_producto']);\r\n\t\t\t#6)EL siguiente procedure busca los insumos de los products y hace el ajsute que sea necesario.\r\n\t\t\t$ajusteProducto=ModeloFormularios::mdlAjustarInsumosOPxProducto($datos1);\r\n\t\t\tif ($ajusteProducto!=\"OK\") {return $ajusteProducto;}\r\n\t\t}\r\n\t}\r\nreturn $ajusteProducto;\r\n/*\r\nIMPORTANTE:\r\n-Modificar la vista InsumosXop, debe incluir el ajuste de la op finalizada\r\n-Al anular la finalización de OP debe hacerse el contraasiente de movimiento de insumos del ajuste de los productos.\r\n*/\r\n\r\n\r\n\r\n\t}", "title": "" }, { "docid": "a15ced0fdbac0976d43704502c056e86", "score": "0.5710593", "text": "static public function ctrCrearCompra(){\n \n if(isset($_POST[\"nuevaCompra\"])){\n\n /*=====================================\n ACTUALIZAR LAS VENTAS DEL PROVEEDOR, AUMENTAR EL STOCK Y AUMENTAR LAS COMPRAS DE LOS PRODUCTOS\n =====================================*/ \n\n $listaProductosC = json_decode($_POST[\"listaProductosC\"], true);\n\n $totalProductosVendidos = array();\n\n foreach($listaProductosC as $key => $value){\n\n array_push($totalProductosVendidos, $value[\"cantidad\"]);\n\n $tablaProductos = \"productos\";\n\n $item = \"id\";\n $valor = $value[\"id\"];\n $orden = \"id\";\n\n $traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor, $orden);\n\n $item1a = \"compras\";\n $valor1a = $value[\"cantidad\"] + $traerProducto[\"compras\"];\n\n $nuevasCompras= ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n\n $item1b = \"stock\";\n $valor1b = $value[\"stock\"];\n\n $nuevoStock = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n\n\n }\n\n $tablaProveedores = \"proveedores\";\n\n $item= \"id\";\n $valor= $_POST[\"seleccionarProveedor\"];\n\n $traerProveedor = ModeloProveedores::mdlMostrarProveedores($tablaProveedores, $item, $valor);\n\n $item1a= \"ventas\";\n $valor1a = array_sum($totalProductosVendidos) + $traerProveedor[\"ventas\"];\n\n $ventasProveedor = ModeloProveedores::mdlActualizarProveedor($tablaProveedores, $item1a, $valor1a, $valor);\n\n $item1b= \"ultima_venta\";\n date_default_timezone_set('America/Bogota');\n\n\t\t\t$fecha = date('Y-m-d');\n\t\t\t$hora = date('H:i:s');\n\t\t\t$valor1b = $fecha.' '.$hora;\n\n $fechaProveedor = ModeloProveedores::mdlActualizarProveedor($tablaProveedores, $item1b, $valor1b, $valor);\n \n\n /*=====================================\n GUARDAR LA COMPRA\n =====================================*/ \n\n $tabla = \"compras\";\n // var_dump($tabla);\n\n\n $datos = array(\"id_usuario\"=>$_POST[\"idComprador\"],\n \"id_proveedor\"=>$_POST[\"seleccionarProveedor\"],\n \"codigo\"=>$_POST[\"nuevaCompra\"],\n \"productos\"=>$_POST[\"listaProductosC\"],\n \"impuesto\"=>$_POST[\"nuevoPrecioImpuestoC\"],\n \"neto\"=>$_POST[\"nuevoPrecioNetoC\"],\n \"total\"=>$_POST[\"totalCompra\"],\n \"metodo_pago\"=>$_POST[\"listaMetodoPagoC\"]);\n\n $respuesta = ModeloCompras::mdlIngresarCompra($tabla, $datos);\n\n if($respuesta == \"ok\"){\n\n echo'<script>\n localStorage.removeItem(\"rango\");\n\n swal({\n type: \"success\",\n title: \"La compra ha sido guardada correctamente\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\"\n }).then((result)=>{\n if(result.value){\n window.location = \"compras\";\n }\n })\n </script>';\n }\n \n }\n }", "title": "" }, { "docid": "44e171f95519fc471da4bc6849c5f2aa", "score": "0.57100904", "text": "public function preparaitem($modelodetalle,$modelocompra,$iddesolpe=null) {\n $mensa=\"\";\n if($modelodetalle->isNewRecord){\n $registro=New Docomprat;\n $registro->iddocompra=-1;\n $registro->valorespordefecto();\n $registro->hidguia=$modelocompra->idguia;\n if(!is_null($iddesolpe));\n $registro->iddesolpe=$iddesolpe;\n\n } else {/// sI ES UN REGISTRO EXISTENTE\n ///Verificar si el status de la OC lo permite\n if($modelodetalle->desolpe_solpe->codestado =='10' or $modelodetalle->desolpe_solpe->codestado =='20'){\n ///Clonar el registro a Docomprat;\n $registro=$this->clonaDocomprat($modelodetalle,$iddesolpe);\n return $registro;\n\n } else {\n $mensa.=\" El status de la OC no permite agregar mas items <br>\";\n Return $mensa;\n }\n // $mensa.=\" El status de la OC no permite agregar mas items <br>\";\n }\n }", "title": "" }, { "docid": "af1dc494f66b205030b5264fd30557e1", "score": "0.57081735", "text": "public function AgregarAdescripcion($idinsumo,$cantidad,$nombre,$pm,$subtotal,$medida,$subtotalmedida,$tipomedida,$codigoproducto)\n\t{\n\t\t$bandera=0;\n\t \t//este if nos sirve para verificar que ya existe la sesion de apunta de venta.\n\t\t\n\t\tif(!isset($_SESSION['CarritoProducto']))\n\t\t{\n\t\t\t\t//Si no existe la sesion creamos una\n\t\t\t$this->se->crearSesion('CarritoProducto',null);\n\t\t\t$_SESSION['CarritoProducto'] = array();\n\n\t\t\t$valor=$idinsumo.'|'.$cantidad.\"|\".$nombre.\"|\".$pm.\"|\".$subtotal.\"|\".$medida.\"|\".$subtotalmedida.\"|\".$tipomedida.\"|\".$codigoproducto;\n\n\n\n\t\t\tarray_push($_SESSION['CarritoProducto'],$valor);\n\n\n\n\n\t\t}else{\n\n\t\t\t$val=0;\n\t\t\t\t//Si existe la sesion la recorremos con un ciclo para verificar si el producto que se guardara ya existe\n\n\t\t\tforeach($_SESSION['CarritoProducto'] as $k => $v)\n\t\t\t{ \t\n\n\n\t\t\t\t$producto_valores = explode(\"|\",$v);\n\n\n\t\t\t\t\n\n\t\t\t\tif ($producto_valores[0]==$idinsumo) {\n\n\n\t\t\t\t\t$sub=(float)$producto_valores[4]+$subtotal;\n\n\t\t\t\t\t$cant=$producto_valores[1]+$cantidad;\n\t\t\t\t\t$subtotalme=$subtotalmedida+$producto_valores[6];\n\n\t\t\t\t\t$med =$medida;\n\n\t\t\t\t\t$valor=$idinsumo.'|'.$cant.\"|\".$nombre.\"|\".$pm.\"|\".$sub.\"|\".$med.\"|\".$subtotalme.\"|\".$tipomedida.\"|\".$codigoproducto;\n\n\n\n\t\t\t\t\t\t\t//$_SESSION['CarritoProducto'][$k] = $cadena;\n\t\t\t\t\t$_SESSION['CarritoProducto'][$val]=$valor;\n\n\t\t\t\t\t\t\t//echo $_SESSION['CarritoProducto'][$k];\n\t\t\t\t\t$bandera=1;\n\t\t\t\t\t\n\n\n\t\t\t\t}\n\t\t\t\t$val++;\n\n\t\t\t\t} //TERMINA EL FOREACH\n\n\n\t\t\t\tif ($bandera==0) {\n\t\t\t\t\t\n\n\n\t\t\t\t\t$valor =$idinsumo.'|'.$cantidad.\"|\".$nombre.\"|\".$pm.\"|\".$subtotal.\"|\".$medida.\"|\".$subtotalmedida.\"|\".$tipomedida.\"|\".$codigoproducto;\n\t\t\t\t\tarray_push($_SESSION['CarritoProducto'],$valor);\n\t\t\t\t\t\n\n\n\t\t\t\t}\n\n\n\n\t\t\t\t\n\t\t\t} //TERMINA EL ELSE\n\n\t\t\t\n\t }", "title": "" }, { "docid": "82419febbd66a1cc940f2b64667c9ebb", "score": "0.57068306", "text": "public function Caramart_Almregpro() {\n $this->c = new Criteria();\n // $this->c->addAscendingOrderByColumn(CaramartPeer::RAMART);\n\n $this->columnas = array(\n CaramartPeer :: NOMRAM => 'Descripción',\n CaramartPeer :: RAMART => 'Código',\n );\n }", "title": "" }, { "docid": "b328b0e0699f0a4aac788945f46048b5", "score": "0.57037103", "text": "public function temporalizacion_productos($prod_id){\n $producto = $this->model_producto->get_producto_id($prod_id);\n $prod_prog= $this->model_producto->producto_programado($prod_id,$this->gestion);//// Temporalidad Programado\n $prod_ejec= $this->model_producto->producto_ejecutado($prod_id,$this->gestion); //// Temporalidad ejecutado\n\n $mp[1]='enero';\n $mp[2]='febrero';\n $mp[3]='marzo';\n $mp[4]='abril';\n $mp[5]='mayo';\n $mp[6]='junio';\n $mp[7]='julio';\n $mp[8]='agosto';\n $mp[9]='septiembre';\n $mp[10]='octubre';\n $mp[11]='noviembre';\n $mp[12]='diciembre';\n\n for ($i=1; $i <=12 ; $i++) { \n $matriz[1][$i]=0; /// Programado\n $matriz[2][$i]=0; /// Programado Acumulado\n $matriz[3][$i]=0; /// Programado Acumulado %\n $matriz[4][$i]=0; /// Ejecutado\n $matriz[5][$i]=0; /// Ejecutado Acumulado\n $matriz[6][$i]=0; /// Ejecutado Acumulado %\n $matriz[7][$i]=0; /// Eficacia\n }\n \n $pa=0; $ea=0;\n if(count($prod_prog)!=0){\n for ($i=1; $i <=12 ; $i++) { \n $matriz[1][$i]=$prod_prog[0][$mp[$i]];\n $pa=$pa+$prod_prog[0][$mp[$i]];\n\n if($producto[0]['mt_id']==3){\n $matriz[2][$i]=$pa;\n }\n else{\n $matriz[2][$i]=$matriz[1][$i];\n }\n\n \n if($producto[0]['prod_meta']!=0){\n if($producto[0]['tp_id']==1){\n $matriz[3][$i]=round(((($matriz[2][$i]+$producto[0]['prod_linea_base'])/$producto[0]['prod_meta'])*100),2);\n }\n else{\n $matriz[3][$i]=round((($matriz[2][$i]/$producto[0]['prod_meta'])*100),2);\n }\n \n }\n }\n }\n\n if(count($prod_ejec)!=0){\n for ($i=1; $i <=12 ; $i++) { \n $matriz[4][$i]=$prod_ejec[0][$mp[$i]];\n\n if($producto[0]['mt_id']==3){\n $ea=$ea+$prod_ejec[0][$mp[$i]];\n }\n else{\n $ea=$matriz[4][$i];\n }\n\n $matriz[5][$i]=$ea;\n if($producto[0]['prod_meta']!=0){\n if($producto[0]['tp_id']==1){\n $matriz[6][$i]=round(((($matriz[5][$i]+$producto[0]['prod_linea_base'])/$producto[0]['prod_meta'])*100),2);\n }\n else{\n $matriz[6][$i]=round((($matriz[5][$i]/$producto[0]['prod_meta'])*100),2);\n }\n \n }\n\n if($matriz[2][$i]!=0){\n $matriz[7][$i]=round((($matriz[5][$i]/$matriz[2][$i])*100),2); \n }\n \n }\n }\n \n return $matriz;\n }", "title": "" }, { "docid": "b328b0e0699f0a4aac788945f46048b5", "score": "0.57037103", "text": "public function temporalizacion_productos($prod_id){\n $producto = $this->model_producto->get_producto_id($prod_id);\n $prod_prog= $this->model_producto->producto_programado($prod_id,$this->gestion);//// Temporalidad Programado\n $prod_ejec= $this->model_producto->producto_ejecutado($prod_id,$this->gestion); //// Temporalidad ejecutado\n\n $mp[1]='enero';\n $mp[2]='febrero';\n $mp[3]='marzo';\n $mp[4]='abril';\n $mp[5]='mayo';\n $mp[6]='junio';\n $mp[7]='julio';\n $mp[8]='agosto';\n $mp[9]='septiembre';\n $mp[10]='octubre';\n $mp[11]='noviembre';\n $mp[12]='diciembre';\n\n for ($i=1; $i <=12 ; $i++) { \n $matriz[1][$i]=0; /// Programado\n $matriz[2][$i]=0; /// Programado Acumulado\n $matriz[3][$i]=0; /// Programado Acumulado %\n $matriz[4][$i]=0; /// Ejecutado\n $matriz[5][$i]=0; /// Ejecutado Acumulado\n $matriz[6][$i]=0; /// Ejecutado Acumulado %\n $matriz[7][$i]=0; /// Eficacia\n }\n \n $pa=0; $ea=0;\n if(count($prod_prog)!=0){\n for ($i=1; $i <=12 ; $i++) { \n $matriz[1][$i]=$prod_prog[0][$mp[$i]];\n $pa=$pa+$prod_prog[0][$mp[$i]];\n\n if($producto[0]['mt_id']==3){\n $matriz[2][$i]=$pa;\n }\n else{\n $matriz[2][$i]=$matriz[1][$i];\n }\n\n \n if($producto[0]['prod_meta']!=0){\n if($producto[0]['tp_id']==1){\n $matriz[3][$i]=round(((($matriz[2][$i]+$producto[0]['prod_linea_base'])/$producto[0]['prod_meta'])*100),2);\n }\n else{\n $matriz[3][$i]=round((($matriz[2][$i]/$producto[0]['prod_meta'])*100),2);\n }\n \n }\n }\n }\n\n if(count($prod_ejec)!=0){\n for ($i=1; $i <=12 ; $i++) { \n $matriz[4][$i]=$prod_ejec[0][$mp[$i]];\n\n if($producto[0]['mt_id']==3){\n $ea=$ea+$prod_ejec[0][$mp[$i]];\n }\n else{\n $ea=$matriz[4][$i];\n }\n\n $matriz[5][$i]=$ea;\n if($producto[0]['prod_meta']!=0){\n if($producto[0]['tp_id']==1){\n $matriz[6][$i]=round(((($matriz[5][$i]+$producto[0]['prod_linea_base'])/$producto[0]['prod_meta'])*100),2);\n }\n else{\n $matriz[6][$i]=round((($matriz[5][$i]/$producto[0]['prod_meta'])*100),2);\n }\n \n }\n\n if($matriz[2][$i]!=0){\n $matriz[7][$i]=round((($matriz[5][$i]/$matriz[2][$i])*100),2); \n }\n \n }\n }\n \n return $matriz;\n }", "title": "" }, { "docid": "f73fb3968da52337c156a2317798f3aa", "score": "0.56925327", "text": "function a_stock_produccion($nro_orden,$id_licitacion,$id_producto,$id_proveedor,$cant,$id_fila)\r\n{global $db,$_ses_user;\r\n\r\n $db->StartTrans();\r\n\r\n $fecha_modif=date(\"Y-m-d H:i:s\",mktime());\r\n $comentario=\"Incremento generado al agregar los productos a Stock de Producción, mediante la Orden de Compra Nº $nro_orden\";\r\n\r\n\r\n //traemos el id del deposito de Produccion\r\n $query=\"select id_deposito from depositos where nombre='Produccion'\";\r\n $dep_prod=sql($query,\"<br>Error al traer el id del deposito de Produccion<br>\") or fin_pagina();\r\n $id_deposito=$dep_prod->fields[\"id_deposito\"];\r\n\r\n //revisamos si el producto-proveedor ya tiene una entrada para esta licitacion y esta OC, dentro de la tabla en_produccion\r\n $query=\"select id_en_produccion from en_produccion\r\n where id_licitacion=$id_licitacion and nro_orden=$nro_orden and id_producto=$id_producto and id_proveedor=$id_proveedor\";\r\n $actualizar_entrada=sql($query,\"<br>Error al revisar si existe entrada para el producto<br>\") or fin_pagina();\r\n\r\n //si existe entrada de antes (se entrego una parte antes y ahora el resto, actualizamos dicha entrada\r\n //die(\"AAA\".$actualizar_entrada->fields[\"id_en_produccion\"]);\r\n if($actualizar_entrada->fields[\"id_en_produccion\"]!=\"\")\r\n {\r\n $id_en_produccion=$actualizar_entrada->fields[\"id_en_produccion\"];\r\n\r\n //como existe entrada en la tabla en_produccion, es claro que existe tambien la correspondiente entrada en stock\r\n $query=\"update stock set cant_disp=cant_disp+$cant, comentario='$comentario'\r\n\t where id_producto=$id_producto AND id_deposito=$id_deposito AND id_proveedor=$id_proveedor\";\r\n sql($query,\"<br>Error al actualizar el stock de produccion<br>\") or fin_pagina();\r\n\r\n //actualizamos la cantidad en la correspondiente entrada en la tabla en_produccion\r\n $query=\"update en_produccion set cantidad=cantidad+$cant\r\n where id_en_produccion=$id_en_produccion\";\r\n sql($query,\"<br>Error al actualizar la tabla en produccion<br>\") or fin_pagina();\r\n\r\n }//de if($actualizar_entrada->[\"id_en_produccion\"]!=\"\")\r\n else//sino, creamos una nueva entrada, para la tabla en_produccion\r\n {\r\n //insertamos precio si no existe con este proveedor\r\n $sql=\"select id_producto from precios where id_producto=$id_producto and id_proveedor=$id_proveedor \";\r\n $result=sql($sql,\"<br>Error al buscar el precio para stock de produccion<br>\") or fin_pagina();\r\n $cant_precios=$result->RecordCount();\r\n if($cant_precios==0)\r\n {\r\n \t//traemos el precio de la fila\r\n \t$query=\"select precio_unitario from fila where id_fila=$id_fila\";\r\n \t$precio=sql($query,\"<br>Error al traer el precio de la fila<br>\") or fin_pagina();\r\n\r\n\tinsertar_precio($id_producto,$id_proveedor,$precio->fields[\"precio_unitario\"],0);\r\n }\r\n\r\n //revisamos si esta la entrada para ese producto, proveedor, deposito, en el stock.\r\n $query=\"select count(*)as cuenta from stock\r\n where id_producto=$id_producto and id_deposito=$id_deposito and id_proveedor=$id_proveedor\";\r\n $esta=sql($query,\"<br>Error al revisar si existe la entrada en la tabla stock<br>\") or fin_pagina();\r\n\r\n if($esta->fields[\"cuenta\"]==0)\r\n {//insertamos la nueva entrada en la tabla stock, si no existe\r\n $query=\"insert into stock(id_producto,id_deposito,id_proveedor,cant_disp,comentario,last_user,last_modif)\r\n \tvalues($id_producto,$id_deposito,$id_proveedor,$cant,'$comentario','\".$_ses_user['login'].\"','$fecha_modif')\";\r\n sql($query,\"<br>Error al insertar el stock de produccion<br>\") or fin_pagina();\r\n }\r\n else\r\n {\r\n //como existe entrada en la tabla stock, la actualizamos con la cantidad correspondiente\r\n $query=\"update stock set cant_disp=cant_disp+$cant, comentario='$comentario'\r\n\t where id_producto=$id_producto AND id_deposito=$id_deposito AND id_proveedor=$id_proveedor\";\r\n sql($query,\"<br>Error al actualizar el stock de produccion<br>\") or fin_pagina();\r\n }\r\n\r\n //creamos la entrada necesaria en la tabla en_produccion\r\n $query=\"select nextval('en_produccion_id_en_produccion_seq') as id_en_produccion\";\r\n $id_en_prod=sql($query,\"<br>Error al traer la secuencia de en_produccion<br>\") or fin_pagina();\r\n $id_en_produccion=$id_en_prod->fields[\"id_en_produccion\"];\r\n\r\n $query=\"insert into en_produccion(id_en_produccion,nro_orden,id_licitacion,id_deposito,id_producto,id_proveedor,cantidad)\r\n values($id_en_produccion,$nro_orden,$id_licitacion,$id_deposito,$id_producto,$id_proveedor,$cant)\";\r\n\r\n sql($query,\"<br>Error al insetar tabla en Produccion<br>\") or fin_pagina();\r\n\r\n }//del else de if($actualizar_entrada->[\"id_en_produccion\"]!=\"\")\r\n\r\n //finalmente, registramos lo agregado a stock de produccion, en las tablas correspondientes\r\n $query=\"select nextval('control_stock_id_control_stock_seq') as id_control_stock\";\r\n $id_control_stock=sql($query,\"<br>Error al traer la secuencia de control de stock<br>\") or fin_pagina();\r\n\r\n\r\n $query=\"insert into control_stock(id_control_stock,fecha_modif,usuario,comentario,estado)\r\n values(\".$id_control_stock->fields['id_control_stock'].\",'$fecha_modif','\".$_ses_user[\"name\"].\"','$comentario','oc')\";\r\n sql($query,\"<br>Error al insertar en control_stock<br>\") or fin_pagina();\r\n\r\n $query=\"insert into descuento (id_deposito,id_producto,id_proveedor,id_control_stock,cant_desc,id_en_produccion)\r\n values($id_deposito,$id_producto,$id_proveedor,\".$id_control_stock->fields['id_control_stock'].\",$cant,$id_en_produccion)\";\r\n sql($query,\"<br>Error al insertar en descuento<br>\") or fin_pagina();\r\n\r\n $query=\"insert into log_stock(id_control_stock,usuario,fecha,tipo)\r\n values (\".$id_control_stock->fields['id_control_stock'].\",'\".$_ses_user['name'].\"','$fecha_modif','$comentario')\";\r\n sql($query,\"<br>Error al insertar en log_stock<br>\") or fin_pagina();\r\n\r\n\r\n $db->CompleteTrans();\r\n}", "title": "" }, { "docid": "618cfb9b3dbbcfc0c698619289f1a6c7", "score": "0.56762373", "text": "private function agregarAlCarrito($producto)\r\n {\r\n //Agrega al carrito un producto con cantidad inicial 1\r\n $carrito = $this->session->carrito;\r\n //Bandera de modificacion manual\r\n $producto->bandera_precio_manual = false;\r\n //Calculo del precio de venta\r\n $producto->precio_venta = $this->calcularPrecioDeVenta($producto->precio, $producto->incremento);\r\n $producto->cantidad = 1; //Agregar un producto al carrito\r\n $producto->descuento_porcentaje = 0; //Sin descuento inicial\r\n $descuento_calculado = $this->calcularDescuento($producto->precio, $producto->descuento_porcentaje);\r\n //Calculo del subtotal ((PU + incremento)-Descuento)*Cantidad\r\n $producto->total = ($producto->precio_venta - $descuento_calculado)*($producto->cantidad);\r\n array_push($carrito, $producto);\r\n $this->session->set_userdata('carrito', $carrito);\r\n }", "title": "" }, { "docid": "e55a7d49192b71e8b8e33b7a1754c42b", "score": "0.5675523", "text": "public function ordenDeCompraByIdMarca( $idEshop, $fechaDesde, $fechaHasta, $idMarca, $origenStock = false, $exist = false)\n\t{\n\t\t$q = $this->createQuery('ppi')\n \t ->select('ppi.*, pe.*, pe.*, pi.*, pr.*, pt.*, pc.*, m.*, pim.*, s.*')\n \t ->innerJoin('ppi.pedido pe ')\n \t ->innerJoin('ppi.productoItem pi ')\n \t ->innerJoin('pi.producto pr')\n \t ->leftJoin('pr.productoImagen pim')\n \t ->innerJoin('ppi.productoTalle pt')\n \t ->innerJoin('ppi.productoColor pc')\n\t\t\t\t ->leftJoin('ppi.pedidoProductoItemCampana ppic')\n\t\t\t\t ->innerJoin('pr.marca m')\n\t\t\t\t ->innerJoin('ppi.stock s')\n\t\t\t\t ->addWhere('(? <= pe.fecha_pago AND pe.fecha_pago <= ?)', array($fechaDesde, $fechaHasta))\n\t\t\t\t ->addWhere('pe.fecha_baja IS NULL')\n\t\t\t\t ->addWhere('pr.id_marca = ?', array( $idMarca ) )\n\t\t\t\t ->addWhere('ppic.id_campana IS NULL')\n\t\t\t\t ->orderby('pr.denominacion ASC');\n\t\t\n\t if ($origenStock) {\n\t $q->addWhere('s.origen = ?', $origenStock);\n\t }\n\t \n\t if ( $idEshop ) {\n\t $q->addwhere('pe.id_eshop = ?', $idEshop );\n\t } else {\n\t $q->addwhere('pe.id_eshop IS NULL');\n\t }\n\n\t\tif ( $exist ) {\n\t\t return (bool) $q->count();\n\t\t} else {\n\t\t return $q->execute();\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "9a80e5fe1102bd4fcb450df765403fd3", "score": "0.5620284", "text": "public function agregarProducto(Producto $pro){ //grabar producto\n \n $cnx=new ConexionDB();\n $cn=$cnx->getConexion();\n $res=$cn->prepare(\"INSERT into productos VALUES(null,'$pro->des',$pro->pre,\"\n . \"$pro->stock,'$pro->estado','$pro->detalle','$pro->imagen')\");\n $res->execute(); \n }", "title": "" }, { "docid": "192a516ff94921f8cf4920cd7193406e", "score": "0.55851734", "text": "public function agregar_prod( $id_prod) {\n }", "title": "" }, { "docid": "bbdf35115d8ca0f2a87ad453f2a1c77f", "score": "0.55736226", "text": "static public function mdlAlmacen01Agregar($codpro){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT DISTINCT \n\t\t\t\t\t\t\tCodPro AS codpro,\n\t\t\t\t\t\t\tCodFab AS codfab,\n\t\t\t\t\t\t\tDesPro AS despro,\n\t\t\t\t\t\t\tTbCol.Des_Larga AS color,\n\t\t\t\t\t\t\tTbTal.Des_Larga AS talla,\n\t\t\t\t\t\t\tTbUnd.Des_Corta AS unidad,\n\t\t\t\t\t\t\tCodAlm01 AS stock,\n\t\t\t\t\t\t\tpro.cuadro \n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tProducto AS Pro \n\t\t\t\t\t\t\tINNER JOIN Tabla_M_Detalle AS TbUnd \n\t\t\t\t\t\t\tON Pro.UndPro = TbUnd.Cod_Argumento \n\t\t\t\t\t\t\tAND (TbUnd.Cod_Tabla = 'TUND') \n\t\t\t\t\t\t\tINNER JOIN Tabla_M_Detalle AS TbCol \n\t\t\t\t\t\t\tON Pro.ColPro = TbCol.Cod_Argumento \n\t\t\t\t\t\t\tAND (TbCol.Cod_Tabla = 'TCOL') \n\t\t\t\t\t\t\tINNER JOIN Tabla_M_Detalle AS TbTal \n\t\t\t\t\t\t\tON Pro.TalPro = TbTal.Cod_Argumento \n\t\t\t\t\t\t\tAND (TbTal.Cod_Tabla = 'TTAL') \n\t\t\t\t\t\tWHERE Pro.EstPro = '1' \n\t\t\t\t\t\tAND LEFT(pro.fampro, 3) = 'COP' \n\t\t\t\t\t\tAND (\n\t\t\t\t\t\t\tpro.cuadro = '' \n\t\t\t\t\t\t\tOR pro.cuadro IS NULL\n\t\t\t\t\t\t)\");\n\n\t\t$stmt->bindParam(\":codpro\", $codpro, PDO::PARAM_STR);\n\n\t\t$stmt -> execute();\n\n\t\treturn $stmt -> fetchAll();\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\n }", "title": "" }, { "docid": "785eea500dd5547710963bcffdbe776a", "score": "0.5526003", "text": "function autogenerar_remito_interno($nro_orden)\r\n{\r\n global $db, $_ses_user;\r\n $codigos_b=Array();\r\n $db->StartTrans();\r\n //recupero la info de la orden de compra: datos del cliente y\r\n //con la funcion get_items recupero los productos\r\n $q=\"select cliente, fecha_entrega, lugar_entrega, id_fila, descripcion_prod,\r\n id_producto, fila.desc_adic\r\n from compras.orden_de_compra\r\n left join compras.fila using (nro_orden)\r\n where nro_orden=$nro_orden\";\r\n $rq=sql($q, \"Error al traer los datos de la Orden de Compra\") or fin_pagina();\r\n\r\n $nbre=$rq->fields['cliente'];\r\n $dir=$rq->fields['lugar_entrega'];\r\n $fecha_hoy=date(\"Y-m-d H:i:s\",mktime());\r\n $fecha=$rq->fields['fecha_entrega'];\r\n\r\n //recupero el id que se le asignara al remito\r\n $q=\"select nextval('remito_interno_id_remito_seq') as id_remito\";\r\n $id_remito=sql($q) or fin_pagina();\r\n $id_remito=$id_remito->fields['id_remito'];\r\n //echo $id_remito;\r\n\r\n // x ahora los remitos se generan con estado pendiente, pero los\r\n // remitos internos en el listado pueden ser modificados (agregar/editar items),\r\n // para remitos desde ordenes de compra no deben modificarse, xq se generan con las entregas\r\n $campos=\"id_remito, fecha_remito, cliente, direccion, estado, nro_orden \";\r\n $valores=\"$id_remito, '$fecha_hoy', '$nbre', '$dir', 'p', $nro_orden\";\r\n\r\n $q=\"insert into remito_interno ($campos) values ($valores)\";\r\n\r\n if (sql($q, \"Error cuando inserta un remito interno\") or fin_pagina()){\r\n\t\t\t$usuario=$_ses_user['name'];\r\n\t\t\t$q2=\"insert into log_remito_interno (id_remito,tipo_log,usuario,fecha) values ($id_remito,'creacion','$usuario','$fecha_hoy')\";\r\n\t\t\tsql($q2, \"Error cuando inserta un log remito interno\") or fin_pagina();\r\n\t\t\t}\r\n\t else {\r\n\t\t\t$msg=\"NO SE PUDO GUARDAR EL REMITO, YA EXISTE EL NUMERO \\\"$nro_remito\\\" \";\r\n //die (\"aca entro \");\r\n\t\t\theader(\"location: \".encode_link(\"ord_compra_fin.php\",array(\"msg\"=>$msg)));\r\n\t\t\t}\r\n\r\n $filas_cambios_prod=filas_con_cambios_prod($nro_orden);\r\n $items_remito_interno=get_items($nro_orden);\r\n for($i=0;$i<$items_remito_interno['cantidad'];$i++) {\r\n \t$cant=0;\r\n \t$cant_insert_rem=0;\r\n \t$cant_scb=0;\r\n \t$cant_comprados=0;\r\n \t$cant_rec=0;\r\n \t$cant_codigos_b=0;\r\n \t$id_fila=$items_remito_interno[$i][\"id_fila\"];\r\n\r\n \tif($filas_cambios_prod[$id_fila][\"id_producto\"]!=\"\")\r\n \t{\r\n \t $id_producto=$filas_cambios_prod[$id_fila][\"id_producto\"];\r\n \t $descripcion=$filas_cambios_prod[$id_fila][\"desc_gral\"];\r\n \t}\r\n \telse\r\n \t{\r\n \t $id_producto=$items_remito_interno[$i][\"id_producto\"];\r\n \t $descripcion=$items_remito_interno[$i][\"descripcion_prod\"].\" \".$items_remito_interno[$i][\"desc_adic\"];\r\n \t}\r\n\r\n \t// para recuperar cuantas entregas se hicieron sin cb\r\n // consultar en la tabla fila cant_scb_sr\r\n \t$q_cant=\"select id_producto, fila.cantidad as cant_prod, recibidos.cantidad as cant_rec, cant_scb_sr\r\n from compras.fila\r\n left join compras.recibidos using (id_fila)\r\n where nro_orden=$nro_orden and id_fila=$id_fila\";\r\n \t$res_cant=sql($q_cant) or fin_pagina();\r\n \t// var donde voy a guardar cantidades para controlar cuantas\r\n // entergas se hacen con cb y sin cb\r\n $cant_comprados=$res_cant->fields['cant_prod'];\r\n $cant_scb=$res_cant->fields['cant_scb_sr'];\r\n\r\n if ($res_cant->fields['cant_rec']=='')\r\n $cant_rec=0;\r\n else\r\n $cant_rec=$res_cant->fields['cant_rec'];\r\n\r\n \t$q_cb=\"select distinct codigo_barra,tiene_remito\r\n \t from general.codigos_barra\r\n \t join general.log_codigos_barra using (codigo_barra)\r\n where id_producto=$id_producto and tipo ilike '%entregado%'\r\n \t and nro_orden=$nro_orden and tiene_remito=0\";\r\n \t$res_cb=sql($q_cb) or fin_pagina();\r\n \t$cant_codigos_b=$res_cb->recordCount();\r\n \t//$tiene_remito=$res_cb->fileds['tiene_remito'];\r\n\r\n \t// en este arreglo guardo todos los cb para el producto para despues\r\n \t// actualizar el campo tiene_remito\r\n \tfor($j=0;$j<$cant_codigos_b;$j++){\r\n \t\t$codigos_b[$j]['cb']=$res_cb->fields['codigo_barra'];\r\n \t\t$codigos_b[$j]['tr']=$res_cb->fields['tiene_remito'];\r\n \t\tif ($codigos_b[$j]['tr']==0) $cant_insert_rem++;\r\n \t\t$res_cb->MoveNext();\r\n \t\t}\r\n\r\n $descripcion.= \"\\nCódigos de Barra: \";\r\n\r\n\r\n //if ($cant_rec>=$cant_codigos_b)\r\n // $cant_scb=$cant_rec-$cant_codigos_b;\r\n\r\n $cant=$cant_insert_rem+$cant_scb;\r\n\r\n for ($a=0;$a<$cant_scb;$a++)\r\n \t$descripcion.=\"Entregado sin código de Barra - \";\r\n\r\n $res_cb->Move(0);\r\n while (!$res_cb->EOF){\r\n \t $descripcion.=$res_cb->fields['codigo_barra'].\" - \";\r\n $res_cb->MoveNext();\r\n }\r\n\r\n if ($cant_rec!=0 && $cant!=0) {\r\n\r\n $cantidad=$items_remito_interno[$i][\"cantidad\"];\r\n $q=\"select nextval('items_remito_interno_id_item_seq') as id_item\";\r\n $id_item=sql($query) or fin_pagina();\r\n $id_item=$id_item->fields['id_item'];\r\n\r\n $query=\"insert into items_remito_interno(id_item, cant_prod, descripcion, id_remito, id_producto)\r\n values($id_item, $cant,'$descripcion', $id_remito, $id_producto)\";\r\n sql($query, \"Error al insertar los items del remito interno\") or fin_pagina();\r\n for($k=0;$k<$cant_codigos_b;$k++){\r\n $query=\"update log_codigos_barra set tiene_remito=1\r\n where nro_orden=$nro_orden and codigo_barra='\".$codigos_b[$k]['cb'].\"'\";\r\n //$query.=\" and tiene_remito=0\";\r\n sql($query, \"Error al actualizar los logs del remito interno\") or fin_pagina();\r\n } // fin for($k=0;$k<$cant_codigos;$k++)\r\n $scb_sr=\"update compras.fila set cant_scb_sr=0 where id_fila=$id_fila\";\r\n sql($scb_sr, \"Error al actualizar cantidad de entregas sin cb y sin remitos internos\") or fin_pagina();\r\n } // fin fi de cant_rec\r\n } // fin for($i=0;$i<$items_remito_interno['cantidad'];$i++)\r\n\r\n $db->CompleteTrans();\r\n $nro_remito_interno=$id_remito;\r\n return $nro_remito_interno;\r\n}", "title": "" }, { "docid": "85202eb55b3b8f325c7e101c4d8fe13a", "score": "0.55033064", "text": "function satxarre($nufa,$addenda=\"\") {\r\n// {{{ carga librerias requeridas para obtener los datos\r\n#require_once(\"dbi/clfactur.class.php\"); // Es el registro maestro de la factura\r\n#require_once(\"dbi/clflinea.class.php\"); // Regisro por partida de la factura\r\n#require_once(\"dbi/clcadena.class.php\"); // Cadenas\r\n#require_once(\"dbi/clclient.class.php\"); // Clientes\r\n#require_once(\"lib/cn_envio_bodega.php\"); // Lista de clientes 'nuestros'\r\n#require_once(\"lib/cn_envio_export.php\"); // Bodegas nuestras extranjero\r\n#require_once(\"lib/getrefe.php\"); \r\n#$require_once(\"lib/fmtfech.php\"); // Cambia de dmy a ymd\r\nglobal $conn; // Conexion adodb a la base de datos\r\n// }}}\r\n// {{{ Inicialice varibles / contadores globales\r\n//error_reporting(E_ALL);\r\nerror_reporting(E_ALL ^ E_NOTICE);\r\n/* Lectura de tablas de la base de datos */\r\n// Facturas\r\n#$fact = new Clfactur($conn,$nufa,'renglon'); // datos de la factura\r\n// Lineas de la factura, un renglon por producto facturado\r\n#$fali = new Clflinea($conn, $nufa); #datos del cliente, nombre\r\n// Archivo maestro de clientes\r\n#$clie = new Clclient($conn,(int)$fact->row['factnucl'],'renglon'); #datos del cliente, domicilio\r\n// Catalogo de cadenas (Domicilio fiscal de Soriana, walmart, etc)\r\n#$cade = new Clcadena($conn,(int)$clie->row['clienuca'],'renglon');# \r\n$arr = array();\r\n// }}}\r\n// {{{ Encabezados generales \r\n$arr['folio'] = substr($nufa,4); \r\n$arr['fecha'] = str_replace(array('-',' ',':'),'',fix_fdoc_arre($fact->row[\"factfdoc\"])); // seleciono la fecha de la factura, desde la base de datos.\r\n$arr['serie'] = substr($nufa,0,4);\r\n// \r\n// +---------------------------------------------------------------------------+\r\n// | $arr['noAprobacion'] \r\n// | $arr['anoAprobacion'] \r\n// | $arr['noCertificado'] \r\n//require \"satxfoli.inc.php\"; \r\n// +---------------------------------------------------------------------------+\r\n// \r\n\r\n//subtotal de la factura = 500\r\n$x_subtotal = 1680.00;\r\n$x_total = 2000.00;\r\n\r\n#$arr['subTotal'] = $fact->row[\"factneto\"]+$fact->row['factnet2']; // Antes de impuestos.. se cambio por constante\r\n$arr['subTotal'] = $x_subtotal;\r\n//$arr['subTotal'] = $fact->row[\"factimpa\"]+$fact->row['factimp2']; // Antes de impuestos\r\n//$arr['descuento'] = $fact->row[\"factdecl\"]+$fact->row['factdec2']; // prueba\r\n#$arr['total'] = $fact->row[\"factimto\"]; // Despues de impuestos // se cambio por constante\r\n$arr['total'] = $x_total ; // Despues de impuestos\r\n$arr['metodoDePago'] = \"NO IDENTIFICADO\";\r\n#$nuca = $fact->row[\"factnuca\"]; // se cambio por constante\r\n$x_medio_pago = 4;\r\n$nuca = $x_medio_pago ; \r\nif ( /*cn_envio_bodega*/($fact->row[\"factnucl\"]) && \r\n /*!cn_envio_export*/($fact->row[\"factnucl\"])) {\r\n #\r\n # Trasalado entre nuestras bodegas\r\n #\r\n $arr['tipoDeComprobante'] = \"traslado\";\r\n $orig = trim($conn->GetOne(\"Select bodenomb from clbodega WHERE bodenubo = \".$fact->row[\"factnubo\"]));\r\n $dest = trim($conn->GetOne(\"Select bodenomb from clbodega WHERE bodenucl = \".$fact->row[\"factnucl\"]));\r\n $arr['formaDePago'] = \"ESTE COMPROBANTE SE EXPIDE PARA TRANSPORTAR MERCANCIAS DE NUESTRA PROPIEDAD DE BODEGA $orig A BODEGA $dest\";\r\n} else {\r\n #\r\n # Todas las demas facturas\r\n #\r\n $arr['tipoDeComprobante'] = \"ingreso\";\r\n $arr['formaDePago'] = \"EL PAGO DE ESTA FACTURA (CONTRAPRESTACION) SE EFECTUARA EN UNA SOLA EXHIBICION, SI POR ALGUNA RAZON NO FUERA ASI, EMITIREMOS LOS COMPROBANTES DE LAS PARCIALIDADES RESPECTIVAS\";\r\n}\r\nif ($nuca == 1 || $nuca == 2 || $nuca == 3 || $nuca ==4 ||\r\n $nuca == 5 || $nuca == 6 || $nuca == 7 || $nuca == 8) $arr['formaDePago'] = \"PAGO EN UNA SOLA EXHIBICION\";\r\n \r\n \r\n$arr['condicionesDePago']=\"NO IDENTIFICADO\";\r\n$arr['TipoCambio']=\"1.0\";\r\n$arr['Moneda']=\"MXN\";\r\n#$arr['LugarExpedicion']=trim($fact->row[\"factecol\"]).\" \".trim($fact->row[\"factepob\"]); // se cambio por constante\r\n$arr['LugarExpedicion']= \" SAN ANGEL \".\" \".\"DISTRITO FEDERAL\";\r\n \r\n \r\n \r\n$arr['Emisor']['nombre'] = \"FINANCIERA CREA\";\r\n$arr['Emisor']['rfc'] = \"MCR070419KN2\";\r\n$arr['Emisor']['Regimen'] = \"REGIMEN GENERAL DE LEY DE PERSONAS MORALES\";\r\n/*$arr['Emisor']['ExpedidoEn']['calle'] = $fact->row[\"factedir\"];\r\n$arr['Emisor']['ExpedidoEn']['noExterior'] = $fact->row[\"facteext\"];\r\n$arr['Emisor']['ExpedidoEn']['noInterior'] = $fact->row[\"facteint\"];\r\n$arr['Emisor']['ExpedidoEn']['localidad'] = substr($fact->row[\"factepob\"],6);\r\n$arr['Emisor']['ExpedidoEn']['municipio'] = substr($fact->row[\"factepob\"],6);\r\n$arr['Emisor']['ExpedidoEn']['estado'] = get_estado($fact->row[\"factepob\"]);\r\n$arr['Emisor']['ExpedidoEn']['pais'] = \"MEXICO\";\r\n$arr['Emisor']['ExpedidoEn']['codigoPostal'] = substr($fact->row[\"factepob\"],0,5);*/\r\n\r\n$arr['Emisor']['ExpedidoEn']['calle'] = \"AVENIDA REVOLUCION\";\r\n$arr['Emisor']['ExpedidoEn']['noExterior'] = \"1909\";\r\n$arr['Emisor']['ExpedidoEn']['noInterior'] = \"9\";\r\n$arr['Emisor']['ExpedidoEn']['localidad'] = \"SAN ANGEL\";\r\n$arr['Emisor']['ExpedidoEn']['municipio'] = \"ALVARO OBREGON\";\r\n$arr['Emisor']['ExpedidoEn']['estado'] = \"DISTRITO FEDERAL\";\r\n$arr['Emisor']['ExpedidoEn']['pais'] = \"MEXICO\";\r\n$arr['Emisor']['ExpedidoEn']['codigoPostal'] = \"01000\";\r\n \r\n \r\n#$arr['Receptor']['nombre'] = $fact->row[\"factnopr\"]; \r\n$x_nombre_cliente = \"Zulma Ortiz Anzurez\";\r\n$arr['Receptor']['nombre'] = $x_nombre_cliente;\r\n// Usa tabla ISO8859-2\r\nif ($nuca == 29)\r\n $arr['Receptor']['nombre'] = \"ORGANIZACI\".chr(211).\"N SAHUAYO, S.A. DE C.V.\";\r\n$arr['Receptor']['rfc'] = $fact->row[\"factrfca\"];\r\n \r\nif (strlen(trim($cade->row['cadecall']))) {\r\n $a_edo = $cade->row[\"cadecoes\"];\r\n $a_calle = $cade->row[\"cadecall\"];\r\n $a_noExterior = $cade->row[\"cadenext\"];\r\n $a_noInterior = $cade->row[\"cadenint\"];\r\n $a_colonia = $cade->row[\"cadecolo\"];\r\n $a_localidad = $cade->getPueb(\"cadecoes\",\"cademuni\",\"cadepobl\");\r\n $a_municipio = $cade->getMuni(\"cadecoes\",\"cademuni\");\r\n $a_codigoPostal = str_pad($cade->row[\"cadecodp\"],5,'0',STR_PAD_LEFT);\r\n} else {\r\n /*$a_edo = $fact->row[\"factedoe\"];\r\n $a_calle = $fact->row[\"factcdir\"];\r\n $a_noExterior = $fact->row[\"factnext\"];\r\n $a_noInterior = $fact->row[\"factnint\"];\r\n $a_colonia = $fact->row[\"factccol\"];\r\n\t$a_localidad = $clie->getPueb(\"cliecoes\",\"cliemuni\",\"cliepueb\");\r\n $a_municipio = $clie->getMuni(\"cliecoes\",\"cliemuni\");\r\n $a_codigoPostal = str_pad($fact->row[\"factcodp\"],5,'0',STR_PAD_LEFT);\r\n\t\r\n\t*/ // se cambio a constantes\r\n\t$a_edo = $x_estado_cliente;\r\n $a_calle = $x_calle_cliente;\r\n $a_noExterior = $x_no_ext_cliente;\r\n $a_noInterior = $x_no_int_cliente;\r\n $a_colonia = $x_colonia_cliente;\r\n // 25/10/2011 Para que lo tome de donde debe\r\n // $a_localidad = $fact->row[\"factnpue\"];\r\n // $a_municipio = $fact->row[\"factnpue\"];\r\n $a_localidad = $x_localidad_cliente;\r\n $a_municipio = $x_municipio_cliente;\r\n $a_codigoPostal = $x_codigo_postal_cliente;\r\n\t$edo = \"MORELOS\";\r\n\t$pais = \"MEXICO\";\r\n}\r\n \r\nif ($nuca == 29) $a_edo = $clie->row[\"cliecoes\"];\r\nif ($nuca == 29) $a_municipio = $clie->getPueb(\"cliecoes\",\"cliemuni\",\"cliepueb\");\r\nif ($nuca == 29) $a_colonia = satxarre_fix($fact->row[\"factccol\"],35);\r\n//$edo = trim(getrefe(\"cte\",6,\"CLIECOES\",$a_edo));\r\n//$pais = ($a_edo>40) ? $edo : \"MEXICO\";\r\n$arr['Receptor']['Domicilio']['calle'] = $a_calle;\r\n$arr['Receptor']['Domicilio']['noExterior'] = $a_noExterior;\r\n$arr['Receptor']['Domicilio']['noInterior'] = $a_noInterior;\r\n$arr['Receptor']['Domicilio']['colonia'] = $a_colonia;\r\n$arr['Receptor']['Domicilio']['localidad'] = $a_localidad;\r\n$arr['Receptor']['Domicilio']['municipio'] = $a_municipio;\r\n$arr['Receptor']['Domicilio']['estado'] = $edo;\r\n$arr['Receptor']['Domicilio']['pais'] = $pais;\r\n$arr['Receptor']['Domicilio']['codigoPostal'] = $a_codigoPostal;\r\n// }}}\r\n// {{{ Datos para el esquema de detalllista solo si hace falta\r\n// +--------------------------------------------------------------------+\r\n// | Lee los datos de npec, fpec, gln solo si quieren complemento |\r\n// +--------------------------------------------------------------------+\r\n//\r\nif ($addenda==\"detallista\") {\r\n $arr['Complemento']['npec'] = $fact->row['factnpec'];\r\n $arr['Complemento']['fpec'] = $fact->row['factfpec'];\r\n $arr['Complemento']['gln'] = str_pad($fact->row['factnucl'],13,'0',STR_PAD_LEFT);\r\n}\r\n// }}}\r\n// {{{ Diconsa\r\n// +--------------------------------------------------------------------+\r\n// | Lee los datos de almacen solo si es diconsa |\r\n// +--------------------------------------------------------------------+\r\n//\r\nif ($addenda==\"diconsa\") {\r\n $arr['diconsa']['proveedor'] = 217;\r\n $arr['diconsa']['almacen'] = trim($clie->row['cliesucu']);\r\n $arr['diconsa']['negociacion'] = trim($fact->row['factnpec']);\r\n $arr['diconsa']['pedido'] = 0;\r\n}\r\n// }}}\r\n// {{{ IMSS\r\n// +--------------------------------------------------------------------+\r\n// | Lee los datos de almacen solo si es imss |\r\n// +--------------------------------------------------------------------+\r\n//\r\nif ($addenda==\"imss\") {\r\n $sucu = (int)$clie->row[\"cliezovo\"];\r\n $sucu = str_pad($sucu, 5, \"0\", STR_PAD_LEFT);\r\n $arr['imss']['proveedor'] = \"0000029727\";\r\n $arr['imss']['delegacion'] = $sucu;\r\n $arr['imss']['conceptodocumento'] = \"ORIGINAL\";\r\n $arr['imss']['documento'] = \"FACTURA\";\r\n $arr['imss']['moneda'] = \"MXN\";\r\n $arr['imss']['transaccion'] = \"FACTURACION\";\r\n $arr['imss']['cambio'] = \"1.00\";\r\n $arr['imss']['concepto'] = \"TN\";\r\n $arr['imss']['pedido'] = trim($fact->row['factnpec']);\r\n $arr['imss']['recepcion'] = trim($conn->getone(\"select corenpec from clcorevi where coredocu = '$nufa'\"));\r\n $arr['imss']['serie'] = \"N/A\";\r\n}\r\n// }}}\r\n// {{{ Para cada linea/partida de la factura (para cada producto\r\n// +--------------------------------------------------------------------+\r\n// | AHora si procesa la ocurrencia de productos de la factura |\r\n// +--------------------------------------------------------------------+\r\n//\r\nfor ($i=0; $i<sizeof($fali->faliprod); $i++) {\r\n $cant = $fali->faliunif[$i];\r\n $unid = get_unidad($fali->faliprod[$i]);\r\n $impo = $fali->falineto[$i];\r\n if ($arr['serie']=='FIVA' && $fact->row[\"factrfca\"]!=\"XAXX010101000\")\r\n $arr['Conceptos'][$i+1]['descripcion'] = $fact->row['factobs1'].' '.\r\n $fact->row['factobs2'].' '.\r\n $fact->row['factobs3'];\r\n else\r\n $arr['Conceptos'][$i+1]['descripcion'] = $fali->falideco[$i];\r\n $arr['Conceptos'][$i+1]['cantidad'] = $cant;\r\n $arr['Conceptos'][$i+1]['unidad']=$unid;\r\n $arr['Conceptos'][$i+1]['noIdentificacion']=$fali->falicbar[$i];\r\n $si = (strcmp(fmtfech(substr($fact->row[\"factfdoc\"],0,10)),'2012-01-09')>=0)?'t':'f';\r\n $decimales = ($si==\"t\") ? 6 : 2;\r\n $prun = round((double)$impo / (double)$cant,$decimales);\r\n $arr['Conceptos'][$i+1]['valorUnitario'] = $prun;\r\n $arr['Conceptos'][$i+1]['importe'] = $impo;\r\n if ($addenda==\"detallista\") {\r\n $arr['Conceptos'][$i+1]['poim'] = $fali->falipoim[$i];\r\n $arr['Conceptos'][$i+1]['impu'] = $fali->faliimpu[$i];\r\n $arr['Conceptos'][$i+1]['gtin'] = $fali->falicbar[$i];\r\n $arr['Conceptos'][$i+1]['prun'] = $prun;\r\n $arr['Conceptos'][$i+1]['neto'] = $fali->falineto[$i];\r\n }\r\n}\r\n\r\n$arr['Conceptos'][1]['descripcion'] = \"descripcion del concepto\";\r\n$arr['Conceptos'][1]['cantidad'] = 10;\r\n$arr['Conceptos'][1]['unidad']= \"unidad\";\r\n$arr['Conceptos'][1]['noIdentificacion'] = \"no indentificacion\";\r\n$arr['Conceptos'][1]['importe'] = 6000;\r\n$arr['Conceptos'][1]['valorUnitario'] = 200;\r\n// }}}\r\n// {{{ Finaliza el arreglo\r\n$arr['Traslados']['impuesto'] = \"IVA\";\r\n#$arr['Traslados']['tasa'] = $fact->row[\"factpoim\"];\r\n$arr['Traslados']['tasa'] = 1;\r\n#$arr['Traslados']['importe'] = $fact->row[\"factimpu\"];\r\n$arr['Traslados']['importe'] = 6010;\r\nreturn($arr);\r\n}", "title": "" }, { "docid": "378024cf39b390b11486ea4d06c65ede", "score": "0.5480598", "text": "function anular_oc($nro_orden,$internacional=0)\r\n{\r\n global $es_stock,$select_proveedor,$db,$_ses_user,$nrocaso,$ordprod,$modo;\r\n $db->StartTrans();\r\n\r\n $q=\"update orden_de_compra set estado='n' where nro_orden=$nro_orden\";\r\n\r\n //(ESTO SOLO SE HACE SI EL PROVEEDOR NO ES STOCK)\r\n if(!$es_stock)\r\n {\r\n\t//desafectamos las notas de credito que estaban relacionadas con la orden de compra\r\n\t//y las volvemos a estado pendientes\r\n\t//seleccionamos las notas de credito que se relacionan con las ordenes de compras\r\n $query=\"select id_nota_credito from (select * from n_credito_orden where nro_orden=$nro_orden) as oc join nota_credito using(id_nota_credito) join moneda using(id_moneda)\";\r\n $notas_credito=sql($query,\"<br>Error al traer las notas de credito relacionadas con la orden de compra $nro_orden<br>\") or fin_pagina();\r\n\r\n while(!$notas_credito->EOF)\r\n {//Volvemos las notas de creditos que estan relacionadas con las ordenes de compra a\r\n //estado pendientes\r\n $query=\"update nota_credito set estado=0 where id_nota_credito=\".$notas_credito->fields['id_nota_credito'];\r\n sql($query,\"<br>Error al actualizar estado de nota de credito a pendientes.Nota de credito\".$notas_credito->fields['id_nota_credito'].\"<br>\") or fin_pagina();\r\n\r\n //borramos todas las entrada que relacionan ordenes de compra con cada nota de credio\r\n $query=\"delete from n_credito_orden where id_nota_credito=\".$notas_credito->fields['id_nota_credito'];\r\n sql($query,\"<br>Error al borrar la entrada de nota de credito y orden de compra. Nota de credito\".$notas_credito->fields['id_nota_credito'].\"<br>\") or fin_pagina();\r\n\r\n $notas_credito->MoveNext();\r\n }//de while(!$notas_credito->EOF)\r\n }//de if(!$es_stock)\r\n else//el proveedor es stock\r\n {\r\n \t//traemos el id del deposito seleccionado como stock\r\n \t//primero obtenemos el nombre del proveedor seleccionado\r\n $query=\"select razon_social from proveedor where id_proveedor=$select_proveedor\";\r\n $id_proveedor=sql($query,\"<br>Error al traer el nombre del proveedor.<br>\") or fin_pagina();\r\n switch($id_proveedor->fields['razon_social'])\r\n {case \"Stock San Luis\":$dep=\"San Luis\";break;\r\n case \"Stock Buenos Aires\":$dep=\"Buenos Aires\";break;\r\n case \"Stock ANECTIS\":$dep=\"ANECTIS\";break;\r\n case \"Stock SICSA\":$dep=\"SICSA\";break;\r\n case \"Stock New Tree\":$dep=\"New Tree\";break;\r\n case \"Stock Virtual\":$dep=\"Virtual\";break;\r\n case \"Stock Serv. Tec. Bs. As.\":$dep=\"Serv. Tec. Bs. As.\";break;\r\n }\r\n\r\n //se selecciona el id del deposito\r\n $query=\"select id_deposito from depositos where nombre='$dep'\";\r\n $id_dep=sql($query,\"<br>Error al traer id del deposito<br>\") or fin_pagina();\r\n //cancelamos las reservas hechas por la OC\r\n \tdescontar_reservados($nro_orden,$id_dep->fields['id_deposito'],1);\r\n }//del else de if(!$es_stock)\r\n\r\n\r\n sql($q,\"<br>Error al anular la OC<br>\") or fin_pagina();\r\n\r\n //eliminamos las entradas generadas en RMA por la OC, si es el caso\r\n //borrar_rma_x_anular_oc($nro_orden);\r\n\r\n //agreagamos el registro de anulacion de la OC, en el log\r\n $f1=date(\"Y-m-d H:i:s\",mktime());\r\n $comentario_anular=$_POST['comentario_anular'];\r\n $q=\"insert into log_ordenes (nro_orden,tipo_log,user_login,fecha,otros) values ($nro_orden,'de anulacion','\".$_ses_user[\"login\"].\"','$f1','$comentario_anular')\";\r\n sql($q,\"<br>Error al insertar el log de la OC (anulación)<br>\") or fin_pagina();\r\n\r\n $msg=\"Su Orden Nº $nro_orden se actualizo exitosamente\";\r\n\r\n\r\n/***************************************************************\r\nMercaderia en Tránsito\r\n****************************************************************/\r\n //se deben descontar de stock los productos de la OC que esten en\r\n\t //mercaderia en transito (Esto es cuando la OC esta autorizada)\r\n\t /* if($estado==\"a\" || $estado==\"e\")\r\n\t {//descontamos de mercaderia en transito los productos\r\n //solo si no esta asociada con honorario de s tecnico o es asociada\r\n //con otro\r\n $query_as=\"select flag_honorario,id_licitacion,orden_prod,flag_stock,nrocaso from orden_de_compra where nro_orden=$nro_orden\";\r\n $asociada=$db->Execute($query_as) or die($db->ErrorMsg.\"<br>Error al traer asociaciones de OC\");\r\n if($asociada->fields['flag_honorario']!=1 && ($asociada->fields['id_licitacion']!=\"\" || $asociada->fields['orden_prod']!=\"\" || $asociada->fields['flag_stock']==1 || $asociada->fields['nrocaso']!=\"\"))\r\n {\r\n\t $items_merc_trans=get_items($nro_orden);\r\n\t volver_atras_merc_trans($nro_orden,$items_merc_trans,$_POST['id_proveedor_a'],\"Anulación\");\r\n }\r\n\t }*/\r\n/***************************************************************\r\nMercaderia en Tránsito\r\n****************************************************************/\r\n //si el modo es Orden de Servicio Tecnico no se envia el mail avisando que se anulo la Orden\r\n if($modo!=\"oc_serv_tec\")\r\n {\r\n if($internacional)\r\n $texto_int=\"Internacional\";\r\n else\r\n $texto_int=\"\";\r\n\r\n //armamos el mail para enviar avisando que se anuló la \tOC\r\n\t $asunto=\"CORADIR:Orden de compra $texto_int Nº $nro_orden ANULADA\";\r\n\t\t$texto=\"La orden de Compra $texto_int Nº:$nro_orden ha sido ANULADA\\n\\n\".detalle_orden($nro_orden,0);\r\n\t\t$texto.=\"Usuario: \".$_ses_user[\"name\"].\"\\n\" ;\r\n\t\t$texto.=\"Fecha y hora: \".fecha($f1).\" \".Hora($f1).\"\\n\" ;\r\n\r\n\t//envio mails a las personas que se les envio el mail sobre esta orden\r\n\t$sql=\"select para from ord_compra_mails where nro_orden=$nro_orden\";\r\n $resultado_mail=sql($sql,\"<br>Error al traer los destinatarios de anulación<br>\") or fin_pagina();\r\n\r\n $db->CompleteTrans();\r\n\r\n enviar_mail($resultado_mail->fields['para'],$asunto,$texto,\"\",\"\",\"\",0);\r\n }//de if($modo==\"oc_serv_tec\")\r\n\r\n}", "title": "" }, { "docid": "25ee201995a8b464e3bc040a6b0ce680", "score": "0.5425117", "text": "static public function ctrEditarCompra(){\n \n if(isset($_POST[\"editarCompra\"])){\n\n /*=====================================\n FORMATEAR LA TABLA DE PRODUCTOS Y DE PROVEEDORES\n =====================================*/ \n\n $tabla = \"compras\";\n\n $item = \"codigo\";\n $valor = $_POST[\"editarCompra\"];\n $orden = \"id\";\n\n $traerCompra = ModeloCompras::mdlMostrarCompras($tabla, $item, $valor, $orden);\n\n $productosC = json_decode($traerCompra[\"productos\"], true);\n // var_dump($productosC);\n\n $totalProductosVendidos = array();\n\n foreach($productosC as $key => $value){\n\n array_push($totalProductosVendidos, $value[\"cantidad\"]);\n\n $tablaProductos = \"productos\";\n\n $item = \"id\";\n $valor = $value[\"id\"];\n $orden = \"id\";\n\n $traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor, $orden);\n\n $item1a = \"compras\";\n $valor1a = $traerProducto[\"compras\"] - $value[\"cantidad\"];\n\n $nuevasCompras= ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n\n $item1b = \"stock\";\n $valor1b = $traerProducto[\"stock\"] - $value[\"cantidad\"];\n\n $nuevoStockC = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n // var_dump($valor1b);\n\n }\n $tablaProveedores = \"proveedores\";\n\n $itemProveedor= \"id\";\n $valorProveedor= $_POST[\"seleccionarProveedor\"];\n\n $traerProveedor = ModeloProveedores::mdlMostrarProveedores($tablaProveedores, $itemProveedor, $valorProveedor);\n\n $item1a= \"ventas\";\n $valor1a = $traerProveedor[\"ventas\"] - array_sum($totalProductosVendidos);\n\n $ventasProveedor = ModeloProveedores::mdlActualizarProveedor($tablaProveedores, $item1a, $valor1a, $valor);\n\n /*=====================================\n ACTUALIZAR LAS VENTAS DEL PROVEEDOR, AUMENTAR EL STOCK Y AUMENTAR LAS COMPRAS DE LOS PRODUCTOS\n =====================================*/ \n\n $listaProductosC_2 = json_decode($_POST[\"listaProductosC\"], true);\n\n $totalProductosVendidos_2 = array();\n\n foreach($listaProductosC_2 as $key => $value){\n\n array_push($totalProductosVendidos_2, $value[\"cantidad\"]);\n\n $tablaProductos_2 = \"productos\";\n\n $item_2 = \"id\";\n $valor_2 = $value[\"id\"];\n $orden = \"id\";\n\n $traerProducto_2 = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor, $orden);\n\n $item1a_2 = \"compras\";\n $valor1a_2 = $value[\"cantidad\"] + $traerProducto[\"compras\"];\n\n $nuevasCompras_2= ModeloProductos::mdlActualizarProducto($tablaProductos, $item1a, $valor1a, $valor);\n\n $item1b_2 = \"stock\";\n $valor1b_2 = $value[\"stock\"];\n\n $nuevoStockC_2 = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1b, $valor1b, $valor);\n\n\n }\n\n $tablaProveedores_2 = \"proveedores\";\n\n $item_2= \"id\";\n $valor_2= $_POST[\"seleccionarProveedor\"];\n\n $traerProveedor_2 = ModeloProveedores::mdlMostrarProveedores($tablaProveedores, $item, $valor);\n\n $item1a_2= \"ventas\";\n $valor1a_2 = array_sum($totalProductosVendidos) + $traerProveedor[\"ventas\"];\n\n $ventasProveedor_2 = ModeloProveedores::mdlActualizarProveedor($tablaProveedores, $item1a, $valor1a, $valor);\n\n $item1b_2= \"ultima_venta\";\n date_default_timezone_set('America/Bogota');\n\n\t\t\t$fecha = date('Y-m-d');\n\t\t\t$hora = date('H:i:s');\n\t\t\t$valor1b_2 = $fecha.' '.$hora;\n\n $fechaProveedor_2 = ModeloProveedores::mdlActualizarProveedor($tablaProveedores, $item1b, $valor1b, $valor);\n \n\n /*=====================================\n GUARDAR CAMBIOS DE LA COMPRA\n =====================================*/ \n\n $tabla = \"compras\";\n // var_dump($tabla);\n\n\n $datos = array(\"id_usuario\"=>$_POST[\"idComprador\"],\n \"id_proveedor\"=>$_POST[\"seleccionarProveedor\"],\n \"codigo\"=>$_POST[\"editarCompra\"],\n \"productos\"=>$_POST[\"listaProductosC\"],\n \"impuesto\"=>$_POST[\"nuevoPrecioImpuestoC\"],\n \"neto\"=>$_POST[\"nuevoPrecioNetoC\"],\n \"total\"=>$_POST[\"totalCompra\"],\n \"metodo_pago\"=>$_POST[\"listaMetodoPagoC\"]);\n\n $respuesta = ModeloCompras::mdlEditarCompra($tabla, $datos);\n\n if($respuesta == \"ok\"){\n\n echo'<script>\n localStorage.removeItem(\"rango\");\n\n swal({\n type: \"success\",\n title: \"La compra ha sido editada correctamente\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\"\n }).then((result)=>{\n if(result.value){\n window.location = \"compras\";\n }\n })\n </script>';\n }\n \n }\n }", "title": "" }, { "docid": "4f0e132343c661bd3bcdaf01a29d7ec4", "score": "0.53926766", "text": "public static function resumenes(){\n // INICIALIZACION\n \n $cad = $cad2 = '';\n $dataAux = array();\n $data = array();\n\n $dato[] = 'Proyecto';\n $dato[] = 'Instrumento';\n $dato[] = 'Última día';\n $dato[] = '1 día antes';\n $dato[] = '2 días antes';\n $dato[] = '3 días antes';\n $dato[] = '4 días antes';\n $dato[] = '5 días antes';\n $dato[] = '6 días antes';\n\n $dia = date('Y-m-d');\n $f = Aux::findBySql(\"select de from a.fechas where id='1';\")->one();\n if( isset($f->de) && $f->de != $dia ){ \n for( $g=0; $g < 7 ; $g++ ){\n $diaAx = date('Y-m-d', strtotime('-' .$g .' day', strtotime($dia)));\n Aux::findBySql(\"update a.fechas set de='\" .$diaAx .\"' where id='\" .($g+1) .\"';\")->one(); \n }\n }\n\n\n \n $cad .= Seccion::titulo('Cuadro de comportamiento de los últimos 7 días');\n \n $instrumentos = '';\n $data[] = $dato; unset($dato);\n // PROYECTOS\n $sql0 = \"select id, de, codigo from a.proyecto where st=1 order by de asc;\";\n $obj0s = Aux::findBySql($sql0)->all();\n foreach( $obj0s as $obj0 ){\n \n // INSTRUMENTOS\n $sql1 = \"select id, de, codigo, cuotas from \" .$obj0->codigo .\".instrumento where st=1 order by de asc;\";\n $obj1s = Aux::findBySql($sql1)->all();\n foreach( $obj1s as $obj1 ){\n\n $instrumentos .= \"data0.addColumn('number', '\" .$obj0->de.' - '. $obj1->de .\"');\\n\";\n\n \n // CUADRO DE CUOTA Y CONTEO POR INSTRUMENTO, ULTIMOS 7\n $dato[] = $obj0->de;\n $dato[] = $obj1->de;\n if( $obj1->cuotas == 1 ){ // conteo por cuotas\n $sql = \"select f.de, sum(c.cuota) as cuota, sum(c.conteo) as conteo \nfrom a.fechas f \nleft join \" .$obj0->codigo .\".cuota c on f.de= c.fecha_encuesta and id_instrumento='\" .$obj1->id .\"' \ngroup by f.de order by f.de desc;\";\n }else{ // conteo por tipificacion de prospectos\n $sql = \"select de, sum(efectivas) as conteo, sum(cargados) as cuota from (\nselect distinct\nf.de, d.id as id_data, count(p.*) as efectivas, d.cantidad as cargados\nfrom a.fechas f \n\nleft join \" .$obj0->codigo .\".prospecto p on p.id_tipificacion = '1' and f.de = to_char(p.up,'YYYY-MM-DD')\nleft join \" .$obj0->codigo .\".data d on d.id_instrumento='\" .$obj1->id .\"' and p.id_data = d.id\n group by f.de,d.cantidad, d.id\n) a group by de order by de desc\";\n }\n $objs = Aux::findBySql($sql)->all();\n foreach( $objs as $obj ){\n if( $obj->cuota > 0 ){\n $porc = round(($obj->conteo / $obj->cuota) * 100,2);\n if( $obj->conteo < $obj->cuota )\n $dato[] = '<span style=\"color: #aa0000;\">' .$obj->conteo.' de '.$obj->cuota .'.</span> <span style=\"color: #000077;\">' .$porc .' %</span>' ;\n else\n $dato[] = '<span style=\"color: #008800;\">' .$obj->conteo.' de '.$obj->cuota .'.</span> <span style=\"color: #000077;\">' .$porc .' %</span>' ; \n $dataAux[$obj0->codigo .'-'. $obj1->id][] = $porc; \n }else\n $dato[] = '';\n }\n $data[] = $dato; unset($dato);\n \n \n \n \n \n \n // GRAFICO DE CUOTA Y CONTEO POR INSTRUMENTO\n $aux = '';\n $vct[] = $obj0->codigo;\n $vct[] = $obj0->de;\n $vct[] = $obj1->id;\n $vct[] = $obj1->de;\n $sql = \"select fecha_encuesta, sum(cuota) as cuota, sum(conteo) as conteo from \" .$obj0->codigo .\".cuota where id_instrumento='\" .$obj1->id .\"' group by fecha_encuesta order by fecha_encuesta asc;\";\n $objs = Aux::findBySql($sql)->all();\n foreach( $objs as $obj )\n $aux .= \"['\" .Formato::date($obj->fecha_encuesta, 'd,m') .\"',\" .$obj->cuota .',' .$obj->conteo .'],';\n $vct[] = $aux;\n if( $aux != '' ){\n $cad2 .= '<hr /><br />' .Seccion::titulo('' .$obj0->de .' - ' .$obj1->de .'');\n $cad2 .= self::chartResumen( $vct );\n }\n unset($vct);\n\n \n }\n }\n $cad .= Listado::listado($data); unset($data);\n\n\n return $cad .'<hr />';\n }", "title": "" }, { "docid": "15b5f441266f1ee5421b097cdc80ee51", "score": "0.53763694", "text": "function get_data($ordprod)\r\n{\r\n\t//orden de produccion\r\n\t$q[]=\"select * from orden_de_produccion left join renglon using(id_renglon) where nro_orden=$ordprod\";\r\n\t$res[op] =\t sql($q[0]) or fin_pagina();//orden de produccion\r\n\t$id_lic=$res[op]->fields[id_licitacion];\r\n\r\n\t//licitacion\r\n\t$q[]=\"select *,e.nombre as nbre_entidad from licitacion l join\r\n\tentidad e on e.id_entidad=l.id_entidad where id_licitacion=$id_lic \";\r\n\r\n\t//ordenes de compra\r\n\t$q[]=\"select oc.*,m.simbolo,p.razon_social as proveedor,oc_total.total from orden_de_compra oc join\r\n\tproveedor p on oc.id_proveedor=p.id_proveedor join\r\n\tmoneda m on m.id_moneda=oc.id_moneda left join\r\n\t(select nro_orden,sum(cantidad*precio_unitario) as total from fila group by nro_orden) oc_total on oc_total.nro_orden=oc.nro_orden\r\n\twhere id_licitacion=$id_lic and oc.estado!='a' order by nro_orden\";\r\n\r\n\t//facturas\r\n\t$q[]=\"select *,m.simbolo from facturas f join\r\n\tmoneda m on m.id_moneda=f.id_moneda\tleft join\r\n\t(select id_factura,sum(cant_prod*precio) as total from items_factura group by id_factura) f_total on f_total.id_factura=f.id_factura\r\n\twhere id_licitacion=$id_lic and f.estado!='a' order by tipo_factura,nro_factura\";\r\n\r\n\t//remitos\r\n\t$q[]=\"select r.*,r_total.total,m.simbolo,f.id_factura,f.nro_factura,f.tipo_factura from remitos r left join\r\n\tfacturas f on f.id_factura=r.id_factura join\r\n\tmoneda m on m.id_moneda=f.id_moneda\tleft join\r\n\t(select id_remito,sum(cant_prod*precio) as total from items_remito group by id_remito) r_total on r_total.id_remito=r.id_remito\r\n\twhere r.id_licitacion=$id_lic and r.estado!='a' order by nro_remito\";\r\n\r\n\t$res[l] = sql($q[1]) or fin_pagina();//licitacion\r\n\t$res[oc] =\t sql($q[2]) or fin_pagina();//ordenes de compra\r\n\t$res[f] =\t sql($q[3]) or fin_pagina();//facturas\r\n\t$res[r] =\t sql($q[4]) or fin_pagina();//remitos\r\n\r\n\treturn $res;\r\n}", "title": "" }, { "docid": "ca50f546e884ec763da79a48c4f3de5b", "score": "0.53749585", "text": "static public function ctrAgregarMovProducto(){\r\n\t\t\t\t\r\n\t\tif (isset($_POST[\"idProductoAgregarMovProducto\"])&&\r\n\t\t\tisset($_POST[\"idOrdenFinAgregarMovProducto\"])&&\r\n\t\t\tisset($_POST[\"cantidadAgregarMovProducto\"])&&\r\n\t\t\tisset($_POST[\"pesoAgregarMovProducto\"])){\r\n\r\n\t\t\t\t$datos= array(\t'idProducto_' \t=> $_POST[\"idProductoAgregarMovProducto\"],\r\n\t\t\t\t\t\t\t\t'idOrdenFin_' \t=> $_POST[\"idOrdenFinAgregarMovProducto\"],\r\n\t\t\t\t\t\t\t\t'cantidad_' \t=> $_POST[\"cantidadAgregarMovProducto\"],\r\n\t\t\t\t\t\t\t\t'peso_' \t\t=> $_POST[\"pesoAgregarMovProducto\"],\r\n\t\t\t\t\t\t\t\t'idCuenta_' \t=> 20,\r\n\t\t\t\t\t\t\t\t'idUsuario_' \t=> $_SESSION['userId']);\r\n\r\n\t\t\t$respuesta=ModeloFormularios::mdlMovimientoProducto($datos);\r\n\r\n\t\t\treturn $respuesta;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "38ebab5ada0b6e2970175987492367b6", "score": "0.5370439", "text": "public function inserirItemAgendamento($idProduto, $qtdDisponivel, $qtdTransito, $id_agendamento, $remessa = 'NULL'){\r\n\r\n \t//$this->begin();\r\n $remessas = null;\r\n\r\n \r\n\r\n \t$sql = \"INSERT INTO\r\n \t\t\t\treserva_agendamento_item (\r\n \t\t\t\t\traiprdoid,\r\n \t\t\t\t\traidt_cadastro,\r\n \t\t\t\t\traiqtde_estoque,\r\n \t\t\t\t\traiqtde_transito,\r\n \t\t\t\t\trairagoid,\r\n raiesroid\r\n \t\t\t)\r\n \t\t\tVALUES (\r\n \t\t\t\t$idProduto,\r\n \t\t\t\tNOW(),\r\n \t\t\t\t$qtdDisponivel,\r\n \t\t\t\t$qtdTransito,\r\n \t\t\t\t$id_agendamento,\r\n $remessa\r\n \t\t\t) RETURNING raioid\";\r\n\r\n \tif (!$rs = pg_query($this->conn, $sql)) {\r\n \t\t//$this->rollback();\r\n \t\tthrow new ErrorException(self::MENSAGEM_ERRO_PROCESSAMENTO);\r\n \t}\r\n\r\n \t$id_item = 0;\r\n\r\n \tif (pg_num_rows($rs) > 0) {\r\n \t\t$id_item = pg_fetch_result($rs, 0, 'raioid');\r\n \t}\r\n\r\n \t//$this->commit();\r\n \treturn $id_item;\r\n }", "title": "" }, { "docid": "adc01cb7a27501306d541e1476a1fc12", "score": "0.53670055", "text": "public function AgregarRegraNova(array $lis_variables_pre, array $lis_operadores_pre, array $lis_valores_pre, array $lits_numerico_o_literal, array $lis_conectores_pre, array $lis_variables_con, array $lis_operadores_con, array $lis_valores_con, array $lis_conectores_con, $ni){\n $em = $this->em;\n $regra = new Regra_producao();\n $regra->setNombre(\"R\".count($this->list));\n $regra->setProblema($this->problemaEntity);\n //beginTrans\n $em->beginTransaction();\n $em->persist($regra);\n foreach ($lis_variables_pre as $key=>$value) {\n $facto = new Facto();\n $facto->setVariavel($value);\n $facto->setOperador($lis_operadores_pre[$key]);\n $facto->setValorBooleano(false);\n $facto->setValorNumerico($lis_valores_pre[$key]);\n $facto->setValorLiteral(\"\");\n if ($lits_numerico_o_literal[$key]!=\"num\") {\n $facto->setValorNumerico(0);\n $facto->setValorLiteral($lis_valores_pre[$key]);\n\n }\n $em->persist($facto);\n $regraFacto = new RegraFacto();\n $regraFacto->setFacto($facto);\n $regraFacto->setPremisas(\"pre\");\n $premisa = new Premisas();\n $premisa->setPremisas($regraFacto->getPremisas());\n $regraFacto->setRegra($regra);\n $em->persist($regraFacto);\n $em->persist($premisa);\n $regra->AgregarRegraFacto($regraFacto);\n \n if ($key<count($lis_conectores_pre)) {\n $regra->setRegraConector($lis_conectores_pre[$key]);\n $conector = new Conector();\n $conector->setSignal($lis_conectores_pre[$key]);\n $regra->AgregarConectorPremisa($conector);\n $regraConector = new RegraConector();\n $regraConector->setRegra($regra);\n $regraConector->setConector($conector);\n $regraConector->setPremisas(\"pre\");\n $regra->AgregarRegraConector($regraConector);\n $em->persist($conector);\n $em->persist($regraConector);\n }\n }\n\n\n\n\n foreach ($lis_variables_con as $key=>$value) {\n $facto = new Facto();\n $facto->setVariavel($lis_variables_con[$key]);\n $facto->setOperador($lis_operadores_con[$key]);\n $facto->setValorBooleano(false);\n $facto->setValorNumerico(0);\n $facto->setValorLiteral($lis_valores_con[$key]);\n if ($lis_valores_con[$key]!=\"\") {\n $facto->setValorNumerico($lis_valores_con[$key]);\n $facto->setValorLiteral(\"\");\n }\n $regra->setNodoConclusion($facto);\n $regraFacto = new RegraFacto();\n $regraFacto->setPremisas(\"con\");\n $regraFacto->setRegra($regra);\n $regraFacto->setFacto($facto);\n $em->persist($regraFacto);\n $regra->AgregarRegraFacto($regraFacto);\n if ($key<count($lis_conectores_con)) {\n $regra->setConectorConclusion($lis_conectores_con[$key]);\n $conector = new Conector();\n $conector->setSignal($lis_conectores_con[$key]);\n $regraConector = new RegraConector();\n $regraConector->setRegra($regra);\n $regraConector->setConector($conector);\n $regraConector->setPremisas(\"con\");\n $em->persist($conector);\n $em->persist($regraConector);\n $regra->AgregarRegraConector($regraConector);\n\n }\n\n\n $regra->setNivel($ni);\n// $contador =array_reduce($this->list,function($a,$b)use($ni){\n// if ($b instanceof Regra_producao) {\n// if ($b->getNivel()==$ni) {\n// $a=$a+1;\n// }\n// }\n// return $a;\n// });\n\n $contador = count(array_filter($this->list,function($iter)use($ni){\n return $iter instanceof Regra_producao && $iter->getNivel()==$ni;\n }));\n\n $this->list[$contador]=$regra;\n\n $em->persist($facto);\n $em->persist($regraFacto);\n $em->persist($regra);\n\n }\n\n try{\n $em->flush();\n $em->commit();\n }\n catch (\\Exception $e){\n $em->rollback();\n throw $e;\n }\n\n }", "title": "" }, { "docid": "ee7f07606835efa8ae9af904d02ea997", "score": "0.53422475", "text": "function armar_cuerpo ($origen){\n $solicitud=$this->dep('datos')->tabla('solicitud')->get_datos_basicos_solicitud($this->s__id_solicitud); \n $this->s__nombre=$solicitud[0]['nombre'];\n $this->s__apellido=$solicitud[0]['apellido'];\n $codigo=\"Número de Solicitud : {$this->s__id_solicitud}\";\n $emisor=\"Emisor : {$solicitud[0]['nombre']} {$solicitud[0]['apellido']}\";\n $establecimiento=\"Establecimiento : {$this->s__nombre_facultad} ({$this->s__nombre_sede})\";\n $hora_inicio=\"Hora de Inicio : {$this->s__hora_inicio}\";\n $hora_fin=\"Hora de Fin : {$this->s__hora_fin}\";\n $capacidad=\"Capacidad del aula : {$this->s__capacidad} Alumnos\";\n $fecha_pedido=\"Fecha de Pedido : {$this->s__fecha_consulta}\";\n $finalidad=\"Finalidad : {$solicitud[0]['finalidad']}\";\n \n //definimos una longitud maxima para completar con espacios en blanco cada oracion del documento\n $longitud= 85; \n \n $items=array(\n 0 => array($codigo, $emisor),\n 1 => array($establecimiento),\n 2 => array($finalidad),\n 3 => array($capacidad, $fecha_pedido),\n 4 => array($hora_inicio,$hora_fin),\n );\n $cadena=\"\"; \n foreach($items as $clave=>$valor){\n \n $cadena .= $this->generar_cadena($valor, $longitud);\n \n }\n \n return ($this->armar_precontenido($origen, FALSE) . \"\\n\" .$cadena . $this->armar_precontenido($origen, FALSE));\n }", "title": "" }, { "docid": "87b5410360705e177f5293f9e2d0a584", "score": "0.5321731", "text": "function createCorpoItensPedido($pedido_id,&$inicio,$limitNotas,$totalValorNota){\n $sql_itens_pedido = \"SELECT * FROM itens_cotacao WHERE id_cotacao = '$pedido_id' LIMIT $inicio,$limitNotas\";\n $exe_itens_pedido = mysql_query($sql_itens_pedido) or die (mysql_error().'-'.$sql_itens_pedido);\n $num_itens_pedido = mysql_num_rows($exe_itens_pedido);\n\n $inicio+= $num_itens_pedido;\n\t\n\t\tif ( $reg_itens_pedido['forma_pagamento_id'] != 1){\n\t\t\t\t$forma = 'CREDITO';\n\t\t\t\t}\n\t\telse {\n\t\t\t\t$forma = 'CONTADO';\n\t\t\t\t}\n\n$corpo_nota = \"\";\n\n\t$sql_cambio = \"SELECT max(cm.id) as cambio_id, cm.vl_cambio, nm_moeda FROM cambio_moeda cm, moeda WHERE cm.moeda_id = 3 AND moeda.id = 1 GROUP BY cm.id DESC limit 0,1 \";\n $rs_cambio = mysql_query($sql_cambio);\n $linha_cambio = mysql_fetch_array($rs_cambio);\n $vl_cambio_guarani = $linha_cambio['vl_cambio'];\n\n while ($reg_itens_pedido = mysql_fetch_array($exe_itens_pedido, MYSQL_ASSOC)) {\n $total_carrinho += ($reg_itens_pedido['prvenda']*$reg_itens_pedido['qtd_produto']);\n \t\t\t$subtotal = $reg_itens_pedido['prvenda']*$reg_itens_pedido['qtd_produto'] ;\n\t\t\t$dolar = $total_carrinho * $vl_cambio_guarani;\n\n$corpo_nota.= \"\n |\".str_pad($reg_itens_pedido['qtd_produto'],5,\" \",STR_PAD_RIGHT).\"|\".str_pad(substr($reg_itens_pedido['descricao_prod'],0,32),33,\" \",STR_PAD_RIGHT).\"|\".\n str_pad(substr($reg_itens_pedido['referencia_prod'],0,12),13,\" \",STR_PAD_LEFT).\"|\".str_pad($reg_itens_pedido['prvenda'],11,\" \",STR_PAD_LEFT).\n \"|\".str_pad($subtotal,11,\" \",STR_PAD_LEFT).\"|\";\n }\n\n //CONTROLE DE&nbs\n$MAX_ITENS_NOTA = 15;\nif($num_itens_pedido < $MAX_ITENS_NOTA){\n$total_completar = $MAX_ITENS_NOTA - $num_itens_pedido;\nwhile($total_completar>0){\n$corpo_nota.=\"\\n\"\n .str_pad(\"|\",2,\" \",STR_PAD_LEFT).\"\".str_pad(\"|\",6,\" \",STR_PAD_LEFT).\"\".str_pad(\"|\",34,\" \",STR_PAD_LEFT).\n \"\".str_pad(\"|\",14,\" \",STR_PAD_LEFT).\"\".str_pad(\"|\",12,\" \",STR_PAD_LEFT).\"\".str_pad(\"|\",12,\" \",STR_PAD_LEFT);\n$total_completar--;\n }\n }\n\n\n$rodape_nota = \"\n ===============================================================================\n \".str_pad(\"GRACIAS POR LA PREFERENCIA\",35,\" \",STR_PAD_RIGHT).\" \".str_pad(\"Guaranies:\",2,\" \",STR_PAD_RIGHT).\" \".guarani($dolar).\" \".str_pad(\"Dolares:\",2,\" \",STR_PAD_RIGHT).\" \".str_pad(\"$total_carrinho\",9,\" \",STR_PAD_RIGHT).\"\n *** VENTA \".trim($forma).\" *** \n \n VERIFIQUE SU MERCADERIA \n ===============================================================================\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\";\nreturn $corpo_nota.\"\".$rodape_nota;\n }", "title": "" }, { "docid": "c68f8bdeb837067cccc041cfb2cf5a17", "score": "0.5307737", "text": "function prepare_orden($nro_orden,&$filas)\r\n{\r\n global $productos_pres;\r\n while ($filas['cantidad']--)\r\n {\r\n\t$filas[$filas['cantidad']]['nro_orden']=$nro_orden;\r\n \t$filas[$filas['cantidad']]['descripcion_prod']=\"'\".$filas[$filas['cantidad']]['descripcion_prod'].\"'\";\r\n \t$filas[$filas['cantidad']]['desc_adic']=\"'\".$filas[$filas['cantidad']]['desc_adic'].\"'\";\r\n\r\n \t$productos_pres[$filas['cantidad']]['pos_fila']=$filas['cantidad'];//posicion dentro de la pseudotabla\r\n \t$productos_pres[$filas['cantidad']]['id_producto_presupuesto']=$filas[$filas['cantidad']]['id_producto_presupuesto'];\r\n \t$productos_pres[$filas['cantidad']]['cantidades_pres']=$filas[$filas['cantidad']]['cantidades_pres'];\r\n\r\n \tunset($filas[$filas['cantidad']]['id_producto_presupuesto']);\r\n \tunset($filas[$filas['cantidad']]['cantidades_pres']);\r\n \tunset($filas[$filas['cantidad']]['subtotal']);\r\n }\r\n unset($filas['cantidad']);\r\n}", "title": "" }, { "docid": "500e2b49d1db03cbbbd2ff10a18cfec4", "score": "0.52966875", "text": "function guardar_recepciones_oc($nro_orden,$items)\r\n{\r\n\tglobal $db;\r\n\r\n\t$db->StartTrans();\r\n\r\n\t//insertamos el registro de los productos recibidos, si el proveedor no es stock\r\n \t$tam_items=sizeof($items);\r\n \t//insertamos solo las recepciones de productos y no las reservas de stock. Esto se hara cuando el Lider confirme las recepciones\r\n \tfor($i=0;$i<$tam_items;$i++)\r\n {\r\n\t $cant=$items[$i]['cantidad'];\r\n\t if($cant==\"\")\r\n\t \t$cant=0;\r\n\t\tif($items[$i]['id_prod_recibido'])\r\n\t\t{ $id_fila=$items[$i]['id_fila'];\r\n\t\t $id_deposito=$items[$i]['id_deposito'];\r\n\t\t $id_prod_recibido=$items[$i]['id_prod_recibido'];\r\n\t\t $id_recibido=$items[$i]['id_recibido'];\r\n\t\t $observaciones=$items[$i]['observaciones'];\r\n\r\n\t\t insertar_recibidos($nro_orden,$id_fila,$cant,$id_deposito,$id_prod_recibido,$id_recibido,$observaciones,1);\r\n\t\t}//de if($items[$i]['id_prod_recibido'])\r\n\r\n \t }//de for($i=0;$i<$tam_items;$i++)\r\n\r\n\t$db->CompleteTrans();\r\n}", "title": "" }, { "docid": "85f2a5af5b0f2ba829b3f872cc0aeed4", "score": "0.52937466", "text": "public function agregarProducto($identificador){\r\n $identificador_producto = $identificador;\r\n\r\n //Determinar el identificador de almacen\r\n $almacen = $this->Empresa_model->leerAlmacenIdentificadorEmpresa($this->session->sucursal->idempresa);\r\n\r\n //Comprobar si el producto se encuentra en el carrito\r\n //Regresa -1 si es nuevo, Regresa el indice si ya se encuentra en el carrito,\r\n $indice = $this->obtenerIndiceProductoCarrito($identificador_producto);\r\n if($indice !== -1)\r\n {\r\n //El producto ya esta en el carrito, aumentar la cantidad\r\n $this->aumentarProductoCarrito($indice);\r\n }else{\r\n //El producto es nuevo\r\n $producto = $this->Producto_model->leerProductoPorIdentificador($identificador_producto, $almacen->idalmacen);\r\n\r\n //Validacion del producto\r\n if($producto === null)\r\n {\r\n //El producto no existe\r\n $this->mensaje('No existe el producto con el identificador proporcionado', 'warning');\r\n }else{\r\n //El producto existe y hay stock\r\n $this->agregarAlCarrito($producto);\r\n }\r\n\r\n }\r\n redirect('puntoVenta/');\r\n\r\n }", "title": "" }, { "docid": "4ff1a40b20e8a4c823974e2293e3c782", "score": "0.5254166", "text": "function AddProducto($id_producto, $opciones='', $textura=0, $cantidad='1'){ \n\t\t\t//echo \" textura \".$textura.\"<br />\";\n\t\t\t//echo 'IDANT:'.$id_producto;\n\t\t\t$id_producto = $textura > 0 ? $id_producto.\"(\".$textura.\")\" : $id_producto ;\n\t\t\t\n\t\t\t$id_producto = get_uid_producto($id_producto, $opciones);\n\t\t\t$textura = explode(\"(\",$id_producto);\n\t\t\t$textura = (int)$textura[1];\n\t\t\t\n\t\t\t//echo \"IDPOST:\".$id_producto;\n\t\t\tif($this->VerificaProducto($id_producto)){\n\t\t\t\t$this->UpdateCantidad($id_producto, $opciones, $textura, $cantidad);\n\t\t\t}else{\t\n\t\t\t\t//if($cantidad==''){$cantidad=1;}\n\t\t\t\t/* INGRESO DE PRODUCTOS A LA SESION */\t\n\t\t\t\t\n\t\t\t\t$this->Content[$id_producto]['cantidad'] = $cantidad;\n\t\t\t\tif(isset($textura) && $textura > 0)\n\t\t\t\t{ \n\t\t\t\t\t$this->Content[$id_producto]['textura'] = 'rojo';\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t/* INGRESO DE PRODUCTOS A LA TABLA CLIENTES CESTA */\n\t\t\t\tif($this->cliente!=\"\" && $this->cliente <> 0 ){\n\t\t\t\t\t\n\t\t\t\t\t$sql=\"INSERT INTO clientes_cesta \n\t\t\t\t\tVALUES('','\".$this->cliente.\"','\".$id_producto.\"','\".$textura.\"','\".$cantidad.\"','\".$precio_final.\"','\".date('Y-m-d').\"')\";\n\t\t\t\t\t$query=new Consulta($sql);\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\t//print_r($opciones);\n\t\t\t\tif ( is_array($opciones) ){\n\t\t\t\t\treset($opciones);\n\t\t\t\t \twhile (list($option, $value) = each($opciones)) {\n\t\t\t\t \t\t\t\t\t\t\t\t\n\t\t\t\t\t\t/* INRGESO DE OPCIONES A LA SESSION */\n\t\t\t\t\t\t$this->Content[$id_producto]['opciones'][$option] = $value;\n\t\t\t\t\t\n\t\t\t\t\t\t/* INGRESO DE PRODUCTOS A LA TABLA OPCIONES DE LOS PRODUCTOS EN LA CESTA*/\n\t\t\t\t\t\n\t\t\t\t\t\tif($this->cliente!=\"\" && $this->cliente <> 0){\n\t\t\t\t\t \t\t$sq_opciones = new Consulta(\"INSERT INTO clientes_cesta_opciones \n\t\t\t\t\t\t\t\t\t\t\t\tVALUES ('','\".$this->cliente.\"', '\".$id_producto.\"', '\".$option.\"', '\".$value.\"') \");\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t \t}\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t$this->cleanup();\n\t\t}", "title": "" }, { "docid": "6638a34ba8fc5cf70687e9ac1ae91049", "score": "0.52383745", "text": "function gerar_registro14(){\r\n\r\n $query = \"SELECT composicao_a.codproduto AS codprodutopai, itcomposicao_a.codproduto AS codprodutofilho, itcomposicao_a.quantidade, \".$this->pdvconfig->sql_descricao().\", \";\r\n $query .= \"\tprodutoestab_b.precoatc AS precoatc_pn, produtoestab_b.precovrj AS precovrj_pn, produtoestab_b.precoatcof AS precoatcof_pn, produtoestab_b.precovrjof AS precovrjof_pn, \";\r\n $query .= \"\tprodutoestab_a.precoatc AS precoatc_fa, produtoestab_a.precovrj AS precovrj_fa, produtoestab_a.precoatcof AS precoatcof_fa, produtoestab_a.precovrjof AS precovrjof_fa, \";\r\n $query .= \"\t(SELECT SUM(precoatc * quantidade) FROM itcomposicao AS itcomposicao_c INNER JOIN produtoestab AS produtoestab_c ON (itcomposicao_c.codproduto = produtoestab_c.codproduto) WHERE itcomposicao_c.codcomposicao = composicao_a.codcomposicao AND produtoestab_c.codestabelec = produtoestab_a.codestabelec) AS precoatc_pa, \";\r\n $query .= \"\t(SELECT SUM(precovrj * quantidade) FROM itcomposicao AS itcomposicao_c INNER JOIN produtoestab AS produtoestab_c ON (itcomposicao_c.codproduto = produtoestab_c.codproduto) WHERE itcomposicao_c.codcomposicao = composicao_a.codcomposicao AND produtoestab_c.codestabelec = produtoestab_a.codestabelec) AS precovrj_pa, \";\r\n $query .= \"\t(SELECT SUM(precoatcof * quantidade) FROM itcomposicao AS itcomposicao_c INNER JOIN produtoestab AS produtoestab_c ON (itcomposicao_c.codproduto = produtoestab_c.codproduto) WHERE itcomposicao_c.codcomposicao = composicao_a.codcomposicao AND produtoestab_c.codestabelec = produtoestab_a.codestabelec) AS precoatcof_pa, \";\r\n $query .= \"\t(SELECT SUM(precovrjof * quantidade) FROM itcomposicao AS itcomposicao_c INNER JOIN produtoestab AS produtoestab_c ON (itcomposicao_c.codproduto = produtoestab_c.codproduto) WHERE itcomposicao_c.codcomposicao = composicao_a.codcomposicao AND produtoestab_c.codestabelec = produtoestab_a.codestabelec) AS precovrjof_pa \";\r\n $query .= \"FROM itcomposicao AS itcomposicao_a \";\r\n $query .= \"INNER JOIN composicao AS composicao_a ON (itcomposicao_a.codcomposicao = composicao_a.codcomposicao) \";\r\n $query .= \"INNER JOIN produtoestab AS produtoestab_a ON (itcomposicao_a.codproduto = produtoestab_a.codproduto) \";\r\n $query .= \"INNER JOIN produtoestab AS produtoestab_b ON (composicao_a.codproduto = produtoestab_b.codproduto AND produtoestab_a.codestabelec = produtoestab_b.codestabelec) \";\r\n $query .= \"INNER JOIN produto ON (itcomposicao_a.codproduto = produto.codproduto) \";\r\n $query .= \"WHERE composicao_a.tipo = 'V' \";\r\n $query .= \"\tAND composicao_a.explosaoauto = 'S' \";\r\n $query .= \"\tAND produtoestab_a.codestabelec = \".$this->pdvconfig->getestabelecimento()->getcodestabelec().\" \";\r\n if($this->pdvconfig->produto_parcial()){\r\n $query .= \"\tAND composicao_a.codproduto IN (SELECT codproduto FROM produto WHERE datalog >='\".date(\"Y/m/d\").\"') \";\r\n }\r\n $query .= \"ORDER BY composicao_a.codproduto, itcomposicao_a.quantidade DESC \";\r\n\r\n $res = $this->con->query($query);\r\n $arr = $res->fetchAll(2);\r\n $codprodutopai = 0;\r\n $contador = 1;\r\n foreach($arr as $row){\r\n if($row[\"codprodutopai\"] != $codprodutopai){\r\n $contador++;\r\n $codprodutopai = $row[\"codprodutopai\"];\r\n }\r\n $linha = \"0\".$this->delimitador; //0 Inclusao ou alteracao de registro, 1 Exclusao\r\n $linha .= \"14\".$this->delimitador; // Indetificacao do registro fixo\r\n $linha .= $this->valor_numerico($row[\"codprodutopai\"], 0, 14).$this->delimitador; // Codigo interno do produto kit\r\n $linha .= $this->valor_numerico($row[\"codprodutofilho\"], 0, 14).$this->delimitador; // Codigo interno do componente do kit\r\n $linha .= $this->valor_numerico($row[\"quantidade\"], 3, 9).$this->delimitador; // Quantidade do componente no kit\r\n $linha .= $contador.$this->delimitador; // Nivel de preco do componete no kit\r\n $this->arr_registro[] = $linha;\r\n }\r\n\r\n\r\n /* foreach($arr_composicao as $composicao){\r\n $linha = \"0\".$this->delimitador; //0 Inclusao ou alteracao de registro, 1 Exclusao\r\n $linha .= \"14\".$this->delimitador; // Indetificacao do registro fixo\r\n $linha .= $this->valor_numerico($composicao[\"codproduto\"],0,14).$this->delimitador; // Codigo interno do produto kit\r\n $linha .= $this->valor_numerico($composicao[\"codprodutofilho\"],0,14).$this->delimitador; // Codigo interno do componente do kit\r\n $linha .= $this->valor_numerico($composicao[\"quantidade\"],3,9).$this->delimitador; // Quantidade do componente no kit\r\n $linha .= $this->valor_numerico(0,0,3).$this->delimitador; // Nivel de preco do componete no kit\r\n $this->arr_registro[] = $linha;\r\n } */\r\n }", "title": "" }, { "docid": "adb8a13be340abfba78b161b01493109", "score": "0.523685", "text": "public function agregarStock($producto, $cantidad)\n {\n\n if (!isset($this->stock[$producto])) {\n $this->stock[$producto] = 0;\n }\n\n if ($this->capacidadMaxima >= $cantidad) {\n $this->stock[$producto] += $cantidad;\n $this->capacidadMaxima = $this->capacidadMaxima - $cantidad;\n return true;\n }\n\n\n echo \"no se puede agregar producto, capacidad llena\";\n return false;\n }", "title": "" }, { "docid": "170a2e3e99cdc946b5b6b4205b936f2e", "score": "0.522875", "text": "function consultarOrdenesCompraSolicitudMaterialesProyecto($proyecto_material_solicitud_compra_id) {\n\t\tif ($proyecto_material_solicitud_compra_id !== null) {\n\t\t\t$this->db->select($this->t_proyecto_material_solicitud_compra_orden_compra.'.*, '.$this->t_proveedor.'.nombre_proveedor, '.$this->t_proyecto_material_solicitud_compra_orden_compra_estado.'.proyecto_material_solicitud_compra_orden_compra_estado');\n\t\t\t$this->db->join($this->t_proveedor, $this->t_proveedor.'.proveedor_id = '.$this->t_proyecto_material_solicitud_compra_orden_compra.'.proveedor_id');\n\t\t\t$this->db->join($this->t_proyecto_material_solicitud_compra_orden_compra_estado, $this->t_proyecto_material_solicitud_compra_orden_compra_estado.'.proyecto_material_solicitud_compra_orden_compra_estado_id = '.$this->t_proyecto_material_solicitud_compra_orden_compra.'.proyecto_material_solicitud_compra_orden_compra_estado_id');\n\t\t\t$this->db->where('proyecto_material_solicitud_compra_id', $proyecto_material_solicitud_compra_id);\n\t\t\t$this->db->order_by($this->t_proyecto_material_solicitud_compra_orden_compra.'.proyecto_material_solicitud_compra_orden_compra_id', 'ASC');\n\t\t\t$result_ordenes_compra = $this->db->get($this->t_proyecto_material_solicitud_compra_orden_compra);\n\n\t\t\t$result_ordenes_compra_count = $result_ordenes_compra->num_rows();\n\t\t\tif($result_ordenes_compra_count> 0){\n\t\t\t\t$proveedores = array();\n\t\t\t\t$result_ordenes_compra_rows = $this->security->xss_clean($result_ordenes_compra->result_array());\n\t\t\t\tforeach ($result_ordenes_compra_rows as $korden => $vorden) {\n\t\t\t\t\t$proveedores[$vorden['proveedor_id']]['proveedor_id'] = $vorden['proveedor_id'];\n\t\t\t\t\t$proveedores[$vorden['proveedor_id']]['nombre_proveedor'] = $vorden['nombre_proveedor'];\n\t\t\t\t\t$proveedores[$vorden['proveedor_id']]['ordenes_compra'][] = $vorden;\n\t\t\t\t}\n\t\t\t\t$result = array(\n\t\t\t\t\t\t\t'total_rows' => $result_ordenes_compra_count,\n\t\t\t\t\t\t\t'datos' => $proveedores,\n\t\t\t\t\t\t\t);\n\t\t\t\treturn $result;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "b82e2d022ac82da7808439ab261ea6dc", "score": "0.5227861", "text": "public static function getAllTblproductcomplemByTblordencompra($idtblordencompra,$fechapedido){\n\n\t\t$fechapedidoingresada = new DateTime($fechapedido);\n $fechahoy = new DateTime(\"now\");\n $interval= $fechahoy->diff($fechapedidoingresada);\n $diasMinimos= $interval->format('%d');\n \n $diasemana= $fechapedidoingresada->format('l'); \n \n if($fechapedidoingresada == $fechahoy){ \n $tipodepedido= 1; //pedidoparahoy\n $stock=1;\n }else{\n $tipodepedido= 2; //pedidoparaotrodia\n $stock=0;\n }\n\n\n\t\t$activado=1;\n\t\t$consulta = \"SELECT TPC.*, TPV.* FROM tblproductcomplem TPC\n\t\t\tINNER JOIN tblproveedor TPV ON TPC.tblproveedor_idtblproveedor = TPV.idtblproveedor\n\t\t\tINNER JOIN tblproducto TP ON TPV.idtblproveedor = TP.tblproveedor_idtblproveedor \n\t\t\tINNER JOIN tblproductdetalle TPD ON TP.idtblproducto = TPD.tblproducto_idtblproducto\n\t\t\tINNER JOIN tblcarritoproduct TCP ON TPD.idtblproductdetalle = TCP.tblcarritoproduct_idtblproductdetalle\n\t\t\t\tWHERE TCP.tblcarritoproduct_idtblordencompra = ? AND \n\t\t\t\t\t TPC.tblproductcomplem_activado = ? AND \n\t\t\t\t\t TPC.tblproductcomplem_stock >= ? \n\t\t\t\tGROUP BY TPC.idtblproductcomplem\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$idtblordencompra,PDO::PARAM_INT);\n\t\t\t$resultado->bindParam(2,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->bindParam(3,$stock,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "8e3959c8bda41e8aa78ba5af556c793c", "score": "0.5202062", "text": "function agregarItem()\n{ \n global $NOTI_ERROR;\n global $NOTI_SUCCESS;\n \n\n $tabla = DAOFactory::getProductoDAO()->queryAllOrderBy('id');\n\n if(count($tabla)>0)\n {\n $row = $tabla[count($tabla)-1];\n $ultimoproducto = $row->id;\n }\n else\n {\n $ultimoproducto=0;\n }\n\n $error_msg = '';\n if($_POST['txtNomProEsp']=='')\n {\n $error_msg = $error_msg.'Falta el Nombre en Español<br>';\n }\n\n\n if($_POST['txtProdEsp']=='')\n {\n $error_msg = $error_msg . 'Falta Descripcion<br>';\n }\n\n\n if($error_msg == '')\n {\n $producto = new Producto();\n $producto->idSeccion = $_POST['cboSeccion'];\n $producto->idAlbum = $_POST['cboAlbum'];\n $producto->idTipoProducto = $_POST['cboTipoProducto'];\n $producto->populate=0;\n $producto->nombreEsp = $_POST['txtNomProEsp'];\n $producto->nombreIng = \"#\";\n $producto->descripcionEsp=$_POST['txtProdEsp'];\n $producto->descripcionIng= \"#\";\n $producto->top10=$_POST['top10'];\n\n\n $transaction = new Transaction();\n DAOFactory::getProductoDAO()->insert($producto);\n\n if($producto->id > $ultimoproducto)\n {\n\n $cantPrecio = $_POST['contPrecio'];\n\n for ($i=0;$i<$cantPrecio;$i++)\n {\n $nuevoPrecio = new PrecioProducto();\n\n $Id =$i+1;\n $nuevoPrecio->idProducto=$producto->id;\n $nuevoPrecio->nombre =$_POST['txtNomPrecio'.$Id];\n $nuevoPrecio->valor =$_POST['txtPrecio'.$Id];\n\n DAOFactory::getPrecioProductoDAO()->insert($nuevoPrecio);\n }\n\n\n $transaction->commit();\n \n //Notificacion\n notificacion('Producto Agregado Correctamente', $NOTI_SUCCESS);\n \n //Muestro Los Items\n verItems();\n }\n\n }\n else{ \n //Notificacion\n notificacion($error_msg, $NOTI_SUCCESS);\n }\n //GrillaProductos();\n \n}", "title": "" }, { "docid": "bfa38ac89ac103778b4a8d914e4aae20", "score": "0.51960164", "text": "private function reducirProductoCarrito($indice)\r\n {\r\n $carrito = $this->session->carrito;\r\n $producto = $carrito[$indice];\r\n if(!$producto->bandera_precio_manual)\r\n {\r\n if($producto->cantidad > 1)\r\n {\r\n $producto->cantidad--;\r\n $producto->precio_venta = $this->calcularPrecioDeVenta($producto->precio, $producto->incremento);\r\n $descuento_calculado = $this->calcularDescuento($producto->precio, $producto->descuento_porcentaje);\r\n $producto->total = ($producto->precio_venta - $descuento_calculado)*($producto->cantidad);\r\n $carrito[$indice] = $producto;\r\n $this->session->set_userdata('carrito', $carrito);\r\n }\r\n }\r\n else\r\n {\r\n if($producto->cantidad > 1)\r\n {\r\n $producto->cantidad--;\r\n $descuento_calculado = $this->calcularDescuento($producto->precio_venta, $producto->descuento_porcentaje);\r\n $producto->total = ($producto->precio_venta - $descuento_calculado)*($producto->cantidad);\r\n $carrito[$indice] = $producto;\r\n $this->session->set_userdata('carrito', $carrito);\r\n }\r\n //$this->mensaje('Bandera precio manual', 'warning');\r\n }\r\n\r\n\r\n }", "title": "" }, { "docid": "817dfeacc3494bb2741683a4280c24aa", "score": "0.5190303", "text": "public function add(){\n\t\tif(isset($_SESSION['identity'])){//verifico si me logie\n\t\t\t$usuario_id = $_SESSION['identity']->id;//guardo el id del usuario\n\t\t\t$provincia = isset($_POST['provincia']) ? $_POST['provincia'] : false;//si existe el dato lo guado si no guardo false\n\t\t\t$localidad = isset($_POST['localidad']) ? $_POST['localidad'] : false;\n\t\t\t$direccion = isset($_POST['direccion']) ? $_POST['direccion'] : false;\n\n\t\t\t$stats = Utils::statsCarrito();//me trae la cantidad de los productos y el total de plata\n\t\t\t$coste = $stats['total'];\n\n\t\t\tif($provincia && $localidad && $direccion){//si existen estos datos\n\t\t\t\t// Guardar datos en bd\n\t\t\t\t$pedido = new Pedido();//instancio Pedido del modelo y seteo con lo llegado del post\n\t\t\t\t$pedido->setUsuario_id($usuario_id);\n\t\t\t\t$pedido->setProvincia($provincia);\n\t\t\t\t$pedido->setLocalidad($localidad);\n\t\t\t\t$pedido->setDireccion($direccion);\n\t\t\t\t$pedido->setCoste($coste);\n\n\t\t\t\t$save = $pedido->save();//llamo al metodo q esta en el modelo class pedido y guardo en la base de datos todo y pongo estado confirm\n\n\t\t\t\t// Guardar linea pedido\n\t\t\t\t$save_linea = $pedido->save_linea();//llamo al metodo q esta en el modelo class pedido\n\t\t\t\t//y voy guardando con un foreach todos los productos del carrito a una tabla lineas_pedidos con el mismo numero de pedido\n\n\n\n// ACTUALIZA EL STOCK DEL PRODUCTO\n\t\t\t\t$updates=$pedido->updateStock();\n\n\t\t\t\tif($save && $save_linea && $updates){//si se guardo estas dos query\n\t\t\t\t\t$_SESSION['pedido'] = \"complete\";//creo la session\n\t\t\t\t}else{\n\t\t\t\t\t$_SESSION['pedido'] = \"failed\";\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\t$_SESSION['pedido'] = \"failed\";\n\t\t\t}\n\n\t\t\theader(\"Location:\".base_url.'Pedido/confirmado');//voy a pedidoController y llamo al metodo confirmado\n\t\t}else{\n\t\t\t// Redigir al index al no estar logeado\n\t\t\theader(\"Location:\".base_url);\n\t\t}\n\t}", "title": "" }, { "docid": "21c23ac8df68439137dc3d1912ebc80b", "score": "0.51826435", "text": "public static function atualizarUltimaCompra(ProdutoVariacao $pv)\n {\n // Busca Ultima Compra da Variacao\n $sql = \"\n select\n tblnotafiscal.emissao\n , tblnotafiscalprodutobarra.valortotal\n , tblnotafiscalprodutobarra.quantidade * coalesce(tblprodutoembalagem.quantidade, 1) as quantidade\n , tblprodutoembalagem.quantidade as lotecompra\n from tblnotafiscal\n inner join tblnaturezaoperacao on (tblnaturezaoperacao.codnaturezaoperacao = tblnotafiscal.codnaturezaoperacao)\n inner join tblnotafiscalprodutobarra on (tblnotafiscalprodutobarra.codnotafiscal = tblnotafiscal.codnotafiscal)\n inner join tblprodutobarra on (tblprodutobarra.codprodutobarra = tblnotafiscalprodutobarra.codprodutobarra)\n left join tblprodutoembalagem on (tblprodutoembalagem.codprodutoembalagem = tblprodutobarra.codprodutoembalagem )\n inner join tblpessoa on (tblpessoa.codpessoa = tblnotafiscal.codpessoa)\n where tblprodutobarra.codprodutovariacao = :codprodutovariacao\n and tblnotafiscal.nfeinutilizacao is null\n and tblnotafiscal.nfecancelamento is null\n and (tblnaturezaoperacao.compra = true)\n and tblpessoa.codpessoa not in (select tblfilial.codpessoa from tblfilial)\n order by tblnotafiscal.emissao desc\n limit 1\n \";\n $compra = DB::select($sql, [\n 'codprodutovariacao' => $pv->codprodutovariacao\n ]);\n $dataultimacompra = null;\n $quantidadeultimacompra = null;\n $custoultimacompra = null;\n $lotecompra = 1;\n if (isset($compra[0])) {\n $dataultimacompra = $compra[0]->emissao;\n $quantidadeultimacompra = $compra[0]->quantidade;\n if ($quantidadeultimacompra > 0) {\n $custoultimacompra = $compra[0]->valortotal / $quantidadeultimacompra;\n $lotecompra = $compra[0]->lotecompra;\n if (empty($lotecompra)) {\n $lotecompra = 1;\n $embs = $pv->Produto->ProdutoEmbalagemS()->orderBy('quantidade', 'desc')->get();\n foreach ($embs as $emb) {\n $v = $quantidadeultimacompra / $emb->quantidade;\n if (ceil($v) == $v) {\n $lotecompra = $emb->quantidade;\n break;\n }\n }\n }\n }\n }\n return $pv->update([\n 'dataultimacompra' => $dataultimacompra,\n 'quantidadeultimacompra' => $quantidadeultimacompra,\n 'custoultimacompra' => $custoultimacompra,\n 'lotecompra' => $lotecompra,\n ]);\n }", "title": "" }, { "docid": "f36e6f4a09faf8edc2239689326b47ec", "score": "0.51791435", "text": "function actualizarEstadoOrdenCompra($proyecto_id, $proyecto_material_solicitud_compra_orden_compra_id, $proyecto_material_solicitud_compra_orden_compra_estado_id) {\n\t\t$this->db->where('proyecto_material_solicitud_compra_orden_compra_id', $proyecto_material_solicitud_compra_orden_compra_id);\n\t\t$estado_previo = $this->db->get($this->t_proyecto_material_solicitud_compra_orden_compra);\n\t\t$estado_previo_count = $estado_previo->num_rows();\n\t\t$stado_previo_row = null;\n\t\tif ($estado_previo_count > 0) {\n\t\t\t$estado_previo_row = $estado_previo->row();\n\t\t}\n\n\t\t// Actualiza el estado\n\t\t$this->db->set('proyecto_material_solicitud_compra_orden_compra_estado_id', $proyecto_material_solicitud_compra_orden_compra_estado_id);\n\t\t$this->db->where('proyecto_material_solicitud_compra_orden_compra_id', $proyecto_material_solicitud_compra_orden_compra_id);\n\t\t$this->db->update($this->t_proyecto_material_solicitud_compra_orden_compra);\n\t\t// Cambia el estado de los materiales\n\t\t$this->cambiarEstadoMaterialesPorOrdenDespuesCompra($proyecto_id);\n\n\t\t// Si la orden antes no estaba aprobada y ahora si\n\t\tif($estado_previo_row->proyecto_material_solicitud_compra_orden_compra_estado_id != 3 && $proyecto_material_solicitud_compra_orden_compra_estado_id == 3){\n\t\t\t$this->registrarGastoMaterialOrdenCompra($proyecto_id, $proyecto_material_solicitud_compra_orden_compra_id);\n\t\t} else if ($estado_previo_row->proyecto_material_solicitud_compra_orden_compra_estado_id == 3 && $proyecto_material_solicitud_compra_orden_compra_estado_id != 3){\n\t\t\t$this->eliminarGastoMaterialOrdenCompra($proyecto_material_solicitud_compra_orden_compra_id);\n\t\t}\n\t\treturn array(\n\t\t\t'tipo' => 'success',\n\t\t\t'texto' => 'Se actualizó el estado de la orden de compra correctamente',\n\t\t);\n\n\t}", "title": "" }, { "docid": "1b77990b1e087b22dccf29d2bf797e86", "score": "0.51749814", "text": "function registra_prorrateo($acceso,$final_cargo_tipo,$reemplaza_act){\n\t\t$dias_a_cobrar=$this->dias_a_cobrar($acceso,$final_cargo_tipo);\n\t\t\techo \"<br>: dias_cobrar : $dias_a_cobrar:\";\n\t\t$dato=lectura($acceso,\"select * from contrato_servicio,servicios where contrato_servicio.id_serv=servicios.id_serv and id_contrato='$this->id_contrato' and status_con_ser='CONTRATO' and tipo_costo='COSTO MENSUAL'\");\n\t\tfor($i=0;$i<count($dato);$i++){\n\t\t\t$id_serv=trim($dato[$i]['id_serv']);\n\t\t\t$costo_cobro=trim($dato[$i]['costo_cobro'])+0;\n\t\t\t$cant_serv=trim($dato[$i]['cant_serv'])+0;\n\t\t\t\n\t\t\t$tarifa_ser='';\n\t\t\t\n\t\t\t$tarifa_ser=verTarifa($acceso,$this->fecha_final,$id_serv);\n\t\t\t\n\t\t\t$acceso->objeto->ejecutarSql(\"select tarifa_esp from servicios where id_serv='$id_serv'\"); \n\t\t\t if($row=row($acceso)){\n\t\t\t\t$tarifa_esp=trim($row['tarifa_esp']);\n\t\t\t }\n\t\t\tif($tarifa_esp==\"TRUE\"){\n\t\t\t\t\t$tarifa_ser=$costo_cobro;\n\t\t\t}\n\t\t\t// echo \":$tarifa_ser:tarifa: $tarifa_ser :\";\n\t\t\tlist($anio_final,$mes_final,$dia)=explode(\"-\",$this->fecha_final);\n\t\t\t$ult_dia_mes_act=date(\"t\",mktime( 0, 0, 0, $mes_final, 1, $anio_final ));\n\t\t\t//$fecha1 = \"$anio_final-$mes_final-01\";\n\t\t\t$fecha1 = $anio_final.\"-\".$mes_final.\"-01\";\n\t\t\t//echo \":$dias_a_cobrar:$tarifa_ser:$ult_dia_mes_act:\";\n\t\t\t$restante=(($dias_a_cobrar*$tarifa_ser)/$ult_dia_mes_act)+0;\n\t\t\t$restante=number_format($restante, 0, '.', '');\n\t\t\t$this->registra_cargo_prorrateo($acceso,$restante,$fecha1,$id_serv,$cant_serv,$reemplaza_act);\n\t\t}\n\t}", "title": "" }, { "docid": "2b7d1e620310a588394c090137cc673b", "score": "0.5167262", "text": "private function aumentarProductoCarrito($indice)\r\n {\r\n $carrito = $this->session->carrito;\r\n //Extrae el producto especifico\r\n $producto = $carrito[$indice];\r\n if(!$producto->bandera_precio_manual)\r\n {\r\n $producto->precio_venta = $this->calcularPrecioDeVenta($producto->precio, $producto->incremento);\r\n $producto->cantidad++;\r\n $descuento_calculado = $this->calcularDescuento($producto->precio, $producto->descuento_porcentaje);\r\n $producto->total = ($producto->precio_venta - $descuento_calculado)*($producto->cantidad);\r\n $carrito[$indice] = $producto;\r\n $this->session->set_userdata('carrito', $carrito);\r\n }\r\n else\r\n {\r\n //$this->mensaje('Bandera precio manual', 'warning');\r\n //Incrementa la cantidad\r\n $producto->cantidad++;\r\n $descuento_calculado = $this->calcularDescuento($producto->precio_venta, $producto->descuento_porcentaje);\r\n $producto->total = ($producto->precio_venta - $descuento_calculado)*($producto->cantidad);\r\n $carrito[$indice] = $producto;\r\n $this->session->set_userdata('carrito', $carrito);\r\n }\r\n }", "title": "" }, { "docid": "5e7be898a3c40f8ed648d9a39a3c081c", "score": "0.51656824", "text": "private function obtenerDiferencias($id_producido,$id_maquina = null){\n //La denominacion carga es la que se utilizo para convertir a plata al momento de importar, la denominacion sale de la que tenia la maquina al importarte que no necesariamente es la misma al momento de validar producido\n //para santa fe y melincue que se importa en pesos, la denominacion de carga es 1, por lo que no afecta, pero en rosario, que se importa en creditos, si importa y tiene q ser distinto de 1\n //conclusion, si es de Santa Fe queda en plata, porque la denominacion es 1, si es de rosario se hace un cambio previo para cambiarlo a creditos\n \n //Lo paso a creditos, en Rosario se usa \"denominacion_carga\" porque se toma la que esta al momento al importar\n //En SantaFe/Mel uso la de la maquina (tiene denominacion_carga = 1 por defecto)\n //Como la division es de izquierda a derecha, termina pasando a creditos\n //x/denominacion_carga/denominacion\n //Si es de SantaFe Melinque => x/1/denominacion = x/denominacion\n //Si es de Rosario => x/denominacion_carga/1 = x/denominacion_carga\n\n //Se hizo de esta forma porque pensaba que era el cuello de botella (funcionaba MUUUY lento). Despues descubri que el cuello de botella\n //era el join complejo de contador_horario, le termine agregando un indice y lo hizo MUCHO mas rapido. Es totalmente razonable\n //(y mas mantenible) devolver los valores brutos para cada atributo y a estos calculos hacerlos en PHP, ahora creo que ya quedo asi y\n //no quiero tocarlo por ahora - Octavio 29 Junio 2021\n $a_credito_ini = 'IFNULL(dc_ini.denominacion_carga,1.0)/IF(p.id_casino = 3,1.0,m.denominacion)';\n $coinin_ini = 'IFNULL(dc_ini.coinin,.0)/'.$a_credito_ini;\n $coinout_ini = 'IFNULL(dc_ini.coinout,.0)/'.$a_credito_ini;\n $jackpot_ini = 'IFNULL(dc_ini.jackpot,.0)/'.$a_credito_ini;\n $progresivo_ini = 'IFNULL(dc_ini.progresivo,.0)/'.$a_credito_ini;\n $a_credito_fin = 'IFNULL(dc_fin.denominacion_carga,1.0)/IF(p.id_casino = 3,1.0,m.denominacion)';\n $coinin_fin = 'IFNULL(dc_fin.coinin,.0)/'.$a_credito_fin;\n $coinout_fin = 'IFNULL(dc_fin.coinout,.0)/'.$a_credito_fin;\n $jackpot_fin = 'IFNULL(dc_fin.jackpot,.0)/'.$a_credito_fin;\n $progresivo_fin = 'IFNULL(dc_fin.progresivo,.0)/'.$a_credito_fin;\n\n //plata para santa fe y credito para rosario\n $valor_inicio = sprintf('%s - %s - %s - %s',$coinin_ini,$coinout_ini,$jackpot_ini,$progresivo_ini);\n $valor_final = sprintf('%s - %s - %s - %s',$coinin_fin,$coinout_fin,$jackpot_fin,$progresivo_fin);\n //Se pasa a plata para comparar \n $delta = sprintf('ROUND(m.denominacion*((%s) - (%s)),2)',$valor_final,$valor_inicio);//denominacion * (creditos-creditos) = plata\n $diferencia = sprintf('ROUND((%s)-dp.valor,2)',$delta);//plata - plata\n $valor_cred = 'dp.valor/m.denominacion'; //(Al parecer) El dp.valor esta siempre en plata independiente del casino\n\n $retorno = DB::table('producido as p')\n ->join('detalle_producido as dp','dp.id_producido','=','p.id_producido')\n ->join('maquina as m','m.id_maquina','=','dp.id_maquina')\n ->join('contador_horario as cont_ini',function($j){\n return $j->on('cont_ini.fecha','=','p.fecha')\n ->on('cont_ini.id_casino','=','p.id_casino')->on('cont_ini.id_tipo_moneda','=','p.id_tipo_moneda');\n })\n ->join('contador_horario as cont_fin',function($j){\n return $j->on('cont_fin.fecha','=',DB::raw('DATE_ADD(p.fecha,INTERVAL 1 DAY)'))\n ->on('cont_fin.id_casino','=','p.id_casino')->on('cont_fin.id_tipo_moneda','=','p.id_tipo_moneda');\n })\n ->leftJoin('detalle_contador_horario as dc_ini',function($j){\n return $j->on('dc_ini.id_contador_horario','=','cont_ini.id_contador_horario')->on('dc_ini.id_maquina','=','m.id_maquina');\n })\n ->leftJoin('detalle_contador_horario as dc_fin',function($j){\n return $j->on('dc_fin.id_contador_horario','=','cont_fin.id_contador_horario')->on('dc_fin.id_maquina','=','m.id_maquina');\n })\n ->where('p.id_producido','=',$id_producido)->whereNull('dp.id_tipo_ajuste')\n ->orderBy('m.nro_admin','asc')\n ->selectRaw('p.id_casino as casino, dp.valor as producido, dp.id_detalle_producido,\n m.nro_admin, m.id_maquina, m.denominacion,\n dc_ini.id_detalle_contador_horario as id_detalle_contador_inicial,'.$coinin_ini.' as coinin_inicio,'.$coinout_ini.' as coinout_inicio,'.$jackpot_ini.' as jackpot_inicio,'.$progresivo_ini.' as progresivo_inicio,\n dc_fin.id_detalle_contador_horario as id_detalle_contador_final, '.$coinin_fin.' as coinin_final,'.$coinout_fin.' as coinout_final,'.$jackpot_fin.' as jackpot_final,'.$progresivo_fin.' as progresivo_final,\n '.$delta.' as delta,'.$diferencia.' as diferencia,'.$valor_cred.' as producido_cred')\n ->whereRaw($diferencia.' <> 0');\n\n //El valor opcional de id_maquina es para solo obtener una fila, hace mas rapido el request\n if(!is_null($id_maquina)) $retorno = $retorno->where('m.id_maquina','=',$id_maquina);\n\n return $retorno->get();\n }", "title": "" }, { "docid": "1d52042f6032649497999613c593faff", "score": "0.5151711", "text": "public function addStock($id_material,$id_cartonero,$fecha_entrega,$kilos){\n $sql = \"INSERT INTO stock_cartonero(id_material, dni_cartonero, fecha_entrega, kilos) VALUES (?, ?, ?, ?)\";\n $query = $this->getConnection()->prepare($sql); \n $result = $query->execute([$id_material,$id_cartonero,$fecha_entrega,$kilos]); \n return $result; \n }", "title": "" }, { "docid": "b7ddaa71b5bf6a4f64dec1b02847a603", "score": "0.5139782", "text": "public function actionAgregardelmaletin(){\n $id=$_GET['id'];\n $id=(integer)MiFactoria::cleanInput($id);\n $registrocompra=$this->loadModel($id);\n $mensaje=\"\";\n $filas=yii::app()->maletin->getvalues('Desolpe');\n\n if(count($filas)>0 ){\n\n foreach($filas as $fila){\n\n $registroitemcompra=New Docompratemp('ingresodesolpe');\n $filadesolpe=VwSolpeparacomprar::model()->findById($fila['idregistro']);\n //verificando la consistencia de la solpe\n\n if(is_null($filadesolpe))\n continue;\n if(\n is_null($filadesolpe->cant_pendiente)?0:$filadesolpe->cant_pendiente+\n is_null($filadesolpe->cantatendida)?0:$filadesolpe->cantatendida >\n $filadesolpe->cant\n )continue;\n\n $this->pasadatosacompra($filadesolpe,$registroitemcompra,$id);\n if(!$registroitemcompra->save())\n {\n $mensaje.=yii::app()->mensajes->getErroresItem($registroitemcompra->geterrors());\n }\n }\n\n\n }else{\n $mensaje.=\" No hay registros de solicitudes en el Maletín<br>\";\n }\n\n\n echo $mensaje;\n /* echo \"salio\";\n yii::app()->end();*/\n /* $id=(int)MiFactoria::cleanInput($_POST['idcompra']);\n$cadena=\"\";\n $modelocompra=$this->loadModel($id);\n $cest=$modelocompra->codestado;\n /*$desolpe=Desolpe::Model()->findBypK($_SESSION['350'][0]);\n $modelosolpe=Solpe::model()->findByPk($desolpe->hidsolpe);*/\n\n /* if($cest=='10' OR $cest=='99') {\n //RECORRIENDO LAS DESOLPES DEL MALETIN\n foreach (Yii::app()->session['DOC350'] as $clave=>$valor) {\n\n if(!$modelocompra->hayitemsolpe($valor,$modelocompra->idguia)) // si no se ha agregado antes esta IDDesolpe\n {\n $NUEV=NEW Docompratemp();\n if($NUEV->importadesolpe($valor,$modelocompra->idguia))\n $cadena.=\"se agrego ...<br>\";\n }\n\n\n }\n\n\n\n }\n echo $cadena;*/\n }", "title": "" }, { "docid": "5bf117772a195230e62a1ca18bbd0c11", "score": "0.5129578", "text": "static public function ctrCrearVenta(){\n \n\t\t// echo '<pre>';\n\t\t// var_dump($_POST);\n\t\t// echo '</pre>';\n\t\t// return;\n\n if(isset($_POST[\"nuevaVenta\"])){ \n\t\t\t\n\t\t\t/*=============================================\n\t\t\tACTUALIZAR LAS COMPRAS DEL CLIENTE Y REDUCIR EL STOCK \n\t\t\tY AUMENTAR LAS VENTAS DE LOS PRODUCTOS\n\t\t\t=============================================*/\n\n $listaProductos = json_decode($_POST[\"listaProductos\"], true);\n // var_dump($listaProductos);\n \n $totalProductosComprados = array();\n\n\t\t\tforeach($listaProductos as $key => $value) {\n\t\t\t\t// \techo $value[\"id\"];\n\t\t\t\t// \treturn;\n\n\t\t\t\tarray_push($totalProductosComprados, $value[\"cantidad\"]);\n\n\t\t\t\t$item = \"id_inventario\";\n\t\t\t\t$valor = $value[\"id\"];\n\t\t\t\t$all = null;\n\n\t\t\t\t$tablaProductos = \"tbl_inventario\"; \n\t\t\t\t$traerProducto = ModeloProductos::mdlMostrarProductos($tablaProductos, $item, $valor, $all);\n\t\t\t\t// var_dump($traerProducto[\"ventas\"]);\n\n\t\t\t\t$item1 = \"venta\";\n\t\t\t\t$valor1 = $value[\"cantidad\"] + $traerProducto[\"venta\"];\n\t\t\t\t$item2 = $item;\n\t\t\t $valor2 = $valor;\n\n $nuevasVentas = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1, $valor1, $item2, $valor2); \n\n\t\t\t\t$item1 = \"stock\";\n\t\t\t\t$valor1 = $value[\"stock\"];\n\t\t\t\t$item2 = $item;\n\t\t\t $valor2 = $valor;\n\n\n\t\t\t\t$nuevoStock = ModeloProductos::mdlActualizarProducto($tablaProductos, $item1, $valor1, $item2, $valor2);\n\n }\n\t\t\t\n $tabla1 = \"tbl_personas\";\n $tabla2 = \"tbl_clientes\";\n\t\t\t$item = \"id_personas\";\n\t\t\t$valor = $_POST[\"seleccionarCliente\"];\n\n\t\t\t// echo $valor;\n\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tabla1, $tabla2, $item, $valor);\n\t\t\t// var_dump($traerCliente); \n\t\t\t// return; \n\t\t\t// return;\n\t\t\t$idCliente = $traerCliente['id_cliente'];\n\n\t\t\t$item1 = \"compras\";\n\t\t\t$valor1 = 2 + $traerCliente[\"compras\"];\n\t\t\t// echo $valor1;\n\t\t\t// return;\n\n\t\t\t$item2 = \"id_cliente\";\n\t\t\t$valor2 = $idCliente;\n\t\t\t$comprasCliente = ModeloClientes::mdlActualizarCliente($tabla2, $item1, $valor1, $item2, $valor2);\n\t\t\t\n\t\t\t// var_dump($comprasCliente); \n\t\t\t// return; \n\t\t\t// echo $valor;\n\t\t\t// return;\n\n\t\t\t$item1 = \"ultima_compra\";\n\n\t\t\tdate_default_timezone_set('America/Tegucigalpa');\n\n\t\t\t$fecha = date('Y-m-d');\n\t\t\t$hora = date('H:i:s');\n\t\t\t$valor1 = $fecha.' '.$hora;\n\n\t\t\t$item2 = \"id_cliente\";\n\t\t\t$valor2 = $idCliente;\n\n $fechaCliente = ModeloClientes::mdlActualizarCliente($tabla2, $item1, $valor1, $item2, $valor2);\n\n /*=============================================\n\t\t\tGUARDAR LA COMPRA\n\t\t\t=============================================*/\t\n\n\t\t\t$tabla = \"tbl_venta\";\n\n\t\t\t$datos = array(\"id_vendedor\"=>$_POST[\"idVendedor\"],\n\t\t\t\t\t\t \"id_cliente\"=>$idCliente,\n\t\t\t\t\t\t \"numero_factura\"=>$_POST[\"nuevaVenta\"],\n\t\t\t\t\t\t \"productos\"=>$_POST[\"listaProductos\"],\n\t\t\t\t\t\t \"impuesto\"=>$_POST[\"nuevoPrecioImpuesto\"],\n\t\t\t\t\t\t \"neto\"=>$_POST[\"nuevoPrecioNeto\"],\n\t\t\t\t\t\t \"total\"=>$_POST[\"totalVenta\"]);\n\t\t\t\n\t\t\t// echo '<pre>';\n\t\t\t// var_dump($datos);\n\t\t\t// echo '</pre>';\n\t\t\t// return;\t\t\t \n\n\t\t\t$respuesta = ModeloVentas::mdlIngresarVenta($tabla, $datos);\n\n\t\t\t// var_dump($respuesta);\n\t\t\t// return;\n\n\n\t\t\tif ($respuesta == true && $_POST['enviarFactura'] == 'on'){\n\n\t\t\t\t\n\t\t\t\t$descripcionEvento = \"Nueva venta\";\n\t\t\t\t$accion = \"Nueva\";\n $bitacoraConsulta = ControladorMantenimientos::ctrBitacoraInsertar($_SESSION[\"id_usuario\"], 5,$accion, $descripcionEvento);\n\n\t\t\t\t// if($_POST['idPersona'] != \"\"){\n\n\t\t\t\t\t$tabla1 = \"tbl_personas\";\n\t\t\t\t\t$tabla2 = \"tbl_clientes\";\n\t\t\t\t\t$item = \"id_personas\";\n\t\t\t\t\t$valor = $_POST[\"seleccionarCliente\"];\n\t\n\t\t\t\t\t$traerCliente = ModeloClientes::mdlMostrarClientes($tabla1, $tabla2, $item, $valor);\n\t\t\t\t\t// echo($valor);\n\t\t\t\t\t// var_dump($traerCliente);\n\t\t\t\t\t// return;\n\t\n\t\t\t\t\t$correoDestinatario = $traerCliente['correo'];\n\t\t\t\t\t$nombreDestinatario = $traerCliente['nombre'] .' '. $traerCliente['apellidos'];\n\t\t\t\t\t$numeroFactura= $_POST[\"nuevaVenta\"];\n\t\t\t\t\t$impuesto= $_POST[\"nuevoPrecioImpuesto\"];\n\t\t\t\t\t$neto= $_POST[\"nuevoPrecioNeto\"];\n\t\t\t\t\t$total= $_POST[\"totalVenta\"];\n\t\t\t\t\t$asunto = 'RECIBO DE PAGO, GIMNASIO LA ROCA.';\n\t\t\t\t\t$require = false;\n\t\t\t\t\t// $enviarFactura = $_POST[\"enviarFactura\"]; \n\t\t\t\t\t## 07.12.2020\n\t\t\t\t\t\n\t\t\t\t\t// echo $correoDestinatario;\n\t\t\t\t\t// return;\n\n\t\t\t\t\t// $template = file_get_contents('extensiones/plantillas/factura.php');\n\t\t\t\t\t// $template = str_replace(\"{{nombre}}\", $nombreDestinatario, $template);\n\t\t\t\t\t// $template = str_replace(\"{{numero_factura}}\", $_POST['nuevaVenta'], $template);\n\t\t\t\t\t// $template = str_replace(\"{{total}}\", $_POST['totalVenta'], $template);\n\t\t\t\t\t// $template = str_replace(\"{{fecha}}\", date('Y-m-d'), $template);\n\n\t\t\t\t\t// $decodificar_productos = json_decode($_POST[\"listaProductos\"]);\n\t\t\t\t\t// var_dump($decodificar_productos);\n\t\t\t\t\t// return;\n \n\t\t\t\t\t// foreach ($decodificar_productos as $productos ) {\n\t\t\t\t\n\t\t\t\t\t\t// echo $productos->total;\n\t\t\t\t\t\t// // return;\n\t\t\t\t\t\t// $template = str_replace(\"{{descripcion_producto}}\", $productos->descripcion, $template);\n\t\t\t\t\t\t// $template = str_replace(\"{{total_productos}}\",$productos->total, $template);\n\t\t\t\t\t// }\n\t\t\t\t\t// $template = str_replace(\"{{neto}}\", $_POST['nuevoPrecioNeto'], $template);\n\t\t\t\t\t// $template = str_replace(\"{{impuesto}}\", $_POST['nuevoPrecioImpuesto'], $template);\n\t\t\t\t\t// $template = str_replace(\"{{total_final}}\", $_POST['totalVenta'], $template);\n\t\t\t\t\t// $template = str_replace(\"{{anio}}\", date('Y'), $template);\n\t\t\t\t\t// $template = str_replace(\"{{direccion_empresa}}\", date('Y-m-d'), $template);\n\t\t\t\t\t\n\n\n\t\t\t\t\t$template = ' \n\t\t\t\t\t<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\t\t\t\t\t\t<html xmlns=\"http://www.w3.org/1999/xhtml\">\n\t\t\t\t\t\t<head>\n\t\t\t\t\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n\t\t\t\t\t\t\t<meta name=\"x-apple-disable-message-reformatting\" />\n\t\t\t\t\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n\t\t\t\t\t\t\t<meta name=\"color-scheme\" content=\"light dark\" />\n\t\t\t\t\t\t\t<meta name=\"supported-color-schemes\" content=\"light dark\" />\n\t\t\t\t\t\t\t<title></title>\n\t\t\t\t\t\t\t<style type=\"text/css\" rel=\"stylesheet\" media=\"all\">\n\t\t\t\t\t\t\t/* Base ------------------------------ */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@import url(\"https://fonts.googleapis.com/css?family=Nunito+Sans:400,700&display=swap\");\n\t\t\t\t\t\t\tbody {\n\t\t\t\t\t\t\twidth: 100% !important;\n\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t\t-webkit-text-size-adjust: none;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ta {\n\t\t\t\t\t\t\tcolor: #3869D4;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ta img {\n\t\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttd {\n\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.preheader {\n\t\t\t\t\t\t\tdisplay: none !important;\n\t\t\t\t\t\t\tvisibility: hidden;\n\t\t\t\t\t\t\tmso-hide: all;\n\t\t\t\t\t\t\tfont-size: 1px;\n\t\t\t\t\t\t\tline-height: 1px;\n\t\t\t\t\t\t\tmax-height: 0;\n\t\t\t\t\t\t\tmax-width: 0;\n\t\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* Type ------------------------------ */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbody,\n\t\t\t\t\t\t\ttd,\n\t\t\t\t\t\t\tth {\n\t\t\t\t\t\t\tfont-family: \"Nunito Sans\", Helvetica, Arial, sans-serif;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\th1 {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t\tcolor: #333333;\n\t\t\t\t\t\t\tfont-size: 22px;\n\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\ttext-align: left;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\th2 {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t\tcolor: #333333;\n\t\t\t\t\t\t\tfont-size: 16px;\n\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\ttext-align: left;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\th3 {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t\tcolor: #333333;\n\t\t\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\ttext-align: left;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttd,\n\t\t\t\t\t\t\tth {\n\t\t\t\t\t\t\tfont-size: 16px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tp,\n\t\t\t\t\t\t\tul,\n\t\t\t\t\t\t\tol,\n\t\t\t\t\t\t\tblockquote {\n\t\t\t\t\t\t\tmargin: .4em 0 1.1875em;\n\t\t\t\t\t\t\tfont-size: 16px;\n\t\t\t\t\t\t\tline-height: 1.625;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tp.sub {\n\t\t\t\t\t\t\tfont-size: 13px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* Utilities ------------------------------ */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.align-right {\n\t\t\t\t\t\t\ttext-align: right;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.align-left {\n\t\t\t\t\t\t\ttext-align: left;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.align-center {\n\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* Buttons ------------------------------ */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.button {\n\t\t\t\t\t\t\tbackground-color: #3869D4;\n\t\t\t\t\t\t\tborder-top: 10px solid #3869D4;\n\t\t\t\t\t\t\tborder-right: 18px solid #3869D4;\n\t\t\t\t\t\t\tborder-bottom: 10px solid #3869D4;\n\t\t\t\t\t\t\tborder-left: 18px solid #3869D4;\n\t\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\t\tcolor: #FFF;\n\t\t\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t\t\tborder-radius: 3px;\n\t\t\t\t\t\t\tbox-shadow: 0 2px 3px rgba(0, 0, 0, 0.16);\n\t\t\t\t\t\t\t-webkit-text-size-adjust: none;\n\t\t\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.button--green {\n\t\t\t\t\t\t\tbackground-color: #22BC66;\n\t\t\t\t\t\t\tborder-top: 10px solid #22BC66;\n\t\t\t\t\t\t\tborder-right: 18px solid #22BC66;\n\t\t\t\t\t\t\tborder-bottom: 10px solid #22BC66;\n\t\t\t\t\t\t\tborder-left: 18px solid #22BC66;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.button--red {\n\t\t\t\t\t\t\tbackground-color: #FF6136;\n\t\t\t\t\t\t\tborder-top: 10px solid #FF6136;\n\t\t\t\t\t\t\tborder-right: 18px solid #FF6136;\n\t\t\t\t\t\t\tborder-bottom: 10px solid #FF6136;\n\t\t\t\t\t\t\tborder-left: 18px solid #FF6136;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@media only screen and (max-width: 500px) {\n\t\t\t\t\t\t\t.button {\n\t\t\t\t\t\t\t\twidth: 100% !important;\n\t\t\t\t\t\t\t\ttext-align: center !important;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* Attribute list ------------------------------ */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.attributes {\n\t\t\t\t\t\t\tmargin: 0 0 21px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.attributes_content {\n\t\t\t\t\t\t\tbackground-color: #F4F4F7;\n\t\t\t\t\t\t\tpadding: 16px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.attributes_item {\n\t\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* Related Items ------------------------------ */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.related {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t\tpadding: 25px 0 0 0;\n\t\t\t\t\t\t\t-premailer-width: 100%;\n\t\t\t\t\t\t\t-premailer-cellpadding: 0;\n\t\t\t\t\t\t\t-premailer-cellspacing: 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.related_item {\n\t\t\t\t\t\t\tpadding: 10px 0;\n\t\t\t\t\t\t\tcolor: #CBCCCF;\n\t\t\t\t\t\t\tfont-size: 15px;\n\t\t\t\t\t\t\tline-height: 18px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.related_item-title {\n\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\tmargin: .5em 0 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.related_item-thumb {\n\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\tpadding-bottom: 10px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.related_heading {\n\t\t\t\t\t\t\tborder-top: 1px solid #CBCCCF;\n\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\tpadding: 25px 0 10px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* Discount Code ------------------------------ */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.discount {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t\tpadding: 24px;\n\t\t\t\t\t\t\t-premailer-width: 100%;\n\t\t\t\t\t\t\t-premailer-cellpadding: 0;\n\t\t\t\t\t\t\t-premailer-cellspacing: 0;\n\t\t\t\t\t\t\tbackground-color: #F4F4F7;\n\t\t\t\t\t\t\tborder: 2px dashed #CBCCCF;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.discount_heading {\n\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.discount_body {\n\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\tfont-size: 15px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* Social Icons ------------------------------ */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.social {\n\t\t\t\t\t\t\twidth: auto;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.social td {\n\t\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\t\twidth: auto;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.social_icon {\n\t\t\t\t\t\t\theight: 20px;\n\t\t\t\t\t\t\tmargin: 0 8px 10px 8px;\n\t\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* Data table ------------------------------ */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.purchase {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t\tpadding: 35px 0;\n\t\t\t\t\t\t\t-premailer-width: 100%;\n\t\t\t\t\t\t\t-premailer-cellpadding: 0;\n\t\t\t\t\t\t\t-premailer-cellspacing: 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.purchase_content {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t\tpadding: 25px 0 0 0;\n\t\t\t\t\t\t\t-premailer-width: 100%;\n\t\t\t\t\t\t\t-premailer-cellpadding: 0;\n\t\t\t\t\t\t\t-premailer-cellspacing: 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.purchase_item {\n\t\t\t\t\t\t\tpadding: 10px 0;\n\t\t\t\t\t\t\tcolor: #51545E;\n\t\t\t\t\t\t\tfont-size: 15px;\n\t\t\t\t\t\t\tline-height: 18px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.purchase_heading {\n\t\t\t\t\t\t\tpadding-bottom: 8px;\n\t\t\t\t\t\t\tborder-bottom: 1px solid #EAEAEC;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.purchase_heading p {\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t\tcolor: #85878E;\n\t\t\t\t\t\t\tfont-size: 12px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.purchase_footer {\n\t\t\t\t\t\t\tpadding-top: 15px;\n\t\t\t\t\t\t\tborder-top: 1px solid #EAEAEC;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.purchase_total {\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t\ttext-align: right;\n\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\tcolor: #333333;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.purchase_total--label {\n\t\t\t\t\t\t\tpadding: 0 15px 0 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbody {\n\t\t\t\t\t\t\tbackground-color: #F4F4F7;\n\t\t\t\t\t\t\tcolor: #51545E;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tp {\n\t\t\t\t\t\t\tcolor: #51545E;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tp.sub {\n\t\t\t\t\t\t\tcolor: #6B6E76;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.email-wrapper {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\t\t-premailer-width: 100%;\n\t\t\t\t\t\t\t-premailer-cellpadding: 0;\n\t\t\t\t\t\t\t-premailer-cellspacing: 0;\n\t\t\t\t\t\t\tbackground-color: #F4F4F7;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.email-content {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\t\t-premailer-width: 100%;\n\t\t\t\t\t\t\t-premailer-cellpadding: 0;\n\t\t\t\t\t\t\t-premailer-cellspacing: 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* Masthead ----------------------- */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.email-masthead {\n\t\t\t\t\t\t\tpadding: 25px 0;\n\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.email-masthead_logo {\n\t\t\t\t\t\t\twidth: 94px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.email-masthead_name {\n\t\t\t\t\t\t\tfont-size: 16px;\n\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\tcolor: #A8AAAF;\n\t\t\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t\t\ttext-shadow: 0 1px 0 white;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* Body ------------------------------ */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.email-body {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\t\t-premailer-width: 100%;\n\t\t\t\t\t\t\t-premailer-cellpadding: 0;\n\t\t\t\t\t\t\t-premailer-cellspacing: 0;\n\t\t\t\t\t\t\tbackground-color: #FFFFFF;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.email-body_inner {\n\t\t\t\t\t\t\twidth: 570px;\n\t\t\t\t\t\t\tmargin: 0 auto;\n\t\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\t\t-premailer-width: 570px;\n\t\t\t\t\t\t\t-premailer-cellpadding: 0;\n\t\t\t\t\t\t\t-premailer-cellspacing: 0;\n\t\t\t\t\t\t\tbackground-color: #FFFFFF;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.email-footer {\n\t\t\t\t\t\t\twidth: 570px;\n\t\t\t\t\t\t\tmargin: 0 auto;\n\t\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\t\t-premailer-width: 570px;\n\t\t\t\t\t\t\t-premailer-cellpadding: 0;\n\t\t\t\t\t\t\t-premailer-cellspacing: 0;\n\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.email-footer p {\n\t\t\t\t\t\t\tcolor: #6B6E76;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.body-action {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\tmargin: 30px auto;\n\t\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\t\t-premailer-width: 100%;\n\t\t\t\t\t\t\t-premailer-cellpadding: 0;\n\t\t\t\t\t\t\t-premailer-cellspacing: 0;\n\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.body-sub {\n\t\t\t\t\t\t\tmargin-top: 25px;\n\t\t\t\t\t\t\tpadding-top: 25px;\n\t\t\t\t\t\t\tborder-top: 1px solid #EAEAEC;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t.content-cell {\n\t\t\t\t\t\t\tpadding: 35px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/*Media Queries ------------------------------ */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@media only screen and (max-width: 600px) {\n\t\t\t\t\t\t\t.email-body_inner,\n\t\t\t\t\t\t\t.email-footer {\n\t\t\t\t\t\t\t\twidth: 100% !important;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@media (prefers-color-scheme: dark) {\n\t\t\t\t\t\t\tbody,\n\t\t\t\t\t\t\t.email-body,\n\t\t\t\t\t\t\t.email-body_inner,\n\t\t\t\t\t\t\t.email-content,\n\t\t\t\t\t\t\t.email-wrapper,\n\t\t\t\t\t\t\t.email-masthead,\n\t\t\t\t\t\t\t.email-footer {\n\t\t\t\t\t\t\t\tbackground-color: #333333 !important;\n\t\t\t\t\t\t\t\tcolor: #FFF !important;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tp,\n\t\t\t\t\t\t\tul,\n\t\t\t\t\t\t\tol,\n\t\t\t\t\t\t\tblockquote,\n\t\t\t\t\t\t\th1,\n\t\t\t\t\t\t\th2,\n\t\t\t\t\t\t\th3,\n\t\t\t\t\t\t\tspan,\n\t\t\t\t\t\t\t.purchase_item {\n\t\t\t\t\t\t\t\tcolor: #FFF !important;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.attributes_content,\n\t\t\t\t\t\t\t.discount {\n\t\t\t\t\t\t\t\tbackground-color: #222 !important;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.email-masthead_name {\n\t\t\t\t\t\t\t\ttext-shadow: none !important;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t:root {\n\t\t\t\t\t\t\tcolor-scheme: light dark;\n\t\t\t\t\t\t\tsupported-color-schemes: light dark;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</style>\n\t\t\t\t\t\t\t<!--[if mso]>\n\t\t\t\t\t\t\t<style type=\"text/css\">\n\t\t\t\t\t\t\t.f-fallback {\n\t\t\t\t\t\t\t\tfont-family: Arial, sans-serif;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</style>\n\t\t\t\t\t\t<![endif]-->\n\t\t\t\t\t\t</head>\n\t\t\t\t\t\t<body>\n\t\t\t\t\t\t\t<table class=\"email-wrapper\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align=\"center\">\n\t\t\t\t\t\t\t\t<table class=\"email-content\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\">\n\t\t\t\t\t\t\t\t\t<!-- Email Body -->\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\"email-body\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n\t\t\t\t\t\t\t\t\t\t<table class=\"email-body_inner\" align=\"center\" width=\"570\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\">\n\t\t\t\t\t\t\t\t\t\t<!-- Body content -->\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<td class=\"content-cell\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"f-fallback\">\n\t\t\t\t\t\t\t\t\t\t\t\t<h1>Hola '.$nombreDestinatario.',</h1>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t<table class=\"attributes\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\">\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 class=\"attributes_content\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\">\n\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<td class=\"attributes_item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"f-fallback\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>Monto:</strong> L.'.$total.'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\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\t</tr>\n\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<td class=\"attributes_item\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"f-fallback\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>Fecha:</strong> '.date(\"Y-m-d\").'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\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\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</table>\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\t</table>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<table class=\"purchase\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\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>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<h3>N° Recibo: '.$numeroFactura.'</h3>\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>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<h3 class=\"align-right\">Fecha de envío: '.date(\"Y-m-d H:i:s\").'</h3>\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\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<table class=\"purchase_content\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n\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<th class=\"purchase_heading\" align=\"left\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"f-fallback\">Producto</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th class=\"purchase_heading\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"f-fallback\">Cantidad</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<th class=\"purchase_heading\" align=\"right\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"f-fallback\">Costo</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</th>\n\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';\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$decodificar_productos = json_decode($_POST[\"listaProductos\"]);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($decodificar_productos as $productos ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$template= $template.'<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td width=\"100%\" class=\"purchase_item\"><span class=\"f-fallback\">'.$productos->descripcion.'</span></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td width=\"100%\" class=\"purchase_item\"><span class=\"f-fallback\">'.$productos->cantidad.'</span></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td width=\"100%\" class=\"purchase_item\"><span class=\"f-fallback\">L.'.$productos->total.'</span></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>';\n\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\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t$template = $template.'\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr><td><hr></td></tr>\n\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<td width=\"20%\" class=\"purchase_footer\" valign=\"middle\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"f-fallback purchase_total purchase_total--label\">SubTotal</p>\n\t\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\t<td width=\"20%\" class=\"purchase_footer\" valign=\"middle\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"f-fallback purchase_total\">L.'.$neto.'</p>\n\t\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\t</tr>\n\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<td width=\"80%\" class=\"purchase_footer\" valign=\"middle\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"f-fallback purchase_total purchase_total--label\">ISV</p>\n\t\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\t<td width=\"20%\" class=\"purchase_footer\" valign=\"middle\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"f-fallback purchase_total\">L.'.$impuesto.'</p>\n\t\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\t</tr>\n\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<td width=\"80%\" class=\"purchase_footer\" valign=\"middle\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<strong><p class=\"f-fallback purchase_total purchase_total--label\">Total</p></strong>\n\t\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\t<td width=\"20%\" class=\"purchase_footer\" valign=\"middle\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<strong><p class=\"f-fallback purchase_total\">L.'.$total.'</p></strong>\n\t\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\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</table>\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\t</table>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t<p>Saludos,\n\t\t\t\t\t\t\t\t\t\t\t\t<br>Del Equipo Gimnasio La Roca.</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<!-- Sub copy -->\n\t\t\t\t\t\t\t\t\t\t\t\t<table class=\"body-sub\" role=\"presentation\">\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>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t</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\t</table>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t</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<td>\n\t\t\t\t\t\t\t\t\t\t<table class=\"email-footer\" align=\"center\" width=\"570\" cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\">\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<td class=\"content-cell\" align=\"center\">\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"f-fallback sub align-center\">&copy; '.date(\"Y\").' DERECHOS RESERVADOS</p>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"f-fallback sub align-center\">\n\t\t\t\t\t\t\t\t\t\t\t\tGIMNASIO LA ROCA\n\t\t\t\t\t\t\t\t\t\t\t\t<br>HONDURAS\n\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t</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\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</body>\n\t\t\t\t\t\t</html> \n\t\t\t\t\t';\n\n\t\t\t\t\t// echo $correoDestinatario;\n\t\t\t\t\t// echo $nombreDestinatario;\n\t\t\t\t\t// return;\n\n\t\t\t\t\t$respuestaCorreo = ControladorUsuarios::ctrGenerarCorreo($correoDestinatario, $nombreDestinatario, $asunto, $template, $require);\n\n\t\t\t\t\t# 07.12.2020 \n\t\t\t\t\t// if($enviarFactura==\"on\"){\n\t\n\t\t\t\t\t// \t$respuestaCorreo = ControladorUsuarios::ctrGenerarCorreo($correoDestinatario, $nombreDestinatario, $asunto, $template, $require);\n\n\t\t\t\t\t// }else{\n\t\t\t\t\t// \t$respuestaCorreo=true;\n\t\t\t\t\t// }\n\t\t\t\t\t# FIN 07.12.2020 \n\n\t\t\t\t\t// var_dump($respuestaCorreo);\n\t\t\t\t\t// return;\n\t\t\t\t\tif($respuestaCorreo == true){\n\t\t\t\t\t\techo'<script>\n\n\t\t\t\t\t\t\tlocalStorage.removeItem(\"rango\");\n\n\t\t\t\t\t\t\tSwal.fire({\n\t\t\t\t\t\t\t\ticon: \"success\",\n\t\t\t\t\t\t\t\ttitle: \"La venta ha sido guardada correctamente\",\n\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t\t\t}).then((result) => {\n\t\t\t\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\t\t\t\twindow.location = \"administrar-venta\";\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t</script>';\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// } else {\n\n\t\t\t\t\t\n\t\t\t\t// \techo'<script>\n\t\t\t\t\t\n\t\t\t\t// \tlocalStorage.removeItem(\"rango\");\n\t\t\t\t\t\n\t\t\t\t// \tSwal.fire({\n\t\t\t\t// \t\ticon: \"success\",\n\t\t\t\t// \t\ttitle: \"La venta ha sido guardada correctamente\",\n\t\t\t\t// \t\tshowConfirmButton: true,\n\t\t\t\t// \t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t// \t}).then((result) => {\n\t\t\t\t// \t\tif (result.value) {\n\t\t\t\t\t\t\t\n\t\t\t\t// \t\t\twindow.location = \"administrar-venta\";\n\t\t\t\t\t\t\t\n\t\t\t\t// \t\t}\n\t\t\t\t// \t})\n\t\t\t\t\t\n\t\t\t\t// \t</script>';\n\t\t\t\t// }\n\t\t\t\t\n\t\t\t} else if ($respuesta == true && !$_POST['enviarFactura']){\n\t\t\t\t\t\n\t\t\t\t\techo'<script>\n\t\t\t\t\t\n\t\t\t\t\tlocalStorage.removeItem(\"rango\");\n\t\t\t\t\t\n\t\t\t\t\tSwal.fire({\n\t\t\t\t\t\ticon: \"success\",\n\t\t\t\t\t\ttitle: \"La venta ha sido guardada correctamente\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t}).then((result) => {\n\t\t\t\t\t\tif (result.value) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"administrar-venta\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t\n\t\t\t\t\t</script>';\n\t\t\t\t\t\n\t\t\t} else{\n\t\t\t\t\n\t\t\t\techo'<script>\n\n\t\t\t\tSwal.fire({\n\t\t\t\t\t icon: \"error\",\n\t\t\t\t\t title: \"Error\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then((result) => {\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"administrar-venta\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\n\n }\n \n\t}", "title": "" }, { "docid": "919a2ee22da556f50f6a5943f04e5242", "score": "0.51295483", "text": "public function agregar(){\n\t\t$sql = \"insert into libro (isbn,titulo,subtitulo,descripcion,num_pag,anho,id_categoria,id_editorial,id_autor) \";\n\t\t$sql .= \"value (\\\"$this->isbn\\\",\\\"$this->titulo\\\",\\\"$this->subtitulo\\\",\\\"$this->descripcion\\\",\\\"$this->num_pag\\\",\\\"$this->anho\\\",$this->id_categoria,$this->id_editorial,$this->id_autor)\";\n\t\treturn Executor::doit($sql);\n\t}", "title": "" }, { "docid": "dd4ac69de21184a122423a861d5cfa05", "score": "0.5126451", "text": "function apagarAditivoObra($obrid, $slcid)\n{\n global $db;\n\n $obra = new Obras($obrid);\n $obraEmp = $obra->pegaUltimaObraPorEmpId($obra->empid);\n\n // Tratamento de exceo Para casos semelhantes aos da demanda 357264, quando o ultimo id, no corresponde a ultima obra e sim a original\n if (!$obraEmp['obridpai']) {\n if ($obra->empid == $obrid) {\n $obraEmp['obridpai'] = $obrid;\n }\n }\n\n $contrato_id = $obra->pegaContratoPorObra($obrid);\n\n $commit = false;\n\n $sqlEmpID = \"SELECT obrid FROM obras2.obras WHERE empid = {$obra->empid} AND obrstatus = 'A'\";\n $rsEmpID = $db->carregar($sqlEmpID);\n if (count($rsEmpID)) {\n $rsEmpID = formataArray($rsEmpID, 'obrid');\n $sqlCrtID = \"SELECT min(crtid) as crtidoriginal, crtidpai as crtidatual\n FROM obras2.obrascontrato\n JOIN obras2.contrato using (crtid)\n WHERE crtidpai = $contrato_id\n AND ocrstatus = 'A'\n AND crtidpai IS NOT NULL\n GROUP BY contrato.crtidpai\";\n //dbg(simec_htmlentities($sqlCrtID));\n $rsCrtID = $db->pegaLinha($sqlCrtID);\n\n\n if (count($rsCrtID)) {\n $updateContrato = \" UPDATE obras2.contrato SET\n crtdtassinatura = t2.crtdtassinatura,\n crtdttermino = t2.crtdttermino,\n crtprazovigencia = t2.crtprazovigencia,\n crtvalorexecucao = t2.crtvalorexecucao,\n crtpercentualdbi = t2.crtpercentualdbi,\n crtstatus = t2.crtstatus,\n entidempresa = t2.entidempresa,\n licid = t2.licid,\n orgid = t2.orgid,\n crtidpai = null, -- setar nulo\n crtdenominacao = t2.crtdenominacao,\n crtjustificativa = t2.crtjustificativa,\n ttaid = t2.ttaid,\n crtsupressao = t2.crtsupressao,\n crtdtassinaturaaditivo = t2.crtdtassinaturaaditivo,\n arqid = t2.arqid,\n obrid_1 = t2.obrid_1,\n arqidcontrato = t2.arqidcontrato,\n usucpf = t2.usucpf,\n dt_cadastro = t2.dt_cadastro,\n crtnumero = t2.crtnumero\n FROM\n ( SELECT *\n FROM obras2.contrato\n WHERE crtid in ({$rsCrtID['crtidoriginal']})\n ) t2\n WHERE obras2.contrato.crtid = {$rsCrtID['crtidatual']}\";\n //dbg(simec_htmlentities($updateContrato));\n $db->executar($updateContrato);\n\n $updateObraContrato = \"UPDATE obras2.obrascontrato SET\n umdid = t2.umdid,\n ocrqtdconstrucao = t2.ocrqtdconstrucao,\n ocrdtordemservico = t2.ocrdtordemservico,\n ocrdtinicioexecucao = t2.ocrdtinicioexecucao,\n ocrprazoexecucao = t2.ocrprazoexecucao,\n ocrdtterminoexecucao = t2.ocrdtterminoexecucao,\n ocrvalorexecucao = t2.ocrvalorexecucao,\n ocrcustounitario = t2.ocrcustounitario,\n ocrpercentualdbi = t2.ocrpercentualdbi,\n ocrstatus = t2.ocrstatus,\n ocraditivado = t2.ocraditivado,\n arqidos = t2.arqidos,\n arqidcusto = t2.arqidcusto\n FROM\n ( SELECT *\n FROM obras2.obrascontrato\n -- talvez tenha que adicionar o obrid pra garantir unicidade\n WHERE crtid = {$rsCrtID['crtidoriginal']}\n AND obrid = {$obrid}\n ) t2\n WHERE obras2.obrascontrato.crtid = {$rsCrtID['crtidatual']}\";\n //dbg(simec_htmlentities($updateObraContrato));\n $db->executar($updateObraContrato);\n\n $subQueryCrtid = \"SELECT crtid FROM obras2.contrato WHERE crtstatus = 'A' AND crtidpai = {$rsCrtID['crtidatual']}\";\n $subQueryObras = \"SELECT obrid FROM obras2.obras WHERE obridpai = {$obraEmp['obridpai']} AND obrstatus = 'A'\";\n $rsQCrtid = $db->carregar($subQueryCrtid);\n $rsQObras = $db->carregar($subQueryObras);\n\n\n $rsQCrtid = formataArray($rsQCrtid, 'crtid');\n $rsQObras = formataArray($rsQObras, 'obrid');\n\n if (count($rsQCrtid) && count($rsQObras)) {\n $updateInativar = \"UPDATE obras2.obrascontrato SET ocrstatus = 'I'\n WHERE crtid in (\" . implode(',', $rsQCrtid) . \")\n AND ocrstatus = 'A'\n AND obrid in (\" . implode(',', $rsQObras) . \")\";\n //dbg(simec_htmlentities($updateInativar));\n $db->executar($updateInativar);\n\n $inativaContrato = \"UPDATE obras2.contrato SET crtstatus = 'I' WHERE crtidpai = {$rsCrtID['crtidatual']} AND crtstatus = 'A'\";\n //dbg(simec_htmlentities($inativaContrato));\n $db->executar($inativaContrato);\n\n $updateObras = \"UPDATE obras2.obras SET obrstatus = 'I' WHERE obridpai = {$obraEmp['obridpai']} AND obrstatus = 'A'\";\n //dbg(simec_htmlentities($updateObras));\n $db->executar($updateObras);\n\n registroAtividadeAditivoExclusao($obraEmp, $slcid);\n $commit = true;\n }\n }\n }\n\n if ($commit) {\n $db->commit();\n // $db->rollback();\n return true;\n } else {\n $db->rollback();\n return false;\n }\n}", "title": "" }, { "docid": "c3649860209f05a7f07405772b9ea1d1", "score": "0.5115614", "text": "function generar_form_entrega($nro_orden,$prov_stock)\r\n{global $db,$filas_cambios_prod,$title_gestion3;\r\n\r\n?>\r\n <b> PARA INDICAR LOS PRODUCTOS QUE SE ENTREGAN, INGRESE LOS CÓDIGOS DE BARRA DE CADA UNO</b>\r\n <br>\r\n\r\n <?\r\n $query=\"select \tfilas.id_fila,filas.id_prod_esp,filas.id_producto,filas.descripcion_prod,\r\n\t\t filas.desc_adic,filas.cantidad_fila,filas.precio_unitario,filas.es_agregado,\r\n\t\t rec_ent.id_recibido,rec_ent.id_deposito,rec_ent.observaciones,\r\n\t\t case when rec_ent.cantidad is null then 0\r\n\t\t\t else rec_ent.cantidad\r\n\t\t end as cantidad_entregada\r\n \t\tfrom (\r\n\t \t\t select id_fila,id_prod_esp,id_producto,descripcion_prod,desc_adic,cantidad as cantidad_fila,precio_unitario,es_agregado\r\n\t \t\t\t from compras.fila\r\n\t where es_agregado isnull or es_agregado<>1\r\n ) as filas\r\n left join\r\n\t ( select id_recibido,id_fila,id_deposito,cantidad,observaciones\r\n\t from compras.recibido_entregado\r\n\t where ent_rec=0\r\n )as rec_ent\r\n using(id_fila)\r\n where id_fila in (select id_fila from compras.fila where nro_orden=$nro_orden)\r\n order by id_producto\";\r\n\r\n\t $datos_entregados=sql($query,\"<br>Error al traer los datos de la entrega<br>\") or fin_pagina();\r\n\r\n while (!$datos_entregados->EOF)\r\n {\r\n \t $cantidad_comprada=$datos_entregados->fields['cantidad_fila'];\r\n\t $cantidad_entregada=$datos_entregados->fields['cantidad_entregada'];\r\n\t $observaciones=$datos_entregados->fields['observaciones'];\r\n\t $id_fila=$datos_entregados->fields['id_fila'];\r\n\r\n\t if($cantidad_comprada<=$cantidad_entregada)\r\n\t {\r\n\t \t$todo_entregado=1;\r\n\t $cant_entregado=\"readonly title='Ya se ha entregado la cantidad comprada'\";\r\n\t $dis_sin_cb=\"disabled\";//para el boton de Entregar Sin CB\r\n\t }\r\n \t else\r\n \t {\r\n \t \t$todo_entregado=0;\r\n \t $cant_entregado=\"\";\r\n \t $dis_sin_cb=\"\";//para el boton de Entregar Sin CB\r\n \t }\r\n \t?>\r\n <table width=\"100%\" cellspacing=0 border=0 bordercolor=#E0E0E0 align=\"center\" class=\"bordes\">\r\n <tr id=mx2>\r\n <td width=\"65%\">\r\n <?\r\n\t if($filas_cambios_prod[$id_fila][\"id_producto\"]!=\"\")\r\n\t { $nombre_producto_fila=$filas_cambios_prod[$id_fila][\"desc_gral\"];\r\n\t $id_producto=$filas_cambios_prod[$id_fila][\"id_producto\"];\r\n\t }\r\n\t else\r\n\t { $nombre_producto_fila=$datos_entregados->fields['descripcion_prod'].\" \".$datos_entregados->fields['desc_adic'];\r\n\t if($datos_entregados->fields['id_prod_esp'])\r\n\t $id_producto=$datos_entregados->fields['id_prod_esp'];\r\n\t else\r\n\t $id_producto=$datos_entregados->fields['id_producto'];\r\n\t }\r\n\t echo $nombre_producto_fila;\r\n\r\n ?>\r\n <input type=\"hidden\" name=\"id_recibido_<?=$id_fila?><?if($prov_stock==0)echo \"_0\"?>\" value=\"<?=$datos_entregados->fields['id_recibido']?>\">\r\n </td>\r\n <td width=\"18%\" nowrap>\r\n <strong>Comprado</strong>&nbsp; <input name=\"comprado_<?=$id_fila?><?if($prov_stock==0)echo \"_0\"?>\" type=\"text\" id=mx2 style=\"text-align:right; border:none;\" readonly value=\"<?=$cantidad_comprada?>\" size=\"6\" >\r\n </td>\r\n <td width=\"18%\" nowrap><strong>Entregado</strong>&nbsp;\r\n <input name=\"cantidad_ent_<?=$id_fila?><?if($prov_stock==0)echo \"_0\"?>\" type=\"text\" id=mx2 style=\"text-align:right; border:none;\" value=\"<?=$cantidad_entregada?>\" readonly size=\"6\" >\r\n </td>\r\n </tr>\r\n\r\n <?\r\n\r\n //traemos el log de recibidos por cada producto que se muestra\r\n\t\t $query=\"select log_rec_ent.* from log_rec_ent join recibido_entregado using(id_recibido) where id_fila=$id_fila and not id_log_recibido isnull and ent_rec=0\";\r\n\t\t $log_entregado=sql($query,\"Error al traer el registro de lo entregado\") or fin_pagina();\r\n\t\t if($log_entregado->RecordCount()>0)\r\n\t\t {\r\n\t\t ?>\r\n\t\t <tr>\r\n\t\t <td colspan=\"3\">\r\n <table width=\"95%\" align=\"center\" border=1 bordercolor=#E0E0E0>\r\n\t\t <tr id=mo_sf6>\r\n\t\t <td colspan=\"3\" align=\"center\">\r\n\t\t <b>Registro de Entregas de este producto</b>\r\n\t\t </td>\r\n\t\t </tr>\r\n\t\t <?\r\n\t\t while(!$log_entregado->EOF)\r\n\t\t {\r\n ?>\r\n\t\t <tr id=ma>\r\n\t\t <?if($log_entregado->fields['cant']>0)\r\n\t\t {\r\n\t\t $texto_log=\"Entregados\";\r\n\t\t }\r\n\t\t else\r\n\t\t $texto_log=\"ELIMINACION DE ENTREGA\";\r\n\t\t ?>\r\n\t\t <td title=\"<?=$log_entregado->fields['nombre']?>\"><b><?=$texto_log?>: <?=$log_entregado->fields['cant']?></b></td>\r\n\t\t <?$fecha_log=split(\" \",$log_entregado->fields['fecha']);\r\n\r\n\t\t if($log_entregado->fields['desde_stock']==1)\r\n\t\t $desde_stock=\"(Entregado desde stock)\";\r\n\t\t else\r\n\t\t $desde_stock=\"\";\r\n\t\t ?>\r\n\t\t <td align=\"center\" colspan=\"2\"> Usuario: <b><?=$log_entregado->fields['usuario']?></b> - Fecha: <b><?=fecha($fecha_log[0])?> <?=$fecha_log[1]?> <?=$desde_stock?></b></td>\r\n\t\t </tr>\r\n\t\t <?\r\n\t\t $log_entregado->MoveNext();\r\n\t\t }\r\n ?>\r\n\t\t </table>\r\n\t\t </td>\r\n\t </tr>\r\n\r\n \t<?\r\n\t\t }//de if($log_entregado->RecordCount()>0)\r\n //si se esta generando form de entrega para OC con proveedor Stock\r\n\t\tif($prov_stock==1)\r\n $desde_pagina=\"ord_compra_recepcion\";\r\n //si se esta generando form de entrega para OC asociada a Lic,RMA,ServTec o Presupuesto\r\n //y el proveedor de la OC no es un stock.\r\n else\r\n $desde_pagina=\"lic_ord_compra_recepcion\";\r\n\r\n $link_cb=encode_link(\"movimiento_codigos_barra.php\",array(\"desde_pagina\"=>\"$desde_pagina\",\"total_comprado\"=>$cantidad_comprada,\"total_entregado\"=>$cantidad_entregada,\"producto_nombre\"=>\"$nombre_producto_fila\",\"id_producto\"=>$id_producto,\"id_proveedor\"=>$id_proveedor,\"nro_orden\"=>$nro_orden,\"id_fila\"=>$id_fila));\r\n $link_sin_cb=encode_link(\"sin_codigos_barra.php\",array(\"desde_pagina\"=>\"$desde_pagina\",\"total_comprado\"=>$cantidad_comprada,\"total_entregado\"=>$cantidad_entregada,\"producto_nombre\"=>\"$nombre_producto_fila\",\"id_producto\"=>$id_producto,\"id_proveedor\"=>$id_proveedor,\"nro_orden\"=>$nro_orden,\"id_fila\"=>$id_fila));\r\n ?>\r\n <tr>\r\n <td width=\"1%\">\r\n <input type=\"button\" name=\"cod_barra\" value=\"Códigos de Barra\" title=\"Ingresar los Códigos de Barra de los productos a entregar\" onclick=\"if(vent_cbe.closed)vent_cbe=window.open('<?=$link_cb?>','','top=130, left=250, width=320px, height=350px, scrollbars=1, status=1,directories=0');else vent_cb.focus();\">\r\n\r\n <?\r\n $check_sin_cb=\"\";\r\n if(permisos_check(\"inicio\",\"permiso_entregar_sin_cb\"))\r\n {$check_sin_cb=\"checked\"?>\r\n <input type=\"button\" name=\"sin_cod_barra\" value=\"Entregar Sin CB\" <?=$dis_sin_cb?> <?=$title_gestion3?> onclick=\"if(vent_sin_cb.closed)vent_sin_cb=window.open('<?=$link_sin_cb?>','','top=130, left=250, width=320px, height=350px, scrollbars=1, status=1,directories=0');else vent_sin_cb.focus();\" disabled>\r\n <input type=\"hidden\" name=\"hidden_sin_cb_<?=$id_fila?>\" value=\"1\" >\r\n <?\r\n }\r\n\r\n if(permisos_check(\"inicio\",\"permiso_desrecibir_desentregar_fila\") && $cantidad_entregada>0)\r\n {\r\n ?>\r\n &nbsp;<input type=\"submit\" name=\"desrecibir_desentregar_fila\" value=\"Des-Entregar\"\r\n class=\"little_boton\" style=\"width:100px\"\r\n onclick=\"if(confirm('¿Está seguro que desea des-entregar esta fila?'))\r\n {document.all.fila_desentregar.value=<?=$id_fila?>;\r\n return true;\r\n }\r\n else\r\n return false;\r\n \"\r\n disabled <?=$title_gestion3?>\r\n >\r\n <?\r\n }//de if(permisos_check(\"inicio\",\"permiso_desrecibir_desentregar_fila\"))\r\n ?>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"3\">\r\n <HR>\r\n <b>Comentarios de Entrega</b>\r\n <textarea rows=\"2\" cols=\"120\" name=\"observaciones_<?=$id_fila?><?if($prov_stock==0)echo \"_0\"?>\"><?=$datos_entregados->fields['observaciones']?></textarea>\r\n <br><br>\r\n </td>\r\n </tr>\r\n </table>\r\n <hr style=\"height:2;color:black\">\r\n\r\n <?\r\n $datos_entregados->MoveNext();\r\n }//de while(!$datos_entregados->EOF)\r\n\r\n}", "title": "" }, { "docid": "c410ebe0ae9a1330c7fad588f4033c9e", "score": "0.5106813", "text": "public function RptCompraD($idcompra){\r\n $sql=\"SELECT\r\n cd.idcomprad,\r\n cd.idarticulo,\r\n cd.iddeposito,\r\n a.cod_articulo, \r\n a.desc_articulo,\r\n d.cod_deposito,\r\n d.desc_deposito,\r\n cd.tasa,\r\n CONVERT(cd.cantidad, DECIMAL(12,0)) AS cantidad,\r\n CONVERT(cd.costo, DECIMAL(12,2)) AS costo,\r\n CONVERT(cd.costo * cd.cantidad, DECIMAL(12,2)) AS subtotald,\r\n CONVERT(((cd.costo * cd.cantidad) * cd.tasa)/100, DECIMAL(12,2)) AS impsubd,\r\n CONVERT((((cd.costo * cd.cantidad) * cd.tasa)/100) + (cd.costo * cd.cantidad), DECIMAL(12,2)) AS totald\r\n FROM tbcomprad cd\r\n INNER JOIN tbarticulo a ON a.idarticulo=cd.idarticulo\r\n INNER JOIN tbdeposito d ON d.iddeposito=cd.iddeposito\r\n WHERE cd.idcompra ='$idcompra'\";\r\n return ejecutarConsulta($sql);\r\n }", "title": "" }, { "docid": "0b9ca3b67a76762f2f1c528cce98578d", "score": "0.5102975", "text": "function rechazar_producto(Array $data){\r\n parent::conectar();\r\n $result = parent::query(\"UPDATE productos_revision SET id_productos_revision_estados = 2, motivo = '$data[motivo]' WHERE id = '$data[id_producto]'\");\r\n $producto = parent::consultaTodo(\"SELECT * FROM productos_revision WHERE id = '$data[id_producto]'\");\r\n parent::cerrar();\r\n if($result){\r\n if($producto){\r\n $notificacion = new Notificaciones();\r\n $notificacion->insertarNotificacion([\r\n 'uid' => $producto[0]['uid'],\r\n 'empresa' => $producto[0]['empresa'],\r\n 'text' => 'Tu producto '.$producto[0]['titulo'].' ha sido rechazado',\r\n 'es' => 'Tu producto '.$producto[0]['titulo'].' ha sido rechazado',\r\n 'en' => 'Your product '.$producto[0]['titulo'].' has been rejected',\r\n 'keyjson' => '',\r\n 'url' => ''\r\n ]);\r\n }\r\n $this->envio_correo_rechazo_($producto[0]); \r\n return array(\"status\" => \"success\", \"mensaje\" => \"producto rechazado\");\r\n }else{\r\n return array(\"status\" => \"fail\", \"mensaje error al rechazar producto\");\r\n }\r\n }", "title": "" }, { "docid": "07982a6e9bd90ee96981faadf41091c4", "score": "0.509698", "text": "public function alterar($COD_PRODUTO, $DS_PRODUTO, $NU_COD_BARRAS, $NU_QTDE_PRODUTO, $TIPO_PRODUTO, $VALOR_PRODUTO, $DT_FABRICACAO, $DT_VALIDADE, $DT_CADASTRO) {\r\n\r\n #setar os dados\r\n $this->setCOD_PRODUTO($COD_PRODUTO);\r\n $this->setDS_PRODUTO($DS_PRODUTO);\r\n $this->setNU_COD_BARRAS($NU_COD_BARRAS);\r\n $this->setNU_QTDE_PRODUTO($NU_QTDE_PRODUTO);\r\n $this->setTIPO_PRODUTO($TIPO_PRODUTO);\r\n $this->setVALOR_PRODUTO($VALOR_PRODUTO);\r\n $this->setDT_FABRICACAO($DT_FABRICACAO);\r\n $this->setDT_VALIDADE($DT_VALIDADE);\r\n $this->setDT_CADASTRO($DT_CADASTRO);\r\n #montar a consulta\r\n $sql = \"UPDATE produto SET DS_PRODUTO = '\" . $this->getDS_PRODUTO() . \"', NU_COD_BARRAS = '\" . $this->getNU_COD_BARRAS() . \"', NU_QTDE_PRODUTO = '\" . $this->getNU_QTDE_PRODUTO() . \"', TIPO_PRODUTO = '\" . $this->getTIPO_PRODUTO() . \"', VALOR_PRODUTO = '\" . $this->getVALOR_PRODUTO() . \"', DT_FABRICACAO = '\" . $this->getDT_FABRICACAO() . \"', DT_VALIDADE = '\" . $this->getDT_VALIDADE() . \"', DT_CADASTRO = '\" . $this->getDT_CADASTRO() . \"' WHERE COD_PRODUTO =\" . $this->getCOD_PRODUTO();\r\n\r\n #executa consulta e retorna o resultado para o controle\r\n if ($this->executarQuery($sql) == 1) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "23cf5891d3253c465c58793224c46f79", "score": "0.50927126", "text": "public function ImportarDetalle($idcompra){\r\n\r\n $sql=\"SELECT\r\n dc.idcomprad,\r\n dc.idarticulo,\r\n dc.iddeposito,\r\n dc.idartunidad,\r\n a.cod_articulo,\r\n a.desc_articulo,\r\n u.desc_unidad,\r\n a.tipo,\r\n dc.cantidad,\r\n CONVERT(dc.costo,DECIMAL(12,2)) AS costo,\r\n CONVERT(dc.tasa,DECIMAL(12,0)) AS tasa,\r\n IFNULL((SELECT cantidad FROM tbstock WHERE iddeposito=dc.iddeposito AND idarticulo=a.idarticulo),'null') AS disp,\r\n au.valor\r\n FROM tbcomprad dc \r\n INNER JOIN tbarticulo a ON a.idarticulo=dc.idarticulo\r\n INNER JOIN tbartunidad au ON au.idartunidad=dc.idartunidad\r\n INNER JOIN tbunidad u ON u.idunidad=au.idunidad\r\n WHERE dc.idcompra='$idcompra'\";\r\n return ejecutarConsulta($sql);\r\n }", "title": "" }, { "docid": "72ebbe96ca09c4a608a640b6d89f074e", "score": "0.50752705", "text": "private function adicionaParagrafoAprovadoConselho (Matricula $oMatricula, Regencia $oRegencia, AprovacaoConselho $oAprovadoConselho) {\n\n $aParagrafos = array();\n switch ($oAprovadoConselho->getFormaAprovacao()) {\n\n case AprovacaoConselho::APROVADO_CONSELHO:\n\n $oDocumento = new libdocumento(5013);\n $oDocumento->disciplina = $oRegencia->getDisciplina()->getNomeDisciplina();\n $oDocumento->etapa = $oRegencia->getEtapa()->getNome();\n $oDocumento->justificativa = $oAprovadoConselho->getJustificativa();\n $oDocumento->nota = $oAprovadoConselho->getAvaliacaoConselho();\n $oDocumento->anomatricula = $oRegencia->getTurma()->getCalendario()->getAnoExecucao();\n\n $aParagrafos = $oDocumento->getDocParagrafos();\n\n $sTexto = $aParagrafos[1]->oParag->db02_texto;\n if( trim( $sTexto ) != '' ) {\n\n $sObservacao = \"- {$oMatricula->getAluno()->getNome()}: {$sTexto}\";\n $this->aObservacaoAlunosAprovadoConselho[$oRegencia->getDisciplina()->getCodigoDisciplinaGeral()][] = $sObservacao;\n }\n\n break;\n\n case AprovacaoConselho::RECLASSIFICACAO_BAIXA_FREQUENCIA:\n\n $oDocumento = new libdocumento(5006);\n $oDocumento->nome_aluno = $oMatricula->getAluno()->getNome();\n $oDocumento->ano = $oRegencia->getTurma()->getCalendario()->getAnoExecucao();\n $oDocumento->nome_etapa = $oRegencia->getEtapa()->getNome();\n\n $aParagrafos = $oDocumento->getDocParagrafos();\n\n $sTexto = $aParagrafos[1]->oParag->db02_texto;\n if( trim( $sTexto ) != '' ) {\n\n $sObservacao = \"- {$sTexto}\";\n $this->aObservacaoAlunosAprovadoConselho[$oRegencia->getDisciplina()->getCodigoDisciplinaGeral()][] = $sObservacao;\n }\n\n break;\n\n case AprovacaoConselho::APROVADO_CONFORME_REGIMENTO_ESCOLAR:\n\n $sObservacao = \"- {$oMatricula->getAluno()->getNome()}: \";\n $sObservacao .= \"Disciplina {$oRegencia->getDisciplina()->getNomeDisciplina()} na etapa\";\n $sObservacao .= \" {$oRegencia->getEtapa()->getNome()} foi aprovado pelo regimento escolar. \";\n $sObservacao .= \"Justificativa: {$oAprovadoConselho->getJustificativa()}\";\n\n\n $this->aObservacaoAlunosAprovadoConselho[$oRegencia->getDisciplina()->getCodigoDisciplinaGeral()][] = $sObservacao;\n break;\n }\n }", "title": "" }, { "docid": "d671121468324a3cc0a5769ede6062d1", "score": "0.5073904", "text": "public function crearOrdenesReparacion() {\n //$this->asignarDatosVista('servicios', invocarNewsoftServicio('servicios'));\n //$this->asignarDatosVista('piezas', invocarNewsoftServicio('piezas'));\n $this->mostrarVista('panel/asesor/ordenreparacion');\n }", "title": "" }, { "docid": "977247bc1e1d130c8660cff66e8cf5eb", "score": "0.5070039", "text": "public function AddOrden() {\n\t\t$db = new dbConn();\n\n\t if ($r = $db->select(\"correlativo\", \"cotizaciones_data\", \"WHERE td = \".$_SESSION[\"td\"].\" order by correlativo desc limit 1\")) { \n\t $ultimoorden = $r[\"correlativo\"];\n\t } unset($r); \n\n\t \tif($ultimoorden == NULL){ $ultimoorden = 0; }\n\t\t\t$datos = array();\n\t\t $datos[\"cliente\"] = $_SESSION[\"cliente_cot\"];\n\t\t $datos[\"correlativo\"] = $ultimoorden + 1;\n\t\t $datos[\"fecha\"] = date(\"d-m-Y\");\n\t\t $datos[\"hora\"] = date(\"H:i:s\");\n\t\t $datos[\"fechaF\"] = Fechas::Format(date(\"d-m-Y\"));\n\t\t $datos[\"caduca\"] = Fechas::DiaSuma(date(\"d-m-Y\"),15);\n\t\t $datos[\"caducaF\"] = Fechas::Format(Fechas::DiaSuma(date(\"d-m-Y\"),15));\n\t\t $datos[\"edo\"] = 1;\n\t\t $datos[\"hash\"] = Helpers::HashId();\n\t\t $datos[\"time\"] = Helpers::TimeId();\n\t\t $datos[\"td\"] = $_SESSION[\"td\"];\n\t\t $db->insert(\"cotizaciones_data\", $datos); \n\t\t\n\t\t$_SESSION[\"cotizacion\"] = $ultimoorden + 1; \n\t}", "title": "" }, { "docid": "6f088be52a0a7d9c914357d6576377bf", "score": "0.50668764", "text": "public function pedido($rif, $fecha, $llegada, $productos, $cantidades, $costos, $precios, $subtotales, $subtotal, $iva, $total){\r\n\r\n\t\t$sql = \"INSERT INTO `pedidos` (`codigo_proveedor`,`fecha`,`fecha_llegada`,`subtotal`) VALUES (:rif, :fecha, :llegada, :subtotal)\";\r\n\t\t$sql_values = [\r\n\t\t\t':rif' => $rif,\r\n\t\t\t':fecha' => $fecha . date(' H:i:s'),\r\n\t\t\t':llegada' => $llegada . date(' H:i:s'),\r\n\t\t\t':subtotal' => $subtotal\r\n\t\t];\r\n\r\n\t\t$consulta = $this->conexion->get_consulta($sql, $sql_values);\r\n\r\n\t\t//Obtenemos la id del pedido que acabamos de registrar, para usarla en los detalles.\r\n\r\n\t\t$sql = \"SELECT LAST_INSERT_ID();\";\r\n\t\t$sql_values = null;\r\n\r\n\t\t$resultado = $this->conexion->get_consulta($sql, $sql_values);\r\n\t\t$id_pedido = $resultado->fetch(PDO::FETCH_BOTH)[0];\r\n\r\n\t\t$cantidad_productos = count($productos);\r\n\r\n\t\t//creamos todos los detalles de pedido necesarios.\r\n\t\tfor ($i=0; $i < $cantidad_productos; $i++) {\r\n\r\n\t\t\t$sql = \"INSERT INTO `detalles_pedido` (`codigo_pedido`, `codigo_producto`, `precio_compra`, `cantidad`, `subtotal`) VALUES (:pedido, :producto, :costo, :cantidad, :subtotal)\";\r\n\t\t\t$sql_values = [\r\n\t\t\t\t':pedido' => $id_pedido,\r\n\t\t\t\t':producto' => $productos[$i],\r\n\t\t\t\t':costo' => $costos[$i],\r\n\t\t\t\t':cantidad' => $cantidades[$i],\r\n\t\t\t\t':subtotal' => $subtotales[$i]\r\n\t\t\t];\r\n\t $consulta = $this->conexion->get_consulta($sql, $sql_values);\r\n\t\t}\r\n\r\n\t\t//Actualizamos las existencias y costos de todos los productos comprados\r\n\r\n\t\tfor ($i=0; $i < $cantidad_productos; $i++) {\r\n\r\n\t\t\t//Obtenemos los valores previos de el producto en la base de datos.\r\n\t\t\t$sql = \"SELECT (`existencias`) FROM `productos` WHERE `codigo_producto` = :id\";\r\n\t\t\t$sql_values = [\r\n\t\t\t\t':id' => $productos[$i]\r\n\t\t\t];\r\n\r\n\t\t\t$resultado = $this->conexion->get_consulta($sql, $sql_values);\r\n\t\t\t$existencias = $resultado->fetch(PDO::FETCH_BOTH)[0];\r\n\r\n\t\t\t$sql = \"UPDATE `productos` SET `precio_venta` = :precio, `existencias` = :existencias WHERE `codigo_producto` = :id\";\r\n\t\t\t$sql_values = [\r\n\t\t\t\t':precio' => $precios[$i],\r\n\t\t\t\t':existencias' => $existencias + $cantidades[$i],\r\n\t\t\t\t':id' => $productos[$i]\r\n\t\t\t];\r\n\r\n\t $consulta = $this->conexion->get_consulta($sql, $sql_values);\r\n\t\t}\r\n\r\n\r\n\t\treturn $id_pedido;\r\n\t}", "title": "" }, { "docid": "201e48a8ee38473907310975db677c49", "score": "0.50661355", "text": "public function atualizarItemAgendamento($idProduto, $qtdDisponivel, $qtdTransito, $id_item_agendamento){\r\n\r\n \t//$this->begin();\r\n\r\n \t$sql = \"UPDATE\r\n \t\t\t\treserva_agendamento_item\r\n \t\t\tSET\r\n \t\t\t\traiqtde_estoque = $qtdDisponivel,\r\n \t\t\t\traiqtde_transito = $qtdTransito\r\n \t\t\tWHERE\r\n \t\t\t\traioid = $id_item_agendamento\r\n \t\t\tAND\r\n \t\t\t\traiprdoid = $idProduto\";\r\n\r\n \tif (!$rs = pg_query($this->conn, $sql)) {\r\n \t//$this->rollback();\r\n \t\tthrow new ErrorException(self::MENSAGEM_ERRO_PROCESSAMENTO);\r\n \t}\r\n\r\n \t//$this->commit();\r\n }", "title": "" }, { "docid": "5c8d729987ee554e7934d46c9f343105", "score": "0.5065739", "text": "public function MostrarDetalle($idcompra){\r\n\r\n $sql=\"SELECT\r\n dc.idcomprad,\r\n dc.idarticulo,\r\n dc.iddeposito,\r\n dc.idartunidad,\r\n a.cod_articulo,\r\n a.desc_articulo,\r\n u.desc_unidad,\r\n a.tipo,\r\n dc.cantidad,\r\n CONVERT(dc.costo,DECIMAL(12,2)) AS costo,\r\n CONVERT(dc.tasa,DECIMAL(12,0)) AS tasa,\r\n IFNULL((SELECT cantidad FROM tbstock WHERE iddeposito=dc.iddeposito AND idarticulo=a.idarticulo),0) AS disp,\r\n au.valor\r\n FROM tbcomprad dc \r\n INNER JOIN tbarticulo a ON a.idarticulo=dc.idarticulo\r\n INNER JOIN tbartunidad au ON au.idartunidad=dc.idartunidad\r\n INNER JOIN tbunidad u ON u.idunidad=au.idunidad\r\n WHERE dc.idcompra='$idcompra'\";\r\n return ejecutarConsulta($sql);\r\n }", "title": "" }, { "docid": "bccc5130b458f542e4672fcdf17e8bdc", "score": "0.5062605", "text": "public function agregarProducto($params = []){\n $body = $this->getdata();\n\n // inserta el comentario\n $nombre = $body->nombre;\n $marca = $body->marca;\n $precio = $body->precio;\n $id_rubro = $body->id_rubro;\n\n $idcoment = $this->model->InsertOneProduct($nombre, $marca, $precio,$id_rubro);\n\n if(empty($idcoment)){\n $this->view->response(\"El producto no fue creado\", 500);\n die;\n }\n $this->view->response(\"El producto fue agregado correctamente con el id {$idcoment}\", 200);\n }", "title": "" }, { "docid": "981f9ee2c525af254e850b7191a8a151", "score": "0.50583714", "text": "public\tfunction criaReservaMaterial($dados)\n\t{\n\n\t\t$pm_logado = $_SESSION['UserRG'];\n\t\t$opm_logado = $_SESSION['UserOPM'];\n\n\t\t$ultpedido = mysqli_fetch_array(ejecutarSQL::consultar(\"SELECT pedido FROM pedido where opm='$opm_logado' order by id_pedido desc limit 1\"))[0];\n\n\t\tif ($ultpedido) {\n\t\t\t$partes = explode('/', $ultpedido);\n\t\t\t$parte = $partes[1] == date(\"Y\") ? $partes[0] + 1 : '1';\n\t\t} else {\n\t\t\t$parte = '1';\n\t\t}\n\t\tfor ($count = 0; $count < count($_POST[\"idmaterial\"]); $count++) {\n\t\t\t$destino = $_POST['destino'];\n\t\t\t$separa = explode(\";\", $_POST['idmaterial'][$count]);\n\t\t\t$idmaterial = $separa[0];\n\t\t\t$id_entrada = $separa[4];\n\t\t\t$estoque = mysqli_fetch_array(ejecutarSQL::consultar(\"SELECT qnt_atual FROM entrada where id_entrada= '$id_entrada'\"))[0];\n\t\t\t$qnt = str_replace('.', '', $_POST['qnt'])[$count];\n\n\t\t\t$vl_individual = $_POST['vl_individual'][$count];\n\t\t\t$vl_total = $qnt * $vl_individual;\n\t\t\t$data_hoje = date(\"Y-m-d\");\n\t\t\t$numsol = $parte . '/' . date(\"Y\");\n\n\t\t\t$tipo_doc = $_POST['tipo_doc'][$count];\n\t\t\t$documento = $_POST['documento'][$count];\n\t\t\t$dt_doc = $_POST['dt_doc'][$count];\n\n\t\t\t$tabela = 'pedidos';\n\t\t\t$campos = \"data_pedidos,id_material_saida,ult_estoque,qnt_saida,valor_individual,destino,val_total,documento,user_saida,pedido,tipo_doc,dt_doc,status,opm,id_entrada\";\n\t\t\t$valores = \"'$data_hoje','$idmaterial','$estoque','$qnt','$vl_individual','$destino','$vl_total','$documento','$pm_logado','$numsol','$tipo_doc','$dt_doc',1,'$opm_logado','$id_entrada'\";\n\n\t\t\t$id_insert = consultasSQL::InsertSQL($tabela, $campos, $valores);\n\n\t\t\t$qntfinal = $estoque - $qnt;\n\n\t\t\t$tabela = 'entrada';\n\t\t\t$campos = \"qnt_atual='$qntfinal'\";\n\t\t\t$condicion = \"id_entrada='$id_entrada'\";\n\t\t\t$id_insert = consultasSQL::UpdateSQL($tabela, $campos, $condicion);\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "9ca985798b5d16508f0ac142842c63c9", "score": "0.5058279", "text": "public function creacion_sin_form($id_pedido, $renglon, $cod_producto, $sku, $cantidad, $precio_unitario, $precio_total)\n\t{\n\t\t$data['title'] = 'Carga de líneas';\n\t\t//al llamar a ésta función se utilizan los campos del post.\n\t\t$this->pedido_linea_model->set_pedido_linea($id_pedido, $renglon, $cod_producto, $sku, $cantidad, $precio_unitario, $precio_total);\n\t\t//obtengo los datos de pedido_cabecera\n\t\t$data['pedido_cabecera_item'] = $this->pedido_cabecera->get_pedidos($id_pedido);\n\t\t//Obtengo los datos de las lineas del pedido\n\t\t$data['pedido_linea_lista'] = $this->pedido_linea_model->get_pedido_lineas($id_pedido);\n\t\t//defino una variable con el código de cliente que filtramos. Se deberá traer el nombre en base a éste código.\n\t\t$data['codigo_cliente'] = $data['pedido_cabecera_item']['cod_cliente'];\n\t\t\n\t\t\n\t\t//LO SIGUIENTE SE TENDRÍA QUE LLAMAR POR MEDIO DEL CONTROLADOR DE PEDIDO CABECERA. \n\t\t\n\t\t//O TAL VEZ HABRÍA QUE DISEÑAR UNA CLASE PEDIDO, QUE SE PUEDA OBTENER TODA LA INFORMACIÓN\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//Llamamos a la vista que presentará nuestra información\n $this->load->view('templates/header', $data);\n $this->load->view('pedido_cabecera/view', $data);\n $this->load->view('templates/footer');\n\t}", "title": "" }, { "docid": "4353e57fd49d5de647736e6779308a11", "score": "0.50537634", "text": "public static function setTblcarritoproductcomplem($cantidad,$nombreproductcom,$nombreproveedor,$precioreal,$preciobp,$emailcreo,$idtblordencompra,$idtblproductcomplem){\n \n $insert =\"INSERT INTO tblcarritoproductcomplem (tblcarritoproductcomplem_cantidad, tblcarritoproductcomplem_nombreproducto, tblcarritoproductcomplem_nombreproveedor, tblcarritoproductcomplem_precioreal, tblcarritoproductcomplem_preciobp, tblcarritoproductcomplem_fchmodificacion, tblcarritoproductcomplem_fchcreacion, tblcarritoproductcomplem_emailusuacreo, tblcarritoproductcomplem_emailusuamodifico,tblcarritoproductcomplem_idtblordencompra, tblcarritoproductcomplem_idtblproductcomplem) VALUES (?,?,?,?,?,NOW(),NOW(),?,?,?,?)\"; \n \n try{\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($insert);\n\t\t\t$resultado->bindParam(1,$cantidad,PDO::PARAM_INT);\n\t\t\t$resultado->bindParam(2,$nombreproductcom,PDO::PARAM_STR);\n\t\t\t$resultado->bindParam(3,$nombreproveedor,PDO::PARAM_STR);\n\t\t\t$resultado->bindParam(4,$precioreal,PDO::PARAM_STR);\n\t\t\t$resultado->bindParam(5,$preciobp,PDO::PARAM_STR);\n\t\t\t$resultado->bindParam(6,$emailcreo,PDO::PARAM_STR);\n\t\t\t$resultado->bindParam(7,$emailcreo,PDO::PARAM_STR);\n\t\t\t$resultado->bindParam(8,$idtblordencompra,PDO::PARAM_INT);\n\t\t\t$resultado->bindParam(9,$idtblproductcomplem,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->rowCount(); //retorna el numero de registros afectado por el insert\n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n \n }", "title": "" }, { "docid": "367d8edf1196484ef752ae065634d6da", "score": "0.50375044", "text": "public function anular($idcredito, $idcompra){\n $sql = \"UPDATE nota_credito_debito_compra SET estado='0' WHERE idnotacredidebi = '$idcredito'\";\n\n // tenemos que actualizar la compra anulada de la tabla cuentas a pagar\n $sql2 = \"UPDATE cuentas_a_pagar SET idnotacredidebi = '0' WHERE idcompra = '$idcompra'\";\n ejecutarConsulta($sql2);\n\n return ejecutarConsulta($sql);\n }", "title": "" }, { "docid": "709c245f2215b7ada0809e1bc655e3ef", "score": "0.5032053", "text": "public function Finalizar_compra(){\r\n \r\n $this->load->helper('url');\r\n $this->load->model('Model_tienda', \"tienda\");\r\n $this->load->library('carrito');\r\n \r\n \r\n $codigo=$this->tienda->ObtenerCodigo($_SESSION['usuario']['Nombre_usuario']);\r\n// print_r( $codigo);\r\n $datosPedido=Array('fecha'=>date('Y-m-d'),\r\n 'Estado'=>\"NP\",\r\n 'Compradores_Codigo'=>$codigo);\r\n// echo \"<pre>\";\r\n// print_r($datosPedido);\r\n// echo\"</pre>\";\r\n \r\n $this->tienda->NuevoPedido($datosPedido);\r\n \r\n $cod_pedido=$this->db->insert_id();\r\n \r\n foreach ($_SESSION['ElementosSeleccionados'] as $producto){\r\n \r\n $lineapedido=Array(\r\n \r\n 'Productos_Codigo'=>$producto['id'],\r\n 'Cantidad'=>$producto['cantidad'],\r\n 'Importe'=>$producto['total'],\r\n 'Pedidos_codigo_pedido'=>$cod_pedido,\r\n );\r\n //Comprobamos que no se supere el stock\r\n $stock=$this->tienda->TraerStock($producto['id']);\r\n \r\n \r\n $nuevoStock=($stock->Stock)-($producto['cantidad']);\r\n if($nuevoStock>=0){\r\n $data = \"stock='\". $nuevoStock.\"'\";\r\n $where = \" Codigo ='\".$producto['id'];\r\n $this->tienda->RestarStock($data,$where);\r\n /*\r\n echo \"<pre>\";\r\n print_r($lineapedido);\r\n echo\"</pre>\";\r\n */\r\n //insertamos la linea de pedido.\r\n $this->tienda->NuevaLineaPedido($lineapedido);\r\n }\r\n else\r\n {\r\n $SuperaSTOCK=true;\r\n \r\n }\r\n \r\n \r\n \r\n }\r\n if(!isset($SuperaSTOCK) || $SuperaSTOCK==false)\r\n {\r\n //Imprimimos el pedido en PDF;\r\n $comprando=true;\r\n $this->ImprimirPedidoPDE($cod_pedido,$comprando);\r\n $this->carrito->destroy();//limpiamos la session para nueva compra.\r\n //Envio de correo con pdf\r\n $this->EnviaCorreo($cod_pedido,$_SESSION['usuario']['Correo']);\r\n $_SESSION['comprando']=false;\r\n \r\n }else\r\n {\r\n $cuerpo= $this->load->view('Error_compra_Stock','', true);\r\n $this->load->view('Index', Array('cuerpo' => $cuerpo)); \r\n }\r\n \r\n }", "title": "" }, { "docid": "66674a58546a4e4eec4294eb0a5a8d17", "score": "0.5025498", "text": "public function agregar_estadosMantenimiento_controlador(){\n\t\t\tif (!empty($_POST['opcion-reg'])) {\n\t\t\t\t$opcion=mainModel::limpiar_cadena($_POST['opcion-reg']);\n\t\t\t\tif ($opcion=='REPARADO' || $opcion=='EN REPARACION') {\n\t\t\t\t\t\n\t\t\t\t\t$consultacod=mainModel::ejecutar_consulta_simple(\"SELECT estadomantenimientocodigo FROM estado_mantenimiento\");\n\t\t\t\t\t$numero=($consultacod->rowCount())+1;\n\t\t\t\t\t$codigo=mainModel::generar_codigo_aleatorio(\"ESTMANT\",7,$numero);\n\n\t\t\t\t\t$consulta1=mainModel::ejecutar_consulta_simple(\"SELECT estadomantenimientocodigo FROM estado_mantenimiento WHERE estadomantenimientocodigo='$codigo'\");\n\t\t\t\t\tif ($consulta1->rowCount()<=0) {\n\t\t\t\t\t\t$consulta2=mainModel::ejecutar_consulta_simple(\"SELECT estadomantenimientonombre FROM estado_mantenimiento WHERE estadomantenimientonombre='$opcion'\");\n\t\t\t\t\t\tif ($consulta2->rowCount()<=0) {\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t$datosestadosMantenimiento=[\n\t\t\t\t\t\t\t\t\"CODIGO\"=>$codigo,\n\t\t\t\t\t\t\t\t\"OPCION\"=>$opcion,\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t$guardarestadosMantenimiento=estadosMantenimientoModelo::agregar_estadosMantenimiento_modelo($datosestadosMantenimiento);\n\t\t\t\t\t\t\tif ($guardarestadosMantenimiento->rowCount()>=1) {\n\t\t\t\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\t\t\"Alerta\"=>\"recargar\",\n\t\t\t\t\t\t\t\t\t\"Titulo\"=>\"Felicitaciones!\",\n\t\t\t\t\t\t\t\t\t\"Texto\"=>\"El estado del mantenimiento se ha registrado con éxito\",\n\t\t\t\t\t\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\t\t\t\t\"Texto\"=>\"No se ha podido guardar el estado del mantenimiento, porfavor intente nuevamente\",\n\t\t\t\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t\t\t\t];\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\t\t\t\"Texto\"=>\"El estado del mantenimiento ya se encuentra registrado en el sistema, por favor intente nuevamente\",\n\t\t\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\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$alerta=[\n\t\t\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\t\t\"Texto\"=>\"El código que se genero para el mantenimiento ya se encuentra en el sistema, porfavor intente nuevamente recargando la página\",\n\t\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\t\"Texto\"=>\"Solo puede ingresar los estados del mantenimiento que vienen por defecto en el sistema\",\n\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"Faltan campos por llenar\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t}\n\t\t\treturn mainModel::sweet_alert($alerta);\n\t\t}", "title": "" }, { "docid": "2a4f68c2e338af39b768e6cd35fc6457", "score": "0.5025301", "text": "public function asociarProductoSeleccionado($idProductoAdd,$precioProductoAdd,$idTienda){\n $objInsert = new ControladorInserttAllTables();\n $intoAsociada2 = \"Producto_idProducto,Empresa_idEmpresa,precioReal\";\n $valueAsociada2 = \"'$idProductoAdd'\".\",\".\"'$idTienda'\".\",\".\"'$precioProductoAdd'\";\n $result = $objInsert->insertInTable(\"producto_has_empresa\",$intoAsociada2,$valueAsociada2);\n if($result!=\"Fallo\"){\n echo \"<script>toastr.info('Se asocia correcta mente el producto');</script>\";\n\t\t}else{\n echo \"<script>toastr.info('Se presenta un error asociando el producto');</script>\";\n\t\t}\n\t}", "title": "" }, { "docid": "849e9fad1826eed1dcd4348a88b71221", "score": "0.5006564", "text": "private function getFechasRecompraSku(array $comprasPorSku) :array{\n foreach($comprasPorSku as $sku => $atributo){\n if (array_key_exists('difFechas', $atributo)) {\n $ultimaFecha = max($atributo['fechas']);\n $diasPromedio = ceil( array_sum($atributo['difFechas']) / count($atributo['difFechas']) );\n $comprasPorSku[$sku]['fechaRecompra'] = $this->getFechaRecompra($diasPromedio, $ultimaFecha);\n $comprasPorSku[$sku]['fechaRecompraSinAtipicos'] = $this->getFechaRecompraSinAtipicos($atributo['difFechas'], $ultimaFecha);\n unset($comprasPorSku[$sku]['difFechas']);\n }else{\n //Limpiamos los productos que no tienen el diferencia entre fechas\n unset($comprasPorSku[$sku]);\n }\n }\n return $comprasPorSku;\n }", "title": "" }, { "docid": "6b7f80849586b9a75b4f828b0da49c6d", "score": "0.4997809", "text": "public function actionagregarmasivamente($idguia){\n $modelocabeza= $this->loadModel(MiFactoria::cleanInput($idguia));\n if(isset($_POST['Ocompra']))\n { $grupoid = $_POST['cajita'];\n $criterio=New CDBcriteria();\n $criterio->addInCondition('id',$grupoid);\n $registros=VwSolpeparacomprar::model()->findAll($criterio);\n foreach($registros as $filadesolpe){\n $registroitemcompra=New Docompratemp('ingresodesolpe');\n $this->pasadatosacompra($filadesolpe,$registroitemcompra,$idguia);\n //ahora verificando las\n $registroitemcompra->save();\n IF(count($registroitemcompra->geterrors())>0)\n {\n print_r($registroitemcompra->geterrors());\n yii::app()->end();\n }\n }\n unset($registroitemcompra);\n if (!empty($_GET['asDialog']))\n {\n //echo \" SON LOS HIJOS \".count($this->jalasolpetotal($model2->id));\n echo CHtml::script(\"window.parent.$('#cru-dialogdetalle').dialog('close');\n\t\t\t\t\t\t\t\t\t\t\t\t\t window.parent.$('#cru-detalle').attr('src','');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow.parent.$.fn.yiiGridView.update('detalle-grid');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\");\n Yii::app()->end();\n }\n\n }\n\n if (!empty($_GET['asDialog']))\n $this->layout = '//layouts/iframe';\n $model=New VwSolpeparacomprar;\n if(isset($_GET['VwSolpeparacomprar']))\n $model->attributes=$_GET['VwSolpeparacomprar'];\n\n //$model->unsetAttributes();\n $this->render('_formvariositems',array(\n 'modelocabeza'=>$modelocabeza,'model'=>$model,\n ));\n }", "title": "" }, { "docid": "64c5d1848d42dc7cb2f18174bd480cbf", "score": "0.4997398", "text": "function obtiene_producto($codigo_barra, $local) {\n\n\n\t//consulta ind_cat\n\t$my_barcode = $codigo_barra + 0;\n\n\t$query = \" SELECT cb.cod_barra cod_barra ,\n\t\t\t\t\t\tp.cod_prod1 cod_prod1,\n\t\t\t\t\t\tp.des_corta des_corta,\n\t\t\t\t\t\tp.des_larga des_larga,\n\t\t\t\t\t\tpr.cod_local cod_local,\n\t\t\t\t\t\tpr.prec_valor pvalor,\n\t\t\t\t\t\tcb.unid_med unit\n\t\t\t\tFROM codbarra cb \n\t\t\t\tJOIN precios pr ON (pr.id_producto = cb.id_producto AND pr.cod_local ='$local')\n\t\t\t\tJOIN productos p ON (cb.id_producto = p.id_producto)\n\t\t\t\tWHERE cb.cod_barra='$my_barcode' AND cb.estadoactivo='C'\";\n\twlog(\"obtiene_producto : MYSQL qry: $query\");\n\n\t//<product cod_prod1=\"PR10229449\" fpesable=\"yes\"><barcode>780118899933</barcode><desc1>Grecian 2000</desc1><desc2>Grecian 2000 for men</desc2>\n\t//<price>2500</price><unit>u</unit><stock>2500</stock></product>\n\t//unit y stock suprimidos\n\n $db_1 = tep_db_query($query);\n\t\n\n\t//Verificar error mysql\n\twlog(\"obtiene_producto : Numero de filas\".tep_db_num_rows($db_1));\n\n if ( $res = tep_db_fetch_array( $db_1 ) ) {\n\n\t\twlog(\"cod_barra:$my_barcode\");\n\t\twlog(\"cod_prod1:\".$res['cod_prod1']);\n\t\twlog(\"des_corta:\".$res['des_corta']);\n\t\twlog(\"des_larga:\".$res['des_larga']);\n\t\twlog(\"cod_local:\".$res['cod_local']);\n\t\twlog(\"prec_valor:\".$res['pvalor']);\n\t\twlog(\"unit:\".$res['unit']);\n\n\t\t$XMLprod = '<product>'.chr(13);\n\t\t$XMLprod .= \"<barcode>$my_barcode</barcode>\".chr(13);\n\t\t$XMLprod .= \"<codsap>\".$res['cod_prod1'].\"</codsap>\".chr(13);\n\t\t$XMLprod .= \"<desc1>\".$res['des_corta'].\"</desc1>\".chr(13);\n\t\t$XMLprod .= \"<desc2>\".$res['des_larga'].\"</desc2>\".chr(13);\n\t\t$XMLprod .= \"<price>\".$res['pvalor'].\"</price>\".chr(13);\n\t\t$XMLprod .= \"<unit>\".$res['unit'].\"</unit>\".chr(13).\"<stock></stock>\".chr(13).\"</product>\".chr(13);\n\n\t\twlog(\"obtiene_producto : XML del producto : $XMLprod\");\n\t\treturn $XMLprod;\n\t\t}\n\twlog(\"obtiene_producto : Termina sin producto\");\n\t\n\treturn false;\n\n/*\n\t$XMLprod = \"<product cod_prod1='PR10229449' fpesable='no'><barcode>780118899933</barcode><desc1>Grecian 2000</desc1><desc2>Greciań 2000 for men</desc2><price>2500</price><unit>u</unit><stock>2500</stock></product>\";\n\treturn $XMLprod;\n*/\n\t}", "title": "" }, { "docid": "22a58373fd38c3f0b96205358a4611e9", "score": "0.49905443", "text": "public function cadastra_produtos_promocao($id, $idprodutos)\n\t{\n\t\t//\tAPAGO OS PRODUTOS ANTIGOS\n\t\t$sql = \"DELETE FROM tb_produtos_promocoes WHERE id_promocao = '$id'\";\n\t\tparent::executaSQL($sql);\n\t\t\n\t\t\n\t\tif(count($idprodutos) > 0):\n\t\t\n\t\t\tforeach($idprodutos as $idproduto):\n\t\t\t\t\n\t\t\t\t$sql = \"INSERT INTO tb_produtos_promocoes (id_promocao, id_produto) VALUES ('$id', '$idproduto')\";\n\t\t\t\tparent::executaSQL($sql);\n\t\t\t\t\n\t\t\tendforeach;\n\t\t\n\t\tendif;\n\t\n\t\t\n\t\texit;\n\t\t\n\t}", "title": "" }, { "docid": "3422e166cc198893833d0b7854cbad93", "score": "0.4982562", "text": "static public function mdlAgregarRemito($tabla, $datos){\n\t\t\n\n\t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(idremito, idcliente, nombrecliente, datos, total,fecha) VALUES (:idremito,:id_cliente, :nombre_cliente, :datos, :total, :fecha)\");\n\n\t\t$stmt->bindParam(\":idremito\", $datos[\"idremito\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":id_cliente\", $datos[\"id_cliente\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":nombre_cliente\", $datos[\"nombre_cliente\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":datos\", $datos[\"datos\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":total\", $datos[\"total\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":fecha\", $datos[\"fecha\"], PDO::PARAM_STR);\n\t\t\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n\t}", "title": "" }, { "docid": "410016230c14f01ff68c5376fad2c383", "score": "0.49785122", "text": "public function comprar ($id){\n\t\t/*$this-&gt;resultado = $this-&gt;Categories-&gt;find_all_by_sql('SELECT * FROM categories INNER JOIN categoriesdescription ON categories&#46;id = categoriesdescription&#46;categories_id AND categories&#46;parent_id='&#46;$this-&gt;parent_id&#46;' ORDER BY '&#46;$this-&gt;ordenar&#46;' '&#46;$this-&gt;tipoDeOrden); */\n\t\t$var1= new Compra();\n\t\t$var2= new Compra();\n\t\t$var3= new Compra();\n\t\t$date = new Date();\n\t\t$this ->listvar1 = $var1->find_by_sql(\"Select Producto.idProducto, Producto.nombre from Producto \n\t\t\tLEFT OUTER JOIN Compra ON Producto.idProducto = Compra.idProducto Where Producto.idProducto= '$id' \");\n\t\t$this ->listvar2 = $var2->find_by_sql(\"Select Cliente.idCliente, nombreCliente from Cliente \n\t\t\tLEFT OUTER JOIN Compra ON Cliente.idCliente = Compra.idCliente \");\n\t\t$this ->listvar3 = $var3->find_by_sql(\"Select Producto.precio from Producto\n\t\t\tLEFT OUTER JOIN Compra ON Producto.idProducto = Compra.idProducto where Producto.idProducto= '$id'\");\n\n\t\tif(Input::hasPost('Compra'))\n\t\t{\n\t\t\t$us = new Compra(Input::post('Compra'));\n\t\t\tif($us->fecha>$date || $us->fecha<'1990-01-01'){\n\t\t\t\tFlash::Error('Error fecha ');\n\t\t\t}else{\n\t\t\t\t$cant= $us->cantidad;\n\t\t\t\t$var4 = new Compra();\n\t\t\t\t$stock = new Compra();\n\t\t\t\tif($cant<0){\n\t\t\t\t\tFlash::Error('Cantidad erronea');\n\t\t\t\t}else{\n\t\t\t\t\t$stock= $var3->find_by_sql(\"Select Producto.stock from Producto\n\t\t\t\t\t\tLEFT OUTER JOIN Compra ON Producto.idProducto = Compra.idProducto where Producto.idProducto= '$id'\");\n\t\t\t\t\tif($stock->stock>=0){\n\t\t\t\t\t\tif(($stock->stock-$cant)>=0){\n\t\t\t\t\t\t\tif($us->create()) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$lvar= $us->totalPago;\n\n\t\t\t\t\t\t\t\t$pagoTotal=(($lvar*$cant));\n\n\t\t\t\t\t\t\t\t$Nstock=($stock->stock-$cant);\n\t\t\t\t\t\t\t\t$producto= new Producto();\n\t\t\t\t\t\t\t\t$stockprod = new Producto();\n\t\t\t\t\t\t\t\t$producto= $stockprod->find($id);\n\t\t\t\t\t\t\t\t$producto->update(\"stock: $Nstock\");\n\t\t\t\t\t\t\t\t$producto->save();\n\n\t\t\t\t\t\t\t\t//settype($pagoTotal, float);\n\t\t\t\t\t\t\t\t//Flash::Valid($lvar);\n\t\t\t\t\t\t\t\t//Flash::Valid($pagoTotal);\n\t\t\t\t\t\t\t\t//$pagoTotalD=floatval($pagoTotal);\n\n\t\t\t\t\t\t\t\t$compra = new Compra();\n\t\t\t\t\t\t\t\t$pago = new Compra();\n\t\t\t\t\t\t\t\t$pago= $compra->find($us->idCompra);\n\t\t\t\t\t\t\t\t$pago->update(\"totalPago: $pagoTotal\");\n\t\t\t\t\t\t\t\t$pago->save();\n\n\n\n\n\t\t\t\t\t\t\t\t//Modificar el stock de producto\n\t\t\t\t\t\t\t\t//Modificar el precio total ya que se debe multiplicar por la cantidad\n\n\t\t\t\t\t\t\t\tFlash::Valid('Operacion Exitosa');\n\t\t\t\t\t\t\t\tInput::delete();//Limpia los campos del input\n\t\t\t\t\t\t\t\treturn Redirect::to(\"Compra/index/\");\n\t\t\t\t\t\t\t}else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tFlash::Error('Fallo en la Operacion');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tFlash::Error('Stock insuficiente');\n\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\tFlash::Error('Stock insuficiente');\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "a1c1ffb27382a50254c6a19afb2b46fa", "score": "0.49775434", "text": "public function agregarProducto() {\n if (isset($_GET['id'])) {\n $idProducto = $_GET['id'];\n } else {\n header('Location:' . urlBase . 'Usuario/vistaUsuario');\n }\n\n if (isset($_SESSION['carrito'])) {\n $contador = 0;\n foreach ($_SESSION['carrito'] as $indice => $elemento) {\n if ($elemento['idProducto'] == $idProducto) {\n $_SESSION['carrito'][$indice]['unidades']++;\n $contador++;\n }\n }\n }\n\n if (!isset($contador) || $contador == 0) {\n // Conseguir producto\n $producto = new Producto();\n $producto->setIdProducto($idProducto);\n $producto = $producto->obtenerUnProducto();\n\n // Añadir al carrito\n if (is_object($producto)) {\n $_SESSION['carrito'][] = array(\n \"idProducto\" => $producto->idProducto,\n \"precioProducto\" => $producto->precioProducto,\n \"unidades\" => 1,\n \"producto\" => $producto\n );\n }\n }\n\n echo \"<script> window.location=' \"\n . urlBase . \"Carrito/verCarrito'; </script>\";\n }", "title": "" }, { "docid": "f0ff121a4a3e821d5dc8bd648acca0c5", "score": "0.4976613", "text": "private function savenew_tradd(){\n\n\t\t$this->nuevo_idioma();\t\t\t//agrego nuevo idioma\n\t\t$this->actualiza_lg_anuncio();\t//actualizo anuncio a mejor\n\t\t//preparo array para historial\n\t\t$hist = array('num_pedido' \t=> $this->pedido,\t'user'\t\t\t=> $this->buyer,\n\t\t\t\t\t 'tipo_pedido' => 'tradd',\t\t\t'anuncio' \t\t=> $this->anuncio,\n\t\t\t\t\t 'idioma' \t\t=> $this->idioma,\t'fecha_pedido' \t=> $this->fecha_pedido,\n\t\t\t\t\t 'fecha_realizacion' => $this->now);\n\n\t\t$this->to_historial_pedidos($hist);\t//envio a historial el pedido realizado\n\t\t$this->borrar_tradd_pedido();\t\t//borro info de pedido realizado\n\n\t}", "title": "" }, { "docid": "64006bdab6b1afedca13cc4eb8bbdbd5", "score": "0.4971364", "text": "function cambiarEstadoMaterialesPorOrdenDespuesCompra ($proyecto_id) {\n\t\t$this->db->select(\n\t\t\t$this->t_proyecto_material.'.proyecto_material_id, '.\n\t\t\t$this->t_proyecto_material.'.proyecto_material_estado_id, '.\n\t\t\t$this->t_proyecto_material.'.material_id, '.\n\t\t\t$this->t_proyecto_material.'.proyecto_id, '.\n\t\t\t$this->t_proyecto_material.'.proyecto_material_tipo, '.\n\t\t\t$this->t_proyecto_material.'.cantidad as cantidad_inicial, '.\n\t\t\t$this->t_proyecto_material_detalle.'.proveedor_id, '.\n\t\t\t$this->t_proyecto_material_detalle.'.precio, '.\n\t\t\t$this->t_proyecto_material_solicitud_compra.'.proyecto_material_solicitud_compra_id, '.\n\t\t\t$this->t_proyecto_material_solicitud_compra.'.proyecto_material_solicitud_compra_estado_id, '.\n\t\t\t$this->t_proyecto_material_solicitud_compra_detalle.'.cantidad as cantidad_comprada, '.\n\t\t\t$this->t_proyecto_material_solicitud_compra_orden_compra.'.proyecto_material_solicitud_compra_orden_compra_id, '.\n\t\t\t$this->t_proyecto_material_solicitud_compra_orden_compra.'.proyecto_material_solicitud_compra_orden_compra_estado_id'\n\t\t);\n\t\t$this->db->join($this->t_proyecto_material_solicitud_compra_orden_compra, $this->t_proyecto_material_solicitud_compra_orden_compra.'.proyecto_material_solicitud_compra_id = '.$this->t_proyecto_material_solicitud_compra.'.proyecto_material_solicitud_compra_id');\n\t\t$this->db->join($this->t_proyecto_material_solicitud_compra_detalle, $this->t_proyecto_material_solicitud_compra_detalle.'.proyecto_material_solicitud_compra_id = '.$this->t_proyecto_material_solicitud_compra.'.proyecto_material_solicitud_compra_id AND '.$this->t_proyecto_material_solicitud_compra_detalle.'.estado_registro = 1');\n\t\t$this->db->join($this->t_proyecto_material, $this->t_proyecto_material.'.proyecto_material_id = '.$this->t_proyecto_material_solicitud_compra_detalle.'.proyecto_material_id AND '.$this->t_proyecto_material.'.estado_registro = 1');\n\t\t$this->db->join($this->t_proyecto_material_detalle, $this->t_proyecto_material_detalle.'.proyecto_material_id = '.$this->t_proyecto_material.'.proyecto_material_id AND '.$this->t_proyecto_material_detalle.'.proveedor_id = '.$this->t_proyecto_material_solicitud_compra_orden_compra.'.proveedor_id AND '.$this->t_proyecto_material_detalle.'.estado_registro = 1');\n\t\t$this->db->where($this->t_proyecto_material_solicitud_compra.'.proyecto_id', $proyecto_id);\n\t\t$this->db->where($this->t_proyecto_material_solicitud_compra_orden_compra.'.proyecto_material_solicitud_compra_orden_compra_estado_id', 3);\n\t\t$result_materiales = $this->db->get($this->t_proyecto_material_solicitud_compra);\n\t\t$result_materiales_count = $result_materiales->num_rows();\n\n\t\t//recorre todos los materiales para ver si han comprado alguno\n\t\t$materiales_agotados = array();\n\t\t$materiales_consumidos_parcialmente = array();\n\t\t\t\n\t\t\t//Valida si hay materiales asignados al proyecto\n\t\tif($result_materiales_count> 0){\n\t\t\t$result_materiales_rows = $result_materiales->result();\n\t\t\t$materiales_comprados_total_cantidad = array();\n\t\t\t$materiales_restantes = array();\n\t\t\t$materiales_comprados_ids = array();\n\t\t\t// Carga la cantidad de materiales iniciales\n\t\t\tforeach ($result_materiales_rows as $kmaterial => $vmaterial) {\n\t\t\t\t$materiales_restantes[$vmaterial->proyecto_material_id] = (double)$vmaterial->cantidad_inicial;\n\t\t\t\t$materiales_comprados_total_cantidad[$vmaterial->proyecto_material_id] = 0;\n\t\t\t\t$materiales_comprados_ids[] = $vmaterial->proyecto_material_id;\n\t\t\t}\n\n\t\t\t// Suma las compras\n\t\t\tforeach ($result_materiales_rows as $kmaterial => $vmaterial) {\n\t\t\t\t$materiales_comprados_total_cantidad[$vmaterial->proyecto_material_id] += (double)$vmaterial->cantidad_comprada;\n\t\t\t}\n\n\t\t\t//resta los materiales comprados a la cantidad inicial\n\t\t\tforeach ($materiales_restantes as $kmaterial => $vmaterial) {\n\t\t\t\t$cantidad_restante = $vmaterial - $materiales_comprados_total_cantidad[$kmaterial];\n\n\t\t\t\tif ($cantidad_restante > 0){\n\t\t\t\t\t$materiales_consumidos_parcialmente[] = $kmaterial;\n\t\t\t\t} else {\n\t\t\t\t\t$materiales_agotados[] = $kmaterial;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Actualiza los materiales parcialmente consumidos\n\t\t\tif (!empty($materiales_consumidos_parcialmente)) {\n\t\t\t\t// Cambia el estado del material la primera vez que se registra el proveedor\n\t\t\t\t$this->db->set('proyecto_material_estado_id', 3);\n\t\t\t\t$this->db->where_in('proyecto_material_id', $materiales_consumidos_parcialmente);\n\t\t\t\t$this->db->where('estado_registro', 1);\n\t\t\t\t$this->db->update($this->t_proyecto_material);\n\t\t\t}\n\n\t\t\t// Actualiza los materiales consumidos\n\t\t\tif (!empty($materiales_agotados)) {\n\t\t\t\t// Cambia el estado del material la primera vez que se registra el proveedor\n\t\t\t\t$this->db->set('proyecto_material_estado_id', 4);\n\t\t\t\t$this->db->where_in('proyecto_material_id', $materiales_agotados);\n\t\t\t\t$this->db->where('estado_registro', 1);\n\t\t\t\t$this->db->update($this->t_proyecto_material);\n\t\t\t}\n\n\t\t\t// Actualiza los materiales que no han sido consumidos del todo (en caso de una reversion)\n\t\t\t$this->db->select($this->t_proyecto_material_detalle.'.proyecto_material_id');\n\t\t\t$this->db->join($this->t_proyecto_material, $this->t_proyecto_material.'.proyecto_material_id = '.$this->t_proyecto_material_detalle.'.proyecto_material_id AND '.$this->t_proyecto_material.'.estado_registro = 1');\n\t\t\t$this->db->where($this->t_proyecto_material_detalle.'.estado_registro', 1);\n\t\t\t$this->db->where('proyecto_id', $proyecto_id);\n\t\t\t$this->db->where_not_in($this->t_proyecto_material_detalle.'.proyecto_material_id', $materiales_comprados_ids);\n\t\t\t$result_materiales_cotizados_no_consumidos = $this->db->get($this->t_proyecto_material_detalle);\n\t\t\t$result_materiales_cotizados_no_consumidos_count = $result_materiales_cotizados_no_consumidos->num_rows();\n\t\t\tif ($result_materiales_cotizados_no_consumidos_count > 0) {\n\t\t\t\t$result_materiales_cotizados_no_consumidos_rows = $result_materiales_cotizados_no_consumidos->result();\n\t\t\t\t$result_materiales_cotizados_no_consumidos_ids = array();\n\t\t\t\tforeach ($result_materiales_cotizados_no_consumidos_rows as $key => $value) {\n\t\t\t\t\t$result_materiales_cotizados_no_consumidos_ids[] = $value->proyecto_material_id;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->db->set('proyecto_material_estado_id', 2);\n\t\t\t\t$this->db->where_in('proyecto_material_id', $result_materiales_cotizados_no_consumidos_ids);\n\t\t\t\t$this->db->where('estado_registro', 1);\n\t\t\t\t$this->db->update($this->t_proyecto_material);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "cabcdf059bc971a1d0d14c3e14922d50", "score": "0.49711695", "text": "function prueba_de_actualizacion(Array $data){\r\n if(isset($data)){\r\n\r\n if(!isset($data['coloresXtallas']) || !isset($data['id_producto'])){\r\n return array(\"status\" => \"error\", \"mensaje\" => \"faltan datos\");\r\n }\r\n\r\n parent::conectar();\r\n $producto = parent::consultaTodo(\"SELECT * FROM productos WHERE id = '$data[id_producto]'\");\r\n \r\n \r\n parent::cerrar();\r\n \r\n\r\n $cantidad_post = 0;\r\n $cantidad_post_aux = 0;\r\n if($producto[0]['tiene_colores_tallas'] == 1){\r\n $cantidad_post = 0;\r\n }else{\r\n $cantidad_post_aux = $producto[0]['cantidad'];\r\n $cantidad_post = $producto[0]['cantidad'];\r\n }\r\n $realizar_op = false;\r\n \r\n if(isset($producto) && count($producto) > 0){\r\n foreach($data['coloresXtallas'] as $pair){\r\n if(isset($pair['eliminar_color']) && ($pair['eliminar_color'] == true || $pair['eliminar_color'] == 1)){ // PARA ELIMINAR UN COLOR Y LAS TALLAS ASOCIADAS A EL\r\n foreach($pair['tallas'] as $talla){\r\n if(isset($talla['id_pair'])){\r\n parent::conectar();\r\n parent::query(\"DELETE FROM detalle_producto_colores_tallas WHERE id = '$talla[id_pair]' \");\r\n parent::cerrar();\r\n }\r\n }\r\n }else{\r\n foreach($pair['tallas'] as $talla){\r\n if(isset($talla['id_pair'])){\r\n if(isset($talla['eliminar_pair']) && ($talla['eliminar_pair'] == true || $talla['eliminar_pair'] == 1)){ // PARA ELIMINAR UNA CONFIGURACION COLOR - TALLA\r\n // $cantidad_post = $cantidad_post - $talla['cantidad'];\r\n parent::conectar();\r\n parent::query(\"DELETE FROM detalle_producto_colores_tallas WHERE id = '$talla[id_pair]' \");\r\n parent::cerrar();\r\n }else{ // SI NO VIENE EL dato eliminar_pair ENTONCES SE VA A ACTUALIZAR\r\n $cantidad_post = $cantidad_post + $talla['cantidad'];\r\n parent::conectar();\r\n parent::query(\"UPDATE detalle_producto_colores_tallas SET id_tallas = '$talla[id_talla]', id_colores = '$pair[id_color]', cantidad = '$talla[cantidad]', sku = '$talla[sku]' WHERE id = '$talla[id_pair]'\");\r\n parent::cerrar();\r\n }\r\n \r\n }else{ // SI NO VIENE EL id_pair\r\n $realizar_op = true;\r\n parent::conectar();\r\n $consulta = parent::consultaTodo(\"SELECT * FROM detalle_producto_colores_tallas WHERE id_producto = '$data[id_producto]' AND id_tallas = '$talla[id_talla]' AND id_colores = '$pair[id_color]'\");\r\n parent::cerrar();\r\n if(!$consulta){ // SI EL REGISTRO NO ESTA SE INSERTA\r\n $cantidad_post = $cantidad_post + $talla['cantidad'];\r\n parent::conectar();\r\n $resultado = parent::queryRegistro(\"INSERT INTO detalle_producto_colores_tallas(id_producto,id_tallas,id_colores,cantidad,sku) VALUES('$data[id_producto]','$talla[id_talla]','$pair[id_color]','$talla[cantidad]','$talla[sku]');\");\r\n parent::cerrar(); \r\n }else{ // SI EL PRODUCTO ESTA SE ACTUALIZA\r\n $cantidad_pair = $consulta[0]['cantidad'] + $talla['cantidad'];\r\n $cantidad_post = $cantidad_post - $consulta[0]['cantidad'] + $cantidad_pair;\r\n\r\n $pair_aux = $consulta[0]['id'];\r\n parent::conectar();\r\n parent::query(\"UPDATE detalle_producto_colores_tallas SET cantidad = '$cantidad_pair', sku = '$talla[sku]' WHERE id = '$pair_aux'\");\r\n parent::cerrar();\r\n }\r\n }\r\n }\r\n }\r\n }\r\n $nueva_cantidad = 0;\r\n if($producto[0]['tiene_colores_tallas'] == 1){\r\n $nueva_cantidad = $cantidad_post - $cantidad_post_aux;\r\n }else{\r\n if($realizar_op){\r\n $nueva_cantidad = $cantidad_post - $cantidad_post_aux;\r\n }else{\r\n $nueva_cantidad = $cantidad_post;\r\n }\r\n }\r\n parent::conectar(); // SE ACTUALIZA LA CANTIDAD DISPONIBLE EN LA TABLA PRODUCTOS\r\n parent::query(\"UPDATE productos SET tiene_colores_tallas = 1, cantidad ='$nueva_cantidad' WHERE id = '$data[id_producto]'\");\r\n parent::cerrar();\r\n\r\n\r\n $dataActualizada = $this->obtener_productos_tallas_editar(array(\"id_producto\" => $data['id_producto']));\r\n \r\n if($dataActualizada['status'] == \"success\"){\r\n $this->envio_de_correo_general_ediccion($producto[0]); \r\n return array(\"status\" => \"success\", \"mensaje\" => \"data actualizada\", \"data\"=>$dataActualizada['data']);\r\n }else if( $dataActualizada['status'] == 'vacio'){\r\n\r\n parent::conectar();\r\n parent::query(\"UPDATE productos SET tiene_colores_tallas = 0 WHERE id = '$data[id_producto]'\");\r\n parent::cerrar();\r\n\r\n return array(\"status\" => \"success\", \"mensaje\" => \"todas las tallas y colores eliminadas\");\r\n }\r\n \r\n // return array(\"status\" => \"success\", \"mensaje\" => \"data actualizada\", \"data\"=>$data);\r\n }else{\r\n return array(\"status\" => \"error\", \"mensaje\" => \"error al obtener producto\");\r\n }\r\n // return array(\"status\" => \"success\", \"mensaje\" => \"data actualizada\", \"data\"=>$data);\r\n }else{\r\n return array(\"status\" => \"fail\", \"mensaje\" => \"data error\");\r\n }\r\n }", "title": "" }, { "docid": "fd0e0af8c6e16eff3aa89f060f75bfac", "score": "0.49631736", "text": "public function crear()\r {\r \t\t$fecha_pedido = $_POST['fpano'].\"-\".$_POST['fpmes'].\"-\".$_POST['fpdia'];\r \t\t$fecha_limite = $_POST['feano'].\"-\".$_POST['femes'].\"-\".$_POST['fedia'];\r \t $ultimocodigo = $this->_solicitud->consultar(\"1\");\r \t $counultimoregistro = count($ultimocodigo) - 1;\r \t \r \t if ($counultimoregistro<0) {\r \t $codigosiguiente='10001';\t\r \t }\r \t else{\r \t $codigosiguiente= $ultimocodigo[$counultimoregistro]['codigo'] + 1;\r \t\t}\r \t \r $data= array( \r ':codigo' => $codigosiguiente,\r ':fecha_pedido' => $fecha_pedido,\r ':fecha_limite' => $fecha_limite,\r ':realizado_por' => $_POST['realizado'],\r ':contrato_area' => $_POST['area'],\r ':centro_costo' => $_POST['centrocosto'],\r ':proveedor' => $_POST['proveedor'],\r ':observacion' => $_POST['observacion'],\r ':fecha_creacion' => date(\"Y-m-d\"),\r ':id_usu'=>Session::get('id_usuario'),\r );\r \t$key = $this->_solicitud->crear($data);\r \r //]\r //[ creacion productos para la solicitud\r \t\r \t for ($i=0; $i <count($_POST['producto']) ; $i++) { \r \t \t$data= array( \r ':descripcion' => $_POST['producto'][$i]['descripcion'],\r ':unidad_comercial' => $_POST['producto'][$i]['unidad_comercial'],\r ':cantidad_pedida' => $_POST['producto'][$i]['cantidad_pedida'],\r ':cantidad_despachada' => $_POST['producto'][$i]['cantidad_despachada'],\r ':valor_unitario' => $_POST['producto'][$i]['valor_unitario'],\r ':valor_iva' => $_POST['producto'][$i]['valor_iva'],\r ':id_solicitud' => $key['id']\r\t\t );\r\t\t \r\t\t \t$this->_solicitud->crearProductos($data);\r \t }\r \r \t$this->index();\r //] \r \r }", "title": "" }, { "docid": "15f11839dcfa4767a12a36dd4175f9f6", "score": "0.49559534", "text": "public function addResulEsp($resuldescripcion) {\n \n $resultadoSistema=new ResultadoEsperado();\n \n $resultadoSistema->setResuldescripcion($resuldescripcion);\n \n\t \n $this->em->persist($resultadoSistema);\n $this->em->flush();\t \n $matrizMensajes = array('El proceso de almacenar ha termino con exito', 'Objetivo '.$resultadoSistema->getIdResultadoE());\n\n return $matrizMensajes;\n }", "title": "" }, { "docid": "3b0c619d390a1afcfb7c121694b3e683", "score": "0.4943859", "text": "static public function ctrMovInsumoAltaOP($calculo_Insumos,$idOrdenProd){\r\n\r\n\t\t$tablaInsumos_receta=$calculo_Insumos['tablaInsumos_'];#del array solo me quedo con la tabla de insumos\r\n\t\t$longitud=count($tablaInsumos_receta);#cuento los registros\r\n\t\t\r\n\t\t\t#Armo el array\r\n\t\t\t$datosMI= array('idInsumo_'\t\t=>array_column($tablaInsumos_receta, 'id_insumo'),\r\n\t\t\t\t\t\t\t'cantidad_'\t\t=>array_column($tablaInsumos_receta, 'cantidad_op'),\r\n\t\t\t\t\t\t\t'idCuenta_'\t\t=>array_fill(0,$longitud,2), #Número fijo para la cuenta compra\r\n\t\t\t\t\t\t\t'idOrdenProd_'\t=>array_fill(0,$longitud,$idOrdenProd),\r\n\t\t\t\t\t\t\t'idCompra_'\t\t=>array_fill(0,$longitud,null),\r\n\t\t\t\t\t\t\t'idOrdenFin_'\t=>array_fill(0,$longitud,null),\r\n\t\t\t\t\t\t\t'idAjusteStock_'=>array_fill(0,$longitud,null),\r\n\t\t\t\t\t\t\t'idUsuario_'\t=>array_fill(0,$longitud,$_SESSION['userId']),\r\n\t\t\t\t\t\t\t'descripcion_'\t=>array_fill(0,$longitud,null),\r\n\t\t\t\t\t\t\t'funcion_'\t\t=>array_fill(0,$longitud,'OrdenProd'));\r\n\t\t#Recorro el Array \r\n\t\tfor ($i=0; $i <$longitud ; $i++) { \r\n\t\t\t# Inserto insumo por insumo\r\n\t\t\t$datos=array_column($datosMI,$i);\r\n\t\t\t$respuesta=ModeloFormularios::mdlMovimientoInsumo($datos);\r\n\r\n\t\t\tif ($respuesta != \"OK\") { return $respuesta;}\r\n\t\t}\r\n\r\n\treturn \"OK\";\r\n\t}", "title": "" }, { "docid": "d3246723744f177bafdfd3fa69e3283d", "score": "0.49418035", "text": "static public function mdlActualizarStockMP($codpro, $cantidad){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE \n\t\tproducto \n\t SET\n\t\tcodalm01 = codalm01 + :cantidad \n\t WHERE codpro = :codpro\");\n\n\t\t$stmt->bindParam(\":codpro\", $codpro, PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":cantidad\", $cantidad, PDO::PARAM_STR);\n\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\t\t\n\t\t}\n\n\t\t$stmt -> close();\n\t\t$stmt = null;\n\n\t}", "title": "" }, { "docid": "d6e01edb000dbd4ad9635a37be41dcd3", "score": "0.49379745", "text": "public function totaliza_pedido()\r\n {\r\n\r\n $this->mgt_nota_fiscal_valor_produtos->Text = '0.00';\r\n $this->mgt_nota_fiscal_valor_ipi->Text = '0.00';\r\n $this->mgt_nota_fiscal_valor_produtos->Text = '0.00';\r\n\r\n $valor_desconto = 0;\r\n $valor_pedido = 0;\r\n $valor_ipi = 0;\r\n $valor_total = 0;\r\n $desconto = $this->mgt_nota_fiscal_cliente_desconto->Text;\r\n $frete = $this->mgt_nota_fiscal_valor_frete->Text;\r\n\r\n if($desconto < 0)\r\n {\r\n $desconto = 0;\r\n }\r\n\r\n if($frete < 0)\r\n {\r\n $frete = 0;\r\n }\r\n\r\n $Comando_SQL = \"select * from mgt_notas_entradas_produtos where mgt_nota_entrada_produto_numero_nota = \" . trim($this->mgt_nota_fiscal_faturamento->Text) . \" order by mgt_nota_entrada_produto_numero\";\r\n\r\n GetConexaoPrincipal()->SQL_MGT_Notas_Entradas_Produtos->Close();\r\n GetConexaoPrincipal()->SQL_MGT_Notas_Entradas_Produtos->SQL = $Comando_SQL;\r\n GetConexaoPrincipal()->SQL_MGT_Notas_Entradas_Produtos->Open();\r\n\r\n if((GetConexaoPrincipal()->SQL_MGT_Notas_Entradas_Produtos->EOF) != 1)\r\n {\r\n while((GetConexaoPrincipal()->SQL_MGT_Notas_Entradas_Produtos->EOF) != 1)\r\n {\r\n $valor_ipi = $valor_ipi + GetConexaoPrincipal()->SQL_MGT_Notas_Entradas_Produtos->Fields['mgt_nota_entrada_produto_valor_ipi'];\r\n $valor_pedido = $valor_pedido + GetConexaoPrincipal()->SQL_MGT_Notas_Entradas_Produtos->Fields['mgt_nota_entrada_produto_valor_total'];\r\n\r\n GetConexaoPrincipal()->SQL_MGT_Notas_Entradas_Produtos->Next();\r\n }\r\n }\r\n\r\n if($desconto > 0)\r\n {\r\n $valor_desconto = (($valor_pedido * $desconto) / 100);\r\n }\r\n else\r\n {\r\n $valor_desconto = 0;\r\n }\r\n\r\n $valor_total = ((($valor_pedido + $valor_ipi) + $frete) - $valor_desconto);\r\n\r\n $this->mgt_nota_fiscal_valor_produtos->Text = number_format($valor_pedido, \"2\", \".\", \"\");\r\n $this->mgt_nota_fiscal_valor_ipi->Text = number_format($valor_ipi, \"2\", \".\", \"\");\r\n $this->mgt_nota_fiscal_valor_produtos->Text = number_format($valor_total, \"2\", \".\", \"\");\r\n }", "title": "" }, { "docid": "766f9b6541a38005651ecca35775072d", "score": "0.4932662", "text": "public function registrarCompra($usuarioId, $productos, $totales)\n { \n $codigo = uniqid($usuarioId);\n \n $orden = new \\AT\\vocationetBundle\\Entity\\Ordenes();\n $orden->setCodigo($codigo);\n $orden->setFechaHoraCompra(new \\DateTime());\n $orden->setUsuario($usuarioId);\n $orden->setSubtotal($totales['subtotal']);\n $orden->setIva($totales['iva']);\n $orden->setTotal($totales['total']);\n $orden->setEstado(0);\n $orden->setConfirmacion(0);\n \n $this->em->persist($orden);\n \n foreach($productos as $p)\n {\n $ordenProducto = new \\AT\\vocationetBundle\\Entity\\OrdenesProductos();\n $ordenProducto->setProducto($p['id']);\n $ordenProducto->setOrden($orden);\n if(isset($p['mentorId']))\n {\n $ordenProducto->setMentorId($p['mentorId']);\n }\n $ordenProducto->setValor($p['valor']);\n $ordenProducto->setEstado(0);\n \n $this->em->persist($ordenProducto);\n }\n \n $this->em->flush();\n \n return $codigo;\n }", "title": "" }, { "docid": "2334d13558cc2c0052c2098b3f1be591", "score": "0.49295205", "text": "public function addproducto(){\n\t\n\t\t$productCode = trim($_POST['productCode']);\n\t\t$productName = trim($_POST['productName']);\n\t\t$productLine = trim($_POST['productLine']);\n\t\t$productScale = trim($_POST['productScale']);\n\t\t$productVendor = trim($_POST['productVendor']);\n\t\t$productDescription = trim($_POST['productDescription']);\n\t\t$quantityInStock = trim($_POST['quantityInStock']);\n\t\t$buyPrice = trim($_POST['buyPrice']);\n\t\t$MSRP = trim($_POST['MSRP']);\n\t\t\n\t\t$objproducto = $this->loadModel('product');\n\t\t\n\t\t$objproducto->insertProducto($productCode,$productName,$productLine,$productScale,$productVendor,$productDescription,$quantityInStock,$buyPrice,$MSRP);\n\t\t$this->redireccionar('product/index');\n\t\n\t}", "title": "" }, { "docid": "be7236f60b9ee9f49f998efe9e664d79", "score": "0.49292946", "text": "function registra_cargo_prorrateo($acceso,$restante,$fecha1,$id_serv,$cant_serv,$reemplaza_act){\n\t\t$ini_u = $_SESSION[\"ini_u\"]; \n\t\t$monto_posterior=$restante;\n\t\t$generado_por='SISTEMA';\n\t\trequire_once \"notas.php\";\n\t\t$objeto=new notas();\n\t\t\t\n\t\t\t$acceso->objeto->ejecutarSql(\"select idmotivonota from motivonotas; \"); \n\t\t\t\tif($row=row($acceso)){\n\t\t\t\t\t$motivo=trim($row['idmotivonota']);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\n\t\t$comentario='AJUSTE POR PRORRATEO';\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t$acceso->objeto->ejecutarSql(\"select *from vista_contrato_servicio_deuda where id_contrato='$this->id_contrato' and fecha_inst='$fecha1' and id_serv='$id_serv'\"); \n\t\t\t\tif($row=row($acceso)){\n\t\t\t\t\t$id_cont_serv=trim($row['id_cont_serv']);\n\t\t\t\t\t$monto_anterior=trim($row[\"costo_cobro\"]);\n\t\t\t\t\t\n\t\t\t\t\tif($monto_anterior>$monto_posterior){\n\t\t\t\t\t\t$tipo=\"NOTA DE CREDITO\";\n\t\t\t\t\t}\n\t\t\t\t\telse if($monto_anterior<$monto_posterior){\n\t\t\t\t\t\t$tipo=\"NOTA DE DEBITO\";\n\t\t\t\t\t}\n\t\t\t\t\tif($tipo!=\"\"){\n\t\t\t\t\t\t// echo \"CONDICION:$reemplaza_act:\";\n\t\t\t\t\t\tif($reemplaza_act==\"AGREGA\"){\n\t\t\t\t\t\t\t$restante=$restante+$monto_anterior;\n\t\t\t\t\t\t\t// echo \":monto_anterior:$monto_anterior:$monto_anterior:Update contrato_servicio_deuda Set costo_cobro='$restante' Where id_cont_serv='$id_cont_serv' and status_con_ser='DEUDA'\";\n\t\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"Update contrato_servicio_deuda Set costo_cobro='$restante' Where id_cont_serv='$id_cont_serv' and status_con_ser='DEUDA'\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if($reemplaza_act==\"OMITE\"){\n\t\t\t\t\t\t\t$restante=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"Update contrato_servicio_deuda Set costo_cobro='$restante' Where id_cont_serv='$id_cont_serv' and status_con_ser='DEUDA'\");\n\t\t\t\t\t\t}\n\t\t\t\t\t//\t// echo \"Update contrato_servicio_deuda Set costo_cobro='$restante' Where id_cont_serv='$id_cont_serv' and status_con_ser='DEUDA'\";\n\t\t\t\t\t\t$objeto->incluirnotas($acceso,$tipo,$id_cont_serv,$monto_anterior,$monto_posterior,$motivo,$comentario,$generado_por,$this->id_contrato);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\t$tipo=\"NOTA DE DEBITO\";\n\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"select id_cont_serv from contrato_servicio_deuda where (id_cont_serv ILIKE '$ini_u%') ORDER BY id_cont_serv desc LIMIT 1 offset 0 \"); \n\t\t\t\t\t\t$id_cont_serv=verCodLongD($acceso,\"id_cont_serv\",$ini_u);\n\t\t\t\t\t\t$monto_anterior=0;\n\t\t\t\t\t\t// echo \"insert into contrato_servicio_deuda(id_cont_serv,id_serv,id_contrato,fecha_inst,cant_serv,status_con_ser,costo_cobro,descu,modo_des) values ('$id_cont_serv','$id_serv','$this->id_contrato','$fecha1','$cant_serv','DEUDA','$restante','0','AUTOMATICO')\";\n\t\t\t\t\t\t//esta pendiente\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"insert into contrato_servicio_deuda(id_cont_serv,id_serv,id_contrato,fecha_inst,cant_serv,status_con_ser,costo_cobro,descu,modo_des) values ('$id_cont_serv','$id_serv','$this->id_contrato','$fecha1','$cant_serv','DEUDA','$restante','0','AUTOMATICO')\");\n\t\t\t\t\t\t$monto_posterior=$restante;\n\t\t\t\t\t\t$motivo='CC00002';\n\t\t\t\t\t\t$objeto->incluirnotas($acceso,$tipo,$id_cont_serv,$monto_anterior,$monto_posterior,$motivo,$comentario,$generado_por,$this->id_contrato);\n\n\t\t\t\t\t\t*/\n\t\t\t\t}\n\t}", "title": "" }, { "docid": "95cb9e40b1abcb3939ae523cd108d26a", "score": "0.49250752", "text": "public static function nuevoArticulo() {\n\n $cod = $_SESSION['cod'];\n $_SESSION['productos'][$cod] ++;\n// $p = new Producto($_SESSION['cod']);\n//\n// self::agregarProductos($p->getCod(), $p->getPvp());\n }", "title": "" }, { "docid": "89b1209f0ec1704f2e97d59e4aaedeb5", "score": "0.49241793", "text": "public function ctrEditarCierres(){\n\n\t\tif(isset($_POST[\"editarCierre\"]) && isset($_POST[\"idSectorVenta\"]) && isset($_POST[\"listaProductos\"])){\n\n\t\t\t# Formateamos la tabla de Productos y de Clientes\n\t\t\t# Traemos los detalles asociados a la venta a editar\n\t\t\n\t\t\t$detaProductos=ModeloCierres::mdlMostraDetallesCierres(\"cierres_detallejf\",\"codigo\",$_POST[\"editarCierre\"]);\n\t\t\n\t\t\t# Cambiamos los id de la lista por los id de los Productos\n\t\t\tforeach($detaProductos as $key=>$value){\n\n\t\t\t\t$infoPro=controladorArticulos::ctrMostrarArticulos($value[\"articulo\"]);\n\t\t\t\t$detaProductos[$key][\"articulo\"]=$infoPro[\"articulo\"];\n\t\t\t\t\n\t\t\t\n\t\t\t}\t\n\n\t\t\tif($_POST[\"listaProductos\"]==\"\"){\n\n\t\t\t\t$listaProductos=$detaProductos;\n\t\t\t\t$validarCambio=false;\n\n\t\t\t}else{\n\n\t\t\t\t$listaProductos=json_decode($_POST[\"listaProductos\"],true);\n\t\t\t\t$validarCambio=true;\n\n\t\t\t}\n\t\t\t\n\t\t\tif($validarCambio){\n\n\n\t\t\t\tforeach($listaProductos as $key=>$value){\n\t\t\t\t\t# Traemos los productos por ID en cada interacción\n\t\t\t\t\t$valor=$value[\"articulo\"];\n\n\t\t\t\t\t$respuestaProducto=ModeloArticulos::mdlMostrarArticulos($valor);\n\n\n\t\t\t\t\t# Actualizamos las ventas en la tabla productos\n\t\t\t\t\t$item1=\"servicio\";\n\t\t\t\t\t$valor1=$value[\"servicio\"]-$value[\"cantidad\"];\n\n\t\t\t\t\tModeloArticulos::mdlActualizarUnDato(\"articulojf\", $item1, $valor1, $valor);\n\t\t\t\t\t$tabla2=\"servicios_detallejf\";\n\t\t\t\t\t$item2 = \"saldo\";\n\t\t\t\t\t$idServicio=$value[\"codServicio\"];\n\t\t\t\t\t$saldoServicio=ModeloCierres::mdlActualizarUnDato($tabla2, $item2, $valor1, $idServicio);\n\t\t\t\t}\n\n\n\t\t\t\t# Actualizamos ultima_compra en la tabla Clientes\n\t\t\t\tdate_default_timezone_set('America/Lima');\n\t\t\t\t$fecha= new DateTime();\n\n\t\t\t}\n\t\t\t\n\t\t\t/* ==============================================\n\t\t\tEDITAMOS LOS CAMBIOS DE LA VENTA listaMetodoPago\n\t\t\t============================================== */\n\t\t\t$datos=array(\"codigo\"=>$_POST[\"editarCierre\"],\n\t\t\t\t\t\t \"guia\"=>$_POST[\"editarGuia\"],\n\t\t\t\t\t\t \"usuario\"=>$_POST[\"idVendedor\"],\n\t\t\t\t\t\t \"taller\"=>$_POST[\"idSectorVenta\"],\n\t\t\t\t\t\t \"total\"=>$_POST[\"totalVenta\"],\n\t\t\t\t\t\t \"fecha\"=>$fecha->format(\"Y-m-d H:i:s\"));\n\t\t\t\t\t\t \t\t\t\t\t\t\n\n\t\t\t$respuesta=ModeloCierres::mdlEditarCierres(\"cierresjf\",$datos);\n\n\n\t\t\t/* var_dump(\"datos\", $datos); */\n\n\t\t\tif($respuesta==\"ok\"){\n\n\t\t\t\t# Eliminamos los detalles de la venta\n\t\t\t\t$eliminarDeta=ModeloCierres::mdlEliminarDato(\"cierres_detallejf\",\"codigo\",$_POST[\"editarCierre\"]);\n\n\t\t\t\tif($eliminarDeta==\"ok\"){\n\n\t\t\t\t\t# Guardamos los nuevos detalles de la venta\n\t\t\t\t\tforeach($listaProductos as $key=>$value){\n\n\t\t\t\t\t\t$datos=array(\"codigo\"=>$_POST[\"editarCierre\"],\n\t\t\t\t\t\t\t\t\t \"articulo\"=>$value[\"articulo\"],\n\t\t\t\t\t\t\t\t\t \"cantidad\"=>$value[\"cantidad\"],\n\t\t\t\t\t\t\t\t\t \"cod_servicio\"=>$value[\"codServicio\"]);\n\n\t\t\t\t\t\t\t\t\t ModeloCierres::mdlGuardarDetallesCierres(\"cierres_detallejf\",$datos);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t# Mostramos una alerta suave\n\t\t\t\t\techo '<script>\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\t\ttitle: \"Felicitaciones\",\n\t\t\t\t\t\t\t\ttext: \"¡La información fue Actualizada con éxito!\",\n\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\twindow.location=\"cierres\";}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t</script>';\n\t\t\t\t}else{\n\t\t\t\t\t# Mostramos una alerta suave\n\t\t\t\t\techo '<script>\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\t\ttitle: \"Error\",\n\t\t\t\t\t\t\t\ttext: \"¡La información presento problemas al actualizar los Detalles. Por favor, comunicarse con el Administrador de la Base de Datos!\",\n\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\t\twindow.location=\"cierres\";}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t</script>';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t# Mostramos una alerta suave\n\t\t\t\techo '<script>\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\ttitle: \"Error\",\n\t\t\t\t\t\t\ttext: \"¡La información presento problemas y no se actualizó adecuadamente. Por favor, intenteló de nuevo!\",\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\twindow.location=\"cierres\";}\n\t\t\t\t\t\t});\n\t\t\t\t\t</script>';\n\t\t\t\t\n\t\t\t}\t\t\t\n\n\n\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "9763f0d0cf3468321a2cc9d2fb1e9dc1", "score": "0.49219447", "text": "public function preparaantesdeguardaritemcompra($modelodetalle){\n $cadenita=\"\";\n\n if(($modelodetalle->docompra_ocompra->codestado='10') or ($modelodetalle->docompra_ocompra->codestado='20')){\n if($modelodetalle->cambio()) {\n if($this->hubocambiossensibles($modelodetalle,array('codart','punit','cant','estadodetalle'))) {\n if($modelodetalle->cantidadentregada == 0) {\n if(!is_null($modelodetalle->iddesolpe)) { ///NO ES UN ITEM LIBRE\n\n ///vERIFICAR LA CONSIUSTENCIA DEL VALOR DEL PARAMETRO ENTREGADO\n $registrodetallesolpe=Desolpe::model()->findByPk($modelodetalle->iddesolpe);\n if(!is_null($registrodetallesolpe)){\n if($registrodetallesolpe->desolpe_solpe->escompra !='1' or is_null($registrodetallesolpe->idreserva) ){\n ///Actualizar los datos aguas arriba (SOLPES Y RESERVAS)\n\n\n $registrodetallesolpe->SetScenario('cambiaestado');\n $registroreserva=Alreserva::model()->findByPk($registrodetallesolpe->idreserva);\n if( !is_null($registroreserva)) {\n $registroreserva->SetScenario('cambiaestado');\n //Ahora vamos por la solpe que genero la reserva\n $registrodetallesolpeoriginal=Desolpe::model()->findByPk($registroreserva->hidesolpe);\n if( !is_null($registrodetallesolpeoriginal)) {\n\n $registrodetallesolpeoriginal->SetScenario('cambiaestado');\n\n ///Verificando las compras en DESOLPECOMPRA\n $cantidad_comprada=$registrodetallesolpe->cantcompras;\n if($cantidad_comprada > 0) ///SI YA HABIDO ATENCIONES EN LA TABLA DESOLPECOMPRA\n {\n\n $setratadeanulacion=false;\n if(($modelodetalle->oldattributes['estadodetalle'] <> '40') and ($modelodetalle->estadodetalle=='40'))\n { ///Si se trata de una anulacion hay que anular el registro de DESOLPECOMPRA\n $nuevocriterio=New CDbcriteria;\n $nuevocriterio->addCondition(\"iddesolpe=:xiddesolpe AND iddocompra=:xiddocompra \");\n $nuevocriterio->params=array(':xiddesolpe'=>$modelodetalle->iddesolpe,':xiddocompra'=>$modelodetalle->id);\n $modelodesolpecompra=Desolpecompra::model()->find($nuevocriterio);\n $modelodesolpecompra->codestado='30'; //ANULAR ......!!!!\n if(!$modelodesolpecompra->save())\n $cadena.=\" El item \".$modelodetalle->item.\" - \".$modelodetalle->descri.\" : No se pudo anular el registro de Detalles-solicitudes/Detalle-compras <br>\";\n $setratadeanulacion=true;\n }\n\n\n if( $cantidad_comprada +$modelodetalle->cant ==$registrodetallesolpe->cant)\n {\n //Es una atencion unica el caso mas simple, uno a uno\n ///Verificar si se trata de una anulacion\n if($setratadeanulacion)\n {\n ///El proceso retrocede, hayq ue anular tambien el registro de la tab la puente DESOLPECOMPRA\n /// y revertir los estados\n $registrodetallesolpe->est='30'; //APROBADO\n $registroreserva->estadoreserva='20'; //EN PROICESO DE COMPRA X Q LA SOLPE AUN PERMANECE COMO APROBADA\n $registrodetallesolpeoriginal->est='70'; ///EN PROCESO DE COMPRA X Q LA RESERVA Y LA SOLPE AUN ESTAN VIGENTES\n\n\n } else { ///Si no se trata de una anulacion el proceso \"evoluciona\"\n $registrodetallesolpe->est='40'; //ATENDIDO\n $registroreserva->estadoreserva='50'; //COMPRADO TOTALMENTE\n $registrodetallesolpeoriginal->est='90'; ///Comprado totalmente\n }\n\n\n\n\n } else { //Significa que conn esta compra aun falta o se han excedido..veamos\n if( $cantidad_comprada +$modelodetalle->cant < $registrodetallesolpe->cant) {\n // En este caso se esta comprando pero aun falta completar, un abastecimiento parcial\n $registrodetallesolpe->est='70'; //EN COMPRA\n $registroreserva->estadoreserva='60'; //EN COMPRA\n\n } else { ///Error se pasaron de la cantidad solicitada\n ///Error\n $cadena.=\" El item \".$modelodetalle->item.\" - \".$modelodetalle->descri.\" : Se esta comprando : (\".($cantidad_comprada +$modelodetalle->cant).\") mas de lo que se solicito :(\".$registrodetallesolpe->cant.\") en la solicitud \".$registrodetallesolpe->desolpe_solpe->nunero.\"-\".$registrodetallesolpe->item.\" <br>\";\n\n\n }\n\n }\n\n } else { ///qUIER DECIR QUE ES LA PRIMERA VEZ QUE SE ATENDERIA ESTE ITEM\n\n }\n $registrodetallesolpeoriginal->save();\n } else { //Error no se pudo ubicar el detalle de la Solpe Padre\n //eRRROR\n $cadena.=\" El item \".$modelodetalle->item.\" - \".$modelodetalle->descri.\" : No se pudo encontrar la solicitud original (Imputada) asociada (\".$registroreserva->hidesolpe.\") <br>\";\n\n }\n $registroreserva->save();\n } else { //Error no se ecnontro la reserva que genero la solpe de aprovisionamiento\n $cadena.=\" El item \".$modelodetalle->item.\" - \".$modelodetalle->descri.\" : No se pudo encontrar la reserva asociada <br>\";\n\n }\n $registrodetallesolpe->save();\n } else {///Error , La solpe no es de aprovisionamiento o tiene el campo idererva vacio lo qaue quiere decir que no es una solpe de aprovisionamiento\n ///Error\n $cadena.=\" El item \".$modelodetalle->item.\" - \".$modelodetalle->descri.\" : La solicitud asociada \".$registrodetallesolpe->desolpe->solpe->numero.\"-\".$registrodetallesolpe->item.\" no es de àprovisionamiento <br>\";\n\n }\n } else {///Error , este detakke de solped no existe\n $cadena.=\" El item \".$modelodetalle->item.\" - \".$modelodetalle->descri.\" : No se pudo encontrar la solicitud asociada -> (\".$modelodetalle->iddesolpe.\") <br>\";\n\n }\n /*}else{ // ($modelodetalle->cantsolpes) =0 ES LA PRIMERA ATENCION , OSEA NO HAY REGISTROS EN DESOLPECOMPRA\n\n }*/\n\n } else { //ES UN ITEM LIBRE\n\n return $cadena;\n }\n\n\n } else { //HAY enetregas\n $cadena.=\" El item \".$modelodetalle->item.\" - \".$modelodetalle->descri.\" : Ya tiene entregas y no es posible modificar estos datos sensibles <br>\";\n\n\n }\n\n } else { //No ha habido cambios sensibles\n ///Dara fin al procedimiento\n return $cadena;\n }\n\n } else { //Terminar el procediiento\n ///Dara fin al procedimiento\n return $cadena;\n }\n }\n\n }", "title": "" }, { "docid": "07a756d576b055e2b4ac5f1bb6c68900", "score": "0.49209544", "text": "public function actionCreateProducaoMassa()\n\t{\n\t\t// $this->performAjaxValidation($model);\n\t\t\n\t\tif(isset($_POST['ErpnetOrdem']))\n\t\t{\n\t\t\t$sucesso='';\n\t\t\t\n\t\t\tfor ($i=0;$i<count($_POST['ErpnetOrdem']);$i++) \n\t\t\t\tif ( (isset($_POST['ErpnetOrdem'][$i]))&&($_POST['ErpnetOrdem'][$i]['quantidade']>0) ) {\n\t\t\t\t\t$this->model=new ErpnetOrdem;\n\t\t\t\t\t$this->model->setScenario('producaoMassa');\n\t\t\t\t\t$transaction=$this->model->dbConnection->beginTransaction();\n\t\t\t\t\t\n\t\t\t\t\t$this->model->attributes=$_POST['ErpnetOrdem'][$i];\n\t\t\t\t\t$this->model->data_termino=CDateTimeParser::parse($this->model->data_termino, Yii::app()->locale->dateFormat);\n\t\t\t\t\t$this->model->id_produto=$_POST['ErpnetOrdem']['id_produto'];\n\t\t\t\t\t$this->model->turno=$_POST['ErpnetOrdem']['turno'];\n\t\t\t\t\t$desc=explode(':', $_POST['ErpnetOrdem']['id_wbs']);\n\t\t\t\t\t$this->model->id_wbs=ErpnetWbs::model()->findByPk($desc[0])->id;\n\t\t\t\t\n\t\t\t\t\tif ( ($transaction->getActive())&&(!$this->model->save()) ) {\n\t\t\t\t\t\t$transaction->rollback();\n\t\t\t\t\t\tYii::app()->user->setFlash('erro',Helpers::t('erpnetUi', 'model'));\n\t\t\t\t\t\t$this->redirect(array('createProducaoMassa'));\n\t\t\t\t\t}\n\t\t\t\t\t// Cria movimento de estoque\n\t\t\t\t\t//$this->modelOrdemItem=$this->model;\n\t\t\t\t\t$this->model->data_termino=Yii::app()->dateFormatter->formatDateTime($this->model->data_termino,'medium',null);\n\t\t\t\t\tif ( ($transaction->getActive())&&(!$this->cadastraEstoque($this->model,'entrada')) ) {\n\t\t\t\t\t\t$transaction->rollback();\n\t\t\t\t\t\tYii::app()->user->setFlash('erro',Helpers::t('erpnetUi', 'modelEstoque'));\n\t\t\t\t\t\t$this->redirect(array('createProducaoMassa'));\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tif ($transaction->getActive()){\n\t\t\t\t\t\t$sucesso=$sucesso.Yii::app()->dateFormatter->formatDateTime($this->model->data_termino,'medium',null).' - '.$this->model->idWbs->concatened.': '.$this->model->quantidade.'<br>';\n\t\t\t\t\t\t$transaction->commit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\tif ($sucesso!='') Yii::app()->user->setFlash('ordem',$sucesso.' <br> '.Helpers::t('erpnetUi', 'viewCreateFlash'));\n\t\t\t$this->redirect(array('createProducaoMassa'));\n\t\t}\n\t\t\n\t\t\n\t\t$model=new ErpnetOrdem;\n\t\t$model->setScenario('producaoMassa');\n\t\t$modelEstoque=new ErpnetEstoque;\n\t\t\n\t\t$models=array();\n\t\tfor($i = strtotime(\"-1 month\",mktime(null,null,null,date('m'),1,date('Y'))); date ( 'm', $i ) == date ( 'm',strtotime(\"-1 month\") ); $i = strtotime ( \"+1 day\", $i ))\n\t\t\tarray_push ( $models, $model );\n\t\t\n\t\t$tabular=array(\n\t\t\t\t'models'=>$models,\n\t\t\t\t'containerTagName'=>'table',\n\t\t\t\t'headerTagName'=>'thead',\n\t\t\t\t'inputContainerTagName'=>'tbody',\n\t\t\t\t'inputTagName'=>'tr',\n\t\t\t\t//'addTemplate'=>'<tbody><tr><td colspan=\"3\">{link}</td></tr></tbody>',\n\t\t\t\t//'addLabel'=>Yii::t('ui','Adicionar novo item'),\n\t\t\t\t//'addHtmlOptions'=>array('class'=>'blue pill'),\n\t\t\t\t'removeTemplate'=>'',\n\t\t\t\t//'removeTemplate'=>'<td>{link}</td>',\n\t\t\t\t//'removeLabel'=>Yii::t('ui','Retirar'),\n\t\t\t\t'removeLabel'=>'',\n\t\t\t\t'addLabel'=>'',\n\t\t\t\t//'removeHtmlOptions'=>array('class'=>'red pill'),\n\t\t);\n\t\t\n\t\t$tabular['inputView']='extensions/_tabularInputProducaoMassa';\n\t\t$tabular['inputUrl']=$this->createUrl('addTabularInputsProducaoMassa');\n\t\t$tabular['header']='<tr><td>'.\n\t\t\tCHtml::activeLabelEX($model,'data_termino',array('class'=>'input-medium')).'</td><td>'.\n\t\t\t//CHtml::activeLabelEX($model,'id_produto',array('class'=>'input-medium')).'</td><td>'.\n\t\t\t//CHtml::activeLabelEX($model,'id_wbs',array('class'=>'input-large')).'</td><td>'.\n\t\t\t//CHtml::activeLabelEX($model,'turno',array('class'=>'input-small')).'</td><td>'.\n\t\t\tCHtml::activeLabelEX($model,'quantidade',array('class'=>'input-small')).'</td>'.\n\t\t\t'</tr>';\n\t\t\n\t\t\n\t\t$this->render('createOrdemServico',array(\n\t\t\t\t'model'=>$model,\n\t\t\t\t'modelEstoque'=>$modelEstoque,\n\t\t\t\t//'modelFatura'=>$modelFatura,\n\t\t\t\t//'modelPagar'=>$modelPagar,\n\t\t\t\t//'modelOrdemItem'=>$modelOrdemItem,\n\t\t\t\t'tabular'=>$tabular,\n\t\t\t\t'fileForm'=>'_formProducaoMassa',\n\t\t\t\t'fileFormHeader'=>'_formProducaoMassaHeader',\n\t\t));\n\t}", "title": "" }, { "docid": "e0ac0a1f63d52711048ca6006ae81f66", "score": "0.49187022", "text": "public function agregarLineaVenta($cantidad, Producto $producto){\n if(is_int($cantidad)){ //comienza la validacion, pregunta si $cantidad es un entero\n $lineaventa = new LineaVenta($cantidad, $producto); //nuevo objeto de la clase LineaVenta, que se crea con esa cantidad de ese producto, se asigna\n $this->lineasVenta[] = $lineaventa; //se agrega al conjunto de LineasVenta que tiene esta venta\n }\n else {\n echo \"cantidad invalida\";\n }\n}", "title": "" }, { "docid": "282adefbe04c0f38f76892596ccfa694", "score": "0.49164042", "text": "function pedidoGrabarArticuloDePedidoNuevo($iFolioPedido,$iId_articulo,$iCantidad,$vHorarioRenta,$esRenta,$descuento){\n\t\t$arreglo = array(\"success\"=>\"false\",\"data\"=>\"\",\"error\"=>\"No hay registros\");\n\t\t$db = getConexionTda();\n\t\t$sRetorno ='';\n\t\tif ($db->getError() == '') {\n\t\t\t$rs = $db->query(\"select * from fn_articulospedidosrentado_insert($iFolioPedido::BIGINT,$iId_articulo::BIGINT,$iCantidad::INTEGER,'',0::INTEGER,$descuento::NUMERIC) AS retorno;\");\n\t\t\t\n\t\t\tif ($db->getError() != \"\") {\n\t\t\t\t$sRetorno =$db->getError();\n\t\t\t\t$arreglo['success'] = false;\n\t\t\t\t$arreglo['error'] = $sRetorno;\n\t\t\t}else{\n\t\t\t\t$rs_final = objectToArray($rs->fetchAll(PDO::FETCH_OBJ));\n\t\t\t\t$sRetorno =$rs_final[0];\n\t\t\t\tif ($sRetorno['retorno'] >= 1){\n\t\t\t\t\t$arreglo['success'] = true;\n\t\t\t\t\t$arreglo['data'] = $sRetorno;\n\t\t\t\t\t$arreglo['error'] = 'Se registr&oacute exitosamente el sku!.';\n\t\t\t\t}else{\n\t\t\t\t\t$arreglo['success'] = false;\n\t\t\t\t\t$arreglo['data'] = $sRetorno;\n\t\t\t\t\t$arreglo['error'] = \"El sku ya se encontraba registrado!.\";\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$sRetorno =$db->getError();\n\t\t\t$arreglo['success'] = false;\n\t\t\t$arreglo['error'] = $sRetorno;\n\t\t}\n\t\tcloseConexion($db);\n\t\treturn $arreglo;\n\t}", "title": "" }, { "docid": "95c59208081d695d1bc6b652449876e3", "score": "0.49160087", "text": "public function setOrder($tipo, $id, $empresas) {\n $tipoOptions = array('empresa_sector_dos', 'empresa_sector_tres', 'states', 'localidad', 'combinadoProvincia', 'combinadoLocalidad');\n if (!in_array($tipo, $tipoOptions)) {\n throw new sfException(sprintf('El tipo enviado (%s) no es valido', $tipo));\n }\n // 1. borra registros anteriores del orden\n foreach ($empresas as $empresa_id) {\n $q = Doctrine_Query::create()->update('EmpresaDestacada')\n ->set('rank', 0);\n if ($tipo == 'combinadoProvincia') {\n $q->where('combinado = ?', Empresa::COMBINADO_PROVINCIA);\n } elseif ($tipo == 'combinadoLocalidad') {\n $q->where('combinado = ?', Empresa::COMBINADO_LOCALIDAD);\n } else {\n $q->where($tipo . '_id = ?', $id);\n }\n $q->andWhere('empresa_id = ?', $empresa_id);\n $q->execute();\n }\n // 2. setea nuevo orden\n $i = 1;\n foreach ($empresas as $empresa_id) {\n $q = Doctrine_Query::create()->update('EmpresaDestacada')\n ->set('rank', $i);\n if ($tipo == 'combinadoProvincia') {\n $q->where('combinado = ?', Empresa::COMBINADO_PROVINCIA);\n } elseif ($tipo == 'combinadoLocalidad') {\n $q->where('combinado = ?', Empresa::COMBINADO_LOCALIDAD);\n } else {\n $q->where($tipo . '_id = ?', $id);\n }\n $q->andWhere('empresa_id = ?', $empresa_id);\n $q->execute();\n $i++;\n }\n }", "title": "" }, { "docid": "3ff21497d7c5e54c61c136d8b7f3b508", "score": "0.49150577", "text": "public function agregaACarrito($id_user, $id_prod){\n $query1 = \"select id \n from products \n where producto=$id_prod and id not \n in (select id_product from carrito \n where id_user = $id_user) limit 1\";\n\n $prod = $this->query($query1, ASSOC)['id'];\n $query2 = \"insert into carrito(id_product, id_user) \n values ($prod, $id_user)\";\n\n return $this->query($query2, ALL);\n }", "title": "" }, { "docid": "a05a20bb80acc8584d4da28309e9979b", "score": "0.49123636", "text": "function traemeNomencladorConAnexo($vigencia, $codigo, $nro_orden) {\r\n //$nro_orden = intval($cod_a[1]);\r\n //$codigo = $cod_a[0];\r\n if ($vigencia['id'] != 0) {\r\n $modo_facturacion = \"viejo\";\r\n $sql_n = \"SELECT id_nomenclador, precio, categoria \r\n FROM facturacion.nomenclador \r\n WHERE replace(codigo, ' ', '') = replace('$codigo', ' ', '') \r\n AND id_nomenclador_detalle = \" . $vigencia['id'];\r\n\r\n $result_n = sql($sql_n, \"No se encuentra nomenclador con cod: $cod_nom\", 0);\r\n\r\n $datos_nomenclador[0] = $result_n->fields['id_nomenclador'];\r\n $datos_nomenclador[1] = $result_n->fields['precio'];\r\n $datos_nomenclador[2] = $modo_facturacion;\r\n $datos_nomenclador[3] = trim($codigo);\r\n $datos_nomenclador[4] = $result_n->fields['categoria'];\r\n $datos_nomenclador[6] = $vigencia;\r\n\r\n\r\n if ($datos_nomenclador[0]) {\r\n if ($nro_orden > 0) {\r\n $sql_a = \"SELECT id_anexo, precio \r\n FROM facturacion.anexo \r\n WHERE id_anexo = '$nro_orden'\";\r\n $result_a = sql($sql_a, \"\", 0);\r\n if ($result_a->RowCount() > 0) {\r\n $datos_nomenclador[1] = $result_a->fields['precio'];\r\n $datos_nomenclador[5] = $result_a->fields['id_anexo'];\r\n } else {\r\n $datos_nomenclador[5] = -1;\r\n }\r\n } else {\r\n $datos_nomenclador[5] = -1;\r\n }\r\n } else {\r\n $datos_nomenclador[0] = 0;\r\n $datos_nomenclador[1] = 0;\r\n $datos_nomenclador[2] = 0;\r\n $datos_nomenclador[3] = $codigo;\r\n $datos_nomenclador[4] = 0;\r\n $datos_nomenclador[5] = -1;\r\n $datos_nomenclador[6] = $vigencia;\r\n }\r\n } else {\r\n $datos_nomenclador[0] = 0;\r\n $datos_nomenclador[4] = 0;\r\n $datos_nomenclador[5] = 0;\r\n $datos_nomenclador[2] = 0;\r\n $datos_nomenclador[1] = 0;\r\n $datos_nomenclador[3] = $codigo;\r\n $datos_nomenclador[6] = $vigencia;\r\n }\r\n return $datos_nomenclador;\r\n}", "title": "" }, { "docid": "6991ae4ee8075a5933b94aac60070045", "score": "0.4906193", "text": "static public function mdlEditarMateriaPrima($datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE producto SET CodAlt=UPPER(:CodAlt),DesPro=UPPER(:DesPro),UndPro=UPPER(:UndPro),Por_AdVal=:Por_AdVal,Por_Seg=:Por_Seg,PesPro=:PesPro,Stk_Min=:Stk_Min,Stk_Max=:Stk_Max,UsuMod=UPPER(:UsuMod),FecMod=:FecMod,PcMod=UPPER(:PcMod) WHERE CodPro = :CodPro\");\n\n\t\t$stmt->bindParam(\":CodAlt\", $datos[\"CodAlt\"], PDO::PARAM_STR);\n $stmt->bindParam(\":CodPro\", $datos[\"CodPro\"], PDO::PARAM_STR);\n $stmt->bindParam(\":DesPro\", $datos[\"DesPro\"], PDO::PARAM_STR);\n $stmt->bindParam(\":UndPro\", $datos[\"UndPro\"], PDO::PARAM_STR);\n $stmt->bindParam(\":Por_AdVal\", $datos[\"Por_AdVal\"], PDO::PARAM_STR);\n $stmt->bindParam(\":Por_Seg\", $datos[\"Por_Seg\"], PDO::PARAM_STR);\n $stmt->bindParam(\":PesPro\", $datos[\"PesPro\"], PDO::PARAM_STR);\n $stmt->bindParam(\":Stk_Min\", $datos[\"Stk_Min\"], PDO::PARAM_STR);\n $stmt->bindParam(\":Stk_Max\", $datos[\"Stk_Max\"], PDO::PARAM_STR);\n $stmt->bindParam(\":FecMod\", $datos[\"FecMod\"], PDO::PARAM_STR);\n $stmt->bindParam(\":PcMod\", $datos[\"PcMod\"], PDO::PARAM_STR);\n $stmt->bindParam(\":UsuMod\", $datos[\"UsuMod\"], PDO::PARAM_STR);\n\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\t\t\n\t\t}\n\n\t\t$stmt -> close();\n\t\t$stmt = null;\n\n\t}", "title": "" }, { "docid": "4994b42e524d11395e823b6bf707868f", "score": "0.48976576", "text": "public function obtenDatos($id_pro){\n\t\t\t$obj= new conectar();\n\t\t\t$conexion=$obj->conexion(); # conexion\n\n\t\t\t$sql=\"SELECT id_pro,\n\t\t\t\t\t\t\tproducto,\n\t\t\t\t\t\t\tmarca,\n\t\t\t\t\t\t\tcantidad\n\t\t\t\t\tfrom _requisicion_tmp \n\t\t\t\t\twhere id_pro='$id_pro'\";\n\t\t\t$result=mysqli_query($conexion,$sql);\n\t\t\t$ver=mysqli_fetch_row($result);\n\n\t\t\t$datos=array( #arrelgo asociativo para guardar datos\n\t\t\t\t'id_pro' => $ver[0],\n\t\t\t\t'producto' => $ver[1],\n\t\t\t\t'marca' => $ver[2],\n\t\t\t\t'cantidad' => $ver[3]\n\t\t\t\t);\n\t\t\treturn $datos;\n\t\t}", "title": "" }, { "docid": "5ae88cac0ed560b58b8065dd47d34287", "score": "0.48961842", "text": "static function restaStock($id_producto, $unidades){\n\t\t$connection = Database::getConnection();\n\t\t$query = \"SELECT * FROM productos WHERE productos.id_producto = $id_producto\";\n\t\t//echo $query . '<br />';\n\t\t$result_obj = $connection->query($query);\n\t\t$result = $result_obj->fetch_array(MYSQLI_ASSOC);\n\t\t$stockProducto = $result['stock'];\n\t\t\n\t\t$query = \"UPDATE productos SET productos.stock = $stockProducto - $unidades WHERE productos.id_producto = $id_producto\";\n\t\t//echo $query . '<br />';\n\t\tif ($connection->query($query)){\n\t\t\t//echo 'modificado el stock';\n\t\t}else{\n\t\t\t//echo ' no se ha modificado el stock';\n\t\t}\n\t\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "64cce2e706353b2fb6dad28132e67b95", "score": "0.4894407", "text": "public function ponerId_pe_producto($ultimoIDAnterior, $ultimoIDActual)\n {\n // set_time_limit(0);\n $sql = \"SELECT id,SNR1,GEW1 FROM pe_boka WHERE STYP=2 AND id>$ultimoIDAnterior AND id<=$ultimoIDActual\";\n $result = $this->db->query($sql)->result();\n foreach ($result as $k => $v) {\n $SNR1 = $v->SNR1;\n // echo $SNR1.' ';\n $id = $v->id;\n $GEW1 = $v->GEW1;\n $sql = \"SELECT * FROM pe_productos WHERE id_producto='$SNR1' ORDER BY peso_real \";\n if ($this->db->query($sql)->num_rows() === 1) {\n $id_pe_producto = $this->db->query($sql)->row()->id;\n } else {\n $result2 = $this->db->query($sql)->result();\n $id_pe_producto = 0;\n foreach ($result2 as $k2 => $v2) {\n if ($id_pe_producto == 0) $id_pe_producto = $v2->id;\n if ($v2->peso_real < $GEW1) $id_pe_producto = $v2->id;\n }\n }\n $sql = \"UPDATE pe_boka SET id_pe_producto='$id_pe_producto' WHERE id='$id'\";\n $this->db->query($sql);\n }\n }", "title": "" } ]
d17d94560c403eceecfdce7b9ba96ad2
Replace the given value in the given string.
[ { "docid": "dbb663f5ed0126dee577d767f7d92cce", "score": "0.52229875", "text": "public static function replace($search, $replace, $subject)\n {\n return str_replace($search, $replace, $subject);\n }", "title": "" } ]
[ { "docid": "001dd6b4ea0ff2ccae14fab983fdbdf1", "score": "0.67943054", "text": "public function replace($key, $value);", "title": "" }, { "docid": "d6f3497d9015ea8681e18750e124dcff", "score": "0.66981685", "text": "public function replace($string, $find, $replace);", "title": "" }, { "docid": "2c107fc9aa035fc2ba60f6a4cfe86251", "score": "0.6572197", "text": "public function ruleReplace($value, $search, $replace)\n {\n return str_replace($search, $replace, $value);\n }", "title": "" }, { "docid": "e3b4bd6893cc8f15200e26b475aaacab", "score": "0.63428885", "text": "function betti_str_replace($text, $neeedle, $replace) // podmien string na string w stringu\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "229d029a5bf8af8a8e6bcb36c69d604e", "score": "0.63232255", "text": "public function replaceString($line, $oldToken, $newToken);", "title": "" }, { "docid": "e9140d7732114b1593d5bc275275fb9a", "score": "0.6155631", "text": "public function replace();", "title": "" }, { "docid": "f8f0f0ca5a23c238bc5ac9fecd02a1a8", "score": "0.614705", "text": "public function replace(string $string, string $search, string $replace): string\n {\n return str_replace($search, $replace, $string);\n }", "title": "" }, { "docid": "6904ede6ab5cb64dc0a68bc5e89e06fa", "score": "0.61024475", "text": "abstract function replace();", "title": "" }, { "docid": "16b8ba9bfd72e0bf0ffeef4cf3c7c1e4", "score": "0.60857415", "text": "function b_str_replace($text, $needle, $replace)\n\t{\n\t\t$pos = strpos($text, $needle);\n\t\t$length = strlen($needle);\n\t\t\n\t\treturn substr($text, 0, $pos) . $replace . substr($text, $pos + $length);\n\t}", "title": "" }, { "docid": "29244e161e32f6eec7ccc94050f3a294", "score": "0.60529697", "text": "public static function replace(string $subject, string $replace, string $replacement): string\n {\n return str_replace($replace, $replacement, $subject);\n }", "title": "" }, { "docid": "d80e1d9a76101bd161024955091f88f4", "score": "0.6039216", "text": "public function replaceString(string $searchTerm, string $replaceTerm): void\n {\n }", "title": "" }, { "docid": "ca03fba1a120f1377ff78aabefb8a7f7", "score": "0.6028315", "text": "function kReplace($string)\r\n\t{\r\n\t\treturn str_replace(',','.', $string);\r\n\t}", "title": "" }, { "docid": "d256bb8fc2459d5eed6368f1b9bd5673", "score": "0.6004389", "text": "public function replace($string, $search, $replace) {\n\t\treturn str_replace($search, $replace, $string);\n\t}", "title": "" }, { "docid": "09d54782a6bbd8a043e6006a0ed231d3", "score": "0.59552914", "text": "abstract public function replace($in): void;", "title": "" }, { "docid": "7f58d4f253f00d6954556645946c9171", "score": "0.59331065", "text": "public function replaceInQueryString($parameter, $value, $uri = null);", "title": "" }, { "docid": "6f11ebf263640c9d552d4f93cbc8147f", "score": "0.59052587", "text": "function replace_string($string) {\n $ret = str_replace(\"&\", \"&amp;\", $string);\n $ret = str_replace(\"'\", \"&apos;\", $ret);\n $ret = str_replace(\"<\", \"&lt;\" , $ret);\n $ret = str_replace(\">\", \"&gt;\", $ret);\n $ret = str_replace(\"\\\"\", \"&quot;\", $ret);\n return $ret;\n }", "title": "" }, { "docid": "37f165ab94eae1106dfd2f895e4aec58", "score": "0.58995354", "text": "public function replace($key, $value)\n {\n \treturn $this->values[$key] = $value;\n }", "title": "" }, { "docid": "c61c1d78f24e2894a0f29bc627674b2b", "score": "0.58838904", "text": "public static function replace(string $string, string $search, string $replacement) : string\n {\n if (static::isRegex($search)) {\n return static::regexReplace($string, $search, $replacement);\n } else {\n return static::stringReplace($string, $search, $replacement);\n }\n }", "title": "" }, { "docid": "15da4de2ffe177c44485cd835b346338", "score": "0.5874626", "text": "protected function preprocess_replace_value($value) {\r\n\t\treturn Url::encode_path(rawurlencode(Cast::string($value)));\r\n\t}", "title": "" }, { "docid": "621e18e8dec0968d52cb58e4975b6ad7", "score": "0.5866993", "text": "function mzz_str_replace($search, $repl, $str)\n{\n return $GLOBALS['charsetDriver']->str_replace($search, $repl, $str);\n}", "title": "" }, { "docid": "db2d3cd9f9cc2b0723d4ad433c79b85a", "score": "0.58666015", "text": "public function assign($var,$val){\n $this->content = str_replace('{'.$var.'}', $val, $this->content);\n }", "title": "" }, { "docid": "b90b76a1ad564c97768fe84b75ce6000", "score": "0.58377147", "text": "public static function replace($a, $b, $c) {\n return str_replace($a, $b, $c);\n }", "title": "" }, { "docid": "4f352ee24c2aa651fb74e98df8fa4b10", "score": "0.58247846", "text": "function ffxiv_replace_string($searchstr, $replacestr, $haystack) {\n\tif (function_exists(\"str_ireplace\")) {\n\t\treturn str_ireplace($searchstr, $replacestr, $haystack);\n\t}\n\t// Slower but handles PHP4\n\telse { \n\t\treturn preg_replace(\"/$searchstr/i\", $replacestr, $haystack);\n\t}\n}", "title": "" }, { "docid": "2427589317d24bfb830a36778fa3a6f2", "score": "0.58216774", "text": "public static function replace(string $str, string $search, string $replacement): string\n {\n return (string)BaseStringy::create($str)->replace($search, $replacement);\n }", "title": "" }, { "docid": "a470c19de8798600fd08f15f1c330f86", "score": "0.58007467", "text": "private function replace($value,$restore = false) {\r\n\t\t$injection = array(\"select\",\"insert\",\"delete\",\"table\",\"update\",\"trucate\",\"drop\",\"applet\",\"object\",\"--\");\r\n\t\tif($restore == false)\r\n\t\t\tforeach((array)$injection as $find)\r\n\t\t\t\t$value = str_ireplace($find.\" \",\"{{\".$find.\"}}\",$value);\r\n\t\telse\r\n\t\t\tforeach((array)$injection as $find)\r\n\t\t\t\t$value = str_ireplace(\"{{\".$find.\"}}\",$find.\" \",$value);\r\n\t\t$value = $this->line_break($value);\r\n\t\treturn $value;\r\n\t}", "title": "" }, { "docid": "ea495ba784d44f011bab71f2643ee2f7", "score": "0.58005095", "text": "public static function stringReplace(string $string, string $search, string $replacement) : string\n {\n return str_replace($search, $replacement, $string);\n }", "title": "" }, { "docid": "bde2f91099b27ec353b9130e65154953", "score": "0.57888263", "text": "private function protectString($value)\n {\n return str_replace(\"'\", \"\\\\'\", $value);\n }", "title": "" }, { "docid": "c1248861fb8bc03978c867dd31f7a0f0", "score": "0.5783164", "text": "function replace(string $haystack, string $needle, string $replacement, ?string $encoding = null): string\n{\n if ('' === $needle || null === search($haystack, $needle, 0, $encoding)) {\n return $haystack;\n }\n\n return str_replace($needle, $replacement, $haystack);\n}", "title": "" }, { "docid": "c0346c238ce7ff5fa0e2dca57a0ec69e", "score": "0.57679844", "text": "public static function replace($needle, $replace, $text):string\n {\n return str_replace($needle, $replace, $text);\n }", "title": "" }, { "docid": "ed28d85f0ca9e21ab8bc155e6b3b0a4b", "score": "0.5766356", "text": "function stringreplace ($str) {\n\t\t\t$words = array(\n\t\t\t\t'notgood' => '<p>Awesome article</p>', \n\t\t\t\t'script' => '<p>No spamming please</p>', \n\t\t\t\t'hi' => '<p> How are you? </p>'\n\t\t\t);\n\n $str = str_replace(array_keys($words), $words, $str); \n \n\t\t\treturn $str; // returns the value\n\t\t}", "title": "" }, { "docid": "1aa2a33e95c48a345e45916e51d22899", "score": "0.5715535", "text": "function str_replace ($search, $replace, $subject, &$count = null) {}", "title": "" }, { "docid": "097cbbf52ba0db2771f32a8f470bf872", "score": "0.57147306", "text": "function token_replace( $key, $value, $string ) {\n\n $string = str_replace( '[[' . $key . ']]', $value, $string );\n $string = str_replace( '[[' . $key . '|urlencode]]', urlencode( $value ), $string );\n\n if ( function_exists( 'filter_var' ) ) {\n $string = str_replace( '[[' . $key . '|html]]', filter_var( $value, FILTER_SANITIZE_FULL_SPECIAL_CHARS ), $string );\n } else {\n $string = str_replace( '[[' . $key . '|html]]', htmlentities( $value, ENT_QUOTES ), $string );\n }\n\n return $string;\n}", "title": "" }, { "docid": "974e4716a3a9cef5369e086d01c9fadc", "score": "0.5703606", "text": "function replace($search, $replace, &$count = NULL) {\n return str_replace($search, $replace, $this->s, $count);\n }", "title": "" }, { "docid": "2a6188f87dbe74cc6a082a13f224c002", "score": "0.56892425", "text": "private function replaceString(string $targetStr, int $position, string $newString): string\r\n\t{\r\n\t\t$rtnString = \\substr($targetStr, 0, $position);\r\n\t\t$rtnString .= $newString;\r\n\t\t$rtnString .= \\substr($targetStr, $position + 1, \\strlen($targetStr) - $position);\r\n\t\treturn $rtnString;\r\n\t}", "title": "" }, { "docid": "f27abaeb5bd56d143a8a9a61a303fd52", "score": "0.5685832", "text": "private function replaceValue(&$argument)\n {\n // Check if it's a constant\n if (0 === strpos($argument, 'const@')) {\n $argument = new Constant(substr($argument, 6));\n }\n }", "title": "" }, { "docid": "093d4730f8e6f22fce556c9c765a654c", "score": "0.56815755", "text": "public function replace($input, $search, $replace)\n {\n return is_string($input) ? str_replace($search, $replace, $input) : $input;\n }", "title": "" }, { "docid": "44beb4775bf80ff72c6a813650f4fb46", "score": "0.5667358", "text": "public function replace ( string $name, $value ) : self\n { \n $this->getOrFail($name);\n $this->params[$name] = $value; \n return $this;\n }", "title": "" }, { "docid": "05f253126b6c5ff7d795a649471094d8", "score": "0.5651292", "text": "private static function changeTokenToValue($token, $replace, $value, $mode = false)\n\t{\n\t\tif($mode) {\n\t\t\t$replace = \"'$replace'\";\n\t\t}\n\n\t\treturn preg_replace('/(\\@'.$token.')/', $replace, $value);\n\t}", "title": "" }, { "docid": "a3c4c494eb6c0a16ae2ec392435be7b5", "score": "0.5613099", "text": "function smarty_mod_replace($string, $search, $replace)\r\n{\r\n return str_replace($search, $replace, $string);\r\n}", "title": "" }, { "docid": "f7b43347a760d4deadabd9535dceed2f", "score": "0.5590497", "text": "public function str_replace($s, $r, $str)\n {\n if (!is_array($s)) {\n $s = '!' . preg_quote($s, '!') . '!u';\n } else {\n foreach ($s as $k => $v) {\n $s[$k] = '!' . preg_quote($v) . '!u';\n }\n }\n return preg_replace($s, $r, $str);\n }", "title": "" }, { "docid": "b6884b1cff748f7342d30f15b437b544", "score": "0.55666155", "text": "function ireplace($search, $replace, &$count = NULL) {\n return str_ireplace($search, $replace, $this->s, $count);\n }", "title": "" }, { "docid": "1cfdefc60713656964bafcba5259b25d", "score": "0.556378", "text": "function substr_replace ($string, $replacement, $start, $length = null) {}", "title": "" }, { "docid": "d85f45c635fcceeeaaf124fb2533a577", "score": "0.5554852", "text": "function pb_replace_with($target, $with)\n{\n global $pb_string;\n global $pb_error;\n\n // %% signifies special strings\n $target = \"%%\" . $target . \"%%\";\n \n // There's no simple function to replace the first occurence of a substring\n $pos = strpos($pb_string,$target);\n if ($pos !== false) {\n $pb_string = substr_replace($pb_string,$with,$pos,strlen($target));\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "eb98158099c505a90aa2d56b0576b64a", "score": "0.5552952", "text": "public function caseInsensitiveReplace($string, $find, $replace);", "title": "" }, { "docid": "b93c40a9344f0cabbd765e525d294265", "score": "0.55525553", "text": "public static function str_ilreplace($search, $replace, $string) {\n\t\t$pos = strrpos(strtolower($string), strtolower($search));\n\t\tif($pos !== false) {\n\t\t\t$search_length = strlen($search);\n\t\t\t$string = substr_replace($string, $replace, $pos, $search_length);\n\t\t}\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "42aadf82205e075613fe3b999d0c4646", "score": "0.5550829", "text": "function replace($haystack, $needle, $replace, $regex = false)\n{\n\tif($regex)\n\t{\n\t\tif (is_callable($replace))\n\t\t{\n\t\t\t$result = preg_replace_callback($needle, $replace, $haystack);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result = preg_replace($needle, $replace, $haystack);\n\t\t}\n\t}\n\telse\n\t{\n\t\t$result = str_replace($needle, $replace, $haystack);\n\t}\n\t\n\treturn $result;\n}", "title": "" }, { "docid": "22722940c900d5d629fded6c76b2a481", "score": "0.5537304", "text": "public function set_string( $string )\n\t{\n\t\t$this->value = $string;\n\t}", "title": "" }, { "docid": "5ef5e7967026e9e7f977caf47ae65a94", "score": "0.553729", "text": "public function replaceSegment($offset, $value);", "title": "" }, { "docid": "313a2405d348d4ce3034027d8d0fcf98", "score": "0.5534727", "text": "function replace($old, $new, $template) {\r\n\t$template = str_replace($old, $new, $template);\r\n\treturn $template;\r\n}", "title": "" }, { "docid": "58af0a6691f419946663c697fa1cd169", "score": "0.5530724", "text": "function ustr_replace($search, $replace, $subject, $cur = 0)\n{\n $pos = strpos($subject, $search, $cur);\n if ($pos !== false) {\n $subject = substr_replace($subject, $replace, (int)strpos($subject, $search, $cur), strlen($search));\n }\n return $subject;\n}", "title": "" }, { "docid": "ee17c6489b93ab98f506bbc745fa3863", "score": "0.55283386", "text": "public function quoteString(string $value): string\n {\n return\n static::QUOTE_STRING .\n str_replace(static::QUOTE_STRING, static::QUOTE_STRING . static::QUOTE_STRING, $value) .\n static::QUOTE_STRING;\n }", "title": "" }, { "docid": "cf4f3b3b0b3b54c23e00350d19818479", "score": "0.5526988", "text": "public function replace($name, $value = null){\n if($this->view) {\n $this->view->replace($name, $value);\n }\n }", "title": "" }, { "docid": "142d3701e42b380841942487a3f60908", "score": "0.5516897", "text": "public function setVString($value)\n {\n return $this->set(self::V_STRING, $value);\n }", "title": "" }, { "docid": "756cf05795bf771ff6f1ab965ef03ba8", "score": "0.5505412", "text": "protected function _setValue($value)\n {\n $this->value = \\Core\\View::escape($value);\n }", "title": "" }, { "docid": "6eb7e1206f764aeb06455fd80d449218", "score": "0.55019945", "text": "public function setname($value) {\n $this->html = str_replace('setname()',$value,$this->html);\n }", "title": "" }, { "docid": "ccf230a4f6c5651238179863ed2eb7ea", "score": "0.5501537", "text": "public function set($which = 's', $needle, $replacement);", "title": "" }, { "docid": "3f92b9d674cbf36ff82cb4c8d4538fcd", "score": "0.54675883", "text": "function replace($word){\n\t\tinclude 'config.php';\n\t\tinclude 'open_db.php';\n\t\t\n\t\t$STH = $conn->prepare(\"SELECT * FROM flag\");\n\t\t$STH->execute();\n\t\t\n\t\t//HTML Sanitization\n\t\t$word = strip_tags($word);\n\t\t\n\t\twhile($row = $STH->fetch()){\n\t\t\t$insult = $row['word'];\n\t\t\t$len = strlen($insult);\n\t\t\t$replacement = $row['replacement'];\n\t\t\t$flag = strpos($word, $insult);\n\n\t\t\tif($flag != FALSE){\n\t\t\t\t$word = substr_replace($word, $replacement, $flag, $len);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $word;\n\t}", "title": "" }, { "docid": "ab738dbb97297ff0810ec374f1d0dece", "score": "0.5464829", "text": "public function setValue($value)\n {\n $this->out = sprintf($this->format, $value['s'], $value['r'], $value['i']);\n }", "title": "" }, { "docid": "5654de557e1bd8393b095b71b1878407", "score": "0.54550534", "text": "private function replace_tags($var,$value,$tag='%') {\r\n\t\tif (empty($var)) return false;\r\n\t\t$pbuffer=$this->page_buffer;\r\n\t\t$this->page_buffer=str_replace($tag.$var.$tag,$value,$pbuffer);\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "d9d20aee8cbdb1cb671fb2508a4cfcef", "score": "0.54473114", "text": "function redact(string $input, string $replace = DEFAULT_REPLACE) : string\n {\n return str_repeat($replace, strlen($input));\n }", "title": "" }, { "docid": "f7cc35bdda7da1b9176a4660c802d9e9", "score": "0.5440867", "text": "public static function string_replace(StringValue $self, Value $search, StringValue $replace = \\null): StringValue {\n\t\tif ($search instanceof ArrayValue) {\n\n\t\t\t$from = \\array_keys($search->value);\n\n\t\t\t// Values in ArrayValues are stored as Value objects,\n\t\t\t// so we need to extract the real PHP values from it.\n\t\t\t$to = \\array_values(\\array_map(function($item) {\n\t\t\t\treturn $item->value;\n\t\t\t}, $search->value));\n\n\t\t\treturn new StringValue(\\str_replace($from, $to, $self->value));\n\n\t\t}\n\n\t\tif ($replace === \\null) {\n\t\t\tthrow new \\ArgumentCountError;\n\t\t}\n\n\t\tif ($search instanceof StringValue || $search instanceof NumberValue) {\n\n\t\t\t// Handle both string/number values the same way.\n\t\t\treturn new StringValue(\\str_replace((string) $search->value, $replace->value, $self->value));\n\n\t\t} elseif ($search instanceof RegexValue) {\n\t\t\treturn new StringValue(\\preg_replace($search->value, $replace->value, $self->value));\n\t\t} else {\n\t\t\tthrow new \\TypeError;\n\t\t}\n\n\t}", "title": "" }, { "docid": "aca74d89191506fc8ae3744fb5ee29ad", "score": "0.5434865", "text": "public function setValue(string $value): void\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "aca74d89191506fc8ae3744fb5ee29ad", "score": "0.5434865", "text": "public function setValue(string $value): void\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "aca74d89191506fc8ae3744fb5ee29ad", "score": "0.5434865", "text": "public function setValue(string $value): void\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "e911bde9758997cdc34054deb9767c64", "score": "0.5432148", "text": "function callback($buffer){\r\r\n\treturn (str_replace(\"apples\", \"oranges\", $buffer));\r\r\n}", "title": "" }, { "docid": "6c6af96207418ad5745e52ca00840db6", "score": "0.5403379", "text": "public function setValue($search, $replace) {\r\n if(substr($search, 0, 2) !== '${' && substr($search, -1) !== '}') {\r\n $search = '${'.$search.'}';\r\n }\r\n\r\n if(mb_detect_encoding($replace, mb_detect_order(), true) !== 'UTF-8') {\r\n $replace = utf8_encode($replace);\r\n }\r\n\r\n $this->_documentXML = str_replace($search, $replace, $this->_documentXML);\r\n }", "title": "" }, { "docid": "3a9012196edd010c27cae9c97d49faf5", "score": "0.53946596", "text": "public function stringReplace($text, $arr = '') {\n if (is_array($arr)) {\n foreach ($arr as $var) {\n $text = preg_replace('/%s/', $var, $text, 1);\n }\n }\n else {\n $text = str_replace('%s', $arr, $text);\n }\n return $text;\n }", "title": "" }, { "docid": "7897e9695b9598e6cf4bc6bcf7607e47", "score": "0.5385304", "text": "private static function replaceUploadString($str, $needle, $replace)\n {\n $pos = strpos($str, $needle);\n\n if ($pos !== false) {\n return $replace . substr($str, $pos + strlen($needle));\n }\n\n return $str;\n }", "title": "" }, { "docid": "28ad2b6243a7d79898cd0cbc5070448b", "score": "0.5379259", "text": "public function replaceZone($tag, $value){\n\t\tself::$aReplaceZones[$tag] = $value;\n\t}", "title": "" }, { "docid": "4ce991444cd5862f5f9b8635cb8322fc", "score": "0.53770906", "text": "function str_ireplace ($search, $replace, $subject, &$count = null) {}", "title": "" }, { "docid": "b1facde08dcbbae54bac8408275fbf7b", "score": "0.5364452", "text": "public function setValue($value)\n {\n $this->value = (string) $value;\n }", "title": "" }, { "docid": "b1facde08dcbbae54bac8408275fbf7b", "score": "0.5364452", "text": "public function setValue($value)\n {\n $this->value = (string) $value;\n }", "title": "" }, { "docid": "9682b77151c169a7428425ed30e10bff", "score": "0.53641886", "text": "public function setValue(string $value)\n {\n if ($this->stringValid($value)) {\n $this->value = $value;\n return $this;\n }\n }", "title": "" }, { "docid": "4fae6a0c9502e7ea42005668754a45e6", "score": "0.5358948", "text": "function escapeSolrValue($string)\n {\n $match = array('\\\\', '+', '-', '&', '|', '!', '(', ')', '{', '}', '[', ']', '^', '~', '*', '?', ':', '\"', ';', ' ');\n $replace = array('\\\\\\\\', '\\\\+', '\\\\-', '\\\\&', '\\\\|', '\\\\!', '\\\\(', '\\\\)', '\\\\{', '\\\\}', '\\\\[', '\\\\]', '\\\\^', '\\\\~', '\\\\*', '\\\\?', '\\\\:', '\\\\\"', '\\\\;', '\\\\ ');\n $string = str_replace($match, $replace, $string);\n \n return $string;\n }", "title": "" }, { "docid": "653b1b3beedec3eb98a77dda3c0bd2fd", "score": "0.5357716", "text": "public static function msgReplace($string, $args = null)\n {\n return _(sprintf($string, $args));\n }", "title": "" }, { "docid": "6f313121c1e5844e262ba81456b98529", "score": "0.53483766", "text": "public function value(string $value) {\n $this->value = $value;\n }", "title": "" }, { "docid": "24d5c8b6f86dcba2efe447c9958941c8", "score": "0.5339521", "text": "public function setName($value) {\n $this->html = str_replace('setName()',$value,$this->html);\n }", "title": "" }, { "docid": "24d5c8b6f86dcba2efe447c9958941c8", "score": "0.5339521", "text": "public function setName($value) {\n $this->html = str_replace('setName()',$value,$this->html);\n }", "title": "" }, { "docid": "b8d2b0acba6016193b3ea4e6ee292d01", "score": "0.53326243", "text": "function susy_file_str_replace($file_path, $find, $replace) {\n $file_contents = file_get_contents($file_path);\n $file_contents = str_replace($find, $replace, $file_contents);\n file_put_contents($file_path, $file_contents);\n}", "title": "" }, { "docid": "170fec5224a07f7cfe8e66c4b12e3110", "score": "0.53305453", "text": "public function testReplaceFirstCorrectCase()\n {\n $str = new Str($this->testString);\n $str2 = $str->replaceLast('the', 'a');\n $this->assertTrue($str2->value === 'The quick brown fox jumps over a lazy dog, Snowball');\n }", "title": "" }, { "docid": "ba3637380047f7ee2e7100cb8c370045", "score": "0.5319528", "text": "public function replace_string($string, $startTag, $endTag, $replacement) {\n\n $pos = strpos($string, $startTag);\n $start = $pos === false ? 0 : $pos; // + strlen($startTag);\n $pos = strpos($string, $endTag, $start);\n $end = $start === false ? strlen($string) : $pos + strlen($endTag);\n return substr_replace($string, $replacement, $start, $end - $start);\n }", "title": "" }, { "docid": "4ab43c6aa101115f686fd2ad26d6c8ff", "score": "0.5309573", "text": "public function replace($content)\n {\n foreach ($this->replaces as $search => $replace) {\n $content = str_replace($search, $replace, $content);\n }\n\n return $content;\n }", "title": "" }, { "docid": "f8d3d32b358622ab16aa77d41f17096f", "score": "0.53092575", "text": "protected function replaceMarkers($value) {\n $matches = array();\n preg_match_all('|###[^#]+###|', $value, $matches);\n $markersWithoutValues = array_diff($matches[0], array_keys($this->markersValues));\n foreach($markersWithoutValues as $marker) {\n $this->markersValues[$marker] = $this->getMarkerValue($marker);\n }\n $value = str_replace(array_keys($this->markersValues), array_values($this->markersValues), $value);\n return $value;\n }", "title": "" }, { "docid": "a48fe242804b179db5c064a2e7a48136", "score": "0.53040034", "text": "function r($a,$b,$char){return s(str_replace($a,$b,$char));}", "title": "" }, { "docid": "303d052c32f56943f506eb611b692bc4", "score": "0.5298227", "text": "function setReplace($replace){\n $this->replace = $replace;\n }", "title": "" }, { "docid": "ed7cf7d124bc22ec580aefa2ce1ddf1c", "score": "0.5296889", "text": "public function replaceLabel($offset, $value);", "title": "" }, { "docid": "6f13c18863c6a0e70df0d1bb91cdabad", "score": "0.52914995", "text": "public function setStringValue($var) {}", "title": "" }, { "docid": "6f13c18863c6a0e70df0d1bb91cdabad", "score": "0.52914995", "text": "public function setStringValue($var) {}", "title": "" }, { "docid": "d038a7fa0bd083f21fda78bda35ef577", "score": "0.5255486", "text": "public function setMessage($value) {\n $this->html = str_replace('setMessage()',$value,$this->html);\n }", "title": "" }, { "docid": "d4efea6f95fc909e40e1ef14196c534b", "score": "0.5251169", "text": "public function filter($value)\n {\n $replacementValue = $this->getReplacementValue();\n\n return $replacementValue;\n }", "title": "" }, { "docid": "c2536631c865b9f02fd783fa0150ea0c", "score": "0.5248959", "text": "public function replace($needle, $replacement)\n\t{\n\t\ttry { $search = $this->getFromArgument($needle); }\n\t\tcatch(Exception $e) { $e->printError(); }\n\t\ttry { $replace = $this->getFromArgument($replacement); }\n\t\tcatch(Exception $e) { $e->printError(); }\n\n\t\t$this->string = Str::replace($search->get(), $replace->get(), $this->string);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "3bf4425e98e2128a0527dcea1eb3cc58", "score": "0.52479553", "text": "public static function my_real_escape_string($value)\n {\n $search = array(\"\\x00\", \"\\n\", \"\\r\", \"\\\\\", \"'\", \"\\\"\", \"\\x1a\");\n $replace = array(\"\\\\x00\", \"\\\\n\", \"\\\\r\", \"\\\\\\\\\" ,\"\\'\", \"\\\\\\\"\", \"\\\\\\x1a\");\n\n return str_replace($search, $replace, $value);\n }", "title": "" }, { "docid": "d36538c1e541bf92eeaa136f8164bd37", "score": "0.52442765", "text": "protected function quote_string($value) {\n\t\treturn $this->quote($value);\n\t}", "title": "" }, { "docid": "1b10f19d969e5c875ce1c18d33dbcad4", "score": "0.5241779", "text": "protected\n\tfunction replaceLabels(&$value)\n\t{\t\t$value = preg_replace_callback('|{{.*?:|', 'replaceLabelsCallback', $value);\n\n\t}", "title": "" }, { "docid": "555fce4c7d65b6b9b5c2fac6aac06158", "score": "0.5239514", "text": "function smarty_mod_regex_replace($string, $search, $replace)\r\n{\r\n return preg_replace($search, $replace, $string);\r\n}", "title": "" }, { "docid": "8f54e645a5052f2d43fbf9c8e8a10771", "score": "0.52378315", "text": "function str_ireplace($search, $replace, $subject, &$count = NULL)\n{\n}", "title": "" }, { "docid": "0656b8de895163e9b205dad827b18348", "score": "0.5226408", "text": "public function replace($key, $var, $flag = NULL, $expire = NULL) {\n\n }", "title": "" }, { "docid": "8124840f95f33c31c706437a3219fba2", "score": "0.5226348", "text": "private function setString(string $key, string $value):void\n {\n if($this->isCli)\n {\n $this->{$key} = $value;\n }\n else\n {\n $this->requestStack->getSession()->set($key,$value);\n }\n }", "title": "" } ]
064043e26d4d8f866fae51924bdba7e3
Gets a value from the session and replaces it.
[ { "docid": "667e9e48aba6ff5083abb04940e2cc0c", "score": "0.0", "text": "public function getAndPut(string $key, $value, $default = null)\n\t{\n\t\t$storedValue = $this->get($key, $default);\n\n\t\t$this->put($key, $value);\n\n\t\treturn $storedValue;\n\t}", "title": "" } ]
[ { "docid": "9ccd0636b8ae59264983f4e1e5526ae4", "score": "0.67599803", "text": "public static function put($name, $value) {\n\t\treturn $_SESSION[$name] = $value; \n\t}", "title": "" }, { "docid": "05b131c2fac3659b1c86c87343cfbd8f", "score": "0.66863877", "text": "public static function put($name, $value)\n {\n return $_SESSION[$name] = $value;\n }", "title": "" }, { "docid": "0eef283e15afd088f7e2dbcc05e041b4", "score": "0.6661715", "text": "public static function put($key, $value)\n\t\t {\n return $_SESSION[$key] = $value;\n\t\t }", "title": "" }, { "docid": "b001f9bfd574a9635537660896ef22f9", "score": "0.6599192", "text": "public static function put($name, $value)\n {\n return $_SESSION[$name] = $value;\n }", "title": "" }, { "docid": "65347fbddc2ec43931d0f628b50864e2", "score": "0.6555929", "text": "public function put($key, $value)\r\n\t{\r\n\t\treturn $_SESSION[$key] = $value;\r\n\t}", "title": "" }, { "docid": "53af2df011be70e968e4ef840291c0ce", "score": "0.6513844", "text": "public static function put($key, $value) {\n return($_SESSION[$key] = $value);\n }", "title": "" }, { "docid": "42151b1e04f73819860f0f14df38934b", "score": "0.64850545", "text": "function sessionGetSet($SN,$val=NULL) {return sessionGet($SN);$_SESSION[$SN]=$val;}", "title": "" }, { "docid": "c1c0e464f49c6f7f986937de96c778ae", "score": "0.6480921", "text": "private function setSessionValue(string $name, $value) {\n $this->getSession()->set($name, $value);\n }", "title": "" }, { "docid": "4e778ab1ac231f9bc269ead28e693f64", "score": "0.64537394", "text": "function GetSessionValue(&$sv, $sn) {\n\t\tif (array_key_exists($sn, $_SESSION))\n\t\t\t$sv = $_SESSION[$sn];\n\t}", "title": "" }, { "docid": "7f8a38dcaa2cf7bc403fe38fe1d13d2a", "score": "0.6411141", "text": "public function removeValue()\n {\n $this->assertFalse($this->session->removeValue('foo'));\n $this->session->putValue('foo', 'baz');\n $this->assertTrue($this->session->hasValue('foo'));\n $this->assertTrue($this->session->removeValue('foo'));\n $this->assertFalse($this->session->hasValue('foo'));\n $this->assertFalse($this->session->removeValue('foo'));\n }", "title": "" }, { "docid": "d23e20537bd6536f4f99bb78ce914878", "score": "0.63860196", "text": "static function setValue($var,$val)\n { \n # Se le da el nombre con $var y el valor de la sesion con $val\n $_SESSION[$var] = $val;\n \n }", "title": "" }, { "docid": "429cd73cc4d6807e0a2e4c9206b42029", "score": "0.6328364", "text": "public function cari_session($value, $session_item){\n if($value){\n $this->session->set_userdata($session_item, $value);\n return $value;\n } elseif($this->session->userdata($session_item)){\n $value = $this->session->userdata($session_item);\n return $value;\n } else {\n $value ='';\n return $value;\n }\n }", "title": "" }, { "docid": "bc79445405160bc2ab663400eea4d5a0", "score": "0.62242717", "text": "public function set($name, $value = null)\n\t{\n\t\t$old = isset($_SESSION[$name]) ? $_SESSION[$name] : null;\n\n\t\tif ($value === null) {\n\t\t\tunset($_SESSION[$name]);\n\t\t} else {\n\t\t\t$_SESSION[$name] = $value;\n\t\t}\n\n\t\treturn $old;\n\t}", "title": "" }, { "docid": "d0794ab9ace19513b4a8e2f33d5d6bba", "score": "0.62241673", "text": "function updateSession($key, $value){\n\t\t$_SESSION['user'][$key] = $value;\n\t}", "title": "" }, { "docid": "dde2b1add8a680faf6f82e9ac43dae0d", "score": "0.6203655", "text": "public function smarty_set_session($value,$session_name) {\n$_SESSION[$session_name] = $value;\nreturn $_SESSION[$session_name];\n\n}", "title": "" }, { "docid": "4acbc058c52568ddb156b2d76e321bf2", "score": "0.61920404", "text": "public function set($key, $value){\n $_SESSION[$key]=$value;\n \n}", "title": "" }, { "docid": "d8a9b3ee57024e00962f063597c8c545", "score": "0.6176951", "text": "function set($name, $value){\n\t\t$_SESSION[$name]=$value;\n\t}", "title": "" }, { "docid": "36e98ea28156f49f4db3aac0f2365af4", "score": "0.6162067", "text": "function set($key, $value) {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "5862049b6346c15fd36af0a190045a7a", "score": "0.61570895", "text": "function session_update() {}", "title": "" }, { "docid": "02fddf8745e19b0c7b5b3f2427b7512b", "score": "0.61072177", "text": "public function set($var, $value){\n $_SESSION[$var] = $value;\n }", "title": "" }, { "docid": "f64556f3959145a2ab3c7b30aebfb822", "score": "0.6097321", "text": "public function replace_in_cache($key, $value)\n {\n if ( !isset($_SESSION[$key]) )\n {\n return false;\n }\n return $this->set_in_cache($key, $value);\n }", "title": "" }, { "docid": "abe5adae5f97e0e1604d444410ebbbe8", "score": "0.6008352", "text": "public static function set($name, $value)\n {\n return $_SESSION[$name] = $value;\n }", "title": "" }, { "docid": "5a6db9fcbd67d2e11e958da3110ba1d4", "score": "0.5997321", "text": "public function update_session(){\n // Don't actually update this object\n }", "title": "" }, { "docid": "969e86513ce342b52982f4760a5e2d4b", "score": "0.59849006", "text": "function change($name , $val){\n\n if(isset($_SESSION[$name])){\n $_SESSION[$name] = $val;\n }else{\n $this->set($name , $val);\n }\n }", "title": "" }, { "docid": "7dfc2109f3c5c381bb1797fe661ad0f8", "score": "0.59842104", "text": "public function session( $key = NULL, $value = NULL ) {\n if( isset( $key ) && isset( $value ) )\n $this->_session[$key] = $value;\n else\n return $this->getVar( $this->_session, $key );\n }", "title": "" }, { "docid": "41a8ba3bc598dbf9bb20cf1f07390b0f", "score": "0.5959008", "text": "public function setUserState($key, $value)\n\t{\n\t\t$session = JFactory::getSession();\n\t\t$registry = $session->get('registry');\n\n\t\tif (!is_null($registry))\n\t\t{\n\t\t\treturn $registry->set($key, $value);\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "aca173bb77bfdd76c9de134b67d0ff03", "score": "0.595635", "text": "function sessionTest(){\r\n $_SESSION['brand'] = 'Sony';\r\n\r\n echo $_SESSION['brand'];\r\n }", "title": "" }, { "docid": "8a512db6037aa6d1d90071eb8962439c", "score": "0.5955634", "text": "public function set($name, $value)\r\n {\r\n $_SESSION[$name] = $value;\r\n }", "title": "" }, { "docid": "f53eca21d8194af9bcce246575f8ee47", "score": "0.59528464", "text": "public function __set($name, $value) {\n\t\t$_SESSION[$name] = $value;\n\t}", "title": "" }, { "docid": "9c609d7602fa2290af922f79d5265276", "score": "0.5947437", "text": "public static function pull($key)\r\n\t{\r\n\t\tif (isset($_SESSION[SESSION_PREFIX . $key]))\r\n\t\t{\r\n\t\t\t$value = $_SESSION[SESSION_PREFIX . $key];\r\n\t\t\tunset($_SESSION[SESSION_PREFIX . $key]);\r\n\r\n\t\t\treturn $value;\r\n\t\t}\r\n\r\n\t\treturn;\r\n\t}", "title": "" }, { "docid": "f808ed83ab97b84e17df9d9f34be2dfd", "score": "0.5947414", "text": "function session($key, $value = null) {\n if (!is_null($value)) {\n $_SESSION[$key] = $value;\n return $_SESSION[$key];\n }\n\n if (!array_key_exists($key, $_SESSION)) {\n return null;\n }\n\n return $_SESSION[$key];\n}", "title": "" }, { "docid": "f6b10e95d5610d3f04cff84462efb2ba", "score": "0.59336275", "text": "public function __set( $name , $value )\n {\n $_SESSION[$name] = $value;\n }", "title": "" }, { "docid": "f7be6703a29809c982c47460c5aeae41", "score": "0.59306794", "text": "public function set($name, $value) {\n $_SESSION[$name] = $value;\n }", "title": "" }, { "docid": "d404a1e1ab18466e0ee922ae44d533bc", "score": "0.5906005", "text": "public function set($key, $value)\n {\n if (!empty($this->id())) {\n $_SESSION[$key] = $value;\n }\n }", "title": "" }, { "docid": "b7d4bd303590b1ff65b4248768e4fdf2", "score": "0.5897038", "text": "public function set($key, $value)\n {\n if (!isset($_SESSION['cache'])) {\n $_SESSION['cache'] = new stdClass();\n }\n\n $_SESSION['cache']->{$key} = new stdClass();\n $_SESSION['cache']->{$key}->key = $key;\n $_SESSION['cache']->{$key}->value = $value;\n $_SESSION['cache']->{$key}->expires = $this->time + $this->expires;\n\n return $value;\n }", "title": "" }, { "docid": "64197336f5f5ba216c8d9986c4783c6a", "score": "0.58872837", "text": "function session_put($key, $value) {\n session_start();\n $_SESSION[\"taas_\" . $key] = $value;\n}", "title": "" }, { "docid": "352ae589871cfb04d56fc4f8fa971380", "score": "0.5885034", "text": "public function setSession($value) \r\n\t\t{\r\n\t\t\t$this->session = $value;\r\n\t\t}", "title": "" }, { "docid": "94fd11c78e03c3aff8b35488a9f8c210", "score": "0.58720696", "text": "public function set($name, $value)\n {\n $_SESSION[$name] = $value;\n }", "title": "" }, { "docid": "4842f66e95097af6ddd4be592ca0ac42", "score": "0.587022", "text": "public static function set($key, $value) \n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "732c8ae6be0be21f1563fb407cfbaa09", "score": "0.58667564", "text": "public function setData($data, $value) \n {\n $_SESSION[$data] = $value;\n }", "title": "" }, { "docid": "0b55d06144ca53708a73b05b1cbab50e", "score": "0.58528465", "text": "public static function set ( $key, $value ) {\n\t\t$_SESSION [ $key ] = $value;\n\t}", "title": "" }, { "docid": "7f620f27029de032c7e814df7ed7e7b5", "score": "0.5848831", "text": "public function set($key, $value)\r\n {\r\n $_SESSION[$key] = $value;\r\n }", "title": "" }, { "docid": "22cb5c0132d4974c224972503a300c36", "score": "0.58470994", "text": "function getVariableFromSession($name, $value){\n if(isset($_SESSION[$name.\"2_\".$value])){\n return $_SESSION[$name.\"2_\".$value];\n }\n else{\n return \"\";\n }\n }", "title": "" }, { "docid": "d1177b5c196fdfafc57336772e943d21", "score": "0.58452624", "text": "public function setSessionValue($key, $value) {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "635c1d3a87619d75b25ab6782f9093d4", "score": "0.5840149", "text": "public function editValue($valueName, $value)\r\n {\r\n if($this->getSessionValue($valueName) == false) {\r\n return false;\r\n } else {\r\n $decodeOne = openssl_decrypt($this->getSessionId(), \"AES-256-CBC\", self::$sessionKey);\r\n $decoded = json_decode($decodeOne);\r\n $found = array_search($valueName, $decoded);\r\n $arrayOne = array($found => $valueName, $found+1 => $value);\r\n $edited = array_replace($decoded, $arrayOne);\r\n $sessionArray = json_encode($edited);\r\n $encryptData = openssl_encrypt($sessionArray, \"AES-256-CBC\", self::$sessionKey);\r\n setcookie(self::$cookieName, $encryptData);\r\n }\r\n }", "title": "" }, { "docid": "8855084e637a241bb00b23ae31b169b1", "score": "0.58354455", "text": "public static function pull($key) {\n if (isset($_SESSION[$key])) {\n $value = $_SESSION[$key];\n unset($_SESSION[$key]);\n return $value;\n }\n return null;\n }", "title": "" }, { "docid": "52337e8afbfb45f8c9ab03334fae43c1", "score": "0.5833943", "text": "public function set($key, $value)\n\t{\n\t\t$_SESSION[$key]=$value;\t\t\n\t}", "title": "" }, { "docid": "392ba258a4ddc235a8787c8ff6939198", "score": "0.5832481", "text": "function set($key, $val)\n\t{\n\t\t$_SESSION[\"$key\"] = $val;\n\t}", "title": "" }, { "docid": "40be6e35846a2b97c74aae30b7615ff4", "score": "0.5830196", "text": "private function getSessionValue(string $name, bool $peek = FALSE) {\n $value = $this->getSession()->get($name);\n if (!$peek) {\n $this->getSession()->remove($name);\n }\n\n return $value;\n }", "title": "" }, { "docid": "ce2e14f4687046e6c4dac6f13c840d19", "score": "0.5829582", "text": "public function __set($name, $value)\n {\n $_SESSION[$name] = $value;\n }", "title": "" }, { "docid": "df88301a3a531f510a54cb1b64c2ad17", "score": "0.5826484", "text": "function set($name , $val){\n if(!isset($_SESSION[$name])){\n $_SESSION[$name] = $val;\n }\n\n }", "title": "" }, { "docid": "adf5388f4d3616d6d26cf1cfea994753", "score": "0.58201706", "text": "private function set($key,$value)\n {\n if(! empty($key) && ! empty($value)) {\n return $_SESSION[$this->id][$key] = $value;\n }\n }", "title": "" }, { "docid": "6ce81a14c0602596cde62f1c3aecd9bd", "score": "0.5803074", "text": "public static function set($name, $value)\n {\n $_SESSION[$name]=$value;\n }", "title": "" }, { "docid": "03ea98cfd3f0a938bc1a324d13dc1e5d", "score": "0.57858604", "text": "private function setSessState($value)\n\t{\n\t\t// Create the Session Variable\n\t\t$session_variable_name = $this->construct_session_variable_name('state');\n\t\t$_SESSION[$session_variable_name] = $value;\n\t}", "title": "" }, { "docid": "b54917361508e6958a7b73ac0fa4a40a", "score": "0.5775687", "text": "function session_variable($access,$variable,$value=\"undefined\"){\n\t\tif ($this->module_debug){\n\t\t\t$this->call_command(\"UTILS_DEBUG_ENTRY\",array($this->module_name,\"Session Varaible\",__LINE__,\"[$access,$variable,$value]\"));\n\t\t}\n\t\t\n\t\tif ($access==\"GET\"){\n\t\t\t$ret = \"\";\n\t\t\tif (!empty($_SESSION[$variable])){\n\t\t\t\t$ret = $_SESSION[$variable];\n\t\t\t}\n\t\t\t$return = $ret;\n\t\t}else{\n\t\t\t$_SESSION[$variable]=$value;\n\t\t\t$return = 1;\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "8d6fe345751684d00c5e680bf785259a", "score": "0.5773821", "text": "public function _set($key, $value)\n {\n $key .= session_id();\n\n return $this->set($key, $value);\n }", "title": "" }, { "docid": "86b52866ec236327d9dd0516b5e326c1", "score": "0.5771376", "text": "function update() {\n\t\tforeach($this as $key=>$value) {\n\t\t\t$_SESSION[\"{$key}\"] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "8a5ce22cadf9e5d9f7778b019bdfcb4d", "score": "0.5756846", "text": "public function setSession($key, $value)\n {\n return (is_null($this->getSession($key)))?$_SESSION[$this->prefix][$key] = $value:$_SESSION[$this->prefix][$key] = $value;\n\n }", "title": "" }, { "docid": "0c85e7d630a631ea1923f2157b4441f1", "score": "0.575548", "text": "public function __set($key, $value)\n\t{\n\t\t$_SESSION[$key] = $value;\n\t}", "title": "" }, { "docid": "2d555e1597f2199f82a572a9335baec3", "score": "0.57526886", "text": "function setCache($key, $value)\n{\n // $_SESSION[$key] = $value;\n}", "title": "" }, { "docid": "fc43ed94dae62dfd10746570659a59a0", "score": "0.5749361", "text": "function sessionSave(string $key, $value = '', bool $overwrite = false) {\n if ($overwrite) {\n $_SESSION[$key] = $value;\n }\n\n if (!isset($_SESSION[$key])) {\n $_SESSION[$key] = $value;\n }\n}", "title": "" }, { "docid": "a704b961dc61c7b72b9c960bdec21b34", "score": "0.5748227", "text": "public function set($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "a704b961dc61c7b72b9c960bdec21b34", "score": "0.5748227", "text": "public function set($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "a704b961dc61c7b72b9c960bdec21b34", "score": "0.5748227", "text": "public function set($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "bb47a30735d08f50eddfa612b54cb786", "score": "0.5745259", "text": "public function __set(string $key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "a0e4642c5e1a5b79f6fa1297310b0248", "score": "0.572865", "text": "function setSession($key, $value) {\n return Yii::app()->getSession()->add($key, $value);\n}", "title": "" }, { "docid": "203eda2448bb4fbe6fbc18a4078d3ad8", "score": "0.5728047", "text": "function set_session(string $key, $value)\n{\n $_SESSION[$key] = $value;\n}", "title": "" }, { "docid": "e160618b08023ceb8905f35f55c6ffb9", "score": "0.5725775", "text": "public function set($key, $value) {\n if ($this->injected) {\n $_SESSION[$key] = $value;\n } else {\n throw new \\RuntimeException('Session is not injected!');\n }\n }", "title": "" }, { "docid": "4ee755121e96a315d5354518674a628f", "score": "0.5724436", "text": "public function setSession($key,$value)\n {\n $_SESSION[$key]=$value;\n }", "title": "" }, { "docid": "b8e97a7d7bf1161b6ae902e356ec4824", "score": "0.57239217", "text": "public function put(string $key, $value): void\n\t{\n\t\t$this->sessionData[$key] = $value;\n\t}", "title": "" }, { "docid": "085b779c523c1aee562e2a3bb2a3d068", "score": "0.5699865", "text": "public static function set($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "085b779c523c1aee562e2a3bb2a3d068", "score": "0.5699865", "text": "public static function set($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "085b779c523c1aee562e2a3bb2a3d068", "score": "0.5699865", "text": "public static function set($key, $value)\n {\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "19d91317650529daee1fa022a7e26e01", "score": "0.5698702", "text": "public function session($name, $value) {\n $_SESSION[$name] = $value;\n return;\n }", "title": "" }, { "docid": "b3efded07c33373cdb9576d7cdc3e48f", "score": "0.5697325", "text": "public function set($key, $value) {\n\t\t\tif (!$this->locked)\n\t\t\t\tthrow new LogicException('Cannot set session value, session not locked');\n\t\t\t$_SESSION[$key] = $value;\n\t\t}", "title": "" }, { "docid": "6427a332be32f6e4c98c3e3211000625", "score": "0.56896544", "text": "public function putGetHasValue()\n {\n $this->assertNull($this->session->getValue('foo'));\n $this->assertEquals('bar', $this->session->getValue('foo', 'bar'));\n $this->assertFalse($this->session->hasValue('foo'));\n $this->session->putValue('foo', 'baz');\n $this->assertTrue($this->session->hasValue('foo'));\n $this->assertEquals('baz', $this->session->getValue('foo'));\n $this->assertEquals('baz', $this->session->getValue('foo', 'bar'));\n }", "title": "" }, { "docid": "9fdd75a745b1099a8ba3fc4f80c77bb0", "score": "0.56847394", "text": "public static function set($key, $value) {\n if (!isset($_SESSION)) {\n session_start();\n }\n if (array_key_exists($key, $_SESSION)) {\n self::destroy($key);\n }\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "ffc56b4809418504c7c14d14c5b3c82a", "score": "0.56822735", "text": "public function setPersistentProperty($key, $value) {\n\t\t$fieldName = $this->getSessionFieldName($key);\n\t\tif ($value !== NULL) {\n\t\t\t$_SESSION[$fieldName] = $value;\n\t\t} else {\n\t\t\tunset($_SESSION[$fieldName]);\n\t\t}\n\t}", "title": "" }, { "docid": "a1290fb8e7aabfcee3825a974f0e3cfe", "score": "0.567714", "text": "function session_set($name, $value, $expire='', $path = e_HTTP, $domain = '', $secure = 0)\n{\n\tglobal $pref;\n\tif ($pref['user_tracking'] == 'session')\n\t{\n\t\t$_SESSION[$name] = $value;\n\t}\n\telse\n\t{\n\t\tsetcookie($name, $value, $expire, $path, $domain, $secure);\n\t\t$_COOKIE[$name] = $value;\n\t}\n}", "title": "" }, { "docid": "097038e8e7e189aabb578420a04021f6", "score": "0.5673064", "text": "public function vb(Request $request)\n {\n\n /* $value = $request->session()->get('xx');\n echo $value; */\n\n /* $value = session('xx', 'default');\n echo $value; */\n \n/* $request->session()->forget('user');\n */ \n\n/* $request->session()->flush();\n */\n $data = $request->session()->all();\n print_r($data);\n \n /* $request->session()->push('user.teams', 'developers');\n $value = session('user.teams');\n print_r($value); */\n }", "title": "" }, { "docid": "c03ec8e51f661582daa0b57f30e2edbc", "score": "0.5672409", "text": "function get_total_quantity()\n{\n if (isset($_SESSION['total_quantity'])) {\n echo $_SESSION['total_quantity'];\n } else {\n $_SESSION['total_quantity'] = \"\";\n echo $_SESSION['total_quantity'] = \"0\";\n }\n}", "title": "" }, { "docid": "a38fcbfba79bcc52d22b4ba612c37ab4", "score": "0.5654933", "text": "function _setsession() {\n\t\t$sn = $this->_input['name'];\n\t\t$sv = $this->_input['value'];\n\t\t$_SESSION[$sn] = $sv;\n\t}", "title": "" }, { "docid": "29254249f6db82d013006f312f8c814a", "score": "0.56332976", "text": "function updateSession() {\n global $dao, $user;\n if (($u = $dao->getUser($user)) === false) {\n $user = null;\n return false;\n }\n $user = $u;\n $_SESSION[\"user\"] = json_encode($u);\n return true;\n}", "title": "" }, { "docid": "74331bf40b5f99af678b41e94d80596f", "score": "0.5622876", "text": "static function getValue($var)\n {\n # Retorna el valor de la sesion\n return $_SESSION[$var];\n \n }", "title": "" }, { "docid": "2037a42861eb6aedb6b95baea0e1ad13", "score": "0.56192327", "text": "public function setSession($key, $value)\n {\n return $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "de96e714fcd0183fc69307b31045d03d", "score": "0.56178427", "text": "function session($name = null, $value = null) {\n\t\t$session = request()->session();\n\n\t\tif (!is_null($name)) {\n\t\t\tif (!is_null($value)) {\n\t\t\t\t$session->put($name, $value);\n\t\t\t\treturn $session;\n\t\t\t}\n\n\t\t\treturn $session->get($name);\n\t\t}\n\n\t\treturn $session;\n\t}", "title": "" }, { "docid": "0a87697aa26fc7347b099ce593ac8c5c", "score": "0.5608139", "text": "public function __set($key, $value)\n\t{\n\t\t$this->_session[$key] = $value;\t\n\t}", "title": "" }, { "docid": "bea52492f49e50d119b513a3d6ca34a3", "score": "0.5604766", "text": "public function unsetSessionValue()\n {\n $this->session->deleteItem('postTitle');\n $this->session->deleteItem('postIntro');\n $this->session->deleteItem('postImage');\n $this->session->deleteItem('postContent');\n }", "title": "" }, { "docid": "4515fb6c2e3d8aa5d347e9ae85bc5663", "score": "0.56012344", "text": "public static function storeOldValues(): void\n {\n self::checkSessionStarted();\n\n $_SESSION[self::OLD_VALUES_KEY_NAME] = self::engine()->request->all();\n }", "title": "" }, { "docid": "8641d5c40b8d251b3724b1ba58699d2b", "score": "0.5596999", "text": "public function set(string $key, mixed $value = false): Session {\n\t\t$_SESSION[$key] = $value;\n\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "ca65c59e96d0aad80e6bf90f5a397e99", "score": "0.55837643", "text": "function sessionValueGetFlash($key, $default = null) {\n if(isset($_SESSION[$key])) {\n $returnValue = $_SESSION[$key];\n unset($_SESSION[$key]);\n } else {\n $returnValue = $default;\n }\n return $returnValue;\n}", "title": "" }, { "docid": "d9bcd1ef79908e08e831620fa7624147", "score": "0.55783683", "text": "function set_session($name, $valor) {\r\n $_SESSION[$name] = $valor;\r\n}", "title": "" }, { "docid": "b2051c4291c95c7e484a1c06361aa571", "score": "0.5577309", "text": "function sess_write()\n\t{\n\t\t$_SESSION = $this->userdata;\n\t}", "title": "" }, { "docid": "4d7ca50e85672d4e51f792f00929455b", "score": "0.55611086", "text": "function set_session($key, $value)\n{\n $_SESSION[$key] = $value;\n return true;\n}", "title": "" }, { "docid": "902a6ef6af0fecde41ad7d37c4d9da3c", "score": "0.5559472", "text": "function setinsertvalue($insertvalue) {\r\n $_SESSION['displaydata'][$_SESSION [\"displaydata\"] [\"name\"]]['insertvalue'] = $insertvalue;\r\n }", "title": "" }, { "docid": "7b4f7ded3ea84b6c13ecf1ea5a2b3945", "score": "0.5557612", "text": "protected function integrateDataFromSession() {\n\t\t/** if the thing coming in from the session isn't already something,\n\t\t * replace it.\n\t\t * if it is: assume that the session data was meant to be replaced\n\t\t * with better data.\n\t\t * ...unless it's an explicit $overwrite * */\n\t\t$c = $this->getAdapterClass();\n\t\tif ( $c::session_exists() && array_key_exists( 'Donor', $_SESSION ) ) {\n\t\t\t//fields that should always overwrite with their original values\n\t\t\t$overwrite = array ( 'referrer' );\n\t\t\tforeach ( $_SESSION['Donor'] as $key => $val ) {\n\t\t\t\tif ( !$this->isSomething( $key ) ){\n\t\t\t\t\t$this->setVal( $key, $val );\n\t\t\t\t} else {\n\t\t\t\t\tif ( in_array( $key, $overwrite ) ) {\n\t\t\t\t\t\t$this->setVal( $key, $val );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ad277e598a0e39619a6aafda5cc82e49", "score": "0.5549566", "text": "public static function set($key, $value)\n {\n self::start();\n $_SESSION[$key] = $value;\n }", "title": "" }, { "docid": "13d48cd5f6442c5d89dd39f139c01684", "score": "0.5548473", "text": "public static function set($key, $value = false) {\n// dd($key);\n if (is_array($key) && $value === false) {\n foreach ($key as $name => $value) {\n $_SESSION[$name] = $value;\n }\n } else {\n $_SESSION[$key] = $value;\n }\n }", "title": "" }, { "docid": "9f41b521133a203765692c489553493e", "score": "0.5547639", "text": "public function put($value)\n {\n $this->setCookie($value, $this->minutesToLifetime(2628000));\n }", "title": "" }, { "docid": "3216a9e65fbd0b40841e4a92d2b17ff3", "score": "0.55405176", "text": "private function setSessUserType($value)\n\t{\n\t\t// Create the Session Variable\n\t\t$session_variable_name = $this->construct_session_variable_name('user_type');\n\t\t$_SESSION[$session_variable_name] = $value;\n\t}", "title": "" }, { "docid": "2ea7a0f22b2b60e565ba198892afbfde", "score": "0.55309623", "text": "function formFill($input) {\n if (isset($_SESSION[$input])) {\n $output = $_SESSION[$input];\n echo \"value='$output'\";\n }\n}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "08be3f269399f6c4131451516b9365d3", "score": "0.0", "text": "public function destroy(Broker $broker)\n {\n //\n }", "title": "" } ]
[ { "docid": "2b9d2c85f4c5a3ea90f0276710558864", "score": "0.73587126", "text": "public function removeResource(ResourceInterface $resource);", "title": "" }, { "docid": "993b4783957b008ba5348591f59665c8", "score": "0.7277427", "text": "public function del($resource)\n {\n }", "title": "" }, { "docid": "f927c8635493c1dd0ac8db6bd602ddb2", "score": "0.6954638", "text": "protected function removeResourceFromStorage(HCResource $resource, string $disk): void\n {\n if (Storage::disk($disk)->has($resource['path'])) {\n Storage::disk($disk)->delete($resource['path']);\n }\n }", "title": "" }, { "docid": "440048b39bf8ab60c81c3f27962faaf1", "score": "0.69409096", "text": "public function deleteResource(PersistentResource $resource);", "title": "" }, { "docid": "9935d5b93e750a6c0ddc712ef3c08960", "score": "0.6876637", "text": "public function deleteResource($resourceId);", "title": "" }, { "docid": "9ce11cccf2dced06dd47b1882f8da1bb", "score": "0.6700161", "text": "public function deleted(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "6f90ef2bb7cdf15d03e7caac57f399ca", "score": "0.6653144", "text": "public function remove(ResourceInterface $resource, $files);", "title": "" }, { "docid": "062d77ad6e956ba37743db6eb7cdce0c", "score": "0.6625139", "text": "public function delete(string $resource)\n {\n $name = Normalizer::className($resource);\n $path = PATH_CUSTOM_RESOURCES . \"{$name}.php\";\n if (!file_exists($path)) {\n self::error(\"Resource not found!\", true);\n }\n\n if (!unlink($path)) {\n self::error(\"Failed to delete resource!\");\n return;\n }\n\n self::success(\"Resource deleted!\");\n }", "title": "" }, { "docid": "6c60b1eff618aa8951f7900cc60261d9", "score": "0.65714747", "text": "public static function remove()\n {\n self::$storage = null;\n }", "title": "" }, { "docid": "9bf523fe37f0dc36010278d5bebdd0a1", "score": "0.6514855", "text": "public function unpublishResource(Resource $resource) {\n if ( $this->debug ) {\n $this->systemLogger->log('target ' . $this->name . ': unpublishResource');\n }\n try {\n $this->deleteFile($this->getRelativePublicationPathAndFilename($resource));\n } catch (\\Exception $e) {\n }\n }", "title": "" }, { "docid": "c040ed02d56811524efd11951dd9e13e", "score": "0.6511542", "text": "public function delete(string $id): IStorage;", "title": "" }, { "docid": "eb8ef8644496015cbec33f776a7522f6", "score": "0.6464115", "text": "public function deleteResource($resource)\n {\n // instanceof instead of type hinting so it can be used as slot\n if ($resource instanceof \\TYPO3\\Flow\\Resource\\Resource) {\n $this->resourcePublisher->unpublishPersistentResource($resource);\n if (is_file($this->persistentResourcesStorageBaseUri . $resource->getResourcePointer()->getHash())) {\n unlink($this->persistentResourcesStorageBaseUri . $resource->getResourcePointer()->getHash());\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "b45656cb095db000c7a18b0789ffe517", "score": "0.6381826", "text": "public function delete() {\n $this->storage_file->delete();\n }", "title": "" }, { "docid": "538b378a63649cab0724cc3f9c14d7e7", "score": "0.63669956", "text": "public function delete(resource $resource) {\n $stmt = $this->db->prepare(\"DELETE from resource WHERE id=?\");\n $stmt->execute(array($resource->getIdresource()));\n }", "title": "" }, { "docid": "1a061574cc458c41cee05049e84b3d56", "score": "0.62799686", "text": "public function remove() {\n\t\t$this->assert_ready();\n\n\t\tif (is_file($this->get_internal_path())) {\n\t\t\tif (!unlink($this->get_internal_path())) {\n\t\t\t\tthrow new IntException('Failed to remove asset.');\n\t\t\t}\n\t\t}\n\t\tif (is_file($this->get_internal_thumb_path())) {\n\t\t\tif (!unlink($this->get_internal_thumb_path())) {\n\t\t\t\tthrow new IntException('Failed to remove asset thumbnail.');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d9d905e10fc59213e9d27bf1adc77c9c", "score": "0.62419707", "text": "public function delete(Resource\\ResourceInterface $resource)\r\n\t{\r\n\t\t$resourceName = $resource->resourceName();\r\n\t\t$resourceId = $resource->resourceId();\r\n\t\t$params = $resource->params();\r\n\t\t$hash = $this->generateHash($resourceName, $resourceId, $params);\r\n\t\t$hashParts = explode(\"-\", $hash);\r\n\t\t\r\n\t\t$this->_delete($hash);\r\n\t\t\r\n\t\tif (!$resourceId || empty($params)) {\r\n\t\t\t$partialHash = !$resourceId \r\n\t\t\t\t? $hashParts[0] \r\n\t\t\t\t: $hashParts[0] .\"-\". $hashParts[1];\r\n\t\t\t\r\n\t\t\tforeach ($this->hashes as $hash) {\r\n\t\t\t\tif (preg_match(\"/^{$partialHash}/i\", $hash)) {\r\n\t\t\t\t\t$this->_delete($hash);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "23797bba0e5c4bab3f3e851d0a2e599d", "score": "0.6241274", "text": "function delete($resource, $data='') {\n\t\t\t$this->_auth();\n\t\t\treturn $this->_request('DELETE', $this->_resourcefix($resource), $data);\n\t\t}", "title": "" }, { "docid": "71cdf2c8771b0884ed0346cbff1672a0", "score": "0.62021154", "text": "abstract protected function destroyResource(): void;", "title": "" }, { "docid": "c59e81ef63187237bc9f5f3b5e74592e", "score": "0.6177348", "text": "public function deleteResourceType(ResourceTypeInterface $resourceType);", "title": "" }, { "docid": "5292bf6424220d49a3107255e329dbd6", "score": "0.61606133", "text": "public function delete()\n {\n Storage::disk('s3')->delete($this->id);\n }", "title": "" }, { "docid": "f4f09ec06bcbe6e72b5430af6aae6dd6", "score": "0.61495334", "text": "public function forceDeleted(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e13c01fffe22886d2b3f34922a8a2e93", "score": "0.61296195", "text": "public function deleteAfter($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "02d92a998dda9d4406781461e1522038", "score": "0.6128936", "text": "public function delete()\n {\n if (!$this->linked) {\n try {\n $this->storage->delete();\n } catch (Exception $e) {}\n }\n }", "title": "" }, { "docid": "e0ec0bbfbe81f9c324f82b9e4214f65b", "score": "0.61096084", "text": "public function delete()\n {\n if ($this->exists()) {\n $this->filesystem->remove($this->path);\n }\n }", "title": "" }, { "docid": "e3417229f36e4c96d533be83d06bde0c", "score": "0.6041458", "text": "public function deleteResource($id)\n\t{\n\t}", "title": "" }, { "docid": "902bb49bf75f0b9c9365d23387afb5d1", "score": "0.60388845", "text": "public function remove($resource)\n {\n $resourceName = $this->getResourceName($resource);\n $index = array_search($resourceName, $this->indexes, true);\n\n if (false !== $index) {\n unset($this->indexes[$index]);\n unset($this->resources[$resourceName]);\n\n return true;\n }\n\n return false;\n }", "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": "5cbdbc3d6fcbfefa1426cf0c64aa04ca", "score": "0.602262", "text": "public function remove($name) {\n unset($this->storage[$name]);\n }", "title": "" }, { "docid": "6c062b635ba3468052de6e300a6359c6", "score": "0.60063314", "text": "public function destroy(Resource $resource)\n {\n //\n // $this->authorize('delete',Resource::class);\n // $resource->delete();\n // return redirect('/resource');\n return response(['message'=>'Deleted']);\n }", "title": "" }, { "docid": "106ec422b24f32e2c69e65e6763760ce", "score": "0.5998401", "text": "public function remove()\n {\n $this->setId($this->getIdMd5());\n\n $filename =\n $this->_parameters->getFormattedParameter('file.cache.directory') .\n $this->_parameters->getFormattedParameter('file.cache.file');\n\n $file = new HoaFile\\Read($filename);\n $file->delete();\n $file->close();\n\n return;\n }", "title": "" }, { "docid": "9dc6c3fff99085d4ce4d32df40726961", "score": "0.5966733", "text": "public function destroy($id)\n {\n //delete existing image and file\n $userdata = Resources::findOrFail($id);\n\n $image_name = $userdata->book_image;\n $image_name='assets/uploads/cover_images/'.$image_name;\n File::delete($image_name);\n\n $file_name = $userdata->file_name;\n $file_name='assets/uploads/resources/'.$file_name;\n File::delete($file_name);\n $userdata->delete();\n return redirect('/resource/view')->with('success','Resource Successfully Deleted');\n\n }", "title": "" }, { "docid": "b23bab0dfabcc169486df5c49c4053a8", "score": "0.59365857", "text": "public function deletePersonalData()\n {\n if ($this->resource) {\n $this->resource->removeFromStorage();\n $this->resource->delete();\n }\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "1c1c61cd59ebc38ac44e886b6478a747", "score": "0.59062636", "text": "public function remove()\n {\n if ($this->id) {\n static::delete($this->id);\n }\n }", "title": "" }, { "docid": "8f6877c27ea14309583a0c11d265f37c", "score": "0.59036046", "text": "public function delete() {\n if($this->exists()) {\n unlink($this->path);\n }\n }", "title": "" }, { "docid": "94efa591f8ef8e0d19e7776ed552595e", "score": "0.59000266", "text": "public function deleteBefore($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.58972764", "text": "public function remove() {}", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.58972764", "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": "6dbf60ad37b681821654b0dc63e31a44", "score": "0.58875144", "text": "public function destroy($path)\n {\n // Remove S3 object path\n }", "title": "" }, { "docid": "dab9609eae6b95de02e986dc8f30ef30", "score": "0.588703", "text": "public function delete($key) {\n\t\tif ($this->readOnly) {\n\t\t\tthrow new StorageException('Trying to write to a read only storage');\n\t\t}\n\n\t\t$startTime = microtime(true);\n\t\t$fileName = $this->makeFullPath($key);\n\n\t\ttry {\n\t\t\t$this->fileHandler->remove($fileName);\n\t\t}\n\t\tcatch (NotFoundException $e) {\n\t\t}\n\t\tcatch (FileException $e) {\n\t\t\tthrow new StorageException('Unable to remove the file: ' . $fileName, 0, $e);\n\t\t}\n\n\t\t$debugger = Application::getInstance()->getDiContainer()->getDebugger();\n\t\tif (!$this->debuggerDisabled && $debugger !== false) {\n\t\t\t$debugger->addItem(new StorageItem('file', 'file.' . $this->currentConfigurationName,\n\t\t\t\tStorageItem::METHOD_DELETE . ' ' . $key, null, microtime(true) - $startTime));\n\t\t}\n\t}", "title": "" }, { "docid": "34400e55dd4ebc208c4594b57d8127b5", "score": "0.58806455", "text": "public function removeResourceParent(ResourceInterface $resource, ResourceInterface $parentResource);", "title": "" }, { "docid": "e3bc23faa27c9a9250d1f82e5c8ffe69", "score": "0.5879126", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return $this->api_success([\n 'data' => new ResourceResource($resource),\n 'message' => __('pages.responses.deleted'),\n 'code' => 201\n ], 201);\n }", "title": "" }, { "docid": "4ca008dccccbaa2670890adc84077b0d", "score": "0.58728075", "text": "public function destroy($id)\n {\n $student = Student::findOrFail($id);\n if($student->delete()){\n return new StudentResource($student);\n }\n}", "title": "" }, { "docid": "3ec1051c44bcdbf6b8f0b979de237ca0", "score": "0.5859524", "text": "public function destroy () {\n\t\treturn unlink(self::filepath($this->name));\n\t}", "title": "" }, { "docid": "a145f758f727b845157c93040e3789f9", "score": "0.5852177", "text": "public function remove(FileInterface $file);", "title": "" }, { "docid": "7c2dd27bffbd51546ccd25eded472c62", "score": "0.58518326", "text": "public static function remove(string $path): void\n\t{\n\t\tif(file_exists(storage_path($path))) {\n\t\t\tunlink(storage_path($path));\n\t\t}\n\t}", "title": "" }, { "docid": "0715c406e16677dec9ed9d1639329836", "score": "0.5848653", "text": "public function deleteResourceById(Request $request, $id = 0);", "title": "" }, { "docid": "4c976f8fadd1a0e0cd388ea9b1c3e799", "score": "0.5832527", "text": "public function destroy($id)\n {\n $get=Product::where('id',$id)->first();\n if($get->thumbnail!=null){\n unlink('storage/'.$get->thumbnail);\n }\n if($get->attachment!=null){\n unlink('storage/'.$get->attachment);\n }\n \n Product::where('id',$id)->delete();\n return redirect()->route('listProduct');\n }", "title": "" }, { "docid": "15bc067b90dbe253b89a72946214ee6f", "score": "0.58205", "text": "public function destroy($id)\n { \n if(\\File::exists(public_path().\"/uploads/\".$id)){\n \\File::deleteDirectory(public_path().\"/uploads/\".$id);\n Resource::destroy($id);\n \\Session::flash('message', 'Tutto bene, eliminato!');\n }else {\n \\Session::flash('message', 'Errore imprevisto, cartella in /uploads non trovata!');\n }\n return \\Redirect::to('admin/resources');\n }", "title": "" }, { "docid": "1006371b48f79fb503e249a0abf3d90d", "score": "0.58135617", "text": "function delete_resource($id, $type = 'thumb')\n {\n $constraints = ['clip_id' => $id];\n\n if($type != '*'){\n $constraints['type'] = $this->res_type[$type];\n }\n\n $query = $this->db->get_where('lib_clips_res', $constraints);\n $rows = $query->result_array();\n\n if ($rows) {\n foreach ($rows as $res) {\n $file = $this->config->item('clip_dir') . $type . '/' .\n $id . '.' . $res['resource'];\n if (is_file($file)) {\n unlink($file);\n }\n if($res['location']){\n if($s3Path = $this->getS3Path($res['location'])){\n $this->aws3_sqs_delete_resources_model->put_job(['MessageBody' => $s3Path]);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "7addba7772d86602ad38891183d5c5c0", "score": "0.5804717", "text": "public function destroy($id)\n {\n $obj = Obj::where('id',$id)->first();\n $this->authorize('update', $obj);\n\n // remove file\n if(Storage::disk('public')->exists($obj->image))\n Storage::disk('public')->delete($obj->image);\n\n $obj->delete();\n\n flash('('.$this->app.'/'.$this->module.') item Successfully deleted!')->success();\n return redirect()->route($this->module.'.index');\n }", "title": "" }, { "docid": "f35aaf17008b130a60b3962b50777f92", "score": "0.5800284", "text": "public function unlink();", "title": "" }, { "docid": "2f7fda6501bcbbb5f68ddb7c065c2c8f", "score": "0.57994014", "text": "private function removeResource($filesystemPath, &$removed)\n {\n if (!file_exists($filesystemPath)) {\n return;\n }\n\n ++$removed;\n\n if (is_dir($filesystemPath)) {\n $removed += $this->countChildren($filesystemPath);\n }\n\n $this->filesystem->remove($filesystemPath);\n }", "title": "" }, { "docid": "cc42a160a9315cdd157733240e749135", "score": "0.57910043", "text": "public function remove($entity): void;", "title": "" }, { "docid": "d4218bcd90f4a47f5ea0150ee353dc32", "score": "0.57905525", "text": "public function destroy($id)\n {\n $brand=Brand::find($id);\n //delete related file from storage\n $brand->delete();\n return redirect()->route('brands.index');\n }", "title": "" }, { "docid": "87a257458af9749998d2821206a44b54", "score": "0.57897776", "text": "public function destroy($id)\n {\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": "642f1d1205457b11ef73140be49aa079", "score": "0.5779547", "text": "public function delete($resource)\n {\n return DB::transaction(function () use ($resource) {\n $resource = $this->deleteBefore($resource);\n\n $resource->delete();\n\n return $this->deleteAfter($resource);\n });\n }", "title": "" }, { "docid": "2c0196ccc0507912483f0092cd84b4ae", "score": "0.5779229", "text": "public function removeAvatarResource($resource): bool\n {\n return imagedestroy($resource);\n }", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "33b7f072f2b9b81d6150ecf51df6b25f", "score": "0.57706714", "text": "abstract public function remove($path);", "title": "" }, { "docid": "d63269c2f97e9f20ab93b60f53363fbc", "score": "0.5757352", "text": "public function destroy($class_id, $resource)\n {\n $classResource = ClassResource::find($resource);\n\n // Delete Image\n Storage::delete('public/resources/'.$classResource->classResource_location);\n $classResource->delete();\n\n return redirect('/viewClass'.'/'.$class_id.'/resources')->with('success', 'File Deleted!');\n }", "title": "" }, { "docid": "c41a8c586f3cfc39935459b577d1b862", "score": "0.575272", "text": "public function removeUpload()\n {\n if (isset($this->temp)) {\n unlink($this->temp);\n }\n }", "title": "" }, { "docid": "d142a02423f60696b0dd1bc440aa7621", "score": "0.5740473", "text": "public function deleteUploadedFile() {\n // delete file if exists\n if (file_exists(\"../uploaded_resources/\" . $this->filename)) {\n unlink(\"../uploaded_resources/\" . $this->filename);\n }\n }", "title": "" }, { "docid": "37d1f8df79d1b403823098c91384300b", "score": "0.57366985", "text": "public function destroy() {\n $filepath = $this->getFilepath();\n @unlink($filepath);\n }", "title": "" }, { "docid": "966236614f1d8ba524f6647f934a480c", "score": "0.5731254", "text": "public function destroy($id)\n {\n $slider = slider::where('slider_id', $id)->first();\n $imagename = $slider->image;\n if(!empty($imagename)){\n if(Storage::disk('s3')->exists($imagename)) {\n Storage::disk('s3')->delete($imagename);\n } \n /*$filename = public_path().'/images/slider/'.$file;\n \\File::delete($filename);*/\n }\n slider::where('slider_id',$id)->delete();\n return redirect()->route('slider.index')\n ->with('success','Slider deleted successfully.');\n }", "title": "" }, { "docid": "2433a592ecee814d4683e51a2a9ef8b4", "score": "0.5730529", "text": "public function unindex($resource)\n {\n $dataset = $this->util->getDataset($resource);\n\n if($dataset){\n //find the belonging indexes\n $index = $this->getIndexedWords($dataset);\n\n //remove indexed\n foreach($index as $currentIndexToDelete) {\n $word = $currentIndexToDelete->getWord();\n $this->em->remove($currentIndexToDelete);\n $this->searchDirty($word);\n }\n\n //remove dataset\n $this->em->remove($dataset);\n $this->em->flush();\n $this->searchUpdateTotals();\n }\n }", "title": "" }, { "docid": "f895b50d35ef0b215af95a187ee4f8e1", "score": "0.57171595", "text": "public function delete()\n {\n return Storage::disk(config('screeenly.filesystem_disk'))->delete($this->filename);\n }", "title": "" }, { "docid": "8c0c11de31899ddf1bbfd6c29f1c19a7", "score": "0.571522", "text": "public function deleteImage(){\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "e5f174b2d48a7745c3be9c52c54e88b4", "score": "0.56957734", "text": "function delete()\n\t{\n\t\tglobal $sql;\n\t\t$sql->Query(\"DELETE FROM $this->tablename WHERE id = '$this->id'\");\n\n\t\tif($this->path)\n\t\t\t@unlink($this->path);\n\t\tif($this->thumbnail)\n\t\t\t@unlink($this->thumbnail);\n\t\tif($this->square)\n\t\t\t@unlink($this->square);\n\t\tif($this->small)\n\t\t\t@unlink($this->small);\n\t\tif($this->medium)\n\t\t\t@unlink($this->medium);\n\t\tif($this->large)\n\t\t\t@unlink($this->large);\n\n\t}", "title": "" }, { "docid": "9f8e141fd6e26ce3fe7a6921b622fe0e", "score": "0.5689104", "text": "public function delete()\n {\n $path = str_replace(storage_path('app'), '', $this->path);\n\n Storage::delete($path);\n\n return parent::delete();\n }", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.56849074", "text": "public function remove(): void;", "title": "" }, { "docid": "04406afe569e9b74ee2744b1cf4852d9", "score": "0.5684563", "text": "public function delete() {\n $this->resourceable->delete();\n return parent::delete();\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "45aa00d01271e734f5db2a1fa7f76483", "score": "0.5677459", "text": "function remove($entity);", "title": "" }, { "docid": "b3f8c1c4e871f05ee3123e1f7f5255e8", "score": "0.56750923", "text": "public function destroy($id)\n {\n $Man = Manufacture::find($id);\n $image_path = storage_path('app/public/manufacturers/'.$Man->image); // Value is not URL but directory file path\n if(File::exists($image_path)) {\n File::delete($image_path);\n\n }\n $Man->delete();\n }", "title": "" }, { "docid": "37ff2347ddf9a6db6a9844965dd1ec38", "score": "0.5665463", "text": "public function destroy($id)\n\t{\n\t\t//eliminar usuario \n\t\t$filename = public_path().'/uploads/foo.bar';\n\n\t\tif (File::exists($filename)) \n\t\t{\n \t\tFile::delete($filename);\n\t\t}\n\t}", "title": "" }, { "docid": "9b8aab241578958a2469c7a9782795c1", "score": "0.5661555", "text": "public function destroy($id)\n {\n $actor=Actor::find($id);\n //delete related file from storage\n $actor->delete();\n return redirect()->route('actors.index');\n }", "title": "" }, { "docid": "493127367eaabfb3f87af291ac81b31c", "score": "0.56471384", "text": "public function remove_resource($resource)\n\t{\n\t\tif (isset($this->acl_perms['user_role'][$resource])) {\n\t\t\tunset($this->acl_perms['user_role'][$resource]);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9c63fb3cdb6ebf314539690c581f739a", "score": "0.56405896", "text": "public function remove($id){\n $destinationPath = 'public/uploads/'.$id;\n File::delete($destinationPath);\n }", "title": "" }, { "docid": "218fe18765b1d7c380dddd8b2ac4b37b", "score": "0.5638099", "text": "public function removeFile(FileInterface $file);", "title": "" }, { "docid": "a6b9c5e2bcb825e1cfba302990ec2140", "score": "0.563637", "text": "public function remove()\n\t{\n\t\tFile::remove($this->getFilePath());\n\t}", "title": "" }, { "docid": "dc6cb92328efd21aca7092caec752017", "score": "0.5636115", "text": "public function delete(SectionStorageInterface $section_storage);", "title": "" }, { "docid": "e61268a82a87f7cb8cbe76d15484a282", "score": "0.5635627", "text": "static public function remove($objectName);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "cb6fd12ed6b6c067c3274543aee20401", "score": "0.5631915", "text": "public function clearResource(ResolvedObject $resource, Transaction $transaction)\n\t{\n\t\t\n\t}", "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": "a6f4504c52a348844985d64b90dad904", "score": "0.56214297", "text": "public function destroy($id)\n {\n $supplier = DB::table('suppliers')->where('id',$id)->first();\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n DB::table('suppliers')->where('id',$id)->delete();\n }\n DB::table('suppliers')->where('id',$id)->delete();\n }", "title": "" }, { "docid": "0ef712f262167f08d89550be49a07125", "score": "0.561652", "text": "public function unlinkResource($yResource){\n try{\n if (is_file($yResource->getPath())){\n unlink($yResource->getPath());\n }elseif (is_dir($yResource->getPath())){\n rmdir($yResource->getPath());\n }\n }catch(Exception $e){\n \n }\n return $this->getResource($yResource->getPath());\n }", "title": "" }, { "docid": "39948b150ec808236472ff391114e58e", "score": "0.5614384", "text": "public function delete()\n {\n File::delete([\n $this->path,\n $this->thumbnail_path\n ]);\n\n parent::delete();\n }", "title": "" }, { "docid": "1a1220576ae4b4bfabb91c580117d74a", "score": "0.5614326", "text": "public function destroy($id)\n {\n $get=Destination::where('id',$id)->first();\n if($get->thumbnail!=null){\n unlink('storage/'.$get->thumbnail);\n }\n \n Destination::where('id',$id)->delete();\n return redirect()->route('listDestination');\n }", "title": "" }, { "docid": "c3420f68b471063a55ff6b63a8e7fce0", "score": "0.56104624", "text": "public function removePurgeable($attribute);", "title": "" }, { "docid": "3c91c642d62c969c158b37413a399fd7", "score": "0.5605259", "text": "public function delete(){\n if($this->id > 0){\n SQL::delete($this::STORAGE, [\"id\" => $this->id]);\n }\n }", "title": "" }, { "docid": "554af8987fffe76970c60a65212b72cf", "score": "0.56006944", "text": "public function destroy($id)\n {\n $art = art::findOrFail($id);\n if($art->image!=null){\n $sliderimage = public_path(\"uploads/{$art->image}\");\n if(File::exists($sliderimage)){\n if(File::exists($sliderimage)){\n unlink($sliderimage);\n }\n }\n }\n $art->delete();\n return redirect()->back();\n }", "title": "" } ]
ff192f4c67c6f29893f9641c665ce158
Runs maintenance tasks which could take a long time. Should only be called from maintenance scripts.
[ { "docid": "5ae593b36f11f06dffc59cf4613a7a10", "score": "0.0", "text": "public function purge() {}", "title": "" } ]
[ { "docid": "d1f5d510423a524594c89d26a1c588fb", "score": "0.8152383", "text": "protected function runMaintenance() {}", "title": "" }, { "docid": "db883b8e5c2b4bd0746ad67513d23375", "score": "0.698246", "text": "function maintenance() ;", "title": "" }, { "docid": "639a53a50c898b63864d119f5ef0f1c8", "score": "0.66316235", "text": "function yourls_check_maintenance_mode() {\n\t$dot_file = YOURLS_ABSPATH . '/.maintenance' ;\n\n if ( !file_exists( $dot_file ) || yourls_is_upgrading() || yourls_is_installing() ) {\n return;\n }\n\n\tglobal $maintenance_start;\n\tyourls_include_file_sandbox( $dot_file );\n\t// If the $maintenance_start timestamp is older than 10 minutes, don't die.\n\tif ( ( time() - $maintenance_start ) >= 600 ) {\n return;\n }\n\n\t// Use any /user/maintenance.php file\n $file = YOURLS_USERDIR . '/maintenance.php';\n if(file_exists($file)) {\n if(yourls_include_file_sandbox( $file ) == true) {\n die();\n }\n }\n\n // Or use the default messages\n $title = yourls__('Service temporarily unavailable');\n $message = yourls__('Our service is currently undergoing scheduled maintenance.') . \"</p>\\n<p>\" .\n yourls__('Things should not last very long, thank you for your patience and please excuse the inconvenience');\n yourls_die( $message, $title, 503 );\n}", "title": "" }, { "docid": "3bce636ebc5f55a48b574dec9d90a186", "score": "0.6625585", "text": "function maintenance() {\n\tif ( !file_exists( asb_path . '.maintenance' ) || defined( 'installing' ) )\n\t\treturn;\n\n\tglobal $upgrading;\n\n\tinclude( asb_path . '.maintenance' );\n\t\n\tif ( ( time() - $upgrading ) >= 600 )\n\t\treturn;\n\n\tif ( file_exists( content_path . '/maintenance.php' ) ) {\n\t\trequire_once( content_path . '/maintenance.php' );\n\t\tdie();\n\t}\n\n\t$protocol = $_SERVER[\"SERVER_PROTOCOL\"];\n\tif ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )\n\t\t$protocol = 'HTTP/1.0';\n\theader( \"$protocol 503 Service Unavailable\", true, 503 );\n\theader( 'Content-Type: text/html; charset=utf-8' );\n\theader( 'Retry-After: 600' );\n?>\n\t<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\t<html xmlns=\"http://www.w3.org/1999/xhtml\">\n\t<head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n <title>Pemeliharaan</title>\n\t</head>\n\t<body>\n\t\t<h1>Dalam masa pemeliharaan tidak dalam kurun waktu yang di tetapkan. Periksa kembali dalam satu menit.</h1>\n\t</body>\n\t</html>\n<?php\n\tdie();\n}", "title": "" }, { "docid": "d675c00a62c68a8420680531c3a8ecc6", "score": "0.6509474", "text": "public function do_cron_job() {\n\t\tglobal $wpdb;\n\n\t\t//Get list of querys\n\t\t$query_list = $this->get_query_list();\n\n\t\t// for each query, get new articles\n\t\tforeach ( $query_list as $query ) {\n\t\t\t$this->maintenance_crawl( $query );\n\t\t}\n\n\t}", "title": "" }, { "docid": "e1d380e3ca814f5612d5c5c07c25c31c", "score": "0.6321666", "text": "function ng_maintenance_mode() {\n\tglobal $pagenow;\n\tif ( $pagenow !== 'wp-login.php' && ! current_user_can( 'manage_options' ) && ! is_admin() ) {\n\t\theader( 'HTTP/1.1 Service Unavailable', true, 503 );\n\t\theader( 'Content-Type: text/html; charset=utf-8' );\n\t\tif ( file_exists( plugin_dir_path( __FILE__ ) . 'views/maintenance.php' ) ) {\n\t\t\trequire_once( plugin_dir_path( __FILE__ ) . 'views/maintenance.php' );\n\t\t}\n\t\tdie();\n\t}\n}", "title": "" }, { "docid": "6194b8f4cc4d401ad2be1955114cdbc0", "score": "0.61581457", "text": "protected function maintenanceCheck()\n {\n if ($this->app['config']->get('general/maintenance_mode', false)) {\n $notice = json_encode([\n 'severity' => 1,\n 'notice' => \"Bolt's <strong>maintenance mode</strong> is enabled. This means that non-authenticated users will not be able to see the website.\",\n 'info' => \"To make the site available to the general public again, set <tt>maintenance_mode: false</tt> in your <tt>config.yml</tt> file.\"\n ]);\n $this->app['logger.flash']->configuration($notice);\n }\n }", "title": "" }, { "docid": "2b2974e78af49885fa3358a352afb6d8", "score": "0.6102687", "text": "public function runDue()\n {\n $backgroundProcessRunner = App::make('Indatus\\Dispatcher\\BackgroundProcessRunner');\n foreach ($this->scheduleService->getDueCommands() as $command) {\n if ($command->isEnabled() && $this->runnableInEnvironment($command)) {\n $backgroundProcessRunner->run($command);\n }\n }\n }", "title": "" }, { "docid": "694b6451b2a337c5c7cff775da52ba82", "score": "0.6076103", "text": "protected function schedulePruning()\n {\n $schedule = $this->app->make(Schedule::class);\n $schedule->call(new PruneStaleWysiwygFiles)->daily();\n }", "title": "" }, { "docid": "14b1ba5eb30cde9ba69ef80939dad28c", "score": "0.6066529", "text": "function wp_maintenance()\n{\n}", "title": "" }, { "docid": "7ea64fc336e6fdc79316f5c25c43e6cf", "score": "0.6043452", "text": "function check_maintenance() {\n if(!$this->ci->data['config']['maintenance'])\n return false;\n redirect('maintenance_' . lang_code . '.html', 'refresh');\n }", "title": "" }, { "docid": "d999ac54681b1454e6ed04c5153c4c1b", "score": "0.60020924", "text": "function schedule_maintenance() {\n $data['title'] \t= 'Admin | Schedule Maintenance';\n $data['main_view'] = '_adm/v_schedule/index';\n $data['ar'] = $this->it->load_schedule();\n $this->load->view('_temp/index', $data);\n\n }", "title": "" }, { "docid": "e36e9e5a8cdf5b40dfb1b493ee3eb48a", "score": "0.59665155", "text": "static function Maintenance(){\n $homeController = new HomeController();\n require_once DIR.'/template/views/maintenance.php';\n }", "title": "" }, { "docid": "4e4e8c5b95c516405ffc3d9c6dd8c9c7", "score": "0.5964393", "text": "function daily_jobs()\n{\n /**\n * Cleaning reservation orphan uploaded files older than 1 hour\n */\n tbkg()->bus->dispatch(new CleanFiles(3600));\n\n /**\n * Removing old reservations from db\n */\n if (tbkg()->settings->reservation_records_lifecycle() > 0) {\n tbkg()->bus->dispatch(new DeletePastReservations(tbkg()->settings->reservation_records_lifecycle()));\n }\n}", "title": "" }, { "docid": "dbdd48ac0f6b1a7eec64a67cf7a2a808", "score": "0.5943375", "text": "protected function executeTasks() {}", "title": "" }, { "docid": "64478635885ed83439fa6c8e1545f354", "score": "0.58440185", "text": "public function disable_maintenance_page() {\n\t\n\t}", "title": "" }, { "docid": "7ae8729f0c985121dcf8c10955822c31", "score": "0.582955", "text": "static function run_critical_tasks() {\r\n\t\tif ( ! defined( 'PSTS_QUOTA_ALLOW_OVERRIDE' ) ) {\r\n\t\t\tadd_filter( 'pre_option_blog_upload_space', array( get_class(), 'filter' ) );\r\n\t\t}\r\n\t\tadd_filter( 'pre_site_option_blog_upload_space', array( get_class(), 'filter' ) );\r\n\t\tadd_filter( 'pre_site_option_upload_space_check_disabled', array(\r\n\t\t\tget_class(),\r\n\t\t\t'force_network_quota_checkbox'\r\n\t\t) );\r\n\t}", "title": "" }, { "docid": "bbd8674d91667f4108c053f43c00b2d8", "score": "0.58092386", "text": "function maintenance()\r\n\t{\r\n\t $this->load->helper('maintenance');\r\n\t //check rights\r\n $userlogin = getUserLogin();\r\n if ( (!$userlogin->hasRights('database_manage'))\r\n ) \r\n {\r\n\t appendErrorMessage(__('Maintain database').': '.__('insufficient rights').'.<br/>');\r\n\t redirect('');\r\n }\r\n\r\n\t $maintenance = $this->uri->segment(3,'');\r\n\r\n $checkresult = \"<table class='message' width='100%'>\";\r\n \r\n\t switch ($maintenance) {\r\n\t case 'all':\r\n\t case 'attachments':\r\n\t $checkresult .= checkAttachments();\r\n\t if ($maintenance != 'all') \r\n\t break;\r\n\t case 'topics':\r\n\t $checkresult .= checkTopics();\r\n\t if ($maintenance != 'all') \r\n\t break;\r\n\t case 'notes':\r\n\t $checkresult .= checkNotes();\r\n\t if ($maintenance != 'all') \r\n\t break;\r\n\t case 'authors':\r\n\t $checkresult .= checkAuthors();\r\n\t if ($maintenance != 'all') \r\n\t break;\r\n\t case 'keywords':\r\n\t $checkresult .= checkKeywords();\r\n\t if ($maintenance != 'all') \r\n\t break;\r\n\t case 'passwords':\r\n\t $checkresult .= checkPasswords();\r\n\t if ($maintenance != 'all') \r\n\t break;\r\n\t case 'cleannames':\r\n\t $checkresult .= checkCleanNames();\r\n\t if ($maintenance != 'all') \r\n\t break;\r\n\t case 'publicationmarks':\r\n\t $checkresult .= checkPublicationMarks();\r\n\t if ($maintenance != 'all') \r\n\t break;\r\n\t case 'checkupdates':\r\n\t $this->load->helper('checkupdates');\r\n $checkresult .= \"<tr><td colspan=2><p class='header1'>\".__(\"Aigaion updates\").\"</p></td></tr>\\n\";\r\n\t $checkresult .= \"<tr><td>\".__(\"Checking for updates\").\"...</td>\";\r\n//\t $updateinfo = '';\r\n\t $updateinfo = checkUpdates();\r\n\t if ($updateinfo == '') {\r\n \t\t $checkresult .= '<td><b>'.__('OK').'</b></td></tr>';\r\n \t\t\t$checkresult .= '<tr><td colspan=2><div class=\"message\">'.__('This installation of Aigaion is up-to-date.').'.</div></td></tr>';\r\n\t } else {\r\n \t\t\t$checkresult .= '<td><span class=\"errortext\">'.utf8_strtoupper('Alert').'</span></td>';\r\n \t\t\t$checkresult .= '</tr>';\r\n \t\t\t$checkresult .= '<tr><td colspan=2>'.$updateinfo.'</td></tr>';\r\n \t }\r\n\t //if ($maintenance != 'all') \r\n\t break;\r\n\t //AND NOW THOSE THAT SHOULD NOT BE INCLUDED IN 'ALL'\r\n\t case 'deletenonpublishingauthors':\r\n\t $checkresult .= deleteNonPublishingAuthors();\r\n break;\r\n\t case 'removeauthorsynonyms':\r\n\t $checkresult .= removeAuthorSynonyms();\r\n break;\r\n case 'deleteunusedkeywords':\r\n $checkresult .= deleteUnusedKeywords();\r\n break;\r\n\t case '':\r\n\t break;\r\n\t default:\r\n \t appendMessage(sprintf(__('Maintenance function \"%s\" not implemented.'),$maintenance).'<br>');\r\n\t break;\r\n\t }\r\n\t \r\n\t $checkresult .= \"</table>\";\r\n //get output\r\n $headerdata = array();\r\n $headerdata['title'] = __('Site maintenance');\r\n $headerdata['javascripts'] = array('tree.js','prototype.js','scriptaculous.js','builder.js','externallinks.js');\r\n \r\n $output = $this->load->view('header', $headerdata, true);\r\n \r\n $output .= $checkresult;\r\n \r\n $output .= $this->load->view('site/maintenance',\r\n array(),\r\n true);\r\n \r\n $output .= $this->load->view('footer','', true);\r\n\r\n //set output\r\n $this->output->set_output($output);\r\n }", "title": "" }, { "docid": "7124c29f9e4e51970cf7b4ce86b988f5", "score": "0.5803709", "text": "public static function setup_tasks_remaining()\n {\n }", "title": "" }, { "docid": "4f776ed384d21a9ce2b39753620324eb", "score": "0.58032846", "text": "public function enable_maintenance_page() {\n\t\n\t}", "title": "" }, { "docid": "f5063a0ca13becdeb268002dd8f9f913", "score": "0.578527", "text": "protected function displayMaintenancePage()\n\t{\n\t\tif (!in_array(Tools::getRemoteAddr(), explode(',', Configuration::get('PS_MAINTENANCE_IP'))))\n\t\t{\n\t\t\theader('HTTP/1.1 503 temporarily overloaded');\n\t\t\tself::$smarty->display(_PS_THEME_DIR_.'maintenance.tpl');\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "9d804df6aa0a21672c0e39863813fd7d", "score": "0.57818085", "text": "function aiowps_hourly_cron_event_handler()\r\n {\r\n do_action('aiowps_perform_scheduled_backup_tasks');\r\n do_action('aiowps_perform_fcd_scan_tasks');\r\n do_action('aiowps_perform_db_cleanup_tasks');\r\n }", "title": "" }, { "docid": "5f30d7399e7b7acfa2ca2e3c63f4784b", "score": "0.576752", "text": "protected function displayMaintenancePage() {\n\n if ($this->maintenance == true || !(int) Configuration::get('EPH_SHOP_ENABLE')) {\n $this->maintenance = true;\n\t\t\t$allowed = false;\n\t\t\tif(!empty(Configuration::get('EPH_MAINTENANCE_IP'))) {\n\t\t\t\t$allowed = in_array(Tools::getRemoteAddr(), explode(',', Configuration::get('EPH_MAINTENANCE_IP')));\n\t\t\t}\n\n if (!$allowed) {\n header('HTTP/1.1 503 temporarily overloaded');\n\n $this->context->smarty->assign($this->initLogoAndFavicon());\n $this->context->smarty->assign(\n [\n 'HOOK_HEADER' => Hook::exec('displayHeader'),\n 'HOOK_MAINTENANCE' => Hook::exec('displayMaintenance', []),\n 'maintenance_text' => Configuration::get('EPH_MAINTENANCE_TEXT', (int) $this->context->language->id),\n ]\n );\n\n // If the controller is a module, then getTemplatePath will try to find the template in the modules, so we need to instanciate a real frontcontroller\n $frontController = preg_match('/ModuleFrontController$/', get_class($this)) ? new FrontController() : $this;\n $this->smartyOutputContent($frontController->getTemplatePath($this->getThemeDir() . 'maintenance.tpl'));\n exit;\n }\n\n }\n\n }", "title": "" }, { "docid": "de5ddf73b1425927fdfc883e845d537d", "score": "0.5758384", "text": "public function setMaintenance() {\n $data = array('maintenance_active' => 1);\n $this->db->set('timestamp_update', $this->Csz_model->timeNow(), TRUE);\n $this->db->where(\"settings_id\", 1);\n $this->db->update('settings', $data);\n $this->db->cache_delete_all();\n $this->Csz_model->clear_file_cache('config');\n $this->Csz_model->clear_file_cache('topmenu_*', TRUE);\n }", "title": "" }, { "docid": "449a67c852132ee8e048fae85f035903", "score": "0.5742557", "text": "public function actionRun()\n {\n // run the tasks again for stuck tasks\n $tasks = craft()->tasks->getAllTasks();\n foreach ($tasks as $task) {\n craft()->tasks->rerunTaskById($task->id);\n }\n\n // download tweets into tasks\n if (craft()->twitterCraft_tweet->checkTmhOAuthConnection()) {\n craft()->twitterCraft_tweet->getTweets();\n }\n }", "title": "" }, { "docid": "5fd50729be55df0944004e8f830649d9", "score": "0.57379663", "text": "public function maintenance()\n {\n $this->load->library('form_validation');\n $this->load->model('admin_model');\n\n $data['config'] = $this->bw_config->status();\n\n // Check if form was submitted.\n if ($this->input->post('set_maintenance_mode') == 'Update') {\n if ($this->form_validation->run('admin_maintenance_mode') == TRUE) {\n // Load the submitted value\n $maintenance_mode = ($this->input->post('maintenance_mode') == '0') ? FALSE : TRUE;\n\n // If different to the stored value, change the site mode.\n if ($data['config']['maintenance_mode'] !== $maintenance_mode) {\n $result = ($maintenance_mode == FALSE) ? $this->admin_model->set_mode('online') : $this->admin_model->set_mode('maintenance');\n if ($result == TRUE)\n redirect('admin/maintenance');\n }\n }\n }\n\n $data['title'] = 'Maintenance Settings';\n $data['page'] = 'admin/maintenance';\n $this->_render($data['page'], $data);\n }", "title": "" }, { "docid": "bb47ad088572a0f307042ebfea764d63", "score": "0.5729622", "text": "public function runTasks()\n {\n $this->debug(\"Starting node execution\");\n $this->gearmanServer->runTasks();\n }", "title": "" }, { "docid": "751e2b29e7875b0a9d85802b8f523892", "score": "0.57164645", "text": "public function actionSiteMaintenance(){\n return $this->render('site-maintenance');\n }", "title": "" }, { "docid": "257ff26376790a84136af5d17bcee08e", "score": "0.571483", "text": "private function _after_command_run(){\n //** Run transient flushing */\n WP_CLI::line( \"Starting remove transient. Waiting...\" );\n @ob_flush();\n flush();\n $command = !empty( $this->url ) ? \"wp transient delete-all --url={$this->url}\" : \"wp transient delete-all\";\n $r = SM_CLI::launch( $command, false, true );\n if( $r->return_code ) {\n WP_CLI::error( \"Something went wrong. Transient process failed.\" );\n } else {\n WP_CLI::success( \"Transient is removed\" );\n }\n //** Run MySQL optimization */\n WP_CLI::line( \"Starting Database optimization process. Waiting...\" );\n @ob_flush();\n flush();\n $command = !empty( $this->url ) ? \"wp db optimize --url={$this->url}\" : \"wp db optimize\";\n $r = SM_CLI::launch( $command, false, true );\n if( $r->return_code ) {\n WP_CLI::error( \"Something went wrong. Database optimization process failed.\" );\n } else {\n WP_CLI::success( \"Database is optimized\" );\n }\n }", "title": "" }, { "docid": "f1413e63e7766fe880834fea8014795c", "score": "0.56919956", "text": "function check_maintenance($st){\n\t\t// && $_SERVER['REMOTE_ADDR'] != '117.206.94.125'\n\t\tif($st == '1'){\n\t\t\techo \"<span style='font-size:18px;font-family:arial;text-align:'>Website is under scheduled maintenance.. will be back in few minutes...</span>\";\n\t\t\tdie;\n\t\t}\n\t}", "title": "" }, { "docid": "4b8fc91b416ef48da8d72bb7bbefe331", "score": "0.5688571", "text": "public function maintenanceAction(){\n\t\t$sessions = $this->registry->db->select('s.*, u.identifiant')->from('sessions s')->left_join('user u', 's.user_id = u.id')->where(array('last_update >' => time() - 300))->get();\n\n\t\t$this->registry->smarty->assign('sessions', $sessions);\n\n\t\treturn $this->registry->smarty->fetch(VIEW_PATH . 'adm' . DS . 'maintenance.shark');\n\t}", "title": "" }, { "docid": "edd9895f4f60183f1ac63b1175f41438", "score": "0.5665113", "text": "function kmz_maintenance_mode() {\r\n\tglobal $pagenow;\r\n\tif ( $pagenow !== 'wp-login.php' && ! current_user_can( 'manage_options' ) && ! is_admin() ) {\r\n\t\theader( 'HTTP/1.1 Service Unavailable', true, 503 );\r\n\t\theader( 'Content-Type: text/html; charset=utf-8' );\r\n\t\trequire_once plugin_dir_path( __FILE__ ) . 'views/maintenance-page.php';\r\n\t\tdie();\r\n\t}\r\n}", "title": "" }, { "docid": "2d9f419c57788fb083ebd6eec2f963b9", "score": "0.56340784", "text": "function inMaintenance() {\n\t\tglobal $system;\n\t\t$maintenance = $system[\"config\"][\"system\"][\"parameters\"][\"underMaintenance\"][\"value\"];\n\n\t\tif ($maintenance != \"YES\")\n\t\t\treturn false;\n\n\t\t$noCheckMaintenance = array();\n\t\t$noCheckMaintenance[] = \"commonMaintenance\";\n\t\t$noCheckMaintenance[] = \"usersLoginMaintenance\";\n\t\t$noCheckMaintenance[] = \"usersDoLogin\";\n\t\t$noCheckMaintenance[] = \"usersDoLogout\";\n\n\t\t$isNoCheckMaintenanceAction = array_search($_REQUEST[\"do\"],$noCheckMaintenance);\n\n\t\t//si es un action que no requiere chequeo de mantenimiento, devolver false\n\t\tif ($isNoCheckMaintenanceAction !== false)\n\t\t\treturn false;\n\n\t\t$user = $_SESSION[\"loginUser\"];\n\n\t\tif (!empty($user)) {\n\t\t\t$level = $user->getLevel();\n\t\t\t//si el usuario logueado tiene un nivel menor a 3 (supervisor y admin), devolver false\n\t\t\tif ($level < 3)\n\t\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "affb4d080041778262c4f4b90bafb63a", "score": "0.56306976", "text": "public function reverseMaintenanceMonitor()\n {\n $job = new MonitorJob($this->project->getName() . ' maintenance mode');\n $lock = $this->util->getMaintenanceLock();\n\n if ($lock->isLocked()) {\n $job->stop();\n $lock->unlock();\n return false;\n }\n\n $lock->lock();\n\n $roles = $this->util->getDbLookup()->getRolesByPrivilege('pr.maintenance.maintenance-mode');\n if ($roles) {\n $where = 'gsf_id_primary_group IN (SELECT ggp_id_group FROM gems__groups WHERE ggp_role IN (' .\n implode(', ', array_map(array($this->db, 'quote'), array_keys($roles))) .\n '))';\n } else {\n $where = null;\n }\n $to = $this->_getMailTo('maintenancemode', $where);\n\n if (! $to) {\n return true;\n }\n\n switch ($this->project->getLocaleDefault()) {\n case 'nl':\n $initSubject = \"{name} is aangezet\";\n $initBbText = \"L.S.,\n\nDe [b]{name}[/b] is op {setTime} aangezet.\n\nZolang dit aan blijft staan kan u regelmatig waarschuwingen krijgen.\n\nDit is een automatisch bericht.\";\n\n $subject = \"{name} staat al meer dan {periodHours} uur aan\";\n $messageBbText = \"L.S.,\n\nDe [b]{name}[/b] is op {setTime} aangezet en staat nog steeds aan.\n\nDit is waarschuwing nummer [b]{mailCount}[/b]. Controleer s.v.p. of de onderhouds modus nog steeds nodig is.\n\nDit is een automatische waarschuwing.\";\n break;\n\n default:\n $initSubject = \"{name} has been turned on\";\n $initBbText = \"L.S.,\n\nThe [b]{name}[/b] was activated at {setTime}.\n\nAs long as maintenance mode is active the system may send you warning messages.\n\nThis messages was send automatically.\";\n\n $subject = \"{name} has been active for over {periodHours} hours\";\n $messageBbText = \"L.S.,\n\nThe [b]{name}[/b] was activated at {setTime} and is still active.\n\nThis is notice number {mailCount}. Please check whether the maintenance mode is still required.\n\nThis messages was send automatically.\";\n break;\n\n }\n\n $job->setFrom($this->project->getMonitorFrom('maintenancemode'))\n ->setMessage($messageBbText)\n ->setPeriod($this->project->getMonitorPeriod('maintenancemode'))\n ->setSubject($subject)\n ->setTo($to);\n\n if ($job->start()) {\n $job->sendOtherMail($initSubject, $initBbText);\n }\n\n return true;\n }", "title": "" }, { "docid": "de2071af7d3564eb11b7e102a10be073", "score": "0.5622622", "text": "function lim_process_maintenance_page(&$vars) {}", "title": "" }, { "docid": "4f8229527f3dee7d57dafe21adbe432b", "score": "0.5612519", "text": "function run_tool()\r\n\t{\r\n\t\tif (!function_exists('cache_moderators'))\r\n\t\t{\r\n\t\t\tglobal $phpbb_root_path, $phpEx;\r\n\r\n\t\t\tinclude(\"{$phpbb_root_path}includes/functions_admin.$phpEx\");\r\n\t\t}\r\n\r\n\t\tcache_moderators();\r\n\r\n\t\ttrigger_error(user_lang('RECACHE_MODERATORS_COMPLETE'));\r\n\t}", "title": "" }, { "docid": "08ece99b90cd9c996f9002653fedf95d", "score": "0.5608685", "text": "protected function maintenance_mode() {\n\t\treturn file_exists(ABSPATH . '.maintenance') || defined('WP_INSTALLING');\n\t}", "title": "" }, { "docid": "50622a375f32d8cd364cd75477d39cc3", "score": "0.5607532", "text": "public function isDownForMaintenance();", "title": "" }, { "docid": "d0f2566e2c674718849f5cb6a6792134", "score": "0.5602415", "text": "public function main() {\n $lastmtime = null;\n $this->log(\"Refreshing every \" . $this->refresh/1000000 . \" seconds.\\n\", Project::MSG_INFO);\n while(1) {\n $mtimes = $this->rlist();\n if(count($mtimes) > 0 && max($mtimes) > $lastmtime) {\n passthru($this->cmd);\n $lastmtime = max($mtimes); \n $this->log(date(DATE_RFC822) . \" waiting...\", Project::MSG_INFO);\n }\n usleep($this->refresh);\n }\n }", "title": "" }, { "docid": "d50a8e9d08516bd113d38a5c418dcd44", "score": "0.5582087", "text": "public function run()\n\t{\n\t\tif (!function_exists('auto_prune'))\n\t\t{\n\t\t\tinclude($this->phpbb_root_path . 'includes/functions_admin.' . $this->php_ext);\n\t\t}\n\n\t\t$sql = 'SELECT forum_id, prune_next, enable_prune, prune_days, prune_viewed, forum_flags, prune_freq\n\t\t\tFROM ' . FORUMS_TABLE . \"\n\t\t\tWHERE enable_prune = 1\n\t\t\t\tAND prune_next < \" . time();\n\t\t$result = $this->db->sql_query($sql);\n\t\twhile ($row = $this->db->sql_fetchrow($result))\n\t\t{\n\t\t\tif ($row['prune_days'])\n\t\t\t{\n\t\t\t\tauto_prune($row['forum_id'], 'posted', $row['forum_flags'], $row['prune_days'], $row['prune_freq']);\n\t\t\t}\n\n\t\t\tif ($row['prune_viewed'])\n\t\t\t{\n\t\t\t\tauto_prune($row['forum_id'], 'viewed', $row['forum_flags'], $row['prune_viewed'], $row['prune_freq']);\n\t\t\t}\n\t\t}\n\t\t$this->db->sql_freeresult($result);\n\t}", "title": "" }, { "docid": "e64b0e81fdbe68262a9664b5e494c1b2", "score": "0.5571383", "text": "public function run()\n\t{\n\t\tglobal $modSettings, $db_prefix;\n\n\t\t// we're working with them databases but we shouldn't :P\n\t\t$db = database();\n\t\t$db_table = db_table();\n\n\t\t// By default do it now!\n\t\t$delay = false;\n\n\t\t// As a kind of hack, if the server load is too great delay, but only by a bit!\n\t\tif (!empty($modSettings['load_average']) && !empty($modSettings['loadavg_auto_opt']) && $modSettings['load_average'] >= $modSettings['loadavg_auto_opt'])\n\t\t{\n\t\t\t$delay = true;\n\t\t}\n\n\t\t// Otherwise are we restricting the number of people online for this?\n\t\tif (!empty($modSettings['autoOptMaxOnline']))\n\t\t{\n\t\t\t$request = $db->query('', '\n\t\t\t\tSELECT COUNT(*)\n\t\t\t\tFROM {db_prefix}log_online',\n\t\t\t\tarray()\n\t\t\t);\n\t\t\tlist ($dont_do_it) = $request->fetch_row();\n\t\t\t$request->free_result();\n\n\t\t\tif ($dont_do_it > $modSettings['autoOptMaxOnline'])\n\t\t\t{\n\t\t\t\t$delay = true;\n\t\t\t}\n\t\t}\n\n\t\t// If we are gonna delay, do so now!\n\t\tif ($delay)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get all the tables.\n\t\t$tables = $db->list_tables(false, $db_prefix . '%');\n\n\t\tforeach ($tables as $table)\n\t\t{\n\t\t\t$db_table->optimize($table);\n\t\t}\n\n\t\t// Return for the log...\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7ed4a2bd59d2a300a1b58409f0d162be", "score": "0.5559286", "text": "public function run()\n {\n //\n //update all workflow\n DB::statement(\"update tender_workflows set workflow_status='po-creation', page='po-creation' where page='create-po';\");\n\n //update permissions\n DB::statement(\"update permissions set name = 'tender_po_creation_create' WHERE NAME='tender_create_po_create';\");\n DB::statement(\"update permissions set name = 'tender_po_creation_read' WHERE NAME='tender_create_po_read';\");\n DB::statement(\"update permissions set name = 'tender_po_creation_update' WHERE NAME='tender_create_po_update';\");\n DB::statement(\"update permissions set name = 'tender_po_creation_delete' WHERE NAME='tender_create_po_delete';\");\n\n //refresh permission\n $this->command->comment('Flushing permissions');\n \\Illuminate\\Support\\Facades\\Artisan::call('permission:cache-reset');\n }", "title": "" }, { "docid": "4bcdc0aa562882db28ba72c3b0727f91", "score": "0.5552876", "text": "public function runScheduledTasks()\n {\n Piwik::checkUserHasSuperUserAccess();\n return TaskScheduler::runTasks();\n }", "title": "" }, { "docid": "bf915e29a82540ef500be811f38d7414", "score": "0.5548182", "text": "public function maintenance_data()\n {\n // Put the state into $data and run check_status() function\n $data = carbon_get_theme_option('crb_maintenance');\n $this->check_status($data);\n\n // Insert Data into property $status\n $this->status = carbon_get_theme_option('crb_maintenance');\n\n }", "title": "" }, { "docid": "64cd0d2fdb3bd07e9edad77d5985e0a5", "score": "0.55443615", "text": "protected function displayMaintenancePage()\n {\n }", "title": "" }, { "docid": "dcb4935099d77d54bb2d211dbe815ee1", "score": "0.5543402", "text": "function _runCron()\n\t{\n\t if(!defined('IN_CRON'))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t \n\t\t$load = $this->CI->functions->getServerLoad(0);\n\t\tif($load > 100)\n\t\t{\n\t\t $load = 100;\n\t\t}\n\n\t\t$free_space = disk_free_space(dirname('filestore/'));\n\t\t$total_space = disk_total_space(dirname('filestore/'));\n\t\t\n\t\t$data = array(\n\t\t\t'free_space' => $free_space,\n\t\t\t'total_space' => $total_space,\n\t\t\t'used_space' => ($total_space - $free_space),\n\t\t\t'num_files' => $this->CI->db->get_where('files', array('server' => base_url()))->num_rows()\n\t\t);\n\t\t\n\t\t$this->CI->db->where('url', base_url());\n\t\t$this->CI->db->update('servers', $data);\n\t}", "title": "" }, { "docid": "6a943019e0e2f4c00c66675e15489916", "score": "0.5531298", "text": "public function run()\n {\n DB::table(\"Maintenance\")->insert([\n 'name'=>\"Cleaning Team 1\",\n 'time_clean_per_guest'=>30,\n 'time_clean_per_room'=>60,\n 'max_hours_day'=>8,\n 'created_at'=>time(),\n 'updated_at'=>time()\n ]);\n }", "title": "" }, { "docid": "356405cc60d38aa6f11cf076474783a2", "score": "0.5521133", "text": "function admin_maintenance() {\n\n\t\t$this->Module->recursive = 0;\n\n\t\t/**\n\t\t * Put all options in \"options\".\n\t\t * $options will be available in the view.\n\t\t */\n\t\t$this->set('options', $this->paginate());\n\t}", "title": "" }, { "docid": "0b9bd2de88db63fc04c254d3db9d73be", "score": "0.54939973", "text": "public function run() {\n $nids_to_process = $this->retrieveNodesToUpdate();\n $nids_to_process_count = count($nids_to_process);\n $query_limit = 25;\n $nids_modified_count = 0;\n\n $this->logMessage('Found %total_nodes nodes to process.', ['%total_nodes' => $nids_to_process_count]);\n\n while (count($nids_to_process)) {\n $this->logMessage('%remaining_count nodes left to process.', ['%remaining_count' => count($nids_to_process)]);\n // Load entities.\n $modified_nids = [];\n $node_ids = array_slice($nids_to_process, 0, $query_limit, TRUE);\n $nodes = $this->nodeStorage->loadMultiple($node_ids);\n /** @var \\Drupal\\node\\NodeInterface[] $nodes */\n foreach ($nodes as $node) {\n // Save some time by only saving nodes that need adjustments.\n // Skip nodes with pending revisions. Lock the node or else pass over.\n if (\n (\n preg_match('/\\s+$/', $node->getTitle())\n ||\n preg_match('/^\\s+/', $node->getTitle())\n )\n &&\n !$this->moderationInformation->hasPendingRevision($node)\n &&\n $this->lockNode($node->id())\n ) {\n // Make this change a new revision.\n $node->setNewRevision(TRUE);\n\n // Set revision author to uid 1317 (CMS Migrator user).\n $node->setRevisionUserId(static::CMS_MIGRATOR_ID);\n $node->setChangedTime(time());\n $node->setRevisionCreationTime(time());\n $title_field_label = $node->getFieldDefinition('title')->getLabel();\n $new_title = preg_replace('/^\\s+/', '', $node->getTitle());\n $new_title = preg_replace('/\\s+$/', '', $new_title);\n $substitutions = [\n '%title_field_label' => $title_field_label,\n '%original_title' => $node->getTitle(),\n '%new_title' => $new_title,\n ];\n $revision_message_template = 'The %title_field_label field was updated from \"%original_title\" to \"%new_title\" to remove extra spaces. No other changes were made and this change does not affect how the title appears to veterans.';\n $revision_message = strtr($revision_message_template, $substitutions);\n // Set revision log message.\n $node->setRevisionLogMessage($revision_message);\n $node->save();\n $this->unlockNode($node->id());\n $modified_nids[] = $node->id();\n $nids_modified_count += 1;\n }\n unset($nids_to_process[\"node_{$node->id()}\"]);\n }\n\n // Log the processed nodes.\n if (count($modified_nids)) {\n $this->logMessage('Nodes updated this pass: %nids', [\n '%nids' => implode(', ', $modified_nids),\n ]);\n }\n\n }\n $this->logMessage('Checked %count nodes and corrected title issues on %total nodes.', [\n '%count' => $nids_to_process_count,\n '%total' => $nids_modified_count,\n ]);\n\n }", "title": "" }, { "docid": "52cfb68ecaf533e901f9492d8e084770", "score": "0.5492719", "text": "public function triggerNightlies()\n {\n $count = 0;\n //nightlies for circle\n if ($this->config->projectsToNotify()) {\n //we do a nightly for file path in the given build machine path that has an info.json file where github is true\n //and nightly is true.\n foreach ($this->config->projectsToNotify() as $project) {\n $this->triggerNightlyCircle($project, 'master');\n $this->triggerNightlyCircle($project, $this->latest_release_core);\n $count++;\n if ($count%3 === 0) {\n $count = 0;\n sleep(10);\n }\n }\n }\n\n $count = 0;\n //nightlies for travis\n if ($this->config->projectsToNotifyTravis()) {\n $custom_config = $this->config->customTravisConfigPhpunitTests();\n foreach ($this->config->projectsToNotifyTravis() as $travis_project) {\n $this->triggerNightlyTravis($travis_project, 'master');\n //only trigger nightly on release branch if this isn't a core branch\n if (! (\n isset(\n $custom_config[$travis_project],\n $custom_config[$travis_project]['is_core']\n )\n && $custom_config[$travis_project]['is_core']\n )) {\n $this->triggerNightlyTravis($travis_project, $this->latest_release_core);\n }\n $count++;\n if ($count%3 === 0) {\n $count = 0;\n sleep(15);\n }\n }\n }\n\n //nightly acceptance tests\n if ($this->config->acceptanceTestsRepository()) {\n //first trigger core only acceptance tests\n //$this->triggerNightlyAcceptanceTests('core', 'master');\n $count = 0;\n if ($this->config->acceptanceTestsProjects()) {\n foreach ($this->config->acceptanceTestsProjects() as $acceptance_project) {\n $this->triggerNightlyAcceptanceTests($acceptance_project, 'master');\n $this->triggerNightlyAcceptanceTests($acceptance_project, $this->latest_release_core);\n $count++;\n if ($count%3 === 0) {\n $count = 0;\n sleep(10);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "487d40697e4ed45fe9c282e85fddf753", "score": "0.5482507", "text": "public function isDownForMaintenance()\n {\n // TODO: Implement isDownForMaintenance() method.\n }", "title": "" }, { "docid": "9f5b1a88c81a9899727f4c4bf45b9c91", "score": "0.54822606", "text": "public function performRebooting( ){\n\n //to be safe, we could send reboot command twice\n $this->setForReboot = array_unique( $this->setForReboot );\n\n self::_prettyEcho( \"****** Found \" . count( $this->setForReboot ) . \" to be rebooted ******\" );\n\n foreach ( $this->setForReboot as $ip_to_reboot ) {\n\n $ret = $this->_rebootHost( $ip_to_reboot );\n\n $message = implode( \"\\n\", $ret[ 1 ] );\n\n if ( $ret[ 0 ] == 0 ) {\n $status = \"OK\";\n } else {\n $status = \"KO\";\n }\n\n Utils::sendErrMailReport( \"CONVERTER VM $ip_to_reboot locked.\\n\\n Trying to restart $status: $message\" );\n self::_prettyEcho( \"> \" . $ip_to_reboot . \" down, executed the following:\", 4 );\n foreach ( $ret[ 1 ] as $message ) {\n $chunk = explode( \"\\n\", $message );\n foreach ( $chunk as $msg ) {\n self::_prettyEcho( \"> $msg\", 4 );\n }\n }\n\n }\n\n }", "title": "" }, { "docid": "50da272c400dadeb1c054d95e9cd1369", "score": "0.5480053", "text": "function run_task()\n\t{\n\t\t//-----------------------------------------\n\t\t// Send daily digests...\n\t\t//-----------------------------------------\n\t\t\n\t\trequire ( $this->root_path.'sources/lib/func_digest.php' );\n\t\t$digest = new func_digest();\n\t\t$digest->ipsclass =& $this->ipsclass;\n\t\t$digest->func_digest_init( $this->root_path );\n\t\t\t\n\t\t$digest->digest_time = 'daily';\n\t\t$digest->digest_type = 'topic';\n\t\t$digest->run_digest();\n\t\t\n\t\t$digest->digest_time = 'daily';\n\t\t$digest->digest_type = 'forum';\n\t\t$digest->run_digest();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Log to log table - modify but dont delete\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->class->append_task_log( $this->task, 'Ежедневная рассылка тем и обзора форума' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Unlock Task: DO NOT MODIFY!\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->class->unlock_task( $this->task );\n\t}", "title": "" }, { "docid": "fdbd7a87512c3a3533e84c42ca577ee4", "score": "0.5472459", "text": "protected function displayMaintenancePage()\n {\n if ($this->maintenance == true || !(int)Configuration::get('PS_SHOP_ENABLE')) {\n $this->maintenance = true;\n if (!in_array(Tools::getRemoteAddr(), explode(',', Configuration::get('PS_MAINTENANCE_IP')))) {\n header('HTTP/1.1 503 temporarily overloaded');\n\n $this->context->smarty->assign($this->initLogoAndFavicon());\n $this->context->smarty->assign(array(\n 'HOOK_MAINTENANCE' => Hook::exec('displayMaintenance', array()),\n ));\n $this->context->smarty->assign(\n array(\n 'dir' => \"\".Tools::getHttpHost(true).__PS_BASE_URI__.\"modules/landingpage/\",\n 'img' => Configuration::get(\"lp_imagen\")\n )\n\n );\n $this->smartyOutputContent(_PS_MODULE_DIR_ . 'landingpage/views/templates/front/landingpage.tpl');\n exit;\n }\n }\n }", "title": "" }, { "docid": "a3f8d27d394ae4cb222854ef14498136", "score": "0.5467042", "text": "function blink_force_update_now() {\n \n // update goals and links whenever the admin screen is viewed -- for development\n //blink_update_all_servers();\n //drupal_goto('admin/settings/blink/settings'); \n}", "title": "" }, { "docid": "a295dcf033623ed147d54acf24aeea2f", "score": "0.5459582", "text": "public function update_tasks(): void\n {\n if ($this->cook) {\n $task = new Task();\n $task->update_status($this->request->getBody());\n\n header('Location: ' . '/TaskManager/');\n } else {\n echo 'This user does not have the necessary privileges';\n die();\n }\n }", "title": "" }, { "docid": "d9f7badd690668e9de773cb1787ea188", "score": "0.5435745", "text": "public function testActionNightlyEnds()\n {\n $this->_cron->actionNightly();\n }", "title": "" }, { "docid": "649d99131267565f69df34e52b8e6f7a", "score": "0.54205245", "text": "public function actionMaintenance()\n {\n $config = EssencesConfigDb::getInstance();\n\n if ($config->load(Yii::$app->request->post()) && $config->validate()) {\n if ($config->save()) {\n return $this->render('@yicms-essences/Views/developer/maintenance', [\n 'config' => $config,\n 'success' => true,\n ]);\n }\n\n throw new EssencesException('Can`t save data in database');\n }\n\n return $this->render('@yicms-essences/Views/developer/maintenance', [\n 'config' => $config\n ]);\n }", "title": "" }, { "docid": "382b7f6d3bcc9c3aae20807ad097c5ce", "score": "0.5419288", "text": "public function scheduleDowntimeAction()\n {\n $this->assertPermission('monitoring/command/downtime/schedule');\n\n $form = new ScheduleHostDowntimeCommandForm();\n $form->setTitle($this->translate('Schedule Host Downtime'));\n $this->handleCommandForm($form);\n }", "title": "" }, { "docid": "fe46a86b7c1e933f9904df7b03364cec", "score": "0.5417065", "text": "static public function run()\n {\n $queueItems = Mage::getResourceModel('sveacheckout/queue_collection');\n\n foreach ($queueItems as $item) {\n $itemDate = strtotime($item->getData('STAMP_CR_DATE'));\n $deleteNewLimit = strtotime('+2 days', $itemDate);\n $deleteOldLimit = strtotime('+1 month', $itemDate);\n\n if ($deleteNewLimit <= time()) {\n self::deleteNewAndFinished($item);\n }\n\n if ($deleteOldLimit <= time()) {\n self::deleteOldAndErrors($item);\n }\n }\n }", "title": "" }, { "docid": "1e928121dfa50864aaf68b23583b1e0c", "score": "0.5391008", "text": "public function execute()\n {\n // create auto update update task (composer update)\n if (!empty($this->task->config['auto_update']) && is_numeric($this->task->config['auto_update'])) {\n if ($this->count('tasks', 'name = \"tasks.auto_update\"') == 0) {\n $this->tasks = new \\Plinker\\Tasks\\Tasks($this->task->config);\n // add\n $task['tasks.auto_update'] = $this->tasks->create(\n // name\n 'tasks.auto_update',\n // source\n \"#!/bin/bash\\ncomposer update plinker/tasks\",\n // type\n 'bash',\n // description\n 'Tasks module auto update',\n // default params\n []\n );\n // run task\n $this->tasks->run('tasks.auto_update', [], $this->task->config['auto_update']);\n }\n }\n\n // find tasks\n $tasks = $this->find('tasks', ' (completed IS NULL OR completed = \"\" OR completed = 0) ORDER BY id ASC ');\n\n try {\n if (!empty($this->task->config['debug'])) {\n $this->task->console->out(\n '<light_blue><bold><underline>Tasks:</underline></bold></light_blue>'\n );\n }\n\n foreach ($tasks as $task) {\n \n //\n if (!empty($task->run_last) && !empty($task->repeats)) {\n if ((strtotime($task->run_last)+$task->sleep) > strtotime(date_create()->format('Y-m-d H:i:s'))) {\n if (!empty($this->task->config['debug'])) {\n $this->task->console->out(\n '<light_red>Waiting ('.(strtotime($task->run_next)-strtotime(date_create()->format('Y-m-d H:i:s'))).'): '.$task->name/*.' - '.$task->params*/.'</light_red>'\n );\n }\n continue;\n }\n }\n\n //\n if (!empty($this->task->config['debug'])) {\n $this->task->console->out(\n '<light_green><bold>Running : '.$task->name.'</bold></light_green>'\n );\n }\n\n // check has got source\n if (!empty($task->tasksource_id)) {\n\n //\n $params = json_decode($task->params, true);\n\n // set $PATH\n putenv('PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin');\n \n try {\n // run task\n if ($task->tasksource->type == 'php') {\n ob_start();\n $source = $task->tasksource->source;\n eval('?>'.$source);\n $task->result = ob_get_clean();\n } elseif ($task->tasksource->type == 'bash') {\n $filename = (!empty($this->task->config['tmp_path']) ? $this->task->config['tmp_path'] : './.plinker').'/bash/'.md5($task->tasksource->name).'.sh';\n file_put_contents($filename, $task->tasksource->source);\n ob_start();\n echo shell_exec('/bin/bash '.$filename);\n $task->result = ob_get_clean();\n }\n \n // set status\n if (empty($task->repeats)) {\n $task->completed = date_create()->format('Y-m-d H:i:s');\n $task->run_last = date_create()->format('Y-m-d H:i:s');\n } else {\n $task->run_last = date_create()->format('Y-m-d H:i:s');\n $task->run_next = date_create()->modify(\"+\".$task->sleep.\" seconds\")->format('Y-m-d H:i:s');\n }\n \n $task->run_count = (empty($task->run_count) ? 1 : (int) $task->run_count + 1);\n \n $task->status = 'success';\n\n $this->store($task);\n } catch (\\ParseError $e) {\n // set status\n if (empty($task->repeats)) {\n $task->completed = date_create()->format('Y-m-d H:i:s');\n $task->run_last = date_create()->format('Y-m-d H:i:s');\n } else {\n $task->run_last = date_create()->format('Y-m-d H:i:s');\n $task->run_next = date_create()->modify(\"+\".$task->sleep.\" seconds\")->format('Y-m-d H:i:s');\n }\n \n $task->status = 'error';\n \n $task->run_count = (empty($task->run_count) ? 1 : (int) $task->run_count + 1);\n \n $task->result = \"Code Error:\\n-----------\\n\".$e.\"\\n\";\n $this->store($task);\n }\n } else {\n $this->trash($task);\n if (!empty($this->task->config['debug'])) {\n $this->task->console->out(\n '<light_blue><bold>Task has no source.</bold></light_blue>'\n );\n }\n }\n }\n } catch (\\Exception $e) {\n // ...\n }\n }", "title": "" }, { "docid": "c2221b64311d04d391ae02393fee39ab", "score": "0.5385629", "text": "public function maintenanceCheck()\n\t{\n\t\t$this->import('BackendUser', 'User');\n\n\t\tif (!$this->User->hasAccess('maintenance', 'modules'))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tif (\\System::getContainer()->get('lexik_maintenance.driver.factory')->getDriver()->isExists())\n\t\t\t{\n\t\t\t\treturn '<p class=\"tl_error\">' . $GLOBALS['TL_LANG']['MSC']['maintenanceEnabled'] . '</p>';\n\t\t\t}\n\t\t}\n\t\tcatch (\\Exception $e)\n\t\t{\n\t\t\t// ignore\n\t\t}\n\n\t\treturn '';\n\t}", "title": "" }, { "docid": "f656fa85ec9774cd7b963c6199932d07", "score": "0.53784585", "text": "public function execute()\n {\n global $injector;\n\n /* Clean out static cache files. Any user has a 0.1% chance of\n * triggering weekly (these static files are shared amongst all\n * users). */\n if (substr(time(), -3) === '000') {\n /* CSS files. */\n $injector->getInstance('Horde_Core_CssCache')->gc();\n\n /* Javascript files. */\n $injector->getInstance('Horde_Core_JavascriptCache')->gc();\n }\n\n /* GC on identity prefs. */\n $injector->getInstance('Horde_Core_Factory_Identity')->create()->prefsGc();\n }", "title": "" }, { "docid": "bc89bf12efcff88f31d33e83ddc117ea", "score": "0.53675956", "text": "public function runMigrations() {\n // load current mirations status\n require_once(CONFIG_DIR . '/migration.php');\n \n db::startTransaction();\n db::lock_transaction('migrations');\n \n // load database version for all migrations\n $oDatabaseVersion = $this->Get();\n if (!count($oDatabaseVersion)) {\n $this->deployMigrations('migrations', '000');\n $oDatabaseVersion = $this->Get();\n }\n\n // create array with migration names from database\n $aDatabaseMigrationNames = array();\n foreach ($oDatabaseVersion as $oMigration) {\n $aDatabaseMigrationNames[] = $oMigration->getName();\n }\n \n // check if there are any new migration groups\n foreach ($aMigrationsConfig as $migrationName => $latestVersion) {\n if (!in_array($migrationName, $aDatabaseMigrationNames)) {\n $this->deployMigrations($migrationName, '000');\n }\n }\n \n // check for new migrations\n foreach ($aMigrationsConfig as $migrationName => $latestVersion) {\n foreach ($oDatabaseVersion as $oMigration) {\n if ($oMigration->getName() == $migrationName) {\n if ($oMigration->getVersion() != $latestVersion) {\n $this->deployMigrations($migrationName, $oMigration->getVersion());\n }\n break;\n }\n }\n }\n \n db::commitTransaction();\n }", "title": "" }, { "docid": "907cff25f261e6f8312731548e1f7be8", "score": "0.5364356", "text": "static function maintenance(){\n\t\t$rows = Db::rows('select identity, bt.reason, b.time_expire\n\t\t\tfrom ban b\n\t\t\t\tleft join ban_type bt on b.type_id_ = bt.id\n\t\t\twhere (b.time_expire >= '.Db::quote(i()->Time()).' or time_expire is null)');\n\t\t$identityBans = Arrays::compileSubsOnKey($rows,'identity');\n\t\tforeach($identityBans as $identity => $bans){\n\t\t\t$putBans = array();\n\t\t\tforeach($bans as $ban){\n\t\t\t\t$putBans[] = Arrays::extract(array('reason','time_expire'),$ban);\n\t\t\t}\n\t\t\tCache::set('bans-'.$identity,serialize($putBans));\n\t\t}\n\t}", "title": "" }, { "docid": "c25b494d1d5f93897658323f30c92591", "score": "0.5347431", "text": "public function run()\n {\n if(config('app.env') !== 'production')\n {\n $this->call(purge_database::class);\n $this->call(add_states_and_categories::class);\n $this->call(generate_junk_projects_states::class);\n }\n }", "title": "" }, { "docid": "7a22c4d95489b16ec5ef3c9fc6a84674", "score": "0.5346551", "text": "public function executeCron()\n {\n $this->logger->info(\"Executing PMSE scheduled tasks\");\n $this->wakeUpSleepingFlows();\n }", "title": "" }, { "docid": "b80838cb2a38e382acbf40d71b4a8059", "score": "0.53418976", "text": "public function run_upgrade_process() {}", "title": "" }, { "docid": "0ba6d8dcd57079429ea6dac7b740253b", "score": "0.53280556", "text": "private function _before_command_run(){\n WP_CLI::line( \"Starting Database optimization process. Waiting...\" );\n @ob_flush();\n flush();\n $command = !empty( $this->url ) ? \"wp db optimize --url={$this->url}\" : \"wp db optimize\";\n $r = SM_CLI::launch( $command, false, true );\n if( $r->return_code ) {\n WP_CLI::error( \"Something went wrong. Database optimization process failed.\" );\n } else {\n WP_CLI::success( \"Database is optimized\" );\n }\n }", "title": "" }, { "docid": "6b17e9728fd6f729baed1c8e43ca462b", "score": "0.5317142", "text": "protected function loopTasks() {}", "title": "" }, { "docid": "d5eb443d458859459542ee8de278a95b", "score": "0.53146434", "text": "function is_maintenance() {\n\t\tglobal $myMaMo; \n\t\tif ( substr($myMaMo->g_opt['mamo_activate'], 0, 2) == 'on' ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "953edbdc48ec11956a7163f993a897e5", "score": "0.53094655", "text": "function db_delayedexecution_shutdown_hook() {\n\tglobal $DB_DELAYED_QUERIES;\n\n\tforeach ($DB_DELAYED_QUERIES as $query_details) {\n\t\ttry {\n\t\t\t$link = $query_details['l'];\n\n\t\t\tif ($link == 'read' || $link == 'write') {\n\t\t\t\t$link = get_db_link($link);\n\t\t\t} elseif (!is_resource($link)) {\n\t\t\t\telgg_log(\"Link for delayed query not valid resource or db_link type. Query: {$query_details['q']}\", 'WARNING');\n\t\t\t}\n\t\t\t\n\t\t\t$result = execute_query($query_details['q'], $link);\n\t\t\t\n\t\t\tif ((isset($query_details['h'])) && (is_callable($query_details['h']))) {\n\t\t\t\t$query_details['h']($result);\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t// Suppress all errors since these can't be dealt with here\n\t\t\telgg_log($e, 'WARNING');\n\t\t}\n\t}\n}", "title": "" }, { "docid": "9347ea935e4644556cf33751004bdaf6", "score": "0.5306399", "text": "private function runMigrations()\n\t{\n\t\t$this->line('Running possible migrations...');\n\t\t$this->call('migrate');\n\t\t$this->line('Possible migrations done...');\n\t}", "title": "" }, { "docid": "029d630e70cbdd3bc16d71f9b05463bc", "score": "0.5305773", "text": "public function run() {\n @ini_set('max_execution_time', 0);\n @set_time_limit(0);\n\n DB::beginTransaction();\n\n $fixed_deposits = FixedDeposit::where('status', 1)\n ->where('mature_date', '<=', date('Y-m-d'))\n ->get();\n\n foreach ($fixed_deposits as $fixed_deposit) {\n $fixed_deposit->status = 3;\n $fixed_deposit->save();\n\n $transaction = new Transaction();\n $transaction->user_id = $fixed_deposit->user_id;\n $transaction->currency_id = $fixed_deposit->currency_id;\n $transaction->amount = $fixed_deposit->return_amount;\n $transaction->dr_cr = 'cr';\n $transaction->type = 'Deposit';\n $transaction->method = 'Online';\n $transaction->status = 2;\n $transaction->note = 'Return of Fixed deposit';\n\n $transaction->save();\n\n try {\n $transaction->user->notify(new FDRMatured($transaction));\n } catch (\\Exception $e) {}\n }\n\n DB::commit();\n\n echo 'Scheduled task runs successfully';\n }", "title": "" }, { "docid": "217da93de269245431a1c73a3781cd74", "score": "0.53051925", "text": "public function run()\n {\n // Standard starting set of sites for when I refresh the database\n $site_dn = new Site();\n $site_dn->title = 'Designer News';\n $site_dn->shortname = 'DN';\n $site_dn->link = 'https://www.designernews.co/';\n $site_dn->selector = '.list-story-main-grouper a.montana-item-title';\n $site_dn->weight = 0;\n $site_dn->save();\n\n $site_yc = new Site();\n $site_yc->title = 'YCombinator News';\n $site_yc->shortname = 'YC';\n $site_yc->link = 'https://news.ycombinator.com/';\n $site_yc->selector = '.title .storylink';\n $site_yc->weight = 0;\n $site_yc->save();\n\n $site_dn = new Site();\n $site_dn->title = 'Sidebar';\n $site_dn->shortname = 'SB';\n $site_dn->link = 'https://sidebar.io/';\n $site_dn->selector = '.posts-item-title-link';\n $site_dn->weight = 0;\n $site_dn->save();\n }", "title": "" }, { "docid": "9fcea06188fef5be79f3d16c98228101", "score": "0.52994883", "text": "function drupal_cron_run() {\n // If not in 'safe mode', increase the maximum execution time:\n if (!ini_get('safe_mode')) {\n set_time_limit(240);\n }\n\n // Fetch the cron semaphore\n $semaphore = variable_get('cron_semaphore', FALSE);\n\n if ($semaphore) {\n if (time() - $semaphore > 3600) {\n // Either cron has been running for more than an hour or the semaphore\n // was not reset due to a database error.\n watchdog('cron', t('Cron has been running for more than an hour and is most likely stuck.'), WATCHDOG_ERROR);\n\n // Release cron semaphore\n variable_del('cron_semaphore');\n }\n else {\n // Cron is still running normally.\n watchdog('cron', t('Attempting to re-run cron while it is already running.'), WATCHDOG_WARNING);\n }\n }\n else {\n // Register shutdown callback\n register_shutdown_function('drupal_cron_cleanup');\n\n // Lock cron semaphore\n variable_set('cron_semaphore', time());\n\n // Iterate through the modules calling their cron handlers (if any):\n module_invoke_all('cron');\n\n // Record cron time\n variable_set('cron_last', time());\n watchdog('cron', t('Cron run completed.'), WATCHDOG_NOTICE);\n\n // Release cron semaphore\n variable_del('cron_semaphore');\n\n // Return TRUE so other functions can check if it did run successfully\n return TRUE;\n }\n}", "title": "" }, { "docid": "a7a77afde2c8143c76f0e6706e1c10c0", "score": "0.529898", "text": "public function maintenance($database, $day, $hour);", "title": "" }, { "docid": "e96a85e3fb8162c41c27d5ef852c409b", "score": "0.5296894", "text": "public function databaseMaintenanceAction()\n {\n return $this->handleExitStatus(\n $this->handleCommand(\n [\n Command\\Organisation\\FixIsIrfo::create([]),\n Command\\Organisation\\FixIsUnlicenced::create([]),\n ]\n )\n );\n }", "title": "" }, { "docid": "7bb61dd40530883658d49de2b418d600", "score": "0.52957416", "text": "public function cleanup() {\n\t// old active crons\n\t$sql = \"SELECT *, CONCAT(SUBSTRING(`arguments`,1,100), '...') AS 'arguments_short' FROM `\".$this->table.\"` WHERE (`status` = 'starting' OR `status` = 'running') AND `start_from` < %d;\";\n\t$active_expiration = time() - (60*15); // 15 minutes - 3 cron executions\n\t\n\t$still_active_crons = mysql::select('array', $sql, $active_expiration);\n\tif ($still_active_crons) {\n\t\t$email_body = array(\n\t\t\t'template' => 'cronjobs/still_active_cronjobs',\n\t\t\t'data' => array(\n\t\t\t\t'still_active_cronjobs' => array_values($still_active_crons),\n\t\t\t),\n\t\t);\n\t\tcron::mail(WEBMASTER, 'Sommige cronjobs zijn vastgelopen', $email_body);\n\t}\n\t\n\t// old done crons\n\t$sql = \"DELETE FROM `\".$this->table.\"` WHERE `status` = 'done' AND `start_from` < %d;\";\n\t$when_is_old = time() - (60*60*24*7); // one week\n\t\n\tmysql::query($sql, $when_is_old);\n\t$affected = mysql::$affected_rows;\n\treturn $affected;\n}", "title": "" }, { "docid": "bf81754bea8f277da9ac255082ef46fd", "score": "0.5289176", "text": "public function _run_upgrade_process() {\n /* Delete 'Install/Upgrade' notice 'dismissed' information */\n delete_option( sanitize_key( 'dismiss_' . $this->slug . '_' . str_replace( '.', '_', $this->args['version'] ) . '_notice' ) );\n /* Delete 'Bootstrap' notice 'dismissed' information */\n delete_option( 'dismissed_notice_' . sanitize_key( $this->name ) );\n $this->run_upgrade_process();\n }", "title": "" }, { "docid": "f3a7ff0c6692890f25434edd6c4f9c57", "score": "0.52866274", "text": "public function execute() {\n global $CFG;\n require_once($CFG->dirroot . '/mod/dataplus/locallib.php');\n mtrace(' Removing old temporary dataplus files.');\n $removed = dataplus_remove_temp_files();\n mtrace(' Removed ' . $removed . ' old temporary dataplus files.');\n }", "title": "" }, { "docid": "5fec6c896ce4abae5bf5b790dc8231c3", "score": "0.52816063", "text": "public function migrateExpired(): void\n {\n $redis = $this->getConnection();\n\n $redis->eval(\n LuaScripts::migrateExpiredJobs(),\n 2,\n \"{$this->channelPrefix}{$this->channel}:delayed\",\n \"{$this->channelPrefix}{$this->channel}:waiting\",\n time()\n );\n }", "title": "" }, { "docid": "b45a037be719fd1a23273cb0def64cf2", "score": "0.52789664", "text": "public function tasks()\n\t{ \n\t\t// Log current state\n\t\tutilities::notate(\"Cron started at: \".TIME_CURRENT, \"tasks.log\"); \n \n\t\t// If cron is passed an argument through CLI\n\t\tif($method = $_SERVER['argv'][2])\n\t\t{ \n\t\t\t// Call the method\n\t\t\t$this->$method($_SERVER['argv'][3]); \t\t\n\t\t}\n\t\t// No method was provided\n\t\telse\n\t\t{\n\t\t\tutilities::notate(\"No method provided\", \"tasks.log\"); \n\t\t}\n\t\t\n\t\t// Log current state\n\t\tutilities::notate(\"Cron complete\", \"tasks.log\");\n\t\t\n\t\t// Finish execution\n\t\tutilities::complete();\t\t \n\t}", "title": "" }, { "docid": "66e1401c6417a8e9b0c44231dd63d450", "score": "0.5266847", "text": "protected function run()\n {\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n\n dbDelta($this->getSql());\n\n $this->setCurrentVersion();\n }", "title": "" }, { "docid": "6eb8e5e34cd538d91966edbd2a977bae", "score": "0.5261865", "text": "function check_schedules_to_run() {\n\t\t$cron_time_running = time() - get_option('lepress-cron-is-running', 0);\n\t\tif(($jobs = $this->getJobs()) && $cron_time_running > 10) {\n\t\t\tforeach($jobs as $schedule_obj) {\n\t\t\t\tif($schedule_obj->scheduled_time <= time()) {\n\t\t\t\t\t$deleted = $this->delete_schedule($schedule_obj->hook);\n\t\t\t\t\tif($deleted) {\n\t\t\t\t\t\tdo_action($schedule_obj->hook);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tupdate_option('lepress-cron-is-running', time());\n\t\t}\n\t}", "title": "" }, { "docid": "f3878fd4e103256217294054cd6ed488", "score": "0.5260807", "text": "function mbm_process_maintenance_page(&$variables) {\r\n // Always print the site name and slogan, but if they are toggled off, we'll\r\n // just hide them visually.\r\n $variables['hide_site_name'] = theme_get_setting('toggle_name') ? FALSE : TRUE;\r\n $variables['hide_site_slogan'] = theme_get_setting('toggle_slogan') ? FALSE : TRUE;\r\n if ($variables['hide_site_name']) {\r\n // If toggle_name is FALSE, the site_name will be empty, so we rebuild it.\r\n $variables['site_name'] = filter_xss_admin(variable_get('site_name', 'Drupal'));\r\n }\r\n if ($variables['hide_site_slogan']) {\r\n // If toggle_site_slogan is FALSE, the site_slogan will be empty, so we rebuild it.\r\n $variables['site_slogan'] = filter_xss_admin(variable_get('site_slogan', ''));\r\n }\r\n}", "title": "" }, { "docid": "e775c5d14489e9bd2c66f973f3724c6d", "score": "0.52558386", "text": "public function run()\n\t{\n\t\t$this->rxu_tidy_warnings();\n\t}", "title": "" }, { "docid": "bd2a48205d232f4521aa9119b24e2612", "score": "0.52390987", "text": "public function productionRun()\n {\n //\n }", "title": "" }, { "docid": "2ec9e308cf74164655d44d8e30b4417a", "score": "0.52299666", "text": "static function forceRun() {\n HeartBeatService::run();\n }", "title": "" }, { "docid": "78438455d1e0f14d99feb2723322f9dd", "score": "0.5217264", "text": "function drush_hosting_pause($url) {\n // wipe out cron entry\n exec('crontab -r');\n // we can't rely on update.php because it runs too late\n // @deprecated this can be removed in 0.5 and above\n provision_backend_invoke(drush_get_option('site_name'), 'sqlq', array(\"UPDATE {system} SET weight = 0 WHERE type='module' AND name='hosting';\"));\n}", "title": "" }, { "docid": "34f6b76acaa6a629ad6057b232f99fbf", "score": "0.52162147", "text": "public function initControllerStoremaintenance($request) \n {\n \t//date_default_timezone_set(Mage::getStoreConfig('general/locale/timezone')); \t\n\t\t\n \t$url = Mage::helper('core/url')->getCurrentUrl();\n\t\t$adminArea = 0;\n\t\t\n\t\t// checks whether the current page belongs to the administrator\n\t\tif (strpos($url, '/admin') || strpos($url, '/adminhtml') || strpos($url, '/downloader')) {\n\t\t\t$adminArea = 1;\n\t\t}\n\t\t\n\t\t// Performs if not is administrative area\n if ($adminArea == 0) {\n \t\n $storeId = Mage::app()->getStore()->getStoreId();\n $isEnabled = Mage::getStoreConfig('harriswebworks_storemaintenance/storemaintenance/activate',$storeId);\n\t\t\t\n\t\t\t// verifies if the module is enabled\n\t\t\t if ($isEnabled == 1) {\n \t\n\t\t\t\t$start_date = Mage::getStoreConfig('harriswebworks_storemaintenance/storemaintenance/start_date');\t\t\t\t\n\t\t\t\t$endDate = Mage::getStoreConfig('harriswebworks_storemaintenance/storemaintenance/end_date');\n\t\t\t\t$start_time = Mage::getStoreConfig('harriswebworks_storemaintenance/storemaintenance/start_time');\t\t\t\t\n\t\t\t\t$end_time = Mage::getStoreConfig('harriswebworks_storemaintenance/storemaintenance/end_time');\n\t\t\t\t$checkStartDate = 0;\n\t\t\t\t$checkDate = 0;\n\t\t\t\t$currentDate = date('m/d/Y H:i:s');\n\t\t\t\t$timestamp_currentDate = strtotime($currentDate);\t\n\t\t\t\t// Checks if a date was set for the end of maintenance\n\t\t\t\tif ($start_date) {\t\t\t\t\t\n\t\t\t\t\t$timestamp_startDate = strtotime($start_date.' '.str_replace(\",\",\":\",$start_time));\n\t\t\t\t\t// checks whether the current date is greater than the date specified in the module\t\t\t\t\t\n\t\t\t\t\tif ($timestamp_currentDate == $timestamp_startDate) {\n\t\t\t\t\t\t$checkStartDate = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($endDate) {\t\t\t\t\t\n\t\t\t\t\t$timestamp_endDate = strtotime($endDate.' '.str_replace(\",\",\":\",$end_time));\n\t\t\t\t\t// checks whether the current date is greater than the date specified in the module\t\t\t\t\t\n\t\t\t\t\tif ($timestamp_currentDate > $timestamp_endDate) {\n\t\t\t\t\t\t$checkDate = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//echo $checkDate;\n\t\t\t\t$blockid = Mage::getStoreConfig('harriswebworks_storemaintenance/storemaintenance/block_static');\n\t\t\t\t\n\t\t\t\tif( $checkStartDate == 1 && $checkDate == 0 && $blockid){\n\t\t\t\t\t$resource = Mage::getSingleton('core/resource');\n\t\t\t\t\t$readConnection \t=\t$resource->getConnection('core/resource');\n\t\t\t\t\t\n\t\t\t\t\t$updatesecondtable = \"UPDATE `cms_block` SET `is_active` = 1 WHERE `block_id` =$blockid\";\n\t\t\t\t\t$readConnection->query($updatesecondtable);\n\t\t\t\t\tMage::app()->getCache()->clean();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif( $checkDate == 1 && $blockid){\n\t\t\t\t\t$resource = Mage::getSingleton('core/resource');\n\t\t\t\t\t$readConnection \t=\t$resource->getConnection('core/resource');\n\t\t\t\t\t$selectqr = \"select is_active from `cms_block` WHERE `block_id` =$blockid\";\n\t\t\t\t\t$isex = $readConnection->fetchOne($selectqr);\n\t\t\t\t\tif($isex==1){\n\t\t\t\t\tMage::getConfig()->saveConfig('harriswebworks_storemaintenance/storemaintenance/activate', '0', 'default', 0);\n\t\t\t\t\t$updatesecondtable = \"UPDATE `cms_block` SET `is_active` = 0 WHERE `block_id` =$blockid\";\n\t\t\t\t\t$readConnection->query($updatesecondtable);\n\t\t\t\t\tMage::app()->getCache()->clean();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n }\n \t}\n }", "title": "" }, { "docid": "1105df4f55b6faa3a2cb5f99798812a5", "score": "0.52122617", "text": "function mnetadmin_rpc_set_maintenance($user, $message, $hardmaintenance = false, $jsonrequired = true) {\n global $CFG, $USER;\n\n if (function_exists('debug_trace')) {\n debug_trace('RPC '.json_encode($user));\n }\n\n if ($auth_response = invoke_local_user((array)$user)) {\n if ($jsonrequired) {\n return $auth_response;\n } else {\n return json_decode($auth_response);\n }\n }\n\n // Creating response.\n $response = new stdClass;\n $response->status = RPC_SUCCESS;\n\n /*\n * Keep old hard signalled maintenance mode of 1.9. Can be usefull in case database stops\n * but needs a patch in config to catch this real case.\n */\n $filename = $CFG->dataroot.'/maintenance.html';\n\n if ($message != 'OFF') {\n if (function_exists('debug_trace')) {\n debug_trace('VMoodle : Setting maintenance on', TRACE_NOTICE);\n }\n $file = fopen($filename, 'w');\n fwrite($file, stripslashes($message));\n fclose($file);\n set_config('maintenance_enabled', 1);\n set_config('maintenance_message', $message);\n } else {\n if (function_exists('debug_trace')) {\n debug_trace('VMoodle : Setting maintenance off', TRACE_NOTICE);\n }\n unlink($filename);\n set_config('maintenance_enabled', 0);\n set_config('maintenance_message', null);\n }\n\n // Be really sure we drop caches.\n cache_helper::invalidate_by_definition('core', 'config');\n\n // Returns response (success or failure).\n return json_encode($response);\n}", "title": "" }, { "docid": "be4fe170d573bbcc9d37799971dd15a7", "score": "0.5203788", "text": "public static function maintenance($resp = false)\n {\n if (Data::get(\"maintenance_mode\", \"option\") && !current_user_can(\"administrator\")) {\n static::respond($resp);\n }\n }", "title": "" }, { "docid": "afb2c2227f0a8eff2647193293527581", "score": "0.519142", "text": "private function monitor_loop_downtime_check(&$downtimes)\n\t{\n\t\t$count = count($downtimes);\n\t\t$now = time();\n\t\tif ($count > 2) {\n\t\t\t$three_ago = $downtimes[$count - 3];\n\t\t\tif (($now - $three_ago) < 100) {\n\t\t\t\t// only send email once an hour\n\t\t\t\tif ($this->last_email_time === false || ($now - $this->last_email_time) > 3600) {\n\t\t\t\t\tcli::email_error(DELLY_ADMIN, 'DELLY DOWN', \"Host: \".\\epro\\HOSTNAME.\"\\n\");\n\t\t\t\t\t$this->last_email_time = $now;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// get rid of downtimes over 1 day\n\t\twhile (count($downtimes) > 0) {\n\t\t\t$dt = $downtimes[0];\n\t\t\tif (($now - $dt) > 86400) {\n\t\t\t\tarray_shift($downtimes);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8be05c82482a117fd5f8907e397965a4", "score": "0.5182224", "text": "public function run()\n {\n $tasks = $this->getTasks();\n foreach($tasks as $taskValue)\n {\n $task = new Task();\n $task->title = $taskValue['title'];\n $task->content = $taskValue['content'];\n $task->article_title = $taskValue['article_title'];\n $task->article_content = $taskValue['article_content'];\n $task->file =$taskValue['file'];\n $task->link = $taskValue['link'];\n $task->status = $taskValue['status'];\n $task->save();\n }\n }", "title": "" }, { "docid": "e5bd1a6617f01264ca046d9d38f21b08", "score": "0.51714975", "text": "public function run()\n {\n foreach ($this->sqlFileNames as $sqlFileName) {\n $sql = file_get_contents(\n sprintf(\n '%s/sql/%s.sql',\n __DIR__,\n $sqlFileName\n )\n );\n\n DB::unprepared($sql);\n\n $this->command->info(\n sprintf(\n 'Dumped %s.sql to database.',\n $sqlFileName\n )\n );\n }\n\n $this->convertHtmlToMarkdown();\n $this->addMissingActivities();\n $this->repairActivityLog();\n }", "title": "" }, { "docid": "f3ff5d8578fb000bfdbffb7c31648f12", "score": "0.5171073", "text": "public function run()\n {\n global $cronJob; // from CronController\n \n //At this time the job should be defered, \n //no new actions should be started after this time.\n if (time() >= $cronJob['endtime'])\n {\n $cronJob['completed'] = false;\n return;\n }\n \n foreach ( array_diff( scandir( TL_ROOT . '/' . $this->languages_dir ), $this->languages ) as $dir )\n {\n if (is_dir( TL_ROOT . '/' . $this->languages_dir . '/' . $dir ))\n {\n $objDir = new Folder( $this->languages_dir . '/' . $dir );\n $objDir->delete(); //internal: rrdir incl. $this->dir\n $objDir = null;\n unset($objDir);\n $this->killed = true;\n }\n } \n if ($this->killed && $cronJob['logging'])\n {\n $this->log('Superfluous languages files purged by cron job.', 'PurgeLanguagesFiles run()', TL_GENERAL);\n // purge the internal cache\n // system/cache/dca, system/cache/sql, system/cache/language\n $this->import('Automator');\n $this->Automator->purgeInternalCache();\n }\n }", "title": "" }, { "docid": "ffcf2d842180a8fe35131fb576ed2141", "score": "0.51688045", "text": "function wpo_cron_weekly() {\n\tglobal $wpdb;\n\tlist ($retention_enabled, $retention_period) = getRetainInfo();\n\t\n if ( get_option(OPTION_NAME) == 'true') {\n \t\t\t\n\t\t\t$clean = \"DELETE FROM $wpdb->posts WHERE post_type = 'revision'\";\n if ($retention_enabled == 'true') {\n $clean .= ' and post_modified < NOW() - INTERVAL ' . $retention_period . ' WEEK';\n }\n $clean .= ';';\n\t\t\t$revisions = $wpdb->query( $clean );\n\t\t\n $clean = \"DELETE FROM $wpdb->posts WHERE post_status = 'auto-draft'\";\n if ($retention_enabled == 'true') {\n $clean .= ' and post_modified < NOW() - INTERVAL ' . $retention_period . ' WEEK';\n }\n $clean .= ';';\n $autodraft = $wpdb->query( $clean );\n\t\t\t\n $clean = \"DELETE FROM $wpdb->posts WHERE post_status = 'trash'\";\n if ($retention_enabled == 'true') {\n $clean .= ' and post_modified < NOW() - INTERVAL ' . $retention_period . ' WEEK';\n }\n $clean .= ';';\n $posttrash = $wpdb->query( $clean );\n\n $clean = \"DELETE FROM $wpdb->comments WHERE comment_approved = 'spam'\";\n if ($retention_enabled == 'true') {\n\t\t\t\t$clean .= ' and comment_date < NOW() - INTERVAL ' . $retention_period . ' WEEK';\n }\n $clean .= ';';\n $comments = $wpdb->query( $clean );\t\t\t\n\t\t\t\n $clean = \"DELETE FROM $wpdb->comments WHERE comment_approved = 'post-trashed'\";\n if ($retention_enabled == 'true') {\n\t\t\t\t$clean .= ' and comment_date < NOW() - INTERVAL ' . $retention_period . ' WEEK';\n }\n $clean .= ';';\t\t\t\n $commentstrash = $wpdb->query( $clean );\n\t\t\t\n\t\t\t\n\t\t$db_tables = $wpdb->get_results('SHOW TABLES',ARRAY_A);\n\t\tforeach ($db_tables as $table){\n\t\t\t$t = array_values($table);\n\t\t\t$wpdb->query(\"OPTIMIZE TABLE \".$t[0]);\n\t\t}\n\t\t\n\t\t$thisdate = date('l jS \\of F Y h:i:s A');\n\t\tupdate_option( OPTION_NAME_LAST_OPT, $thisdate );\n\t\t\n\t}\t\n}", "title": "" }, { "docid": "059eeb3a5f1a795994931115b7216c9c", "score": "0.51609814", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command(\"mc:process-finished-globus-tasks --background\")\n ->everyMinute()\n ->runInBackground()\n ->withoutOverlapping();\n\n // This command runs periodically to clean up any globus requests that didn't properly close.\n $schedule->command('mc-transfer:remove-closed-transfer-requests')\n ->everyFiveMinutes()\n ->runInBackground()\n ->withoutOverlapping();\n\n // Delete old unverified accounts.\n $schedule->command('mc:delete-unverified-accounts')\n ->daily()\n ->at('02:00')\n ->runInBackground();\n\n // Cleanup expired directories in the trashcan\n $schedule->command(\"mc:delete-expired-trashcan-directories\")\n ->everyFifteenMinutes()\n ->runInBackground()\n ->withoutOverlapping();\n\n // Cleanup expired files in the trashcan\n $schedule->command(\"mc:delete-expired-trashcan-files\")\n ->everyFifteenMinutes()\n ->runInBackground()\n ->withoutOverlapping();\n\n // Cleanup expired projects in the trashcan\n $schedule->command(\"mc:delete-expired-trashcan-projects\")\n ->everyFifteenMinutes()\n ->runInBackground()\n ->withoutOverlapping();\n\n // Queue file conversions\n $schedule->command(\"mc:run-conversion-on-files\")\n ->everyFifteenMinutes()\n ->runInBackground()\n ->withoutOverlapping();\n\n // Delete the actual files, where appropriate\n $schedule->command(\"mc:delete-tbd-files\")\n ->everyFiveMinutes()\n ->runInBackground()\n ->withoutOverlapping();\n\n // File replication\n $schedule->command(\"mc-disk:replicate-mcfs-files\")\n ->everyFiveMinutes()\n ->runInBackground()\n ->withoutOverlapping();\n\n $schedule->command(\"mc-logs:purge-old-log-files\")\n ->everyFifteenMinutes()\n ->runInBackground()\n ->withoutOverlapping();\n\n if (config('app.env') == 'production') {\n $schedule->command('backup:clean')->daily()->at('01:00');\n $schedule->command('backup:run')->daily()->at('01:30');\n $schedule->command('mc:generate-site-map')->daily()->at('3:00');\n $schedule->command('mc:generate-usage-statistics')->monthlyOn(1, '02:00');\n }\n }", "title": "" }, { "docid": "0718f5d69dfc94982d7e9b672b71e055", "score": "0.51600677", "text": "private static function isSystemInMaintenanceMode()\n {\n $release = ReleaseNotification::model()->getNotFinishedRelease();\n if (empty($release))\n return !self::allowByTime();\n \n return true;\n }", "title": "" }, { "docid": "63f51ddaa57bd4b5bafee90815a013fe", "score": "0.51555437", "text": "public function cron_jobs() {\n \n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "21de881fb942c6b4df01fdc79de164e8", "score": "0.0", "text": "public function show($id)\n\t{\n\t\t$m_tpo_manto = $this->m_tpo_manto->findOrFail($id);\n\n\t\treturn View::make('m_tpo_mantos.show', compact('m_tpo_manto'));\n\t}", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "4a213f970d44ae570e7f216941006306", "score": "0.7264416", "text": "public function setting_show_resource($resource,$resourceFile)\n {\n echo $this->_template_url . '/'.$resource.'/'.$resourceFile;\n }", "title": "" }, { "docid": "fb1ffd800184a0a42701459345c41281", "score": "0.6991857", "text": "public function show(Resource $resource)\n {\n Gate::authorize('view', $resource);\n\n return $resource;\n }", "title": "" }, { "docid": "8e9fe6c0081f8ce768620060cccb65f3", "score": "0.68753964", "text": "public function show($param)\n {\n $resource = Resource::with('tags', 'likesCount', 'user', 'category')\n ->where('id', $param)\n ->orWhere('slug', $param)\n ->firstOrFail();\n\n $initialState = [\n 'resource' => $resource,\n 'currentUser' => Auth::user()\n ];\n\n return response()->view('public.resource', [\n 'appName' => 'resource',\n 'pageName' => $resource->title,\n 'initialState' => $initialState\n ]);\n }", "title": "" }, { "docid": "48b397ea8942d2fa9785a3e43388943e", "score": "0.6725769", "text": "public function show($id)\n\t{\n\t\t$resource = Resource::with('UserResourceLink')->find($id);\n\t\treturn View::make('resources.show')->with('resource', $resource);\n\t}", "title": "" }, { "docid": "2c30b4b167b469c3db298602e7ead28d", "score": "0.6711636", "text": "private function display_item($resource, $item) {\n\t\t$db = $this->db($resource);\n\t\t$item = $db->get($item);\n\n\t\tif ($item) {\n\t\t\t echo json_encode($item);\n\t\t} else {\n\t header('HTTP/1.1 404 Not Found');\n\t }\n\t}", "title": "" }, { "docid": "95bf452408be21abf4a83c19b8bbd6fb", "score": "0.667411", "text": "public function show(string $resource, $id)\n {\n return Jory::byUri($resource)->find($id);\n }", "title": "" }, { "docid": "cd76a0fc79013f2dbdd01b09770768ec", "score": "0.6580917", "text": "public function show($id)\n {\n // $resource = Resource ::find($id);\n // return view('Resource.resource')->with('resource',$resource);\n }", "title": "" }, { "docid": "39dabc4dde3ba3c708fb3782a17fde5c", "score": "0.6434556", "text": "function show( $resource ){\n $product = get( 'products', $resource );\n\n return view( 'admin/product/view_product', compact( 'product' ) );\n}", "title": "" }, { "docid": "0d9d138ae5e21142d7d77d5c45711a1c", "score": "0.6386195", "text": "public function displayAction()\r\n\t{\r\n\t\t// set filters and validators for GET input\r\n\t\t$filters = array(\r\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\r\n\t\t);\r\n\t\t$validators = array(\r\n 'id' => array('NotEmpty', 'Int')\r\n\t\t);\r\n\t\t$input = new Zend_Filter_Input($filters, $validators);\r\n\t\t$input->setData($this->getRequest()->getParams());\r\n\r\n\t\t// test if input is valid\r\n\t\t// retrieve requested record\r\n\t\t// attach to view\r\n\t\tif ($input->isValid()) {\r\n\t\t\t$q = Doctrine_Query::create()\r\n\t\t\t->from('Webteam_Model_Video i')\r\n\t\t\t->where('i.VideoID = ?', $input->id);\r\n\t\t\t$result = $q->fetchArray();\r\n\t\t\tif (count($result) == 1) {\r\n\t\t\t\t$this->view->item = $result[0];\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Zend_Controller_Action_Exception('Page not found', 404);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new Zend_Controller_Action_Exception('Invalid input');\r\n\t\t}\r\n\r\n\r\n\r\n\r\n\t}", "title": "" }, { "docid": "43c7d44dab00c2107caa033394e76a4e", "score": "0.6370414", "text": "public function display($spec = null)\n {\n $response = $this->fetch($spec);\n $response->display();\n }", "title": "" }, { "docid": "2c8806a4c1933c4361ab0e84ba707311", "score": "0.6274676", "text": "public function show()\n {\n $this->beginAction('show');\n $this->getResource();\n $this->applyHooks(AuthorizeResource::class);\n $this->formatResource();\n\n return $this->makeResponse();\n }", "title": "" }, { "docid": "f99807bc50ee366a325d9c40a162d254", "score": "0.62724066", "text": "public function actionGetInfoResource()\n\t{\n\t\t//die (print_r($_POST));\n\t\t$resource = Yii::app()->db->createCommand()->select('*')->from('ki_resource')\n\t\t\t\t\t\t\t\t->where('lang=:lang AND id=:id', array(':lang' => 'ru_ru', ':id' => $_POST['id']))\n\t\t\t\t\t\t\t\t->queryRow();\n\t\t\n\t\techo $this->renderPartial('_resourceInfo', array('resource' => $resource), true);\n\t}", "title": "" }, { "docid": "c8d2320b9dba46b7850ea9a25da02fad", "score": "0.61858386", "text": "public function viewResource($id)\n {\n $resource = carrierResource::where('resource_id',$id)->get();\n $carrierDetailUserID = carrierResource::where('resource_id',$id)->value('user_id');\n $carrierDetail = carrierDetail::where('user_id',$carrierDetailUserID)->get();\n return view ('resources.resourceDetails', ['resource'=>$resource, 'carrierDetail'=>$carrierDetail]);\n }", "title": "" }, { "docid": "d2e2e944df863de5f56668d68b5f0002", "score": "0.6169535", "text": "public function singleResource(Resource $resource)\n {\n if($resource->resource_status !== 'published')\n abort(404);\n $resource->increment('views');\n \n if (Auth::user()) {\n $userRourceVisit = UserRourceVisit::where('resource_id', $resource->id)->where('user_id', Auth::user()->id)->whereDate('created_at', Carbon::today())->first();\n if (blank($userRourceVisit)) {\n UserRourceVisit::create(['resource_id' => $resource->id, 'user_id' => Auth::user()->id]);\n }\n }\n\n $relatedResources = $this->resourceModel->relatedResources($resource);\n $resources = $this->resourceModel->getResourceByUserId($resource->user_id);\n\n return view('single-resource')\n ->withResource($resource)\n ->withRelated($relatedResources)\n ->withResources($resources);\n }", "title": "" }, { "docid": "f54a56f5688812ff54db4ce8c7ee9e8a", "score": "0.6088493", "text": "public function showAction($id)\n {\n $requestParameterHandler = $this->getRequestParameterHandler();\n $singleResourceRequestHandler = $this->get(self::SINGLE_RESOURCE_HANDLER);\n // TODO ADD Check if the user have authorisation before proceeding from the request.\n\n $resource = $singleResourceRequestHandler->process($id);\n\n if (null !== $resource) {\n $deleteFormView = $this->createDeleteForm(\n $requestParameterHandler\n );\n\n return $this->render(\n $requestParameterHandler->getThemePath(),\n array(\n $requestParameterHandler->getResourceViewName() => $resource,\n 'delete_form' => $deleteFormView,\n )\n );\n }\n // Add a message if the does't not exist.\n throw $this->createNotFoundException(sprintf('The %s %d %s', $requestParameterHandler->getResourceName(), $id, self::NOT_FOUND));\n }", "title": "" }, { "docid": "eb5ce2e515c2c4b1d34c71d116115e47", "score": "0.60823214", "text": "public function getResource($resource);", "title": "" }, { "docid": "ed3d20317cbecdf072f7b882feb64335", "score": "0.6073599", "text": "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Rack ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found',null,true);\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "title": "" }, { "docid": "1f19b3abcb62dd0bf36e4cc2e2e9a4b3", "score": "0.60681057", "text": "public function details($request, $response, $args) {\n $resource_id = $args['id'];\n $resource_details = $this->resource_gateway->get_resource_details($resource_id);\n\n return $this->view->render($response, 'resource/details.html.twig', [\n 'id' => $resource_id,\n 'resource_details' => $resource_details,\n ]);\n }", "title": "" }, { "docid": "c09849a3051e163c36ba622c042416dd", "score": "0.60172373", "text": "public function show($id)\n {\n $resource = $this->model::findOrFail($id);\n\n if (view()->exists($this->basicViewFolder . '.show')) {\n if (request()->ajax()) {\n return view($this->basicViewFolder . '.show', compact('resource'))->render();\n } else {\n return view($this->basicViewFolder . '.show', compact('resource'));\n }\n }\n\n return \" the view \" . $this->basicViewFolder . \".show not found\";\n }", "title": "" }, { "docid": "886db488fd45282953d62e88f2c58889", "score": "0.60164165", "text": "public function showAction($id) {\r\n\r\n $remote = $this->getDoctrine()\r\n ->getRepository('RemotePadMainBundle:Remote')\r\n ->find($id);\r\n\r\n if (!$remote) {\r\n return new Response(\"No Remote found. id: \" . $id, 404);\r\n }\r\n\r\n return $this->render('RemotePadMainBundle:Remote:show.html.twig', array('remote' => $remote));\r\n }", "title": "" }, { "docid": "df63d689055cf5765df52fd5165e28e7", "score": "0.5990083", "text": "abstract function show($identifier);", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "599b6dc077c4d34a9b3b0b168003b106", "score": "0.5974851", "text": "public function viewResource($resourceController, $id) {\n $values = self::getData($resourceController->wrapper($id));\n $function = __FUNCTION__;\n drupal_alter('restws_response', $values, $function, $this->formatName);\n\n return $this->serialize($values);\n }", "title": "" }, { "docid": "e8033cfc300396ea61f2cce5539e61f9", "score": "0.5959599", "text": "public function show() {\n\t\t$this->getOutput()->disable();\n\n\t\ttry {\n\t\t\techo $this->ampRenderer->render( $this->getArticle() );\n\t\t}\n\t\tcatch ( RevisionNotFound $e ) {\n\t\t\t$response = $this->getRequest()->response();\n\t\t\t$response->statusHeader( 302 );\n\t\t\t$response->header( 'Location: ' . $this->getTitle()->getFullURL() );\n\t\t}\n\t}", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9f057a9bec094dea20c158d2ab8094d7", "score": "0.5936922", "text": "public function show(HrmAssetInformation $asset)\n {\n //\n }", "title": "" }, { "docid": "bb2e29f5f05ab065358c99c7225d6dc0", "score": "0.59295714", "text": "public function show(rc $rc)\n {\n //\n }", "title": "" }, { "docid": "9f2521adfd0849eebb7acbb6e94d94a0", "score": "0.592653", "text": "public function show($id) // show a single record\n {\n //\n }", "title": "" }, { "docid": "c356495b91bbab48f9b27e5a5ce7089e", "score": "0.59247625", "text": "public function display()\n {\n if (!current_user_can($this->capability)) {\n wp_die(__('You do not have sufficient permissions to access this page.', $this->textDomain));\n }\n\n $this->view->render();\n }", "title": "" }, { "docid": "151fea634645ed45ca7e8eb127afba25", "score": "0.59127665", "text": "public function show(Resource $resource)\n {\n $now = new \\DateTime('now');\n $reservations = $resource->reservationsIn($now->format('m'));\n\n\n $event_list = [];\n foreach ($reservations as $key => $reservation) {\n $event_list[] = Calendar::event(\n $reservation->user->name,\n false,\n new \\DateTime($reservation->start_time),\n new \\DateTime($reservation->end_time),\n null\n );\n }\n\n $calendar_details = Calendar::addEvents($event_list);\n\n return view('GeneralViews.ResourcesViews.Calendar.view', compact('calendar_details'));\n }", "title": "" }, { "docid": "301defef90a746cf93478d6f4bfc5091", "score": "0.5905301", "text": "public function show($id)\n {\n $model = $this->resourceModel;\n return $model::find($id);\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "447c87b0b6a3806d4bab38780df02aa1", "score": "0.5881883", "text": "public function displayTask($rid=null, $version=null)\n\t{\n\t\t$this->view->setLayout('display');\n\n\t\t// Incoming\n\t\tif (!$rid)\n\t\t{\n\t\t\t$rid = Request::getInt('rid', 0);\n\t\t}\n\t\tif (!$version)\n\t\t{\n\t\t\t$version = Request::getString('version', 'dev');\n\t\t}\n\n\t\t// Ensure we have an ID to work with\n\t\tif (!$rid)\n\t\t{\n\t\t\tApp::abort(500, Lang::txt('COM_TOOLS_CONTRIBUTE_NO_ID'));\n\t\t\treturn;\n\t\t}\n\t\t// Get resource information\n\t\t$resource = Entry::oneOrFail($rid);\n\n\t\t// Get version id\n\t\t$objV = new \\Components\\Tools\\Tables\\Version($this->database);\n\t\t$vid = $objV->getVersionIdFromResource($rid, $version);\n\n\t\t// Do we have a published tool?\n\t\t$this->view->published = $objV->getCurrentVersionProperty($resource->alias, 'id');\n\n\t\t// Get screenshot information for this resource\n\t\t$this->view->shots = $resource->screenshots()\n\t\t\t->whereEquals('versionid', $vid)\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\t// Build paths\n\t\t$path = $resource->relativepath();\n\t\t$this->view->upath = PATH_APP . DS . trim($this->rconfig->get('uploadpath'), DS) . $path;\n\t\t$this->view->wpath = DS . trim($this->rconfig->get('uploadpath'), DS) . $path;\n\t\tif ($vid)\n\t\t{\n\t\t\t$this->view->upath .= DS . $vid;\n\t\t\t$this->view->wpath .= DS . $vid;\n\t\t}\n\n\t\t// Make sure wpath is preceded by app\n\t\tif (substr($this->view->wpath, 0, 4) != DS . 'app')\n\t\t{\n\t\t\t$this->view->wpath = DS . 'app' . $this->view->wpath;\n\t\t}\n\n\t\t// get config\n\t\t$this->view->cparams = Component::params('com_resources');\n\t\t$this->view->version = $version;\n\t\t$this->view->rid = $rid;\n\n\t\tforeach ($this->getErrors() as $error)\n\t\t{\n\t\t\t$this->view->setError($error);\n\t\t}\n\n\t\t// Output HTML\n\t\t$this->view->display();\n\t}", "title": "" }, { "docid": "2d9ba0bfae0a8169414d51cb94341bff", "score": "0.58672357", "text": "public function displayDoc($resource_name, $cache_id=null, $compile_id=null, $parent = null)\n {\n $this->_smarty_vars['template'] = $resource_name; // Added so that the template name would be accessible within the outputfilter\n $this->fetchDoc($resource_name, $cache_id, $compile_id, $parent);\n }", "title": "" }, { "docid": "313cd42e65f168efe8cb0ed49ea30ce1", "score": "0.58634895", "text": "public function displayAction(){\n \n // set filters and validators for GET input\n $filters = array(\n 'id' => array(\n 'HtmlEntities', \n 'StripTags', \n 'StringTrim'\n )\n );\n \n $validators = array(\n 'id' => array(\n 'NotEmpty', \n 'Int'\n )\n );\n \n // Zend_Filter_Input can validate, filter and escape input.\n // retrieve requested record\n // attach to view\n $input = new Zend_Filter_Input($filters, $validators);\n \n $input->setData($this->getRequest()\n ->getParams());\n \n if($input->isValid()) {\n \n // create service\n $service = new Catalog_Service_ItemService();\n \n $stamp_item = $service->getDisplayableItemIfNotExpired($input->id);\n \n if(isset($stamp_item)) {\n \n $this->view->stamp_item = $stamp_item; // store the StampItem in\n // the view.\n \n } else { // entity not found\n \n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n \n } else { // not valid input\n \n throw new Zend_Controller_Action_Exception('Invalid input');\n \n } // endif\n }", "title": "" }, { "docid": "18b1a953d7b4f38d94ba36d78e007c30", "score": "0.5862241", "text": "public function display() {\n require $this->layout;\n }", "title": "" }, { "docid": "f1c47ce6af2faf1f1d79c5449022ee8c", "score": "0.58610433", "text": "public function show($id) {\n return Resource::find($id);\n }", "title": "" }, { "docid": "5dc30ed0a3c41d7bf4354e7bfd2d3260", "score": "0.58572257", "text": "protected function addResourceShow($name, $base, $controller)\n\t{\n\t\t$uri = $this->getResourceUri($name).'/{'.$base.'}';\n\n\t\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show'));\n\t}", "title": "" }, { "docid": "a57eaaa12abdbabb675c82237206d780", "score": "0.58206403", "text": "public function displayResourceUsing(string $resource, callable $displayResourceCallback)\n {\n $this->displayResourceCallback[$resource] = $displayResourceCallback;\n\n return $this;\n }", "title": "" }, { "docid": "3133b3b1b52a90fd561fc5996432c0e7", "score": "0.58170664", "text": "public function show($id)\n {\n return $this->responseItem(['title' => 'Đây là resource show ' . $id]);\n }", "title": "" }, { "docid": "1b6934d948dba93be88f01d4f4cde49a", "score": "0.58158535", "text": "public function display($context);", "title": "" }, { "docid": "935c4042b3fe02e20c14c171b86ae1d7", "score": "0.5801874", "text": "public function shouldDisplayResource($resource)\n {\n return $this->metaValue('resources.'.$resource::uriKey());\n }", "title": "" }, { "docid": "0c7f3ae23b93225868fde0e649f535aa", "score": "0.57749224", "text": "public function show(ShowResourceRequest $request, $id)\n {\n }", "title": "" }, { "docid": "b5b132820f922eef4e644b41ff67adde", "score": "0.57740575", "text": "public function show($id)\n\t{\n\t\t// unneeded for this project\n\t}", "title": "" }, { "docid": "cdbe9eb27e47a619361449d5953ad429", "score": "0.57726145", "text": "public function display()\n {\n\n $this->component->display();\n }", "title": "" }, { "docid": "fbea10219f07495b19ed6548d4ede1a4", "score": "0.5764195", "text": "public function show($id)\n\t{\n\t\t// not supported\n\t}", "title": "" }, { "docid": "cb35029e70932874ca4a7420e41f6917", "score": "0.5749518", "text": "public function discoverAction()\n {\n $this->view->title .= ' - Avaliable Resource';\n\n $data = array_values($this->_findResource());\n\n $this->view->data = $data;\n }", "title": "" }, { "docid": "7aa11579ff48f6202a3402f35980a6d7", "score": "0.574863", "text": "public function show(RestRequestInterface $request, $identifier);", "title": "" }, { "docid": "7fb606c6d980259fc7bc2be7fb3892f7", "score": "0.57364357", "text": "public function display()\n \t{\n \t\techo $this->render();\n \t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57208323", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "7b33ab8280dac7d9e7f301bb46885ef2", "score": "0.57203656", "text": "public function display($action, $status);", "title": "" }, { "docid": "7eca9a150b08650a78b0cbe2467767e8", "score": "0.5714993", "text": "public function show()\n {\n return view('redistask::show');\n }", "title": "" }, { "docid": "a4bb0929797f59b1f372c0ea97423933", "score": "0.5714916", "text": "public function show()\n {\n $product = $this->model('IndexModel')->get($this->getParam()['id']);\n\n $this->template('show', $product);\n }", "title": "" }, { "docid": "91b6c2566d39e03a0eef7bad0aebcd5a", "score": "0.5707991", "text": "public function detailsAction()\n {\n // Get id from url params and check if record exist\n $params = $this->router->getParams();\n if (isset($params[0]) && $device = Devices::findFirst($params[0])) {\n $this->tag->setTitle(__('Devices') . ' / ' . __('Details'));\n $this->view->setVars([\n 'device' => $device,\n ]);\n } else {\n parent::notFoundAction();\n }\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "95c8e483ffde08b500f0a18be5d683d2", "score": "0.5704582", "text": "public function display() {\n\t$this->getRenderer()->dispatch($this);\n\n }", "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": "d49f4e51972ac93263ce45277638f862", "score": "0.56985086", "text": "public function show($id) {\n\t\t\t\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "2204f8d554d9525d60e0aba235700bfd", "score": "0.56858474", "text": "public function locate($resource);", "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": "" } ]
3dd99d95f5e5be69304426dd7db421a9
Obtener los datos del modal registrar faltante. FLETE DE UN GRIFO PROPIO
[ { "docid": "71da4427b35eac25c2edf7e2d62aca52", "score": "0.0", "text": "public function show($id)\n {\n $pedido = Pedido::join('vehiculos','pedidos.vehiculo_id','=','vehiculos.id')\n ->join('transportistas','transportistas.id','=','vehiculos.transportista_id')\n ->join('pedido_grifos','pedido_grifos.pedido_id','=','pedidos.id')\n ->join('grifos','pedido_grifos.grifo_id','=','grifos.id') \n ->where('pedido_grifos.id',$id)\n ->select('pedido_grifos.id as id_pivote',\n 'pedido_grifos.descripcion',\n 'pedido_grifos.fecha_descarga',\n 'pedidos.costo_galon','transportistas.nombre_transportista',\n 'grifos.razon_social','grifos.id as grifo_id')\n ->first(); \n return $pedido; \n }", "title": "" } ]
[ { "docid": "c3920f950634f8daaeee289d5edcb80c", "score": "0.692912", "text": "public function plan_nut_modal_reg()\n {\n\n $llamado = $_POST['llamdo'];\n \n $correo_usuario = $_SESSION['correo'];\n\n $consulta_plan_nut_usuario = $this->db->query(\"SELECT plan_nut FROM AFILIADOS WHERE correo = '$correo_usuario'\");\n $respuesta_plan_nut_usuario = $consulta_plan_nut_usuario->row();\n\n $plan_nut = $respuesta_plan_nut_usuario->plan_nut;\n\n $consulta_Kcal_usuario = $this->db->query(\"SELECT calorias_diaria FROM PLAN_NUTRICIONAL WHERE id_plan = '$plan_nut'\");\n $respuesta_Kcal_usuario = $consulta_Kcal_usuario->row();\n\n $Kcal_usuario = $respuesta_Kcal_usuario->calorias_diaria;\n\n $html = '';\n $calorias_usuario = '';\n \n if (isset($plan_nut) != null) {\n \n $html = \"$plan_nut\";\n $calorias_usuario = \"Tu dieta esta basada en un aporte diario de <b>\".$Kcal_usuario.\"</b> KCal.\";\n\n $response = array(\n\n 'html' => $html,\n 'calorias_usuario' => $calorias_usuario\n\n );\n\n echo json_encode($response);\n\n }else{\n\n $html = 'Procesando...';\n\n $response = array(\n\n 'html' => $html\n\n );\n\n echo json_encode($response);\n\n }\n\n }", "title": "" }, { "docid": "33dc246a8c795e880b05a9c394a69f68", "score": "0.6762465", "text": "public function registroBaseTutoriaController(){\n\t\tif($_COOKIE['nivel']==1)\n\t\t\t$respuesta_alumnos = Datos::obtenerAlumnosModel(\"alumnos\");\n\t\telse\n\t\t\t$respuesta_alumnos = Datos::obtenerAlumnosNivelModel(\"alumnos\",$_SESSION['num_empleado']);\n\n\t\t$st_alumnos=\"\";\n\t\tfor($i=0;$i<sizeof($respuesta_alumnos);$i++)\n\t\t\t$st_alumnos=$st_alumnos.\"<option value='\".$respuesta_alumnos[$i]['matricula'].\"'>\".$respuesta_alumnos[$i]['nombre'].\"</option>\";\n\n\n\t\techo'\n\t\t\t<input type=\"hidden\" id=\"hid\" name=\"hid\"></input>\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<h4>Detalles en la tutoria</h4>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"num_maestro\" value=\"'.$_SESSION['num_empleado'].'\" required>\n\t\t\t\t\t\t<label for=\"fecha\">Fecha:</label>\n\t\t\t\t\t\t<input type=\"date\" name=\"fecha\" required>\n\t\t\t\t\t\t<label for=\"hora\">Hora:</label>\n\t\t\t\t\t\t<input type=\"time\" name=\"hora\" required>\n\t\t\t\t\t\t<label for=\"tipo\">Tipo:</label>\n\t\t\t\t\t\t<select name=\"tipo\" required>\n\t\t\t\t\t\t\t<option value=\"Grupal\">Grupal</option>\n\t\t\t\t\t\t\t<option value=\"Individual\">Individual</option>\n\t\t\t\t\t\t </select>\n\t\t\t\t\t\t<label for=\"Tema\">Tema:</label>\n\t\t\t\t\t\t<input type=\"text\" name=\"tema\" required>\n\t\t\t\t\t\t<button class=\"small success\" onclick=\"sendData();\" type=\"submit\">Registrar</button>\n\t\t\t\t\t\t\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<h4>Alumnos en la tutoria</h4>\n\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t <label for=\"alumno\">Nombre del Alumno:</label>\n\t\t\t\t\t\t\t\t <select name=\"alumno\" class=\"js-example-basic-multiple\" id=\"alumno\">\n\t\t\t\t\t\t\t\t \t'.$st_alumnos.'\n\t\t\t\t\t\t\t\t </select>\n\t\t\t\t\t\t\t\t <br><br>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t <td>\n\t\t\t\t\t\t\t \t<button type=\"button\" class=\"small success\" onclick=\"addAlumno()\">Agregar Alumno</button>\n\t\t\t\t\t\t\t </td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<table>\n\t\t\t\t\t\t<table id=\"alumnos\"></table>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>';\n\n\t\techo'<script>\n\t\t\t\t$(document).ready(function() {\n\t\t\t\t\t$(\".js-example-basic-multiple\").select2();\n\t\t\t\t});\n\n\t\t\t\tvar alumnos=[];\n\t\t\t\tvar send_alumnos=[];\n\t\t\t\tvar tab = document.getElementById(\"alumnos\");\n\n\t\t\t\tfunction updateTable(){\n\t\t\t\t\ttab.innerHTML=\"<tr><th>Matricula</th><th>Nombre</th><th>¿Eliminar?</th><tr>\";\n\t\t\t\t\tfor(var i=0;i<alumnos.length;i++){\n\t\t\t\t\t\ttab.innerHTML=tab.innerHTML+\"<tr><td>\"+alumnos[i][0]+\"</td><td>\"+alumnos[i][1]+\"</td><td><button class=\\'alert\\' type=\\'button\\' onclick=\\'deleteAlumno(\"+i+\");\\'>Eliminar</button></td><tr>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfunction addAlumno(){\n\t\t\t\t\t\n\t\t\t\t\tvar select = document.getElementById(\"alumno\");\n\t\t\t\t\tvar flag=false;\n\t\t\t\t\tfor(var i=0;i<alumnos.length;i++){\n\t\t\t\t\t\tif(alumnos[i][0]==select.options[select.selectedIndex].value && alumnos[i][1]==select.options[select.selectedIndex].text){\n\t\t\t\t\t\t\tflag=true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif(!flag){\n\t\t\t\t\t\talumnos.push([select.options[select.selectedIndex].value,select.options[select.selectedIndex].text]);\n\t\t\t\t\t\tsend_alumnos.push([select.options[select.selectedIndex].value]);\n\t\t\t\t\t\tupdateTable();\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\talert(\"Alumno ya Agregado\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfunction deleteAlumno(index){\n\t\t\t\t\talumnos.splice(index, 1);\n\t\t\t\t\tsend_alumnos.splice(index, 1);\n\t\t\t\t\tupdateTable();\n\t\t\t\t}\n\n\t\t\t\tfunction sendData(){\n\t\t\t\t\tvar hid = document.getElementById(\"hid\");\n\t\t\t\t\thid.value=send_alumnos;\n\t\t\t\t}\n\n\t\t\t</script>';\n\t}", "title": "" }, { "docid": "cdda8bcf6bdd759601d83aaf14071416", "score": "0.6671741", "text": "static public function ctrCrearModalidad(){\r\n\r\n\t\tif(isset($_POST[\"nuevoDescripModalidad\"])){\r\n\r\n\t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevoDescripModalidad\"])){\r\n\r\n\r\n\t\t\t\t$tabla = \"tbl_modalidades\";\r\n\r\n\r\n\t\t\t\t$datos = array(\"DescripModalidad\" => $_POST[\"nuevoDescripModalidad\"]);\r\n\r\n\r\n\t\t\t\t$respuesta = ModeloMatricula::mdlIngresarModalidad($tabla, $datos);\r\n\r\n\t\t\t\tif($respuesta == \"ok\"){\r\n\r\n\t\t\t\t\techo '<script>\r\n\r\n\t\t\t\t\tswal({\r\n\r\n\t\t\t\t\t\ttype: \"success\",\r\n\t\t\t\t\t\ttitle: \"¡La Modalidad sido guardado correctamente!\",\r\n\t\t\t\t\t\tshowConfirmButton: true,\r\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\r\n\t\t\t\t\t\tcloseOnConfirm: false\r\n\r\n\t\t\t\t\t}).then((result)=>{\r\n\r\n\t\t\t\t\t\tif(result.value){\r\n\r\n\t\t\t\t\t\t\twindow.location = \"gestionacademica\";\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\r\n\r\n\t\t\t\t\t</script>';\r\n\r\n\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}else{\r\n\r\n\t\t\t\techo '<script>\r\n\r\n\t\t\t\t\tswal({\r\n\r\n\t\t\t\t\t\ttype: \"error\",\r\n\t\t\t\t\t\ttitle: \"¡El nombre de la Modalidad no puede ir vacía o llevar caracteres especiales!\",\r\n\t\t\t\t\t\tshowConfirmButton: true,\r\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\r\n\t\t\t\t\t\tcloseOnConfirm: false\r\n\r\n\t\t\t\t\t}).then((result)=>{\r\n\r\n\t\t\t\t\t\tif(result.value){\r\n\r\n\t\t\t\t\t\t\twindow.location = \"gestionacademica\";\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\r\n\r\n\t\t\t\t</script>';\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "title": "" }, { "docid": "6e3bd83e380f0a27a7301a73cd84a0c9", "score": "0.6573206", "text": "public function registrar(){\n\t\t$usuario = Container::getModel('Usuario');\n\t\t$usuario -> __set('nome', $_POST['nome']);\n\t\t$usuario -> __set('email', $_POST['email']);\n\t\t$usuario -> __set('senha', $_POST['senha']); //$usuario -> __set('senha', md5($_POST['senha']));\n\t\t$usuario -> __set('codPref', $_POST['cod']);\n\n\t\t//Salvando os DADOS\n\t\t\n\n\t\tif ($usuario -> validarDados() && count($usuario -> getUsuarioPorEmail()) == 0){\n\t\t\t\t$usuario -> salvarDados();\n\t\t\t\t$this -> render('cadastroRealizado');\n\t\t}else{\n\t\t\t$this -> view -> erroCadastro = true;\n\t\t\t$this -> render ('cadastro');\n\t\t}\n\t}", "title": "" }, { "docid": "b2b891289ab5269ab5ca6245e1f32c40", "score": "0.6567447", "text": "public function agregar()\n {\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n //Validacion de posible campo vacio: nombres\n $exc = array();\n $dat = $this->formValidator($_POST, $exc);\n if (is_array($dat)) {\n //Evaluamos si el usuario a editar es de tipo 3 = afiliado, lo cual debe enviar el valor de vigencia capturado del formulario por metodo post\n \n \n //preparamos los datos en un array en la variable datos.\n $datos = [\n 'Nombre' => $_POST[\"Nombre\"],\n 'Telefono' => $_POST[\"Telefono\"],\n \n\n ];\n //Estructura de control, para evaluar el query de agregar usuario\n switch ($this->model->agregarProveedor($datos)) {\n case 1:\n echo true;\n break;\n case 2:\n //Redireccionamos de nuevo al formulario\n echo \"Hubo un error al guardar el registro, por favor vuelva a intenter\";\n break;\n case 3:\n //Redireccionamos a usuarios\n echo \"El Proveedor que quiere registrar ya existe\";\n break;\n }\n\n exit();\n } else {\n echo \"Faltan datos por completar\";\n }\n } else {\n\n redireccionar('/Proveedores');\n }\n }", "title": "" }, { "docid": "990ef968aacc892ccc0091cdfaeac4d5", "score": "0.6522465", "text": "static public function ctrCrearPuntero(){\n\n\t\tif(isset($_POST[\"nuevoNombre\"])){\n\n\t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevoNombre\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevoApellido\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"nuevoCedula\"])){\n\n\t\t\t \t\n\n\t\t\t\t$tabla = \"personas\";\n\n\n\t\t\t\t$datos = array(\"nombre\" => $_POST[\"nuevoNombre\"],\n\t\t\t\t\t \"apellido\" => $_POST[\"nuevoApellido\"],\n\t\t\t\t\t \"ciudad\" => $_POST[\"nuevoCiudad\"],\n\t\t\t\t\t \"barrio\" => $_POST[\"nuevoBarrio\"],\n\t\t\t\t\t \"cedula\" => intval($_POST[\"nuevoCedula\"]),\n\t\t\t\t\t \"id_lider\" => intval($_POST[\"nuevoLider\"]),\n\t\t\t\t\t \"lugar_votacion\" => $_POST[\"nuevoLugar\"],\n\t\t\t\t\t \"numero_orden\" => $_POST[\"nuevoOrden\"],\n\t\t\t\t\t \"numero_mesa\" => $_POST[\"nuevoNumeroMesa\"],\n\t\t\t\t\t \"telefono\"=> $_POST[\"nuevoTelefono\"]);\n\n\n\t\t\t\t$respuesta = ModeloPuntero::mdlIngresarPuntero($tabla, $datos);\n\n\t\t\t\n\t\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\t\techo '<script>\n\n\t\t\t\t\t swal({\n\t\t\t\t\t\t title: \"Puntero registrado\",\n\t\t\t\t\t\t text: \"Registro exitoso\",\n\t\t\t\t\t\t icon: \"success\",\n\t\t\t\t\t\t buttons: true,\n\t\t\t\t\t\t dangerMode: true,\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.then((willDelete) => {\n\t\t\t\t\t\t if (willDelete) {\n\t\t\t\t\t\t window.location = \"puntero\";\n\t\t\t\t\t\t } else {\n\t\t\t\t\t\t window.location = \"puntero\";\n\t\t\t\t\t\t }\n\t\t\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\t\t</script>';\n\n\n\t\t\t\t} else{\n\n\t\t\t\techo '<script>\n\n\t\t\t\t\t swal({\n\t\t\t\t\t\t title: \"Registro incorrecto\",\n\t\t\t\t\t\t text: \"Error al registrar el puntero\",\n\t\t\t\t\t\t icon: \"warning\",\n\t\t\t\t\t\t buttons: true,\n\t\t\t\t\t\t dangerMode: true,\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.then((willDelete) => {\n\t\t\t\t\t\t if (willDelete) {\n\t\t\t\t\t\t window.location = \"puntero\";\n\t\t\t\t\t\t } else {\n\t\t\t\t\t\t window.location = \"puntero\";\n\t\t\t\t\t\t }\n\t\t\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\t</script>';\n\n\t\t\t}\n\n\n\t\t }\n\n\n\t}\n\n\n }", "title": "" }, { "docid": "d530bba0d160af2f59e2a59570e99777", "score": "0.64942837", "text": "public function registrarProvedor()\n {\n\n $datos = array(\n \"nombre\" => $_POST[\"nombre\"],\n \"creado_por\" => 1,\n \"RNC\" => $_POST[\"RNC\"],\n \"correo\" => $_POST[\"correo\"],\n \"telefono\" => $_POST[\"telefono\"],\n \"provincia\" => $_POST[\"idProvincia\"],\n \"ciudad\" => $_POST[\"idCiudad\"],\n \"direccion\" => $_POST[\"direccion\"],\n \"tipoUsuario\" => $_POST[\"tipoUsuario\"],\n \"observacion\" => $_POST[\"observacion\"],\n\n \"estado\" => $_POST[\"estado\"],\n\n\n\n\n );\n\n $respuesta = ProvedoresModel::registrarProvedor($datos);\n\n // print_r($respuesta);\n // echo \"registrado\";\n echo json_encode($respuesta);\n }", "title": "" }, { "docid": "80d33afdc2bc41f5e6d55f1ba5049b2a", "score": "0.6441409", "text": "function registrarProceso() {\n\n //parametros de entrada desde la vista por medio de peticiones AJAX de tipo POST\n $nombre = $this->input->post('nombre');\n $desc = $this->input->post('descripcion');\n $priodidad = $this->input->post('prioridad');\n $role = $this->input->post('role');\n $secuencia = $this->input->post('secuencia');\n\n //se crea un arreglo con los nombres de las columnas de la tabla proceso para luego ser agregados a la base de datos.\n $params['nombre'] = $nombre;\n $params['descripcion'] = $desc;\n $params['prioridad'] = $priodidad;\n $params['orden_secuencia'] = $secuencia;\n $params['id_role'] = $role;\n\n //verificamos si existe un proceso con las mismas caracteristicas\n $existe = $this->Proceso_model->existe_proceso($nombre, $desc);\n //si existe devolvemos un valor codificado como JSON a la vista, de lo contratio continuamos con el proceso de registrar\n if ($existe) {\n echo json_encode(\"exist\");\n } else {\n\n //invoca al metodo de la clase modelo, el cual inserta un nuevo registro a la base de datos\n $result = $this->Proceso_model->registrarProceso($params);\n //restorna el resultado a la vista.\n echo json_encode($result);\n }\n }", "title": "" }, { "docid": "4d6c3f306578cffffba55341d83c3560", "score": "0.6418175", "text": "public function agregar_usuario_controlador(){\n\t\t\t$dni=mainModel::limpiar_cadena($_POST['usuario_dni_reg']);\n\t\t\t$nombre=mainModel::limpiar_cadena($_POST['usuario_nombre_reg']);\n\t\t\t$apellido=mainModel::limpiar_cadena($_POST['usuario_apellido_reg']);\n\t\t\t$telefono=mainModel::limpiar_cadena($_POST['usuario_telefono_reg']);\n\t\t\t$direccion=mainModel::limpiar_cadena($_POST['usuario_direccion_reg']);\n\n\t\t\t$usuario=mainModel::limpiar_cadena($_POST['usuario_usuario_reg']);\n\t\t\t$email=mainModel::limpiar_cadena($_POST['usuario_email_reg']);\n\t\t\t$clave1=mainModel::limpiar_cadena($_POST['usuario_clave_1_reg']);\n\t\t\t$clave2=mainModel::limpiar_cadena($_POST['usuario_clave_2_reg']);\n\n\n\t\t\t$privilegio=mainModel::limpiar_cadena($_POST['usuario_privilegio_reg']);\n\n\n\t\t\t/*== comprobar campos vacios ==*/\n\t\t\tif($dni==\"\" || $nombre==\"\" || $apellido==\"\" || $usuario==\"\" || $clave1==\"\" || $clave2==\"\"){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"No has llenado todos los campos que son obligatorios\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\n\n\t\t\t/*== Verificando integridad de los datos ==*/\n\t\t\tif(mainModel::verificar_datos(\"[0-9-]{8,20}\",$dni)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El DNI no coincide con el formato solicitado\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\tif(mainModel::verificar_datos(\"[a-zA-ZáéíóúÁÉÍÓÚñÑ ]{1,35}\",$nombre)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El NOMBRE no coincide con el formato solicitado\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\tif(mainModel::verificar_datos(\"[a-zA-ZáéíóúÁÉÍÓÚñÑ ]{1,35}\",$apellido)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El APELLIDO no coincide con el formato solicitado\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\tif($telefono!=\"\"){\n\t\t\t\tif(mainModel::verificar_datos(\"[0-9()+]{8,20}\",$telefono)){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\t\"Texto\"=>\"El TELEFONO no coincide con el formato solicitado\",\n\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t];\n\t\t\t\t\techo json_encode($alerta);\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($direccion!=\"\"){\n\t\t\t\tif(mainModel::verificar_datos(\"[a-zA-Z0-9áéíóúÁÉÍÓÚñÑ().,#\\- ]{1,190}\",$direccion)){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\t\"Texto\"=>\"La DIRECCION no coincide con el formato solicitado\",\n\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t];\n\t\t\t\t\techo json_encode($alerta);\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(mainModel::verificar_datos(\"[a-zA-Z0-9]{1,35}\",$usuario)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El NOMBRE DE USUARIO no coincide con el formato solicitado\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\tif(mainModel::verificar_datos(\"[[email protected]]{7,100}\",$clave1) || mainModel::verificar_datos(\"[[email protected]]{7,100}\",$clave2)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"Las CLAVES no coinciden con el formato solicitado\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\n\t\t\t}\n\t\t\t//comprobando DNi\n\t\t\t$check_dni=mainModel::ejecutar_consulta_simple(\"SELECT usuario_dni FROM usuario WHERE usuario_dni='$dni'\");\n\t\t\tif($check_dni->rowCount()>0){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El DNI ingresado ya se encuentra registrado\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\n\t\t\t}\n\t\t\t\t//comprobando usuario\n\t\t\t$check_user=mainModel::ejecutar_consulta_simple(\"SELECT usuario_usuario FROM usuario WHERE usuario_usuario='$usuario'\");\n\t\t\tif($check_user->rowCount()>0){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El NOMBRE DE USUARIO ya se encuentra en el sistema\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\t\t\t// comprobando email\n\t\t\tif($email!=\"\"){\n\t\t\t\tif(filter_var($email,FILTER_VALIDATE_EMAIL)){\n\t\t\t\t$check_email=mainModel::ejecutar_consulta_simple(\"SELECT usuario_email FROM usuario WHERE usuario_email='$email'\");\n\t\t\tif($check_user->rowCount()>0){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El EMAIL ingresado yas e encuentra en el sistema\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\t\n\t\t\t\t}else{\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"Ha ingresado un correo no valido\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//comprobando claves\n\t\t\tif($clave1!=$clave2){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"Las claves que acaba de ingresar no coinciden\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}else{\n\t\t\t\t$clave=mainModel::encryption($clave1);\n\n\t\t\t}\n\t\t\t//comprobando privilegio\n\t\t\tif($privilegio<1 || $privilegio>3){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El PRIVILEGIO selecionado no es valido\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$datos_usuario_reg=[\n\t\t\t\"DNI\"=>$dni,\n\t\t\t\"Nombre\"=>$nombre,\n\t\t\t\"Apellido\"=>$apellido,\n\t\t\t\"Telefono\"=>$telefono,\n\t\t\t\"Direccion\"=>$direccion,\n\t\t\t\"Email\"=>$email,\n\t\t\t\"Usuario\"=>$usuario,\n\t\t\t\"Clave\"=>$clave,\n\t\t\t\"Estado\"=>\"Activo\",\n\t\t\t\"Privilegio\"=>$privilegio\t\n\t\t\t];\n\t\t\t$agregar_usuario=usuarioModelo::agregar_usuario_modelo($datos_usuario_reg);\n\t\t\tif($agregar_usuario->rowCount()==1){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"limpiar\",\n\t\t\t\t\t\"Titulo\"=>\"Usuario registrado\",\n\t\t\t\t\t\"Texto\"=>\"los datos del usuario han sido registrados con exito \",\n\t\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t\t];\n\t\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"No hemos podido registrar el usuario \",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\t\n\t\t\t}\n\t\t\techo json_encode($alerta);\n\n\n\n\t\t\t\n\t\t}", "title": "" }, { "docid": "940c71a6731628b7210580cfcc0799c5", "score": "0.6394979", "text": "public function ingresar(){\n extract($_GET);\n $paso=isset($paso)?$paso:1;\n $cad='';\n \n $template = new clsTinyButStrong;\n \n \n switch($paso){\n case 1://Primero se introducen nombre y otros seria mejor rescatar con tiny\n # Load template with initial form\n $template -> LoadTemplate('modulo/registro/mod_transaccion/_template_initial_data.html');\n $template -> Show( TBS_NOTHING );\n \n # merge combo elements\n $template -> MergeBlock('calidad',$this -> generateTableBlock( 'mod_calidad', array('id_calidad','nombre')));\n $template -> MergeBlock('especie',$this -> generateTableBlock( 'mod_especies', array('id_especies','nombre')));\n \n \n $contentTemp = $template -> Source;\n $cad.= $contentTemp;\n break;\n case 2:\n echo \"<pre>\";\n print_r($_POST);\n echo \"</pre>\";\n //primero almacenar y luego construir la matriz con recargas\n break;\n \n }\n \n echo $cad;\n \n }", "title": "" }, { "docid": "19ecc3ad33de2b4a2fd91f8cd69247f5", "score": "0.63909656", "text": "function pseleccion(){\n\t\t\t\n\t\t\t$periodo = $this -> actualselecc;\n\t\t\t$this -> valida();\n\t\t\t\n\t\t\t$id = Session::get_data('registro_tmp');\n\t\t\n\t\t\t$seleccion = new Seleccionalumno();\n\t\t\t\n\t\t\t$seleccion -> registro = $id;\n\t\t\t$seleccion -> clavemateria = $this -> post(\"materia\");\n\t\t\t$seleccion -> periodo = $periodo;\n\t\t\t$seleccion -> save();\n\t\t\t\n\t\t\t$this->redirect('alumnoselecc/seleccion2');\n\t\t}", "title": "" }, { "docid": "6d394f104699a8d23f2e3450cbee3c0d", "score": "0.638697", "text": "public static function registrarPedidoController(){\r\n if (isset($_POST[\"guardarPedido\"])) { //una vez presionado el boton\r\n //Se obtienen los datos necesarios para introducirlos a la tabla\r\n $total= CrudProductos::sumarTotalPedido(\"pedido\", $_GET[\"idPedido\"]);\r\n //Se obtiene el total del pedido\r\n //Se obtiene en numero de pedido desde la tabla que va siendo llenada por los productos que se agregan al \"carrito\" del pedido.\r\n $pedido=CrudProductos::vistaProdPedidoModel(\"pedido\", $_GET[\"idPedido\"]);\r\n $datos = array(\"fecha_pedido\"=>$pedido[0][\"fecha_pedido\"], \"fecha_entrega\"=>$pedido[0][\"fecha_entrega\"],\"total_pedido\" => $total[\"total\"],\r\n \"proveedor\"=> $pedido[0][\"id_proveedor\"]);\r\n //Se le dice al modelo que en la clase \"CrudProductos\", la funcion \"registroarUsuarioModel\" reciba en sus 2 parametros los valores \"$datos\" y el nombre de la tabla a conectarnos la cual es \"users\"\r\n $respuesta = CrudProductos::registrarPedidoModel(\"pedidos\", $datos);\r\n //Valiación de la respuesta del modelo para ver si es un usuario correcto.\r\n if ($respuesta) {\r\n echo \"<script>swal({title: 'Registro exitoso', text: 'Éxito', type:'success'}, \r\n function (){\r\n window.location.href = 'index.php?action=pedidos'\r\n }); </script>\";\r\n } else {\r\n echo \"<script>swal({title: 'No se realizo el pedido', text: No registrada', type:'error'}); </script>\";\r\n }\r\n }\r\n }", "title": "" }, { "docid": "cf31e7b4115a0e72a08ff833a2eb267e", "score": "0.6382196", "text": "public function registrar() {\n\n /*echo \"<pre>\";print_r($_POST);echo \"</pre>\"; */\n $usuario = Container::getModel('Usuario');\n $usuario->__set('nome', $_POST['nome']);\n $usuario->__set('email', $_POST['email']);\n $usuario->__set('senha', md5($_POST['senha']));\n\n /*echo \"<pre>\";print_r($usuario); echo \"</pre>\";*/\n\n //validar\n if ($usuario->validaCamposCadastro() && count($usuario->validaDuplicidadeCadastro())==0){\n \n $usuario->salvar();\n $this->render('cadastro','layout');\n\n }else{\n\n //em caso de erro ele não limpa os dados dos campos, fazendo com que não precise digitar tudo novamente\n $this->view->dadosUsuario = array(\n 'nome' => $_POST['nome'],\n 'email' => $_POST['email'],\n 'senha' => $_POST['senha'],\n );\n\n $this->view->erroInscricao =true; //para exibir msg em vermelhor que deu errado o cadastro \n\n \n\n $this->render('inscreverse','layout');\n }\n \n \n\n \n\n \n }", "title": "" }, { "docid": "981803b1861aa4c293a60bd4c3fb0b17", "score": "0.63675493", "text": "function datosForm(){\n\t\t\n\t\tif(isset($_POST['accion'])){\n\t\t\t$accion = $_POST['accion'];\n\t\t}else{\n\t\t\t$accion = null;\n\t\t}\n\t\t$controlador = $_POST['controlador'];\n\t\t$grupo = $_POST['grupo'];\n\t\t\n\t\t$permiso = new permiso($grupo,$controlador,$accion);\n\t\treturn $permiso;\n\t}", "title": "" }, { "docid": "cb7d754b1040f6924ef9cdc8388ac5b1", "score": "0.63609755", "text": "public function cargaUsuario(){\n\t\t\t//se toma el id existente mediante el metodo GET\n\t\t\tif (isset($_GET['id'])) {\n\t\t\t\t//a la variable id se le asinga el id obtenido\n\t\t\t\t$id = $_GET['id'];\n\t\t\t\t//se manda a la clase Datos el id y el nombre de la tabla\n\t\t\t\t$respuesta = Datos::cargaUsuario($id, 'usuarios');\n\t\t\t\t//se cra un pequeño form de los campos del usuario con el nombre la contraseña y el email cargados\n\t\t\t\techo '<input type=\"hidden\" name=\"id\" value=\"'.$respuesta[\"id\"].'\">\n\t\t\t\t\t<label>Usuario:</label><br>\n\t\t\t\t\t<input type=\"text\" value=\"'.$respuesta[\"usuario\"].'\" name=\"usuario\" required><br>\n\t\t\t\t\t<label>Contraseña:</label><br>\n\t\t\t\t\t<input type=\"text\" value=\"'.$respuesta[\"password\"].'\" name=\"password\" required><br>\n\t\t\t\t\t<label>Correo:</label><br>\n\t\t\t\t\t<input type=\"email\" value=\"'.$respuesta[\"email\"].'\" name=\"email\" required><br>\n\t\n\t\t\t\t\t<input type=\"submit\" value=\"Actualizar\">';\n\t\t\t}\n\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "9604631b3f2945920588bbe4502cac46", "score": "0.6354529", "text": "static public function ctrRegistrarPago(){\n\n /* Validar variable $_POST */\n if (isset($_POST['idDeudor'], $_POST['idDeuda'], $_POST['cantidadPagada'])) {\n \n $tabla = \"detallespagos\";\n\n $idDeudor = $_POST['idDeudor'];\n $idDeuda = $_POST['idDeuda'];\n $cantidadPagada = $_POST['cantidadPagada'];\n\n //echo $idDeuda, $idDeudor, $cantidadPagada;\n\n $respuesta = ModeloRegistroPagos::mdlRegistroPago($tabla, $idDeudor, $idDeuda, $cantidadPagada);\n\n //var_dump($respuesta);\n\n echo '<br><br>';\n \n if ($respuesta == \"ok\") {\n \n echo '¡El usuario se ha guardado correctamente!';\n \n } else{\n\n echo '¡Error: El usuario no se guardó!';\n\n }\n\n \n }\n\n\n }", "title": "" }, { "docid": "9cddc81e23ae9f9ff284faa9b7df3517", "score": "0.6324934", "text": "public function registrarUsuariosControlador()\n\t{\n\t\tif (isset($_POST['enviars'])) {\n\t\t\t$datos = array(\n\t\t\t\t'nombre' => $_POST['nombreRegistro'],\n\t\t\t\t'apellido' => $_POST['apellidoRegistro'],\n\t\t\t\t't_d' => $_POST['t_dRegistro'],\n\t\t\t\t'n_d' => $_POST['n_dRegistro'],\n\t\t\t\t'fn' => $_POST['fnRegistro']\n\t\t\t);\n\t\t\t$registrarUsuario = new UsuariosModel();\n\t\t\t$respuesta = $registrarUsuario->registarUsuariosModelo($datos);\n\t\t\tif ($respuesta) {\n\t\t\t\t$idPersona = $registrarUsuario->optenerUltimoIdModelo();\n\t\t\t\t$ultimoId = $idPersona[0]['id'];\n\t\t\t}\n\t\t\tif (isset($_POST['enviars'])) {\n\t\t\t\t$datosLogin = array('email' => $_POST['emailRegistro'],\n\t\t\t\t\t'clave' => $_POST['numeroRegistro'],\n\t\t\t\t\t'idPersona' => $ultimoId,\n\t\t\t\t\t'idRol' => 2);\n\t\t\t\t$registarLogin = new LoginModelo();\n\t\t\t\t$respuesta = $registarLogin->registrarLoginModelo($datosLogin);\n\t\t\t\tif ($respuesta == 'success') {\n\t\t\t\t\theader('location:ingresar');\n\t\t\t\t} else {\n\t\t\t\t\tprint \"Usuario no Registrado\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "728adbfa6726102d5fcc66473d24e1e7", "score": "0.63237375", "text": "public function cargar_formacion()\n {\n $CI = &get_instance();\n $CI->load->database();\n\n $token = @$CI->db->token;\n $this->datosObtenidos = json_decode(file_get_contents('php://input'));\n if ($this->datosObtenidos->token != $token)\n { \n exit(\"No coinciden los token\");\n }\n\n $Id = null;\n if (isset($this->datosObtenidos->Datos->Id)) {\n $Id = $this->datosObtenidos->Datos->Id;\n }\n\n $data = array(\n\n 'Titulo' => $this->datosObtenidos->Datos->Titulo,\n 'Usuario_id' => $_GET[\"Id\"],\n 'Establecimiento' => $this->datosObtenidos->Datos->Establecimiento,\n 'Anio_inicio' => $this->datosObtenidos->Datos->Anio_inicio,\n 'Anio_finalizado' => $this->datosObtenidos->Datos->Anio_finalizado,\n 'Descripcion_titulo' => $this->datosObtenidos->Datos->Descripcion_titulo,\n );\n\n $this->load->model('App_model');\n $insert_id = $this->App_model->insertar($data, $Id, 'tbl_usuarios_formacion');\n\n if ($insert_id >= 0) {\n echo json_encode(array(\"Id\" => $insert_id));\n } else {\n echo json_encode(array(\"Id\" => 0));\n }\n }", "title": "" }, { "docid": "f27b5afc0660a32a3b36c20b1a29e9de", "score": "0.63082194", "text": "public function regis()\n {\n //Obtenim els valors del formulari amb el métode POST\n $email = mysql_real_escape_string($_POST['email']);\n $nombre = mysql_real_escape_string($_POST['nombre']);\n $apellidos = mysql_real_escape_string($_POST['apellidos']);\n $contra = mysql_real_escape_string($_POST['contra']);\n $this->dataout = Array();\n //Criderm al procediment per a crear un nou usuari\n $this->db->query('CALL SP_nou_user(\"'.$nombre.'\",\"'.$apellidos.'\",\"'.$email.'\",\"'.$contra.'\");');\n $this->addDataout(array('REGISTRARSE' => 'USUARI REGISTRAT'));\n $this->login();\n }", "title": "" }, { "docid": "d38d4c6a9f209b25fdfd585dba55f992", "score": "0.6304273", "text": "public function cargarModalCorrectivo() \n\t{\n\t\theader(\"Content-Type: text/plain; charset=utf-8\"); //Para evitar problemas de acentos\n\t\t$data['infoCorrectivo'] = FALSE;\n\t\t$data[\"idEquipo\"] = $this->input->post(\"idEquipo\");\n\t\t$data[\"idCorrectivo\"] = $this->input->post(\"idCorrectivo\");\n\t\tif ($data[\"idCorrectivo\"] != 'x')\n\t\t{\n\t\t\t$arrParam = array(\n\t\t\t\t\"idCorrectivo\" => $data[\"idCorrectivo\"]\n\t\t\t);\n\t\t\t$data['infoCorrectivo'] = $this->mantenimientos_model->get_correctivo($arrParam);\n\t\t\t$data[\"idEquipo\"] = $data['infoCorrectivo'][0]['fk_id_equipo_correctivo'];\n\n\t\t}\n\t\t$this->load->view(\"correctivo_modal\", $data);\n }", "title": "" }, { "docid": "b049ac92d9d33c2feea47e9094f5ce16", "score": "0.6301265", "text": "public function ModalEditComentarios() {\n $query = '';\n $query_editar = '';\n $output = array();\n //si viene vacio es porque agrega un nuevo usuario\n if($_POST['btn_action'] == '')\n {\n \n $query_agregar = \"\n INSERT INTO comentario (nombre, email, comentarios, estatus) \n VALUES ('\".$_POST[\"user_name\"].\"' ,'\".$_POST[\"user_email\"].\"', \n '\".$_POST[\"user_textarea\"].\"', 'Inactivo' );\n \"; \n $consultaAgregar = $this->db->query($query_agregar);\n \n if(isset($consultaAgregar))\n {\n echo 'Nuevo Usuario Agregado';\n }\n }\n\n if($_POST['btn_action'] == 'fetch_single')\n {\n \n $query = \"SELECT * FROM comentario WHERE id ='\".$_POST['user_id'].\"'\";\n \n //ejecutamos la consulta\n $consulta = $this->db->query($query);\n $respuesta = $consulta->fetch_all(MYSQLI_ASSOC);\n \n foreach($respuesta as $row)\n {\n $output['user_email'] = $row['email'];\n $output['user_name'] = $row['nombre'];\n $output['user_textarea'] = $row['comentarios'];\n }\n \n echo json_encode($output); \n \n }\n \n if($_POST['btn_action'] == 'Edit')\n {\n \n $query_editar = \"UPDATE comentario SET nombre = '\".$_POST[\"user_name\"].\"',\n email = '\".$_POST[\"user_email\"].\"', comentarios = '\".$_POST[\"user_textarea\"].\"'\n WHERE id = '\".$_POST[\"user_id\"].\"' \";\n $consultaEditar = $this->db->query($query_editar);\n // $respuestaEditar = $consultaEditar->fetch_all(MYSQLI_ASSOC);\n if(isset($consultaEditar))\n {\n echo 'Usuario Editado';\n }\n }\n\n if($_POST['btn_action'] == 'delete'){\n \n $status = 'Activo';\n if($_POST['status'] == 'Activo'){\n \n $status = 'Inactivo';\n }\n $query_estatus = \"\n update comentario\n set estatus = '\".$status.\"'\n where id = '\".$_POST[\"user_id\"].\"'\n \";\n \n $result = $this->db->query($query_estatus);\n if(isset($result)){\n \n echo 'Estatus Cambiado a ' . $status;\n }\n }\n\n // condicion para eliminar la fila seleccionada\n if($_POST['btn_action'] == 'borrar'){\n \n $query_delete = \"\n delete from comentario\n where id = '\".$_POST[\"user_id\"].\"'\n \";\n \n $result = $this->db->query($query_delete);\n if(isset($result)){\n \n echo 'Datos Eliminados ';\n }\n }\n\n }", "title": "" }, { "docid": "5e3ef46dc9970ac9c3cd75aea3ad0e5a", "score": "0.62810034", "text": "function ingresarForm() {\n \n $titulo = \"Ingresar Medico\";\n \n\t // Consulta para el tipo de documento\n $sql = \"SELECT tipo, nombre \n FROM tipo_documento\";\n \n $tipo = $this->queryAll($sql,\"normal\");\n \n include(getTemplate('medico.nuevo.php'));\n return;\n }", "title": "" }, { "docid": "76e22180e2cf9e03bb8492f4392747df", "score": "0.62652177", "text": "function pseleccionT(){\n\t\t\t\n\t\t\t$periodo = $this -> actualselecc;\n\t\t\t$this -> valida();\n\t\t\t\n\t\t\t$id = Session::get_data('registro_tmp');\n\t\t\n\t\t\t$seleccion = new Seleccionalumno();\n\t\t\t\n\t\t\t$seleccion -> registro = $id;\n\t\t\t$seleccion -> clavemateria = $this -> post(\"materia\");\n\t\t\t$seleccion -> periodo = $periodo;\n\t\t\t$seleccion -> save();\n\t\t\t\n\t\t\t$this->redirect('alumnoselecc/seleccion2T');\n\t\t}", "title": "" }, { "docid": "48e7d255fe44fedd3f45fc9caa7530b5", "score": "0.62568104", "text": "public function registrar_empresa_controlador(){\n\n /*-- Recibiendo datos del formulario - Receiving form data --*/\n $tipo_documento=mainModel::limpiar_cadena($_POST['empresa_tipo_documento_reg']);\n $numero_documento=mainModel::limpiar_cadena($_POST['empresa_numero_documento_reg']);\n $nombre=mainModel::limpiar_cadena($_POST['empresa_nombre_reg']);\n $telefono=mainModel::limpiar_cadena($_POST['empresa_telefono_reg']);\n $email=mainModel::limpiar_cadena($_POST['empresa_email_reg']);\n $direccion=mainModel::limpiar_cadena($_POST['empresa_direccion_reg']);\n\n $nombre_impuesto=mainModel::limpiar_cadena($_POST['empresa_impuesto_nombre_reg']);\n $porcentaje_impuesto=mainModel::limpiar_cadena($_POST['empresa_impuesto_porcentaje_reg']);\n $impuestos_facturas=mainModel::limpiar_cadena($_POST['empresa_impuesto_factura_reg']);\n\n /*-- Comprobando campos vacios - Checking empty fields --*/\n if($tipo_documento==\"\" || $numero_documento==\"\" || $nombre==\"\" || $nombre_impuesto==\"\" || $porcentaje_impuesto==\"\" || $impuestos_facturas==\"\"){\n $alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"No has llenado todos los campos que son obligatorios\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n /*-- Verificando integridad de los datos - Checking data integrity --*/\n if(mainModel::verificar_datos(\"[a-zA-Z0-9-]{4,30}\",$numero_documento)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Formato no valido\",\n\t\t\t\t\t\"Texto\"=>\"El NÚMERO DE DOCUMENTO no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n if(mainModel::verificar_datos(\"[a-zA-Z0-9áéíóúÁÉÍÓÚñÑ., ]{3,80}\",$nombre)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Formato no valido\",\n\t\t\t\t\t\"Texto\"=>\"El NOMBRE no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n if($telefono!=\"\"){\n if(mainModel::verificar_datos(\"[0-9()+]{8,20}\",$telefono)){\n $alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Formato no valido\",\n \"Texto\"=>\"El TELÉFONO no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n\n if($direccion!=\"\"){\n if(mainModel::verificar_datos(\"[a-zA-Z0-9áéíóúÁÉÍÓÚñÑ().,#\\- ]{4,97}\",$direccion)){\n $alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Formato no valido\",\n \"Texto\"=>\"La DIRECCIÓN no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n\n if(mainModel::verificar_datos(\"[a-zA-Z]{2,7}\",$nombre_impuesto)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Formato no valido\",\n\t\t\t\t\t\"Texto\"=>\"El NOMBRE DE IMPUESTO no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n if(mainModel::verificar_datos(\"[0-9]{1,2}\",$porcentaje_impuesto)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Formato no valido\",\n\t\t\t\t\t\"Texto\"=>\"El PORCENTAJE DE IMPUESTO no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n /*-- Comprobando tipo de documento - Checking document type --*/\n if(!in_array($tipo_documento, DOCUMENTS_COMPANY)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Formato no valido\",\n\t\t\t\t\t\"Texto\"=>\"El TIPO DE DOCUMENTO no es correcto\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\n /*-- Comprobando email - Checking email --*/\n if($email!=\"\"){\n if(!filter_var($email, FILTER_VALIDATE_EMAIL)){\n $alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Formato no valido\",\n \"Texto\"=>\"Ha ingresado un EMAIL no valido\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n\n /*-- Comprobando impuestos de facturas - Checking invoice taxes --*/\n\t\t\tif($impuestos_facturas!=\"Si\" && $impuestos_facturas!=\"No\"){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Opción no valida\",\n\t\t\t\t\t\"Texto\"=>\"Ha seleccionado valor no valido en MOSTRAR IMPUESTOS de facturas\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n /*-- Comprobando empresas en la DB - Checking company in DB --*/\n $check_empresa=mainModel::ejecutar_consulta_simple(\"SELECT empresa_id FROM empresa\");\n if($check_empresa->rowCount()>=1){\n \t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"Ya existe una empresa registrada, por favor actualice la pagina.\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\t\t\t$check_empresa->closeCursor();\n\t\t\t$check_empresa=mainModel::desconectar($check_empresa);\n\n /*-- Preparando datos para enviarlos al modelo - Preparing data to send to the model --*/\n\t\t\t$datos_empresa_reg=[\n \"empresa_tipo_documento\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Tipo\",\n\t\t\t\t\t\"campo_valor\"=>$tipo_documento\n\t\t\t\t],\n \"empresa_numero_documento\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Numero\",\n\t\t\t\t\t\"campo_valor\"=>$numero_documento\n\t\t\t\t],\n \"empresa_nombre\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Nombre\",\n\t\t\t\t\t\"campo_valor\"=>$nombre\n\t\t\t\t],\n \"empresa_telefono\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Telefono\",\n\t\t\t\t\t\"campo_valor\"=>$telefono\n\t\t\t\t],\n \"empresa_email\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Email\",\n\t\t\t\t\t\"campo_valor\"=>$email\n\t\t\t\t],\n \"empresa_direccion\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Direccion\",\n\t\t\t\t\t\"campo_valor\"=>$direccion\n\t\t\t\t],\n \"empresa_impuesto_nombre\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Impuesto\",\n\t\t\t\t\t\"campo_valor\"=>$nombre_impuesto\n\t\t\t\t],\n \"empresa_impuesto_porcentaje\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Porcentaje\",\n\t\t\t\t\t\"campo_valor\"=>$porcentaje_impuesto\n\t\t\t\t],\n \"empresa_factura_impuestos\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Factura\",\n\t\t\t\t\t\"campo_valor\"=>$impuestos_facturas\n\t\t\t\t]\n ];\n\n /*-- Guardando datos de la empresa - Saving company data --*/\n\t\t\t$agregar_empresa=mainModel::guardar_datos(\"empresa\",$datos_empresa_reg);\n\n\t\t\tif($agregar_empresa->rowCount()==1){\n $alerta=[\n \"Alerta\"=>\"recargar\",\n \"Titulo\"=>\"¡Empresa registrada!\",\n \"Texto\"=>\"Los datos de la empresa se registraron con éxito\",\n \"Icon\"=>\"success\",\n \"TxtBtn\"=>\"Aceptar\"\n ];\n\t\t\t}else{\n $alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Ocurrió un error inesperado\",\n \"Texto\"=>\"No hemos podido registrar los datos, por favor intente nuevamente\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n ];\n\t\t\t}\n\n\t\t\t$agregar_empresa->closeCursor();\n\t\t\t$agregar_empresa=mainModel::desconectar($agregar_empresa);\n\n\t\t\techo json_encode($alerta);\n }", "title": "" }, { "docid": "532f4915dbea76dab9e3df1325ae2a7f", "score": "0.62473315", "text": "public function ModalEditUsuarios() {\n $query = '';\n $query_editar = '';\n $output = array();\n //si viene vacio es porque agrega un nuevo usuario\n if($_POST['btn_action'] == '')\n {\n $query_agregar = \"\n INSERT INTO usuario (correo_name, user_password, user_name, user_type, estatus) \n VALUES ('\".$_POST[\"user_email\"].\"', '\".password_hash($_POST[\"user_new_password2\"], PASSWORD_DEFAULT).\"',\n '\".$_POST[\"user_name\"].\"', '\".$_POST[\"user_type\"].\"', '\".$_POST[\"estatus\"].\"' );\n \"; \n $consultaAgregar = $this->db->query($query_agregar);\n \n if(isset($consultaAgregar))\n {\n echo 'Nuevo Usuario Agregado';\n }\n }\n\n if($_POST['btn_action'] == 'fetch_single')\n {\n \n $query = \"SELECT * FROM usuario WHERE id ='\".$_POST['user_id'].\"'\";\n \n //ejecutamos la consulta\n $consulta = $this->db->query($query);\n $respuesta = $consulta->fetch_all(MYSQLI_ASSOC);\n \n foreach($respuesta as $row)\n {\n $output['user_email'] = $row['correo_name'];\n $output['user_name'] = $row['user_name'];\n $output['user_type'] = $row['user_type'];\n $output['user_estatus'] = $row['estatus'];\n }\n \n echo json_encode($output); \n \n }\n \n if($_POST['btn_action'] == 'Edit')\n {\n if($_POST['user_new_password2'] != ''){\n $query_editar = \"UPDATE usuario SET correo_name = '\".$_POST[\"user_email\"].\"',\n user_password = '\".password_hash($_POST[\"user_new_password2\"], PASSWORD_DEFAULT).\"',\n user_name = '\".$_POST[\"user_name\"].\"',\n user_type = '\".$_POST[\"user_type\"].\"',\n estatus = '\".$_POST[\"estatus\"].\"'\n WHERE id = '\".$_POST[\"user_id\"].\"' \";\n }\n else{\n $query_editar = \"UPDATE usuario SET correo_name = '\".$_POST[\"user_email\"].\"',\n user_name = '\".$_POST[\"user_name\"].\"',\n user_type = '\".$_POST[\"user_type\"].\"',\n estatus = '\".$_POST[\"estatus\"].\"'\n WHERE id = '\".$_POST[\"user_id\"].\"' \";\n }\n \n \n $consultaEditar = $this->db->query($query_editar);\n // $respuestaEditar = $consultaEditar->fetch_all(MYSQLI_ASSOC);\n if(isset($consultaEditar))\n {\n echo 'Usuario Editado';\n }\n }\n\n if($_POST['btn_action'] == 'delete'){\n \n $status = 'Activo';\n if($_POST['status'] == 'Activo'){\n \n $status = 'Inactivo';\n }\n $query_estatus = \"\n update usuario\n set estatus = '\".$status.\"'\n where id = '\".$_POST[\"user_id\"].\"'\n \";\n \n $result = $this->db->query($query_estatus);\n if(isset($result)){\n \n echo 'Estatus Cambiado a ' . $status;\n }\n }\n\n // condicion para eliminar la fila seleccionada\n if($_POST['btn_action'] == 'borrar'){\n \n $query_delete = \"\n delete from usuario\n where id = '\".$_POST[\"user_id\"].\"'\n \";\n \n $result = $this->db->query($query_delete);\n if(isset($result)){\n \n echo 'Datos Eliminados ';\n }\n }\n\n }", "title": "" }, { "docid": "7ca3b943905c8a69f81b9c997521f39c", "score": "0.6245322", "text": "public function Carregar(){\n\t\n\t\t$query \t\t= \"SELECT id, nomeUsua, login, senha, img FROM usuario WHERE id=\".$this->id;\n\t\t$conn \t\t= Conexao::LigarConexao();\n\t\t$resultado \t= $conn->query($query);\n\t\t$lista \t\t= $resultado->fetchAll();\n\t\tforeach($lista as $row){\n\t\t\t$this->nome \t= $row[\"nomeUsua\"];\n\t\t\t$this->login \t= $row[\"login\"];\n\t\t\t$this->senha \t= $row[\"senha\"];\n\t\t\t$this->img\t \t= $row[\"img\"];\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "feba805e350c22d7edc171fd5201654b", "score": "0.62397456", "text": "public function datosciudadano($arr_info = array(), $prioridad=0){\n\n\n\t\t\t$datos_busqueda['nombre'] = $arr_info['primer_nombre'].\" \". $arr_info['segundo_nombre'].\" \".$arr_info['tercer_nombre'].\" \".$arr_info['primer_apellido'].\" \".$arr_info['segundo_apellido'].\" \".$arr_info['apellido_casada'];\n\t\t\t$foto = $arr_info['foto'];\n?>\n\n<?php $this->beginWidget('bootstrap.widgets.TbModal', array('id'=>'myModal')); ?>\n\n<div class=\"modal-header\">\n <a class=\"close\" data-dismiss=\"modal\">&times;</a>\n <h4>Información</h4>\n</div>\n\n<div class=\"modal-body\">\n <p>\n \tEjecutar una orden de captura es un fenómeno complicado dentro de la Policía Nacional Civil, especialmente por la calidad de la información bajo la cual se emiten las órdenes de captura.<br/><br/>\n \tUn ejemplo de lo anterior son aquellas órdenes de captura en las que se indican los sobrenombres de una persona: en estos casos, el policía que desee ejecutar la orden de captura, se arriesga a captura a la persona equivocada y se expone a una acusación de detención ilegal.<br/><br/>\n \tPara mejorar los niveles de certeza bajo los cuales se identifican las órdenes de captura dentro de la base de datos, el sistema utiliza diferentes criterios para localizar una orden de captura para una persona dada:<br /><br/>\n \t1.- <strong>Nombres y apellidos:</strong> coincidencia de nombres y apellidos. El sistema utiliza mecanismos que permiten identificar nombres “parecidos” como “karla” y “carla” o “Pérez” y “peres”, incluso, si una persona tiene dos nombres, busca órdenes de captura en las que se identifica únicamente el segundo nombre, o únicamente por el primer nombre.<br /><br/>\n \t2.-<strong>Cédula de vecindad:</strong> se utiliza como criterio de búsqueda el número de órden y el número de registro. Se ignora el municipio donde se emitió la cédula ya que generalmente las órdenes de captura no indican dicho criterio.<br /><br/>\n\t\t3.-<strong>Número de CUI (DPI):</strong> Identificación emitida por el RENAP. Este es el criterio de mayor certeza.<br /><br />\n \t4.-<strong>Fecha de nacimiento:</strong> Fecha de nacimiento indicada en la orden de captura.<br /><br />\n \t5.-<strong>Nombre de los padres:</strong> Si se indica nombres de los padres en la orden de captura, los mismos son utilizados a modo de referencia.<br /><br />\n \tDe acuerdo al criterio mediante el cual se encuentra una orden de captura, es mayor la certeza de que la orden de captura debe ejecutarse. Esta certeza se presenta en tres diferentes colores:<br /><br />\n\n \t<table border=\"1\">\n \t\t<tr bgcolor=\"#4F81BD\">\n \t\t\t<td style=\"color: white; font-weight: bold; font-size: 15px;\">#</td>\n \t\t\t<td style=\"color: white; font-weight: bold; font-size: 15px; width: 100px;\">Color</td>\n \t\t\t<td style=\"color: white; font-weight: bold; font-size: 15px; width: 200px;\">Criterio</td>\n \t\t\t<td style=\"color: white; font-weight: bold; font-size: 15px;\">Recomendaciones</td>\n \t\t</tr>\n \t\t<tr bgcolor=\"#D3DFEE\">\n \t\t\t<td>1</td>\n \t\t\t<td>ROJO <img src=\"images/prioridad1.png\" width=\"25px\" height=\"25px\" /></td>\n \t\t\t<td>Coincide por DPI</td>\n \t\t\t<td>Ejecutar la orden de captura</td>\n \t\t</tr>\n \t\t<tr>\n \t\t\t<td>2</td>\n \t\t\t<td>ROJO <img src=\"images/prioridad1.png\" width=\"25px\" height=\"25px\" /></td>\n \t\t\t<td>\n \t\t\t\tCoinciden dos de los cuatro criterios restantes <br />\n\t\t\t\t\t•\tcédula,<br />\n\t\t\t\t\t•\tnombres y apellidos<br />\n\t\t\t\t\t•\tfecha de nacimiento<br />\n\t\t\t\t\t•\tnombre de los padres\n\n \t\t\t</td>\n \t\t\t<td valign=\"top\">Ejecutar la orden de captura</td>\n \t\t</tr>\n \t\t<tr bgcolor=\"#D3DFEE\">\n \t\t\t<td>3</td>\n \t\t\t<td>AMARILLO <img src=\"images/prioridad2.png\" width=\"25px\" height=\"25px\" /></td>\n \t\t\t<td>\n \t\t\t\tCoincide uno de los siguientes criterios:<br />\n\t\t\t\t\t•\tcédula,<br />\n\t\t\t\t\t•\tnombres y apellidos\n\n \t\t\t</td>\n \t\t\t<td>\n \t\t\t\tInvestigar mayor información, de acuerdo a lo que indique la orden de captura: nombre del cónyuge, lugar de residencia, etc.\n \t\t\t</td>\n \t\t</tr>\n \t\t<tr>\n \t\t\t<td>4</td>\n \t\t\t<td>NEGRO <img src=\"images/prioridad3.png\" width=\"25px\" height=\"25px\" /></td>\n \t\t\t<td>\n \t\t\t\tÚnicamente coincide uno de los siguientes criterios:<br />\n\t\t\t\t\t•\tcédula,<br />\n\t\t\t\t\t•\tnombres y apellidos<br />\n\t\t\t\t\t•\tfecha de nacimiento<br />\n\t\t\t\t\t•\tnombre de los padres\n\n \t\t\t</td>\n \t\t\t<td>\n \t\t\t\tAunque es probable que se trate de la misma persona, no existe suficiente información para respaldar la orden de captura.\n \t\t\t</td>\n \t\t</tr>\n \t</table>\n</div>\n\n<div class=\"modal-footer\">\n <?php $this->widget('bootstrap.widgets.TbButton', array(\n \t'type'=>'danger',\n 'label'=>'Close',\n 'url'=>'#',\n 'htmlOptions'=>array('data-dismiss'=>'modal'),\n )); ?>\n</div>\n\n<?php $this->endWidget(); ?>\n\n<div class=\"row-fluid\">\n\t<? echo \"<div id='informa'><a href='#myModal' role='button' rel='tooltip' title='Información de prioridades' class='' data-toggle='modal'></a></div>\"; ?>\n <div id='nciudadano' class=\"span12\"><?\n\n\t\t\t \t\t\tif($foto==NULL)\n\t\t\t \t\t\t{\n\t\t\t \t\t\t\techo \"<div style='margin-top:10px;'>\".$datos_busqueda['nombre'].\"</div>\";\n\t\t\t\t\t\t\techo \"<div id='ft1'><img src='\".$prioridad.\"'></div>\";\n\t\t\t \t\t\t\t//\techo \"no tiene fotografia\";\n\t\t\t \t\t\t}else{\n\t\t\t \t\t\tif(strlen($foto)>500)\n\t\t\t \t\t\t{\n\t\t\t \t\t\t\t\t$res = $foto;\n\n\t\t\t\t\t\t\t$xml = new SimpleXMLElement($res);\n\t\t\t \t\t\t\t$newdataset = $xml->children();\n\t\t\t \t\t\t\t$objetos = get_object_vars($newdataset);\n\t\t\t \t\t\t\t$fotica=$objetos['PortraitImage'];\n\t\t\t \t\t\t\techo '<img src=\"data:image/png;base64,'.$fotica.'\" width=\"50\" height=\"50\">';\n\n\t\t\t \t\t\t}else{\n\n\t\t\t\t\t\t\t$src = Yii::app()->request->baseUrl.'/images/nodisponible.png';\n\t\t\t\t\t\t\techo '<img src=\"'.$src.'\" width=\"50\" height=\"50\">';\n\t\t\t \t\t\t}\n\t\t\t\t\t\t\techo \"<div style='margin-top:10px;'>\".$datos_busqueda['nombre'].\"</div>\";\n\n\n\n\n\t\t\t\t\t\t\tif($prioridad==0){\n\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\techo \"<div id='ft'><img src='\".$prioridad.\"'></div>\";\n\t\t\t\t\t\t\t}\n\n\n\n\n#\t$this->widget('bootstrap.widgets.TbButton', array(\n# 'label'=>'Click me',\n# 'type'=>'primary',\n# 'htmlOptions'=>array(\n# 'data-toggle'=>'modal',\n# 'data-target'=>'#myModal',\n# ),));\n\t\t\t \t\t\t}\n\n\t\t\t \t\t\t?></div></div><?\n\n}", "title": "" }, { "docid": "ee283b6e8ddd401a0bba56ea283e3440", "score": "0.62302643", "text": "function muestraFormularioProyecto() {\n\t\t$arrayPonderacion= array();\n\t\t$tit=EDITAACCION;\n\t\t$name=\"updateProyecto\";\n\t\t$boton=UPDATEPROYECTO;\n\t\tif($this->data['opc'] ==1){\n\t\t\t$tit=ALTADEACCIONES;\n\t\t\t$name=\"saveProyectoAdmin\";\n\t\t\t$boton=GUARDARPROYECTO;\n\t\t}\n\t\tif(count($this->arrayDatos)>0){\n\t\t\tif(trim($this->arrayDatos ['especifique']) == \"\")\n\t\t\t\t$this->arrayDatos ['especifique']='NOAPLICA';\n\t\t}\n\t\t$arrayPonderacion[1]=\" checked \";\n\t\tif($this->data['opc'] >1){\n\t\t\t$arrayPonderacion = $this->regresaPonderacion();\n\t\t}\n\t\tif(trim($this->arrayDatos['presupuesto_otorgado'])!= \"\")\n\t\t\t$presu = number_format($this->arrayDatos['presupuesto_otorgado'],2,'.',',');\n\t\tif(trim($this->arrayDatos['presupuesto_estimado'])!= \"\")\n\t\t$estim = number_format($this->arrayDatos['presupuesto_estimado'],2,'.',',');\n\t\t$random = rand(1,1000000);\n\t\t$this->buffer = \"\n \t<input type='hidden' name='valueId' id='valueId' value='\".($this->arrayDatos ['id'] + 0).\"'>\n \t<input type='hidden' name='idproyecto' id='idproyecto' value='\".($this->arrayDatos ['proyecto_id'] + 0).\"'>\n \t<input type='hidden' name='idano' id='idano' value='\".$this->session['anocaptura'].\"'>\n \t<div class='panel panel-danger spancing'>\n\t\t\t\t<div class='panel-heading'>\".$tit.\"</div>\n \t\t\t\t<div class='panel-body' id='panelFormaProyecto'>\n \t\t<table width='90%' align='center' border='0' class='table-striped'> \n\t\t\t\t<tr class='altotitulo'>\n\t <td class='tdleft bold'>\".ANOCORRESPONDIENTE.\"</td>\n \t <td class='tdcenter' width='8%'>&nbsp;</td>\n \t<td class='tdleft alinea'>\".$this->session['anocaptura'].\"</b></td>\n\t\t\t\t</tr>\n <tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".AGREGARAREAYPROGRAMAS.\"</td>\n <td class='tdcenter' width='8%'>&nbsp;</td>\n <td class='tdleft alinea'><button class='ui-icon-add' data-toggle='modal' data-target='#myModalAreas' id='btn-5'></button></td>\n\t\t\t\t</tr>\n \t<tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".AREAYPROGRAMAS.\"</td>\n <td class='tdcenter' width='8%'>&nbsp;</td>\n <td class='tdleft alinea'><span id='NmAreas'></span></td>\n\t\t\t\t</tr>\n \t\n \t<tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".PROYECTO.\"</td>\n <td class='tdcenter' width='8%'>\n \t<img src='\".$this->path.\"imagenes/iconos/help.png' id='a-1' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'>\t\n </td>\n <td class='tdleft alinea'><input type='text' \".$this->disabled.\" class='form-control validatextonumero' placeholder='\".PROYECTOS.\"' id='inputNombre' maxlength='250' value='\".$this->arrayDatos ['proyecto'].\"' style='width:350px;'></td>\n\t\t\t\t</tr>\n \t<tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".PONDERACION.\"&nbsp;&nbsp;</td>\n <td class='tdcenter' width='5%'><img src='\".$this->path.\"imagenes/iconos/help.png' id='a-2' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'></td>\n <td class='tdleft alinea' colspan='2'>\n <input type='radio' name='ponderacion' id='ponderacion5' \".$arrayPonderacion[5].\" \".$this->disabled.\" value='5'>5&nbsp;&nbsp;\n <input type='radio' name='ponderacion' id='ponderacion4' \".$arrayPonderacion[4].\" \".$this->disabled.\" value='4'>4&nbsp;&nbsp;\n <input type='radio' name='ponderacion' id='ponderacion3' \".$arrayPonderacion[3].\" \".$this->disabled.\" value='3'>3&nbsp;&nbsp;\n <input type='radio' name='ponderacion' id='ponderacion2' \".$arrayPonderacion[2].\" \".$this->disabled.\" value='2'>2&nbsp;&nbsp;\n <input type='radio' name='ponderacion' id='ponderacion1' \".$arrayPonderacion[1].\" \".$this->disabled.\" value='1'>1\n </td>\n \t</tr>\n \t<tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".DESCRIPCIONDELPROYECTO.\"</td>\n <td class='tdcenter' width='5%'><img src='\".$this->path.\"imagenes/iconos/help.png' id='a-3' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'></td>\n <td class='tdleft alinea'>\n <textarea required='yes' maxlength='2000' \".$this->disabled.\" class='bootstrap-select validatextonumero espTextArea summernote' placeholder='\".DESCRIPCIONDELPROYECTO.\"' name='descripcion' id='descripcion'>\".$this->arrayDatos ['descripcion'].\"</textarea>\n </td>\n \t</tr>\n \t<tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".RESULTADOSESPERADOS.\"</td>\n <td class='tdcenter' width='5%'><img src='\".$this->path.\"imagenes/iconos/help.png' id='a-4' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'></td>\n <td class='tdleft alinea'>\n <textarea required='yes' maxlength='2000' \".$this->disabled.\" class='bootstrap-select validatextonumero espTextArea summernote' placeholder='\".RESULTADOSESPERADOS.\"' name='resultados' id='resultados'>\".$this->arrayDatos ['resultados'].\"</textarea>\n </td>\n \t</tr>\n \t<tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".PRESUPUESTO.\"</td>\n <td class='tdcenter' width='5%'>\n \t<img src='\".$this->path.\"imagenes/iconos/help.png' id='a-7' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'>\n </td>\n <td class='tdleft alinea'>\".(date('Y') - 1).\"&nbsp;&nbsp;$&nbsp\n \t<input type='text' class='form-control-num validanums' \".$this->disabled.\" placeholder='\".PRESUPUESTONUMBER.\"' name='presupuesto_1' id='presupuesto_1' size='12' value='\".$presu.\"'>&nbsp;&nbsp;\".OTORGADO.\"\n </td>\n \t</tr>\n \t<tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;&nbsp;&nbsp;</td>\n <td class='tdcenter' width='5%'>\n \t<img src='\".$this->path.\"imagenes/iconos/help.png' id='a-8' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'>\n </td>\n <td class='tdleft alinea'>\".(date('Y') + 0).\"&nbsp;&nbsp;$&nbsp;\n \t<input type='text' class='form-control-num validanums' \".$this->disabled.\" placeholder='\".PRESUPUESTONUMBER.\"' name='estimado_1' id='estimado_1' value='\".$estim.\"'>&nbsp;&nbsp;\".ESTIMADO.\"\n </td>\n \t</tr>\n \t<tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".ENCOORDINACION.\"</td>\n <td class='tdcenter' width='5%'>\n \t<img src='\".$this->path.\"imagenes/iconos/help.png' id='a-9' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'>\n \t</td>\n \t<td class='tdleft alinea'>\".$this->enCoordinacion().\"</td>\n \t</tr>\n \n \t<tr class='altotitulo' id='trespecifique'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".ESPECIFIQUE.\"</td>\n <td class='tdcenter' width='5%'>\n \t<img src='\".$this->path.\"imagenes/iconos/help.png' id='a-10' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'>\n </td>\n <td class='tdleft alinea'>\n <textarea class='bootstrap-select espTextArea2' \".$this->disabled.\" placeholder='\".ESPECIFIQUE.\"' name='especifique' id='especifique'>\".$this->arrayDatos ['especifique'].\"'</textarea>\n </td>\n \t</tr>\n \t<tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".METODO.\"</td>\n <td class='tdcenter' width='5%'>\n \t<img src='\".$this->path.\"imagenes/iconos/help.png' id='a-17' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'>\n </td>\n\t\t\t\t<td class='tdleft alinea'>\".$this->metodoParticipacion().\"</td>\n \t</tr>\t\t\t\t\t\t\n \t<tr class='altotitulo'>\n <td class='tdleft bold'>&nbsp;&nbsp;*&nbsp;&nbsp;\".UNIDADOPERATIVA.\"</td>\n <td class='tdcenter' width='5%'>\n \t<img src='\".$this->path.\"imagenes/iconos/help.png' id='a-5' class='help' alt='\".AYUDA.\"' title='\".AYUDA.\"'>\n </td>\n <td class='tdleft alinea'>\".$this->generaUnidadesOperativas().\"&nbsp;&nbsp;\n \t<input type='hidden' value='1' name='idresponsableunidado' id='idresponsableunidado'>\n \t\t<button class='ui-icon-add' data-toggle='modal' data-target='#myModalUOperativa' id='btn-5'></button></td>\n \t</tr>\n \t<tr>\n <td class='tdcenter bold' colspan='6'><span id='resultado' class='error'></span></td>\n \t</tr> \t\t\n \t\t<tr>\n <td class='tdcenter legend' colspan='6'><br>\";\n\t\t\t\tif(!$this->visible)\n \t$this->buffer.=\"<button type='button' class='btn btn-success' id='\".$name.\"' name='\".$name.\"'\n \t\tdata-toggle='tooltip' data-placement='bottom' title='\".TOOLTIPGUARDARPROYECTO.\"'><span class='glyphicon glyphicon-floppy-saved'></span>&nbsp;\".$boton.\"</button>\";\n\t\t\n \t\t\t$this->buffer.=\"<button type='button' class='btn btn-primary btn-sm'\n \tonclick=\\\"location='\".$this->path.\"aplicacion.php?aplicacion=\".$this->session ['aplicacion'].\"&apli_com=\".$this->session ['apli_com'].\"&opc=0'\\\">\".REGRESA.\"</button> \t\t\n </td>\n \t</tr>\n \t\t</table></div>\".$this->procesando(3).\"</div>\";\n\t\t\t$this->buffer.=$this->ModalAreas(\"myModalAreas\",1,$random);\n\t\t\t$this->buffer.=$this->Modal(\"myModalUOperativa\",2);\n\t\t\t\n\t}", "title": "" }, { "docid": "d803921640d2905dd963f97fa1d35980", "score": "0.62271094", "text": "function _GetFrm(){\n\t\t// Cargo desde el formulario\n\t\t// Cargo desde el formulario\n\t\t$this->Registro['id_video'] = $_POST['id_video'];\n\t\t$this->Registro['id_categoria_documento'] = $_POST['id_categoria_documento'];\n\t\t$this->Registro['nombre'] = $_POST['nombre'];\n\t\t$this->Registro['codigo'] = $_POST['codigo'];\n\t\t$this->Registro['preferencial'] = $_POST['preferencial'];\n\t}", "title": "" }, { "docid": "52be23dfd139f2acd359b702cf6b95bf", "score": "0.6208536", "text": "public function registrar(){\n //Lo que tengo entre getPost(\"\") es el name que puse a cada input\n $nombre=$this->request->getPost(\"nombre\");\n $foto=$this->request->getPost(\"foto\");\n $edad=$this->request->getPost(\"edad\");\n $descripcion=$this->request->getPost(\"descripcion\");\n $tipo=$this->request->getPost(\"tipo\");\n\n //2. Valido que llego\n if($this->validate('nombre')){\n\n\n // 3 se organizan los datos en un array\n // los naranjados(claves)deben comincidir\n // con el nombre de las columns de nd\n\n $datos=array(\n\n \"nombre\"=>$producto,\n \"foto\"=>$foto,\n \"edad\"=>$precio,\n \"descripcion\"=>$descripcion,\n \"tipo\"=>$tipo\n \n );\n \n // intentemos grabar los datos en db\n\n try{\n $modelo=new AnimalModelo();\n $modelo->insert($datos);\n return redirect()->to(site_url('/productos/registro'))->with('mensaje',$error->getMessage());\n\n }catch(\\Exception $error){\n return redirect()->to(site_url('/productos/registro'))->with('mensaje',\"Exito agragando el producto\");\n }\n\n }else{\n\n $mensaje=\"tienes datos pendientes\";\n return redirect()->to(site_url('/productos/registro'))->with('mensaje',$mensaje);\n\n //echo(\"tienes datos pendientes\");\n\n }\n\n\n\n\n\n\n }", "title": "" }, { "docid": "80713ded2e3cbaa8d61c225f0c7725b0", "score": "0.62036747", "text": "public static function registrarCompraController(){\r\n if (isset($_POST[\"guardarCompra\"])) { //Se presionó el botón de registro.\r\n $total= CrudProductos::sumarTotalCompra(\"compra\"); //Se suma el total del precio de compra de todos los productos que fueron\r\n //agregados al carrito\r\n $datos = array(\"total_compra\" => $total[\"total\"], \"proveedor\"=> $_POST[\"proveedor\"]);\r\n //Se le dice al modelo que en la clase \"CrudProductos\", la funcion \"registroarCompraModel\"\r\n // reciba en sus 2 parametros los valores \"$datos\" y el nombre de la tabla a conectarnos la cual es \"compras\"\r\n $respuesta = CrudProductos::registrarCompraModel(\"compras\", $datos);\r\n //Valiación de la respuesta del modelo para ver si es un usuario correcto.\r\n if ($respuesta) {\r\n echo \"<script>swal({title: 'Compra registrada con éxito', text: 'Éxtio', type:'success'}, \r\n function (){\r\n window.location.href = 'index.php?action=compras'\r\n }); </script>\";\r\n } else {\r\n echo \"<script>swal({title: 'No se realizo la compra', text: No registrada', type:'error'}); </script>\";\r\n }\r\n\r\n }\r\n }", "title": "" }, { "docid": "9ca9658e06a69521c5e044c8748e7835", "score": "0.619542", "text": "function datosUsuario()\n\t{\n\t\t$registro=$this->verificarUsuario();\n\t\tif(is_array($registro))\n\t\t{\n\t\t\t?><table class=\"formulario\" align=\"center\">\n\t\t\t\t\t\t<tr class=\"bloquecentralencabezado\">\n\t\t\t\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t\t\t\t<p><span class=\"texto_negrita\">Datos Registrados del Usuario</span></p>\n\t\t\t\t\t\t\t</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>\n\t\t\t\t\t\t\t\tNombre:\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class=\"texto_negrita\">\n\t\t\t\t\t\t\t\t<? echo $registro[0][1] ?>\n\t\t\t\t\t\t\t</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>\n\t\t\t\t\t\t\t\tidentificaci&oacute;n:\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class=\"texto_negrita\">\n\t\t\t\t\t\t\t\t<? echo $registro[0][0] ?>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<?\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "10ebcf35cc1fa4d7489b7816f4c6aecf", "score": "0.61899495", "text": "function datosUsuario()\n\t{\n\t\t$registro=$this->verificarUsuario();\n\t\tif(is_array($registro))\n\t\t{\n\t\t\t?><table class=\"formulario\" align=\"center\">\n\t\t\t\t\t\t<tr class=\"bloquecentralencabezado\">\n\t\t\t\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t\t\t\t<p><span class=\"texto_negrita\">Datos Registrados del Estudiante</span></p>\n\t\t\t\t\t\t\t</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>\n\t\t\t\t\t\t\t\tNombre:\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class=\"texto_negrita\">\n\t\t\t\t\t\t\t\t<? echo $registro[0][1] ?>\n\t\t\t\t\t\t\t</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>\n\t\t\t\t\t\t\t\tidentificaci&oacute;n:\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class=\"texto_negrita\">\n\t\t\t\t\t\t\t\t<? echo $registro[0][0] ?>\n\t\t\t\t\t\t\t</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>\n\t\t\t\t\t\t\t\tTipo de Documento:\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class=\"texto_negrita\">\n\t\t\t\t\t\t\t\t<? echo $registro[0][6] ?>\n\t\t\t\t\t\t\t</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>\n\t\t\t\t\t\t\t\tG&eacute;nero:\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class=\"texto_negrita\">\n\t\t\t\t\t\t\t\t<? echo $registro[0][7] ?>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<?\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "ef9082d1cba8a0bb97fe2ff34d4c9e1d", "score": "0.6175682", "text": "public function modalidad(){\n\n\t\t\t\t\t\t$this->load->library('form_validation');\n\t\t\t\t\t\t$this->load->helper('form','url');\n\t\t\t\t\t\t$this->sise_model->valida_sesion();\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->sise_model->Estar_aqui();\n\t\t\t\t\t\t$data['sesion'] = $this->sise_model->datos_sesion();\n\t\t\t\t\t\t$data['menu'] = $this->sise_model->datos_menu();\n\t\t\t\t\t\t$hola=$this->sise_model->devuelve_modalida();\n\t\t\t\t\t\t$data['modalidad']=$hola;\n\t\t\t\t\t\t$resul=$this->sise_model->devuelve_nivel_academico();\n\t\t\t\t\t\t$data['nivel']=$resul;\n\n\t\t\t\t\t\t$this->load->view('templates/panel/header',$data);\n\t\t\t\t\t\t$this->load->view('templates/panel/menu',$data);\n\t\t\t\t\t\t$this->load->view('templates/panel/modalidad',$data);\n\t\t\t\t\t\t$this->load->view('templates/panel/footer');\n\t\t\t\t\t}", "title": "" }, { "docid": "5b9ac1782a42a7e85f0df0167f13e8a1", "score": "0.6166617", "text": "function registrar_correspondencia()\n {\n // VERIFICAMOS SI EXISTE SESION ABIERTA \n if (!$this->session->userdata('aprobado')) {redirect ('acceso', 'refresh'); exit();}\n \n // COMPROBAMOS QUE LA CORRESPONDENCIA NO ESTE REPETIDA; TOMANDO EN CUENTA LOS CAMPOS:\n // id_organismo, nro_comunicado y fecha_emision\n \n $datos=array(\n // Campos que vienen por POST \n 'id_organismo'=>$this->input->post('id_organismo'),\n 'remitente_receptor'=>ucfirst($this->input->post('remitente_receptor')),\n 'nro_comunicado'=>mb_convert_case($this->input->post('nro_comunicado'),MB_CASE_UPPER),\n 'codigo_interno'=>mb_convert_case($this->input->post('codigo_interno'),MB_CASE_UPPER),\n 'id_tipo'=>$this->input->post('id_tipo'),\n 'id_clasificacion'=>$this->input->post('id_clasificacion'),\n 'fecha_recepcion'=>$this->input->post('fecha_recepcion'),\n 'fecha_emision'=>$this->input->post('fecha_emision'),\n 'asunto'=>ucfirst($this->input->post('asunto')),\n 'observaciones'=>ucfirst($this->input->post('observaciones')),\n 'id_usuario_asignado'=>$this->session->userdata('id_usuario'),\n 'entrante'=>$this->input->post('entrante'),\n \n // Campos Automáticos\n 'id_estructura_owner' => $this->session->userdata('id_estructura'),\n 'codigo_generado'=>$this->_generar_codigo($this->input->post('entrante'),\n $this->input->post('fecha_recepcion'))\n );\n \n // PROCEDEMOS A INSERTAR LA CORRESPONDENCIA\n $insertado=$this->Crud->insertar_registro('cor_correspondencias', $datos);\n if (!$insertado){die('Error');}\n \n // PREPARAMOS PARA INSTERTAR EL MOVIMIENTO INICIAL\n $id_correspondencia=$this->db->insert_id(); // OBTENEMOS LA id_correspondencia INSERTADA\n \n date_default_timezone_set('America/Caracas'); // Establece la Hora de Venezuela para funciones de fecha y hora\n $fecha=getdate(time());\t\n $fecha['mday']=($fecha['mday']<10)?\"0\".$fecha['mday'] :$fecha['mday'];\n $fecha['mon']=($fecha['mon']<10)?\"0\".$fecha['mon'] :$fecha['mon'];\n $Hoy=$fecha['mday'].\"/\".$fecha['mon'].\"/\".$fecha['year'];\n \n $accion= \"Registro de Correspondencia el día: \";\n $accion.= $this->_diasemana($fecha).\", \".$Hoy.\" a las: \".Date('h:iA');\n \n $movimiento=array(\n 'id_correspondencia' => $id_correspondencia,\n 'id_usuario' => $datos['id_usuario_asignado'],\n 'id_tipo_movimiento' => 1,\n 'movimiento' =>$accion\n );\n \n // PROCEDEMOS A INSTERTAR EL MOVIMIENTO INICIAL\n $insertado=$this->Crud->insertar_registro('cor_movimientos', $movimiento);\n if (!$insertado){die('Error');}\n \n // REGISTRAMOS EN BITACORA \n $registro='id_correspondencia: '.$id_correspondencia;\n $registro.=', correspondencia: '.$datos['codigo_generado'];\n $registro.='. Registrado por: '.$this->session->userdata('usuario');\n $bitacora=array(\n 'direccion_ip' =>$this->session->userdata('ip_address'),\n 'navegador' =>$this->session->userdata('user_agent'),\n 'id_usuario' =>$this->session->userdata('id_usuario'),\n 'controlador' =>$this->uri->uri_string(),\n 'tabla_afectada' =>'cor_correspondencia',\n 'tipo_accion' =>'INSERT',\n 'registro' =>$registro\n );\n $this->Crud->insertar_registro('z_bitacora', $bitacora); \n \n $salida=array('codigo_generado'=>$datos['codigo_generado'],\n 'id_correspondencia'=>$id_correspondencia\n );\n// $salida=array('codigo_generado'=>'S11-1201-0001',\n// 'id_correspondencia'=>$id_correspondencia\n// );\n die(json_encode($salida));\n }", "title": "" }, { "docid": "f72008f4a4656bbf666bec2616b176c1", "score": "0.6163797", "text": "public function generaUsuario()\n {\n //consulta el tipo de usuario para mostrar en el formulario\n $tipo = $this->Usuario_model->tipoUsuario();\n $datos ['tipo'] = $tipo;\n //consulta las dependencias para mostrar en el formulario\n $depen = $this->Usuario_model->getDependencia();\n $datos ['depen'] = $depen;\n //carga las vistas y los datos de las consultas anteriores\n $this->load->view('templates/head');\n $this->load->view('genera_usuario',$datos);\n $this->load->view('templates/footer');\n }", "title": "" }, { "docid": "071bf79d6c333b14dfba8671b114a11f", "score": "0.6158362", "text": "public function create()\n {\n //KEMUDIAN DI DALAMNYA KITA MENJALANKAN FUNGSI UNTUK MENGOSONGKAN FIELD\n $this->resetFields();\n //DAN MEMBUKA MODAL\n $this->openModal();\n }", "title": "" }, { "docid": "071bf79d6c333b14dfba8671b114a11f", "score": "0.6158362", "text": "public function create()\n {\n //KEMUDIAN DI DALAMNYA KITA MENJALANKAN FUNGSI UNTUK MENGOSONGKAN FIELD\n $this->resetFields();\n //DAN MEMBUKA MODAL\n $this->openModal();\n }", "title": "" }, { "docid": "71713f1586182dbd6fc9f51bdd85e37c", "score": "0.6151396", "text": "static public function ctrCrearSucursal(){\n\n\t\tif(isset($_POST[\"nuevoNombreS\"])){\n\n\t\t\tif(preg_match('/^[0-9]+$/', $_POST[\"nuevoTelefonoS\"]) &&\n\t\t\t preg_match('/^[a-zA-ZñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevoCiudadS\"])){\n\n\t\t\t\t$tabla = \"sucursales\";\n\n\t\t\t\t$datos = array(\"nombre\" => $_POST[\"nuevoNombreS\"],\n\t\t\t\t\t\t\t \"telefono\" => $_POST[\"nuevoTelefonoS\"],\n\t\t\t\t\t \"ciudad\" => $_POST[\"nuevoCiudadS\"],\n\t\t\t\t\t \"direccion\" => $_POST[\"nuevoDireccionS\"]);\n\n\t\t\t\t$respuesta = ModeloSucursales::mdlIngresarSucursal($tabla, $datos);\n\t\t\t\n\t\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\t\techo '<script>\n\n\t\t\t\t\tswal({\n\n\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\ttitle: \"¡Registro guardado correctamente!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\tcloseOnConfirm: false\n\n\t\t\t\t\t}).then((result)=>{\n\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"sucursales\";\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\t\t</script>';\n\n\n\t\t\t\t}else{\n\n\t\t\t\techo '<script>\n\n\t\t\t\t\tswal({\n\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"¡El registro no puede ir vacío o llevar caracteres especiales!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\tcloseOnConfirm: false\n\n\t\t\t\t\t}).then((result)=>{\n\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"sucursales\";\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\t</script>';\n\n\t\t\t}\n\n\t\t\tif($respuesta != \"ok\"){\n\n\t\t\t\t\techo '<script>\n\n\t\t\t\t\tswal({\n\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"¡Error con Base de Datos !\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\tcloseOnConfirm: false\n\n\t\t\t\t\t}).then((result)=>{\n\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"sucursales\";\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\t\t</script>';\n\n\n\t\t\t }\n\t\t\t}\n\t\t\telse{\n\n\t\t\t\techo '<script>\n\n\t\t\t\t\tswal({\n\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"¡Datos incorrectos!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\tcloseOnConfirm: false\n\n\t\t\t\t\t}).then((result)=>{\n\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"sucursales\";\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\t</script>';\n\n\t\t\t}\n\n\t\t}\n\t}", "title": "" }, { "docid": "bac07b4d090e1879b2c7476cbcfb1460", "score": "0.6149377", "text": "public function registrarRecepcion(){\n $this->authorize('consultar', Articulo::class);\n $articulos = Articulo::all();\n return view('gestionInventario/registrarRecepcion')\n ->with('articulos',$articulos); \n }", "title": "" }, { "docid": "8d0375a3bcd161ce363768c7fe670ad2", "score": "0.61449593", "text": "public static function registrarProductoPedidoController(){\r\n if(isset($_POST[\"agregarPedido\"])) {\r\n //Si se presiono el boton para agregar, entonces se busca el producto, se calculan las cantidades necesarias que se desean.\r\n $prod = CrudProductos::obtenerProdPorNombre(\"productos\", $_POST[\"producto\"]); //Se obtiene la información del producto\r\n $idPedido = $_GET[\"idPedido\"]; //Se determina el id de la compra a la que se agregaran los productos\r\n $total = (int)$prod[\"precio_producto\"] * (int)$_POST[\"cantidad\"];\r\n $totalVenta = (int)$_POST[\"precioVenta\"] * (int)$_POST[\"cantidad\"];\r\n //$prov= CrudProductos::obtenerIdClienteModel(\"proveedores\", $_POST[\"proveedor\"]); //Se utiliza la misma funcion del modelo de clientes\r\n //para obtener el id de una tabla, en este caso, la de proveedores\r\n if ((int)$totalVenta < (int)$total){\r\n $ganancia=0;\r\n } else {\r\n $ganancia = (int)$totalVenta - (int)$total;\r\n }\r\n //Y se obtienen los datos en un array asociativo que permite ingresarlos a la tabla por medio del modelo.\r\n $datos = array(\"id_pedido\" => $idPedido, \"codigo_producto\" => $prod[\"codigo_producto\"],\r\n \"nombre_producto\" => $prod[\"nombre\"], \"cantidad\" => $_POST[\"cantidad\"], \"totalCompra\" => $total, \"totalVenta\" => $totalVenta,\r\n \"ganancia\" => $ganancia, \"id_proveedor\" => $_POST[\"proveedor\"], \"fecha_pedido\"=> $_POST[\"fechaPedido\"], \"fecha_entrega\"=> $_POST[\"fechaEntrega\"]);\r\n\r\n $respuesta = CrudProductos::registrarProductoPedidoModel(\"pedido\", $datos);\r\n //Valiación de la respuesta del modelo para ver si es un usuario correcto.\r\n if ($respuesta) {\r\n echo \"<script>swal({title: 'Producto agregado al pedido', type:'success'}); </script>\";\r\n } else {\r\n //header(\"location:index.php?action=fallo\");\r\n echo \"<script>swal({title: 'Error', text: 'Ha ocurrido un error al cargar el producto', type:'error'}); </script>\";\r\n //echo \"<script>window.location.href = 'index.php?action=fallo'</script>\";\r\n }\r\n }\r\n }", "title": "" }, { "docid": "fb5372e0473b76459b9d75e57ccd2cdd", "score": "0.6133484", "text": "public function gerenciaUsuario(){\n $user = new usuario();\n $array = $user->selecionarALLUser();\n if ($user->numRows() == 1){\n $usuarios = $user->result();\n }\n // $dados = array();\n\t\t// $dados[\"usuarios\"] = $usuarios;\n $this->arrayInfo[\"usuarios\"] = $array;\n $this->loadPainel(\"gerenciaUsuario\", $this->arrayInfo);\n }", "title": "" }, { "docid": "5bbbfdfdcdb36947b7c10bb55bc2a094", "score": "0.61291045", "text": "public function Registrazione()\n {\n $view = new VRegistrazione();\n $view2 = new VError();\n $dati = $view->getDatiLocale();\n $path = '/Never_home/Luogo/FormRegistrazione';\n $pm = FPersistenceManager::getInstance();\n if ($dati['errore']!=null)\n {\n $view2->mostraErrore($dati['errore'],$path);\n }\n else if ($pm->esisteNomeLuogo(($dati['nome'])))\n {\n $msg1 = \"nome già esistente\";\n $view2->mostraErrore($msg1,$path);\n }\n else if ($pm->esisteUserLuogo(($dati['user'])))\n {\n $msg1 = \"username già esistente\";\n $view2->mostraErrore($msg1,$path);\n }\n else\n {\n $locale = new ELuogo($dati['nome'],$dati['indirizzo'],$dati['mail'],$dati['user'],$dati['psw']);\n $id = $pm->store($locale);\n if ($id==null)\n {\n $msg = \"registrazione non riuscita\";\n $view2->mostraErrore($msg,$path);\n }\n else\n {\n $sessione= Session::getInstance();\n $sessione->logout();\n $sessione->setLuogoLoggato($locale);\n $this->Home();\n }\n }\n }", "title": "" }, { "docid": "6ad6187475bbb0841e22cb8295330562", "score": "0.6128465", "text": "static public function ctrIngresoUsuario(){\n /* DEFINE SI LA VARIBALE ESTA DEFINIDA EN ESTE CASO SI LA VARIBALE POST \"ingUsuario\n esta definina (tiene datos) se esta intentando entrar al sistema\"*/\n if(isset($_POST[\"ingUsuario\"])) {\n /* Este if es solo para permitir ciertos caracteres por cuestiones de seguridad evitar el SQLInyeccion\n preg_match permite comprar cadenas con expresiones\n regulares en este caso definidas por nosotros mismos */\n if(preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingUsuario\"]) && \n preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"]))\n {\n /* Variable de la tabla */\n $tabla = \"usuarios\";\n /* Variable de la columna usuario */\n $item = \"nickname\";\n /* TOMA EL VALOR DEL INPUT ING USUARIO */\n $valor = $_POST[\"ingUsuario\"];\n /* Se esta instanciando el metodo y todo se esta guardando en la variable\n respuesta */\n $respuesta = ModeloUsuarios::MdlMostrarUsuarios($tabla, $item, $valor);\n /*CON ESTA FUNCION SE IMPRIME TODO LO QUE SE ALMACENO EN LA VARIABLE DE\n \" respuesta\" */\n /*var_dump($respuesta[\"usuario\"]);*/\n /* $respuesta[\"campo de la tabla de BD\"] */\n if ($respuesta[$item] == $_POST[\"ingUsuario\"] && \n $respuesta[\"password\"] == $_POST[\"ingPassword\"]) {\n \n $_SESSION[\"iniciarSesion\"] = \"ok\";\n $_SESSION[\"usuario\"][\"nombre\"] = $respuesta[\"nombre\"].' '.$respuesta[\"apellido\"];\n \n echo '<script>\n swal({\n title: \"¡Bienvenido a SEFAUREO 2.0!\",\n text: \"Haz iniciado sesión correctamente\",\n icon: \"success\",\n timer: 3000,\n buttons: false\n // button: \"Aceptar\"\n }).then(function(){\n window.location = \"inicio\";\n });\n </script>';\n }\n else{\n echo ' <script>\n swal({\n title: \"¡Error al iniciar sesión!\",\n text: \"Por favor intente de nuevo\",\n icon: \"error\",\n button: \"Aceptar\",\n });\n </script>\n ';\n /* echo '<br> <div class=\"alert alert-danger\">Error al iniciar Sesion</div>'; */\n }\n }\n }\n }", "title": "" }, { "docid": "1e4f5662889933b7552f783855b236ad", "score": "0.61237097", "text": "public function registrar()\n\t{\n\t\t$nombre=$this ->request->getPost(\"nombre\");\n\t\t$edad=$this ->request->getPost(\"edad\");\n\t\t$tipo=$this ->request->getPost(\"tipo\");\n $descripcion=$this ->request->getPost(\"descripcion\");\n\t\t$comida=$this ->request->getPost(\"comida\");\n\t\t$foto=$this ->request->getPost(\"foto\");\n\n\t//2. Organizar los datos de envío a la base de datos (arreglo)\n\n\n\t\t$datosEnvio=array(\n\t\t\t\"nombre\"=>$nombre,\n\t\t\t\"edad\"=>$edad,\n\t\t\t\"tipo\"=>$tipo,\n \"descripcion\"=>$descripcion,\n\t\t\t\"comida\"=>$comida,\n\t\t\t\"foto\"=>$foto\t\n\t\t);\n\n\t\t//print_r ($datosEnvio);\n\t\n\t//3.Sacar una copia de la clase (instanciar clase/crear objeto) de la clase modeloUsuario\n\t\n\t$modeloAnimales = new modeloAnimales();\n\n\t//4. Ejecuto el metodo insert () del objeto creado en el punto3\n\n\ttry {\n\n\t\t$modeloAnimales->insert($datosEnvio);\n\t\t$mensaje=\"Animal registrado con éxito\";\n\n\t\treturn redirect()->to(base_url(\"public/animales\")) ->with('mensaje',$mensaje);\t\n\t}\n\t\n\tcatch (\\Exception $e) {\n\t\techo ($e->getMessage());\n\t}\n }", "title": "" }, { "docid": "1cbe6253dc81e93d178a4b630cb39596", "score": "0.6122143", "text": "public function criaTelaModalHist($sDados) {\n $this->View->setSRotina(View::ACAO_ALTERAR);\n $aDados = explode(',', $sDados);\n $aChave = explode('=', $aDados[2]);\n \n $oHist = Fabrica::FabricarController('STEEL_PCP_histEmailcert');\n $oHist->Persistencia->adicionaFiltro('nrcert',$aChave[1]);\n $oCert = $oHist->Persistencia->getarrayModel();\n $this->View->setAParametrosExtras($oCert);\n \n //busca os dados da ordem de produção\n //$oOp = Fabrica::FabricarController('STEEL_PCP_OrdensFab');\n //$oOpDados=$oOp->buscaOp($aChave[1]);\n //busca fornos\n //$oForno = Fabrica::FabricarController('STEEL_PCP_Forno');\n //$oFornoSel = $oForno->Persistencia->getArrayModel();\n //$this->View->setAParametrosExtras($oOpDados);\n //$this->View->setAModelDados($oFornoSel);\n $this->View->criaTela();\n //busca lista pela op\n // $oLista= Fabrica::FabricarController('STEEL_PCP_ordensFabLista');\n // $oListaDate = $oLista->Persistencia->adicionaFiltro('op',$aChave[1]);\n // $oListaDate = $oLista->Persistencia->consultarWhere();\n // if($oListaDate->getSituacao()=='Processo'){\n // $oMensagem = new Modal('Atenção','Esta lista da op nº '. $aChave[1] . ' já está em processo!', Modal::TIPO_AVISO,false,true);\n // echo $oMensagem->getRender(); \n // echo'$(\"#modalLista-btn\").click();';\n // }else{\n\n $sLimpa = \"$('#\" . $aDados[0] . \"-modal').empty();\";\n echo $sLimpa;\n $this->View->getTela()->setSRender($aDados[0] . '-modal');\n\n //renderiza a tela\n $this->View->getTela()->getRender();\n }", "title": "" }, { "docid": "9aa087467c48c6722e036cdd4c1cda30", "score": "0.612195", "text": "public function ModalEditTelefonos() {\n $query = '';\n $query_editar = '';\n $output = array();\n //si viene vacio es porque agrega un nuevo usuario\n if($_POST['btn_action2'] == '')\n {\n $query_agregar = \"\n INSERT INTO telefonos (tel, ws, nombre, email, comentario, estatus) \n VALUES ('\".$_POST[\"user_tel\"].\"', '\".$_POST[\"user_ws\"].\"', '\".$_POST[\"user_name2\"].\"' ,'\".$_POST[\"user_email2\"].\"', \n '\".$_POST[\"user_textarea2\"].\"', 'Inactivo' );\n \"; \n $consultaAgregar = $this->db->query($query_agregar);\n \n if(isset($consultaAgregar))\n {\n echo 'Nuevo Usuario Agregado';\n }\n }\n\n if($_POST['btn_action2'] == 'fetch_single')\n {\n \n $query = \"SELECT * FROM telefonos WHERE id ='\".$_POST['user_id2'].\"'\";\n \n //ejecutamos la consulta\n $consulta = $this->db->query($query);\n $respuesta = $consulta->fetch_all(MYSQLI_ASSOC);\n \n //recorro en el foreach para mostrar los datos a editar en el form del modal y retorno como json\n foreach($respuesta as $row)\n {\n $output['user_tel'] = $row['tel'];\n $output['user_ws'] = $row['ws'];\n $output['user_email'] = $row['email'];\n $output['user_name'] = $row['nombre'];\n $output['user_textarea'] = $row['comentario'];\n }\n \n echo json_encode($output); \n \n }\n \n if($_POST['btn_action2'] == 'Edit')\n {\n \n $query_editar = \"UPDATE telefonos SET tel='\".$_POST[\"user_tel\"].\"', ws='\".$_POST[\"user_ws\"].\"', nombre = '\".$_POST[\"user_name2\"].\"',\n email = '\".$_POST[\"user_email2\"].\"', comentario = '\".$_POST[\"user_textarea2\"].\"'\n WHERE id = '\".$_POST[\"user_id2\"].\"' \";\n $consultaEditar = $this->db->query($query_editar);\n // $respuestaEditar = $consultaEditar->fetch_all(MYSQLI_ASSOC);\n if(isset($consultaEditar))\n {\n echo 'Usuario Editado';\n }\n }\n\n if($_POST['btn_action2'] == 'delete2'){\n \n $status = 'Activo';\n if($_POST['status'] == 'Activo'){\n \n $status = 'Inactivo';\n }\n \n $query_estatus = \"\n update telefonos\n set estatus = '\".$status.\"'\n where id = '\".$_POST[\"user_id2\"].\"'\n \";\n \n $result = $this->db->query($query_estatus);\n if(isset($result)){\n \n echo 'Estatus Cambiado a ' . $status;\n }\n }\n // condicion para eliminar la fila seleccionada\n if($_POST['btn_action2'] == 'delete3'){\n \n $query_delete = \"\n delete from telefonos\n where id = '\".$_POST[\"user_id2\"].\"'\n \";\n \n $result = $this->db->query($query_delete);\n if(isset($result)){\n \n echo 'Datos Eliminados ';\n }\n }\n\n }", "title": "" }, { "docid": "f0433faf875d08bd337f98844bdff4f4", "score": "0.6116169", "text": "public function cadastrar(){\n $aluno = $this->recebeDados();\n $confirmacaoSenha = filter_input(INPUT_POST,'confirmacaoSenha');\n //compara o email\n $this->cpf_comparator = Validacao::validaCPF($aluno->getUsuario());\n //recebe a verificação se o usuario existe\n $ex = $this->userExiste($aluno->getUsuario());\n //verifica os campo\n if (($aluno->getSenha() === $confirmacaoSenha) && ($ex == false) && $this->cpf_comparator) {\n //envia o objeto para salvar\n $this->concluirSalvar($aluno);\n }else {\n //indica os erros\n if (!$this->cpf_comparator) {\n $_SESSION['cpf_invalido'] = true;\n }\n if ($ex) {\n $_SESSION['usuario_existente'] = true;\n }\n // echo \"<script>alert('Não foi possível salvar');</script>\";\n header('location:../views/login/login-cadastro/view-cadastro.php');\n }\n }", "title": "" }, { "docid": "792bc516c145850b2bce1bb1577ed63b", "score": "0.6115403", "text": "public static function registrarVentaController(){\r\n if (isset($_POST[\"guardar\"])) {\r\n $total= CrudProductos::sumarTotal(\"venta\");\r\n $datos = array(\"total_venta\" => $total[\"total\"],\r\n \"cliente\"=> $_POST[\"cliente\"]);\r\n \r\n //Se le dice al modelo que en la clase \"CrudProductos\", la funcion \"registroarVentaModel\" reciba en sus 2 parametros\r\n // los valores \"$datos\" y el nombre de la tabla a conectarnos la cual es \"users\"\r\n $respuesta = CrudProductos::registrarVentaModel(\"ventas\", $datos);\r\n $idVenta=CrudProductos::obtenerIdVenta();\r\n $idVenta[\"id\"]+=1;\r\n //Valiación de la respuesta del modelo para ver si es un usuario correcto.\r\n if ($respuesta) {\r\n echo \"<script>swal({title: 'Venta registrada con éxito', text: 'Éxtio', type:'success'}, \r\n function (){\r\n window.location.href = 'index.php?action=ventas'\r\n }); </script>\";\r\n } else {\r\n echo \"<script>swal({title: 'No se realizo la venta', text: 'Venta no registrada', type:'error'}); </script>\";\r\n }\r\n \r\n }\r\n }", "title": "" }, { "docid": "f66c1b88be6c9811da2c6ebd0e8c6828", "score": "0.6110112", "text": "public function cadastrarAction() \n\t{\n\t\t// guardar requisicao\n\t\t$req = $this->getRequest();\n\t\t\n\t\t// verificar se tem informacao vindo por post\n\t\tif ($req->isPost()) {\n\t\t\t$dados = $req->getPost();\n\t\t\t\n\n $model = new \\Application\\Model\\Usuario();\n $model->exchangeArray(['email' => $dados['email'], 'senha' => $dados['senha']]);\n\n $this->table->persistir($model);\n }\n\n\t\treturn new ViewModel ([\n\t\t\t'teste' => isset($dados['email']) ? $dados['email']:'',\n\t\t\t// 'teste' => isset($_POST['email']) ? $_POST['email']:'', // tbm funciona, mas nao devemos usar\n\t\t]);\n\t}", "title": "" }, { "docid": "1dd16f21e4dc54a0dcc36af1f666049b", "score": "0.61041224", "text": "public static function modal_editar($id){\n\t\t$sql=\"SELECT * FROM persona WHERE id=$id\";\n\t\t$empleado=\"\";\n\t\t$comando=Conexion::getInstance()->getDb()->prepare($sql);\n\t\t$comando->execute();\n\t\twhile ($row = $comando->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$empleado=$row;\n\t\t}\n\n\t\t$html.='<div class=\"modal fade modal-side-fall\" id=\"md_editar\" aria-hidden=\"true\"\n aria-labelledby=\"exampleModalTitle\" role=\"dialog\" tabindex=\"-1\" data-backdrop=\"static\" data-keyboard=\"false\">\n <div class=\"modal-dialog modal-lg\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\">\n <span aria-hidden=\"true\">×</span>\n </button>\n <h4 class=\"modal-title\">Editar empleado '.$empleado[nombre].'</h4>\n </div>\n <div class=\"modal-body\">\n <form method=\"post\" accept-charset=\"utf-8\" name=\"fm_editar_empleado\" id=\"fm_editar_empleado\">\n <input type=\"hidden\" name=\"data_id\" value=\"editar_empleado\">\n <div class=\"row\">\n <div class=\"col-md-6\">\n <div class=\"form-group\">\n <label for=\"\">Nombre(*)</label>\n <input type=\"hidden\" name=\"id_empleado\" value=\"'.$empleado[id].'\"\n <input type=\"text\" class=\"form-control\" id=\"n_nombre\" name=\"nombre\" required=\"\" placeholder=\"Ingrese el nombre\" value=\"'.$empleado[nombre].'\" >\n </div>\n <div class=\"form-group\">\n <label for=\"n_precio\">Email(*)</label>\n <input type=\"email\" class=\"form-control\" id=\"n_email\" value=\"'.$empleado[email].'\" name=\"email\" placeholder=\"Ingrese el email\" required=\"\">\n </div>\n <div class=\"form-group\">\n <label for=\"np_nombre\">Teléfono(*)</label>\n <input type=\"text\" required class=\"form-control telefono\" id=\"n_telefono\" name=\"telefono\" aria-describedby=\"nombrelHelp\" placeholder=\"Ingrese el teléfono\" value=\"'.$empleado[telefono].'\">\n </div>\n <div class=\"form-group\"> \n <label class=\"control-label\" for=\"rol\">Dirección(*):</label>\n <textarea name=\"direccion\" required class=\"form-control\" id=\"n_direccion\" cols=\"30\" rows=\"4\">'.$empleado[direccion].'</textarea>\n </div>\n </div>\n <div class=\"col-md-6\">\n <div class=\"form-group\"> \n <label class=\"control-label\" for=\"rol\">DUI(*):</label>\n <input type=\"text\" required name=\"dui\" id=\"n_dui\" value=\"'.$empleado[dui].'\" class=\"form-control dui\">\n </div>\n <div class=\"form-group\"> \n <label class=\"control-label\" for=\"rol\">NIT(*):</label>\n <input type=\"text\" value=\"'.$empleado[nit].'\" required name=\"nit\" id=\"n_nit\" class=\"form-control nit\">\n </div>\n <div class=\"form-group\"> \n <label class=\"control-label\" for=\"rol\">Género(*):</label>\n <select id=\"genero\" required name=\"genero\" class=\"form-control select_piker2\" data-plugin=\"selectpicker\" data-live-search=\"true\" data-placeholder=\"Seleccione el Municipio\" readonly=\"\" style=\"width: 250px;\">\n <option value=\"\" disabled=\"\" selected=\"\">seleccione..</option>';\n if($empleado[genero]=='Femenino'){\n \t$html.='<option selected value=\"Femenino\">Femenino</option>\n \t\t<option value=\"Másculino\">Másculino</option>';\n }else{\n \t$html.='<option value=\"Femenino\">Femenino</option>\n \t\t<option selected value=\"Másculino\">Másculino</option>';\n } \n $html.='</select>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6 col-xs-6\">\n <!--label for=\"firma1\">Imagen(*):</label-->\n <div class=\"form-group eleimagen\" >';\n if($empleado[imagen]==\"\"){\n \t$html.='<img src=\"../../img/imagenes_subidas/image.svg\" style=\"width: 200px;height: 202px;\" id=\"img_file\">';\n }else{\n \t$html.='<img src=\"../../img/usuario/'.$empleado[imagen].'\" style=\"width: 200px;height: 202px;\" id=\"img_file\">';\n }\n \n $html.='<input type=\"file\" class=\"archivos hidden\" value=\"'.$empleado[imagen].'\" id=\"file_1\" name=\"file_1\" />\n </div>\n </div>\n <div class=\"col-md-6 col-xs-6 ele_div_imagen\">\n <div class=\"form-group\">\n <h5>La imagen debe de ser formato png o jpg con un peso máximo de 3 MB</h5>\n </div><br><br>\n <div class=\"form-group\">\n <button type=\"button\" class=\"btn btn-sm btn-primary\" id=\"btn_subir_img\"><i class=\"icon md-upload\" aria-hidden=\"true\"></i> Seleccione Imagen</button>\n </div>\n <div class=\"form-group\">\n <div id=\"error_formato1\" class=\"hidden\"><span style=\"color: red;\">Formato de archivo invalido. Solo se permiten los formatos JPG y PNG.</span>\n </div>\n </div>\n </div> \n </div>\n </div>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-default btn-pure\" data-dismiss=\"modal\">Cancelar</button>\n <button type=\"button\" class=\"btn btn-primary\" id=\"btn_actualizar\">Actualizar</button>\n </div>\n </div>\n </div>\n </div>';\n\n\t\treturn array(\"1\",$empleado,$sql,$html);\n\t exit();\n\n\t}", "title": "" }, { "docid": "50a6d6051413c6df7c24ed5808b85081", "score": "0.609626", "text": "public function crearPalabra(){\n $tiempos = tiempoVerbal::all();\n $tipos = tipoPalabra::all();\n $categorias = categoria::all();\n\n $arrayTiempos = Array();\n $arrayTipos = Array();\n $arrayCategorias = Array();\n\n foreach ($tiempos as $tiempo){\n $arrayTiempos[$tiempo->id] = $tiempo->nombre;\n }\n\n foreach ($tipos as $tipo) {\n $arrayTipos[$tipo->id] = $tipo->nombre;\n }\n\n foreach ($categorias as $categoria){\n $arrayCategorias[$categoria->id] = $categoria->nombre;\n }\n $arrayCategorias['otro']=\"Otro..\";\n return view('palabras.modalCrearPalabra', compact(\"arrayTiempos\", \"arrayTipos\", 'arrayCategorias'));\n\n }", "title": "" }, { "docid": "eac677a4c21b2c0806782e91c67b254d", "score": "0.6087771", "text": "public static function registrarAR()\n {\n if (Input::has('asunto') && Input::has('serieDeco') &&\n Input::has('telefonoOrigen')) {\n $asunto = strtolower(Input::get('asunto'));\n $serieDeco = Input::get('serieDeco', '');\n $serieTarjeta = Input::get('serieTarjeta', '');\n $telefonoOrigen = Input::get('telefonoOrigen');\n $tipo = Input::get('tipo', '');\n $carnet = '';\n\n if ($tipo == '2') {\n $tecnico = Tecnico::where('celular', $telefonoOrigen)->first();\n $carnet = $tecnico->carnet_tmp;\n } else {\n $usuario = Usuario::where('celular', $telefonoOrigen)->first();\n $carnet = $usuario->id;\n }\n $gestionId = '0';\n $requerimiento = Input::get('requerimiento', '');\n if ($requerimiento != '') {\n $f = GestionDetalle::where('codactu', $requerimiento)->first();\n $gestionId = (isset($f->gestion_id) ?\n $f->gestion_id : '0'); \n }\n// echo \"-$gestionId <br> -$carnet <br> -$serieDeco <br> -$carnet \"\n// . \"<br> -$gestionId <br> -$asunto <br> -$tipo \"\n// . \"<br> -$telefonoOrigen <br> -$serieTarjeta \n// <br> -$serieDeco\";exit;\n if ($asunto == 'refresh' || $asunto == 'activacion') {\n $catalogoDecos = new CatalogoDecos;\n $catalogoDecos['gestion_id'] = $gestionId;\n $catalogoDecos['carnet'] = $carnet;\n $catalogoDecos['serie'] = $serieDeco;\n $catalogoDecos['tarjeta'] = $serieTarjeta;\n $catalogoDecos['cliente'] = '';\n $catalogoDecos['fecha_registro'] = date('Y-m-d H:i:s');\n $catalogoDecos['accion'] = $asunto;\n $catalogoDecos['tipo_persona'] = $tipo;\n //$catalogoDecos['fecha_accion'] = 0;\n //$catalogoDecos['resultado'] = 0;\n //$catalogoDecos['activo'] = 0;\n $rst = $catalogoDecos->save();\n $msj = \"Se envio ($rst) petición de $asunto de deco\";\n } else {\n $msj = 'No se ha recibido asunto (refresh o activacion)';\n }\n } else {\n $msj = 'No se ha recibido asunto ni serie deco ni telefono';\n }\n\n return array(\n 'rst' => '1',\n 'datos' => '',\n 'msj' => $msj,\n );\n }", "title": "" }, { "docid": "68773d3bb02a7b0c2016d43a70b97724", "score": "0.6080681", "text": "public function registroUsuarios() {\n\n $tabla = \"usuarios\";\n \n $nombre = $this->nombre_p;\n $apellidos = $this->apellidos_p;\n $fecha_N = $this->fechaN_p;\n $sexo = $this->sexo_p;\n $ciudad = $this->ciudad_p;\n $tipo_usuario = $this->tipo_usuario_p;\n $curp = $this->curp_p;\n $email = $this->email_p;\n $cel = $this->cel_p;\n $tel = $this->tel_p;\n $servicio = $this->servicio_p;\n $password = $this->password_p;\n\n //$items = array('nombre','apellidos','fecha_nacimiento','id_sexo', 'email', 'password', 'celular', 'telefono', 'curp', 'id_servicio', 'id_tipoUsuario', 'id_ciudad' );\n $items = array('nombre','apellidos','id_sexo', 'email', 'password','celular');\n $datos = array($nombre, $apellidos, $sexo, $email, $password, $cel);\n //$datos = array($nombre, $apellidos, $fecha_N, $sexo, $email, $password, $cel, $tel, $curp, $servicio, $tipo_usuario, $ciudad );\n\n\n \n $item = \"\"; \n $data = \"\";\n $aux = 0;\n \n foreach ($items as $key => $value) {\n $item .= ($aux > 0) ? \",\" : \"\";\n $item .= $value;\n $aux += 1;\n }\n\n $aux = 0;\n \n foreach ($datos as $key => $value) {\n $data .= ($aux > 0) ? \",\" : \"\";\n $data .= \"'\". $value . \"'\";\n $aux += 1;\n }\n \n $respuesta = registroUsuarios::mdlRegistroUsuarios($tabla,$item, $data);\n\n echo $item;\n echo $data;\n echo $respuesta;\n\n \n \n }", "title": "" }, { "docid": "bddcc35f8fab09f64ed53105e4ee17a1", "score": "0.60756665", "text": "function iniciaFormulario($idUsuario,$idInstituicao)\n\t{\n\t\tunset($_SESSION['idEvento']);\n\t\t// Query para inserir um registro em branco\n\t\t$sql_inicio = \"INSERT INTO `ig_evento` \n\t\t\t(`idEvento` ,\n\t\t\t`ig_produtor_idProdutor` ,\n\t\t\t`ig_tipo_evento_idTipoEvento` ,\n\t\t\t`ig_programa_idPrograma` ,\n\t\t\t`projetoEspecial` ,\n\t\t\t`nomeEvento` ,\n\t\t\t`projeto` ,\n\t\t\t`memorando` ,\n\t\t\t`idResponsavel` ,\n\t\t\t`suplente` ,\n\t\t\t`autor` ,\n\t\t\t`fichaTecnica` ,\n\t\t\t`faixaEtaria` ,\n\t\t\t`sinopse` ,\n\t\t\t`releaseCom` ,\n\t\t\t`confirmaFinanca` ,\n\t\t\t`confirmaDiretoria` ,\n\t\t\t`confirmaComunicacao` ,\n\t\t\t`confirmaDocumentacao` ,\n\t\t\t`confirmaProducao` ,\n\t\t\t`numeroProcesso` ,\n\t\t\t`publicado` ,\n\t\t\t`idInstituicao` ,\n\t\t\t`idUsuario`)\n\t\t\tVALUES (NULL , \n\t\t\t'', \n\t\t\t'', \n\t\t\t'', \n\t\t\t'', \n\t\t\t'', \n\t\t\tNULL, \n\t\t\tNULL, \n\t\t\t'', \n\t\t\t'', \n\t\t\t'', \n\t\t\t'', \n\t\t\t'', \n\t\t\t'', \n\t\t\t'', \n\t\t\tNULL, \n\t\t\tNULL, \n\t\t\tNULL, \n\t\t\tNULL, \n\t\t\tNULL, \n\t\t\tNULL, \n\t\t\tNULL, \n\t\t\t$idInstituicao, \n\t\t\t$idUsuario)\";\n\t\t// Executa a query\n\t\t$con = bancoMysqli();\n\t\tmysqli_query($con,$sql_inicio);\n\t\t// Retorna o ID gerado na tabela ig_evento\n\t\t$sql_ultimo = \"SELECT * FROM ig_evento ORDER BY idEvento DESC LIMIT 1\";\n\t\t$id_evento = mysqli_query($con,$sql_ultimo);\n\t\t$id = mysqli_fetch_array($id_evento);\n\t\t$_SESSION['idEvento'] = $id['idEvento'];\n\t}", "title": "" }, { "docid": "28adb05d5e739b5016fe0702c8349c11", "score": "0.6069384", "text": "public function agregarModulos_modal($id_perfil){\n $data['id_perfil'] = $id_perfil;\n $data['modulosx'] = $this->Modulos_model->modulosXPerfil($id_perfil);\n $this->load->view('Perfiles/listado_modulos',$data);\n }", "title": "" }, { "docid": "5fff69f84b2edf4757ccedee7e576c92", "score": "0.6065265", "text": "public function registrar()\n {\n $nombre = $_POST['nombre'];\n $rfc = $_POST['rfc'];\n $telefono = $_POST['telefono'];\n $direccion = $_POST['direccion'];\n $idproveedor = $_POST['idproveedor'];\n \n if (empty($nombre) || empty($rfc) || empty($telefono) || empty($direccion)){\n $msg= \"Todos los campos son obligatorios\";\n }else{\n if ($idproveedor== \"\"){\n $data = $this->model->registrarProveedor($nombre, $rfc, $telefono, $direccion);\n if ($data ==\"ok\"){\n $msg= \"si\";\n }else if($data == \"existe\"){\n $msg= \"El rfc ya existe\";\n }else{\n $msg= \"Error al registrar el proveedor\";\n }\n\n }else{\n $data = $this->model->modificarProveedor($nombre, $rfc, $telefono, $direccion, $idproveedor);\n if ($data ==\"modificado\"){\n $msg= \"modificado\";\n }else{\n $msg= \"Error al modificar el proveedor\";\n }\n }\n \n }\n echo json_encode($msg, JSON_UNESCAPED_UNICODE);\n die();\n }", "title": "" }, { "docid": "aeb994482293e160282f76e07212b1f7", "score": "0.6062561", "text": "public function registrasi()\n {\n //\n }", "title": "" }, { "docid": "eabf0149caecf7976bee0aa14478a011", "score": "0.60619557", "text": "public function cargarModalPreventivo() \n\t{\n\t\theader(\"Content-Type: text/plain; charset=utf-8\");\n\t\t$data['information'] = FALSE;\n\t\t$id_preventivo = $this->input->post(\"id_preventivo\");\n\t\t$arrParam = array(\n\t\t\t\"table\" => \"param_tipo_equipos\",\n\t\t\t\"order\" => \"tipo_equipo\",\n\t\t\t\"id\" => \"x\"\n\t\t);\n\t\t$data['tipoEquipo'] = $this->general_model->get_basic_search($arrParam);\n\t\t$arrParam = array(\n\t\t\t\"table\" => \"param_frecuencia\",\n\t\t\t\"order\" => \"id_frecuencia\",\n\t\t\t\"id\" => \"x\"\n\t\t);\n\t\t$data['frecuencia'] = $this->general_model->get_basic_search($arrParam);\n\t\t$this->load->view(\"preventivo_modal\", $data);\n }", "title": "" }, { "docid": "8f199913b61dae4d47faf8f6903fa9db", "score": "0.60591644", "text": "public function buscarPregunta()\n {\n global $username, $password, $servername, $dbname; \n \n $objConexion = new mySQL_conexion($username, $password, $servername, $dbname); //Se crea el objeto de la clase a instanciar.\n $consulta = 'SELECT *FROM catUsuarios WHERE Correo=\\''.$this->Correo.'\\''; //Se establece el modelo de consulta de datos.\n $dsUsuarios = $objConexion -> conectar($consulta); //Se ejecuta la consulta.\n \n $RegUsuarios = @mysql_fetch_array($dsUsuarios, MYSQL_ASSOC);\n \n if($RegUsuarios)\n {\n //Solo si existe un registro con el correo solicitado.\n $this->Pregunta = $RegUsuarios['Pregunta']; \n } \n }", "title": "" }, { "docid": "bba1d6f525b2ff1fe8a4372f61e61aa1", "score": "0.60589844", "text": "public function mostrar(){\n $registro = new Registro();\n $todos = Registro::all();\n $resultado=[];\n foreach ($todos as $registros => $registro) {//vamos a llamar al metodo registroCompletoById por cada id de registros, de esta manera almacenaremos un array gigante con todos los valores de los registros de la base de datos\n $array =$registro->registroCompletoById($registro->id);\n array_push($resultado,$array);\n }\n return $resultado;\n\n }", "title": "" }, { "docid": "48b99d0e56e3980f3c6643949ca49abe", "score": "0.6054376", "text": "public function mostrarFormulario(){\n\n\t\t$salidasModel= new SalidasModel();\n\t\t$salidasModel= $salidasModel->findAll();\n\t\t$salidasModel= array('salidasModel'=>$salidasModel);\n\n\t\t$estructura=view('head').view('header').view('index').view('nuevoSitio',$salidasModel);\n\t\treturn $estructura;\n\n\t}", "title": "" }, { "docid": "01856544dc1d30240d1d3037e1ed14f4", "score": "0.6053261", "text": "public function registrarC()\n {\n $Generos = Genero::all();\n $Departamentos = Departamento::all();\n $Categorias = Categoria::all();\n\n //Se retorna la ruta y se envian los objetos o variables hacia la vista\n return view('formulario.registrarcliente', compact('Generos', 'Departamentos', 'Categorias'));\n\n }", "title": "" }, { "docid": "1e2986ec54e302a0973d1e59dfa342c3", "score": "0.6050632", "text": "function datosFormAlumno(){\r\n\t\t\r\n $dni = utf8_encode($_POST[\"dni\"]);\r\n $apellidos = utf8_encode($_POST[\"apellidos\"]);\r\n $nombre = utf8_encode($_POST[\"nombre\"]);\r\n $direccion = utf8_encode($_POST[\"direccion\"]);\r\n $email = utf8_encode($_POST[\"email\"]);\r\n $nacimiento = utf8_encode($_POST[\"nacimiento\"]);\r\n $observaciones = utf8_encode($_POST[\"observaciones\"]);\r\n $profesion = utf8_encode($_POST[\"profesion\"]); \r\n \r\n $alumno = new alumno($dni,$apellidos,$nombre,$direccion,$email,$nacimiento,$observaciones,$profesion);\r\n\t\treturn $alumno;\r\n\t}", "title": "" }, { "docid": "1a021b68b1e8a63f3fdca1588180de7f", "score": "0.6050287", "text": "public function ajaxGetModal(){\n $vehicule = Vehicules::find(request('id_vehicule'));\n\n // $statut = Statut::where('id', $vehicule->id_statut)->first();\n\n $statut = Statut::find($vehicule->id_statut);\n $vehicule->statut = $statut->nom;\n\n return $vehicule;\n }", "title": "" }, { "docid": "087aed0c363c95989e676ccfee8fe56b", "score": "0.604529", "text": "public function controlDatos() {\n if (isset($_POST['ingreso'])) {\n $id_usuario = $_POST[\"id_usuario\"];\n $passw = $_POST[\"passw\"];\n try {\n $nObj = new M_Usuario();\n $nObj->setId_usuario($id_usuario);\n $nObj->setPassw($passw);\n $nObj->create();\n } catch (Exception $ex) {\n echo \"No se pudo pudieron ingresar los datos Error\" . $ex->getMessage();\n }\n\n if ($op != 0) {\n echo \" <script type=\\\"text/javascript\\\">alert(\\\"Ingresado correctamente\\\")</script>\";\n } else {\n echo \" <script type=\\\"text/javascript\\\">alert(\\\"Intentalo nuevamente\\\")</script>\";\n }\n }\n }", "title": "" }, { "docid": "022602458004be178dd16843f8a704c7", "score": "0.60449636", "text": "public function registroTutoriaController(){\t \n\t\tif(isset($_POST[\"fecha\"])){\n\t\t\t$datosController = array(\n\t\t\t\t\t\t\t\t \"hora\"=>$_POST[\"hora\"],\n\t\t\t\t\t\t\t\t \"fecha\"=>$_POST[\"fecha\"],\n\t\t\t\t\t\t\t\t \"tema\"=>$_POST[\"tema\"],\n\t\t\t\t\t\t\t\t \"tipo\"=>$_POST[\"tipo\"],\n\t\t\t\t\t\t\t\t \"num_maestro\"=>$_POST[\"num_maestro\"]\n\t\t\t\t\t\t\t\t );\n\n\t\t\t$respuesta = Datos::registroTutoriaModel($datosController, \"sesion_tutoria\");\n\t\t\t\n\t\t\tif(isset($_POST['hid'])){\n\t\t\t\t$data = $_POST['hid'];\n\n\t\t\t\t$id_sesion = Datos::ObtenerLastTutoria(\"sesion_tutoria\");\n\n\t\t\t\t$respuesta = Datos::registroAlumnosTutoriaModel($data, $id_sesion[0], \"sesion_alumnos\");\n\t\t \t}\n\t\t \t\n\t\t\tif($respuesta == \"success\"){\n\t\t\t\theader(\"location:index.php?action=ok_tutoria\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\theader(\"location:index.php\");\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "ad629cd32f9a258d7c818cb4029bc957", "score": "0.6044367", "text": "function UltimosProjetos(){\n require_once \"conectBM.php\";\n\n //meta charset no banco\n $conn->set_charset(\"utf8\");\n\n //buscando\n $sqlUltimos = \"SELECT codigoProjeto, nomeDoProjeto, codigoFKCliente,dataDeInicio, dataDeTermino FROM Projeto ORDER BY dataDeInicio DESC LIMIT 0,6\";\n $sqlExecutar = $conn->query($sqlUltimos);\n $linhas = $sqlExecutar->num_rows;\n\n if($linhas > 0){\n\n echo'<table class=\"table text-center\">\n <thead class=\"tHeadBg\">\n <tr>\n <th scope=\"col\">Projeto</th>\n <th scope=\"col\">Data entrega</th>\n <th scope=\"col\">Ações</th>\n </tr>\n </thead>\n <tbody class=\"textColorPadrao\">';\n\n while($rst = $sqlExecutar->fetch_assoc()):\n echo'<tr>\n <td>'.$rst['nomeDoProjeto'].'</td>\n <td>'.$rst['dataDeInicio'].'</td>\n <td><button type=\"button\"\n class=\"btn btn-light border textColorPadrao\" data-toggle=\"modal\" data-target=\"#DetalhesPjt\" onclick=\"detalhesUlt('.$rst['codigoProjeto'].', '.$rst['codigoFKCliente'].')\">Detalhes</button></td>\n </tr>'; \n\n\n endwhile;\n\n echo'<!-- Modal detalhes -->\n <div class=\"modal fade textColorPadrao\" id=\"DetalhesPjt\" tabindex=\"-1\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"exampleModalLabel\">Projeto</h5>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body text-left\">\n <div id=\"modalUltResult\"></div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Fechar</button>\n </div>\n </div>\n </div>\n </div>';\n \n echo \"</tbody>\";\n echo \"</table>\";\n //echo\"Foi cara!!!\";\n\n }else{\n\n echo\"Não foi!!!\";\n\n }\n\n }", "title": "" }, { "docid": "b8a0c0d528c0803f9ee385bbae8f4dc8", "score": "0.60423523", "text": "private function populaCombosFormulario() {\r\n\r\n $this->view->comboCombustivel = $this->dao->buscaCombustivel();\r\n $this->view->comboUsoVeiculo = $this->dao->buscaUsoVeiculo();\r\n $this->view->comboProfissoes = $this->dao->buscaProfissoesSeguradora();\r\n $this->view->comboFormaPagamento = $this->dao->buscaFormaPagamento();\r\n $this->view->comboIdRevenda = $this->dao->buscaIdRevenda();\r\n $this->view->comboCorretor = $this->dao->buscaCorretoresSeguro();\r\n }", "title": "" }, { "docid": "369dcf16e8c70745ea3ed9147fc49a33", "score": "0.6041038", "text": "public function register_segunda($id)\n {\n $persona = $this->personaRepository->find($id);\n\n $farmaceutica = Catalogo::where('nombre', 'FARMACEUTICA')->first();\n $farmaceuticas = Item::where('catalogos_id', $farmaceutica->id)->pluck('nombre', 'nombre');\n \n $provincia = Catalogo::where('nombre', 'PROVINCIA')->first();\n $provincias = Item::where('catalogos_id', $provincia->id)->pluck('nombre', 'nombre');\n\n $ciudad = Catalogo::where('nombre', 'CIUDAD')->first();\n $ciudades = Item::where('catalogos_id', $ciudad->id)->pluck('nombre', 'nombre');\n\n $puesto = Catalogo::where('nombre', 'PUESTO_VACUNACION')->first();\n $puestos = Item::where('catalogos_id', $puesto->id)->pluck('nombre', 'nombre');\n\n $equipo = Catalogo::where('nombre', 'PRIMER_EQUIPO_VACUNADOR')->first();\n $equipos = Item::where('catalogos_id', $equipo->id)->pluck('nombre', 'nombre');\n\n \n //$provincia = Catalogo::find(1);//dd($provincias);\n //exit(0);\n //die();\n\n if (empty($persona)) {\n Flash::error('Persona not found');\n\n return redirect(route('personas.index'));\n }\n\n /*return view('personas.edit')->with('persona', $persona);*/\n return view('personas.segunda')->with('persona', $persona)->with('farmaceuticas', $farmaceuticas)->with('provincias', $provincias)->with('ciudades', $ciudades)->with('puestos', $puestos)->with('equipos', $equipos);\n }", "title": "" }, { "docid": "4c356db29127f97f466f458ee81cb057", "score": "0.6036473", "text": "static public function ctrCrearProveedor() {\r\n\r\n if (isset($_POST[\"nuevoProveedor\"])) {\r\n \r\n $datos = array( \"nit\" => $_POST[\"nuevoNit\"],\r\n \"nombre\" => $_POST[\"nuevoProveedor\"],\r\n \"direccion\" => $_POST[\"nuevaDireccion\"],\r\n \"telefono1\" => $_POST[\"nuevoTelefono1\"],\r\n \"telefono2\" => $_POST[\"nuevoTelefono2\"],\r\n \"idCiudad\" => $_POST[\"nuevaCiudad\"]\r\n );\r\n \r\n $respuesta = ModeloProveedores::mdlIngresarProveedor($datos);\r\n \r\n if ($respuesta == \"ok\"){\r\n echo '<script>\r\n swal({\r\n type: \"success\",\r\n title: \"¡El proveedor ha sido guardado correctamente!\",\r\n showConfirmButton: true,\r\n confirmButtonText: \"Cerrar\"\r\n\r\n }).then(function(result){\r\n if(result.value){\r\n window.location = \"proveedores\";\r\n }\r\n });\r\n </script>';\r\n } else {\r\n echo '<script>\r\n swal({\r\n type: \"error\",\r\n title: \"'.$respuesta.'\",\r\n showConfirmButton: true,\r\n confirmButtonText: \"Cerrar\"\r\n\r\n }).then(function(result){\r\n if(result.value){\r\n window.location = \"proveedores\";\r\n }\r\n });\r\n </script>'; \r\n } \r\n\r\n }\r\n }", "title": "" }, { "docid": "f7991d4f708b7460983d2443e3689bb8", "score": "0.60342807", "text": "public function registrarAction()\n {\n $sm = $this->getServiceLocator();\n $rq = $this->getRequest(); // var_dump($rq->getHeaders()->get('Content-Type')); exit;\n $login = $sm->get('Session\\Service\\Login');\n $formReg = new UsuarioForm($sm, 'frmregistro');\n \n $log = ['state'=>false,'valid'=>false,'msg'=>'registrarAction','data'=>[]];\n $log['session'] = $login->isLoggedIn('portal'); // session value\n \n // SET ObjectModel\n $oModel = $rq->isXmlHttpRequest()?new JsonModel():new ViewModel();\n \n // $oModel->setVariable('formreg',$formReg); Si esto se comenta-> error al hacer submit a esta ruta\n \n // NO Post !\n if(!$rq->isPost()){\n $log['msg'] .= '|NoPost';\n $oModel->setVariable('formreg',$formReg);\n return $oModel->setVariables($log);\n }\n \n // ES Post !\n $log['data']['formVal'] = $rq->getPost()->toArray();\n $log['msg'] .= '|isPost';\n \n // Id usuario Post (mayor>0 si es UPDATE)\n $idUserPost = (int)trim($log['data']['formVal']['idusuario']); // Si manda idusuario\n \n // Setting Form !\n $adapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $userTbl = $sm->get('UsuarioTable');\n \n $formReg->setInputFilter( $userTbl->getInputFilter($adapter, (bool)$idUserPost) );\n $formReg->setData($rq->getPost());\n \n // INVALID Form !\n if(!$formReg->isValid()){\n $log['data']['formErr'] = $formReg->getMessages();\n return $oModel->setVariables($log);\n }\n \n // VALID Form !\n $log['valid'] = TRUE;\n\n // Desea UPDATE\n if($idUserPost){\n $log['msg'] .= '|deseaUPD';\n $getAdm = $this->params()->fromQuery('adm', FALSE);\n $profile = $login->getProfile($getAdm?'admin':'portal'); // Array datos usuario sesion\n $idUserSess = count($profile)?$profile['idusuario']:FALSE; // usuario en sesion\n $isAdm = ($profile['rol']==='2');\n $isUpdate = ( $idUserPost == (int)$idUserSess || $isAdm );\n flog(\"profile['rol']:\",$profile['rol']);\n // Incorrecto UPDATE\n if(!$isUpdate){\n $log['msg'] .= '|incorrectUPD';\n $log['data']['idUserSess'] = $idUserSess;\n return $oModel->setVariables($log);\n }\n }\n \n // Correcto UPDATE o Desea INSERT\n $data = $userTbl->saveRow($formReg->getData());\n $log['data']['affectedRows'] = $data; // para UPDATE $data is numeric|bool\n \n // UPDATE (Si es cierto, por la validacion anterior, ya hay sesion)\n if($idUserPost){\n $log['msg'] .= $isAdm?'|ExistialoginAdm!':'|Existialogin!';\n $log['msg'] .= '|UPD:'.(!$data?'NoChanges':'OK');\n $log['state'] = (bool)$data;\n \n // Seteando profile con nuevos datos\n $newProfile = $userTbl->andWhere(['idusuario'=>$profile['idusuario']]);\n if(!$isAdm) { $profile = $login->setProfile('portal',$newProfile[0]); }\n flog('UsuarioController->registrarAction->profile:',$profile);\n \n return $oModel->setVariables($log);\n }\n \n // INSERT (Hacer logica cuando ADM quiera crear usuario - FALTA!!!!)\n $log['msg'] .= '|INS:'.(!$data?'ERROR':'OK');\n $res = $data ? $login->start(\n ['tipodoc'=>$data['tipodoc'],'nrodoc'=>$data['nrodoc'],'pass'=>$data['pass']], 'portal'\n ): FALSE; //Si guardo Logeamos!\n $log['session'] = $res;\n $log['msg'] .= $res?'|Login!':'ErrLogin';\n \n unset($data['data']['affectedRows']['pass']); // Eliminado valor para password\n\n return $oModel->setVariables($log);\n \n }", "title": "" }, { "docid": "34aaaa92f675a25b9c9d37c06233e673", "score": "0.6031805", "text": "public function registerData(){\n\n if(isset($_SESSION['registrar'])){\n\n //Se asigna la sesion 'registrar' en la varaible:\n $data = $_SESSION['registrar'];\n\n //Se instancia la clase 'Validate', para validar los datos de las propiedades:\n $validate = new Validate;\n\n //Validar si el campo no está vacio\n if (!empty($data->nombre_role)) {\n\n if ($validate->validateString($data->nombre_role)) {\n\n //Retornamos la respuesta :D : \n return ['registrar' => true];\n\n }else{\n\n //Retornamos la respuesta :/ : \n die('{ \"registrar\":false, \"error\":\"El campo nombre_role debe contener caracteres alfanumericos\" }');\n\n }\n }else{\n //Retornamos la respuesta :/ : \n die('{\"registrar\":false, \"error\":\"El campo nombre_role no debe estar vacio\"}');\n }\n }\n \n }", "title": "" }, { "docid": "9443d4122fefc8781acd9d9de053af87", "score": "0.602944", "text": "function cadastrar(){\n $carreta = new carreta();\n $carreta->cod_carreta = filter_input(INPUT_POST, 'cod_carreta', FILTER_SANITIZE_STRING);\n $carreta->ano_fabricacao = filter_input(INPUT_POST, 'ano_fabricacao', FILTER_SANITIZE_STRING);\n $carreta->ano_modelo = filter_input(INPUT_POST, 'ano_modelo', FILTER_SANITIZE_STRING);\n $carreta->cod_produto = filter_input(INPUT_POST, 'cod_produto', FILTER_SANITIZE_STRING);\n\n $crud_carreta = new Crudcarreta();\n $crud_carreta->salvar($carreta);\n\n listar();\n\n}", "title": "" }, { "docid": "a344dd978cbfd58cdbf29ec0a1f565f3", "score": "0.6023534", "text": "public function FormRegistrazione()\n {\n $view = new VRegistrazione();\n $view->FormLocale();\n }", "title": "" }, { "docid": "92ff2049780fbda6cb52df3cb19d5449", "score": "0.6023497", "text": "function datosFormModificar(){\n\t\t\n\t\t$grupo2 = $_POST['grupoN'];\n\t\t$accion2 = $_POST['accionN'];\n\t\t$controlador2 = $_POST['controladorN'];\n\t\t\n\t\t$permiso2 = new permiso($grupo2,$controlador2, $accion2);\n\t\treturn $permiso2;\n\t}", "title": "" }, { "docid": "4dac86a4999ad61af5fb4f1de9546b16", "score": "0.6018636", "text": "public function mostrarmodificar($id){\n $this->idgastos=$id;\n $this->consulta= $this->con->query(\"SELECT * FROM gastos WHERE idgastos='$this->idgastos'\");\n if ($this->registros= $this->consulta->fetch_array()){\n ?>\n \n <div class=\"form-group\">\n <label for=\"detalle\">Detalle</label>\n <input type=\"text\" class=\"form-control\" name=\"detalle\" id=\"detalle\" value=\"<?php echo $this->registros['detalle']; ?>\" required=\"\">\n </div>\n </div> \n <div class=\"form-group\">\n <label for=\"totalgastos\">Total</label>\n <input type=\"text\" class=\"form-control\" name=\"totalgastos\" id=\"totalgastos\" value=\"<?php echo $this->registros['totalgastos']; ?>\" required=\"\">\n </div> \n \n \n <?php\n }\n $this->con->close();\n }", "title": "" }, { "docid": "c2cde08869b94b47dc11251abade57c6", "score": "0.60164464", "text": "public function registrar(Request $request)\n { \n //print_r($_POST);\n \n\n \n $buscar=Vehiculos::where('placa',$request->input('placa'))->first();\n\n \n\nif($buscar['idvehiculos']!=0){ \n \necho \"Este Auto ya esta registrado\";\n \n\n }else{\n \n $Vehiculos=new Vehiculos();\n $Vehiculos->placa=$request->input('placa'); \n $Vehiculos->color=$request->input('color');\n $Vehiculos->marca=$request->input('Marca');\n $Vehiculos->tipodevehiculo=$request->input('Tipovehiculo');\n \n\n \n if($Vehiculos->save()){\n echo 'operacion exitosa';\n\n }\n\n }\n }", "title": "" }, { "docid": "ae2b72de2e659ac014a30004587812b9", "score": "0.6014854", "text": "public function insertarForm()\n {\n if($this->validadorFormulario($_POST)){\n if($this->usuarioModelo->insertar($_POST)){\n $this->cargarArrayResponse(true,\"Usuario registrado con exito\");\n }else{\n $this->cargarArrayResponse(false,\"Error, se presento un problema al registrar el usuario, por favor intentelo de nuevo y verifique que no exista un registro con la misma cédula\");\n }\n } else {\n $this->cargarArrayResponse(false,\"Error, faltaron campos por diligenciar\");\n }\n responderJson($this->response);\n }", "title": "" }, { "docid": "1470d640a1cdaa7b49c0347fdc6f3d94", "score": "0.6008393", "text": "public function dataEncabezadoRecorNotasController(){\n if (isset($_POST['validar'])==true) {\n require_once \"../models/mn_misCursos.php\";\n $data = new stdClass();\n $this->errores=\"Lista Vacia\";\n // $idAlumno = $_SESSION[\"cod_usuario\"];\n $idAlumno=$_POST['alumno'];\n $result = MisCursosModel::dataEncabezadoRecorNotasModel($idAlumno, \"matricula\");\n if ($result!=null) {\n $data->respuesta='success';\n $data->listado=$result;\n }else{\n $data->errores=$this->errores;\n }\n echo json_encode($data);\n }\n }", "title": "" }, { "docid": "d547b4b41615dfb29298d9c3a3f2721a", "score": "0.6006371", "text": "public function registrarDatos($modelo,$usuarioRecibe,$proceso,$lote,$clave,$bdCode,$serial,$imei,$mov,$cantidad){\n\t\t\tinclude(\"../../includes/conectarbase.php\");\n\t\t\t$captura=$this->buscarDatosRepetidos($bdCode,$serial,$imei);\n\t\t\tif($captura==true){\n\t\t\t\t/*modificacion para especificar el guardado de equipos l metodo actual*/\n\t\t\t\t//se quita el insert y se va a realizar un insert masivo de datos\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t//$sqlInsertaRadio_1=\"INSERT INTO equipos (id_personal,id_modelo,imei,serial,bdcode,lote,mfgdate,status,statusProceso,f_recibo,h_recibo,observaciones,num_movimiento)\";\n\t\t\t\t//$sqlInsertaRadio_2=\" VALUES ('\".$usuarioRecibe.\"','\".$modelo.\"','\".$imei.\"','\".$serial.\"','\".$bdCode.\"','\".$lote.\"','\".$clave.\"','En Proceso','Recibo','\".date(\"Y-m-d\").\"','\".date(\"H:i:s\").\"','--','\".$mov.\"')\";\n\t\t\t\t\n\t\t\t\t//$sqlRadio=$sqlInsertaRadio_1.$sqlInsertaRadio_2;\n\t\t\t\t//$resRadio=mysql_query($sqlRadio,$this->conectarBd());\n\t\t\t\t//if($resRadio==true){\n\t\t\t\t\t\n\t\t\t\t\t//echo \n\t\t\t\t\t//$sqlContador=\"SELECT COUNT(*) AS Total FROM equipos WHERE num_movimiento='\".$mov.\"' AND id_modelo='\".$modelo.\"'\";\n\t\t\t\t\t//$resContador=mysql_query($sqlContador,$this->conectarBd());\n\t\t\t\t\t//$rowContador=mysql_fetch_array($resContador);\n\t\t\t\t\t//echo\"<br>\".\n\t\t\t\t\t//$contador=$rowContador[\"Total\"];\n\t\t\t\t\t\n\t\t\t\t\t//if($contador==$cantidad){\n\t\t\t\t\t\t\n?>\n\n\t\t\t\t\t<script type=\"text/javascript\"> //validacion();</script>\n<?\n\t\t\t\t\t\t//echo \"aqui se detiene\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t//}\n\t\t\t\t\t\n\t\t\t\t\t//echo \"<br>Registro Guardado\";\n?>\n\t\t\t\t\t<script type=\"text/javascript\"> \n\t\t\t\t\t\tarmaGrid2('<?=$bdCode;?>','<?=$imei;?>','<?=$serial;?>'); \n\t\t\t\t\t\t\n\t\t\t\t\t\t//contador('<?$mov?>','<?$modelo?>');//noCapturados=noCapturados+1;\n\t\t\t\t\t</script>\n<?\t\t\n \n\t\t\t\t//}else{\n\t\t\t\t\t//echo \"<br>Error al actualizar la informaci&oacute;n del Radio.\";\n?>\n\t\t\t<script type=\"text/javascript\"> //noCapturados=noCapturados-1; </script>\n\n<?\n\t\t\t\t\t\n\t\t\t\t//}\n\t\t\t}else{\n\t\t\t\techo \"<div style='background:#FFC;'><br>Revisar los Datos de la Captura.<br><br></div>\";\n\t\t\t\t\n?>\n\t\t\t<!--<script type=\"text/javascript\"> noCapturados=noCapturados-1; \n //$(\"#infoCaptura\").html(\"<div>Equipos Capturados</div><div>\"+noCapturados+\"</div>\");\n </script>-->\n\n<?\t\t\t\n\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e99bcbd6c2dae3ee4c7b84af1d2a27c2", "score": "0.60019976", "text": "public function agregar(){\n if(!isLoggedIn()){\n redirect('usuarios/login');\n }\n //check User Role -- Only ADMINISTRADOR allowed\n if(!checkLoggedUserRol(\"ADMINISTRADOR\")){\n redirect('dashboard');\n }\n\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n\n // Sanitize POST array\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n //Obtener catálogos para la vista\n $especialidades = $this->especialidadModel->obtenerEspecialidades();\n $ciudades = $this->ciudadModel->obtenerCiudades();\n $horariosDeAtencion = $this->horarioAtencionModel->obtenerHorariosDeAtencion();\n\n $data = [\n 'nombreCompleto' => trim($_POST['nombreCompleto']),\n 'fechaNacimiento' => trim($_POST['fechaNacimiento']),\n 'apellidoCompleto' => trim($_POST['apellidoCompleto']),\n 'telefono' => trim($_POST['telefono']),\n 'correo' => trim($_POST['correo']),\n 'direccion' => trim($_POST['direccion']),\n 'documento' => trim($_POST['documento']),\n 'ciudades' => $ciudades,\n 'especialidades' => $especialidades,\n 'horariosDeAtencion' => $horariosDeAtencion \n ];\n\n if(empty($_POST['genero'])){$data['genero'] = '';}else{$data['genero'] = $_POST['genero'];}\n if(empty($_POST['tipoDocumento'])){$data['tipoDocumento'] = '';}else{$data['tipoDocumento'] = $_POST['tipoDocumento'];}\n if(empty($_POST['ciudad'])){$data['ciudad'] = '';}else{$data['ciudad'] = $_POST['ciudad'];}\n if(!isset($_POST['especialidad'])){$data['especialidad'] = [];}else{$data['especialidad'] = $_POST['especialidad'];}\n if(!isset($_POST['horarioAtencion'])){$data['horarioAtencion'] = [];}else{$data['horarioAtencion'] = $_POST['horarioAtencion'];}\n\n // Validar Datos\n $dataValidated = validarFormularioPerfil(\"MEDICO\", $data);\n $data = $dataValidated['data'];\n $dataValid = $dataValidated['valid'];\n\n // Asegurarse que no haya errores\n if($dataValid){\n\n // Validar si el usuario ya existe\n $validarUsuario = $this->userModel->validarUsuarioPorCorreo($data['correo']);\n if($validarUsuario){\n\n $usuario = $this->userModel->obtenerUsuarioPorCorreo($data['correo']);\n $usuarioID = $usuario->idUsuario;\n // Verificar si el usuario ya tiene un perfil asignado\n if($usuario->perfilPersonaId != null){\n flash('agregarMedico_error', \"El médico ya tiene un perfil creado.\", 'alert alert-danger');\n return $this->view('personalMedico/agregar', $data);\n }\n }\n else{\n\n // Hash Generic Password\n $pass = 'Medico2021';\n\n $userData = [\n 'nombreUsuario' => explode('@', $data['correo'])[0],\n 'correo' => $data['correo'],\n 'password' => $pass\n ];\n\n // Registrar Usuario\n $nuevoUsuarioID = $this->userModel->crearUsuario($userData);\n if($nuevoUsuarioID != null){\n // Asignar rol 'MEDICO'\n if(!$this->userModel->asignarUsuarioRol($nuevoUsuarioID, \"MEDICO\")){\n flash('agregarMedico_error', 'Ocurrió un error inesperado durante la asignación de roles de usuario.'); \n return $this->view('personalMedico/agregar', $data);\n }\n $usuarioID = $nuevoUsuarioID;\n }\n else{\n flash('agregarMedico_error', 'Ocurrió un error inesperado durante el registro del usuario.'); \n return $this->view('personalMedico/agregar', $data);\n }\n }\n\n // Crear perfil del usuario\n $perfilCreadoId = $this->perfilPersonaModel->crearPerfilPersona($data);\n\n if($perfilCreadoId != null){\n // Asignar perfil al usuario\n $this->userModel->actualizarUsuarioPerfil($usuarioID, $perfilCreadoId);\n\n // Asignar Especialidad\n foreach ($data['especialidad'] as $especialidadSelected) {\n $this->perfilPersonaModel->asignarEspecialidad($perfilCreadoId, $especialidadSelected);\n }\n\n // Asignar Horario de Atención\n foreach ($data['horarioAtencion'] as $horarioAtencionSelected) {\n $this->perfilPersonaModel->asignarHorarioAtencion($perfilCreadoId, $horarioAtencionSelected);\n }\n }\n else{\n flash('agregarMedico_error', 'Ocurrió un error inesperado durante la creación del perfil del usuario.'); \n return $this->view('personalMedico/agregar', $data);\n }\n \n flash('agregarMedico_success', 'El registro del médico finalizó correctamente. Su contraseña actual es: ' . $pass); \n redirect('personalMedico/agregar');\n }\n else{\n flash('agregarMedico_error', \"Faltan campos obligatorios por completar\", 'alert alert-danger');\n return $this->view('personalMedico/agregar', $data);\n }\n }\n else{\n $especialidades = $this->especialidadModel->obtenerEspecialidades();\n $ciudades = $this->ciudadModel->obtenerCiudades();\n $horariosDeAtencion = $this->horarioAtencionModel->obtenerHorariosDeAtencion();\n\n $data = [\n 'nombreCompleto' => '',\n 'nombreCompleto_error' => '',\n 'fechaNacimiento' => '',\n 'fechaNacimiento_error' => '',\n 'genero' => '',\n 'apellidoCompleto' => '',\n 'apellidoCompleto_error' => '',\n 'telefono' => '',\n 'telefono_error' => '',\n 'correo' => '',\n 'correo_error' => '',\n 'direccion' => '',\n 'direccion_error' => '',\n 'documento' => '',\n 'documento_error' => '',\n 'tipoDocumento' => '',\n 'tipoDocumento_error' => '',\n 'ciudades' => $ciudades,\n 'ciudad' => '',\n 'ciudad_error' => '',\n 'especialidades' => $especialidades,\n 'especialidad' => [],\n 'especialidad_error' => '',\n 'horariosDeAtencion' => $horariosDeAtencion,\n 'horarioAtencion' => [],\n 'horarioAtencion_error' => ''\n ];\n \n return $this->view('personalMedico/agregar', $data);\n }\n }", "title": "" }, { "docid": "6e82f00ef0912b228415e4adecdd738f", "score": "0.59975564", "text": "protected function cambiarDatosUsuario()\n {\n $usu_nombres = $this->getRequest()->getParameter('usu_nombres');\n $usu_apellidos = $this->getRequest()->getParameter('usu_apellidos');\n $usu_correo = $this->getRequest()->getParameter('usu_correo');\n $usu_id = $this->getRequest()->getParameter('usu_id');\n $usu_usuario = $this->getRequest()->getParameter('usu_usuario');\n\n $salida;\n\n try{ \n $usuario = AgilhuUsuarioPeer::retrieveByPK($usu_id);\n $usuario->setUsuNombres($usu_nombres);\n $usuario->setUsuApellidos($usu_apellidos);\n $usuario->setUsuCorreo($usu_correo);\n $usuario->save();\n $salida = \"({success: true, mensaje:'El usuario fue actualizado exitosamente'})\";\n }\n catch (Exception $excepcionModulo)\n {\n $salida = \"({success: false, errors: { reason: 'Hubo un problema actualizando el usuario \".$usu_usuario.\"'}})\";\n }\n \n\n return $salida;\n }", "title": "" }, { "docid": "8fae3faab4bfbf2be269b3b3371c58a9", "score": "0.59947973", "text": "public function actionComunidades()\n {\n $modelComunidades = new Comunidades();\n if (Yii::$app->request->isAjax) \n {\n\n\n $parametro = intval($_POST['comunidad_id_parroquia']);\n\n $comunidades = Yii::$app->db->createCommand(\"SELECT comunidad.id_comunidad, \n comunidad.nombre, \n comunidad.direccion, \n comunidad.telefono, \n comunidad.persona_contacto, \n estado.estado,\n municipio.municipio,\n parroquia.parroquia\n FROM \n comunidades AS comunidad JOIN\n parroquias AS parroquia ON parroquia.id_parroquia=comunidad.id_parroquia \n JOIN municipios AS municipio ON municipio.id_municipio=parroquia.id_municipio\n JOIN estados AS estado ON estado.id_estado=municipio.id_estado\n WHERE comunidad.id_parroquia=$parametro\")->queryAll();\n //var_dump($comunidades); die();\n // Se itera sobre el arreglo y se definen las variables a enviar por ajax\n\n if(empty($comunidades))\n {\n $comunidades = false;\n }\n\n\n\n Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n\n if($_POST != \"\")\n {\n return [\n 'data' => [\n 'success' => true,\n 'message' => 'El modelo ha sido guardado.',\n 'comunidades' => $comunidades,\n ],\n 'code' => 0,\n ];\n }\n else\n {\n return [\n 'data' => [\n 'success' => false,\n 'message' => 'Ocurrió un error.',\n ],\n 'code' => 1, // Some semantic codes that you know them for yourself\n ];\n }\n\n }\n\n return $this->render('integrantes', [\n 'modelIntegrantes' => $modelIntegrantes,\n ]);\n }", "title": "" }, { "docid": "2a27d831f7c6429fb6cbc38c9f49b869", "score": "0.59939486", "text": "public function mostrarTablas(){\t\n\t\t\n\t\t$item = null;\n \t\t$valor = null;\n\n \t\t$Promociones = ControladorControlMuestras::ctrMostrarPromociones($item, $valor);\n\n\n \t\t$datosJson = '{\n\t\t \n\t \t\"data\": [ ';\n\n\t \tfor($i = 0; $i < count($Promociones); $i++){\n\n\t \t\t$img = \"<img class='img-thumbnail imgPortadaCategorias' src='\".$Promociones[$i][\"imagen\"].\"' width='100px'>\";\n\t \t\t$editar = \"<button class='btn btn-warning btnEditarPromociones' idPromocion='\".$Promociones[$i][\"id\"].\"' data-toggle='modal' data-target='#modalEditarPromociones'><i class='fa fa-pencil'></i></button>\";\n\t \t\t/*=============================================\n\t\t\tDEVOLVER DATOS JSON\n\t\t\t=============================================*/\n\n\t\t\t$datosJson\t .= '[\n\t\t\t\t \n\t\t\t\t \"'.$Promociones[$i][\"id\"].'\",\n\t\t\t\t \"'.$Promociones[$i][\"descripcion\"].'\",\n\t\t\t\t \"'.$img.'\",\n\t\t\t\t \"'.$editar.'\"\n\t\t\t\t ],';\n\n\t \t}\n\n\t \t$datosJson = substr($datosJson, 0, -1);\n\n\t\t$datosJson.= ']\n\t\t\t \n\t\t}'; \n\n\t\techo $datosJson;\n\n \t}", "title": "" }, { "docid": "55d57a3f58583950932c66e1b7b87927", "score": "0.59859455", "text": "public function crear(){\n\t\trequire_once 'model/Pais.php';\n\n\t\t\tif(isset($_POST[\"mail\"]) && isset($_POST[\"pass\"]) && isset($_POST['nombre']) && isset($_POST['apellido'])&& isset($_POST['pais'])&& isset($_POST['username']) ){\n \n\t\t\t\t//Creamos un usuario\n\t\t\t\t$usuario=new Usuario($this->adapter);\n\n\t$username= $_POST['username'];\n\t$password = $_POST['pass'];\n\t$apellido = $_POST['apellido'];\n\t$nombre = $_POST['nombre'];\n\t$mail = $_POST['mail'];\n\t$codigo = $_POST['pais'];\n\n\t$pais=new Pais($this->adapter);\n\t$allPaises= $pais->getPaises(); \n\tforeach ($allPaises as $pa){if ($pa->codigo == $codigo){$pais->__set('pais',$pa->pais);}}\n\n\t$salt = bin2hex(random_bytes(32)); \n $saltedPass = $password.$salt; \n $hashedPass = hash('sha256', $saltedPass);\n\t\t\t\t\n\t\t\t\t$usuario->__set('nombre',$nombre);\n\t\t\t\t$usuario->__set('apellido',$apellido);\n\t\t\t\t$usuario->__set('mail',$mail);\n\t\t\t\t$usuario->__set('pass',$hashedPass);\n\t\t\t\t$usuario->__set('salt',$salt);\n\t\t\t\t$usuario->__set('username',$username);\n\t\t\t\t$usuario->__set('pais',$pais);\n\n\n\n\t\t\t$existe;\n\t\t\t$existeuser;\n\tif ($usuario->consultar($mail)){ $existe=true;} else {$existe=false;}\n\tif ($usuario->consultar($username)){ $existeuser=true;} else {$existeuser=false;}\n\n\t\tif($existe){\t\t\t\t\t\n\t\techo \"<div class=\\\"alert alert-danger\\\" role=\\\"alert\\\">El mail ingresado ya se encuentra registrado.</div>\";\n\t\t$this->registro();\n \t}else{ \n\n\t\t\tif($existeuser){\n\t\t\t\techo \"<div class=\\\"alert alert-danger\\\" role=\\\"alert\\\">El nombre de usuario ya existe. Elija otro.</div>\";\n\t\t\t\t$this->registro();\n\t\t\t} else{\n\n\t\t\t\t$save=$usuario->save2($codigo);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$_SESSION['usuario']=$usuario;\n\t\t\t\t$_SESSION['mail']=$mail;\n\n\t\t\t\t\n\n\t\t\t\t//$usuario= $this->setearUsuario($usuario);\n\t\t\t\t$this->redirect(\"Muro\",\"modificarPerfil\");}\t}\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t} else{ $this->registro();}\n}", "title": "" }, { "docid": "870915b461b9917b963c23e745909d1f", "score": "0.59791094", "text": "public function formRegistroAlumno()\n\t{\n\t\tif (!SESSION('user_admin'))\n\t\t\treturn redirect(get('webURL') . _sh .'admin/login');\n\n\t\t$vars['carreras'] = $this->Admin_Model->getCarreras(NULL, false);\n\t\t$vars['view'] = $this->view('registroalumno',true);\n\t\t$vars['menu'] = 2;\n\t\tinclude(_pathwww.'/lib/funciones/avisos.php');\n\t\t$this->render(\"content\",$vars);\n\t}", "title": "" }, { "docid": "ae28ed043113c404dd1f48241b98b1bd", "score": "0.5978954", "text": "public function registroUserModel($tabla, $datos)\n {\n $stmt = Conexion::connection()->prepare(\"INSERT INTO $tabla(nombre, apellido_paterno, apellido_materno, fecha_nacimiento, correo, password, nacionalidad)\nvalues (:nombreUser,:paterno,:materno,:fechaNac,:email,:pass,:nacion)\");\n /*\n $stmt = Conexion::connection()->prepare(\"INSERT INTO usuario(nombre, apellido_paterno, \n apellido_materno, fecha_nacimiento, correo, password, nacionalidad,nivel_usuario) \n VALUE (:nombreUser,:paterno,:materno,:fechaNac,:email,:pass,:nacion,:nivelUser)\");\n */\n // $stmt->bindParam(':id', $datos['numUser'], PDO::PARAM_INT);\n $stmt->bindParam(\":nombreUser\", $datos[\"nameUser\"], PDO::PARAM_STR);\n $stmt->bindParam(\":paterno\", $datos[\"ap_paterno\"], PDO::PARAM_STR);\n $stmt->bindParam(\":materno\", $datos[\"ap_materno\"], PDO::PARAM_STR);\n $stmt->bindParam(\":fechaNac\", $datos[\"fechaNac\"], PDO::PARAM_STR);\n $stmt->bindParam(\":email\", $datos[\"email\"], PDO::PARAM_STR);\n $stmt->bindParam(\":pass\", $datos[\"password\"], PDO::PARAM_STR);\n $stmt->bindParam(\":nacion\", $datos[\"nacionalidad\"], PDO::PARAM_STR);\n // $stmt->bindParam(\":nivelUser\", $datos[\"nivelUser\"], PDO::PARAM_STR);\n if ($stmt->execute()) {\n // $message = 'Usuario creado satisfactoriamente';\n return \"success\";\n } else {\n //$message = 'Error en el registro, intente de neuvo';\n return \"error\";\n }\n\n }", "title": "" }, { "docid": "17d1e0a8e98c4c7bf571ed1bfa8dced1", "score": "0.59789425", "text": "public function FormRegPrivato()\n {\n $view = new VRegistrazione();\n $view->formRegistrazionePrivato();\n }", "title": "" }, { "docid": "b2235cdb3acb1b4c4f741f0c6ae609bc", "score": "0.59782225", "text": "function get_data_form(){\n\n\t\t//Asignación de valores a las variables\n\t\t$codCentro = $_POST['codCentro']; \n\t\t$codEdificio = $_POST['codEdificio'];\n\t\t$nombreCentro = $_POST['nombreCentro'];\n\t\t$direccionCentro = $_POST['direccionCentro'];\n\t\t$responsableCentro = $_POST['responsableCentro'];\n\t\t$action = $_POST['action'];\n\t\t//Variable que almacena un objeto centro\n\t\t$CENTRO = new CENTRO_Model(\n\t\t$codCentro,\n\t\t$codEdificio,\n\t\t$nombreCentro,\n\t\t$direccionCentro,\n\t\t$responsableCentro\n\t\t);\n\n\t\t//Devuelve el valor del objecto\n\t\treturn $CENTRO;\n\n\t}", "title": "" }, { "docid": "9fb2f27ce262a948541c76992af195e2", "score": "0.59766036", "text": "public function productos() { \n \n $data = array();\n \n $data['marcas'] = $this->atributos->ajaxClasificacion(1); \n $data['proveedores'] = $this->atributos->ajaxClasificacion(2);\n $data['colores'] = $this->atributos->ajaxClasificacion(3);\n $data['tallas'] = $this->atributos->ajaxClasificacion(4);\n $data['lineas'] = $this->atributos->ajaxClasificacion(5);\n $data['materiales'] = $this->atributos->ajaxClasificacion(6); \n \n $data['categorias'] = $this->atributos->ajaxCategorias(); \n $data['almacenes'] = $this->atributos->ajaxAlmacenes(); \n \n $this->layout->template('member')->show('atributos/atributosInformeInventario',array( 'data' => $data) ); \n \n }", "title": "" }, { "docid": "1228f0e483423a05b1e1ce0eb81f86d1", "score": "0.5972671", "text": "public function CrearFormulario(){\n\n\t\t$grupo=Input::get('nombre');\n\n\t\t$fecha_creacion=Input::get('creacion-grupo');\n\n\t\t$dateinicio = new DateTime($fecha_creacion);\n\n\t\t$fecha_creacion=$dateinicio->format('Y-m-d');\n\n\n\t\t$coord=Input::get('cedula-persona');\n\t\t$email=Input::get('email');\n\t\t$pagina=Input::get('pagina');\n\t\t$telefono=Input::get('telefono');\n\t\t$direccion1=Input::get('direccion');\n\t\t$unidad=Input::get('unidad');\n\t\t$categoria=Input::get('categoria');\n\t\t$tipo=Input::get('tipo');\n\t\t$objetivos=Input::get('objetivos');\n\t\t$gruplac=Input::get('gruplac');\n\t\t\t\n\n\t\t//manejo archuvos\n\t\t$nombreNuevo=\"\";\n\t\t$direccion = __DIR__.\"/../../public/archivos_db/grupos/\";\n\n\n\t\t$todosDatos = Input::except('logog','afiche','img1','img2');\n\t\t\n\n\t\t$entidad=new InvGrupos();\n\t\t\n\t\t$entidad->nombre_grupo=$grupo;\n\t\t$entidad->director_grupo=$coord;\n\t\t$entidad->email=$email;\n\t\t$entidad->pagina_web=$pagina;\n\t\t$entidad->telefono=$telefono;\n\t\t$entidad->direccion_grupo=$direccion1;\n\t\t$entidad->objetivos=$objetivos;\n\t\t$entidad->inv_unidad_academica=$unidad;\n\t\t$entidad->categoria=$categoria;\n\t\t$entidad->inv_tipo_grupos=$tipo;\n\t\t$entidad->link_gruplac=$gruplac;\n\t\t$entidad->ano_creacion=$fecha_creacion;\n\n\n\n\t\t\t// mensaje a mostrar segun errores o requerimientos\n\t\t\t$messages = array(\n\t\t\t\t'required' => 'Este campo es obligatorio.',\n\t\t\t\t'max'=>'El campo no debe ser mayor a :max.',\n\t\t\t\t'email' =>'No es una dirección de email válida.',\n\t\t\t\t'unique'=>'Verifique, es posible que ya exista el grupo.'\n\n\t\t\t);\n\t\t\t\t\t\t// execute la validacin \n\n\t\t\t$validator = Validator::make(Input::all(), InvGrupos::$reglasValidacion,$messages);\n\n\n\t\t\tif ($validator->fails()) {\n\t\t\t\t$messages = $validator->messages();\n\n\n\n\t\t\t\treturn Redirect::to('formulariogrupos')\n\t\t\t\t\t->withErrors($validator)\n\t\t\t\t\t->withInput($todosDatos)\n\t\t\t\t\t->with('mensaje_error',\"Error al guardar\");\n\t\t} else {\n\n\t\t\t\t\t\t$archivo1=$this->ArchivosGrupos('logog',$direccion);//archivoshtml\n\t\t\t\t\t\t\t$entidad->logo_grupo=$archivo1;//base\n\n\t\t\t\t\t\t$archivo2=$this->ArchivosGrupos('afiche',$direccion);\n\t\t\t\t\t\t\t$entidad->ruta_afiche=$archivo2;\n\n\t\t\t\t\t\t$archivo3=$this->ArchivosGrupos('img1',$direccion);\n\t\t\t\t\t\t\t$entidad->imagen1=$archivo3;\n\n\t\t\t\t\t\t$archivo4=$this->ArchivosGrupos('img2',$direccion);\n\t\t\t\t\t\t\t$entidad->imagen2=$archivo4;\t\n\n\t\t\t\t\t\t$entidad->save();\n\n\t\t\t\t\t\t$listaIntegrantes=Input::get(\"integrantes\"); // name del json del jquery\n\t\t\t\t\t\t$listaLineas=Input::get(\"lineas\"); // name del json del jquery\n\n\n\t\t\t\t\t\tfor($i=0;$i<count($listaIntegrantes);$i++)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t$modelIntegrante=new InvParticipacionGrupos();\n\t\t\t\t\t\t\t$modelIntegrante->inv_codigo_grupo = $entidad->codigo_grupo;\n\t\t\t\t\t\t\t$modelIntegrante->cedula_persona = $listaIntegrantes[$i];\n\t\t\t\t\t\t\t$modelIntegrante->save();\n\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\tfor($i=0;$i<count($listaLineas);$i++)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t$modelLinea=new InvParticipacionGruposLineas();\n\t\t\t\t\t\t\t$modelLinea->inv_codigo_grupo = $entidad->codigo_grupo; //donde estoy .. donde apunto\n\t\t\t\t\t\t\t$modelLinea->inv_id_linea = $listaLineas[$i];\n\t\t\t\t\t\t\t$modelLinea->save();\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t}\n\n\t\t\t\t\tcatch(PDOException $e)\n\t\t\t\t\t{\n\t\t\t\t\t\t//return 'existe un error' + $e;\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn Redirect::to('formulariogrupos')\n\t\t\t\t\t\t->withInput($todosDatos)\n\t\t\t\t\t\t->with('mensaje_error',\"Error en el servidor.\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\treturn Redirect::to('formulariogrupos')\n\t\t\t\t\t\t\t\t->withInput($todosDatos)\n\t\t\t\t\t\t\t\t->with('mensaje_success',\"El grupo ha sido creado.\");\n\t\t\t\n\t\t\t\t\t}\n\t\t\t\n\t\t\t}", "title": "" }, { "docid": "6b873eb9275b5df2023ef79db0288a48", "score": "0.59701747", "text": "static public function get_datosU(){\n\n /**DECLARACION DE ARREGLO $data DONDE CONTENDRA LOS DATOS DEL FORMULARIO AGREGAR UNIVERSDIAD O EDITAR */\n $data['id']=$_REQUEST['txt_id'];\n $data['nombre_universidad']=$_REQUEST['txt_nombre'];\n\n if ($_REQUEST['id']==\"\") {\n universidad_model::create($data);\n }\n \n if($_REQUEST['id']!=\"\"){\n $date=$_REQUEST['id'];\n universidad_model::update($data,$date);\n }\n\n /*LO REDIRECCIONAMOS AL INICIO */\n header(\"Location:index.php?mu=universidad\");\n\n }", "title": "" }, { "docid": "dbf4f1ec085328000f6ce0857591da64", "score": "0.59696674", "text": "public function cargar_para_registrar_en_centro_acogimiento(){\n\t $this->vld_session();\n $centro_acogimiento = $this->Nnamodel->retorna_centros_de_acogimiento($_SESSION['__USER_ID_DEPTO'],$_SESSION['__USER_ID']);\n $option = \"<option value=''></option>\";\n foreach($centro_acogimiento -> result() as $linha_centros) \n\t { $option .= \"<option value='$linha_centros->inst_id'>$linha_centros->inst_nombre</option>\"; }\n $data_nna['options_centro_acogimiento'] = $option;\n\n $deptos = $this->Nnamodel->retorna_departamentos($_SESSION['__USER_ID_DEPTO']);\n $optionDepto = \"<option value=''></option>\";\n foreach($deptos -> result() as $linha_deptos) \n\t { $optionDepto .= \"<option value='$linha_deptos->dep_id'>$linha_deptos->dep_nombre</option>\"; }\n $data_nna['options_departamentos'] = $optionDepto;\n\t \n\t $provincias = $this->Nnamodel->retorna_provincias($_SESSION['__USER_ID_DEPTO']);\n $optionProv = \"<option value=''></option>\";\n foreach($provincias -> result() as $linha_provs) \n\t { $optionProv .= \"<option value='$linha_provs->prov_id'>$linha_provs->prov_nombre</option>\"; }\n $data_nna['options_provincias'] = $optionProv;\n\t \n\t $instituciones = $this->Nnamodel->retorna_institucion_autoriza();\n $option_instOrdena = \"<option value=''></option>\";\n foreach($instituciones -> result() as $linha_inst) \n\t { $option_instOrdena .= \"<option value='$linha_inst->insta_id'>$linha_inst->insta_nombre</option>\"; }\n\t \n\t $data_nna['options_por_orden_de']=$option_instOrdena;\n\t \n\t $problematic_familiar = $this->Nnamodel->retorna_problematica_familiar(\"I\");\n $optionProbFliar = \"\";\n foreach($problematic_familiar -> result() as $linha_probFliar) \n\t { $optionProbFliar .= \"<option value='$linha_probFliar->ing_egr_id'>$linha_probFliar->ing_egr_nombre</option>\"; }\n $data_nna['options_prob_fliar'] = $optionProbFliar;\n \n\t $tipologias = $this->Nnamodel->retorna_tipologias_de_ingreso();\n $optionTipolofias = \"\";\n foreach($tipologias -> result() as $linha_tipologias) \n\t { $optionTipolofias .= \"<option value='$linha_tipologias->cat_tip_id'>$linha_tipologias->cat_tip_nombre</option>\"; }\n $data_nna['options_tipologias'] = $optionTipolofias;\n\t\n\t /*$categorias = $this->Nnamodel->retorna_categorias_de_ingreso();\n $optioncategorias = \"\";\n foreach($categorias -> result() as $linha_categorias) \n\t { $optioncategorias .= \"<option value='$linha_categorias->cat_tip_id'>$linha_categorias->cat_tip_nombre</option>\"; }\n $data_nna['options_categorias'] = $optioncategorias;*/\n\t\n $id = $this->uri->segment(3);\n $data_nna['row_nna'] = $this->Nnamodel->obtener_datos_nna_x_id($id)->result();\n\t$this->load->view('observatorio/modulos/encabezadoContenido.php');\n $this->load->view('observatorio/modulos/mod_nna/registrarespecificaciones.php',$data_nna);\n }", "title": "" }, { "docid": "de50857e09ca638872c63b57934f1c6c", "score": "0.5968669", "text": "public function registro() {\r\n require_once 'views/usuario/registro.php'; //Cargo vista\r\n }", "title": "" }, { "docid": "721b9ba1a2fc5010da40425e6cd349d2", "score": "0.5964112", "text": "public function InsertarForm()\n {\n $excepciones = [\n 'logo'\n ];\n if($this->validadorFormulario($_POST,$excepciones)){\n switch ($this->objModelo->InsertarForm($_POST)) {\n case 1:\n $this->cargarArrayResponse(true,\"Registro parqueadero realizado con exito\");\n break;\n case 2:\n $this->cargarArrayResponse(true,\"Registro parqueadero realizado con exito, le informamos que el logo no pudo ser registrado por un problema en el servidor, intentelo de nuevo\");\n break;\n case 3:\n $this->cargarArrayResponse(true,\"Registro parqueadero realizado con exito, le informamos que el logo no pudo ser registrado por no tener el formato permitido, (.jpg, .png, .jpeg)\");\n break;\n case 0:\n $this->cargarArrayResponse(false,\"Error, no fue posible realizar el registro verifique que no exista un registro con el mismo nit\");\n break;\n }\n } else {\n $this->cargarArrayResponse(false,\"Error, debe diligenciar correctamente el formulario\");\n }\n responderJson($this->response);\n }", "title": "" }, { "docid": "f3978f36e9bfc9f53ce8ac658d7bf0f3", "score": "0.5963638", "text": "static public function ctrCrearUso(){\n\n\t\tif(isset($_POST[\"nuevoID\"])){\n\n\t\t\tif(preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"nuevoID\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevoNombre\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevaDescripcion\"])){\n\n\t\t\t\t$tabla = \"uso\";\n\n\t\t\t\t$datos = array(\"usoID\" => $_POST[\"nuevoID\"],\n\t\t\t\t\t \"uNombre\" => $_POST[\"nuevoNombre\"],\n\t\t\t\t\t \"uDescripcion\" => $_POST[\"nuevaDescripcion\"]);\n\n\t\t\t\t$respuesta = ModeloUso::mdlIngresarUso($tabla, $datos);\n\n\n\n\t\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\t\techo'<script>\n\n\t\t\t\t\tswal({\n\t\t\t\t\t\t type: \"success\",\n\t\t\t\t\t\t title: \"El uso ha sido guardado correctamente\",\n\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\t\twindow.location = \"uso\";\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t</script>';\n\n\t\t\t\t}\n\n\n\t\t\t}else{\n\n\t\t\t\techo'<script>\n\n\t\t\t\t\tswal({\n\t\t\t\t\t\t type: \"error\",\n\t\t\t\t\t\t title: \"¡Los campos no pueden ir vacíos o llevar caracteres especiales!\",\n\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\twindow.location = \"uso\";\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\n\t\t\t \t</script>';\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "722b30e912af458e21b5a97f22cd79dd", "score": "0.59635663", "text": "public function registrar() {\n require 'models/IndexModel.php';\n require 'models/MatriculaModel.php';\n require 'models/UsuarioModel.php';\n\n echo \"<pre>\";\n print_r($_POST);\n \n //Creamos una instancia de nuestro \"modelo\"\n $indexModel = new IndexModel();\n $matriculaModel = new MatriculaModel();\n $usuarioModel = new UsuarioModel();\n\n $formXhtml = new Xhtml();\n //VERIFICO QUE LA MATRICULA DEL ESTUDIANTE SEA UNICA PARA EL AÑO ACTUAL\n if ($matriculaModel->confirmMatriculaWhere(\"anio = '\" . $_POST[\"anio\"] . \"' AND numero_documento = '\" . $_POST[\"numero_documento\"] . \"' AND tipo_documento = '\" . $_POST[\"tipo_documento\"] . \"'\")) {\n $anio = date(\"Y\");\n $formXhtml->alert(\"Los campos de identificacion (Año, Tipo de documento y Numero de documento) ya se encuentra en la base de datos, este estudiante ya esta matriculado para este año (\" . $anio . \")\");\n $formXhtml->location(\"index.php?controlador=Matricula&accion=matricula\");\n exit;\n } else { \n //VERIFICO USUARIO SI EXISTE PARA CREAR O ASOCIAR A LA NUEVA MATRICULA\n if (!$usuarioModel->confirmEstudiante($_POST[\"estudiante\"])) {\n if (!$usuarioModel->confirmUsuarioWhere(\"numero_documento = '\" . $_POST[\"numero_documento\"] . \"' AND tipo_documento = '\" . $_POST[\"tipo_documento\"] . \"'\")) {\n \n //CREO EL USUARIO DEL ESTUDIANTE NUEVO\n $_POST[\"usuario\"] = strtolower($_POST[\"primer_nombre\"][0] . $_POST[\"segundo_nombre\"][0] . $_POST[\"primer_apellido\"] . $_POST[\"segundo_apellido\"][0] . \"@colegioelfuturo.edu.co\");\n $_POST[\"clave\"] = sha1($_POST[\"numero_documento\"]);\n $_POST[\"fecha_crear\"] = date(\"Y-m-d H:i:s\");\n $_POST[\"usuario_crear\"] = 1;\n $_POST[\"activo\"] = 1;\n $_POST[\"estudiante\"] = $usuarioModel->newUsuario($_POST); \n \n //CREO EL PERFIL DE CADA USUARIO\n $usuarioModel->ejecutaSql(\"INSERT INTO usuario_perfil(perfil, usuario) VALUES ('5','\" . $_POST[\"estudiante\"] . \"')\");\n \n } \n /*\n else {\n $formXhtml->alert(\"Los campos de identificacion (Tipo de documento y Numero de documento) ya se encuentra en la base de datos\"); \n $formXhtml->location(\"index.php?controlador=Matricula&accion=verificar&numero_documento=\".$_POST[\"numero_documento\"].\"&tipo_documento=\".$_POST[\"tipo_documento\"].\"&anio=\".$_POST[\"anio\"]);\n exit;\n } \n */\n }\n else\n {\n //if (!$usuarioModel->confirmUsuarioWhere(\"numero_documento = '\" . $_POST[\"numero_documento\"] . \"' AND tipo_documento = '\" . $_POST[\"tipo_documento\"] . \"' AND id<>'\" . $_POST[\"estudiante\"] . \"'\")) \n //{ \n $id=$_POST[\"id\"]; \n $_POST[\"fecha_editar\"] = date(\"Y-m-d H:i:s\");\n $_POST[\"usuario_editar\"] = 1;\n $_POST[\"id\"] = $_POST[\"estudiante\"]; \n $usuarioModel->modUsuario($_POST);\n $_POST[\"id\"] = $id;\n /*} else {\n $formXhtml->alert(\"Los campos de identificacion (Tipo de documento y Numero de documento) ya se encuentra en la base de datos\"); \n $formXhtml->location(\"index.php?controlador=Matricula&accion=verificar&numero_documento=\".$_POST[\"numero_documento\"].\"&tipo_documento=\".$_POST[\"tipo_documento\"].\"&anio=\".$_POST[\"anio\"]);\n exit; \n }*/\n }\n \n //CREO LA MATRICULA DEL AÑO ACTUAL\n $_POST[\"fecha_crear\"] = date(\"Y-m-d H:i:s\");\n $_POST[\"usuario_crear\"] = 1;\n $_POST[\"activo\"] = 1;\n $_POST[\"estado\"] = \"Inscrito\";\n unset($_POST[\"id\"]);\n $id_matricula = $matriculaModel->newMatricula($_POST);\n \n //VERIFICO PADRE YA ESTA EN LA BASE DE DATOS\n if ($usuarioModel->confirmUsuarioWhere(\"id = '\" . $_POST[\"id_padre\"] . \"'\")) {\n $usuarioModel->ejecutaSql(\"INSERT INTO acudiente(matricula, usuario, parentesco) VALUES ('\" . $id_matricula . \"','\" . $_POST[\"id_padre\"] . \"','Padre')\");\n }\n else\n { \n //VERIFICO SI EL USUARIO DEL PADRE EXISTE\n if (!$usuarioModel->confirmUsuarioWhere(\"numero_documento = '\" . $_POST[\"padre\"][\"numero_documento\"] . \"' AND tipo_documento = '\" . $_POST[\"padre\"][\"tipo_documento\"] . \"'\")) {\n if (!$usuarioModel->confirmUsuarioWhere(\"usuario = '\" . $_POST[\"padre\"][\"email\"] . \"'\")) {\n $_POST[\"padre\"][\"fecha_crear\"] = date(\"Y-m-d H:i:s\");\n $_POST[\"padre\"][\"usuario_crear\"] = 1;\n $_POST[\"padre\"][\"clave\"] = sha1($_POST[\"padre\"][\"numero_documento\"]);\n $_POST[\"padre\"][\"activo\"] = 1;\n $_POST[\"padre\"][\"usuario\"] = $_POST[\"padre\"][\"email\"];\n $id_padre = $usuarioModel->newUsuario($_POST[\"padre\"]);\n $usuarioModel->ejecutaSql(\"INSERT INTO usuario_perfil(perfil, usuario) VALUES ('6','\" . $id_padre . \"')\");\n $usuarioModel->ejecutaSql(\"INSERT INTO acudiente(matricula, usuario, parentesco) VALUES ('\" . $id_matricula . \"','\" . $id_padre . \"','Padre')\"); \n } else {\n $formXhtml->alert(\"El campo (email) del padre de familia que intenta ingresar ya se encuentra en la base de datos de acudientes\"); \n $formXhtml->location(\"index.php?controlador=Matricula&accion=verificar&numero_documento=\".$_POST[\"numero_documento\"].\"&tipo_documento=\".$_POST[\"tipo_documento\"].\"&anio=\".$_POST[\"anio\"]);\n exit;\n }\n } else {\n $acudiente_padre=$usuarioModel->consultUsuarioWhere(\"numero_documento = '\" . $_POST[\"padre\"][\"numero_documento\"] . \"' AND tipo_documento = '\" . $_POST[\"padre\"][\"tipo_documento\"] . \"'\");\n $usuarioModel->ejecutaSql(\"INSERT INTO acudiente(matricula, usuario, parentesco) VALUES ('\" . $id_matricula . \"','\" . $acudiente_padre[\"id\"] . \"','Padre')\"); \n }\n }\n \n //VERIFICO PADRE YA ESTA EN LA BASE DE DATOS\n if ($usuarioModel->confirmUsuarioWhere(\"id = '\" . $_POST[\"id_acudiente\"] . \"'\")) {\n $usuarioModel->ejecutaSql(\"INSERT INTO acudiente(matricula, usuario, parentesco) VALUES ('\" . $id_matricula . \"','\" . $_POST[\"id_acudiente\"] . \"','Acudiente')\");\n }\n else\n {\n //VERIFICO SI EL USUARIO DE ACUDIENTE EXISTE\n if (!$usuarioModel->confirmUsuarioWhere(\"numero_documento = '\" . $_POST[\"acudiente\"][\"numero_documento\"] . \"' AND tipo_documento = '\" . $_POST[\"acudiente\"][\"tipo_documento\"] . \"'\")) {\n if (!$usuarioModel->confirmUsuarioWhere(\"usuario = '\" . $_POST[\"acudiente\"][\"email\"] . \"'\")) {\n $_POST[\"acudiente\"][\"fecha_crear\"] = date(\"Y-m-d H:i:s\");\n $_POST[\"acudiente\"][\"usuario_crear\"] = 1;\n $_POST[\"acudiente\"][\"clave\"] = sha1($_POST[\"acudiente\"][\"numero_documento\"]);\n $_POST[\"acudiente\"][\"activo\"] = 1;\n $_POST[\"acudiente\"][\"usuario\"] = $_POST[\"acudiente\"][\"email\"];\n $id_acudiente = $usuarioModel->newUsuario($_POST[\"acudiente\"]);\n $usuarioModel->ejecutaSql(\"INSERT INTO usuario_perfil(perfil, usuario) VALUES ('6','\" . $id_acudiente . \"')\");\n $usuarioModel->ejecutaSql(\"INSERT INTO acudiente(matricula, usuario, parentesco) VALUES ('\" . $id_matricula . \"','\" . $id_acudiente . \"','Acudiente')\"); \n } else {\n $formXhtml->alert(\"El campo (email) del acudiente de familia que intenta ingresar ya se encuentra en la base de datos de acudientes\"); \n $formXhtml->location(\"index.php?controlador=Matricula&accion=verificar&numero_documento=\".$_POST[\"numero_documento\"].\"&tipo_documento=\".$_POST[\"tipo_documento\"].\"&anio=\".$_POST[\"anio\"]);\n exit;\n }\n } else {\n $acudiente_acudiente=$usuarioModel->consultUsuarioWhere(\"numero_documento = '\" . $_POST[\"acudiente\"][\"numero_documento\"] . \"' AND tipo_documento = '\" . $_POST[\"acudiente\"][\"tipo_documento\"] . \"'\");\n $usuarioModel->ejecutaSql(\"INSERT INTO acudiente(matricula, usuario, parentesco) VALUES ('\" . $id_matricula . \"','\" . $acudiente_acudiente[\"id\"] . \"','Padre')\");\n }\n }\n \n $anio = date(\"Y\");\n \n $formXhtml->alert(\"Felicitaciones su registro de matricula esta en estado Inscrito para el año (\" . $anio . \")\"); \n $formXhtml->location(\"index.php?controlador=Matricula&accion=verificar&numero_documento=\".$_POST[\"numero_documento\"].\"&tipo_documento=\".$_POST[\"tipo_documento\"].\"&anio=\".$_POST[\"anio\"]);\n exit;\n }\n \n }", "title": "" }, { "docid": "3d1e99a2e09a416361748012538e4227", "score": "0.59623224", "text": "public function buscar_actividad() {\n // tipo_busqueda --> 1 si busca por un texto en el cajetin del menu\n // tipo_busqueda --> 2 si busca desde un formulario\n\n // Comprueba que tenga iniciada sesion.\n if ($this -> libreria_sesiones -> comprobar_session() == true){\n // Inicializamos\n $pa_la_vista = array();\n // La siguiente linea de momento dejo, por si errores de respuesta\n $pa_la_vista['actualizado'] = 0;\n // Datos del usuario de la sesion de usuario\n $datos_usuario = $this -> libreria_sesiones -> devuelve_datos_session();\n $idusuario = $datos_usuario['idsesion'];\n $pa_la_vista['usuario'] = $datos_usuario;\n // Recogemos la query del formulario (del menu), del q\n if ($this -> input -> POST(\"tipo_busqueda\") == 1){\n $texto = $this -> input -> POST(\"q\");\n // Llamamos al modelo que busca por la query (q) en ambos campos con un OR\n $pa_la_vista['actividades'] = $this -> modelo_actividades -> buscar_cajetin($texto);\n\n // Llamamos a las vistas con el resultado\n $this -> load -> view (\"admin/header\");\n $this -> load -> view (\"admin/menu\",$datos_usuario);\n $this -> load -> view (\"admin/actividades/buscar_actividad\", $pa_la_vista);\n $this -> load -> view (\"admin/footer\");\n // Tipo de busqueda formulario\n } else if ($this -> input -> POST(\"tipo_busqueda\") == 2){\n $datos_busqueda = array(\n $this -> input -> POST(\"campanya\"),\n $this -> input -> POST(\"actividad\"),\n $this -> input -> POST(\"organiza\"),\n $this -> input -> POST(\"fecha\").\" \".$this -> input -> POST(\"hora\")\n );\n // Llamamos al modelo que busca por los campos AND\n $pa_la_vista['actividades'] = $this -> modelo_actividades -> buscar_actividad($datos_busqueda);\n // Llamamos a las vistas con el resultado\n $this -> load -> view (\"admin/header\");\n $this -> load -> view (\"admin/menu\",$datos_usuario);\n $this -> load -> view (\"admin/actividades/buscar_actividad\", $pa_la_vista);\n $this -> load -> view (\"admin/footer\");\n } else {\n // Llamamos al formulario para meter los datos de busqueda\n $this -> load -> view (\"admin/header\");\n $this -> load -> view (\"admin/menu\",$datos_usuario);\n $this -> load -> view (\"admin/actividades/formbuscar_actividad\",$pa_la_vista);\n $this -> load -> view (\"admin/footer\");\n }\n } else {\n //Enviamos al inicio\n $this -> load -> view (\"admin/header\");\n $this -> load -> view (\"admin/index\");\n $this -> load -> view (\"admin/footer\");\n }\n\n }", "title": "" }, { "docid": "9ed84d4e747add3376b0a6823302699f", "score": "0.5961802", "text": "static public function ctrCrearProveedores(){\n\n if(isset($_POST[\"nuevoNombreProveedor\"])){\n\n if(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevoNombreProveedor\"])){\n\n\t\t\t\t\t$tabla = \"proveedores\";\n\n\t\t\t\t\t$datos = array(\"nombre_proveedor\" => $_POST[\"nuevoNombreProveedor\"],\n \"nombre_representante\" => $_POST[\"nuevoNombreRepresentante\"],\n \"correo\" => $_POST[\"nuevaCorreoProveedor\"],\n \"dni\" => $_POST[\"nuevoDniProveedor\"],\n \"ruc\" => $_POST[\"nuevoRucProveedor\"],\n \"celular\" => $_POST[\"nuevaNumeroProveedor\"],\n \"telefono\" => $_POST[\"nuevoTelefono\"]);\n\n\t\t\t\t\t//var_dump($datos);\n\t\t\t\t\t$respuesta = ModeloProveedores::mdlIngresarProveedores($tabla, $datos);\n\t\t\t\t\n\t\t\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\t\t\techo '<script>\n\n\t\t\t\t\t\tswal({\n\n\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\ttitle: \"¡El proveedor ha sido guardado correctamente!\",\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\twindow.location = \"proveedores\";\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t});\n\t\t\t\t\t\n\n\t\t\t\t\t\t</script>';\n\n\n\t\t\t\t\t}\t\n\n\n\t\t\t\t}else{\n\n\t\t\t\techo '<script>\n\n\t\t\t\t\tswal({\n\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"¡El proveedor no puede ir vacío o llevar caracteres especiales!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"proveedores\";\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\t\t\t\t\n\n\t\t\t\t</script>';\n\n\t\t\t}\n\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "56bb0a798e21fa5d709bb1eb4570f84d", "score": "0.59602106", "text": "static public function ctrCrearParametro(){\r\n\r\n\t\tif(isset($_POST[\"nuevoParametro\"])){\r\n\r\n date_default_timezone_set('America/Tegucigalpa');\r\n\r\n $fecha = date('Y-m-d');\r\n $hora = date('H:i:s');\r\n\r\n $fechaActual = $fecha.' '.$hora;\r\n\r\n $usuario = $_SESSION[\"id\"];\r\n\t\t\t\t$tabla = \"tbl_parametros\";\r\n\r\n\r\n\t\t\t\t$datos = array(\"Parametro\" => strtoupper($_POST[\"nuevoParametro\"]),\r\n\t\t\t\t\t\t\t\t\t\t \"Valor\" => $_POST[\"nuevoVal\"],\r\n \"FechaCreacion\"=> $fechaActual,\r\n \"Id_usuario\" => $usuario);\r\n\r\n\r\n\t\t\t\t$respuesta = ModeloConfiguracion::mdlIngresarParametro($tabla, $datos);\r\n\r\n\t\t\t\tif($respuesta == \"ok\"){\r\n\r\n\t\t\t\t\techo '<script>\r\n\r\n\t\t\t\t\tswal({\r\n\r\n\t\t\t\t\t\ttype: \"success\",\r\n\t\t\t\t\t\ttitle: \"¡El Parametro ha sido guardado correctamente!\",\r\n\t\t\t\t\t\tshowConfirmButton: true,\r\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\r\n\t\t\t\t\t\tcloseOnConfirm: false\r\n\r\n\t\t\t\t\t}).then((result)=>{\r\n\r\n\t\t\t\t\t\tif(result.value){\r\n\r\n\t\t\t\t\t\t\twindow.location = \"configuracion\";\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\r\n\r\n\t\t\t\t\t</script>';\r\n\r\n\r\n\t\t\t\t}else {\r\n echo \"<script type='text/javascript'>alert('error')</script>\";\r\n }\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "title": "" } ]
a69268147130b397c3f6a73cd38e376b
Determine how a test could be critical (success or fail). Use $this>lastTest array
[ { "docid": "0359fdb9f0b2631634f1ac24535dd502", "score": "0.725781", "text": "public function isLastTestCritical()\n {\n return false;\n }", "title": "" } ]
[ { "docid": "98fb11a9d1270d33af42ab4700ee5196", "score": "0.6593066", "text": "public function test_critical()\n\t{\n $this->markTestIncomplete('to do');\n\t}", "title": "" }, { "docid": "30b0fd77299a8deae5ac15ad55952a20", "score": "0.5752448", "text": "public function providerTestCritical() {\n return [\n ['good', [RfcLogLevel::CRITICAL], 'bazinga!'],\n ['bad', [-1], NULL],\n ];\n }", "title": "" }, { "docid": "0565a34328330b05a57216da4c2b6974", "score": "0.5644057", "text": "public function getFailAfter();", "title": "" }, { "docid": "ad52013a9184e700e78257bffb6d040f", "score": "0.55807155", "text": "function countTestCases() {\r\n return 1;\r\n }", "title": "" }, { "docid": "066e8df41c49e1acca63c9e106248839", "score": "0.5569181", "text": "abstract public function failures();", "title": "" }, { "docid": "8e7fe3951c0de6646e499e8d05a06e46", "score": "0.5555835", "text": "public function __construct() {\n parent::__construct();\n\n // the numbers are NOT constant - in the course of checks, we may find a \"smoking gun\" and elevate the probability\n // in the end, use the numbers of those elements which were not deterministically excluded and normalise to 1\n // to get a percentage to report on.\n\n // we could be in a live session with existing data, so get things from \n // $_SESSION if appropriate\n \n $this->possibleFailureReasons = $_SESSION[\"SUSPECTS\"] ?? [\n Telepath::INFRA_ETLR => 0.01,\n Telepath::INFRA_LINK_ETLR_NRO_IDP => 0.01,\n Telepath::INFRA_LINK_ETLR_NRO_SP => 0.01,\n Telepath::INFRA_NRO_SP => 0.02,\n Telepath::INFRA_NRO_IDP => 0.02,\n Telepath::INFRA_SP_RADIUS => 0.04,\n Telepath::INFRA_IDP_RADIUS => 0.04,\n Telepath::INFRA_IDP_AUTHBACKEND => 0.02,\n Telepath::INFRA_SP_80211 => 0.05,\n Telepath::INFRA_SP_LAN => 0.05,\n Telepath::INFRA_DEVICE => 0.3,\n Telepath::INFRA_NONEXISTENTREALM => 0.7,\n ];\n \n $this->additionalFindings = $_SESSION[\"EVIDENCE\"] ?? [];\n \n $oldlocale = $this->languageInstance->setTextDomain('diagnostics');\n $this->returnCodes = [];\n /**\n * Test was executed and the result was as expected.\n */\n $code1 = RADIUSTests::RETVAL_OK;\n $this->returnCodes[$code1][\"message\"] = _(\"Completed\");\n $this->returnCodes[$code1][\"severity\"] = \\core\\common\\Entity::L_OK;\n\n /**\n * Test could not be run because CAT software isn't configured for it\n */\n $code2 = RADIUSTests::RETVAL_NOTCONFIGURED;\n $this->returnCodes[$code2][\"message\"] = _(\"Product is not configured to run this check.\");\n $this->returnCodes[$code2][\"severity\"] = \\core\\common\\Entity::L_OK;\n /**\n * Test skipped because there was nothing to be done\n */\n $code3 = RADIUSTests::RETVAL_SKIPPED;\n $this->returnCodes[$code3][\"message\"] = _(\"This check was skipped.\");\n $this->returnCodes[$code3][\"severity\"] = \\core\\common\\Entity::L_OK;\n\n /**\n * test executed, and there were errors\n */\n $code4 = RADIUSTests::RETVAL_INVALID;\n $this->returnCodes[$code4][\"message\"] = _(\"There were errors during the test.\");\n $this->returnCodes[$code4][\"severity\"] = \\core\\common\\Entity::L_OK;\n\n// return codes specific to authentication checks\n /**\n * no reply at all from remote RADIUS server\n */\n $code7 = RADIUSTests::RETVAL_NO_RESPONSE;\n $this->returnCodes[$code7][\"message\"] = _(\"There was no reply at all from the RADIUS server.\");\n $this->returnCodes[$code7][\"severity\"] = \\core\\common\\Entity::L_ERROR;\n\n /**\n * auth flow stopped somewhere in the middle of a conversation\n */\n $code8 = RADIUSTests::RETVAL_SERVER_UNFINISHED_COMM;\n $this->returnCodes[$code8][\"message\"] = _(\"There was a bidirectional communication with the RADIUS server, but it ended halfway through.\");\n $this->returnCodes[$code8][\"severity\"] = \\core\\common\\Entity::L_ERROR;\n\n /**\n * a RADIUS server did not want to talk EAP with us, but at least replied with a Reject\n */\n $code9 = RADIUSTests::RETVAL_IMMEDIATE_REJECT;\n $this->returnCodes[$code9][\"message\"] = _(\"The RADIUS server immediately rejected the authentication request in its first reply.\");\n $this->returnCodes[$code9][\"severity\"] = \\core\\common\\Entity::L_WARN;\n\n /**\n * a RADIUS server talked EAP with us, but didn't like us in the end\n */\n $code10 = RADIUSTests::RETVAL_CONVERSATION_REJECT;\n $this->returnCodes[$code10][\"message\"] = _(\"The RADIUS server rejected the authentication request after an EAP conversation.\");\n $this->returnCodes[$code10][\"severity\"] = \\core\\common\\Entity::L_WARN;\n\n /**\n * a RADIUS server refuses connection\n */\n $code11 = RADIUSTests::RETVAL_CONNECTION_REFUSED;\n $this->returnCodes[$code11][\"message\"] = _(\"Connection refused\");\n $this->returnCodes[$code11][\"severity\"] = \\core\\common\\Entity::L_ERROR;\n\n /**\n * not enough data provided to perform an authentication\n */\n $code12 = RADIUSTests::RETVAL_INCOMPLETE_DATA;\n $this->returnCodes[$code12][\"message\"] = _(\"Not enough data provided to perform an authentication\");\n $this->returnCodes[$code12][\"severity\"] = \\core\\common\\Entity::L_ERROR;\n\n /**\n * PKCS12 password does not match the certificate file\n */\n $code13 = RADIUSTests::RETVAL_WRONG_PKCS12_PASSWORD;\n $this->returnCodes[$code13][\"message\"] = _(\"The certificate password you provided does not match the certificate file.\");\n $this->returnCodes[$code13][\"severity\"] = \\core\\common\\Entity::L_ERROR;\n\n// certificate property errors\n /**\n * The root CA certificate was sent by the EAP server.\n */\n $code14 = RADIUSTests::CERTPROB_ROOT_INCLUDED;\n $this->returnCodes[$code14][\"message\"] = _(\"The certificate chain includes the root CA certificate. This does not serve any useful purpose but inflates the packet exchange, possibly leading to more round-trips and thus slower authentication.\");\n $this->returnCodes[$code14][\"severity\"] = \\core\\common\\Entity::L_REMARK;\n\n /**\n * There was more than one server certificate in the EAP server's chain.\n */\n $code15 = RADIUSTests::CERTPROB_TOO_MANY_SERVER_CERTS;\n $this->returnCodes[$code15][\"message\"] = _(\"There is more than one server certificate in the chain.\");\n $this->returnCodes[$code15][\"severity\"] = \\core\\common\\Entity::L_REMARK;\n\n /**\n * There was no server certificate in the EAP server's chain.\n */\n $code16 = RADIUSTests::CERTPROB_NO_SERVER_CERT;\n $this->returnCodes[$code16][\"message\"] = _(\"There is no server certificate in the chain.\");\n $this->returnCodes[$code16][\"severity\"] = \\core\\common\\Entity::L_WARN;\n\n /**\n * A certificate was signed with an MD5 signature.\n */\n $code17 = RADIUSTests::CERTPROB_MD5_SIGNATURE;\n $this->returnCodes[$code17][\"message\"] = _(\"At least one certificate in the chain is signed with the MD5 signature algorithm. Many Operating Systems, including Apple iOS, will fail to validate this certificate.\");\n $this->returnCodes[$code17][\"severity\"] = \\core\\common\\Entity::L_WARN;\n\n /**\n * A certificate was signed with an SHA1 signature.\n */\n $code17a = RADIUSTests::CERTPROB_SHA1_SIGNATURE;\n $this->returnCodes[$code17a][\"message\"] = _(\"At least one certificate in the chain is signed with the SHA-1 signature algorithm. Many Operating Systems, including Apple iOS, will fail to validate this certificate.\");\n $this->returnCodes[$code17a][\"severity\"] = \\core\\common\\Entity::L_WARN;\n\n /**\n * Low public key length (<1024)\n */\n $code18 = RADIUSTests::CERTPROB_LOW_KEY_LENGTH;\n $this->returnCodes[$code18][\"message\"] = _(\"At least one certificate in the chain had a public key of less than 1024 bits. Many recent operating systems consider this unacceptable and will fail to validate the server certificate.\");\n $this->returnCodes[$code18][\"severity\"] = \\core\\common\\Entity::L_WARN;\n\n /**\n * The server certificate did not contain the TLS Web Server OID, creating compat problems with many Windows versions.\n */\n $code19 = RADIUSTests::CERTPROB_NO_TLS_WEBSERVER_OID;\n $this->returnCodes[$code19][\"message\"] = _(\"The server certificate does not have the extension 'extendedKeyUsage: TLS Web Server Authentication'. Most Microsoft Operating Systems will fail to validate this certificate.\");\n $this->returnCodes[$code19][\"severity\"] = \\core\\common\\Entity::L_WARN;\n\n /**\n * The server certificate did not include a CRL Distribution Point, creating compat problems with Windows Phone 8.\n */\n $code20 = RADIUSTests::CERTPROB_NO_CDP;\n $this->returnCodes[$code20][\"message\"] = _(\"The server certificate did not include a CRL Distribution Point, creating compatibility problems with Windows Phone 8.\");\n $this->returnCodes[$code20][\"severity\"] = \\core\\common\\Entity::L_REMARK;\n\n /**\n * The server certificate did a CRL Distribution Point, but not to a HTTP/HTTPS URL. Possible compat problems.\n */\n $code21 = RADIUSTests::CERTPROB_NO_CDP_HTTP;\n $this->returnCodes[$code21][\"message\"] = _(\"The server certificate's 'CRL Distribution Point' extension does not point to an HTTP/HTTPS URL. Some Operating Systems may fail to validate this certificate. Checking server certificate validity against a CRL will not be possible.\");\n $this->returnCodes[$code21][\"severity\"] = \\core\\common\\Entity::L_WARN;\n\n /**\n * The server certificate's CRL Distribution Point URL couldn't be accessed and/or did not contain a CRL.\n */\n $code22 = RADIUSTests::CERTPROB_NO_CRL_AT_CDP_URL;\n $this->returnCodes[$code22][\"message\"] = _(\"The extension 'CRL Distribution Point' in the server certificate points to a non-existing location. Some Operating Systems check certificate validity by consulting the CRL and will fail to validate the certificate. Checking server certificate validity against a CRL will not be possible.\");\n $this->returnCodes[$code22][\"severity\"] = \\core\\common\\Entity::L_ERROR;\n\n /**\n * The server certificate has been revoked by its CA.\n */\n $code23 = RADIUSTests::CERTPROB_SERVER_CERT_REVOKED;\n $this->returnCodes[$code23][\"message\"] = _(\"The server certificate was revoked by the CA!\");\n $this->returnCodes[$code23][\"severity\"] = \\core\\common\\Entity::L_ERROR;\n\n /**\n * The server certificate's names contained at least which was not a hostname.\n */\n $code24 = RADIUSTests::CERTPROB_NOT_A_HOSTNAME;\n $this->returnCodes[$code24][\"message\"] = _(\"The certificate contained a CN or subjectAltName:DNS which does not parse as a hostname. This can be problematic on some supplicants. If the certificate also contains names which are a proper hostname, and you only use those for your supplicant configuration, then you can safely ignore this notice.\");\n $this->returnCodes[$code24][\"severity\"] = \\core\\common\\Entity::L_REMARK;\n\n /**\n * The server certificate's names contained at least one wildcard name.\n */\n $code25 = RADIUSTests::CERTPROB_WILDCARD_IN_NAME;\n $this->returnCodes[$code25][\"message\"] = _(\"The certificate contained a CN or subjectAltName:DNS which contains a wildcard ('*'). This can be problematic on some supplicants. If the certificate also contains names which are wildcardless, and you only use those for your supplicant configuration, then you can safely ignore this notice.\");\n $this->returnCodes[$code25][\"severity\"] = \\core\\common\\Entity::L_REMARK;\n\n /**\n * cert is not yet, or not any more, valid\n */\n $code26 = RADIUSTests::CERTPROB_OUTSIDE_VALIDITY_PERIOD;\n $this->returnCodes[$code26][\"message\"] = _(\"At least one certificate is outside its validity period (not yet valid, or already expired)!\");\n $this->returnCodes[$code26][\"severity\"] = \\core\\common\\Entity::L_ERROR;\n\n /**\n * cert is not yet, or not any more, valid but is not taking part in server validation\n */\n $code27 = RADIUSTests::CERTPROB_OUTSIDE_VALIDITY_PERIOD_WARN;\n $this->returnCodes[$code27][\"message\"] = sprintf(_(\"At least one intermediate certificate in your CAT profile is outside its validity period (not yet valid, or already expired), but this certificate was not used for server validation. Consider removing it from your %s configuration.\"), CONFIG['APPEARANCE']['productname']);\n $this->returnCodes[$code27][\"severity\"] = \\core\\common\\Entity::L_REMARK;\n\n /**\n * The received certificate chain did not end in any of the trust roots configured in the profile properties.\n */\n $code28 = RADIUSTests::CERTPROB_TRUST_ROOT_NOT_REACHED;\n $this->returnCodes[$code28][\"message\"] = _(\"The server certificate could not be verified to the root CA you configured in your profile!\");\n $this->returnCodes[$code28][\"severity\"] = \\core\\common\\Entity::L_ERROR;\n\n $code29 = RADIUSTests::CERTPROB_TRUST_ROOT_REACHED_ONLY_WITH_OOB_INTERMEDIATES;\n $this->returnCodes[$code29][\"message\"] = _(\"The certificate chain as received in EAP was not sufficient to verify the certificate to the root CA in your profile. It was verified using the intermediate CAs in your profile though. You should consider sending the required intermediate CAs inside the EAP conversation.\");\n $this->returnCodes[$code29][\"severity\"] = \\core\\common\\Entity::L_REMARK;\n /**\n * The received server certificate's name did not match the configured name in the profile properties.\n */\n $code30 = RADIUSTests::CERTPROB_SERVER_NAME_MISMATCH;\n $this->returnCodes[$code30][\"message\"] = _(\"The EAP server name does not match any of the configured names in your profile!\");\n $this->returnCodes[$code30][\"severity\"] = \\core\\common\\Entity::L_ERROR;\n\n /**\n * The received server certificate's name only matched either CN or subjectAltName, but not both\n */\n $code31 = RADIUSTests::CERTPROB_SERVER_NAME_PARTIAL_MATCH;\n $this->returnCodes[$code31][\"message\"] = _(\"The configured EAP server name matches either the CN or a subjectAltName:DNS of the incoming certificate; best current practice is that the certificate should contain the name in BOTH places.\");\n $this->returnCodes[$code31][\"severity\"] = \\core\\common\\Entity::L_REMARK;\n\n /**\n * The certificate does not set any BasicConstraints; particularly no CA = TRUE|FALSE\n */\n $code32 = RADIUSTests::CERTPROB_NO_BASICCONSTRAINTS;\n $this->returnCodes[$code32][\"message\"] = _(\"At least one certificate did not contain any BasicConstraints extension; which makes it unclear if it's a CA certificate or end-entity certificate. At least Mac OS X 10.8 (Mountain Lion) will not validate this certificate for EAP purposes!\");\n $this->returnCodes[$code32][\"severity\"] = \\core\\common\\Entity::L_WARN;\n\n /**\n * The server presented a certificate which is from an unknown authority\n */\n $code33 = RADIUSTests::CERTPROB_UNKNOWN_CA;\n $this->returnCodes[$code33][\"message\"] = _(\"The server presented a certificate from an unknown authority.\");\n $this->returnCodes[$code33][\"severity\"] = \\core\\common\\Entity::L_ERROR;\n\n /**\n * The server accepted this client certificate, but should not have\n */\n $code34 = RADIUSTests::CERTPROB_WRONGLY_ACCEPTED;\n $this->returnCodes[$code34][\"message\"] = _(\"The server accepted the INVALID client certificate.\");\n $this->returnCodes[$code34][\"severity\"] = \\core\\common\\Entity::L_ERROR;\n\n /**\n * The server does not accept this client certificate, but should have\n */\n $code35 = RADIUSTests::CERTPROB_WRONGLY_NOT_ACCEPTED;\n $this->returnCodes[$code35][\"message\"] = _(\"The server rejected the client certificate, even though it was valid.\");\n $this->returnCodes[$code35][\"severity\"] = \\core\\common\\Entity::L_ERROR;\n\n /**\n * The server does not accept this client certificate\n */\n $code36 = RADIUSTests::CERTPROB_NOT_ACCEPTED;\n $this->returnCodes[$code36][\"message\"] = _(\"The server rejected the client certificate as expected.\");\n $this->returnCodes[$code36][\"severity\"] = \\core\\common\\Entity::L_OK;\n\n /**\n * the CRL of a certificate could not be found\n */\n $code37 = RADIUSTests::CERTPROB_UNABLE_TO_GET_CRL;\n $this->returnCodes[$code37][\"message\"] = _(\"The CRL of a certificate could not be found.\");\n $this->returnCodes[$code37][\"severity\"] = \\core\\common\\Entity::L_ERROR;\n\n /**\n * the CRL of a certificate could not be found\n */\n $code38 = RADIUSTests::CERTPROB_NO_COMMON_EAP_METHOD;\n $this->returnCodes[$code38][\"message\"] = _(\"EAP method negotiation failed!\");\n $this->returnCodes[$code38][\"severity\"] = \\core\\common\\Entity::L_ERROR;\n\n /**\n * DH group too small\n */\n $code39 = RADIUSTests::CERTPROB_DH_GROUP_TOO_SMALL;\n $this->returnCodes[$code39][\"message\"] = _(\"The server offers Diffie-Hellman (DH) ciphers with a DH group smaller than 1024 bit. Mac OS X 10.11 'El Capitan' is known to refuse TLS connections under these circumstances!\");\n $this->returnCodes[$code39][\"severity\"] = \\core\\common\\Entity::L_WARN;\n\n /**\n * The server certificate's names contained at least which was not a hostname.\n */\n $code40 = RADIUSTests::CERTPROB_MULTIPLE_CN;\n $this->returnCodes[$code40][\"message\"] = _(\"The certificate contains more than one CommonName (CN) field. This is reportedly problematic on many supplicants.\");\n $this->returnCodes[$code40][\"severity\"] = \\core\\common\\Entity::L_WARN;\n\n $this->languageInstance->setTextDomain($oldlocale);\n }", "title": "" }, { "docid": "c22d284338559bb98d56d21d0a0f40c8", "score": "0.5533973", "text": "public function testRun()\n {\n $this->checkSuite->run();\n\n $this->assertEquals(\n 58,\n $this->checkSuite->getScore(),\n 'Checks failed. Details: ' . json_encode($this->checkSuite->getCheckDetails())\n );\n $this->assertEquals(0, $this->checkSuite->getCheckDetails()['ci_passing']['points']);\n }", "title": "" }, { "docid": "eb0b00faaf559d5d62725d0873ca2a26", "score": "0.5522622", "text": "public function failed() {\n return $this->test->failure;\n }", "title": "" }, { "docid": "23c8ccc12caab17002887de180db4bb5", "score": "0.54926884", "text": "abstract public function isFailure(): bool;", "title": "" }, { "docid": "e94244f34ac1f40a62a65b36c3dbdb59", "score": "0.5424857", "text": "public function getContinuedFailure()\n {\n return $this->continued_failure;\n }", "title": "" }, { "docid": "a70112dcbb449e8b32fb023a5434dead", "score": "0.5422535", "text": "protected function onSuccessfulTest()\n {\n }", "title": "" }, { "docid": "901b8654b05493672337550b0c4cfe0a", "score": "0.54224586", "text": "public function testCpuCheckScoreHigh()\n {\n $game = new Game(20, 0, 20, 25);\n\n $res = $game->cpuCheckScore();\n $exp = true;\n $this->assertEquals($exp, $res);\n }", "title": "" }, { "docid": "66c37ca0f39096d744a865355ed7d36f", "score": "0.5417797", "text": "public function testGetLastResult()\n {\n $hand = new DiceHand(3);\n $res = $hand->getLastResult();\n\n $this->assertEquals($res, 0);\n }", "title": "" }, { "docid": "698ccd652bcb2a1a04a157335c3919f0", "score": "0.54014665", "text": "protected function pass() {\n\t\t$this->assertTrue(true);\n\t}", "title": "" }, { "docid": "168df776ad81fdbc41dcb67adf2c8631", "score": "0.5391517", "text": "public function isCritical(): bool\n {\n return $this->control->getCriticality();\n }", "title": "" }, { "docid": "fd62ed88423e4eb9e74345276dcc2dd4", "score": "0.5391343", "text": "public function testMoreOrLessObvious(): void\n {\n self::assertTrue(!false);\n }", "title": "" }, { "docid": "d886c9a0134003e77194e453ee88d935", "score": "0.537483", "text": "public function testCLessPoints()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "49d3d38df6460407fe7fab14a5e7ace0", "score": "0.5369785", "text": "public function testTaskStatusTimeCalculationForFailedQa()\n {\n // Assigned 30 minutes ago\n $now = time();\n $assignedAgo = $now - (30 * 60);\n $this->task->setAttributes(\n [\n 'due_date' => ($now + (30 * 60)),\n 'owner' => $this->user->getId(),\n 'timeAssigned' => $assignedAgo,\n 'timeFinished' => null,\n 'qa_in_progress' => true,\n 'work' => [\n $this->user->getId() => [\n 'worked' => 0,\n 'paused' => 0,\n 'qa' => 0,\n 'qa_in_progress' => 0,\n 'qa_total_time' => 0,\n 'numberFailedQa' => 0,\n 'blocked' => 0,\n 'workTrackTimestamp' => $assignedAgo,\n 'timeAssigned' => $assignedAgo,\n ],\n ],\n ]\n )\n ->save();\n\n $owner = $this->task->getAttribute('owner');\n $timeBeforeListener = $this->task->getAttribute('work')[$owner]['qa'];\n $progressBeforeListener = $this->task->getAttribute('work')[$owner]['qa_in_progress'];\n $timeStampBeforeListener = $this->task->getAttribute('work')[$owner]['workTrackTimestamp'];\n\n\n $this->task->setAttribute('qa_in_progress', false);\n $this->listener->handle($this->task);\n\n $work = $this->task->getAttribute('work');\n $owner = $this->task->getAttribute('owner');\n\n $this::assertEquals(0, $timeBeforeListener);\n $this::assertEquals(0, $work[$owner]['qa_in_progress']);\n $this::assertEquals($progressBeforeListener, $work[$owner]['qa_in_progress']);\n $this::assertGreaterThan($timeStampBeforeListener, $work[$owner]['workTrackTimestamp']);\n $this::assertEquals(\n $work[$owner]['workTrackTimestamp'] - $timeStampBeforeListener,\n $work[$owner]['qa_total_time']\n );\n }", "title": "" }, { "docid": "8bcb94d4261d9ecfb91a70b5201ccba9", "score": "0.5350267", "text": "function _execTest() {\n\n\t\t$curlinfo = curl_version();\n\n\t\tif ( version_compare($this->current_value, '5.1.6', '>=') ||\n\t\t\t(version_compare($this->current_value, '4.4.4', '>=')) && ( version_compare($this->current_value, '5', '<') )\n\t\t\t) {\n\t\t\treturn PHPSECINFO_TEST_RESULT_OK;\n\t\t} else {\n\t\t\treturn PHPSECINFO_TEST_RESULT_WARN;\n\t\t}\n\n\t}", "title": "" }, { "docid": "052fd1c85e0e9258123d530307261f2a", "score": "0.5340483", "text": "function runTests()\n {\n // initialize a bunch of arrays\n $this->test_results = array();\n $this->result_counts = array();\n $this->result_counts[PHPSECINFO_TEST_RESULT_NOTRUN] = 0;\n $this->num_tests_run = 0;\n\n foreach ($this->tests_to_run as $testClass) {\n\n /**\n * @var $test PhpSecInfo_Test\n */\n $test = new $testClass();\n\n if ($test->isTestable()) {\n $test->test();\n $rs = array('result' => $test->getResult(),\n 'message' => $test->getMessage(),\n 'value_current' => $test->getCurrentTestValue(),\n 'value_recommended' => $test->getRecommendedTestValue(),\n 'moreinfo_url' => $test->getMoreInfoURL(),\n );\n $this->test_results[$test->getTestGroup()][$test->getTestName()] = $rs;\n\n // initialize if not yet set\n if (!isset ($this->result_counts[$rs['result']])) {\n $this->result_counts[$rs['result']] = 0;\n }\n\n $this->result_counts[$rs['result']]++;\n $this->num_tests_run++;\n } else {\n $rs = array('result' => $test->getResult(),\n 'message' => $test->getMessage(),\n 'value_current' => NULL,\n 'value_recommended' => NULL,\n 'moreinfo_url' => $test->getMoreInfoURL(),\n );\n $this->result_counts[PHPSECINFO_TEST_RESULT_NOTRUN]++;\n $this->tests_not_run[$test->getTestGroup() . \"::\" . $test->getTestName()] = $rs;\n }\n }\n }", "title": "" }, { "docid": "afdc318cff3b5c9991476a23cd1e27c0", "score": "0.53224593", "text": "public function testCpuCheckScoreLow()\n {\n $game = new Game(20, 0, 20, 18);\n\n $res = $game->cpuCheckScore();\n $exp = false;\n $this->assertEquals($exp, $res);\n }", "title": "" }, { "docid": "ac93aa89250b4e3db209d003c15ff391", "score": "0.5284402", "text": "function addFailure (Test $test, AssertionFailedError $e, $time): void {\n }", "title": "" }, { "docid": "ac9080c14d8fae094f64211e6d11bb5d", "score": "0.5277197", "text": "public function reportResult() {\n\t\tif($this->mTotalBytesRead !== $this->totalBytesExpected) {\n\t\t\t$this->mFailures[] = \"FAILED -- expected to receive {$this->totalBytesExpected} bytes; received {$this->mTotalBytesRead}\";\n\t\t}\n\t\t\n\t\tif(count($this->mFailures) > 0) {\n\t\t\tforeach($this->mFailures as $m) {\n\t\t\t\terror_log(\"\\t\\t{$m}\");\n\t\t\t}\n\t\t} else {\n\t\t\terror_log(\"\\t\\t{$this->mTestName}: passed\");\n\t\t}\n\n\t\terror_log(\"End test: {$this->mTestName}\");\n\t}", "title": "" }, { "docid": "f361eb96c6bcd5558571eb83cf6b8427", "score": "0.52682364", "text": "public function runCheckPlanRisk() {\n $arriveOnTime = 0;\n $numTrials=20;\n for ($i = 1; $i <= $numTrials; $i++) {\n $result = $this->checkPlanRisk();\n $this->tiresDelay=0;\n if ($result[3]) {\n $arriveOnTime++;\n }\n\n // echo \"Intento: \" . $i ;\n // echo \" Duración de Proyecto: \" . $result[1];\n // echo \" Tiempo que se esperaba: \" . $result[2];\n \n\n if ($result[3]) {\n // echo \" -- Proyecto terminado en tiempo\";\n }\n else {\n // echo \" -- Proyecto terminado tarde\";\n }\n\n $confidence = $arriveOnTime / $i;\n // echo \"\\nConfidence level: $confidence\\n\\n\";\n }\n }", "title": "" }, { "docid": "743d455940cf19bb068519aba6f70b4e", "score": "0.5264059", "text": "public function testUntested() {\n\t\t$this->markTestIncomplete('TODO: Add sample files to cover everything listed in the output from this test. Comment this line out to work on adding the missing tests. Remove this line when this test passes.');\n\n\t\t$allSniffsInStandard = $this->helper->sniffList();\n\n\t\t$this->assertNotEmpty(\n\t\t\t$allSniffsInStandard,\n\t\t\t'List of sniffs active in this coding standard must not be empty.'\n\t\t);\n\n\t\t$coveredSniffs = $this->gatherCoveredSniffs();\n\t\t$sniffsNotCovered = array_diff($allSniffsInStandard, $coveredSniffs);\n\t\t$sep = PHP_EOL . ' - ';\n\n\t\t$this->assertEmpty(\n\t\t\t$sniffsNotCovered,\n\t\t\t'All sniffs from the coding standard (' . count($allSniffsInStandard) . ') are expected to be covered by annotated sample files representing sniff failure cases. The following sniffs are not represented by sample files expected to fail (' . count($sniffsNotCovered) . '):' . $sep . implode($sep, $sniffsNotCovered)\n\t\t);\n\t}", "title": "" }, { "docid": "fc85c242a90e7e9da8cbae79f1471056", "score": "0.52393484", "text": "public function testCpuCheckScorePlayerHigh()\n {\n $game = new Game(90, 0, 20, 25);\n \n $res = $game->cpuCheckScore();\n $exp = false;\n $this->assertEquals($exp, $res);\n }", "title": "" }, { "docid": "9df9997a44f7390da5788bbf7b00ae8a", "score": "0.52346295", "text": "public function isFailure(){\n return !$this->_success;\n }", "title": "" }, { "docid": "c25cc6661e8a43488de1dbf4aac5f68b", "score": "0.5232311", "text": "public function saveSuccessWithNoGoldenCardShouldNotIncreaseEarnedPoints(): void\n {\n $savedQuestion = QuestionUserHelper::createScheduledQuestionForUser($this->user);\n $unexpectedUserScore = $this->user->score + ($savedQuestion->full_score * $savedQuestion->full_score);\n $expectedUserScore = $this->user->score + ($savedQuestion->full_score);\n $savedQuestion->saveSuccess($this->user, 'soft', self::IS_NOT_GOLDEN_CARD);\n\n $this->assertEquals($expectedUserScore, $this->user->score);\n $this->assertNotEquals($unexpectedUserScore, $this->user->score);\n }", "title": "" }, { "docid": "77d6a28ccf8473d5ffbf5426024af4db", "score": "0.5219634", "text": "public function testFindTotalScoreWrongAssumption()\n {\n $result = $this->rockPaperScissor->findTotalScoreWrongAssumption($this->sampleStrategy);\n $this->assertEquals(15, $result);\n\n // Day 2 Part 1 puzzle inputs\n $result = $this->rockPaperScissor->findTotalScoreWrongAssumption($this->strategy);\n $this->assertEquals(11063, $result);\n }", "title": "" }, { "docid": "48040e4a6f9711e45529684679c7d7c4", "score": "0.5204833", "text": "function tve_leads_test_check_winner( $test_id ) {\n\tif ( empty( $test_id ) ) {\n\t\treturn;\n\t}\n\n\t$test_model = tve_leads_get_test( $test_id, array( 'load_test_items' => true ) );\n\tif ( empty( $test_model ) || empty( $test_model->auto_win_enabled ) || $test_model->status != TVE_LEADS_TEST_STATUS_RUNNING ) {\n\t\treturn;\n\t}\n\tif ( ! empty( $test_model->auto_win_min_duration ) ) {\n\t\t/* check if this amount of time has passed -> if not, no need for further processing */\n\t\tif ( time() < strtotime( $test_model->date_started . ' +' . $test_model->auto_win_min_duration . 'days' ) ) {\n\t\t\treturn;\n\t\t} /* The time interval has passed, we can check the other conditions */\n\t}\n\n\t/*MINIMUM CONVERSION CHECK*/\n\tglobal $tvedb;\n\t$total_test_data = $tvedb->get_total_test_data( $test_id );\n\tif ( intval( $total_test_data->total_conversions ) < intval( $test_model->auto_win_min_conversions ) ) {\n\t\treturn;\n\t}\n\n\t/* check the number of conversions of each item, and the chance to beat original */\n\t$test_item_win_array = array();\n\tforeach ( $test_model->items as $test_item ) {\n//\t\tif ( $minimum_conversions > $test_item->conversions ) {\n//\t\t\tcontinue;\n//\t\t}\n\n\t\tif ( $test_item->is_control ) {\n\t\t\t$variations_beat_original = 100.0 - (float) $test_model->auto_win_chance_original;\n\t\t\t$control_win = true;\n\n\t\t\tforeach ( $test_model->items as $var ) {\n\t\t\t\tif ( $var->is_control ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( $variations_beat_original < floatval( $var->beat_original ) || empty( $var->beat_original ) ) {\n\t\t\t\t\t$control_win = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $control_win ) {\n\t\t\t\t$test_item->is_winner = 1;\n\t\t\t\ttve_leads_save_test_item( (array) $test_item );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\tif ( (float) $test_item->beat_original > (float) $test_model->auto_win_chance_original ) {\n\t\t\t\t$test_item_win_array[] = $test_item;\n//\t\t\t\t$test_item->is_winner = 1;\n//\t\t\t\ttve_leads_save_test_item( (array) $test_item );\n//\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}\n\tif ( ! empty( $test_item_win_array ) ) {\n\t\t$winner_test_item = $test_item_win_array[0];\n\t\tforeach ( $test_item_win_array as $var_win_arr ) {\n\t\t\tif ( $winner_test_item->auto_win_chance_original <= $var_win_arr->auto_win_chance_original ) {\n\t\t\t\t$winner_test_item = $var_win_arr;\n\t\t\t}\n\t\t}\n\t\t/*Set the winner to the highest beat original*/\n\t\t$winner_test_item->is_winner = 1;\n\t\ttve_leads_save_test_item( (array) $winner_test_item );\n\t}\n}", "title": "" }, { "docid": "90a853a609cacf7e3132a1bd2b825068", "score": "0.5184953", "text": "public function isCritical(): bool\n {\n return $this->critical;\n }", "title": "" }, { "docid": "3bbb1d5a9895d4ec5c1feae8f7ca744c", "score": "0.5173686", "text": "abstract protected function _afterTests();", "title": "" }, { "docid": "d092c9253ff247e2dddabbb9f82e282c", "score": "0.5168023", "text": "protected function checkAllAssertionsPassedWholeTest() {\n $this->assertEmpty(\n $this->exceptionMessages,\n \"Failed asserting that no exceptions occured during the current test.\\r\\n\"\n . implode(\"\\r\\n\", $this->exceptionMessages)\n );\n }", "title": "" }, { "docid": "52c46c529159637e6746d835c1e5fab3", "score": "0.51521295", "text": "public function testGetSeverity()\n {\n $this->assertEquals(MessageInterface::SEVERITY_CRITICAL, $this->_messageModel->getSeverity());\n }", "title": "" }, { "docid": "496b49b57f8c923ad06722c6e1527196", "score": "0.5152123", "text": "public function testCriticalLogger()\n {\n $logger = $this->buildLogger(KatanaLogger::LOG_CRITICAL);\n\n $this->expectOutputRegex($this->getRegExp([\n 'CRITICAL',\n 'ALERT',\n 'EMERGENCY',\n ], 'Test log'));\n\n $logger->debug('Test log');\n $logger->info('Test log');\n $logger->notice('Test log');\n $logger->warning('Test log');\n $logger->error('Test log');\n $logger->critical('Test log');\n $logger->alert('Test log');\n $logger->emergency('Test log');\n }", "title": "" }, { "docid": "bd5dbf88617322b9c9a364e9cb0b580b", "score": "0.5144327", "text": "public function isFailure()\n {\n return !$this->success;\n }", "title": "" }, { "docid": "d6bcb1ef7dfbcc015e60def4ee2c8647", "score": "0.5123357", "text": "public function lastFailureTime();", "title": "" }, { "docid": "fe9ae82c432e7f537b7b153080769d9a", "score": "0.5117391", "text": "function completeTest() {\r\n \t\t$retMsg ='';\r\n \t\tif($this->paperCode == '' )\r\n \t\t\treturn;\r\n \t\tif(isset($_SESSION['eta_teacherId'])) {\r\n \t\t\t$query = \"UPDATE asset_etaResponses set status =1 WHERE teacher_id = '\".$_SESSION['eta_teacherId'].\"' \r\n \t\t\t\t AND round ='\".$this->current_round.\"' AND papercode ='\".$this->paperCode.\"'\t\";\r\n \t\t\t$dbquery = new dbquery($query,$this->connid);\r\n \t\t}\t\r\n \t\t\r\n \t}", "title": "" }, { "docid": "fc0af28a028a857c6502871c16c24e53", "score": "0.5115333", "text": "public function testFailed(TestFailure $failure) {\n // NOOP\n }", "title": "" }, { "docid": "6e00afffaa3f9f5b0263696b56553e1b", "score": "0.51093435", "text": "public function testGetScoresSuccess() {\n $scores = get_scores_per_child_and_date('PNCRCR02C13L219K', '2019-11-08', '2019-11-12', $this->ini_path);\n $this->assertEquals(2, count($scores));\n\n $this->assertTrue(in_array('6.75', $scores[0]));\n $this->assertTrue(in_array('8.00', $scores[1]));\n $this->assertFalse(in_array('7.25', $scores[0]));\n $this->assertFalse(in_array('7.25', $scores[1]));\n }", "title": "" }, { "docid": "1f0fad03294b70b9c40b551def9df623", "score": "0.5108259", "text": "public function preconditionsForTests()\n {\n //Data\n $userData = $this->loadData('generic_customer_account');\n $categoryData = $this->loadData('sub_category_required');\n $simple = $this->loadData('simple_product_for_price_rules_validation_front',\n array('categories' => $categoryData['parent_category'] . '/' . $categoryData['name'],\n 'prices_tax_class' => 'Taxable Goods'));\n //Steps\n $this->navigate('manage_customers');\n $this->customerHelper()->createCustomer($userData);\n //Verifying\n $this->assertMessagePresent('success', 'success_saved_customer');\n //Steps\n $this->navigate('manage_categories', false);\n $this->categoryHelper()->checkCategoriesPage();\n $this->categoryHelper()->createCategory($categoryData);\n //Verifying\n $this->assertMessagePresent('success', 'success_saved_category');\n //Steps\n $this->navigate('manage_products');\n $this->productHelper()->createProduct($simple);\n //Verifying\n $this->assertMessagePresent('success', 'success_saved_product');\n return array(\n 'customer' => array('email' => $userData['email'],\n 'password' => $userData['password']),\n 'categoryPath' => $categoryData['parent_category'] . '/' . $categoryData['name'],\n 'categoryName' => $categoryData['name'],\n 'simpleName' => $simple['general_name']\n );\n }", "title": "" }, { "docid": "27da507ed0d6b56bef4c924e2bdd9d9b", "score": "0.50997573", "text": "public function checkingpercentail()\n {\n //echo mypercentile($scores, 100);\n echo working_acquaintance(32, 27);\n }", "title": "" }, { "docid": "3c240f8129a69412fa2cb93c2c53625d", "score": "0.5097124", "text": "public function FailedChecks() { return $this->failed_checks; }", "title": "" }, { "docid": "5f2f5fb63aa96761346e67062fd88b0a", "score": "0.50921303", "text": "public function isFailure() {\n return $this->status == self::FAILURE;\n }", "title": "" }, { "docid": "9870de1e58a8a0f86f7e83561c5ac680", "score": "0.5087724", "text": "protected function isTest(){\n $v = Configure::read('Basic.isTest');\n return is_int($v) && $v > 0;\n }", "title": "" }, { "docid": "d829a1e43839cf7b4d9e20e9cdf332f7", "score": "0.50780565", "text": "public function failureCount();", "title": "" }, { "docid": "1efc11384e4e280f2a2c883be28b6d7d", "score": "0.50722003", "text": "function addRiskyTest (Test $test, Exception $e, $time): void {\n }", "title": "" }, { "docid": "1c39ba0935abcd851cb4a803d050f343", "score": "0.50630593", "text": "public function fails()\n {\n return ! $this->passes();\n }", "title": "" }, { "docid": "f64859cc64d4638f589eb0c22d582508", "score": "0.50529927", "text": "public function isBreakOnFirstFailure()\n {\n return $this->breakOnFirstFailure;\n }", "title": "" }, { "docid": "93e02c81af7f5aba2f3eeeaddf668b23", "score": "0.50523317", "text": "public function testCheckSuccess(): void\n {\n $object = new CodeCoverage('./tests/clover-test.xml', 85);\n\n $this->assertInstanceOf(CodeCoverage::class, $object->check());\n $this->assertStringContainsString('which is above the accepted', $object->output(false));\n }", "title": "" }, { "docid": "607ca2546c2d8140de10c52ed97b5ad5", "score": "0.5050741", "text": "public function passed() {\n return $this->finished() and\n !$this->error() and\n !$this->failed();\n }", "title": "" }, { "docid": "cf5f22f4142994aba663e93ce65e067d", "score": "0.5049321", "text": "public function testSetFailure() \n {\n $return = $this->plugin->setFailure('myfoo', 'bar', 'boobaz');\n\n $this->assertEquals('myfoo', $this->plugin->getFailModule());\n $this->assertEquals('bar', $this->plugin->getFailController());\n $this->assertEquals('boobaz', $this->plugin->getFailAction());\n $this->assertSame($this->plugin, $return);\n }", "title": "" }, { "docid": "7a80c120deb4e7ba7309990a86f95f92", "score": "0.50380397", "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": "ebd91d9342841dc5653457b591762ad3", "score": "0.5015461", "text": "public function testValidatePrepareAndExecuteCrystalTaskShouldSetErrorStateWhenExecutedAgain()\n {\n $this->truncate(['crystal_tasks']);\n\n $this->_fixtureHelper->setupCrystalTask([\n 'class' => SuccessTask::class,\n 'entity_uid' => 'some.id',\n 'date_start' => (new DateTime)->format('Y-m-d H:i:s'),\n 'date_end' => null,\n 'state' => CrystalTask::STATE_CRYSTAL_TASK_RUNNING,\n 'range' => 1,\n ]);\n\n\n $class = SuccessTask::class;\n $crystalTaskId = 1;\n $timeout = 10;\n $cooldown = 10;\n\n $successTask = new SuccessTask();\n $executor = $this->_executorFactory->create();\n $this->assertTrue($executor->validatePrepareAndExecuteCrystalTask($successTask, $class, $crystalTaskId, $timeout, $cooldown));\n $this->assertFalse($this->_testHandler->hasRecords(Logger::ERROR));\n\n $this->database->update('crystal_tasks', [\n 'date_start' => (new DateTime)->format('Y-m-d H:i:s'),\n 'date_end' => null,\n 'state' => CrystalTask::STATE_CRYSTAL_TASK_RUNNING,\n ], ['id' => 1]);\n\n $this->assertFalse($executor->validatePrepareAndExecuteCrystalTask($successTask, $class, $crystalTaskId, $timeout, $cooldown));\n $this->assertTrue($this->_testHandler->hasRecordThatContains(\n 'Trying to executeCrystalTask for the second time, weird',\n Logger::ERROR\n ));\n }", "title": "" }, { "docid": "b1e21bc5cb6deae092b17faf07ca9bac", "score": "0.5000325", "text": "public function fails()\n\t{\n\t\treturn ! $this->check();\n\t}", "title": "" }, { "docid": "afa893981f5cc98a186ee8fec4779618", "score": "0.499415", "text": "abstract protected function _testPassed($message);", "title": "" }, { "docid": "a4cdce51e013b90d66813de3a94d0166", "score": "0.49928582", "text": "function doOtherChecks()\n\t{\n\t}", "title": "" }, { "docid": "06c811f3b53894a837189b1fa428b7f2", "score": "0.49918884", "text": "public function testTestsAreWorking() {\n\t\t$this->assertTrue( true );\n\t}", "title": "" }, { "docid": "cf282dfc734ba4d4bc298d04571f45bd", "score": "0.4985525", "text": "public function isFailureLog(): bool;", "title": "" }, { "docid": "74eebcd79134d681740b5b555c389780", "score": "0.4973505", "text": "public function testBatch_bcc_send15()\n{\n\n // Traversed conditions\n // for (...) == true (line 1710)\n // if (isset($this->_bcc_array[$i])) == true (line 1712)\n // if ($i === $float) == false (line 1717)\n // if ($i === $c - 1) == false (line 1724)\n // for (...) == false (line 1710)\n // for (...) == false (line 1730)\n\n $actual = $this->cI_Email->batch_bcc_send();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "6d5075b280fad8009394367dbbddf780", "score": "0.49694738", "text": "public function testBatch_bcc_send18()\n{\n\n // Traversed conditions\n // for (...) == true (line 1710)\n // if (isset($this->_bcc_array[$i])) == true (line 1712)\n // if ($i === $float) == false (line 1717)\n // if ($i === $c - 1) == true (line 1724)\n // for (...) == false (line 1710)\n // for (...) == false (line 1730)\n\n $actual = $this->cI_Email->batch_bcc_send();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "1c2b0afc44320588126e006ec45092ab", "score": "0.49686396", "text": "public function testBatch_bcc_send3()\n{\n\n // Traversed conditions\n // for (...) == true (line 1710)\n // if (isset($this->_bcc_array[$i])) == false (line 1712)\n // if ($i === $float) == false (line 1717)\n // if ($i === $c - 1) == false (line 1724)\n // for (...) == false (line 1710)\n // for (...) == false (line 1730)\n\n $actual = $this->cI_Email->batch_bcc_send();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "e7b824fb20e5ab0640fe8a4f7cbc0a79", "score": "0.49684677", "text": "function paintFooter($test_name) {\n if ($this->getFailCount() + $this->getExceptionCount() == 0) {\n print \"\\n\\033[37;1;42m ALL OK \\033[0m\\n\";\n } else {\n print \"\\n\\033[37;1;41m FAILURES!!! \\033[0m\\n\";\n }\n print \"Test cases run: \" . $this->getTestCaseProgress() .\n \"/\" . $this->getTestCaseCount() .\n \", Passes: \" . $this->getPassCount() .\n \", Failures: \" . $this->getFailCount() .\n \", Exceptions: \" . $this->getExceptionCount() . \"\\n\";\n }", "title": "" }, { "docid": "ed7e2273fc67d4242b9a0b2f94be7377", "score": "0.49637192", "text": "public function testTaskStatusTimeCalculationForPassedQa()\n {\n // Assigned 30 minutes ago\n $now = time();\n $assignedAgo = $now - (30 * 60);\n $this->task->setAttributes(\n [\n 'due_date' => ($now + (30 * 60)),\n 'owner' => $this->user->getId(),\n 'timeAssigned' => $assignedAgo,\n 'timeFinished' => null,\n 'qa_in_progress' => true,\n 'work' => [\n $this->user->getId() => [\n 'worked' => 0,\n 'paused' => 0,\n 'qa' => 0,\n 'qa_in_progress' => 0,\n 'qa_total_time' => 0,\n 'numberFailedQa' => 0,\n 'blocked' => 0,\n 'workTrackTimestamp' => $assignedAgo,\n 'timeAssigned' => $assignedAgo,\n ],\n ],\n ]\n )\n ->save();\n\n $owner = $this->task->getAttribute('owner');\n $progressBeforeListener = $this->task->getAttribute('work')[$owner]['qa_in_progress'];\n $timeStampBeforeListener = $this->task->getAttribute('work')[$owner]['workTrackTimestamp'];\n\n $this->task->setAttribute('qa_in_progress', false);\n $this->task->setAttribute('passed_qa', true);\n $this->listener->handle($this->task);\n\n $work = $this->task->getAttribute('work');\n $owner = $this->task->getAttribute('owner');\n\n $this::assertGreaterThan($progressBeforeListener, $work[$owner]['qa_in_progress']);\n $this::assertGreaterThan($timeStampBeforeListener, $work[$owner]['workTrackTimestamp']);\n $this::assertEquals(\n $work[$owner]['workTrackTimestamp'] - $timeStampBeforeListener,\n $work[$owner]['qa_in_progress']\n );\n $this::assertEquals(\n $work[$owner]['qa_in_progress'],\n $work[$owner]['qa_total_time']\n );\n }", "title": "" }, { "docid": "a5b99762ded3efcd85f2dd5e67ee6821", "score": "0.4963547", "text": "public function testBatch_bcc_send0()\n{\n\n // Traversed conditions\n // for (...) == false (line 1710)\n // for (...) == false (line 1730)\n\n $actual = $this->cI_Email->batch_bcc_send();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "c664c582ec9cbc10a7aacd373f0191a3", "score": "0.49616468", "text": "public function test_old_course() {\n\n $customfieldvalue = ['shortname' => 'test', 'value' => time() - 1000000];\n $course = $this->getDataGenerator()->create_course(['customfields' => [$customfieldvalue]]);\n\n $recordset = $this->processor->get_course_recordset([$this->triggerinstance], []);\n $found = false;\n foreach ($recordset as $element) {\n if ($course->id === $element->id) {\n $found = true;\n break;\n }\n }\n $this->assertTrue($found, 'The course should have been triggered');\n }", "title": "" }, { "docid": "5a448f6f505f0f6213affad5e25eeca6", "score": "0.4956546", "text": "public function testGetChecker3()\n{\n\n // Traversed conditions\n // if (!isset($this->checker)) == true (line 1163)\n // switch ($interval) (line 1165)\n // Case \\Psy\\VersionUpdater\\Checker::ALWAYS == false (line 1166)\n // Case \\Psy\\VersionUpdater\\Checker::DAILY == false (line 1170)\n // Case \\Psy\\VersionUpdater\\Checker::WEEKLY == false (line 1171)\n // Case \\Psy\\VersionUpdater\\Checker::MONTHLY == true (line 1172)\n // if ($checkFile === false) == false (line 1174)\n\n $actual = $this->configuration->getChecker();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "8b96c71ce1d1a1c43276f26eb21082d4", "score": "0.49519908", "text": "public function testBatch_bcc_send12()\n{\n\n // Traversed conditions\n // for (...) == true (line 1710)\n // if (isset($this->_bcc_array[$i])) == false (line 1712)\n // if ($i === $float) == true (line 1717)\n // if ($i === $c - 1) == true (line 1724)\n // for (...) == false (line 1710)\n // for (...) == false (line 1730)\n\n $actual = $this->cI_Email->batch_bcc_send();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "be50465d6737dd420507b5d0ffe5edb2", "score": "0.4950465", "text": "abstract protected function _testFailed($message);", "title": "" }, { "docid": "2b86c3ea06bc337a51a8d587bcafa14d", "score": "0.49470478", "text": "public function testBatch_bcc_send21()\n{\n\n // Traversed conditions\n // for (...) == true (line 1710)\n // if (isset($this->_bcc_array[$i])) == true (line 1712)\n // if ($i === $float) == true (line 1717)\n // if ($i === $c - 1) == false (line 1724)\n // for (...) == false (line 1710)\n // for (...) == false (line 1730)\n\n $actual = $this->cI_Email->batch_bcc_send();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "9dd9588d5c2062b467cd736f7d4dc2d5", "score": "0.49452195", "text": "public function testOneKeyResult()\n {\n \t$objective = Objective::findOrFail(2);\n\n $this->assertEquals(0, $objective->progress());\n }", "title": "" }, { "docid": "e89bda90b24c639437d79a9159bd5deb", "score": "0.49447966", "text": "public function testGetChecker5()\n{\n\n // Traversed conditions\n // if (!isset($this->checker)) == true (line 1163)\n // switch ($interval) (line 1165)\n // Case \\Psy\\VersionUpdater\\Checker::ALWAYS == false (line 1166)\n // Case \\Psy\\VersionUpdater\\Checker::DAILY == false (line 1170)\n // Case \\Psy\\VersionUpdater\\Checker::WEEKLY == true (line 1171)\n // if ($checkFile === false) == false (line 1174)\n\n $actual = $this->configuration->getChecker();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "0f16cc6feb6d5ae085ba12eb0c0822b9", "score": "0.49421692", "text": "public function testBatch_bcc_send24()\n{\n\n // Traversed conditions\n // for (...) == true (line 1710)\n // if (isset($this->_bcc_array[$i])) == true (line 1712)\n // if ($i === $float) == true (line 1717)\n // if ($i === $c - 1) == true (line 1724)\n // for (...) == false (line 1710)\n // for (...) == false (line 1730)\n\n $actual = $this->cI_Email->batch_bcc_send();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "4ec91de6ad2bfedc632a355ff48a84f3", "score": "0.49416924", "text": "public function testBatch_bcc_send9()\n{\n\n // Traversed conditions\n // for (...) == true (line 1710)\n // if (isset($this->_bcc_array[$i])) == false (line 1712)\n // if ($i === $float) == true (line 1717)\n // if ($i === $c - 1) == false (line 1724)\n // for (...) == false (line 1710)\n // for (...) == false (line 1730)\n\n $actual = $this->cI_Email->batch_bcc_send();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "48871eaa7748ce9ca06d6075bb006f4c", "score": "0.49416864", "text": "public function testBatch_bcc_send6()\n{\n\n // Traversed conditions\n // for (...) == true (line 1710)\n // if (isset($this->_bcc_array[$i])) == false (line 1712)\n // if ($i === $float) == false (line 1717)\n // if ($i === $c - 1) == true (line 1724)\n // for (...) == false (line 1710)\n // for (...) == false (line 1730)\n\n $actual = $this->cI_Email->batch_bcc_send();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "1d59633a49cd85262a086e862d9cce71", "score": "0.49359992", "text": "public function testCheckFalied(): void\n {\n $object = new CodeCoverage('./tests/clover-test.xml', 90);\n\n $this->assertInstanceOf(CodeCoverage::class, $object->check());\n $this->assertStringContainsString('which is below the accepted', $object->output(false));\n }", "title": "" }, { "docid": "33eb79b4bbe5606b5f3e673ce561e114", "score": "0.4934924", "text": "public function testSucceeded(TestSuccess $success) {\n // NOOP\n }", "title": "" }, { "docid": "83e6e8699110a3dd52a4200c7e5a079d", "score": "0.4931001", "text": "public function testTry() {\n\t\t$x = $this->gp->try_foo();\n\n\t\t$this->assertFalse( $x );\n\t\t$this->assertEquals( 'FAILED', $this->gp->getStatus() );\n }", "title": "" }, { "docid": "133f03d20fddd724a6bb190eccd91d49", "score": "0.4930855", "text": "abstract public function preCheck();", "title": "" }, { "docid": "05313d9bb3762f5af24ccd43bb1f29d3", "score": "0.49304467", "text": "public function testGetChecker8()\n{\n\n // Traversed conditions\n // if (!isset($this->checker)) == true (line 1163)\n // switch ($interval) (line 1165)\n // Case \\Psy\\VersionUpdater\\Checker::ALWAYS == false (line 1166)\n // Case \\Psy\\VersionUpdater\\Checker::DAILY == true (line 1170)\n // if ($checkFile === false) == true (line 1174)\n\n $actual = $this->configuration->getChecker();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "f49e22d033bc4d435488bd75277e16c9", "score": "0.4926055", "text": "protected static function increaseFailures(){\n\t\tself::set(FAILEDLOGINS, self::get(FAILEDLOGINS) + 1);\n\t}", "title": "" }, { "docid": "d26ee2472de92c13f79ffd8f529c4bfe", "score": "0.4923819", "text": "public function testThatDependsOnASuccessfulClass(): void\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "8a1f4636eb3fb8d0d24a33c527949808", "score": "0.49218202", "text": "public function testGetChecker7()\n{\n\n // Traversed conditions\n // if (!isset($this->checker)) == true (line 1163)\n // switch ($interval) (line 1165)\n // Case \\Psy\\VersionUpdater\\Checker::ALWAYS == false (line 1166)\n // Case \\Psy\\VersionUpdater\\Checker::DAILY == true (line 1170)\n // if ($checkFile === false) == false (line 1174)\n\n $actual = $this->configuration->getChecker();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "c60593b36092b766ea3762167185c412", "score": "0.49099576", "text": "public function testPass() {\n $this->assertTrue(TRUE);\n }", "title": "" }, { "docid": "535a781ad41c2f4d37393ae00da24a69", "score": "0.49075225", "text": "public function testUncompletedTasksCount2Valid() {\n // extract the uncompleted tasks\n foreach ($this->tasks->all() as $task) {\n if ($task->status != 2)\n $uncompletedTasks[] = $task;\n }\n // extract the completed tasks\n foreach ($this->tasks->all() as $task) {\n if ($task->status == 2)\n $completedTasks[] = $task;\n }\n $this->assertEquals((count($uncompletedTasks) > count($completedTasks)), true);\n }", "title": "" }, { "docid": "db197bcfe5ebddc5ce359a200778b1a4", "score": "0.49057704", "text": "public function getFirstFailedStep()\n\t{\n\t\tif(!$this->getSettingsStatus(false))\n\t\t{\n\t\t\treturn 'settings';\n\t\t}\n\t\t#if(!$this->getMaterialsStatus(false))\n\t\t#{\n\t\t#\treturn 'materials';\n\t\t#}\n\t\tif(!$this->getObjectivesAvailableStatus())\n\t\t{\n\t\t\treturn 'showObjectiveCreation';\n\t\t}\n\t\tif($this->getSettings()->worksWithInitialTest())\n\t\t{\n\t\t\tif(!$this->getInitialTestStatus(false))\n\t\t\t{\n\t\t\t\t$_REQUEST['tt'] = ilLOSettings::TYPE_TEST_INITIAL;\n\t\t\t\treturn 'testOverview';\n\t\t\t}\n\t\t}\n\t\tif(!$this->getQualifiedTestStatus(false))\n\t\t{\n\t\t\t$_REQUEST['tt'] = ilLOSettings::TYPE_TEST_QUALIFIED;\n\t\t\treturn 'testOverview';\n\t\t}\n\t\tif(!$this->getObjectivesStatus(false))\n\t\t{\n\t\t\treturn 'listObjectives';\n\t\t}\n\t\treturn 'listObjectives';\n\t}", "title": "" }, { "docid": "ed6b77970dc61003a9d9894640861f83", "score": "0.49035284", "text": "public function testExemplo() {\n\t\t$this->assertTrue(2<5,\"Mensagem de erro 3\");\n\t}", "title": "" }, { "docid": "9d9842c7e6074aed47288813979a0a8a", "score": "0.48993367", "text": "public function testGetChecker6()\n{\n\n // Traversed conditions\n // if (!isset($this->checker)) == true (line 1163)\n // switch ($interval) (line 1165)\n // Case \\Psy\\VersionUpdater\\Checker::ALWAYS == false (line 1166)\n // Case \\Psy\\VersionUpdater\\Checker::DAILY == false (line 1170)\n // Case \\Psy\\VersionUpdater\\Checker::WEEKLY == true (line 1171)\n // if ($checkFile === false) == true (line 1174)\n\n $actual = $this->configuration->getChecker();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "220c7d0934a4bb792d9f48b63f10b333", "score": "0.48960534", "text": "public function NumFailedChecks() { return count($this->failed_checks); }", "title": "" }, { "docid": "d2a8dc472a3262a355446952264ffe05", "score": "0.48952273", "text": "public function isTest()\n {\n return ($this->errorMode === 'test');\n }", "title": "" }, { "docid": "39d39f64228ef9611e4e81da8c8d9001", "score": "0.4894382", "text": "public function __get_status() {\n \n if( $this->current_method_index === 0 ) {\n return 'not-starter';\n }\n \n return ( $this->current_method_index >= count( $this->__get_class_methods())) ? 'complete' : 'testing';\n \n }", "title": "" }, { "docid": "54ba21bc66a1462d32692037a753e486", "score": "0.48893946", "text": "function has_credits($parameters) \n\t{\n\t\tforeach ($parameters->status->fail_set as $e) \n\t\t{\n\t\t\t$total = 0;\n\t\t\tforeach($e->amounts as $amount)\n\t\t\t{\n\t\t\t\t$total = bcadd($total,$amount->amount,2);\n\t\t\t}\n\t\t\tif ($total > 0.0) return 1;\n\t\t}\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "aa89f3863ec1d6353d89ae933297e4b7", "score": "0.48891884", "text": "public function testCautionStyle()\n {\n $this->magentoStyle->caution('test caution message');\n $expected = PHP_EOL . PHP_EOL . PHP_EOL . '\\s+! \\[CAUTION\\] test caution message\\s+' . PHP_EOL . PHP_EOL;\n $this->assertMatchesRegularExpression(\n '/' . $expected . '/',\n $this->testOutput->output,\n 'Caution message does not match output'\n );\n }", "title": "" }, { "docid": "da285603304d7f04204e1c422be604d6", "score": "0.48860618", "text": "public function get_output_on_failed_test()\n {\n $behat_wrapper = new BehatEditorBehatWrapper();\n $bin = __DIR__ . '/../../../../bin/';\n $yaml = __DIR__ . '/../../../../private/behat.yml';\n $test = __DIR__ . '/../../../../private/features/fail_test.feature';\n\n $behat_wrapper->setBehatBinary($bin)->setTimeout(600);\n\n //Set Stream Output\n //without this the output would not come till the end\n //\n $behat_wrapper->streamOutput(false);\n\n //This one gets Output while it is going line by line\n $outputListener = new BehatOutputListener();\n $behat_wrapper->addOutputListener($outputListener);\n\n //Add behat.command.prepare\n $setName = new BehatSetNewNameOnYaml();\n $listener = new BehatPrepareListener($setName);\n\n $behat_wrapper->addPrepareListener($listener);\n\n $command = BehatCommand::getInstance()\n ->setOption('config', $yaml)\n ->setOption('profile', 'phantom')\n ->setTestPath($test);\n\n try {\n $behat_wrapper->run($command);\n }\n catch(\\BehatWrapper\\BehatException $e) {\n\n }\n //At this point we have\n // the name\n // the output of the test\n // and we know if it is pass or fail via the catch above\n //\n $this->assertNotEmpty($outputListener->getOutput());\n }", "title": "" }, { "docid": "b7cc6ac5106e36b47615f6f0056e20e7", "score": "0.48854187", "text": "abstract protected function onNotSuccessfulTest(\\Throwable $t) : void;", "title": "" }, { "docid": "8f8eb87f7cf9b44d4a6e0bba0dfae52a", "score": "0.4879298", "text": "public function testUncompletedTasksCountValid() {\n $total = count($this->tasks);\n // extract the uncompleted tasks\n foreach ($this->tasks->all() as $task) {\n if ($task->status != 2)\n $uncompletedTasks[] = $task;\n }\n $uncompleted = count($uncompletedTasks);\n $this->assertEquals(($uncompleted > ($total / 2)), true);\n }", "title": "" }, { "docid": "dc5624d68be9157fb180c6b789f61b9a", "score": "0.4876509", "text": "public function testGetChecker4()\n{\n\n // Traversed conditions\n // if (!isset($this->checker)) == true (line 1163)\n // switch ($interval) (line 1165)\n // Case \\Psy\\VersionUpdater\\Checker::ALWAYS == false (line 1166)\n // Case \\Psy\\VersionUpdater\\Checker::DAILY == false (line 1170)\n // Case \\Psy\\VersionUpdater\\Checker::WEEKLY == false (line 1171)\n // Case \\Psy\\VersionUpdater\\Checker::MONTHLY == true (line 1172)\n // if ($checkFile === false) == true (line 1174)\n\n $actual = $this->configuration->getChecker();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "33c64015e0167821481ddfb1138d01af", "score": "0.48702797", "text": "public function testCourseStatuses() {\n\t\t$Status = $this->Status->find('first', array('conditions' => array('id' => Status::INSCRICOES_ABERTAS, 'model' => 'Course')));\n\t\t$this->assertEquals('Inscrições abertas', $Status['Status']['name']);\n\n\t\t$Status = $this->Status->find('first', array('conditions' => array('id' => Status::INSCRICOES_FECHADAS, 'model' => 'Course')));\n\t\t$this->assertEquals('Inscrições fechadas', $Status['Status']['name']);\n\t}", "title": "" }, { "docid": "e5bdeaee7692c50548924f770382f888", "score": "0.48663443", "text": "public function testBatch_bcc_send8()\n{\n\n // Traversed conditions\n // for (...) == true (line 1710)\n // if (isset($this->_bcc_array[$i])) == false (line 1712)\n // if ($i === $float) == false (line 1717)\n // if ($i === $c - 1) == true (line 1724)\n // for (...) == false (line 1710)\n // for (...) == true (line 1730)\n // if ($this->protocol !== 'smtp') == true (line 1736)\n // for (...) == false (line 1730)\n\n $actual = $this->cI_Email->batch_bcc_send();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "a7d07201999b5fdee6c67310dbe208a9", "score": "0.48653015", "text": "function GetNumberOfFailures($checktesttiming,$testtimemaxstatus)\n {\n if(!$this->BuildId)\n {\n echo \"BuildTest::GetNumberOfFailures(): BuildId not set\";\n return false; \n }\n \n $sql = \"SELECT testfailed,testnotrun,testtimestatusfailed FROM build WHERE id=\".qnum($this->BuildId);\n $query = pdo_query($sql);\n if(!$query)\n {\n add_last_sql_error(\"BuildTest:GetNumberOfFailures\",0,$this->BuildId);\n return false;\n } \n\n $nfail_array = pdo_fetch_array($query);\n \n $sumerrors = 0;\n if($nfail_array['testfailed']>0)\n {\n $sumerrors += $nfail_array['testfailed'];\n }\n if($nfail_array['testnotrun']>0)\n {\n $sumerrors += $nfail_array['testnotrun'];\n }\n \n // Find if the build has any test failings\n if($checktesttiming)\n {\n if($nfail_array['testtimestatusfailed']>0)\n {\n $sumerrors += $nfail_array['testtimestatusfailed'];\n }\n }\n return $sumerrors;\n }", "title": "" } ]
9504b3aded06578a22e5b904310749c2
Requests a single recurring event.
[ { "docid": "e108fddcba481c74c6f7266777df0cb6", "score": "0.74301034", "text": "protected function requestSingleRecurringEvent(\\Google_Service_Calendar_Event $item) {\n try {\n $service = CalendarService::instance();\n }\n catch (\\Exception $e) {\n $this->log($e->getMessage());\n return FALSE;\n }\n\n $optParams = [\n 'singleEvents' => 'true',\n 'iCalUID' => $item->getICalUID(),\n ];\n\n // Make api call.\n try {\n $results = $service->events->listEvents($this->id, $optParams);\n }\n catch (Exception $e) {\n $this->log($e->getMessage());\n return [];\n }\n\n return $results;\n }", "title": "" } ]
[ { "docid": "43d8c0c0bfdb8cbab1b1d167252edcd6", "score": "0.63610566", "text": "public function getInstanceRecurringEvent($calendarId, $eventId, $originalStart)\n\t{\n\t\t$this->currentMethod = __METHOD__;\n\n\t\t$requestParameters = ['originalStart' => $originalStart];\n\t\t$requestParameters = array_filter($requestParameters);\n\t\t$url = self::API_BASE_URL . '/calendars/' . urlencode($calendarId) . '/events/' . urlencode($eventId) . '/instances/';\n\t\t$url .= empty($requestParameters) ? '' : '?' . preg_replace('/(%3D)/', '=', http_build_query($requestParameters));\n\n\t\treturn $this->doRequest(Web\\HttpClient::HTTP_GET, $url);\n\t}", "title": "" }, { "docid": "0bfa36405e917a243f05fca025608f4c", "score": "0.6040514", "text": "public function purchaseAndSubscribeRecurring();", "title": "" }, { "docid": "6ae4832f7c9bcf53fce727cd330d9007", "score": "0.58634835", "text": "public function getRecurringEntry($entry_id)\n {\n global $oDb;\n \n //echo \"<br />\".\n $query = '\n SELECT\n *\n FROM\n '.DB_PREFIX.'entries_recurring\n WHERE\n sid = \"'.SID.'\" AND\n entry_id = \"'.$entry_id.'\"\n ';\n $entry = $oDb->one_row_assoc($query);\n \n return $entry;\n }", "title": "" }, { "docid": "ba58a52346df1ac0dfe5f31cf1f07b03", "score": "0.57506216", "text": "function get_rp_events_get(){\n $receptionist_id = $this->db->escape_str($this->input->get('receptionist_id'));\n $events = $this->api_model->get_rp_events($receptionist_id);\n $this->set_response($events, REST_Controller::HTTP_OK);\n}", "title": "" }, { "docid": "c81d7f20c0ab2e9a6c86973940cf5bc4", "score": "0.572335", "text": "public function cancelRecurring();", "title": "" }, { "docid": "a5c00f3f20b06a79ffdab61ec71e36c5", "score": "0.5710845", "text": "public function get($event_id);", "title": "" }, { "docid": "6bbcb5b2de63f7176a49c2b8771e5187", "score": "0.57086176", "text": "function recurring(array $params)\n\t{\n\t\treturn $this->get_cbui_url('Recurring', $params);\n\t}", "title": "" }, { "docid": "2cf19043be6fa97ffe09da6555e444b0", "score": "0.55845714", "text": "public static function get_recurrence()\n {\n $self = self::get_instance();\n require_once __DIR__ . '/lib/libcalendaring_recurrence.php';\n return new libcalendaring_recurrence($self);\n }", "title": "" }, { "docid": "d73c78c4114cf55ced4887fe3de8fb18", "score": "0.55473983", "text": "private function get_recurrence() {\n\t\t$recurrence = json_decode($this->model->get_recurrence());\n\t\tif(!$recurrence) {\n\t\t\tthrow new NoRecurrenceException('RecurringSchedule.schedule must have a recurrence');\n\t\t}\n\n\t\treturn $recurrence;\n\t}", "title": "" }, { "docid": "448e9eb28608787bc66983980b7c3466", "score": "0.55081415", "text": "protected function processItem($item) {\n\n if (!is_null($item->getRecurrence())) {\n $this->log('Requesting Recurring ' . $item->getICalUID());\n\n // This is a recurring event.\n // We need to request SingleEvents for this event.\n $new_events = $this->requestSingleRecurringEvent($item);\n\n $new_event_ids = [];\n foreach ($new_events as $e) {\n if ($e->getStatus() != 'cancelled') {\n $new_event_ids[] = $e->getId();\n }\n }\n\n // We need to delete all entries that have the same iCalUID\n // but not ids IN $new_event_ids.\n $nid = $this->db()->delete(CalendarSettings::TABLENAME)\n ->condition('calendar_id', $this->id)\n ->condition('ical_id', $item->getICalUID());\n\n if (count($new_event_ids) > 0) {\n // Exclude ids that match.\n $nid->condition('id', $new_event_ids, 'NOT IN');\n }\n\n // Run the delete query.\n $nid->execute();\n $this->log('Syncing ' . count($new_events) . ' recurring events from event ' . $item->getICalUID(), [], 'debug');\n\n // Then we need to process the rest of the events.\n $ids = [];\n foreach ($new_events as $event) {\n $id = $this->processItem($event);\n $ids = array_merge($ids, $id);\n }\n\n return $ids;\n }\n\n $data = (array) $item;\n $event = new CalendarEvent($this->id, $data);\n\n if ($item->status === 'cancelled' || $event->shouldSync() === FALSE) {\n // Delete the item.\n $nid = $this->db()->delete(CalendarSettings::TABLENAME)\n ->condition('calendar_id', $this->id)\n ->condition('id', $this->db()->escapeLike($item->getId()) . '%', 'LIKE')\n ->execute();\n return [];\n }\n else {\n\n // Calculate Start And End Dates.\n $event->setSequenceStartAndEnd();\n\n if ($event->eventSpansMultipleDays()) {\n // Delete all sequenced events that are longer than the actual sequence.\n $q = $this->db()->delete(CalendarSettings::TABLENAME)\n ->condition('calendar_id', $this->id)\n ->condition('id', $event->getId())\n ->condition('sequence', (ceil($event->getEventLengthDays())), '>=');\n\n $q->execute();\n foreach ($event->getSequencedEvents() as $e) {\n $this->addEventToDatabase($e);\n }\n }\n else {\n $this->addEventToDatabase($event);\n }\n\n return [$event->getId()];\n\n }\n\n }", "title": "" }, { "docid": "365ae66f12f6a4ddcc0f74470e563d6b", "score": "0.55020756", "text": "public function notify_stripe_payment_recurring(){\n\t\t// Retrieve the request's body and parse it as JSON:\n\t\t$input = file_get_contents('php://input');\n\t\t$likes_history_path = dirname(__FILE__) . '/recurring'; \n\t\tif (!is_dir($likes_history_path)){\n\t\t\t\t//mkdir - tells that need to create a directory\n\t\t\t\tmkdir($likes_history_path,0777,true);\n\t\t}\n\t\t$r = false; \n\t\t\n\t\tif (!file_exists($likes_history_path.'/test_log.json')){\n\t\t\t\n\t\t\n\t\t\t$r = file_put_contents($likes_history_path.'/test_log.json',$input, FILE_APPEND);\n\t\t}\n\t\t$event_json = json_decode($input); \n \n\t\t// Do something with $event_json\n\n\t\thttp_response_code(200); // PHP 5.4 or greater \n\t}", "title": "" }, { "docid": "b4f87edf4656bde9db3f68887c1c6d67", "score": "0.5483097", "text": "public function onScheduleRequested($event)\n {\n dispatch(new GenerateSchedule($event->schedule))->delay(now()->addSeconds(1));\n }", "title": "" }, { "docid": "eb18352da3233494583dbb4801617d75", "score": "0.5463859", "text": "function eg_schedule_recurring_emails() {\n\tif ( false === as_next_scheduled_action( 'send_buyin_emails_on_friday' ) ) {\n\t\tas_schedule_recurring_action(strtotime('06/12/2020 13:27:00'), WEEK_IN_SECONDS, 'send_buyin_emails_on_friday', array(),'');\n\t}\n}", "title": "" }, { "docid": "36dd193d6fdcd03494f202fa27e018da", "score": "0.54451096", "text": "function getEventById($id){\n\t\treturn $this->findById($id , array( 'recursive' => 0));\n\t}", "title": "" }, { "docid": "279c12e76e74ac2237ef545b40d0eb94", "score": "0.54289937", "text": "private function event(){\n\t\t\tif($this->get_request_method() != \"GET\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t$query=\"SELECT distinct c.eventId, c.eventName, c.eventDesc, c.picURL, c.eventDetails FROM event c order by c.eventId desc\";\n\t\t\t$r = $this->mysqli->query($query) or die($this->mysqli->error.__LINE__);\n\n\t\t\tif($r->num_rows > 0){\n\t\t\t\t$result = array();\n\t\t\t\twhile($row = $r->fetch_assoc()){\n\t\t\t\t\t$result[] = $row;\n\t\t\t\t}\n\t\t\t\t$this->response($this->json($result), 200); // send user details\n\t\t\t}\n\t\t\t$this->response('',204);\t// If no records \"No Content\" status\n\t\t}", "title": "" }, { "docid": "a8a24f65654800bf41a73d2065b6b972", "score": "0.53225887", "text": "public function Query() {\n $page = get_the_ID();\n return $this->get_single_event( $page );\n }", "title": "" }, { "docid": "f72ec17fe5b543e3e1ec4ce5f1376b8b", "score": "0.5309759", "text": "function em_load_event(){\r\n\tglobal $EM_Event, $EM_Recurrences, $EM_Location, $EM_Mailer;\r\n\t$EM_Recurrences = array();\r\n\tif( isset( $_REQUEST['event_id'] ) && is_numeric($_REQUEST['event_id']) ){\r\n\t\t$EM_Event = new EM_Event($_REQUEST['event_id']);\r\n\t}elseif( isset($_REQUEST['recurrence_id']) && is_numeric($_REQUEST['recurrence_id']) ){\r\n\t\t//Eventually we can just remove this.... each event has an event_id regardless of what it is.\r\n\t\t$EM_Event = new EM_Event($_REQUEST['recurrence_id']);\r\n\t}elseif( isset($_REQUEST['location_id']) && is_numeric($_REQUEST['location_id']) ){\r\n\t\t$EM_Location = new EM_Location($_REQUEST['location_id']);\r\n\t}\r\n\t$EM_Mailer = new EM_Mailer();\r\n\tdefine('EM_URI', get_permalink(get_option(\"dbem_events_page\"))); //PAGE URI OF EM\r\n\tdefine('EM_RSS_URI', get_bloginfo('wpurl').\"/?dbem_rss=main\"); //RSS PAGE URI\r\n}", "title": "" }, { "docid": "8518ed21367289067d36c182e0837313", "score": "0.53006315", "text": "public function checkRecurring( $event, $month, $day, $year )\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\tif( !$event['event_id'] )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif ( !$event['event_recurring'] )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tstatic $_shownEvents\t= array();\n\t\t\n\t\t/**\n\t\t * We set start time to end of day and end time to beginning of day, because our \"in range\" check below\n\t\t * checks if the event start time is greater than the day time and end time is less than the day time. Thus\n\t\t * an event on August 10 2011 4pm (recurring) will not show if we check if it's greater than the beginning of the day\n\t\t * but will if we check if it's greater than the end of day (i.e. it occurs on that day). I know this sounds confusing,\n\t\t * but I'm just pointing out that start is intended to be END of day and end is BEGINNING of day on purpose.\n\t\t * @link\thttp://community.invisionpower.com/tracker/issue-32575-calendar-recurring-events\n\t\t */\n\t\t$_start\t\t\t= gmmktime( 23, 59, 59, $month, $day, $year );\n\t\t$_lunch\t\t\t= gmmktime( 12, 0 , 0 , $month, $day, $year );\n\t\t$_end\t\t\t= gmmktime( 0 , 0 , 0 , $month, $day, $year );\n\t\t$_eventStart\t= strtotime( $event['event_start_date'] );\n\t\t$_eventEnd\t\t= strtotime( $event['event_end_date'] );\n\n\t\t//-----------------------------------------\n\t\t// Already seen it?\n\t\t//-----------------------------------------\n\n\t\tif ( !empty( $_shownEvents[ $month . '-' . $day . '-' . $year ][ $event['event_id'] ] ) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Check we're in range\n\t\t//-----------------------------------------\n\n\t\tif ( $_eventStart > $_start OR $_eventEnd < $_end )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Check recurring\n\t\t//-----------------------------------------\n\n\t\tif ( $event['event_recurring'] )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Weekly\n\t\t\t//-----------------------------------------\n\n\t\t\tif ( $event['event_recurring'] == 1 )\n\t\t\t{\n\t\t\t\treturn ( gmstrftime( '%w', $_eventStart ) == gmstrftime( '%w', $_lunch ) ) ? true : false;\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// Monthly\n\t\t\t//-----------------------------------------\n\n\t\t\telse if ( $event['event_recurring'] == 2 )\n\t\t\t{\n\t\t\t\treturn ( gmstrftime( '%d', $_eventStart ) == gmstrftime( '%d', $_lunch ) ) ? true : false;\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// Yearly\n\t\t\t//-----------------------------------------\n\n\t\t\telse if ( $event['event_recurring'] == 3 )\n\t\t\t{\n\t\t\t\treturn ( gmstrftime( '%d', $_eventStart ) == gmstrftime( '%d', $_lunch ) AND gmstrftime( '%m', $_eventStart ) == gmstrftime( '%m', $_lunch ) ) ? true : false;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d3e709debf0bbd0458e98cdee3b4d6f2", "score": "0.52842045", "text": "public function paynlRecurring() {\n //Run only from command line interface\n if (is_cli()) {\n \t// log here entry\n\t\t\t$this->user_subscription_model->logRecurringPaymentCall(date(now()));\n $results = $this->user_subscription_model->getUsersSubscriptionsInfoForPaynlRecurringPayments();\n $amount = $this->subscription_model->getSubscriptionInfoById(\"3\");\n if (!empty($amount)) {\n $recuringCharge = (float) $amount->amount * 100;\n if (!empty($results)) {\n foreach ($results as $result) {\n $nowDateTime = new DateTime();\n $createDateTime = new DateTime($result['createdDtm']);\n $interval = $nowDateTime->diff($createDateTime);\n $elapsedDays = $interval->format('%a');\n if ($elapsedDays >= 30) {\n $payData = [];\n $payData['format'] = 'json';\n $payData['tokenid'] = PAYNL_DATA_TOKEN_ID_RECURRING;\n $payData['token'] = PAYNL_DATA_TOKEN_RECURRING;\n $payData['gateway'] = 'rest-api.pay.nl';\n $payData['namespace'] = 'Transaction';\n $payData['function'] = 'byRecurringId';\n $payData['version'] = 'v15';\n $strUrl = \"https://\" . $payData['tokenid'] .\n \":\" . $payData['token'] .\n \"@\" . $payData['gateway'] .\n \"/\" . $payData['version'] .\n \"/\" . $payData['namespace'] .\n \"/\" . $payData['function'] .\n \"/\" . $payData['format'];\n $arrArguments = array();\n $arrArguments['recurringId'] = $result['recurring_id'];\n $arrArguments['serviceId'] = PAYNL_SERVICE_ID_RECURRING;\n $arrArguments['amount'] = $recuringCharge;\n $arrArguments['currency'] = 'EUR';\n $arrArguments['description'] = 'Recurring Charge';\n $objCurl = curl_init($strUrl);\n curl_setopt($objCurl, CURLOPT_URL, $strUrl);\n curl_setopt($objCurl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($objCurl, CURLOPT_TIMEOUT, 5);\n curl_setopt($objCurl, CURLOPT_POST, 1);\n curl_setopt($objCurl, CURLOPT_POSTFIELDS, $arrArguments);\n curl_setopt($objCurl, CURLOPT_USERAGENT, \"Pay Gateway\");\n $strReturnData = curl_exec($objCurl);\n $arrResult = json_decode($strReturnData);\n $iErrorNumber = curl_errno($objCurl);\n if ($iErrorNumber != 0) {//Curl failed\n //Don't do anything, the cron curl will run the next hour.\n } elseif ($arrResult === false) {//Curl sent no response.\n //Don't do anything, the cron curl will run the next hour.\n } else {\n //handle response call\n $resultNumber = $arrResult->request->result;\n $orderId = $arrResult->transaction->orderId;\n if($resultNumber == \"1\"){\n //Payment success.\n $this->user_subscription_model->updateRecurringPaymentRocord($result['recurring_id'], \"2\", $nowDateTime->format('Y-m-d H:i:s'), $orderId);\n }else if($resultNumber == \"0\"){\n //Payment failed.\n $this->user_subscription_model->updateRecurringPaymentRocord($result['recurring_id'], \"1\", $result['createdDtm'], NULL);\n }\n }\n curl_close($objCurl);\n //Cleanup API data\n unset($payData, $strUrl, $iErrorNumber, $strErrorMessage, $arrArguments);\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "13471dedd05d1714d0d2e01e643b60f6", "score": "0.5263121", "text": "public function recurringPayment()\n {\n $response = $this->response();\n\n return response()->json($response, $response['status']);\n }", "title": "" }, { "docid": "a84d315b317b0c1caeccab72417d509e", "score": "0.5252905", "text": "public function get_recurring() {\n\t\treturn $this->recurring;\n\t}", "title": "" }, { "docid": "0e7a2a16f62bcdff04f6adc7bf2796c5", "score": "0.5236656", "text": "public function getNextEvent()\n {\n $today = new \\DateTime();\n return $this->_em->createQuery('SELECT e from SFMWebsiteBundle:Event e WHERE e.datetime > :datetime ORDER BY e.datetime ASC')\n ->setMaxResults(1)\n ->setParameter('datetime',$today->format('Y-m-d 00:00:00'))\n ->getOneOrNullResult();\n }", "title": "" }, { "docid": "391ceaf8d15d32231cd22e9795788a9d", "score": "0.5197844", "text": "public function addRecurring($arr)\n\t{\n\t\t$date = $this -> valid -> FilterFormValues($arr['date']);\n\t\t$start = $this -> valid -> FilterFormValues($arr['start']);\n\t\t$end = $this -> valid -> FilterFormValues($arr['end']);\n\t\t$recurring = $this -> valid -> FilterFormValues($arr['recurring']);\n\t\t$duration = $this -> valid -> FilterFormValues($arr['duration']);\n\t\t$idRoom = $this -> session -> getRoom();\n\t\t$user = $this -> session -> getSession();\n\t\t$idUser = $user['id'];\n\t\t$dateForCheck = $date;\n\t\t// if recurring weekly\n\t\tif(\"weekly\" == $recurring)\n\t\t{\n\t\t\t// check freely entered time\n\t\t\tfor($i=0; $i <= $duration; $i++)\n\t\t\t{\n\t\t\t\t$r = $this -> checkTime($dateForCheck, $start, $end, $idRoom);\n\t\t\t\tif(!empty($r))\n\t\t\t\t{\n\t\t\t\t\t$this -> errors = \"you can not book these dates because one\n\t\t\t\t\tof them is already occupied\";\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t$dateForCheck = strtotime($dateForCheck);\n\t\t\t\t// add 7 days to entered time\n\t\t\t\t$dateForCheck = $dateForCheck + 60 * 60 * 24 * 7;\n\t\t\t\t$dateForCheck = date(\"Y-m-j\", $dateForCheck);\n\t\t\t}\n\t\t\t// insert first event and get insert id \n\t\t\t$this -> insertEvent($date, $start, $end, $idUser, $idRoom);\n\t\t\t$parent = $this -> DB -> getLastInsertId();\n\t\t\t// insert others events with parent id\n\t\t\tfor($i=1; $i <= $duration; $i++)\n\t\t\t{\n\t\t\t\t$date = strtotime($date);\n\t\t\t\t$date = $date + 60 * 60 * 24 * 7;\n\t\t\t\t$date = date(\"Y-m-j\", $date);\n\t\t\t\t$this -> insertEvent($date, $start, $end, $idUser, $idRoom,\n\t\t\t\t$parent);\n\t\t\t}\n\t\t\t$this -> errors = \"successfully booked a room, you can see this by\n\t\t\tlooking at the calendar\";\n\t\t\t$this -> newDate = '';\n\t\t\t$this -> start = '';\n\t\t\t$this -> end = '';\n\t\t\t$this -> desc = '';\n\t\t\treturn true;\n\t\t}\n\t\t// if bi-weekly\n\t\telseif(\"bi-weekly\" == $recurring)\n\t\t{\n\t\t\t// duration cant be more then 2 times\n\t\t\tif($duration <= 2)\n\t\t\t{\n\t\t\t\t// check freely entered time\n\t\t\t\tfor($i=0; $i <= $duration; $i++)\n\t\t\t\t{\n\t\t\t\t\t$r = $this -> checkTime($dateForCheck, $start, $end,\n\t\t\t\t\t$idRoom);\n\t\t\t\t\tif(!empty($r))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this -> errors = \"you can not book these dates because\n\t\t\t\t\t\tone of them is already occupied\";\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t$dateForCheck = strtotime($dateForCheck);\n\t\t\t\t\t// add 14 days to entered time\n\t\t\t\t\t$dateForCheck = $dateForCheck + 60 * 60 * 24 * 14;\n\t\t\t\t\t$dateForCheck = date(\"Y-m-j\", $dateForCheck);\n\t\t\t\t}\n\t\t\t\t//insert first event and get last insert id\n\t\t\t\t$this -> insertEvent($date, $start, $end, $idUser, $idRoom);\n\t\t\t\t$parent = $this -> DB -> getLastInsertId();\n\t\t\t\t// insert other events with parent id\n\t\t\t\tfor($i=1; $i <= $duration; $i++)\n\t\t\t\t{\n\t\t\t\t\t$date = strtotime($date);\n\t\t\t\t\t$date = $date + 60 * 60 * 24 * 14;\n\t\t\t\t\t$date = date(\"Y-m-j\", $date);\n\t\t\t\t\t$this -> insertEvent($date, $start, $end, $idUser, $idRoom,\n\t\t\t\t\t$parent);\n\t\t\t\t}\n\t\t\t\t$this -> errors = \"successfully booked a room, you can see this\n\t\t\t\tby looking at the calendar\";\n\t\t\t\t$this -> newDate = '';\n\t\t\t\t$this -> start = '';\n\t\t\t\t$this -> end = '';\n\t\t\t\t$this -> desc = '';\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this -> errors = \"sorry, but duration can be maximum 2 times\";\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t// if monthly recurring\n\t\telseif(\"monthly\" == $recurring)\n\t\t{\n\t\t\t// duration cant be more then 2 times\n\t\t\tif($duration < 2)\n\t\t\t{\n\t\t\t\t// check freely entered time\n\t\t\t\tfor($i=0; $i <= $duration; $i++)\n\t\t\t\t{\n\t\t\t\t\t$r = $this -> checkTime($dateForCheck, $start, $end,\n\t\t\t\t\t$idRoom);\n\t\t\t\t\tif(!empty($r))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this -> errors = \"you can not book these dates because\n\t\t\t\t\t\tone of them is already occupied\";\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t$day = date(\"N\", strtotime($dateForCheck));\t\n\t\t\t\t\tif($day > 5)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this -> errors = \"you can not book these dates because\n\t\t\t\t\t\tone of them is day off\";\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t$dateForCheck = strtotime($dateForCheck);\n\t\t\t\t\t// add 1 month to entered time\n\t\t\t\t\t$dateForCheck = strtotime(\"next month\", $dateForCheck);\n\t\t\t\t\t$dateForCheck = date(\"Y-m-j\", $dateForCheck);\n\t\t\t\t}\n\t\t\t\t//insert first event and get last insert id\n\t\t\t\t$this -> insertEvent($date, $start, $end, $idUser, $idRoom);\n\t\t\t\t$parent = $this -> DB -> getLastInsertId();\n\t\t\t\t// insert other events with parent id\n\t\t\t\tfor($i=1; $i < $duration; $i++)\n\t\t\t\t{\n\t\t\t\t\t$date = strtotime($date);\n\t\t\t\t\t$date = strtotime(\"next month\", $date);\n\t\t\t\t\t$date = date(\"Y-m-j\", $date);\n\t\t\t\t\t$this -> insertEvent($date, $start, $end, $idUser, $idRoom,\n\t\t\t\t\t$parent);\n\t\t\t\t}\n\t\t\t\t$this -> errors = \"successfully booked a room, you can see this\n\t\t\t\tby looking at the calendar\";\n\t\t\t\t$this -> newDate = '';\n\t\t\t\t$this -> start = '';\n\t\t\t\t$this -> end = '';\n\t\t\t\t$this -> desc = '';\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this -> errors = \"sorry, but duration can be maximum 2 times\";\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e73f8d8d44dd6b73b41dbf4ccf94905c", "score": "0.5195389", "text": "public function getEvent($event_id = '') {\r\n\t\ttry {\r\n\t\t\treturn Stripe_Event::retrieve($event_id, $this->access_token);\r\n\t\t} catch (Exception $ex) {\r\n\t\t\t$this->log($ex);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "078f0210af34395b5ddb34e4e1747dac", "score": "0.51843953", "text": "public function recurring($val = false) {\r\n\t\t$this->recurring = $val;\r\n\t}", "title": "" }, { "docid": "b6bc5d2cabfa9a5c0b540639d55dc067", "score": "0.5143467", "text": "public function getSchedule () {\r\n\t$this->ensureLoggedIn();\r\n\r\n\treturn $this->request(array('req' => 'getschedule'));\r\n\t}", "title": "" }, { "docid": "ddc95bfdf1b0a237e6edf5dcb5b3605f", "score": "0.5112802", "text": "public function testUpdateRecurringEventRecurrenceDoesNotClearExceptionsWhenUpdateExceptionsIsFalse()\n {\n // Step 1. Create new recurring event without attendees.\n // Recurring event with occurrences: 2016-04-25, 2016-05-08, 2016-05-09, 2016-05-22\n $eventData = [\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-25T01:00:00+00:00',\n 'end' => '2016-04-25T02:00:00+00:00',\n 'recurrence' => [\n 'timeZone' => 'UTC',\n 'recurrenceType' => Recurrence::TYPE_WEEKLY,\n 'interval' => 2,\n 'dayOfWeek' => [Recurrence::DAY_SUNDAY, Recurrence::DAY_MONDAY],\n 'startTime' => '2016-04-25T01:00:00+00:00',\n 'occurrences' => 4,\n 'endTime' => '2016-06-10T01:00:00+00:00',\n ],\n 'notifyAttendees' => NotificationManager::ALL_NOTIFICATIONS_STRATEGY\n ];\n\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode($eventData, JSON_THROW_ON_ERROR)\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $recurringEvent */\n $recurringEvent = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 2. Create first exception with cancelled flag for the recurring event.\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode(\n [\n 'isCancelled' => true,\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-09T01:00:00+00:00',\n 'end' => '2016-05-09T02:00:00+00:00',\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-09T01:00:00+00:00',\n ],\n JSON_THROW_ON_ERROR\n )\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $cancelledEventException */\n $cancelledEventException = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 3. Create another exception for the recurring event with different title, description and start time.\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode(\n [\n 'title' => 'Test Recurring Event Changed',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-22T03:00:00+00:00',\n 'end' => '2016-05-22T05:00:00+00:00',\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-22T01:00:00+00:00',\n ],\n JSON_THROW_ON_ERROR\n )\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $changedEventException */\n $changedEventException = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 4. Check the events exposed in the API without cancelled exception and with modified second exception.\n $this->restRequest(\n [\n 'method' => 'GET',\n 'url' => $this->getUrl(\n 'oro_api_get_calendarevents',\n [\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-01T01:00:00+00:00',\n 'end' => '2016-06-01T01:00:00+00:00',\n 'subordinate' => true,\n ]\n ),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key')\n ]\n );\n\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n\n $responseWithExceptions = [\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-25T01:00:00+00:00',\n 'end' => '2016-04-25T02:00:00+00:00',\n ],\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-08T01:00:00+00:00',\n 'end' => '2016-05-08T02:00:00+00:00',\n ],\n [\n 'id' => $changedEventException->getId(),\n 'isCancelled' => false,\n 'title' => 'Test Recurring Event Changed',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-22T01:00:00+00:00',\n 'start' => '2016-05-22T03:00:00+00:00',\n 'end' => '2016-05-22T05:00:00+00:00',\n ],\n ];\n $this->assertResponseEquals($responseWithExceptions, $response, false);\n\n // Step 5. Update Recurrence for recurring event with updateExceptions flag === false.\n $changedEventData = $eventData;\n $changedEventData['recurrence'] = [\n 'timeZone' => 'UTC',\n 'recurrenceType' => Recurrence::TYPE_WEEKLY,\n 'interval' => 2,\n 'dayOfWeek' => [Recurrence::DAY_SUNDAY, Recurrence::DAY_MONDAY],\n 'startTime' => '2016-04-25T01:00:00+00:00',\n 'occurrences' => 3,\n 'endTime' => null,\n ];\n $changedEventData['updateExceptions'] = false;\n $this->restRequest(\n [\n 'method' => 'PUT',\n 'url' => $this->getUrl('oro_api_put_calendarevent', ['id' => $recurringEvent->getId()]),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode($changedEventData, JSON_THROW_ON_ERROR)\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n $this->assertResponseEquals(\n $this->getResponseArray($response),\n $response\n );\n\n // Step 6. Check exceptional event presented.\n $this->restRequest(\n [\n 'method' => 'GET',\n 'url' => $this->getUrl(\n 'oro_api_get_calendarevents',\n [\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-01T01:00:00+00:00',\n 'end' => '2016-06-01T01:00:00+00:00',\n 'subordinate' => true,\n ]\n ),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key')\n ]\n );\n\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n $this->assertResponseEquals($responseWithExceptions, $response, false);\n\n $this->getEntityManager()->clear();\n $this->assertNotNull(\n $this->getEntity(CalendarEvent::class, $cancelledEventException->getId()),\n 'Failed asserting exception is not removed when not cleared.'\n );\n $this->assertNotNull(\n $this->getEntity(CalendarEvent::class, $changedEventException->getId()),\n 'Failed asserting exception is not removed when not cleared.'\n );\n }", "title": "" }, { "docid": "bb5d8a6b9425fb487e727fbf4f2a3fb6", "score": "0.5112591", "text": "public function postEvents($data = false,$type = false)\n {\n try{\n $id_user = $_POST['id_user'];\n $id_room = $_POST['id_room'];\n $description = $_POST['description'];\n $dateStart = new \\DateTime();\n $dateEnd = new \\DateTime();\n $timeS = $dateStart->setTimestamp($_POST['time_start']/1000);\n $timeE = $dateEnd->setTimestamp($_POST['time_end']/1000);\n $st = $timeS->format(DATE_FORMAT);\n $en = $timeE->format(DATE_FORMAT);\n\n if($_POST['recur_period'] != null)\n {\n $period = $_POST['duration'];\n $modify = $_POST['recur_period'];\n $id = \\Models\\Events::addEvents($id_user, $id_room, $description, $timeS, $timeE);\n $result = \\Models\\Events::addRecurringEvent($id_user, $id_room,\n $description, $timeS, $timeE,$period,$modify,$id);\n return \\Response::ServerSuccess(200, $result);\n }\n else {\n $events = new \\Models\\Events();\n $events->id_user = $this->valid->clearData($_POST['id_user']);\n $id_room = $events->id_room = $this->valid->clearData($_POST['id_room']);;\n $events->description = $this->valid->clearData($_POST['description']);;\n $events->time_start = $st;\n $events->time_end = $en;\n if ($events->normalTime($id_room, $st, $en)) {\n $result = $events->insert();\n }\n if (!$result) {\n return \\Response::ServerError(200, SELECT_DAY);\n } else {\n return \\Response::ServerSuccess(200, ADD_ONE_OK);\n }\n }\n }\n catch(\\Exception $exception)\n {\n return \\Response::ServerError(200, NO_ADDS);\n }\n\n }", "title": "" }, { "docid": "b57478aa4ff70f339f3175a7a65977b8", "score": "0.51016283", "text": "function get_event_requests_get(){\n $designer_id = $this->db->escape_str($this->input->get('designer_id'));\n $event_requests = $this->api_model->get_event_requests($designer_id);\n $this->set_response($event_requests, REST_Controller::HTTP_OK);\n }", "title": "" }, { "docid": "805c2ee68150672e37039519aa4c738e", "score": "0.50848246", "text": "public function fetchEvents();", "title": "" }, { "docid": "92a250a3dcaf22669426b8f4f77eaa37", "score": "0.5083516", "text": "public function getDueRecurrings($number_items, $timestamp = NULL);", "title": "" }, { "docid": "6cc82c2f67cde86ada418d245f842be9", "score": "0.5070862", "text": "public function getTransactionRecurring()\n {\n return $this->transactionRecurring;\n }", "title": "" }, { "docid": "5ceb5da61a34de0e7628be239cd0a02f", "score": "0.50651884", "text": "public function testUpdateRecurringEventWithoutRecurrenceChangeDoesNotChangeExceptionsWhenUpdateExceptionsIsTrue()\n {\n // Step 1. Create new recurring event without attendees.\n // Recurring event with occurrences: 2016-04-25, 2016-05-08, 2016-05-09, 2016-05-22\n $eventData = [\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-25T01:00:00+00:00',\n 'end' => '2016-04-25T02:00:00+00:00',\n 'recurrence' => [\n 'timeZone' => 'UTC',\n 'recurrenceType' => Recurrence::TYPE_WEEKLY,\n 'interval' => 2,\n 'dayOfWeek' => [Recurrence::DAY_SUNDAY, Recurrence::DAY_MONDAY],\n 'startTime' => '2016-04-25T01:00:00+00:00',\n 'occurrences' => 4,\n 'endTime' => '2016-06-10T01:00:00+00:00',\n ],\n 'notifyAttendees' => NotificationManager::ALL_NOTIFICATIONS_STRATEGY\n ];\n\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode($eventData, JSON_THROW_ON_ERROR)\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $recurringEvent */\n $recurringEvent = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 2. Create first exception with cancelled flag for the recurring event.\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode(\n [\n 'isCancelled' => true,\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-09T01:00:00+00:00',\n 'end' => '2016-05-09T02:00:00+00:00',\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-09T01:00:00+00:00',\n ],\n JSON_THROW_ON_ERROR\n )\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $cancelledEventException */\n $cancelledEventException = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 3. Create another exception for the recurring event with different title, description and start time.\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode(\n [\n 'title' => 'Test Recurring Event Changed',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-22T03:00:00+00:00',\n 'end' => '2016-05-22T05:00:00+00:00',\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-22T01:00:00+00:00',\n ],\n JSON_THROW_ON_ERROR\n )\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $changedEventException */\n $changedEventException = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 4. Check the events exposed in the API without cancelled exception and with modified second exception.\n $this->restRequest(\n [\n 'method' => 'GET',\n 'url' => $this->getUrl(\n 'oro_api_get_calendarevents',\n [\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-01T01:00:00+00:00',\n 'end' => '2016-06-01T01:00:00+00:00',\n 'subordinate' => true,\n ]\n ),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key')\n ]\n );\n\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n\n $responseWithExceptions = [\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-25T01:00:00+00:00',\n 'end' => '2016-04-25T02:00:00+00:00',\n ],\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-08T01:00:00+00:00',\n 'end' => '2016-05-08T02:00:00+00:00',\n ],\n [\n 'id' => $changedEventException->getId(),\n 'isCancelled' => false,\n 'title' => 'Test Recurring Event Changed',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-22T01:00:00+00:00',\n 'start' => '2016-05-22T03:00:00+00:00',\n 'end' => '2016-05-22T05:00:00+00:00',\n ],\n ];\n $this->assertResponseEquals($responseWithExceptions, $response, false);\n\n // Step 5. Update recurring event but do not update recurrence pattern updateExceptions flag === true\n $changedEventData = $eventData;\n $changedEventData['start'] = '2016-04-25T01:00:00+00:00';\n $changedEventData['end'] = '2016-04-25T02:00:00+00:00';\n $changedEventData['updateExceptions'] = true;\n $this->restRequest(\n [\n 'method' => 'PUT',\n 'url' => $this->getUrl('oro_api_put_calendarevent', ['id' => $recurringEvent->getId()]),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode($changedEventData, JSON_THROW_ON_ERROR)\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n $this->assertResponseEquals(\n $this->getResponseArray($response),\n $response\n );\n\n // Step 6. Check exceptional event was not removed\n $this->restRequest(\n [\n 'method' => 'GET',\n 'url' => $this->getUrl(\n 'oro_api_get_calendarevents',\n [\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-01T01:00:00+00:00',\n 'end' => '2016-06-01T01:00:00+00:00',\n 'subordinate' => true,\n ]\n ),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key')\n ]\n );\n\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n $this->assertResponseEquals($responseWithExceptions, $response, false);\n\n $this->getEntityManager()->clear();\n $this->assertNotNull(\n $this->getEntity(CalendarEvent::class, $cancelledEventException->getId()),\n 'Failed asserting exception is not removed when not cleared.'\n );\n $this->assertNotNull(\n $this->getEntity(CalendarEvent::class, $changedEventException->getId()),\n 'Failed asserting exception is not removed when not cleared.'\n );\n }", "title": "" }, { "docid": "6964d498ca83038a7e3cd2e1e8598b5c", "score": "0.50603986", "text": "public function testUpdateRecurrenceDataOfRecurringCalendarEventChangesUpdatedAtField()\n {\n // Step 1. Create recurring event and save value of \"updatedAt\" field.\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode(\n [\n 'title' => 'Recurring event',\n 'start' => '2016-10-14T22:00:00+00:00',\n 'end' => '2016-10-14T23:00:00+00:00',\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'allDay' => false,\n 'recurrence' => [\n 'timeZone' => 'UTC',\n 'recurrenceType' => Recurrence::TYPE_DAILY,\n 'interval' => 1,\n 'startTime' => '2016-10-14T22:00:00+00:00',\n 'occurrences' => 4,\n ]\n ],\n JSON_THROW_ON_ERROR\n )\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $newEvent */\n $newEvent = $this->getEntity(CalendarEvent::class, $response['id']);\n $this->assertResponseEquals(\n $this->getResponseArray($response),\n $response\n );\n\n $originalUpdatedAt = $newEvent->getUpdatedAt();\n $this->assertInstanceOf('DateTime', $originalUpdatedAt, 'Failed asserting \"updatedAt\" field was set.');\n\n // Step 2. Wait for 1 second.\n sleep(1);\n\n // Step 3. Update event and change only attribute in recurrence data.\n $this->restRequest(\n [\n 'method' => 'PUT',\n 'url' => $this->getUrl('oro_api_put_calendarevent', ['id' => $newEvent->getId()]),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode(\n [\n 'recurrence' => [\n 'timeZone' => 'UTC',\n 'recurrenceType' => Recurrence::TYPE_DAILY,\n 'interval' => 2,\n 'startTime' => '2016-10-14T22:00:00+00:00',\n 'occurrences' => 4,\n ]\n ],\n JSON_THROW_ON_ERROR\n )\n ]\n );\n $response = $this->getRestResponseContent(['statusCode' => 200, 'contentType' => 'application/json']);\n $this->assertResponseEquals(\n [\n 'uid' => $response['uid'],\n 'invitationStatus' => Attendee::STATUS_NONE,\n 'editableInvitationStatus' => false,\n 'organizerDisplayName' => 'Billy Wilf',\n 'organizerEmail' => '[email protected]',\n 'organizerUserId' => $response['organizerUserId']\n ],\n $response\n );\n\n // Step 4. Get event and check the \"updatedAt\" value has been modified.\n $this->restRequest(\n [\n 'method' => 'GET',\n 'url' => $this->getUrl('oro_api_get_calendarevent', ['id' => $newEvent->getId()]),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key')\n ]\n );\n\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n\n $newUpdatedAt = new \\DateTime($response['updatedAt'], new \\DateTimeZone('UTC'));\n\n $diffInSeconds = $newUpdatedAt->getTimestamp() - $originalUpdatedAt->getTimestamp();\n\n $this->assertGreaterThanOrEqual(1, $diffInSeconds, 'Failed assertic \"updatedAt\" was updated.');\n }", "title": "" }, { "docid": "09056e8e79f834e8c0bffd448ea757fb", "score": "0.50561976", "text": "public function get($uid)\n {\n return $this->request(\n \"GET\",\n \"/recurring/v1/subscription/\" . $uid . \"/\" . $this->epayco->api_key . \"/\",\n $api_key = $this->epayco->api_key,\n $options = null,\n $private_key = $this->epayco->private_key,\n $test = $this->epayco->test,\n $switch = false,\n $lang = $this->epayco->lang\n );\n }", "title": "" }, { "docid": "3d2bdf28907cebf2d2543bf63c2a4dab", "score": "0.50390977", "text": "public function testRemoveRecurringEventRecurrenceDoesntClearExceptionsWhenUpdateExceptionIsFalse()\n {\n // Step 1. Create new recurring event without attendees.\n // Recurring event with occurrences: 2016-04-25, 2016-05-08, 2016-05-09, 2016-05-22\n $eventData = [\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-25T01:00:00+00:00',\n 'end' => '2016-04-25T02:00:00+00:00',\n 'recurrence' => [\n 'timeZone' => 'UTC',\n 'recurrenceType' => Recurrence::TYPE_WEEKLY,\n 'interval' => 2,\n 'dayOfWeek' => [Recurrence::DAY_SUNDAY, Recurrence::DAY_MONDAY],\n 'startTime' => '2016-04-25T01:00:00+00:00',\n 'occurrences' => 4,\n 'endTime' => '2016-06-10T01:00:00+00:00',\n ],\n 'notifyAttendees' => NotificationManager::ALL_NOTIFICATIONS_STRATEGY\n ];\n\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode($eventData, JSON_THROW_ON_ERROR)\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $recurringEvent */\n $recurringEvent = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 2. Create first exception with cancelled flag for the recurring event.\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode(\n [\n 'isCancelled' => true,\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-09T01:00:00+00:00',\n 'end' => '2016-05-09T02:00:00+00:00',\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-09T01:00:00+00:00',\n ],\n JSON_THROW_ON_ERROR\n )\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $cancelledEventException */\n $cancelledEventException = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 3. Create another exception for the recurring event with different title, description and start time.\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode(\n [\n 'title' => 'Test Recurring Event Changed',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-22T03:00:00+00:00',\n 'end' => '2016-05-22T05:00:00+00:00',\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-22T01:00:00+00:00',\n ],\n JSON_THROW_ON_ERROR\n )\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $changedEventException */\n $changedEventException = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 4. Check the events exposed in the API without cancelled exception and with modified second exception.\n $this->restRequest(\n [\n 'method' => 'GET',\n 'url' => $this->getUrl(\n 'oro_api_get_calendarevents',\n [\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-01T01:00:00+00:00',\n 'end' => '2016-06-01T01:00:00+00:00',\n 'subordinate' => true,\n ]\n ),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key')\n ]\n );\n\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n\n $responseWithExceptions = [\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-25T01:00:00+00:00',\n 'end' => '2016-04-25T02:00:00+00:00',\n ],\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-08T01:00:00+00:00',\n 'end' => '2016-05-08T02:00:00+00:00',\n ],\n [\n 'id' => $changedEventException->getId(),\n 'isCancelled' => false,\n 'title' => 'Test Recurring Event Changed',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-22T01:00:00+00:00',\n 'start' => '2016-05-22T03:00:00+00:00',\n 'end' => '2016-05-22T05:00:00+00:00',\n ],\n ];\n $this->assertResponseEquals($responseWithExceptions, $response, false);\n\n // Step 5. Update recurring event remove recurrence, updateExceptions flag === false\n $changedEventData = $eventData;\n $changedEventData['recurrence'] = null;\n $changedEventData['updateExceptions'] = false;\n $this->restRequest(\n [\n 'method' => 'PUT',\n 'url' => $this->getUrl('oro_api_put_calendarevent', ['id' => $recurringEvent->getId()]),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode($changedEventData, JSON_THROW_ON_ERROR)\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n $this->assertResponseEquals(\n $this->getResponseArray($response),\n $response\n );\n\n // Step 6. Check exceptional event was not removed but occurrences were removed.\n $this->restRequest(\n [\n 'method' => 'GET',\n 'url' => $this->getUrl(\n 'oro_api_get_calendarevents',\n [\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-01T01:00:00+00:00',\n 'end' => '2016-06-01T01:00:00+00:00',\n 'subordinate' => true,\n ]\n ),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key')\n ]\n );\n\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n $responseWithNoRecurringEvents = [\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-25T01:00:00+00:00',\n 'end' => '2016-04-25T02:00:00+00:00',\n ],\n [\n 'id' => $cancelledEventException->getId(),\n 'isCancelled' => true,\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-09T01:00:00+00:00',\n 'start' => '2016-05-09T01:00:00+00:00',\n 'end' => '2016-05-09T02:00:00+00:00',\n ],\n [\n 'id' => $changedEventException->getId(),\n 'isCancelled' => false,\n 'title' => 'Test Recurring Event Changed',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-22T01:00:00+00:00',\n 'start' => '2016-05-22T03:00:00+00:00',\n 'end' => '2016-05-22T05:00:00+00:00',\n ],\n ];\n $this->assertResponseEquals($responseWithNoRecurringEvents, $response, false);\n\n $this->getEntityManager()->clear();\n $this->assertNotNull(\n $this->getEntity(CalendarEvent::class, $cancelledEventException->getId()),\n 'Failed asserting exception is not removed when not cleared.'\n );\n $this->assertNotNull(\n $this->getEntity(CalendarEvent::class, $changedEventException->getId()),\n 'Failed asserting exception is not removed when not cleared.'\n );\n }", "title": "" }, { "docid": "928a076d859af480dbe63632da29835f", "score": "0.5019779", "text": "public function testUpdateRecurringEventRecurrenceClearsExceptionsWhenUpdateExceptionsIsTrue()\n {\n // Step 1. Create new recurring event without attendees.\n // Recurring event with occurrences: 2016-04-25, 2016-05-08, 2016-05-09, 2016-05-22\n $eventData = [\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-25T01:00:00+00:00',\n 'end' => '2016-04-25T02:00:00+00:00',\n 'recurrence' => [\n 'timeZone' => 'UTC',\n 'recurrenceType' => Recurrence::TYPE_WEEKLY,\n 'interval' => 2,\n 'dayOfWeek' => [Recurrence::DAY_SUNDAY, Recurrence::DAY_MONDAY],\n 'startTime' => '2016-04-25T01:00:00+00:00',\n 'occurrences' => 4,\n 'endTime' => '2016-06-10T01:00:00+00:00',\n ],\n 'notifyAttendees' => NotificationManager::ALL_NOTIFICATIONS_STRATEGY\n ];\n\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode($eventData, JSON_THROW_ON_ERROR)\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $recurringEvent */\n $recurringEvent = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 2. Create first exception with cancelled flag for the recurring event.\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode(\n [\n 'isCancelled' => true,\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-09T01:00:00+00:00',\n 'end' => '2016-05-09T02:00:00+00:00',\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-09T01:00:00+00:00',\n ],\n JSON_THROW_ON_ERROR\n )\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $cancelledEventException */\n $cancelledEventException = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 3. Create another exception for the recurring event with different title, description and start time.\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode(\n [\n 'title' => 'Test Recurring Event Changed',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-22T03:00:00+00:00',\n 'end' => '2016-05-22T05:00:00+00:00',\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-22T01:00:00+00:00',\n ],\n JSON_THROW_ON_ERROR\n )\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $changedEventException */\n $changedEventException = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 4. Check the events exposed in the API without cancelled exception and with modified second exception.\n $this->restRequest(\n [\n 'method' => 'GET',\n 'url' => $this->getUrl(\n 'oro_api_get_calendarevents',\n [\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-01T01:00:00+00:00',\n 'end' => '2016-06-01T01:00:00+00:00',\n 'subordinate' => true,\n ]\n ),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key')\n ]\n );\n\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n\n $responseWithExceptions = [\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-25T01:00:00+00:00',\n 'end' => '2016-04-25T02:00:00+00:00',\n ],\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-08T01:00:00+00:00',\n 'end' => '2016-05-08T02:00:00+00:00',\n ],\n [\n 'id' => $changedEventException->getId(),\n 'isCancelled' => false,\n 'title' => 'Test Recurring Event Changed',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-22T01:00:00+00:00',\n 'start' => '2016-05-22T03:00:00+00:00',\n 'end' => '2016-05-22T05:00:00+00:00',\n ],\n ];\n $this->assertResponseEquals($responseWithExceptions, $response, false);\n\n // Step 5. Update Recurrence for recurring with updateExceptions flag === true\n $changedEventData = $eventData;\n $changedEventData['recurrence'] = [\n 'timeZone' => 'UTC',\n 'recurrenceType' => Recurrence::TYPE_WEEKLY,\n 'interval' => 2,\n 'dayOfWeek' => [Recurrence::DAY_SUNDAY, Recurrence::DAY_MONDAY],\n 'startTime' => '2016-04-25T01:00:00+00:00',\n 'occurrences' => 3,\n 'endTime' => null,\n ];\n $changedEventData['updateExceptions'] = true;\n $this->restRequest(\n [\n 'method' => 'PUT',\n 'url' => $this->getUrl('oro_api_put_calendarevent', ['id' => $recurringEvent->getId()]),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode($changedEventData, JSON_THROW_ON_ERROR)\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n $this->assertResponseEquals(\n $this->getResponseArray($response),\n $response\n );\n\n // Step 6. Check exceptional event was removed.\n $this->restRequest(\n [\n 'method' => 'GET',\n 'url' => $this->getUrl(\n 'oro_api_get_calendarevents',\n [\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-01T01:00:00+00:00',\n 'end' => '2016-06-01T01:00:00+00:00',\n 'subordinate' => true,\n ]\n ),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key')\n ]\n );\n\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n\n $responseWithClearedExceptions = [\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-25T01:00:00+00:00',\n 'end' => '2016-04-25T02:00:00+00:00',\n ],\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-08T01:00:00+00:00',\n 'end' => '2016-05-08T02:00:00+00:00',\n ],\n [\n 'id' => $recurringEvent->getId(),\n 'isCancelled' => false,\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-09T01:00:00+00:00',\n 'end' => '2016-05-09T02:00:00+00:00',\n ],\n ];\n $this->assertResponseEquals($responseWithClearedExceptions, $response, false);\n\n $this->getEntityManager()->clear();\n $this->assertNull(\n $this->getEntity(CalendarEvent::class, $cancelledEventException->getId()),\n 'Failed asseting exception is removed when cleared.'\n );\n $this->assertNull(\n $this->getEntity(CalendarEvent::class, $changedEventException->getId()),\n 'Failed asseting exception is removed when cleared.'\n );\n }", "title": "" }, { "docid": "7becd0bf180a62c2d17175e2bb449338", "score": "0.50055504", "text": "public function testRemoveRecurringEventRecurrenceClearsExceptionsWhenUpdateExceptionsIsTrue()\n {\n // Step 1. Create new recurring event without attendees.\n // Recurring event with occurrences: 2016-04-25, 2016-05-08, 2016-05-09, 2016-05-22\n $eventData = [\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-25T01:00:00+00:00',\n 'end' => '2016-04-25T02:00:00+00:00',\n 'recurrence' => [\n 'timeZone' => 'UTC',\n 'recurrenceType' => Recurrence::TYPE_WEEKLY,\n 'interval' => 2,\n 'dayOfWeek' => [Recurrence::DAY_SUNDAY, Recurrence::DAY_MONDAY],\n 'startTime' => '2016-04-25T01:00:00+00:00',\n 'occurrences' => 4,\n 'endTime' => '2016-06-10T01:00:00+00:00',\n ],\n 'notifyAttendees' => NotificationManager::ALL_NOTIFICATIONS_STRATEGY\n ];\n\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode($eventData, JSON_THROW_ON_ERROR)\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $recurringEvent */\n $recurringEvent = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 2. Create first exception with cancelled flag for the recurring event.\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode(\n [\n 'isCancelled' => true,\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-09T01:00:00+00:00',\n 'end' => '2016-05-09T02:00:00+00:00',\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-09T01:00:00+00:00',\n ],\n JSON_THROW_ON_ERROR\n )\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $cancelledEventException */\n $cancelledEventException = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 3. Create another exception for the recurring event with different title, description and start time.\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode(\n [\n 'title' => 'Test Recurring Event Changed',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-22T03:00:00+00:00',\n 'end' => '2016-05-22T05:00:00+00:00',\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-22T01:00:00+00:00',\n ],\n JSON_THROW_ON_ERROR\n )\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $changedEventException */\n $changedEventException = $this->getEntity(CalendarEvent::class, $response['id']);\n\n // Step 4. Check the events exposed in the API without cancelled exception and with modified second exception.\n $this->restRequest(\n [\n 'method' => 'GET',\n 'url' => $this->getUrl(\n 'oro_api_get_calendarevents',\n [\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-01T01:00:00+00:00',\n 'end' => '2016-06-01T01:00:00+00:00',\n 'subordinate' => true,\n ]\n ),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key')\n ]\n );\n\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n\n $responseWithExceptions = [\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-25T01:00:00+00:00',\n 'end' => '2016-04-25T02:00:00+00:00',\n ],\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-05-08T01:00:00+00:00',\n 'end' => '2016-05-08T02:00:00+00:00',\n ],\n [\n 'id' => $changedEventException->getId(),\n 'isCancelled' => false,\n 'title' => 'Test Recurring Event Changed',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'recurringEventId' => $recurringEvent->getId(),\n 'originalStart' => '2016-05-22T01:00:00+00:00',\n 'start' => '2016-05-22T03:00:00+00:00',\n 'end' => '2016-05-22T05:00:00+00:00',\n ],\n ];\n $this->assertResponseEquals($responseWithExceptions, $response, false);\n\n // Step 5. Update recurring event, remove recurrence, updateExceptions flag === true.\n $changedEventData = $eventData;\n $changedEventData['recurrence'] = null;\n $changedEventData['updateExceptions'] = true;\n $this->restRequest(\n [\n 'method' => 'PUT',\n 'url' => $this->getUrl('oro_api_put_calendarevent', ['id' => $recurringEvent->getId()]),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'content' => json_encode($changedEventData, JSON_THROW_ON_ERROR)\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n $this->assertResponseEquals(\n $this->getResponseArray($response),\n $response\n );\n\n // Step 6. Check exceptional event was removed and occurrences were removed.\n $this->restRequest(\n [\n 'method' => 'GET',\n 'url' => $this->getUrl(\n 'oro_api_get_calendarevents',\n [\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-01T01:00:00+00:00',\n 'end' => '2016-06-01T01:00:00+00:00',\n 'subordinate' => true,\n ]\n ),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key')\n ]\n );\n\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n $responseWithNoRecurringEvents = [\n [\n 'id' => $recurringEvent->getId(),\n 'title' => 'Test Recurring Event',\n 'description' => 'Test Recurring Event Description',\n 'allDay' => false,\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'start' => '2016-04-25T01:00:00+00:00',\n 'end' => '2016-04-25T02:00:00+00:00',\n ],\n ];\n $this->assertResponseEquals($responseWithNoRecurringEvents, $response, false);\n\n $this->getEntityManager()->clear();\n $this->assertNull(\n $this->getEntity(CalendarEvent::class, $cancelledEventException->getId()),\n 'Failed asserting exception is removed when cleared.'\n );\n $this->assertNull(\n $this->getEntity(CalendarEvent::class, $changedEventException->getId()),\n 'Failed asserting exception is removed when cleared.'\n );\n }", "title": "" }, { "docid": "189add2e6596e34bc45e4886ac8aa26b", "score": "0.49985206", "text": "public function eventSingleAction()\n {\n $id = $this->params('id');\n $slug = $this->params('slug');\n // Get\n if (!empty($slug)) {\n $singleEvent = Pi::api('event', 'event')->getEventSingle($slug, 'slug');\n } elseif (!empty($id)) {\n $singleEvent = Pi::api('event', 'event')->getEventSingle($id);\n } else {\n return false;\n }\n\n // Set text_summary\n $singleEvent['text_summary'] = Pi::service('markup')->render($singleEvent['text_summary'], 'html', 'html');\n $singleEvent['text_summary'] = strip_tags($singleEvent['text_summary'], \"<b><strong><i><p><br><ul><li><ol><h2><h3><h4>\");\n $singleEvent['text_summary'] = str_replace(\"<p>&nbsp;</p>\", \"\", $singleEvent['text_summary']);\n // Set text_description\n $singleEvent['text_description'] = Pi::service('markup')->render($singleEvent['text_description'], 'html', 'html');\n $singleEvent['text_description'] = strip_tags($singleEvent['text_description'], \"<b><strong><i><p><br><ul><li><ol><h2><h3><h4>\");\n $singleEvent['text_description'] = str_replace(\"<p>&nbsp;</p>\", \"\", $singleEvent['text_description']);\n\n // Set register_details\n $singleEvent['register_details'] = Pi::service('markup')->render($singleEvent['register_details'], 'html', 'html');\n $singleEvent['register_details'] = strip_tags($singleEvent['register_details'], \"<b><strong><i><p><br><ul><li><ol><h2><h3><h4>\");\n $singleEvent['register_details'] = str_replace(\"<p>&nbsp;</p>\", \"\", $singleEvent['register_details']);\n // Set time\n if (!empty($singleEvent['time_start']) && !empty($singleEvent['time_end'])) {\n $singleEvent['time_view'] = sprintf('%s %s %s %s', _b('From'), $singleEvent['time_start_view'], _b('to'), $singleEvent['time_end_view']);\n } elseif (!empty($singleEvent['time_start'])) {\n $singleEvent['time_view'] = $singleEvent['time_start_view'];\n }\n\n // Set event\n $event = [];\n $event[] = [\n 'id' => $singleEvent['id'],\n 'title' => $singleEvent['title'],\n 'text_summary' => $singleEvent['text_summary'],\n 'text_description' => $singleEvent['text_description'],\n 'register_details' => $singleEvent['register_details'],\n 'time_update' => $singleEvent['time_update'],\n 'time_start' => $singleEvent['time_start'],\n 'time_end' => $singleEvent['time_end'],\n 'time_view' => $singleEvent['time_view'],\n 'hits' => $singleEvent['hits'],\n 'recommended' => $singleEvent['recommended'],\n 'favourite' => $singleEvent['favourite'],\n 'largeUrl' => $singleEvent['largeUrl'],\n 'mediumUrl' => $singleEvent['mediumUrl'],\n 'thumbUrl' => $singleEvent['thumbUrl'],\n 'image' => $singleEvent['image'],\n 'eventUrl' => $singleEvent['eventUrl'],\n 'source_url' => $singleEvent['source_url'],\n 'organizer_name' => $singleEvent['organizer_name'],\n 'address' => $singleEvent['address'],\n 'offer_url' => $singleEvent['offer_url'],\n 'price' => isset($singleEvent['register_price_view']) ? $singleEvent['register_price_view'] : $singleEvent['price_view'],\n 'subtitle' => $singleEvent['subtitle'],\n 'register_price' => $singleEvent['register_price'],\n 'register_price_view' => $singleEvent['register_price_view'],\n 'price_currency' => $singleEvent['price_currency'],\n 'originalUrl' => isset($singleEvent['originalUrl']) ? $singleEvent['originalUrl'] : '',\n ];\n\n return $event;\n }", "title": "" }, { "docid": "a4ae2b643cf9930a3bf295919a8855ab", "score": "0.4995576", "text": "public function post_events($data=array()) {\n return $this->post(sprintf(\"/events/\"), $data=$data);\n}", "title": "" }, { "docid": "28216dbc89bc0bfbcb8217338e46c7ab", "score": "0.49892542", "text": "public function getEventOn($date) {\n\t\t$morninghour = Zend_Registry::get('config')->morninghour;\n\t\t$fromStart = $date->copyPart(null);\n\t\t$fromStart->setTime('00:00:00')->addHour($morninghour);\n\t\t$fromEnd = $fromStart->copyPart(null);\n\t\t$fromEnd->addDay(1);\n\n\t\t$db = Denkmal_Db::get();\n\t\t$id = $db->fetchOne('SELECT id\n\t\t\t\t\t\t\t\tFROM event e\n\t\t\t\t\t\t\t\tWHERE e.locationId=?\n\t\t\t\t\t\t\t\t\tAND e.from > ?\n\t\t\t\t\t\t\t\t\tAND e.from <= ?'\n\t\t\t, array($this->getId(), $fromStart->toString('y-MM-dd HH:mm:ss'), $fromEnd->toString('y-MM-dd HH:mm:ss')));\n\t\tif ($id) {\n\t\t\trequire_once 'Event.php';\n\t\t\treturn new Event($id);\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "d5bbeea781106d238162728f64e1d98b", "score": "0.49816334", "text": "public function get_cron(Request $request)\n {\n\t\t$id = $request->id;\n\t\t$record = \\DB::table('cron_manager')->where('id',$id)->first();\n\t\treturn response()->json(['success' => true, 'record' => $record]);\n\t}", "title": "" }, { "docid": "852b92421c53e566be86eca620505458", "score": "0.4974066", "text": "public function post_event($id, $data=array()) {\n return $this->post(sprintf(\"/events/%s/\", $id), $data=$data);\n}", "title": "" }, { "docid": "311d4593ad6c4c66ddaba5ddc3b3ea91", "score": "0.49662006", "text": "public static function recurrence_instance_identifier($event, $allday = null)\n {\n $instance_date = !empty($event['recurrence_date']) ? $event['recurrence_date'] : $event['start'];\n\n if ($instance_date instanceof DateTime) {\n // According to RFC5545 (3.8.4.4) RECURRENCE-ID format should\n // be date/date-time depending on the main event type, not the exception\n if ($allday === null) {\n $allday = !empty($event['allday']);\n }\n\n return $instance_date->format($allday ? 'Ymd' : 'Ymd\\THis');\n }\n }", "title": "" }, { "docid": "7682a5a7990e1c7db03c767a90fd519b", "score": "0.4960961", "text": "public function readCalendarEvent($id) {\n\t\t$model = $this->readObject ( $id, 'event' );\n\t\t$model->url = $this->cfg->wwwroot . '/calendar/view.php?view=day&course=1&time=' . $model->timestart . '#event_' . $model->id;\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "817a0edf36d0a2ec57023f91b5e40773", "score": "0.49591497", "text": "public function getNextEvent()\n {\n return $this->_em->createQuery('SELECT e from SFBCNWebsiteBundle:Event e WHERE e.datetime > :datetime ORDER BY e.datetime ASC')\n ->setMaxResults(1)\n ->setParameter('datetime', new \\DateTime())\n ->getSingleResult();\n }", "title": "" }, { "docid": "41e1df69b9bc9ca3ede009d36238aad6", "score": "0.49525693", "text": "function changeEventAgenda($event, $newAgenda)\n{\n $oRestClient = new \\CRestClient();\n // $ret = $GLOBALS['free.ini']['retries'];\n // while ($ret >= 0) {\n $result = $oRestClient->updateEvent(\n 'json', # $p_sMode, \n false, # $p_bSecure, \n $event->id, # $p_sEventID, \n $newAgenda, # $p_sAgendaID, \n $event->service_id, # $p_sServiceID, \n $event->start_date, # $p_dStart_Date, \n $event->end_date, # $p_dEndDate, \n $oRestClient->renderMinutes($event->start_time), # $p_iStartTime, \n $oRestClient->renderMinutes($event->end_time), # $p_iEndTime, \n \"\", # $p_sTitle = \"\", \n \"\", # $p_sDescription = \"\", \n \"\" , # $p_sEventSynchroID = \"\", \n \"\", # $p_sAgendaSynchroID = \"\", \n \"\", # $p_sServiceSynchroID = \"\", \n false # $p_bSendNotification = false\n );\n \n $oresult = json_decode($result);\n if($oresult->event->status == \"true\"){\n return true;\n }\n else\n {\n error_log(\"Error from bookitit: \" . $oresult->events->id . \" \". $oresult->events->message);\n $ret--;\n }\n // }\n throw new \\Exception(\"Error updating event $event->id for date $event->start_date.\");\n}", "title": "" }, { "docid": "17373f092ad74c454edf36fe99ee8127", "score": "0.49519414", "text": "public function getEvents(Request $request)\n {\n $venue_id = $request->venueId;\n $fechas_no_disponibles = $this->datesNotAvailability($venue_id);\n $eventos = array();\n $clave = 0;\n\n $events = Event::where('venue_id', $venue_id)\n ->where('type', 1) //[1: evento, 2:fecha bloqueada]\n ->select('title', 'start_date', 'byday', 'freq')\n ->get();\n\n foreach ($events as $key => $event) {\n $rrule = new RRule([\n 'FREQ' => $event->freq,\n 'INTERVAL' => 1,\n 'DTSTART' => $event->start_date,\n 'BYDAY' => json_decode($event->byday),\n 'UNTIL' => date('Y-m-d H:i:s', strtotime('+1 years', strtotime($event->start_date)))\n ]);\n\n foreach ($rrule as $key => $occurrence) {\n $inicio = $occurrence->format('Y/m/d H:i:s');\n\n if (! in_array($inicio, $fechas_no_disponibles)) {\n $eventos[$clave]['title'] = $event->title;\n $eventos[$clave]['start'] = $inicio;\n $eventos[$clave]['end'] = date('Y/m/d H:i:s', strtotime('+1 hours', strtotime($inicio)));\n\n ++$clave;\n }\n\n }\n\n }\n\n return response()->json($eventos);\n }", "title": "" }, { "docid": "877a14108518a6b691a90cbdb0c4daae", "score": "0.49363905", "text": "public function requestRecurringContract($data)\n {\n $required = ['username', 'password', 'merchantAccount', 'shopperReference'];\n if (!$this->validateRequired($required, $data)) {\n return false;\n }\n\n //generate api_client request\n $request = [\n 'action' => 'Recurring.listRecurringDetails',\n 'recurringDetailsRequest.merchantAccount' => $data['merchantAccount'],\n 'recurringDetailsRequest.shopperReference' => $data['shopperReference'],\n 'recurringDetailsRequest.recurring.contract' => 'RECURRING',\n ];\n\n //make request\n try {\n $response = $this->curl->setCredentials($data['username'], $data['password'])\n ->post($this->urls[$this->environment]['modification_rest'], $request);\n } catch (\\RuntimeException $e) {\n return false;\n }\n\n $result = $response->getData();\n\n //parse result\n if ($result === false || strpos($result, 'recurringDetailReference') === false) {\n $this->error_msg = $response->getError();\n return false;\n }\n\n $response = [];\n parse_str($result, $response);\n return $response;\n }", "title": "" }, { "docid": "1f5c1394ac948f985d78e4145b2926a1", "score": "0.49192584", "text": "public function expiring()\n {\n $params = ['type' => 'res_get_expiring'];\n\n $transaction = $this->transaction($params);\n\n return $this->process($transaction);\n }", "title": "" }, { "docid": "a0f89f7a9b5b3f527a2a569b1ee7d7e5", "score": "0.49027035", "text": "function deleteEvent($eventId){\n $oRestClient = new \\CRestClient();\n $result = $oRestClient->deleteEvent('json',false,$eventId);\n\n $oresult = json_decode($result);\n if($oresult->event->status == \"true\"){\n return true;\n }\n else {\n error_log(\"Error from bookitit: \" . $oresult->event->id . \" \". $oresult->event->message);\n throw new \\Exception(\"Error deleting date $eventId\");\n }\n\n}", "title": "" }, { "docid": "c9be3ef18cd5c82008a271882d5637f3", "score": "0.4902163", "text": "public function query_for_latest_event() {\n\t\t\t$event_query = new WSAL_Models_OccurrenceQuery();\n\t\t\t// order by creation.\n\t\t\t$event_query->addOrderBy( 'created_on', true );\n\t\t\t// only request 1 item.\n\t\t\t$event_query->setLimit( 1 );\n\t\t\treturn $event_query;\n\t\t}", "title": "" }, { "docid": "fb408a087f512f0c186235f2161fac3e", "score": "0.4893421", "text": "public function getCalendarEvent() {\n\t\treturn $this->success($this->repo->getCalendarEvent());\n\t}", "title": "" }, { "docid": "37a37d8d425c974e28f0422e2589ef8f", "score": "0.48705593", "text": "private function get_recurrence_on() {\n\t\treturn json_decode($this->model->get_recurrence_on(), true);\n\t}", "title": "" }, { "docid": "5d1c3df7ce9ab43dc80f3d90bbc0a791", "score": "0.48693728", "text": "function get_event($id) {\n\t\t$result = $this->get_item($id);\n\n\t\t$xml = $result['xml'];\n\t\t$data = $result['data'];\n\n\t\t// Crummy way of getting the display location\n\t\t$data['display_location'] = (string) $xml->locationInfos->locationInfo['locationName'];\n\n\t\t// Date info\n\t\t$data['display_date'] = (string) $xml['displayDate'];\n\t\t$data['start_date'] = (string) $xml->dateRanges->dateRange['startDate'];\n\t\t$data['end_date'] = (string) $xml->dateRanges->dateRange['endDate'];\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "7c8743d4570bae63f141751a1e53744a", "score": "0.48659512", "text": "function event_get($event_CID){\n\tglobal $contenttypes;\n\n\t// Get the relevant table\n\t$tablename=$contenttypes['event']['table'];\n\n\t// Get the event from the DB\n\t$items['query']\t=\"SELECT * FROM `$tablename` WHERE `cid` = '$event_CID';\";\n\t$items['result']=data_query($items['query']);\n\n\t// Return the result as-is\n\treturn $items['result'];\n}", "title": "" }, { "docid": "86166e307c47e01c39d717c72cb3f6ad", "score": "0.4857067", "text": "function getEvent() {\n\tglobal $db;\n\n\t$query = \"SELECT * FROM Event WHERE 1=1\";\n\tif (isset($_GET['idEvent'])) {\n\t\t$query .= \" AND idEvent = \" . $_GET['idEvent'];\n\t}\n\tif (isset($_GET['name'])) {\n\t\t$query .= \" AND name LIKE '%\" . $_GET['name'] . \"%'\";\n\t}\n\tif (isset($_GET['type'])) {\n\t\t$query .= \" AND type = \" . $_GET['type'];\n\t}\n\n\t$stmt = $db->prepare($query);\n\t$stmt->execute(); \n\t$events = $stmt->fetchAll();\n\n\t/* Content-Type must be defined, otherwise the output is seen as plain text */\n\theader(\"Content-Type: application/json\");\n\techo json_encode($events);\n}", "title": "" }, { "docid": "4b5ae1b23e385d555ee6f745b4543411", "score": "0.48433092", "text": "public function updateRecurringPayment();", "title": "" }, { "docid": "345ef1a53442adf98b16f17249ec5922", "score": "0.48359832", "text": "public function my_events(Request $request){\n\n $request_data = (array)json_decode($request->getContent(), true);\n if (array_key_exists('lang_id', $request_data)) {\n Helpers::Set_locale($request_data['lang_id']);\n }\n $user = User::where('api_token','=',$request->header('access-token'))->first();\n\n if(!$user){\n return Helpers::Get_Response(403, 'error', trans('messages.worng_token'),[], []);\n\n }\n $events = $user->events()\n ->with('prices.currency','categories','hash_tags','media')\n ->get();\n return Helpers::Get_Response(200,'success','',[],$events);\n }", "title": "" }, { "docid": "4382b01c8ea25cbd4cbaaa33fe00f006", "score": "0.4822753", "text": "public function calendarShowEvent()\n\t{\n\t\t//-----------------------------------------\n\t\t// Init\n\t\t//-----------------------------------------\n\t\t\n\t\t$event_id\t= intval($this->request['event_id']);\n\n\t\tif( !$event_id )\n\t\t{\n\t\t\t$this->registry->output->showError( 'calendar_event_not_found', 10429, null, null, 404 );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get the event data\n\t\t//-----------------------------------------\n\t\t\n\t\t$_joins\t= array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'select'\t=> 'm.*',\n\t\t\t\t\t\t\t'from'\t\t=> array( 'members' => 'm' ),\n\t\t\t\t\t\t\t'where'\t\t=> 'm.member_id=e.event_member_id',\n\t\t\t\t\t\t\t'type'\t\t=> 'left',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'select'\t=> 'pp.*',\n\t\t\t\t\t\t\t'from'\t\t=> array( 'profile_portal' => 'pp' ),\n\t\t\t\t\t\t\t'where'\t\t=> 'm.member_id=pp.pp_member_id',\n\t\t\t\t\t\t\t'type'\t\t=> 'left',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\tif ( $this->settings['reputation_enabled'] )\n\t\t{\n\t\t\t$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/class_reputation_cache.php', 'classReputationCache' );\n\t\t\t$this->registry->setClass( 'repCache', new $classToLoad() );\n\t\t\t\n\t\t\t$_joins[]\t= $this->registry->getClass('repCache')->getTotalRatingJoin( 'event_id', $event_id, 'calendar' );\n\t\t\t$_joins[]\t= $this->registry->getClass('repCache')->getUserHasRatedJoin( 'event_id', $event_id, 'calendar' );\n\t\t}\n\n\t\t$event\t= $this->DB->buildAndFetch( array( 'select' => 'e.*', 'from' => array( 'cal_events' => 'e' ), 'where' => 'e.event_id=' . $event_id, 'add_join' => $_joins ) );\n\n\t\tif ( !$event['event_id'] )\n\t\t{\n\t\t\t$this->registry->output->showError( 'calendar_event_not_found', 10430, null, null, 404 );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Reset calendar\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->calendar\t= $this->functions->getCalendar( $event['event_calendar_id'] );\n\t\t\n\t\tif( $this->calendar['cal_id'] != $event['event_calendar_id'] )\n\t\t{\n\t\t\t$this->registry->output->showError( 'cal_no_perm', 1040.22, null, null, 403 );\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Check permissions\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $event['event_private'] AND $this->memberData['member_id'] != $event['event_member_id'] )\n\t\t{\n\t\t\t$this->registry->output->showError( 'calendar_event_not_found', 10431, null, null, 403 );\n\t\t}\n\n\t\tif( !$this->memberData['g_is_supmod'] AND !$event['event_approved'] )\n\t\t{\n\t\t\t$this->registry->output->showError( 'calendar_event_not_found', 10432.1, null, null, 404 );\n\t\t}\n\n\t\tif( $event['event_perms'] != '*' )\n\t\t{\n\t\t\t$permissionGroups\t= explode( ',', IPSText::cleanPermString( $event['event_perms'] ) );\n\t\t\t\n\t\t\tif( !IPSMember::isInGroup( $this->memberData, $permissionGroups ) )\n\t\t\t{\n\t\t\t\t$this->registry->output->showError( 'calendar_event_not_found', 10432, null, null, 404 );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Are we RSVPing?\n\t\t//-----------------------------------------\n\n\t\tif( $this->request['_rsvp'] AND $event['event_rsvp'] )\n\t\t{\n\t\t\tif( $this->registry->permissions->check( 'rsvp', $this->calendar ) AND $this->memberData['member_id'] )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Make sure we aren't already RSVPed\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$_check\t= $this->DB->buildAndFetch( array( 'select' => 'rsvp_id', 'from' => 'cal_event_rsvp', 'where' => 'rsvp_event_id=' . $event['event_id'] . ' AND rsvp_member_id=' . $this->memberData['member_id'] ) );\n\t\t\t\t\n\t\t\t\tif( !$_check['rsvp_id'] )\n\t\t\t\t{\n\t\t\t\t\t$_insert\t= array(\n\t\t\t\t\t\t\t\t\t\t'rsvp_event_id'\t\t=> $event['event_id'],\n\t\t\t\t\t\t\t\t\t\t'rsvp_member_id'\t=> $this->memberData['member_id'],\n\t\t\t\t\t\t\t\t\t\t'rsvp_date'\t\t\t=> time(),\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t$this->DB->insert( 'cal_event_rsvp', $_insert );\n\t\t\t\t\t\n\t\t\t\t\t$this->registry->output->redirectScreen( $this->lang->words['rsvp_saved_im'], $this->settings['base_url'] . \"app=calendar&amp;module=calendar&amp;section=view&amp;do=showevent&amp;event_id=\" . $event['event_id'], $event['event_title_seo'], 'cal_event' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Comments class\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( IPS_ROOT_PATH . 'sources/classes/comments/bootstrap.php' );/*noLibHook*/\n\t\t$this->_comments = classes_comments_bootstrap::controller( 'calendar-events' );\n\t\t\n\t\t$comments = array( 'html' => $this->_comments->fetchFormatted( $event, array( 'offset' => intval( $this->request['st'] ) ) ),\n\t\t\t\t\t\t 'count' => $this->_comments->count( $event ),\n\t\t\t\t\t\t );\n\n\t\t//-----------------------------------------\n\t\t// Highlight...\n\t\t//-----------------------------------------\n\n\t\tif ( $this->request['hl'] )\n\t\t{\n\t\t\t$event['event_content']\t= IPSText::searchHighlight( $event['event_content'], $this->request['hl'] );\n\t\t\t$event['event_title']\t= IPSText::searchHighlight( $event['event_title'], $this->request['hl'] );\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Can we report?\n\t\t//-----------------------------------------\n\n\t\t$classToLoad\t= IPSLib::loadLibrary( IPSLib::getAppDir('core') . '/sources/classes/reportLibrary.php', 'reportLibrary', 'core' );\n\t\t$reports\t\t= new $classToLoad( $this->registry );\n\t\t\n\t\t$event['_canReport']\t= $reports->canReport( 'calendar' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Output\n\t\t//-----------------------------------------\n\t\t\n\t\t$member\t= IPSMember::load( $event['event_member_id'], 'all' );\n\n\t\t$this->registry->output->addNavigation( $this->calendar['cal_title'] , \"app=calendar&amp;module=calendar&amp;section=view&amp;cal_id={$this->calendar['cal_id']}\", $this->calendar['cal_title_seo'], 'cal_calendar' );\n\n\t\t//-----------------------------------------\n\t\t// Try to match out and improve navigation\n\t\t//-----------------------------------------\n\n\t\t$_referrer\t= $_SERVER['HTTP_REFERER'];\n\n\t\tif( $_referrer )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Came from add form?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif( preg_match( \"#/add$#\", $_referrer ) )\n\t\t\t{\n\t\t\t\t$_data\t\t= $this->calendarMakeEventHTML( $event, true );\n\t\t\t\t$_dateBits\t= explode( '-', gmstrftime( '%Y-%m-%d-%B', $_data['event']['_start_time'] ) );\n\t\t\t\t$this->registry->output->addNavigation( $_dateBits[3] . ' ' . $_dateBits[0], \"app=calendar&amp;module=calendar&amp;section=view&amp;cal_id={$this->calendar['cal_id']}&amp;m={$_dateBits[1]}&amp;y={$_dateBits[0]}\", $this->calendar['cal_title_seo'], 'cal_month' );\n\t\t\t\t$this->registry->output->addNavigation( $_dateBits[3] . ' ' . $_dateBits[2] . ', ' . $_dateBits[0], \"app=calendar&amp;module=calendar&amp;section=view&amp;cal_id={$this->calendar['cal_id']}&amp;do=showday&amp;y={$_dateBits[0]}&amp;m={$_dateBits[1]}&amp;d={$_dateBits[2]}\", $this->calendar['cal_title_seo'], 'cal_day' );\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Came from a day view?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\telse if( preg_match( \"#/day\\-(\\d{4})\\-(\\d{1,2})\\-(\\d{1,2})$#i\", $_referrer, $matches ) )\n\t\t\t{\n\t\t\t\t$_dateBits\t= explode( '-', gmstrftime( '%Y-%m-%d-%B', gmmktime( 0, 0, 0, $matches[2], $matches[3], $matches[1] ) ) );\n\t\t\t\t$this->registry->output->addNavigation( $_dateBits[3] . ' ' . $_dateBits[0], \"app=calendar&amp;module=calendar&amp;section=view&amp;cal_id={$this->calendar['cal_id']}&amp;m={$_dateBits[1]}&amp;y={$_dateBits[0]}\", $this->calendar['cal_title_seo'], 'cal_month' );\n\t\t\t\t$this->registry->output->addNavigation( $_dateBits[3] . ' ' . $_dateBits[2] . ', ' . $_dateBits[0], \"app=calendar&amp;module=calendar&amp;section=view&amp;cal_id={$this->calendar['cal_id']}&amp;do=showday&amp;y={$_dateBits[0]}&amp;m={$_dateBits[1]}&amp;d={$_dateBits[2]}\", $this->calendar['cal_title_seo'], 'cal_day' );\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// How about a week view?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\telse if( preg_match( \"#/week\\-(\\d+?)$#i\", $_referrer, $matches ) )\n\t\t\t{\n\t\t\t\t$_dateBits\t= explode( '-', gmstrftime( '%Y-%m-%d-%B', $matches[1] ) );\n\t\t\t\t$this->registry->output->addNavigation( $_dateBits[3] . ' ' . $_dateBits[0], \"app=calendar&amp;module=calendar&amp;section=view&amp;cal_id={$this->calendar['cal_id']}&amp;m={$_dateBits[1]}&amp;y={$_dateBits[0]}\", $this->calendar['cal_title_seo'], 'cal_month' );\n\t\t\t\t$this->registry->output->addNavigation( \"{$this->lang->words['week_beginning']} \" . gmstrftime( '%B %d, %Y', $matches[1] ), \"app=calendar&amp;module=calendar&amp;section=view&amp;cal_id={$this->calendar['cal_id']}&amp;do=showweek&amp;week={$matches[1]}\", $this->calendar['cal_title_seo'], 'cal_week' );\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// Or a month view?\n\t\t\t//-----------------------------------------\n\n\t\t\telse if( preg_match( \"#/(\\d{1,2})\\-(\\d{4})$#i\", $_referrer, $matches ) )\n\t\t\t{\n\t\t\t\t$_dateBits\t= explode( '-', gmstrftime( '%Y-%m-%d-%B', gmmktime( 0, 0, 0, $matches[1], 15, $matches[2] ) ) );\n\t\t\t\t$this->registry->output->addNavigation( $_dateBits[3] . \" \" . $_dateBits[0], \"app=calendar&amp;module=calendar&amp;section=view&amp;cal_id={$this->calendar['cal_id']}&amp;m={$_dateBits[1]}&amp;y={$_dateBits[0]}\", $this->calendar['cal_title_seo'], 'cal_month' );\n\t\t\t}\n\t\t\telse if( preg_match( \"#/(\\d+?)\\-(.+?)$#i\", $_referrer, $matches ) )\n\t\t\t{\n\t\t\t\t$_data\t\t= $this->calendarMakeEventHTML( $event, true );\n\t\t\t\t$_dateBits\t= explode( '-', gmstrftime( '%Y-%m-%d-%B', $_data['event']['_start_time'] ) );\n\t\t\t\t$this->registry->output->addNavigation( $_dateBits[3] . \" \" . $_dateBits[0], \"app=calendar&amp;module=calendar&amp;section=view&amp;cal_id={$this->calendar['cal_id']}&amp;m={$_dateBits[1]}&amp;y={$_dateBits[0]}\", $this->calendar['cal_title_seo'], 'cal_month' );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Finish output\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->registry->output->addNavigation( $event['event_title'] );\n\t\t$this->registry->output->addMetaTag( 'keywords', $this->chosen_date['month_name'] . ' ' . $_dateBits[2] . ' events event calendar ' . $event['event_title'] . ' ' . IPSText::getTextClass( 'bbcode' )->stripAllTags( $event['event_content'] ), TRUE );\n\t\t$this->registry->output->addMetaTag( 'description', str_replace( \"\\n\", \" \", str_replace( \"\\r\", \"\", IPSText::getTextClass( 'bbcode' )->stripAllTags( $event['event_content'] ) ) ), FALSE, 155 );\n\t\t$this->registry->output->addToDocumentHead( 'raw', \"<link rel='up' href='\" . $this->registry->output->buildSEOUrl( 'app=calendar&amp;module=calendar&amp;section=view&amp;cal_id=' . $event['event_calendar_id'], 'publicNoSession', $this->calendar['cal_title_seo'], 'cal_calendar' ) . \"' />\" );\n\t\t$this->registry->output->addToDocumentHead( 'raw', \"<link rel='author' href='\" . $this->registry->output->buildSEOUrl( 'showuser=' . $event['event_member_id'], 'publicNoSession', $member['members_seo_name'], 'showuser' ) . \"' />\" );\n\t\t$this->registry->getClass('output')->addCanonicalTag( 'app=calendar&amp;module=calendar&amp;section=view&amp;do=showevent&amp;event_id=' . $event['event_id'], $event['event_title_seo'], 'cal_event' );\n\n\t\t$this->page_title\t= $event['event_title'];\n\t\t$this->output\t\t.= $this->registry->output->getTemplate( 'calendar' )->calendarShowEvent( $this->calendarMakeEventHTML( $event ), $comments );\n }", "title": "" }, { "docid": "a5b7b1608cb28be69015dea075acf210", "score": "0.48106325", "text": "public function ConferenceRetrievedEvent($xml)\n {\n try {\n $conferenceParticipantList = [];\n $confParticipantList = $xml->eventData->conference->conferenceParticipantList->conferenceParticipant;\n\n foreach ($confParticipantList as $participant) {\n $callId = (string)$participant->callId;\n array_push($conferenceParticipantList, ['callId' => $callId]);\n }\n\n $ConferenceRetrievedEvent = [\n 'eventType' => (string)'ConferenceRetrievedEvent',\n 'eventID' => (string)$xml->eventID,\n 'sequenceNumber' => (int)$xml->sequenceNumber,\n 'subscriptionId' => (string)$xml->subscriptionId,\n 'targetId' => (string)$xml->targetId,\n 'state' => (string)$xml->eventData->conference->state,\n 'addressOfRecord' => (string)$xml->eventData->conference->endpoint->addressOfRecord,\n 'appearance' => (int)$xml->eventData->conference->appearance,\n 'conferenceParticipantList' => $conferenceParticipantList\n ];\n // $this->bsUser->SetHookState((string)$xml->targetId, (string)$xml->eventData->call->state); // is enkel een status voor conf calls\n event(new AdvancedCallEvent($ConferenceRetrievedEvent));\n return $ConferenceRetrievedEvent;\n } catch (\\Exception $e) {\n Log::error($e);\n event(new ErrorEvent(['error' => (string)$e]));\n return ('can not parse event: ConferenceRetrievedEvent');\n }\n }", "title": "" }, { "docid": "680a001d5b7a10ac6267749f4f70b884", "score": "0.48075718", "text": "public function createEvent(Request $request): Event;", "title": "" }, { "docid": "dd06040f60a5a8fc5642d84806220d13", "score": "0.4795315", "text": "function questionnaire_set_events($questionnaire) {\n // Adding the questionnaire to the eventtable.\n global $DB;\n if ($events = $DB->get_records('event', array('modulename' => 'questionnaire', 'instance' => $questionnaire->id))) {\n foreach ($events as $event) {\n $event = calendar_event::load($event);\n $event->delete();\n }\n }\n\n // The open-event.\n $event = new stdClass;\n $event->description = $questionnaire->name;\n $event->courseid = $questionnaire->course;\n $event->groupid = 0;\n $event->userid = 0;\n $event->modulename = 'questionnaire';\n $event->instance = $questionnaire->id;\n $event->eventtype = 'open';\n $event->timestart = $questionnaire->opendate;\n $event->visible = instance_is_visible('questionnaire', $questionnaire);\n $event->timeduration = ($questionnaire->closedate - $questionnaire->opendate);\n\n if ($questionnaire->closedate && $questionnaire->opendate && ($event->timeduration <= QUESTIONNAIRE_MAX_EVENT_LENGTH)) {\n // Single event for the whole questionnaire.\n $event->name = $questionnaire->name;\n calendar_event::create($event);\n } else {\n // Separate start and end events.\n $event->timeduration = 0;\n if ($questionnaire->opendate) {\n $event->name = $questionnaire->name.' ('.get_string('questionnaireopens', 'questionnaire').')';\n calendar_event::create($event);\n unset($event->id); // So we can use the same object for the close event.\n }\n if ($questionnaire->closedate) {\n $event->name = $questionnaire->name.' ('.get_string('questionnairecloses', 'questionnaire').')';\n $event->timestart = $questionnaire->closedate;\n $event->eventtype = 'close';\n calendar_event::create($event);\n }\n }\n}", "title": "" }, { "docid": "27ec5a53821607c6945bd65de6a2f17e", "score": "0.47916052", "text": "public function index()\n {\n $resp = $this->client->get(config('app.api_base_url').'event');\n\n return json_decode($resp->getBody(), true);\n }", "title": "" }, { "docid": "30f5c152d02ecd5215130333c2587b8d", "score": "0.47834274", "text": "public function detail(){\n $id = $this->security->xss_clean($this->uri->segment(3,0));\n\n $this->db->where('id',$id);\n $query = $this->db->get('events');\n\n if($query->num_rows() == 1){\n // event found\n\n // upcoming events\n $this->db->where('date >=',time());\n $this->db->where('id !=',$id);\n $this->db->limit(2);\n $upComingQuery = $this->db->get('events');\n if($upComingQuery->num_rows() > 0){\n $data['related'] = $upComingQuery->result();\n }\n else{\n $data['related'] = array();\n }\n\n $this->db->where('type','event');\n $categoryQuery = $this->db->get('categories');\n if($categoryQuery->num_rows() > 0){\n $data['categories'] = $categoryQuery->result();\n }\n else{\n $data['categories'] = array();\n }\n\n // event\n $events = $query->result();\n $data['event'] = $events[0];\n return $this->load->view('single-event.php',$data);\n }\n else{\n // event not found\n show_404('page');\n }\n }", "title": "" }, { "docid": "7f4eab097e8e5a16fdb973b8a209ef7a", "score": "0.47811934", "text": "function attendee_schedule( $type=null ){\n\n global $current_user;\n get_currentuserinfo();\n\n // Derive $attendee_id\n $user = get_query_var('term');\n $term = get_term_by('slug', $user, 'attendees' );\n\n if ( ! $term )\n return;\n\n $attendee_id = $term->term_id;\n\n $args = array(\n 'posts_per_page' => -1,\n 'post_type' => 'events',\n 'post_status' => 'publish',\n 'orderby' => 'meta_value',\n 'meta_key' => 'bmx_re_start_date',\n 'order' => 'ASC',\n 'tax_query' => array(\n array(\n 'taxonomy' => 'attendees',\n 'field' => 'id',\n 'terms' => $attendee_id\n )\n )\n );\n\n $attending = new WP_Query( $args );\n\n return $attending;\n}", "title": "" }, { "docid": "44b5c38011c9f1f984a41b0434f17041", "score": "0.47804162", "text": "public function findEvent($id);", "title": "" }, { "docid": "2b655c95d4ef99d926f93d4824a6c272", "score": "0.4772994", "text": "public function entry()\r\n {\r\n return $this->sendGetMessage( $this->baseUrl .'/api/v8/time_entries' );\r\n }", "title": "" }, { "docid": "fc79b1e812ab9d124b4dcce549452da8", "score": "0.4767011", "text": "function index(){\n $initialDate = (new \\DateTime())->sub(new \\DateInterval('P2D'))->format('Y-m-d\\TH:i:sO');\n $calendarId = 'primary';\n $optParams = array(\n 'maxResults' => 10,\n 'orderBy' => 'startTime',\n 'singleEvents' => true,\n 'timeMin' => $initialDate,\n );\n \n $results = $this->service->events->listEvents($calendarId, $optParams);\n \n $events = array();\n if (!empty($results->getItems())) {\n foreach ($results->getItems() as $event) {\n $start = $event->start->dateTime;\n $end = $event->end->dateTime;\n if (empty($start)) {\n $start = $event->start->date;\n }\n $novo = new Calourada(\n $event->getSummary(),\n $event->getDescription(),\n $start,\n $end,\n $event->getLocation());\n array_push($events, $novo);\n }\n }\n\n $response = new ApiResponse($events);\n return json_encode($response);\n }", "title": "" }, { "docid": "25b171b0303137ea5f924cc51b6618b7", "score": "0.47613955", "text": "public function onScheduleGenerated($event)\n {\n dispatch(new SendScheduleGeneratedNotification($event->newSchedule))->delay(now()->addSeconds(1));\n }", "title": "" }, { "docid": "728f01202ba8aade64263ec51efe4842", "score": "0.47602323", "text": "public function sendReminders($sub) {\n global $module;\n\n //sanity check that the subsetting matches the stored portalConfig;\n if ($sub != $this->portalConfig->subSettingID) {\n $module->emError(\"Wrong subsetting received while sending Reminders from cron\");\n }\n\n $candidates = $this->getInviteReminderCandidates();\n\n if (empty($candidates)) {\n $module->emLog(\"No candidates to send reminders for project: \" . $this->project_id . \" today: \" . date('Y-m-d'));\n return;\n }\n\n //check that reminderLag is set\n if (!isset($this->portalConfig->reminderLag)) {\n $module->emError('Attempting to send reminders, but reminderLag is not set in the config');\n return null;\n }\n\n //calculate the target day\n $lagged_day = new DateTime();\n $lagged_day->sub(new DateInterval('P' . $this->portalConfig->reminderLag . 'D'));\n $lagged_str = $lagged_day->format('Y-m-d');\n\n\n foreach ($candidates as $candidate) {\n\n //check that today is a valid reminder day\n $valid_day = $this->checkIfDateValid($candidate[$this->portalConfig->startDateField], $this->portalConfig->reminderValidDayArray, $lagged_str);\n $module->emDebug(\"ID: \" .$candidate[REDCap::getRecordIdField()] . \" / VALID DAY NUMBER: \".$valid_day);\n\n //Need repeat_instance for piping\n $repeat_instance = $candidate['redcap_repeat_instance'];\n\n //$module->emDebug($valid_day, $valid_day == null, isset($valid_day)); exit;\n //$module->emDebug($candidate[$this->portalConfig->personalHashField], $this->portalConfig->personalHashField);\n\n if (isset($valid_day)) {\n //if ($valid_day != null) {\n //check that the valid_day is in the original valid_day_array\n if (!in_array($valid_day, $this->portalConfig->validDayArray)) {\n $module->emError(\"Attempting to send reminder on a day not set as a Valid Day Number. Day: $valid_day / Valid Day Numbers : \".\n $this->portalConfig->validDayNumber);\n continue;\n }\n\n //create a Participant object for the candidate and get the survey_status array\n try {\n $participant = new Participant($this->portalConfig, $candidate[$this->portalConfig->personalHashField]);\n } catch (Exception $e) {\n $module->emError($e);\n continue;\n }\n\n //check that the portal is not disabled\n if ( $participant->getParticipantPortalDisabled()) {\n $module->emDebug(\"Participant portal disabled for \". $participant->getParticipantID());\n continue;\n }\n\n //check that the survey has not already been completed\n if ($participant->isSurveyComplete($lagged_day)) {\n $module->emDebug(\"Participant # \".$participant->getParticipantID().\": Survey for $valid_day is already complete. Don't send the reminder for today\");\n continue;\n }\n\n //send a reminder email\n $survey_link = $candidate[$this->portalConfig->personalUrlField] . \"&d=\" . $valid_day;\n //$module->emDebug($survey_link, $candidate[$this->portalConfig->disableParticipantEmailField . \"___1\"], $candidate[$this->portalConfig->emailField]);\n\n //send invite to email OR SMS\n\n if (($candidate[$this->portalConfig->disableParticipantEmailField . \"___1\"] <> '1') &&\n ($candidate[$this->portalConfig->emailField] <> '')) {\n\n $module->emDebug(\"Sending email reminder to \" . $candidate[REDCap::getRecordIdField()]);\n //$module->emDebug();\n\n $msg = $this->formatEmailMessage(\n $this->portalConfig->reminderEmailText,\n $survey_link,\n $this->portalConfig->reminderUrlLabel);\n\n //send email\n\n $send_status = $this->sendEmail(\n $candidate[REDCap::getRecordIdField()],\n $candidate[$this->portalConfig->emailField],\n $this->portalConfig->reminderEmailFrom,\n $this->portalConfig->reminderEmailSubject,\n $msg,\n $this->portalConfig->surveyEventID,\n $repeat_instance);\n\n REDCap::logEvent(\n \"Email Reminder Sent from Survey Portal EM\", //action\n \"Reminder email sent to \" . $candidate[$this->portalConfig->emailField] . \" for day_number \" . $valid_day . \" with status \" .$send_status, //changes\n NULL, //sql optional\n $participant->getParticipantID(), //record optional\n $this->portalConfig->surveyEventName, //event optional\n $this->project_id //project ID optional\n );\n\n\n }\n\n if (($candidate[$this->portalConfig->disableParticipantSMSField . \"___1\"] <> '1') &&\n ($candidate[$this->portalConfig->phoneField] <> '')) {\n $module->emDebug(\"Sending text reminder to \" . $candidate[REDCap::getRecordIdField()]);\n //TODO: implement text sending of URL\n $msg = $this->formatTextMessage($this->portalConfig->reminderSMSText,\n $survey_link,\n $candidate[REDCap::getRecordIdField()],\n $this->portalConfig->surveyEventID,\n $repeat_instance\n );\n\n //$sms_status = $this->sms_messager->sendText($candidate[$phone_field], $msg);\n //$twilio_status = $text_manager->sendSms($candidate[$phone_field], $msg);\n $twilio_status = $module->emText($candidate[$this->portalConfig->phoneField], $msg);\n\n if ($twilio_status !== true) {\n $module->emError(\"TWILIO Failed to send to \" . $candidate[$this->portalConfig->phoneField] . \" with status \" . $twilio_status);\n REDCap::logEvent(\n \"Text Reminder Failed to send from Survey Portal EM\", //action\n \"Text failed to send to \" . $candidate[$this->portalConfig->phoneField] . \" with status \" . $twilio_status . \" for day_number \" . $valid_day , //changes\n NULL, //sql optional\n $participant->getParticipantID(), //record optional\n $this->portalConfig->surveyEventName, //event optional\n $this->project_id //project ID optional\n );\n } else {\n REDCap::logEvent(\n \"Text Reminder Sent from Survey Portal EM\", //action\n \"Reminder text sent to \" . $candidate[$this->portalConfig->phoneField], //changes\n NULL, //sql optional\n $participant->getParticipantID(), //record optional\n $this->portalConfig->surveyEventName, //event optional\n $this->project_id //project ID optional\n );\n }\n }\n }\n }\n }", "title": "" }, { "docid": "799a8bb98b63657a767a5330ce2ec46a", "score": "0.47600323", "text": "function kn_pubsubrequest($request = \"\", $statusHandler = \"\")\n {\n global $kn;\n return $kn->pubsubrequest($request, $statusHandler);\n }", "title": "" }, { "docid": "311906fc0d1ccde73c4d9e3864cd1ac0", "score": "0.47549716", "text": "public function getEvent($name) {\n\t\tif(array_key_exists($name, $this->events)) {\n\t\t\treturn $this->events[$name];\n\t\t}\n\t}", "title": "" }, { "docid": "35a4d95c23bebfbacbe84db5131da35f", "score": "0.47516778", "text": "public function getCurrentRunningEvent()\n\t{\n\t\t//Get the event\n\t\t$userId = $this->userId; //so we can put it in the query string\n\t\t$currentEventQuery = \"SELECT events.id, activity_id, start_time, activities.name AS activity_name FROM events JOIN activities ON events.activity_id = activities.id WHERE events.user_id = $userId AND end_time IS NULL\";\n\t\t$result = $this->query($currentEventQuery);\n\t\t\n\t\t//Check to see that there is only one event\n\t\tif(mysql_num_rows($result) > 1)\n\t\t\t$this->error(\"Uh oh, there is more than one open event!\");\n\t\t\n\t\t//No open events\n\t\t//return null\n\t\tif(mysql_num_rows($result) == 0)\n\t\t\treturn null;\n\t\t\t\n\t\t//Otherwise return the event\n\t\treturn new Event(mysql_fetch_array($result));\n\t}", "title": "" }, { "docid": "9493fb8f1f8e1ba3fcbb699faed81773", "score": "0.47512385", "text": "public function requestAppointmentForUser(User $user);", "title": "" }, { "docid": "312cde20917e995020d65239e8a6b9ec", "score": "0.47500876", "text": "public function testCreateRecurring() {\n /** @var \\Drupal\\commerce_order\\Entity\\LineItemInterface $order_line_item */\n $order_line_item = $this->createEntity('commerce_line_item', [\n 'type' => 'product_variation',\n ]);\n /** @var \\Drupal\\commerce_order\\Entity\\OrderInterface $order */\n $order = $this->createEntity('commerce_order', [\n 'type' => 'default',\n 'mail' => $this->loggedInUser->getEmail(),\n 'line_items' => [$order_line_item],\n ]);\n /** @var \\Drupal\\commerce_order\\Entity\\LineItemInterface $recurring_line_item */\n $recurring_line_item = $this->createEntity('commerce_line_item', [\n 'type' => 'product_variation',\n ]);\n /** @var \\Drupal\\commerce_recurring\\Entity\\RecurringInterface $recurring */\n $recurring = $this->createEntity('commerce_recurring', [\n 'type' => 'default',\n 'mail' => $this->loggedInUser->getEmail(),\n 'line_items' => [$recurring_line_item],\n 'recurring_orders' => [$order],\n ]);\n\n $recurring_exists = (bool) Recurring::load($recurring->id());\n $this->assertTrue($recurring_exists, 'The new recurring has been created in the database.');\n $this->assertEquals($recurring->id(), $recurring->getRecurringNumber(), 'The recurring number matches the recurring ID');\n\n $recurring_line_item_exists = (bool) LineItem::load($recurring_line_item->id());\n $this->assertTrue($recurring_line_item_exists, 'The matching recurring line item has been created in the database.');\n\n $order_exists = (bool) Order::load($order->id());\n $this->assertTrue($order_exists, 'The new order has been created in the database.');\n\n $order_line_item_exists = (bool) LineItem::load($order_line_item->id());\n $this->assertTrue($order_line_item_exists, 'The matching order line item has been created in the database.');\n }", "title": "" }, { "docid": "b49272e194d8c1b97f210a4c02fcec56", "score": "0.4748576", "text": "public function fired_event_lookup( $id ) {\n // $this->output->enable_profiler(true);\n $id = $this->uri->segment(3, 0);\n // echo \"<br>id: \" . $id . \"<br>\";\n if( $id == 0 ) {\n $this->output\n ->set_content_type('application/json')\n ->set_output(json_encode( [ \"response\" => [ \"error\" => \"id is required.\" ] ] ));\n // exit;\n }\n else {\n // $this->output->enable_profiler(true);\n $res = $this->eventfacade->search_fired_event($id);\n\n $this->output\n ->set_content_type('application/json')\n ->set_output(json_encode([\"response\" => [\"event\" => $res]]));\n }\n // echo 'hi';\n }", "title": "" }, { "docid": "ab6b0302120cab403a50c6957909e81d", "score": "0.47470716", "text": "function get_repeat_dates()\r\n{\r\n global $phpbb_root_path, $phpEx, $user, $auth;\r\n\r\n // Start session management\r\n $user->session_begin(false);\r\n $auth->acl($user->data);\r\n $user->add_lang('mods/calendar');\r\n\r\n include_once($phpbb_root_path . 'includes/functions_calendar.' . $phpEx);\r\n\r\n if($_GET['event_repeat'] == 1)\r\n {\r\n include_once($phpbb_root_path . 'common.' . $phpEx);\r\n\r\n if(!isset($_GET['container']))\r\n {\r\n die('No container specified');\r\n }\r\n\r\n $times = validate_event_times(true);\r\n\r\n if($times['valid'] == true)\r\n {\r\n $repeat_params = validate_repeat_params(true, true);\r\n if($repeat_params['valid'] == true)\r\n {\r\n $repeat_info = generate_repeat_event_info(0, $times['start'], $times['end'], $repeat_params['repeat_code']);\r\n $return_array['data'] = $repeat_info['list'];\r\n }\r\n else\r\n {\r\n $return_array['data'] = implode('<br />', $repeat_params['error']);\r\n }\r\n }\r\n else\r\n {\r\n $return_array['data'] = implode('<br />', $times['error']);\r\n }\r\n\r\n $return_array['mode'] = 'update_field'; // So the client side handler knows what to do\r\n $return_array['container'] = request_var('container', '');\r\n\r\n\r\n // We don't actually echo anything out here. The outputs are handled in sgp_ajax.php\r\n return $return_array;\r\n }\r\n}", "title": "" }, { "docid": "800f12fb36c408a78d71ba5876bc744d", "score": "0.4745279", "text": "public function getEvent()\n {\n return $this->get(self::EVENT);\n }", "title": "" }, { "docid": "c3316404fadf7beb142585a80b06c543", "score": "0.47445711", "text": "public function event($event_id)\n\t{\n\t\t$event = Event::find(intval($event_id));\n\n\t\tif (!$event) {\n\t\t\tthrow new Exception(\"Event with event ID = $event_id does not exist\", 1);\n\t\t}\n\n\t\treturn $event;\n\t}", "title": "" }, { "docid": "7c52eaf64cceeba018b4b109d3220189", "score": "0.47438306", "text": "public function testValidEventId()\n {\n $response = $this->call('GET','api/events',array(\"id\"=>1));\n\n $this->assertEquals(200,$response->status());\n }", "title": "" }, { "docid": "9679285a811794ab56fad4b432abf498", "score": "0.47411475", "text": "public function toggle_recurring_events() {\n\t\t$current_status = tribe_get_option( 'recurring_events_are_hidden', false );\n\t\tif ( $current_status == 'hidden' && $this->recurring ) {\n\t\t\t$this->restore_hidden_events();\n\t\t\ttribe_update_option( 'recurring_events_are_hidden', 'exposed' );\n\t\t} elseif ( $current_status == 'exposed' && ! $this->recurring ) {\n\t\t\t$this->hide_recurring_events();\n\t\t\ttribe_update_option( 'recurring_events_are_hidden', 'hidden' );\n\t\t} elseif ( ! $current_status ) {\n\t\t\ttribe_update_option( 'recurring_events_are_hidden', ( $this->recurring ? 'exposed' : 'hidden' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "9f11a28c5a15a2564d4eb60b47c9bb62", "score": "0.47400928", "text": "public function get_event_question($id, $question_id, $expand=array()) {\n return $this->get(sprintf(\"/events/%s/questions/%s/\", $id, $question_id), $expand=$expand);\n}", "title": "" }, { "docid": "2a263afd950febbe49fce690dd1be46f", "score": "0.4737521", "text": "function getByContactID( $eventID ){}", "title": "" }, { "docid": "dfd748644012b4bfea5047a71eccec8b", "score": "0.47329232", "text": "function wf_crm_get_events($reg_options, $context) {\n $ret = [];\n $format = wf_crm_aval($reg_options, 'title_display', 'title');\n $params = [\n 'is_template' => 0,\n 'is_active' => 1,\n ];\n $event_types = array_filter((array) $reg_options['event_type'], \"is_numeric\");\n if ($event_types) {\n $params['event_type_id'] = ['IN' => $event_types];\n }\n if (is_numeric(wf_crm_aval($reg_options, 'show_public_events'))) {\n $params['is_public'] = $reg_options['show_public_events'];\n }\n $params['options'] = ['sort' => 'start_date' . ($context == 'config_form' ? ' DESC' : '')];\n $values = wf_crm_apivalues('Event', 'get', $params);\n // 'now' means only current events, 1 means show all past events, other values are relative date strings\n $date_past = wf_crm_aval($reg_options, 'show_past_events', 'now');\n if ($date_past != '1') {\n $date_past = date('Y-m-d H:i:s', strtotime($date_past));\n foreach ($values as $key => $value) {\n if (isset($value['end_date']) && $value['end_date'] <= $date_past) {\n unset($values[$key]);\n }\n }\n }\n // 'now' means only past events, 1 means show all future events, other values are relative date strings\n $date_future = wf_crm_aval($reg_options, 'show_future_events', '1');\n if ($date_future != '1') {\n $date_future = date('Y-m-d H:i:s', strtotime($date_future));\n foreach ($values as $key => $value) {\n if (isset($value['end_date']) && $value['end_date'] >= $date_future) {\n unset($values[$key]);\n }\n }\n }\n foreach ($values as $value) {\n $ret[$value['id'] . '-' . $value['event_type_id']] = wf_crm_format_event($value, $format);\n }\n return $ret;\n}", "title": "" }, { "docid": "9a936467b7967d374d8982827efabc53", "score": "0.4726488", "text": "function build_cal_url( $event )\n{ \n $event_time = DateTime::createFromFormat('Y-m-d\\TH:i:s\\Z', \n $event->time);\n $start_time = $event_time->format('Ymd\\THis\\Z');\n // Assume event is two hours long...\n $event_time->add(new DateInterval('PT2H'));\n $end_time = $event_time->format('Ymd\\THis\\Z');\n \n $location = '';\n \n if (property_exists($event, 'venue') && $event->venue != NULL ):\n $location .= $event->venue->name . ', ';\n $location .= $event->venue->address . ', ';\n $location .= $event->venue->city . ', ';\n $location .= $event->venue->state;\n endif;\n \n $calendar_url = \"http://www.google.com/calendar/event?action=TEMPLATE&\";\n $calendar_url .= 'text=' . urlencode($event->event_name) . '&';\n $calendar_url .= \"dates=$start_time/$end_time&\";\n $calendar_url .= 'details=' . urlencode( strip_tags( $event->description )) . '&';\n $calendar_url .= 'location=' . urlencode( $location ) . '&';\n $calendar_url .= \"trp=false&\";\n \n return $calendar_url;\n}", "title": "" }, { "docid": "46207b16e5ffa038fe6b5f48b2b4f497", "score": "0.47219616", "text": "public function test_every_thursday_june_july_august_forever() {\n global $DB;\n\n // Change our event's date to the first Thursday of June in the current year at 9am US/Eastern time.\n $firstthursdayofjune = new DateTime('first Thursday of June');\n $startdatetime = $this->change_event_startdate($firstthursdayofjune->format('Ymd\\T090000'), 'US/Eastern');\n\n $startdate = new DateTime($startdatetime->format('Y-m-d'));\n\n $offset = $startdatetime->diff($startdate, true);\n\n $interval = new DateInterval('P1Y');\n\n $rrule = 'FREQ=YEARLY;BYDAY=TH;BYMONTH=6,7,8';\n $mang = new rrule_manager($rrule);\n $mang->parse_rrule();\n $mang->create_events($this->event);\n\n // Get the first 100 samples. This should be enough to verify that we have generated the recurring events correctly.\n $records = $DB->get_records('event', ['repeatid' => $this->event->id], 'timestart ASC', 'id, repeatid, timestart', 0, 100);\n\n $untildate = new DateTime();\n $untildate->add(new DateInterval('P' . $mang::TIME_UNLIMITED_YEARS . 'Y'));\n $untiltimestamp = $untildate->getTimestamp();\n\n $expecteddate = new DateTime(date('Y-m-d H:i:s', $startdatetime->getTimestamp()));\n $september1st = new DateTime('September 1');\n foreach ($records as $record) {\n $this->assertLessThanOrEqual($untiltimestamp, $record->timestart);\n $this->assertEquals($expecteddate->format('Y-m-d H:i:s'), date('Y-m-d H:i:s', $record->timestart));\n\n // Go to next period.\n $expecteddate->modify('next Thursday');\n if ($expecteddate->getTimestamp() >= $september1st->getTimestamp()) {\n $expecteddate->add($interval);\n $expecteddate->modify('June 1');\n if ($expecteddate->format('l') !== rrule_manager::DAY_THURSDAY) {\n $expecteddate->modify('next Thursday');\n }\n $september1st->add($interval);\n }\n $expecteddate->add($offset);\n }\n }", "title": "" }, { "docid": "f380ebfe01fa22e3a827484e5c86234c", "score": "0.4715935", "text": "function deleteEventWithID($id, $webID, $mbox) {\r\n\tglobal $store;\r\n\t\t\r\n\t$delete = '\r\n\tPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\r\n\tPREFIX pb: <http://ld2sd.deri.org/pb/ns#> .\r\n\t\r\n\tDELETE FROM <' . $webID . '> \r\n\t{\r\n\t\t<http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id .'> a pb:RDForm ;\r\n\t\t\t\t\t\t\t\t\t\tpb:field <http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.eventid> ;\r\n\t\t\t\t\t\t\t\t\t\tpb:field <http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.title> ;\r\n\t\t\t\t\t\t\t\t\t\tpb:field <http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.starttime> ;\r\n\t\t\t\t\t\t\t\t\t\tpb:field <http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.endtime> ;\r\n\t\t\t\t\t\t\t\t\t\tpb:field <http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.location> .\r\n\t\t<http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.eventid> pb:key <http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.eventid.key> ; \r\n\t\t\t\t\t\t\t\t\t\t pb:value <http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.eventid.value> .\r\n\t\t<http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.eventid.key> rdf:value \"ID\" .\r\n\t\t<http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.eventid.value> rdf:value \"' . $id . '\" .\r\n\t\t<http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.title> pb:key <http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.title.key> ; \r\n\t\t\t\t\t\t\t\t\t\t pb:value <http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.title.value> .\r\n\t\t<http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.title.key> rdf:value \"Title\" .\r\n\t\t<http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.title.value> rdf:value ?summary . \r\n\t\t<http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.starttime> pb:key <http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.starttime.key> ; \r\n\t\t\t\t\t\t\t\t\t\t pb:value <http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.starttime.value> .\r\n\t\t<http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.starttime.key> rdf:value \"Start time\" .\r\n\t\t<http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.starttime.value> rdf:value ?starttime .\r\n\t\t<http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.endtime> pb:key <http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.endtime.key> ; \r\n\t\t\t\t\t\t\t\t\t\t pb:value <http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.endtime.value> .\r\n\t\t<http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.endtime.key> rdf:value \"End time\" .\r\n\t\t<http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.endtime.value> rdf:value ?endtime .\r\n\t\t<http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.location> pb:key <http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.location.key> ; \r\n\t\t\t\t\t\t\t\t\t\t pb:value <http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.location.value> .\r\n\t\t<http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.location.key> rdf:value \"Location\" .\r\n\t\t<http://ld2sd.deri.org/pushback/rdforms/calendar.html#calendarForm/mbox=' . $mbox . '/id=' . $id . '.location.value> rdf:value ?location .\t\t \t\r\n\t}';\r\n\t\r\n\t$store->query($delete);\r\n}", "title": "" }, { "docid": "c39c015ee0d3b1de93038f82189405fc", "score": "0.47148106", "text": "public function CallRetrievedEvent($xml)\n {\n try {\n if (isset($xml->eventData->call->acdCallInfo->callingPartyInfo->name)) {\n $callingPartyInfoName = (string)$xml->eventData->call->acdCallInfo->callingPartyInfo->name;\n }\n if (isset($xml->eventData->call->acdCallInfo->acdNumber)) {\n $acdNumber = (string)$xml->eventData->call->acdCallInfo->acdNumber;\n }\n if (isset($xml->eventData->call->acdCallInfo->acdName)) {\n $acdName = (string)$xml->eventData->call->acdCallInfo->acdName;\n }\n if (isset($xml->eventData->call->acdCallInfo->callingPartyInfo->address)) {\n $callingPartyInfoAddress = (string)$xml->eventData->call->acdCallInfo->callingPartyInfo->address;\n }\n if (isset($xml->eventData->call->acdCallInfo->callingPartyInfo->callType)) {\n $callingPartyInfoCallType = (string)$xml->eventData->call->acdCallInfo->callingPartyInfo->callType;\n }\n $CallRetrievedEvent = [\n 'eventType' => (string)'CallRetrievedEvent',\n 'eventID' => (string)$xml->eventID,\n 'sequenceNumber' => (int)$xml->sequenceNumber,\n 'subscriptionId' => (string)$xml->subscriptionId,\n 'targetId' => (string)$xml->targetId,\n 'callId' => (string)$xml->eventData->call->callId,\n 'extTrackingId' => (string)$xml->eventData->call->extTrackingId,\n 'personality' => (string)$xml->eventData->call->personality,\n 'state' => (string)$xml->eventData->call->state,\n 'remotePartyName' => (string)$xml->eventData->call->remoteParty->name,\n 'remotePartyAddress' => (string)$xml->eventData->call->remoteParty->address,\n 'remotePartyUserId' => (string)$xml->eventData->call->remoteParty->userId,\n 'remotePartyUserDN' => (string)$xml->eventData->call->remoteParty->userDN,\n 'remotePartycallType' => (string)$xml->eventData->call->remoteParty->callType,\n 'addressOfRecord' => (string)$xml->eventData->call->endpoint->addressOfRecord,\n 'appearance' => (int)$xml->eventData->call->appearance,\n 'startTime' => (int)$xml->eventData->call->startTime,\n 'answerTime' => (int)$xml->eventData->call->answerTime,\n 'totalHeldTime' => (int)$xml->eventData->call->totalHeldTime,\n 'acdUserId' => (string)$xml->eventData->call->acdCallInfo->acdUserId,\n 'acdName' => $acdName ?? '',\n 'acdNumber' => $acdNumber ?? '',\n 'numCallsInQueue' => (int)$xml->eventData->call->acdCallInfo->numCallsInQueue,\n 'waitTime' => (int)$xml->eventData->call->acdCallInfo->waitTime,\n 'callingPartyInfoName' => $callingPartyInfoName ?? '',\n 'callingPartyInfoAddress' => $callingPartyInfoAddress ?? '',\n 'callingPartyInfoCallType' => $callingPartyInfoCallType ?? '',\n 'allowedRecordingControls' => (string)$xml->eventData->call->allowedRecordingControls,\n 'recordingState' => (string)$xml->eventData->call->recordingState\n ];\n // $this->bsUser->SetHookState((string)$xml->targetId, (string)$xml->eventData->call->state);\n event(new AdvancedCallEvent($CallRetrievedEvent));\n return $CallRetrievedEvent;\n } catch (\\Exception $e) {\n Log::error($e);\n event(new ErrorEvent(['error' => (string)$e]));\n return ('can not parse event: CallRetrievedEvent');\n }\n }", "title": "" }, { "docid": "86881025cea5cd4434cff6869c488cda", "score": "0.47147483", "text": "public function getEventById()\n {\n \t$ajax_data = array();\n \t$post = $this->request->request->all();\n \t$event_id = $post['event_id'];\n \t$unit_id = $post['unit_id'];\n $user_timezone = $this->user_session->getUserTimeZone();\n\n\t\tif (($unit_info = $this->vehicle_logic->getVehicleInfo($unit_id)) !== false) {\n\t\t\tif (! empty($unit_info['db'])) {\n\t\t if (($row = $this->vehicle_logic->getEventById($unit_id, $unit_info['db'], $event_id)) !== false) {\n\t\t $row['unit_id'] = $unit_id;\n\t\t \t$row['unitname'] = $unit_info['unitname'];\n\t\t\t \t$row['formatted_address'] = $this->address_logic->validateAddress($row['streetaddress'], $row['city'], $row['state'], '', $row['country']);\n \t\t \t$row['display_servertime'] = Date::locale_to_locale(date('Y-m-d H:i:s'), SERVER_TIMEZONE, $user_timezone, 'h:i A m/d/Y');\n \t\t \t$row['display_unittime'] = Date::utc_to_locale($row['unittime'], $user_timezone, 'h:i A m/d/Y');\n\n\t\t\t \t$unit_info['eventdata'] = $row;\n\t\t\t \t$ajax_data['code'] = 0;\n\t\t\t \t$ajax_data['message'] = 'Success';\n\t\t\t \t$ajax_data['data'] = $unit_info;\n\t\t } else {\n\t\t \t$ajax_data['code'] = 1;\n\t\t\t $ajax_data['message'] = 'Error';\n\t\t }\n\t } else {\n\t $ajax_data['code'] = 1;\n\t $ajax_data['message'] = 'Error';\n\t }\n } else {\n\t $ajax_data['code'] = 1;\n\t $ajax_data['message'] = 'Error';\n }\n\n $this->ajax_respond($ajax_data);\n }", "title": "" }, { "docid": "d1d84ecd55e9ef3da5594ec6cd34b544", "score": "0.47128797", "text": "public function testGetEvents()\n {\n $client = static::createClient();\n\n $path = '/events';\n\n $crawler = $client->request('GET', $path);\n }", "title": "" }, { "docid": "2c26e9f045ba6b0a87851e1ee79f8ddb", "score": "0.47097832", "text": "public function test_daily_events() {\n global $DB;\n\n $rrule = 'FREQ=DAILY;COUNT=3'; // This should generate 2 child events + 1 parent.\n $mang = new rrule_manager($rrule);\n $mang->parse_rrule();\n $mang->create_events($this->event);\n $count = $DB->count_records('event', array('repeatid' => $this->event->id));\n $this->assertEquals(3, $count);\n $result = $DB->record_exists('event', array('repeatid' => $this->event->id,\n 'timestart' => ($this->event->timestart + DAYSECS)));\n $this->assertTrue($result);\n $result = $DB->record_exists('event', array('repeatid' => $this->event->id,\n 'timestart' => ($this->event->timestart + 2 * DAYSECS)));\n $this->assertTrue($result);\n\n $until = $this->event->timestart + DAYSECS * 2;\n $until = date('Y-m-d', $until);\n $rrule = \"FREQ=DAILY;UNTIL=$until\"; // This should generate 1 child event + 1 parent,since by then until bound would be hit.\n $mang = new rrule_manager($rrule);\n $mang->parse_rrule();\n $mang->create_events($this->event);\n $count = $DB->count_records('event', array('repeatid' => $this->event->id));\n $this->assertEquals(2, $count);\n $result = $DB->record_exists('event', array('repeatid' => $this->event->id,\n 'timestart' => ($this->event->timestart + DAYSECS)));\n $this->assertTrue($result);\n\n $rrule = 'FREQ=DAILY;COUNT=3;INTERVAL=3'; // This should generate 2 child events + 1 parent, every 3rd day.\n $mang = new rrule_manager($rrule);\n $mang->parse_rrule();\n $mang->create_events($this->event);\n $count = $DB->count_records('event', array('repeatid' => $this->event->id));\n $this->assertEquals(3, $count);\n $result = $DB->record_exists('event', array('repeatid' => $this->event->id,\n 'timestart' => ($this->event->timestart + 3 * DAYSECS)));\n $this->assertTrue($result);\n $result = $DB->record_exists('event', array('repeatid' => $this->event->id,\n 'timestart' => ($this->event->timestart + 6 * DAYSECS)));\n $this->assertTrue($result);\n }", "title": "" }, { "docid": "c95255908cf1d1d683131724aa0096a8", "score": "0.47052777", "text": "public function index()\n {\n // $event = new Event;\n\n // $event->name = 'A new event';\n // $event->startDateTime = Carbon\\Carbon::now();\n // $event->endDateTime = Carbon\\Carbon::now()->addHour();\n // $event->addAttendee(['email' => '[email protected]']);\n // $event->addAttendee(['email' => '[email protected]']);\n\n // $event->save();\n\n // get all future events on a calendar\n \n\n // update existing event\n // $firstEvent = $events->first();\n // $firstEvent->name = 'updated name';\n // $firstEvent->save();\n\n // $firstEvent->update(['name' => 'updated again']);\n\n // // create a new event\n // Event::create([\n // 'name' => 'A new event',\n // 'startDateTime' => Carbon\\Carbon::now(),\n // 'endDateTime' => Carbon\\Carbon::now()->addHour(),\n // ]);\n\n // // delete an event\n // $event->delete();\n // dd($events);\n\n //Gets events from google calendar\n // $events = Event::get();\n\n //Gets events from Database\n $eventPending = DB::table('event')\n // ->join('reserve_venue','event.reservation_id','=','reserve_venue.reservation_id')\n ->join('event_status_ref', 'event.status', '=', 'event_status_ref.status_id')\n ->select('*')\n ->where('event.status', '<', '2')\n ->get();\n\n $eventApproved = DB::table('event')\n // ->join('reserve_venue','event.reservation_id','=','reserve_venue.reservation_id')\n ->join('event_status_ref', 'event.status', '=', 'event_status_ref.status_id')\n ->select('*')\n ->where('event.status', '>', '1')\n ->get();\n\n $date = Carbon::now();\n // dd($date);\n\n // $check = (Carbon::parse($date)->gt($event[0]->event_start));\n $upcomingPendingEvents = array();\n $upcomingApprovedEvents = array();\n\n foreach($eventPending as $i){\n if(Carbon::parse($i->event_start)->format('Y-m-d') >= $date->subDay()->format('Y-m-d')){\n array_push($upcomingPendingEvents, $i);\n }\n }\n\n foreach($eventApproved as $b){\n if(Carbon::parse($b->event_start)->format('Y-m-d') >= $date->subDay()->format('Y-m-d')){\n array_push($upcomingApprovedEvents, $b);\n }\n }\n // dd($eventEndString);\n\n return view('eventsDash', ['pendingEvents' => $upcomingPendingEvents, 'events' => $upcomingApprovedEvents]);\n // return view('eventsDash');\n }", "title": "" }, { "docid": "1b4269af5d39c9e1549ab1f6d39192da", "score": "0.4703641", "text": "public function run() {\n\t\t$this->appInstance->RTEPClient->client->request(array(\n\t\t\t'op' => 'event',\n\t\t\t'event' => array(\n\t\t\t\t'name' => 'testEvent',\n\t\t\t\t'somevar' => 'somevalue... ',\n\t\t\t)\n\t\t));\n\n\t\techo 'OK';\n\t}", "title": "" }, { "docid": "00e45685171e23dbe54bb6a9836fb3d3", "score": "0.46987605", "text": "public function event_lookup( $id ) {\n // $this->output->enable_profiler(true);\n $id = $this->uri->segment(3, 0);\n // echo \"<br>id: \" . $id . \"<br>\";\n if( $id == 0 ) {\n $this->output\n ->set_content_type('application/json')\n ->set_output(json_encode( [ \"response\" => [ \"error\" => \"id is required.\" ] ] ));\n // exit;\n }\n else {\n // $this->output->enable_profiler(true);\n $res = $this->eventfacade->search_event($id);\n\n $this->output\n ->set_content_type('application/json')\n ->set_output(json_encode([\"response\" => [\"event\" => $res]]));\n }\n // echo 'hi';\n }", "title": "" }, { "docid": "81e2c041f06b9ae329aedd34d14d908e", "score": "0.46929032", "text": "public function testCreateSimpleCalendarEventWithFormUrlEncodedContent()\n {\n $calendarId = $this->getReference('oro_calendar:calendar:foo_user_1')->getId();\n $uid = Uuid::uuid();\n // @codingStandardsIgnoreStart\n $content = <<<CONTENT\ntitle=Regular%20event&uid=$uid&description=&start=2016-10-14T22%3A00%3A00.000Z&end=2016-10-14T23%3A00%3A00.000Z&allDay=false&attendees=&recurrence=&calendar=$calendarId\nCONTENT;\n // @codingStandardsIgnoreEnd\n parse_str($content, $parameters);\n\n // Step 1. Create regular calendar event using minimal required data in the request.\n $this->restRequest(\n [\n 'method' => 'POST',\n 'url' => $this->getUrl('oro_api_post_calendarevent'),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key'),\n 'parameters' => $parameters,\n ]\n );\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 201,\n 'contentType' => 'application/json'\n ]\n );\n /** @var CalendarEvent $newEvent */\n $newEvent = $this->getEntity(CalendarEvent::class, $response['id']);\n $this->assertResponseEquals(\n $this->getResponseArray($response),\n $response\n );\n\n // Step 2. Get created event and verify all properties in the response.\n $this->restRequest(\n [\n 'method' => 'GET',\n 'url' => $this->getUrl('oro_api_get_calendarevent', ['id' => $newEvent->getId()]),\n 'server' => $this->generateWsseAuthHeader('foo_user_1', 'foo_user_1_api_key')\n ]\n );\n\n $response = $this->getRestResponseContent(\n [\n 'statusCode' => 200,\n 'contentType' => 'application/json'\n ]\n );\n\n $this->assertResponseEquals(\n [\n 'id' => $newEvent->getId(),\n 'uid' => $newEvent->getUid(),\n 'calendar' => $this->getReference('oro_calendar:calendar:foo_user_1')->getId(),\n 'parentEventId' => null,\n 'title' => 'Regular event',\n 'description' => null,\n 'start' => '2016-10-14T22:00:00+00:00',\n 'end' => '2016-10-14T23:00:00+00:00',\n 'allDay' => false,\n 'attendees' => [],\n 'editable' => true,\n 'editableInvitationStatus' => false,\n 'removable' => true,\n 'backgroundColor' => null,\n 'invitationStatus' => Attendee::STATUS_NONE,\n 'recurringEventId' => null,\n 'originalStart' => null,\n 'isCancelled' => false,\n 'createdAt' => $newEvent->getCreatedAt()->format(DATE_RFC3339),\n 'updatedAt' => $newEvent->getUpdatedAt()->format(DATE_RFC3339),\n 'isOrganizer' => $newEvent->isOrganizer(),\n 'organizerDisplayName' => $newEvent->getOrganizerDisplayName(),\n 'organizerEmail' => $newEvent->getOrganizerEmail(),\n 'organizerUserId' => $newEvent->getOrganizerUser() ?\n $newEvent->getOrganizerUser()->getId() : null\n ],\n $response\n );\n }", "title": "" }, { "docid": "f232ff32ece803a368ddb277f90f1230", "score": "0.46898448", "text": "function getRecurringData($txt) {\n// \"INNER JOIN tbl_client c ON c.id = nr.client_id \" .\n// \"WHERE c.orgid = \" . Session::getSession('orgid');\n\n $sqlQuery = new SqlQuery($txt);\n $items = QueryExecutor::execute($sqlQuery);\n\n if (!isset($items))\n return false;\n\n $returns = array();\n\n foreach ($items as $item) {\n// $txt = \"SELECT ni.id FROM tbl_new_invoice ni \" .\n// \"INNER JOIN tbl_all_invoice ai ON ai.new_invoice_id = ni.id\" .\n// \"WHERE ai.new_recurring_id = \" . $item->id .\n// \" ORDER BY ni.id DESC LIMIT 0, 1\";\n// $sqlQuery = new SqlQuery($txt);\n// $new_invoice = QueryExecutor::execute($sqlQuery);\n//\n// $new_invoice = DAOFactory::getTblNewInvoiceDAO()->load($new_invoice[0]['id']);\n// $currentinvoice_id = $new_invoice->id;\n// $new_invoice->id = '';\n// $new_invoice->dateCreated = $new_invoice->dateIssued = date('Y-m-d');\n//// $new_invoice->\n// $new_invoice_id = DAOFactory::getTblNewInvoiceDAO()->insert($new_invoice);\n//\n// $new_invoice = DAOFactory::getTblNewInvoiceDAO()->load($new_invoice_id);\n// $new_invoice->invoiceNumber = sprintf('%1$04d', $new_invoice->id);\n// DAOFactory::getTblNewInvoiceDAO()->update($new_invoice);\n//\n// $all_invoice = new TblAllInvoice();\n// $all_invoice->newInvoiceId = $new_invoice_id;\n// $all_invoice->newRecurringId = $item->id;\n//\n// $this->saveInvoiceLine($new_invoice_id, $currentinvoice_id);\n \n $recurring = DAOFactory::getTblNewRecurringDAO()->load($item->id);\n $oldrecurring = $recurring->id;\n $recurring->id = '';\n $recurring->dateCreated = $recurring->dateIssued = date('Y-m-d');\n $recurring->recurringNumber = '';\n\n $recurringid = DAOFactory::getTblNewRecurringDAO()->insert($recurring);\n $recurring = DAOFactory::getTblNewRecurringDAO()->load($recurringid);\n $recurring->recurringNumber = sprintf('%1$07d', $recurring->id);\n DAOFactory::getTblNewRecurringDAO()->update($recurring);\n\n $recurringlines = DAOFactory::getTblRecurringLinesDAO()->queryByNewRecurringId($oldrecurring);\n\n $allinvoice = DAOFactory::getTblAllInvoiceDAO()->queryByNewRecurringId($oldrecurring);\n $oldinvoice = $allinvoice->newInvoiceId;\n\n $invoice = DAOFactory::getTblNewInvoiceDAO()->load($oldinvoice);\n\n $invoice->id = '';\n $invoice->dateCreated = date('Y-m-d');\n $invoiceid = DAOFactory::getTblNewInvoiceDAO()->insert($invoice);\n\n $invoice = DAOFactory::getTblNewInvoiceDAO()->load($invoiceid);\n $invoice->invoiceNumber = sprintf('%1$07d', $invoiceid);\n DAOFactory::getTblNewInvoiceDAO()->update($invoice);\n\n foreach ($recurringlines as $recurringline) {\n $recurringline->newRecurringId = $recurring->id;\n $recurringline->id = '';\n DAOFactory::getTblRecurringLinesDAO()->insert($recurringline);\n\n $recurringline->newInvoiceId = $invoiceid;\n DAOFactory::getTblInvoiceLinesDAO()->insert($recurringline);\n }\n\n// foreach ($allinvoice as $item) {\n $oldallinvoice = $allinvoice->id;\n $allinvoice->id = '';\n $allinvoice->newInvoiceId = $invoiceid;\n $allinvoice->newRecurringId = $recurringid;\n\n DAOFactory::getTblAllInvoiceDAO()->insert($allinvoice);\n// }\n \n $recurringamount = DAOFactory::getTblRecurringAmountDAO()->queryByNewRecurringId($oldrecurring);\n $recurringamount->id ='';\n DAOFactory::getTblRecurringAmountDAO()->insert($recurringamount);\n }\n\n return $returns;\n }", "title": "" }, { "docid": "4b7e4af0f8f3d8300a3fcfbaee8ed4b1", "score": "0.46850094", "text": "public function testMissingEventId()\n {\n $response = $this->call('GET','api/events/');\n\n $this->assertEquals(200,$response->status());\n }", "title": "" }, { "docid": "4c6fbbea81f79690cff0a8802b3a7efa", "score": "0.46840423", "text": "private function get_MyEventsPendingAction()\n {\n $date = date('Y-m-d');\n\n return $this->db->query_DB(\"SELECT `ID`, `Name`, `Date`, `Created`, `Creator_User_ID`, `Person_Code`, `Remote_Code`,\n `Approved`, `Estimated_Budget`, `Actual_Budget`, `Deleted`\n FROM `Events`\n WHERE `Creator_User_ID` = '\" . $_SESSION['userID'] . \"'\n AND `Date` <= '$date'\n AND `Approved` = '1'\n AND `Deleted` = '0'\n AND `Actual_Budget` IS NULL\n ORDER BY `Date` DESC\"\n );\n }", "title": "" }, { "docid": "9561d3aec01b751d320fcf47b2b94bdf", "score": "0.46810493", "text": "public function create($type = self::DEFAULT_TYPE)\n\t{\n\t\t$this->_className = $this->_namespacedType($type);\n\t\tif(class_exists($this->_className)) {\n\t\t\treturn new $this->_className();\n\t\t}\n\t\tthrow new \\EventRecurring\\Exception\\Type(\"Recurring Type not supported\");\n\t}", "title": "" } ]
3a339bb0d5a6b46c61b62b352f2abe7f
Check if the file has een heading
[ { "docid": "d7b1ad972e31cf12e2c91bf32c1fdd9b", "score": "0.69683266", "text": "public function hasHeading()\n {\n if (!$this->noHeading) {\n $config = config('excel.import.heading', true);\n\n return $config !== false && $config !== 'numeric';\n }\n\n return $this->noHeading ? false : true;\n }", "title": "" } ]
[ { "docid": "9361b5fee8cc89807153431d7ef4c768", "score": "0.67273855", "text": "public function hasFileName(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "291e1e0479278779d5856d65777f7e2e", "score": "0.65924776", "text": "private function isHeader(): bool\n {\n return $this->translation->getOriginal() === '' && $this->translation->getContext() === null;\n }", "title": "" }, { "docid": "952606b3b55ceaea516ad3486029ceda", "score": "0.6520571", "text": "public function hasHeader() {\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "8839303177b6a0c401bb99637490096e", "score": "0.64913946", "text": "function check_header($line, $stats) {\n $comment_parts = preg_split('/#/', $line); \n if (count($comment_parts) > 1) {\n $stats->incComments();\n }\n if (strtoupper(rtrim($comment_parts[0])) != '.IPPCODE19') {\n error(\"ERROR: wrong file header!\\n\", ERR_HEAD);\n }\n}", "title": "" }, { "docid": "84bb1cf8fc53225f9123596df482f1d6", "score": "0.6273194", "text": "public function hasFile(): bool;", "title": "" }, { "docid": "967c2e2024bb7cc81d3d111da133c7d0", "score": "0.6250912", "text": "private function checkFile()\n {\n $this->err_no_file = false;\n\n if ( !(isset($this->file['size']) && (int) $this->file['size']) )\n $this->err_no_file = true;\n\n return $this->err_no_file;\n }", "title": "" }, { "docid": "7d5c3eda4a063a6ee532dd9c1ad96da4", "score": "0.61559373", "text": "protected function _hasHeader() {\n return (isset ($this->colName) && !empty ($this->colName));\n }", "title": "" }, { "docid": "89d385301362b94407588a36f5eba68d", "score": "0.6120337", "text": "public function hasFilePath(): bool;", "title": "" }, { "docid": "bd64239cfe28b6f4d2444d7bdaf1ded0", "score": "0.6097243", "text": "public function hasFilePath() : bool;", "title": "" }, { "docid": "de8eb42ffbacf5beed48e4fbb1d1b5ca", "score": "0.60924906", "text": "public function hasHeader(string $name): bool;", "title": "" }, { "docid": "4f803b5580a84d8be8c6572e359d7886", "score": "0.60506564", "text": "protected function existFile(): bool\n {\n $response = (isset($this->file['file']) && $this->file['file']['type'] === 'text/plain');\n\n return $response;\n }", "title": "" }, { "docid": "3786f09285b618eafbc37df3e849fe09", "score": "0.60453963", "text": "protected function _checkHeader() {\n\t\tif (!isset($this->tokens[1]) || !is_array($this->tokens[1])) {\n\t\t\t$this->_error(1);\n\t\t}\n\t\t$containsHeader = strstr($this->tokens[1][1], 'the most rad php framework') === false;\n\t\tif ($this->tokens[1][0] != T_DOC_COMMENT || $containsHeader) {\n\t\t\t$this->_error(1);\n\t\t}\n\t}", "title": "" }, { "docid": "8f079f2812f3ddc9c92a2cff7b9e397b", "score": "0.60345984", "text": "private function isHeader($row)\n {\n return array_search(trim(str_replace(\"\\r\", \"\", $row)), $this->tableHeaders) !== false;\n }", "title": "" }, { "docid": "78da5b22a67b1aa7ae0fcd69ca2e0819", "score": "0.60109335", "text": "public function has_added_header_text()\n\t{\n\t\treturn $this->has_added_header_text;\n\t}", "title": "" }, { "docid": "9909b2a88b60283e82d145172ab04641", "score": "0.60096735", "text": "public function hasFile()\n {\n return count($this->get(self::FILE)) !== 0;\n }", "title": "" }, { "docid": "9117297198f66427e87aa4e36d35914a", "score": "0.59853446", "text": "public function isHead()\n {\n return $this->method === self::METHOD_HEAD;\n }", "title": "" }, { "docid": "a8f0e8e8b215f3b1074d1cf7b0821185", "score": "0.59286237", "text": "public function isHead() {\n\t\tif ('HEAD' == $this->getMethod())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e0b270dd198e6445fb0b6af5bde59518", "score": "0.59254056", "text": "public function isHead()\n {\n return $this->getMethod() == 'HEAD';\n }", "title": "" }, { "docid": "55b60208f3e0803e33b3310a8e0d8be1", "score": "0.58999497", "text": "public function isFromFile()\n {\n return isset($this->filePath);\n }", "title": "" }, { "docid": "97f385f5336e878e82936945fedc34a5", "score": "0.5897996", "text": "public function hasFile()\n {\n return ! empty($this->files);\n }", "title": "" }, { "docid": "d7a74be35c83fcb0079d55dfcf615002", "score": "0.58897895", "text": "public function hasHeader() {\n return is_array($this->colName) && !empty($this->colName);\n }", "title": "" }, { "docid": "d9e74ede34658ca0b7149721c0f66cdf", "score": "0.588292", "text": "public function isHead()\n {\n return $this->isMethod('HEAD');\n }", "title": "" }, { "docid": "d9e74ede34658ca0b7149721c0f66cdf", "score": "0.588292", "text": "public function isHead()\n {\n return $this->isMethod('HEAD');\n }", "title": "" }, { "docid": "2d16522d37015f9bab3a6e1e631eb539", "score": "0.58828956", "text": "public function hasHeader($name);", "title": "" }, { "docid": "2d16522d37015f9bab3a6e1e631eb539", "score": "0.58828956", "text": "public function hasHeader($name);", "title": "" }, { "docid": "693c99a8d2e9b611299634ca3a830bef", "score": "0.5873088", "text": "public function isHead()\n {\n return $this->getMethod() === 'HEAD';\n }", "title": "" }, { "docid": "af3beb5a5eb1ecb215ba2001835a3505", "score": "0.58703804", "text": "public function hasHeaderImage() {\n return !is_null($this->header_image);\n }", "title": "" }, { "docid": "75c6165cce9f5518d2fa09ee63a024b0", "score": "0.58548117", "text": "public function hasHeader($name)\n {\n }", "title": "" }, { "docid": "75c6165cce9f5518d2fa09ee63a024b0", "score": "0.58548117", "text": "public function hasHeader($name)\n {\n }", "title": "" }, { "docid": "43e9cb54cc5c3cc34d6810262cc9ecfe", "score": "0.5815662", "text": "final public function isHead() {\n return (bool) (0 === strcasecmp('HEAD', $this->_method));\n }", "title": "" }, { "docid": "c219e02e34819180fb85ed64cd18ad3e", "score": "0.57984596", "text": "function has_meta()\n{\n return file_exists(DEFAULT_METAFILE) && ($meta = textFileToArray(DEFAULT_METAFILE)) && count($meta);\n}", "title": "" }, { "docid": "3c95857d5b033dfcfa45076672acf24c", "score": "0.5792061", "text": "function has_header_image()\n {\n }", "title": "" }, { "docid": "e1f858ff6e1d16cc4069734c8797328a", "score": "0.57885593", "text": "public function getIsHead()\n {\n return $this->getMethod() === 'HEAD';\n }", "title": "" }, { "docid": "6a16fa6e14bf0bf8aead36039fc6b85a", "score": "0.5757835", "text": "function privCheckFileHeaders(&$p_local_header, &$p_central_header)\n {\n }", "title": "" }, { "docid": "81bd3192c424aec965de8eea6180e1aa", "score": "0.57440686", "text": "function has_custom_header()\n {\n }", "title": "" }, { "docid": "c3695afb530c131566bd831f257fe227", "score": "0.5740088", "text": "public function isSingleFile()\n {\n return is_file( $this->path );\n }", "title": "" }, { "docid": "a73a731b8f5c2084ae747a9888bc6eed", "score": "0.5724849", "text": "public function isEndOfFile();", "title": "" }, { "docid": "07aba7c17003c0b9ab1bab84fcbcf028", "score": "0.5717198", "text": "private function hasHeadAlign() {\n\t\treturn isset($this->options['head_align']);\n\t}", "title": "" }, { "docid": "edf35b038f3f93b17dc031c9adaf3481", "score": "0.56941736", "text": "function isHTMLCat($file) {\t\t\r\n\tif(file_exists( $file ) ){\r\n\t\treturn true ;\r\n\t}\t\t\r\n\treturn false ;\r\n}", "title": "" }, { "docid": "5c15afbb31ddc7a903b28b63b5863a45", "score": "0.5690449", "text": "function has_header_video()\n {\n }", "title": "" }, { "docid": "7d2826f1189906fab31eb708fc29f5f7", "score": "0.5688441", "text": "public function hasHeader($header);", "title": "" }, { "docid": "ea5f8b26dde7d04b3b4809b45778f83f", "score": "0.5678264", "text": "public function hasHeader($name)\r\n {\r\n // TODO: Implement hasHeader() method.\r\n }", "title": "" }, { "docid": "8c521465ffa942182b869be3cd320626", "score": "0.5673952", "text": "public function isHeaderPresent() {\n\t\treturn $this->headerPresent;\n\t}", "title": "" }, { "docid": "53e8afb88d8eabfd9b57da07793dac16", "score": "0.56678045", "text": "function getFileExists() {\n\t\treturn file_exists($this->getFilename());\n\t}", "title": "" }, { "docid": "59d47717663b03bb0c1aef2a579f8775", "score": "0.5639033", "text": "public static function hasTitles(): bool\n {\n return true;\n }", "title": "" }, { "docid": "59d47717663b03bb0c1aef2a579f8775", "score": "0.5639033", "text": "public static function hasTitles(): bool\n {\n return true;\n }", "title": "" }, { "docid": "cfc9c470b5435de0f95ff17b5b68902d", "score": "0.5635852", "text": "function setHeaders(){\n $position = ftell($this->handle);\n rewind($this->handle);\n $read = $this->readLine();\n if( $read === FALSE){\n die(\"File is empty\");\n \n }else{\n $this->headers = $read;\n }\n\n fseek ($this->handle, $position );\n }", "title": "" }, { "docid": "f67deaae4dd1605b6e3aeb36cb6f4cca", "score": "0.5630239", "text": "private function detectHeadersValidity()\n\t{\n\n\t\tif (isset($this->colsOrder[\"CATEGORIES\"]) &&\n\t\t\tisset($this->colsOrder[\"SUMMARY\"]) &&\n\t\t\tisset($this->colsOrder[\"DTSTART\"]) &&\n\t\t\tisset($this->colsOrder[\"DTEND\"]) &&\n\t\t\tisset($this->colsOrder[\"TIMEZONE\"]))\n\t\t\treturn true;\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t}", "title": "" }, { "docid": "81f0686fe9a3e601b5029417c3a557ea", "score": "0.5626819", "text": "private function readHeader(): void\n {\n // First of all, we should now how exactly data stored in file\n $uByteOrder = \\strtoupper(\\bin2hex(\\substr($this->data, 0x1C, 2)));\n // We are suppose that is \"little-endian\" record, but check it for sure\n $this->storage->setIsLittleEndian($uByteOrder === 'FEFF');\n\n // Check the version\n $this->storage->setVersion($this->getShort(0x1A));\n\n // Offsets for FAT and miniFAT\n $this->storage->setSectorShift($this->getShort(0x1E));\n $this->storage->setMiniSectorShift($this->getShort(0x20));\n $this->storage->setMiniSectorCutoff($this->getLong(0x38));\n\n // Count of occurrences to file directory and offsets to first description in file\n if ($this->storage->getVersion() === 4) {\n $this->storage->setCDir($this->getLong(0x28));\n }\n $this->storage->setFDir($this->getLong(0x30));\n\n // Count of FAT-sectors in file\n $this->storage->setCFAT($this->getLong(0x2C));\n\n // Count and position of first MiniFat-sector of chains\n $this->storage->setFMiniFAT($this->getLong(0x3C));\n\n // Where FAT-sectors chains is and count of it\n $this->storage->setCDIFAT($this->getLong(0x48));\n $this->storage->setFDIFAT($this->getLong(0x44));\n }", "title": "" }, { "docid": "e1eda587d922cc1f164d5d86732555de", "score": "0.5614182", "text": "public function hasFilename()\n {\n return $this->filename !== null;\n }", "title": "" }, { "docid": "c01e414a3bbd3545ef38a731655c5bff", "score": "0.5605376", "text": "public function isFile ()\n {\n return $this->type == EntryType::FILE;\n }", "title": "" }, { "docid": "b497d234862232d43d6c445bc2327c52", "score": "0.56033593", "text": "public function isFile() : bool;", "title": "" }, { "docid": "60f3ec47915be39587a5544aa773f1b5", "score": "0.5595942", "text": "public function validateFilePathExistence(): bool;", "title": "" }, { "docid": "b9b36da56732c1d90058d88c56d1f22c", "score": "0.5587185", "text": "public function iShouldSeeTheHeaderContentFilename($filename) {\n $head = \"Content-Disposition\";\n $pat = \"#(.*); filename=\\\"$filename\\\"$#\";\n $driver = $this->getSession()->getDriver();\n $headers = $driver->getResponseHeaders();\n if (array_key_exists($head, $headers)) {\n foreach ($headers[$head] as $k => $v) {\n if (preg_match($pat, $v)) {\n return;\n }\n }\n $val = $headers[$head];\n if (is_array($val)) {\n $val = implode(\" //\", $val);\n }\n throw new Exception(\"Did not see \\\"$head: $filename\\\" in the headers, but found: \\\"$head: $val\\\".\");\n }\n else {\n throw new Exception(\"Did not see \\\"$head: $filename\\\" in the headers.\");\n }\n }", "title": "" }, { "docid": "eb913e0695925f9d9fe6a3f524bc5c70", "score": "0.558245", "text": "function isFile(){\n\t\treturn is_file($this->path);\n\t}", "title": "" }, { "docid": "13f0946a1e60ef8f544aa4a7c04bdaf0", "score": "0.55779845", "text": "public function isFileCreated()\n {\n return file_exists($this->getFullPath());\n }", "title": "" }, { "docid": "c598843aa37193b2c737401a2b66431b", "score": "0.5577194", "text": "function fileChecker($nome_file){\n \n // controllo che sia stato inviato un file altrimenti restituisco false\n if(empty($_FILES['file'])){\n return false;\n }\n \n // memorizzo l'estensione\n $ext = trim(strtolower(end($nome_file)));\n \n // verifico che sia stato inviato un file contente un foto i formati disponibili sono jpg png jpeg\n if(!preg_match(VALID_FILE_FORMAT, $ext)){\n return false;\n }\n \n return true;\n}", "title": "" }, { "docid": "71b2ee818ca0cf01ea07d2f38b24f4a1", "score": "0.5576575", "text": "public function isFile(): bool;", "title": "" }, { "docid": "5aa39822f0a4e2f9c086abc73ff555d1", "score": "0.5569892", "text": "public function hasHeader($name)\n {\n // TODO: Implement hasHeader() method.\n }", "title": "" }, { "docid": "6067cb906da70910b2067fb4801fa8d2", "score": "0.5557107", "text": "public function hasHeader($key){ return $this->headers->has($key); }", "title": "" }, { "docid": "1836766d4631b54a95521931a4a9e158", "score": "0.5540286", "text": "public function hasTitles()\n {\n return false;\n }", "title": "" }, { "docid": "4d33ab25cc46ca29144765a31d4d5be0", "score": "0.5536484", "text": "public function valid(): bool\n {\n return !feof($this->fp) || $this->index !== null; // Is het einde van het bestand NIET bereikt?\n }", "title": "" }, { "docid": "1dac3f0202daf46d3411a852eff557af", "score": "0.5534678", "text": "private function checkContents(){\n\t\t\t//Check if the first and last element of the contents array is header.php and footert.php\n\t\t\tif(!isset($this->contents[0])){\n\t\t\t\t$this->contents[0]='header.php';\n\t\t\t}\n\t\t\telseif($this->contents[0]!='header.php'){\n\t\t\t\tarray_unshift($this->contents, 'header.php');\n\t\t\t}\n\t\t\tif($this->contents[count($this->contents)-1]!='footer.php'){\n\t\t\t\tarray_push($this->contents,'footer.php');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c88d2913a53d6f443e594b047fa47876", "score": "0.5532999", "text": "function check_head()\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "fc98805b2a8174a6871f22adc52e3481", "score": "0.5524282", "text": "public function isExist(){\n\t\t\tif(file_exists($this->_nameFile)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e71c400a9b5657adfff1966f03d28201", "score": "0.55185467", "text": "function ifExists()\n\t {\n\t\t $file= CTRL.DS.$this->url[0].'.php';\n\t\t \n\t\t\n\t\t if(!file_exists($file))\n\t\t {\n\t\t\t $this->error(\"File does not exist \");\n\t\t\t echo\"<a href='\".DIR.\"index'>Back</a>\";\n\t\t\t exit();\n\t\t\t\n\t\t }\n\t\t\n\t }", "title": "" }, { "docid": "9b6bff4ecee71256edd8cf7f628b7897", "score": "0.5518378", "text": "public function hasFile()\n {\n foreach($this->fields() as $field) {\n if($field instanceof Field\\File) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "4696739905b521ffac2eaa55035aa1af", "score": "0.5511549", "text": "private function is_heading( $string ) {\n\t\t$string = trim( $string );\n\t\t// For The Red Beans:.\n\t\tif ( ':' === substr( $string, -1, 1 ) ) {\n\t\t\treturn true;\n\t\t}\n\t\t// <strong>For The Red Beans</strong>.\n\t\tif ( '<strong>' === substr( $string, 0, 8 ) && '</strong>' === substr( $string, -9, 9 ) ) {\n\t\t\treturn true;\n\t\t}\n\t\t// <h3>For The Red Beans</h3>.\n\t\tif ( preg_match( '#^<h[1-6]>.+<\\/h[1-6]>$#', $string ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7aaf21ba608cc0806162ba93a12d843c", "score": "0.5506434", "text": "public function hasTitle(){\n return $this->_has(37);\n }", "title": "" }, { "docid": "d7bac68f4c8050932757784b01b90d16", "score": "0.54989517", "text": "public function fileExists(): bool;", "title": "" }, { "docid": "3882a93c78e6171d7a39fcda125cccdf", "score": "0.54957867", "text": "public function hasFileSha()\n {\n return $this->file_sha !== null;\n }", "title": "" }, { "docid": "86566c42d3b8de242a3743efc9e38fde", "score": "0.54925334", "text": "public function hasFile($key)\n {\n return parent::hasFile($key);\n }", "title": "" }, { "docid": "9fa042f8e4cdcaa29acfcdf543a98cf9", "score": "0.5487018", "text": "public function setHeaders()\n\t{\n\t\tif ($this->fileExists()) {\n\t\t\t header('Content-Description: File Transfer');\n\t\t\t header('Content-Type: application/pdf');\n\t\t\t header('Content-Disposition: attachment; filename=trabalho.pdf');\n\t\t\t header('Content-Transfer-Encoding: binary');\n\t\t\t header('Expires: 0');\n\t\t\t header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\t\t\t header('Pragma: public');\n\t\t\t header('Content-Length: ' . $this->getFileSize());\n\t\t\t \n\t\t\t return true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "2015f54be2d71f544a082e8ddbe49faa", "score": "0.54860437", "text": "public function hasTitles()\n {\n return true;\n }", "title": "" }, { "docid": "f57e05bf15e5c5265d761fdc1d215e89", "score": "0.5481349", "text": "function is_valid_header ($header, $headers_found) {\n $is_valid_header = true;\n if (in_array($header, $headers_found)) {\n $is_valid_header = false;\n error_log(\"ERROR: order found with existing header: ${header}\"); \n }\n return $is_valid_header;\n}", "title": "" }, { "docid": "0bdef7431bc9bf209a62854a2e45b15f", "score": "0.547202", "text": "public function hasFiles(): bool\n {\n return $this->type != 'menu_links';\n }", "title": "" }, { "docid": "72a7373e22517662124261b7bb5eaba5", "score": "0.5471536", "text": "function check_upload($file) {\n if (preg_match(\":^application/vnd.bdoc-:\", $file[\"type\"])) {\n $file[\"format\"] = \"bdoc\";\n } else if ($file[\"type\"] === \"application/x-ddoc\") {\n $file[\"format\"] = \"ddoc\";\n } else {\n return FALSE;\n }\n\n return is_uploaded_file($file[\"tmp_name\"]);\n}", "title": "" }, { "docid": "076c77afec1c1ccea33866732830e954", "score": "0.54710317", "text": "public function hasHeader(string $key): bool\n\t{\n\t\treturn $this->header($key) !== null;\n\t}", "title": "" }, { "docid": "71d54e514a0239a202429c367b7b710c", "score": "0.5465716", "text": "protected function isFile() {}", "title": "" }, { "docid": "07db4ce1373e8231a0fd96c6f42c011b", "score": "0.5458385", "text": "private function hasJPGHeader(string $content): bool\n {\n $length = strlen($content);\n if ($length < 4) {\n return false;\n }\n $firstSubstr = substr($content, 0, 2);\n $secondSubstr = substr($content, 2, 2);\n $soi = unpack('n', $firstSubstr)[1];\n $marker = unpack('n', $secondSubstr)[1];\n return 0xFFD8 == $soi && ($marker & 0xFF00) === 0xFF00;\n }", "title": "" }, { "docid": "7808bc2cd486eab6a5f79b84966cd906", "score": "0.54552776", "text": "public function import_read_header()\n\t{\n // phpcs:enable\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "d737b7c1bd87ef4cd5382d467bb366ea", "score": "0.5449142", "text": "public function loadColumnHeaders() {\n\t\t$jinput = JFactory::getApplication()->input;\n\t\t$jinput->set('columnheaders', $this->data->_data[1]);\n\t\t$this->linepointer++;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "924653b0bdb647780f6abb0c851d00f9", "score": "0.5448737", "text": "public function isFile()\n {\n return !$this->isDirectory();\n }", "title": "" }, { "docid": "b54b182649b856c7b3b212c2e9505e37", "score": "0.54378814", "text": "private function validateHeader()\n {\n $this->checkConnection->setQuery($this->masterConnection->sqlquery);\n $this->checkConnection->executeNoCommit();\n $header1 = $this->checkConnection->getHeader(true);\n\n $this->checkConnection->setQuery($this->slaveConnection->sqlquery);\n $this->checkConnection->executeNoCommit();\n $header2 = $this->checkConnection->getHeader(true);\n if (strcmp($header1, $header2) === 0){\n return true;\n }\n $this->setMistake(\"incorrect Solution - names of header incorrect\");\n return false;\n\n }", "title": "" }, { "docid": "020f5d4b7d9b88256c460bc096099236", "score": "0.5436772", "text": "public function hasFiles()\r\n {\r\n $result = FALSE;\r\n $names = $this->getColumnNames();\r\n foreach($names as $name) {\r\n if(in_array($name, $this->fileAttributes)) {\r\n return TRUE;\r\n }\r\n }\r\n return $result;\r\n }", "title": "" }, { "docid": "441acc43b784dea4f1a16d8cb422a85e", "score": "0.54293567", "text": "protected function validates(){\n // file existance\n if (!file_exists($this->_filename)) {\n return false;\n }\n // file readability\n if (!is_readable($this->_filename)) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "51245713620363e8118eee30389169d2", "score": "0.5411792", "text": "private function fileExists()\n {\n return $this->files->exists($this->path) ? new Exception(\"The class exists!\") : false;\n }", "title": "" }, { "docid": "40c5f01556315b4923d1629610434735", "score": "0.5400345", "text": "private function parseHeader()\n {\n//\n// while ($this->file && !feof($this->file)) {\n// $string = trim(fgets($this->file));\n//\n// if (!$string) {\n// continue;\n// }\n//\n// $token = $this->tokenizer->tokenize($string);\n//\n// switch ($token->name) {\n// case 'SizeofPointer':\n// $this->header->sizeOfPointer = $token->data[0];\n// break;\n// case 'SharedFactoryVersion':\n// $this->header->sharedFactoryVersion = $token->data[0];\n// break;\n// case 'NPCHVersion':\n// $this->header->npcHVersion = $token->data[0];\n// break;\n// case 'NASCVersion':\n// $this->header->nascVersion = $token->data[0];\n// break;\n// case 'NPCEventHVersion':\n// $this->header->npcEventVersion = $token->data[0];\n// break;\n// case 'Debug':\n// $this->header->debug = $token->data[0];\n// break;\n// default:\n// break 2;\n// }\n// }\n//\n// fseek($this->file, 0);\n }", "title": "" }, { "docid": "b4f75bddd7c933f4a5a16b026a60ffc9", "score": "0.53989804", "text": "private function lineIsFile($line)\n {\n return substr(trim($line), -4, 1) == '.';\n }", "title": "" }, { "docid": "adb9010052717d5b85632ae085638b66", "score": "0.53946686", "text": "private function parseFileHeader()\n\t{\n\n\t\tif ($this->data)\n\t\t{\n\t\t\t$line = StringHelper::substr($this->data, 0, StringHelper::strpos($this->data, \"\\n\") + 1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fp = fopen($this->file, 'r');\n\t\t\t$line = fgets($fp, 4096);\n\t\t\t$line = trim($line); // remove white spaces, at the end always \\n (or \\r\\n)\n\t\t\tfclose($fp);\n\t\t}\n\n\t\t$headers = explode($this->columnSeparator, $line);\n\t\t$this->colsNum = count($headers);\n\t\tfor ($i = 0; $i < $this->colsNum; $i++)\n\t\t{\n\t\t\t// -------- remove the utf-8 BOM ----\n\t\t\t$headers[$i] = str_replace(\"\\xEF\\xBB\\xBF\", '', $headers[$i]);\n\t\t\t$this->colsOrder[str_replace('\"', '', trim($headers[$i]))] = $i;\n\t\t\t// some people let white space at the end of text, so better to trim\n\t\t\t// CSV has often begining and ending \" - replace it\n\t\t}\n\t}", "title": "" }, { "docid": "dd92216888b1b796a99e87393ecaa00e", "score": "0.5391697", "text": "function hasFiles()\n {\n return (count($_FILES) > 0);\n }", "title": "" }, { "docid": "2328290ab35b37ddf50326a7b67d5405", "score": "0.5384483", "text": "public function isHEAD()\n {\n return ($this->getRequestMethod() == 'HEAD');\n }", "title": "" }, { "docid": "19d0297fc29c221546cdd42327e94db4", "score": "0.5383752", "text": "abstract public function header();", "title": "" }, { "docid": "33108c4a1e59e8522fa9a53723612272", "score": "0.53752935", "text": "private function wasFileSent() : bool\n {\n return isset($_FILES[$this->fieldName]['name']) && !empty($_FILES[$this->fieldName]['name']);\n }", "title": "" }, { "docid": "6c314ab62e9e0577f87973f25d33d40b", "score": "0.53696555", "text": "public function checkFile($path) {\n\t\tif (preg_match($this->ignore, $path) == 1){\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->errors = array();\n\t\t$this->tokens = token_get_all(file_get_contents($path));\n\t\t$this->path = $path;\n\t\t$this->_checkHeader();\n\t\t$this->_checkClassDocBlock();\n\t\t$this->_checkDocBlocks();\n\n\t\tif (count($this->errors)) {\n\t\t\t$this->out(\"\\n\" . $this->path . \"\\n\" . implode(\"\\n\", $this->errors));\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ccdc5687eef4f8bd13d114cccedaf7ab", "score": "0.5364457", "text": "public function isFileEmpty()\n {\n clearstatcache();\n return filesize($this->getFullPath()) === 0;\n }", "title": "" }, { "docid": "d5a51f7f10c871c422b435e0fa845100", "score": "0.53567356", "text": "public function logHeaders()\n {\n return $this->config('log_headers') == true;\n }", "title": "" }, { "docid": "90620f56981a4a9e0822e9f483a8ead6", "score": "0.53469205", "text": "public function getIsFile() {\n\t\t$fullName = $this->getPath();\n\t\treturn is_file($fullName);\n\t}", "title": "" }, { "docid": "f0109de8f138898b7040eb6e2098adf1", "score": "0.5337639", "text": "public function exists() {\n\t\tif(isset($this->record[\"Filename\"])) {\n\t\t\treturn true;\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "16db5e28b3dc816a2472e33b9b45dece", "score": "0.53294206", "text": "public function hasHeader($headerKey): bool\n {\n return false;\n }", "title": "" } ]
aa096a7448e6772f78dad92377748249
Add item to VehicleGroupEnum value
[ { "docid": "9737701ae5f6260f0a23da70047d3b4e", "score": "0.78325003", "text": "public function addToVehicleGroupEnum($item)\n {\n // validation for constraint: enumeration\n if (!\\Mu4ddi3\\Compensa\\Webservice\\EnumType\\VehicleGroupEnum::valueIsValid($item)) {\n throw new \\InvalidArgumentException(sprintf('Value \"%s\" is invalid, please use one of: %s', $item, implode(', ', \\Mu4ddi3\\Compensa\\Webservice\\EnumType\\VehicleGroupEnum::getValidValues())), __LINE__);\n }\n $this->VehicleGroupEnum[] = $item;\n return $this;\n }", "title": "" } ]
[ { "docid": "48d7efb643fd0849856bc2e96022cfa3", "score": "0.7346563", "text": "public function add($item)\n {\n if (!\\Mu4ddi3\\Compensa\\Webservice\\EnumType\\VehicleGroupEnum::valueIsValid($item)) {\n throw new \\InvalidArgumentException(sprintf('Value \"%s\" is invalid, please use one of: %s', $item, implode(', ', \\Mu4ddi3\\Compensa\\Webservice\\EnumType\\VehicleGroupEnum::getValidValues())), __LINE__);\n }\n return parent::add($item);\n }", "title": "" }, { "docid": "f3646a3de81c28fe02fa2923087ec51d", "score": "0.5871416", "text": "public function getAttributeName()\n {\n return 'VehicleGroupEnum';\n }", "title": "" }, { "docid": "ddebabd6111807178ceb5e19b0382112", "score": "0.5669602", "text": "public function add_group( $group ) {\n\n\t}", "title": "" }, { "docid": "9343e0d953cb219b5256c092a8c43f58", "score": "0.5664225", "text": "public function addGroup(Group $group);", "title": "" }, { "docid": "a61da72b11a4f53022ca1ee21eef598b", "score": "0.5635233", "text": "public function add_group_to_library() {\n global $shiftr_groups_library;\n\n $shiftr_groups_library[ $this->key ] = $this;\n }", "title": "" }, { "docid": "a58ed27343a18c824d36e2b79e1178c0", "score": "0.54251975", "text": "function addGroup($grp) {\r\n\t\tif ($this->groups == '') {\r\n\t\t\t$this->groups = $grp;\r\n\t\t} else {\r\n\t\t\t$grAr = explode(',', $this->groups);\r\n\t\t\t$grAr[] = $grp;\r\n\t\t\t$this->groups = implode(',', $grAr);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0ce486a5fd5cd1a4811a542551cea0e3", "score": "0.5399491", "text": "public function _group_add() {\n\t\t$this->_group_edit();\n\t}", "title": "" }, { "docid": "afd918d7b44a7704c75dcc88a9de05b3", "score": "0.539655", "text": "public function addToWork_Schedule_Calendar_Group(\\WorkdayWsdl\\\\StructType\\Work_Schedule_Calendar_GroupType $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\WorkdayWsdl\\\\StructType\\Work_Schedule_Calendar_GroupType) {\n throw new \\InvalidArgumentException(sprintf('The Work_Schedule_Calendar_Group property can only contain items of type \\WorkdayWsdl\\\\StructType\\Work_Schedule_Calendar_GroupType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);\n }\n $this->Work_Schedule_Calendar_Group[] = $item;\n return $this;\n }", "title": "" }, { "docid": "92246f4d0986442a249334787d560bc8", "score": "0.5348243", "text": "public function addToName($item)\n {\n // validation for constraint: enumeration\n if (!\\Devlabs91\\GenericOtaHotelApiService\\EnumType\\Name::valueIsValid($item)) {\n throw new \\InvalidArgumentException(sprintf('Value \"%s\" is invalid, please use one of: %s', $item, implode(', ', \\Devlabs91\\GenericOtaHotelApiService\\EnumType\\Name::getValidValues())), __LINE__);\n }\n $this->Name[] = $item;\n return $this;\n }", "title": "" }, { "docid": "95fa112da80805ba2ac68ab5d1dec5b2", "score": "0.5342063", "text": "public function addToGroup($groupName);", "title": "" }, { "docid": "370f6ad423ee9db73624a28aabf71725", "score": "0.53415596", "text": "private function addToGroup($var){\n\t\tarray_push( $this->displayGroupArray, $var );\n\t}", "title": "" }, { "docid": "59e24a720593ef1a26c4a158f37851ab", "score": "0.5295056", "text": "public function addToModVariant($item)\n {\n // validation for constraint: enumeration\n if (!\\Mu4ddi3\\Compensa\\Webservice\\EnumType\\ModVariant::valueIsValid($item)) {\n throw new \\InvalidArgumentException(sprintf('Value \"%s\" is invalid, please use one of: %s', $item, implode(', ', \\Mu4ddi3\\Compensa\\Webservice\\EnumType\\ModVariant::getValidValues())), __LINE__);\n }\n $this->ModVariant[] = $item;\n return $this;\n }", "title": "" }, { "docid": "29c734521381744b6e6b53a18362608c", "score": "0.5273047", "text": "function admin_add_to_group() {\n\t\t//\n\t}", "title": "" }, { "docid": "70d7f8af0b0e6c1d12b25a3d65b27e1d", "score": "0.5269147", "text": "public function addGroup() {\n\t\tif($this->get('group') !== 0) {\n\t\t\treturn $this;\n\t\t} elseif($this->get('pr_type') != 0) {\n\t\t\treturn $this;\n\t\t}\n\n\t\t$pr_nr = $this->get('pr_nr');\n\t\t$mask = 0;\n\t\tforeach(array_keys(self::$groups) as $group) {\n\t\t\tif(in_array($pr_nr, self::$groups[$group])) {\n\t\t\t\t$mask |= $group;\n\t\t\t}\n\t\t}\n\n\t\tif($mask === 0)\n\t\t\t$mask = Product_Map::separate;\n\n\t\t$this->set('group', $mask);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ef8e917704ab795b8f244a20fa5eb56b", "score": "0.51941407", "text": "public function addGroup(array $options) :Group\n {\n\n }", "title": "" }, { "docid": "05738fb0454e5d81fcd59a4cf3d5c2ab", "score": "0.51815957", "text": "public function addGroupToSet()\n {\n $aChosenCat = $this->_getActionIds('oxgroups.oxid');\n $soxId = $this->getConfig()->getRequestParameter('synchoxid');\n\n // adding\n if ($this->getConfig()->getRequestParameter('all')) {\n $sGroupTable = $this->_getViewName('oxgroups');\n $aChosenCat = $this->_getAll($this->_addFilter(\"select $sGroupTable.oxid \" . $this->_getQuery()));\n }\n if ($soxId && $soxId != \"-1\" && is_array($aChosenCat)) {\n foreach ($aChosenCat as $sChosenCat) {\n $oObject2Delivery = oxNew('oxbase');\n $oObject2Delivery->init('oxobject2delivery');\n $oObject2Delivery->oxobject2delivery__oxdeliveryid = new oxField($soxId);\n $oObject2Delivery->oxobject2delivery__oxobjectid = new oxField($sChosenCat);\n $oObject2Delivery->oxobject2delivery__oxtype = new oxField(\"oxdelsetg\");\n $oObject2Delivery->save();\n }\n }\n }", "title": "" }, { "docid": "68e9eca630d0a91d8e52908aab625dce", "score": "0.5173584", "text": "public function addToItemType($item)\n {\n // validation for constraint: enumeration\n if (!\\Brainloop\\Soap\\EnumType\\ItemType::valueIsValid($item)) {\n throw new \\InvalidArgumentException(sprintf('Value \"%s\" is invalid, please use one of: %s', $item, implode(', ', \\Brainloop\\Soap\\EnumType\\ItemType::getValidValues())), __LINE__);\n }\n $this->ItemType[] = $item;\n return $this;\n }", "title": "" }, { "docid": "8f7a720a00f3eeb002194b66842ed348", "score": "0.51368713", "text": "public function add($item)\n {\n if (!\\Mu4ddi3\\Compensa\\Webservice\\EnumType\\ModVariant::valueIsValid($item)) {\n throw new \\InvalidArgumentException(sprintf('Value \"%s\" is invalid, please use one of: %s', $item, implode(', ', \\Mu4ddi3\\Compensa\\Webservice\\EnumType\\ModVariant::getValidValues())), __LINE__);\n }\n return parent::add($item);\n }", "title": "" }, { "docid": "13708c693fb79869f097026f0eedd0f3", "score": "0.51175624", "text": "private function addItem($type, array $item) {\n $this->touchKey($item);\n $key = $item['key'] ?? false;\n if (!is_array($key)) {\n $item['key'] = explode('.', $key);\n } else {\n $item['key'] = array_values($key);\n }\n\n $item = (array)$item;\n\n // Make sure the link has its type.\n $item['type'] = $type;\n\n // Walk into the items list to set the item.\n $items =& $this->items;\n foreach ($item['key'] as $i => $key_part) {\n\n if ($i === count($item['key'] ?? false) - 1) {\n // Add the item here.\n if (array_key_exists($key_part, $items)) {\n // The item is already here so merge this one on top of it.\n if ($items[$key_part]['type'] !== $type)\n throw new \\Exception(($item['key'] ?? '').\" of type $type does not match existing type {$items[$key_part]['type']}.\", 500);\n\n $items[$key_part] = array_merge($items[$key_part], $item);\n } else {\n // The item is new so just add it here.\n touchValue('_sort', $item, count($items));\n $items[$key_part] = $item;\n }\n } else {\n // This is a group.\n if (!array_key_exists($key_part, $items)) {\n // The group doesn't exist so lazy-create it.\n $items[$key_part] = ['type' => 'group', 'text' => '', 'items' => [], '_sort' => count($items)];\n } elseif ($items[$key_part]['type'] !== 'group') {\n throw new \\Exception(\"$key_part is not a group\", 500);\n } elseif (!array_key_exists('items', $items[$key_part])) {\n // Lazy create the items array.\n $items[$key_part]['items'] = [];\n }\n $items =& $items[$key_part]['items'];\n }\n }\n }", "title": "" }, { "docid": "5a1812f47a463f5e6f1f8f2287c98695", "score": "0.50505465", "text": "private function __setItemGroupOpts() {\n\t\t$meneItemGroups = array();\n\t\t$params = array();\n\t\tApp::import('Component', 'Menu.MenuApiGeneral');\n\t\t$MenuApiGeneral = new MenuApiGeneralComponent(new ComponentCollection());\n\t\t$errorKey = $MenuApiGeneral->getAllMenuItemGroup($params, $reply);\n\n\t\tif(empty($errorKey))\n\t\t\t$meneItemGroups = $reply['menuItemGroups'];\n\n\t\t$itemGroupOpts = array(0 => '--- '.__('please_select').' ---');\n\t\tforeach ($meneItemGroups as $menuItemGroup)\n\t\t\t$itemGroupOpts[$menuItemGroup['MenuItemGroup']['igrp_id']] = $menuItemGroup['MenuItemGroup']['igrp_name_l'.$this->langKey].'('.$menuItemGroup['MenuItemGroup']['igrp_code'].')';\n\n\t\t$this->set(compact('itemGroupOpts'));\n\t}", "title": "" }, { "docid": "5ff200e149fa889a5344e1bd5946ab5b", "score": "0.5046211", "text": "public function addCdtMenuGroup(CdtMenuGroup $oCdtMenuGroup);", "title": "" }, { "docid": "3c2178106ea0885bb69caa8081eac67e", "score": "0.50331676", "text": "public function __construct(array $vehicleGroupEnum = array())\n {\n $this\n ->setVehicleGroupEnum($vehicleGroupEnum);\n }", "title": "" }, { "docid": "bedfb82bbf82fc653589b3f877a451b4", "score": "0.50305307", "text": "public function addGroup(Group $group)\n {\n $this->groups[] = $group;\n }", "title": "" }, { "docid": "c7ceffb987df45089c6e58244b8c6d3b", "score": "0.50290793", "text": "public function addToBookingType($item)\n {\n // validation for constraint: enumeration\n if (!\\EnumType\\BookingTypeEnum::valueIsValid($item)) {\n throw new \\InvalidArgumentException(sprintf('Value \"%s\" is invalid, please use one of: %s', $item, implode(', ', \\EnumType\\BookingTypeEnum::getValidValues())), __LINE__);\n }\n $this->BookingType[] = $item;\n return $this;\n }", "title": "" }, { "docid": "46c63bb36eecb015bee5be0a5285da5d", "score": "0.4989858", "text": "function add_to_group($group_id, $ids)\n {\n /* empty for address books don't supporting groups */\n return 0;\n }", "title": "" }, { "docid": "47be4521945f2f8d59b808756528490c", "score": "0.498182", "text": "public function addGroup($value) {\n return $this->add('groups', func_get_args());\n }", "title": "" }, { "docid": "f84b0239b055a0d4689e25b7b2a0e363", "score": "0.49741295", "text": "public function add($item)\n {\n if (!\\Brainloop\\Soap\\EnumType\\ItemType::valueIsValid($item)) {\n throw new \\InvalidArgumentException(sprintf('Value \"%s\" is invalid, please use one of: %s', $item, implode(', ', \\Brainloop\\Soap\\EnumType\\ItemType::getValidValues())), __LINE__);\n }\n return parent::add($item);\n }", "title": "" }, { "docid": "56202117f21822f1e70bfce72c45a772", "score": "0.4973653", "text": "public function addToAttribute($item)\n {\n // validation for constraint: enumeration\n if (!\\EnumType\\TourOperatorAttributeEnum::valueIsValid($item)) {\n throw new \\InvalidArgumentException(sprintf('Value \"%s\" is invalid, please use one of: %s', $item, implode(', ', \\EnumType\\TourOperatorAttributeEnum::getValidValues())), __LINE__);\n }\n $this->Attribute[] = $item;\n return $this;\n }", "title": "" }, { "docid": "1959101131c0e06e8dc6fe02767a7209", "score": "0.49709052", "text": "public function addmenugroup()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'menumanager', 'create')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tinclude_once '../'.DIR_CON.'/component/menumanager/modules/menu_group.php';\n\t\t$instance = new Menu_group;\n\t\t$instance->add();\n\t}", "title": "" }, { "docid": "f919b2d96b271a84391af9ae46ad7554", "score": "0.49556988", "text": "function flagpole_add_to_group() {\n\tif (\n\t\t! empty( $_GET['selected-flag'] ) &&\n\t\t! empty( $_GET['selected-group'] ) &&\n\t\tcheck_admin_referer( 'ff-add-to-group' )\n\t) {\n\t\t$flag = sanitize_text_field( wp_unslash( $_GET['selected-flag'] ) );\n\t\t$group = sanitize_text_field( wp_unslash( $_GET['selected-group'] ) );\n\n\t\t$response = Flagpole::init()->add_flag_to_group( $flag, $group );\n\n\t\tflagpole_operation_redirect( $response );\n\t} else {\n\t\tflagpole_operation_redirect( 'fgae' );\n\t}\n}", "title": "" }, { "docid": "3e1befd9e41af148fdee5f415d76ad14", "score": "0.49086544", "text": "public function addToCommittee_Classification_Group(\\WorkdayWsdl\\\\StructType\\Committee_Classification_GroupType $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\WorkdayWsdl\\\\StructType\\Committee_Classification_GroupType) {\n throw new \\InvalidArgumentException(sprintf('The Committee_Classification_Group property can only contain items of type \\WorkdayWsdl\\\\StructType\\Committee_Classification_GroupType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);\n }\n $this->Committee_Classification_Group[] = $item;\n return $this;\n }", "title": "" }, { "docid": "75b92ab6cc524a8eefcd3e19e7bf1ddc", "score": "0.48954207", "text": "function acf_add_local_field_group($field_group) {}", "title": "" }, { "docid": "dfa888107bf34ec84ea1e7cca6e204bd", "score": "0.48921156", "text": "public function addToResponse_Group(\\WorkdayWsdl\\\\StructType\\Worker_Response_Group_for_ReferenceType $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\WorkdayWsdl\\\\StructType\\Worker_Response_Group_for_ReferenceType) {\n throw new \\InvalidArgumentException(sprintf('The Response_Group property can only contain items of type \\WorkdayWsdl\\\\StructType\\Worker_Response_Group_for_ReferenceType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);\n }\n $this->Response_Group[] = $item;\n return $this;\n }", "title": "" }, { "docid": "5dd7d298f13296cd811bd03501e21e6e", "score": "0.4891468", "text": "public function AddOptionsGroup($group_label, $options)\n {\n $this->option_groups[$group_label] = $options;\n }", "title": "" }, { "docid": "9c6f758bafa81e98d47f251ab90318a8", "score": "0.48791263", "text": "function mapToGroupObject($value)\n{\n return new Group($value);\n}", "title": "" }, { "docid": "9b2336b207f5d42af896dde0015eea3b", "score": "0.48649284", "text": "public function setGroup(?string $group): static;", "title": "" }, { "docid": "6f1e634b7ccaf5eac2b6777cc40168d3", "score": "0.48364705", "text": "public function add_group()\n\t{\n\t $this->load->model('Groups_model');\n\t return $this->Groups_model->add_group();\n\t}", "title": "" }, { "docid": "d918ca621c75d506d10ead40883a62f2", "score": "0.48364082", "text": "public function addGroup(ConceptSearchResultsGroup $csrg) \r\n\t{\r\n\t\t$this->arr_results_group[] = $csrg;\r\n\t}", "title": "" }, { "docid": "f9bf75034c9fe5aca2e763a606e6b6ff", "score": "0.48142067", "text": "public function addGroupData($group = '', $key = '', $value = '')\n {\n if (!isset($this->transactionBase[$group])) {\n $this->transactionBase[$group] = [];\n }\n $this->transactionBase[$group][$key] = $value;\n }", "title": "" }, { "docid": "f9bf75034c9fe5aca2e763a606e6b6ff", "score": "0.48142067", "text": "public function addGroupData($group = '', $key = '', $value = '')\n {\n if (!isset($this->transactionBase[$group])) {\n $this->transactionBase[$group] = [];\n }\n $this->transactionBase[$group][$key] = $value;\n }", "title": "" }, { "docid": "cba2fbc11bee928d8afa35ed3eac571f", "score": "0.47942755", "text": "public function addValue(EnumValueDescriptor $value)\n {\n $this->_values[] = $value;\n }", "title": "" }, { "docid": "47d9c728f884f08aeeba2ad227421ca5", "score": "0.47913718", "text": "public function addItem($item, $value);", "title": "" }, { "docid": "def24334bf75e021bf3bded574c083ab", "score": "0.47843018", "text": "private function addGroup($xml, $groupName) {\n foreach ($xml->group as $g) {\n if((string) $g == $groupName ) {\n return;\n }\n }\n // add the new group since it does not exist\n $xml->addChild(\"group\", $groupName);\n }", "title": "" }, { "docid": "ed590ea5fa21bdbaca734cff3d7b29ce", "score": "0.4776617", "text": "public function add_group($data)\n {\n return $this->client_groups_model->add($data);\n }", "title": "" }, { "docid": "ed590ea5fa21bdbaca734cff3d7b29ce", "score": "0.4776617", "text": "public function add_group($data)\n {\n return $this->client_groups_model->add($data);\n }", "title": "" }, { "docid": "004fce0cc4c96ba76d8e92e605b3dd80", "score": "0.47657642", "text": "public function updateGroup(): void;", "title": "" }, { "docid": "596f370b17f9d1dc0e8bb1445284c4f3", "score": "0.47628126", "text": "function addGroup(){\n\t\t$this->groups[] = new we_newsletter_group();\n\t}", "title": "" }, { "docid": "08a4342f981fda4afa0378674eeea1c9", "score": "0.47549465", "text": "public function group_add($id=null) {\r\n $id = intval($id);\r\n if ($id) {\r\n $sql = \"select * from menu_group where id = $id limit 1\";\r\n $row = db_query_one($sql);\r\n } else\r\n $row = array();\r\n\r\n $this->assign(\r\n 'v', $row\r\n )->load(false, null, true);\r\n }", "title": "" }, { "docid": "e7c371ba0812a1525e1054753db0eac1", "score": "0.4752245", "text": "public function addItemGroup($group, $store, $id, $description, $quantity, $amount, $weight = null, $shippingCost = null)\n\t{\n\t\t$description = utf8_encode($description);\n\t\t$amount = number_format($amount, 2);\n\t\t\n\t\t$this->order_items[$group]['store'] = $store;\n\t\t\n\t\t$this->order_items[$group][$id] = array(\n\t\t\t'id' => $id,\n\t\t\t'description' => $description,\n\t\t\t'quantity' => $quantity,\n\t\t\t'amount' => $amount,\n\t\t\t'weight' => $weight,\n\t\t\t'shippingCost' => $shippingCost,\n\t\t);\n\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "65dede0f2b8f9bb4d6ee4e5866903158", "score": "0.47372133", "text": "public function add_global_groups($groups)\n {\n }", "title": "" }, { "docid": "f5f175aca8ce99893a45f416e27875c4", "score": "0.47105333", "text": "public function addGroup() {\n\t\t$nb = sizeof ( $this->elements );\n\t\t$bg = new HtmlButtongroups ( $this->identifier . \"-buttongroups-\" . $nb );\n\t\t$this->elements [] = $bg;\n\t\treturn $bg;\n\t}", "title": "" }, { "docid": "d61c278d7d3e980801be503b04826464", "score": "0.47093743", "text": "public function setGroups($val) {\n $this->_groups = $val;\n }", "title": "" }, { "docid": "5ec806d6e52b6d97c7bb5dbdb7e3c877", "score": "0.47072813", "text": "public function setGroupTypes($value)\n {\n $this->setProperty(\"GroupTypes\", $value, true);\n }", "title": "" }, { "docid": "c13159454bff80be028547765aa24335", "score": "0.4701079", "text": "function addGroupToDatabase (&$group) {\n\t\t$gIR = $this->isGroupNameRegistered ($group->getGenericName ());\n\t\tif (! isError ($gIR)) {\n\t\t\tif ($gIR == false) {\n\t\t\t\treturn $group->addToDatabase ();\n\t\t\t} else {\n\t\t\t\t$groupName = $group->getGenericName ();\n\t\t\t\treturn new Error ('GROUPNAME_ALREADY_REGISTERED', $groupName);\n\t\t\t}\n\t\t} else {\n\t\t\treturn $gIR;\n\t\t}\n\t}", "title": "" }, { "docid": "b934e8fce71ba7c6c4190667b576517e", "score": "0.4694117", "text": "public function addEnums(\\google\\protobuf\\Enum $value){\n return $this->_add(5, $value);\n }", "title": "" }, { "docid": "b50dfeac3c68cd454b0c6789c274a1d6", "score": "0.46709278", "text": "public function addToJob_Classification_Group_Reference(\\WorkdayWsdl\\\\StructType\\Job_Classification_GroupObjectType $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\WorkdayWsdl\\\\StructType\\Job_Classification_GroupObjectType) {\n throw new \\InvalidArgumentException(sprintf('The Job_Classification_Group_Reference property can only contain items of type \\WorkdayWsdl\\\\StructType\\Job_Classification_GroupObjectType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);\n }\n $this->Job_Classification_Group_Reference[] = $item;\n return $this;\n }", "title": "" }, { "docid": "f0f08104022923a3c97957e680bf8794", "score": "0.46649054", "text": "public function addGroup(string $group)\n {\n $this->groups[] = $group;\n\n return $this;\n }", "title": "" }, { "docid": "ddc50bd94b1099873590540a6cd8b75b", "score": "0.4659386", "text": "public static function add($value, $before = null)\n {\n EnumHelper::add(static::typeName(), $value, $before);\n }", "title": "" }, { "docid": "c810bef384efbdaa9d9477ca66be3c54", "score": "0.46569312", "text": "private function setCustomerGroupValue()\n {\n $value = $this->getData(self::$customerGroupAttributeCode);\n try {\n $group = $this->groupRepository->getById($value);\n $this->setCustomAttribute(self::$customerGroupAttributeCode, $group->getCode());\n } catch (NoSuchEntityException $e) {\n $this->setCustomAttribute(self::$customerGroupAttributeCode, 'N/A');\n }\n }", "title": "" }, { "docid": "2e4269c3a924af8fa4b3bce75fe8c3ec", "score": "0.46551222", "text": "public function resolveItemGroup($group);", "title": "" }, { "docid": "d6772c199a563be8e1ad125b42f09d62", "score": "0.46460128", "text": "public function createItem(array $item_data, $group_id);", "title": "" }, { "docid": "304fc072c76ad47c9155aea169a986d3", "score": "0.46415773", "text": "public function testNewGroup() {\n $helper = new HelperSet();\n $command = \\Drupal::service('og.add_field');\n $commandTester = new CommandTester($command);\n $command->setHelperSet($helper);\n\n $fields = [\n [\n '--field_id' => 'og_audience',\n '--field_name' => 'og_group_ref',\n '--entity_type' => 'node',\n '--bundle' => 'article',\n '--target_entity' => 'node',\n ],\n [\n '--field_id' => 'og_audience',\n '--field_name' => 'og_audience',\n '--entity_type' => 'node',\n '--bundle' => 'article',\n '--target_entity' => 'node',\n ],\n ];\n\n foreach ($fields as $field) {\n $commandTester->execute($field);\n }\n\n $field_names = \\Drupal::service('og.group_audience_helper')->getAllGroupAudienceFields('node', 'article');\n $this->assertEquals(['og_group_ref', 'og_audience'], array_keys($field_names));\n }", "title": "" }, { "docid": "717cd4ad25432bb5f26af3f6c42faa79", "score": "0.46391794", "text": "private function addGroupToList($groupNum) : void\n {\n if(!in_array($groupNum, $this->groupsList)){\n $this->groupsList[] = $groupNum;\n }\n }", "title": "" }, { "docid": "db58b20924ebbbcc055f3884257b78fe", "score": "0.46391407", "text": "public function createGroup();", "title": "" }, { "docid": "128ef34c59aa59e47fe68fa280f7cfff", "score": "0.463506", "text": "public function addMember($group)\n\t{\n\t\t$cli = $this->ConnectToCG();\n\t\t$members = $cli->GetGroup($group);\n\t\t$members = $members['Members'];\n\t\tif ($members == 'NO') {\n\t\t\t$members = array();\n\t\t}\n\t\tarray_push($members, $this->groupMember);\n\t\t$settings = $cli->GetGroup($group);\n\t\t$settings['Members'] = $members;\n\t\t$cli->SetGroup($group, $settings);\n\n\t}", "title": "" }, { "docid": "be457c7f479feae005f49e54e3411922", "score": "0.4634766", "text": "protected function type_to_group($type)\n {\n }", "title": "" }, { "docid": "4d70d730831f733808837a527b5f9109", "score": "0.46346048", "text": "public function addItemAction()\n {\n Config::getInstance()->lock();\n $overlay = [];\n $ifnames = [];\n foreach ($this->getModel()->lagg->iterateItems() as $node) {\n $ifnames[] = (string)$node->laggif;\n }\n for ($i = 0; true; ++$i) {\n $laggif = sprintf('lagg%d', $i);\n if (!in_array($laggif, $ifnames)) {\n $overlay['laggif'] = $laggif;\n break;\n }\n }\n $result = $this->addBase(\"lagg\", \"lagg\", $overlay);\n if ($result['result'] != 'failed') {\n $this->stashUpdate($overlay['laggif']);\n }\n return $result;\n }", "title": "" }, { "docid": "0b1af11d585722e9cbca63b059651588", "score": "0.46332565", "text": "public function groups_add(): void\n {\n $response = $this->check_request('Add group');\n if (!$response) {\n $groupid = input_request('groupid');\n $type = input_request('type');\n if ($groupid) {\n if (!is_numeric($groupid)) {\n $response = $this->get_response(true, 'Bad group number');\n } else {\n $group = TableGroups::findByID($groupid);\n if ($group) {\n $response = $this->get_response(true, 'Group exists');\n } elseif ((BC_GROUP_CLUB == $type) && ($groupid >= 1000)) {\n $response = $this->get_response(true, 'Group must be in the range 1 to 999');\n } elseif ((BC_GROUP_SELECT == $type) && ($groupid < 1000)) {\n $response = $this->get_response(true, 'Group must be in the range 1000 to 1999');\n } elseif ((BC_GROUP_WORDPRESS == $type) && ($groupid < 2000)) {\n $response = $this->get_response(true, 'Group must be in the range 2000 to 2999');\n } elseif ((BC_GROUP_ANNOUNCEMENTS == $type) && ($groupid < 3000)) {\n $response = $this->get_response(true, 'Group must be above 2999');\n }\n }\n }\n if (!$response) {\n $groupid = $this->insert($groupid, $type, input_request('tag'),\n input_request('desc'));\n $this->log_info(\"Group added $groupid\");\n $response = $this->get_response(false, 'Group added');\n $response['group_id'] = $groupid;\n }\n }\n exit(json_encode($response));\n }", "title": "" }, { "docid": "60feb2307d4bdae34602259e1e967686", "score": "0.463154", "text": "public function testAddLanguageGroup() {\n $languageGroup = new LanguageGroup();\n $languageGroup->setGroupName('group1');\n $languageGroupCreated = $this->localizationDao->addLanguageGroup($languageGroup);\n $result = ($languageGroupCreated instanceof LanguageGroup) ? true : false;\n $this->assertTrue($result);\n $this->assertEquals($languageGroupCreated->getGroupName(), 'group1');\n }", "title": "" }, { "docid": "62ec9a75d8e6add1c146cda92158719e", "score": "0.4626971", "text": "public function addGroupedItems($groupedItems)\n {\n $this->groupedItems = Collection::make($groupedItems);\n }", "title": "" }, { "docid": "c798b697b5fdc0165cc0983e38c1c5a3", "score": "0.46255553", "text": "public function add_group( $group ) {\r\n\t\tif ( ! ( $group instanceof Minify_Group ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$group->set_type( $this->type );\r\n\t\t$this->groups[] = $group;\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "490fc2ff42553d4b164fb8fd32034ca8", "score": "0.4625304", "text": "public function Add()\n\t{\n\t\t$this->_processInsertGroup();\n\t}", "title": "" }, { "docid": "8d6069a23d1316eac86a0d935fbdeb62", "score": "0.46231154", "text": "public function testAddGroup()\n {\n $group = Admin_Controller_Group::getInstance()->create($this->objects['initialGroup']);\n \n $this->assertEquals($this->objects['initialGroup']->id, $group->id);\n }", "title": "" }, { "docid": "9fe55de8bff070c2d38e7d3411528a63", "score": "0.46228147", "text": "abstract public function AddGroup( string $name, string $description = null ) : array;", "title": "" }, { "docid": "dcb9bed37db08d55fc246b6d5687dc82", "score": "0.46185637", "text": "public function setGroup(?Group $value): void {\n $this->getBackingStore()->set('group', $value);\n }", "title": "" }, { "docid": "64f601bce9324962b594f2fd29208f20", "score": "0.46179378", "text": "public function setGroup(string $group): void;", "title": "" }, { "docid": "5bd0f24f0edd7d9a724ce21b5a955f87", "score": "0.46144783", "text": "public function addGroup(GroupEntity $group)\n {\n $group->addUser($this);\n $this->groups[] = $group;\n }", "title": "" }, { "docid": "72ebb6c3ff09dca6bc83b99bbe8af61f", "score": "0.46059126", "text": "public function store(ItemGroupRequest $request)\n {\n $item = new ItemGroup();\n $item->group_code = $request->group_code;\n $item->group_name = $request->group_name;\n $item->save();\n\n $zone = $request->input('zone');\n $item->zones()->attach($zone);\n\n $message = ['status' => 'success', 'content' => 'Create item group successfully'];\n return response()->json(['url'=> route('items.index'), 'message' => $message], 200);\n\n }", "title": "" }, { "docid": "07824fc2f266e3be092a59364d0c78c8", "score": "0.4604391", "text": "function nl_email_group_add($i_email_id, $i_group_id) {\r\n\t\t$res_id = 1;\r\n\t\t//if this group was already added to current letter, then skip later steps\r\n\t\tif (nl_check_email_id_group_id($i_email_id, $i_group_id) > 0)\r\n\t\t\t$res_id = -1;\r\n\t\t//if current group wasn't added to this email, then add it\r\n\t\tif ($res_id > 0)\r\n\t\t\tRunSQL('INSERT INTO `nl_email_group` (`nl_email_id`, `nl_group_id`)\r\n\t\t\tVALUES ('.sqlValue($i_email_id).', '.sqlValue($i_group_id).')');\r\n\t}", "title": "" }, { "docid": "b0c5a48326d809df221e7dabe3bbcea3", "score": "0.4602399", "text": "public function add_user_to_group($user, $group);", "title": "" }, { "docid": "8cedf8086435147a14340cd21f56a948", "score": "0.45850146", "text": "public function addGroup(\\HSE\\Labor\\Domain\\Model\\Group $group) {\n\t\t$group->setModule($this);\n\t\t$this->groups->add($group);\n\t}", "title": "" }, { "docid": "633e3685181f1c8fd708ca671794bff5", "score": "0.45690882", "text": "function pi_create_grouped_item_list($items, $group_field)\n{\n\t$return_array=array();\n\tforeach($items as $key => $item)\n\t{\n\t\t$group_key = $item[$group_field];\n\t\tif(!array_key_exists($group_key, $return_array))\n\t\t{\n\t\t\t$return_array[$group_key]=array();\t\t\n\t\t}\n\t\t$return_array[$group_key][$key] = $item; \n\t}\n\treturn $return_array;\n}", "title": "" }, { "docid": "8359a706d7afd2c65cfe33d54b2b31cd", "score": "0.45683408", "text": "public function add($itemToAdd);", "title": "" }, { "docid": "f9b7693c1dc2134b3010f3b0b3b3b377", "score": "0.45653126", "text": "protected function fillGroupingValues($item)\n {\n // Check for grouping values non filled\n if (!empty($this->groupingValues)) {\n return;\n }\n\n $group = $this->aggregator->getGroupingRules()->get($this->level-1, []);\n foreach ($group as $groupingField) {\n $this->groupingValues[$groupingField] = $this->getItemValue($item, $groupingField);\n }\n }", "title": "" }, { "docid": "08c3d9feaf470ea41f4f4ee69ccb433f", "score": "0.4563591", "text": "public function addGroup($group) {\n\t\t$this->addClause ( 'group_by', $group );\n\t}", "title": "" }, { "docid": "55329874020aa92d75e29bb7c07e10b4", "score": "0.45604056", "text": "private function addGift(int $day, string $item): void\n {\n $newGift = end($this->gifts) ?: [];\n array_unshift($newGift, $item);\n $this->gifts[$day] = $newGift;\n }", "title": "" }, { "docid": "8923a87392e518958004c7db5c0f5bd7", "score": "0.45585787", "text": "function addAdGroup(\n $name,\n $campaignId,\n $status,\n $keywordMaxCpc,\n $siteMaxCpm,\n $keywordContentMaxCpc = 0\n ) {\n $soapClients = &APIlityClients::getClients();\n $someSoapClient = $soapClients->getAdGroupClient();\n // google server calls active adgroups enabled adgroups so rename if\n // necessary\n if (strtolower($status) == \"active\") $status = \"Enabled\";\n // think in micros\n // danger: we need to have keywordMaxCpc XOR siteMaxCpm, so we need to set either\n // keywordMaxCpc or siteMaxCpm to a value different from zero\n if ($keywordMaxCpc > 0) {\n $keywordMaxCpc = $keywordMaxCpc * EXCHANGE_RATE;\n $maxCpWhateverXml = \"<keywordMaxCpc>\".$keywordMaxCpc.\"</keywordMaxCpc>\";\n }\n else {\n $siteMaxCpm = $siteMaxCpm * EXCHANGE_RATE;\n $maxCpWhateverXml = \"<siteMaxCpm>\".$siteMaxCpm.\"</siteMaxCpm>\";\n }\n $keywordContentMaxCpc = $keywordContentMaxCpc * EXCHANGE_RATE;\n if ($keywordContentMaxCpc > 0) {\n $keywordContentMaxCpcXml = \"<keywordContentMaxCpc>\".$keywordContentMaxCpc.\"</keywordContentMaxCpc>\";\n }\n else {\n $keywordContentMaxCpcXml = \"\";\n }\n\n $soapParameters = \"<addAdGroup>\n <campaignId>\".$campaignId.\"</campaignId>\n <newData>\n <status>\".$status.\"</status>\n <name>\".$name.\"</name>\"\n .$maxCpWhateverXml.\"\"\n .$keywordContentMaxCpcXml.\"\n </newData>\n </addAdGroup>\";\n // add the adgroup to the google servers\n $someAdGroup = $someSoapClient->call(\"addAdGroup\", $soapParameters);\n $soapClients->updateSoapRelatedData(extractSoapHeaderInfo($someSoapClient->getHeaders()));\n if ($someSoapClient->fault) {\n pushFault($someSoapClient, $_SERVER['PHP_SELF'].\":addAdGroup()\", $soapParameters);\n return false;\n }\n return receiveAdGroup($someAdGroup['addAdGroupReturn']);\n }", "title": "" }, { "docid": "bd88f96e38663bf3ce36e3943d1e2f69", "score": "0.45478025", "text": "public function getVehicleGroup()\n {\n return isset($this->VehicleGroup) ? $this->VehicleGroup : null;\n }", "title": "" }, { "docid": "de17f39d5066d7ffeb89e1311e1f2e3c", "score": "0.4539966", "text": "public function setGroup($value){\n if(is_int($value) && $value < 5){\n $this->group = $value;\n }\n }", "title": "" }, { "docid": "60f81cc86dfdaa53f7ed9dadb7c4015a", "score": "0.45339867", "text": "public function setGroup($value) {\n if (!($value > 1 && $value < 4)) {\n throw new Exception('Expected group value : 1,2,3 or 4');\n }\n $this->group = $value;\n }", "title": "" }, { "docid": "d70b027723bc35978a3435a7f2834d9c", "score": "0.45313838", "text": "public function setGroup($group);", "title": "" }, { "docid": "be1dd2a69598d7800dcd42b9cf7b4cab", "score": "0.45254275", "text": "public function testAddLanguageGroupEx() {\n try {\n $langGroup = new LanguageGroup();\n $langGroup->setId(1);\n $langGroup->setGroupName('group_1');\n\n $langGroupCreated = $this->localizationDao->addLanguageGroup($langGroup);\n } catch (Exception $ex) {\n return;\n }\n\n $this->fail('An expected exception has not been raised.');\n }", "title": "" }, { "docid": "82b3b340eaeaf5d724d595ebf5e3e587", "score": "0.45112583", "text": "public function addGroup($login, $groupName)\n {\n // First be sure the lis ot groups we have is up to date.\n $this->reLoadAdmins();\n self::$groupList[] = new Group($this->escapeSpecials($groupName), false);\n $this->saveFile();\n }", "title": "" }, { "docid": "543534f0ffc1f4adfe02dd19735eede6", "score": "0.45075586", "text": "public function add($item)\n {\n if (!$item instanceof OptionValue) {\n throw new AddObjectTypeException(\n 'OptionPossibleValuesList only accepts objects of type OptionValue.',\n 5085\n );\n }\n $this->elements[] = $item;\n }", "title": "" }, { "docid": "83ea4eaa1cf92a852cf99107e4ac51a2", "score": "0.45054987", "text": "public function attachGroup(DataSymbol $groupSymbol, bool $createIfNotExists = true): void;", "title": "" }, { "docid": "4de6693145f219cc03828a021380c13e", "score": "0.4505154", "text": "public function addItem($type, $value)\n {\n if (isset($this->{$type}) && ! in_array($value, $this->{$type})) {\n $this->{$type}[] = $value;\n } else {\n if (! isset($this->{$type})) {\n $this->{$type} = $value;\n }\n }\n }", "title": "" }, { "docid": "ded62a5767a97ef2a09b76a87375a5ad", "score": "0.45034024", "text": "abstract public function handleGroupItem(string $class): void;", "title": "" }, { "docid": "02f297208a088814ea111fb1abd7452f", "score": "0.45002872", "text": "public function addToRoomAttribute($item)\n {\n // validation for constraint: enumeration\n if (!\\EnumType\\HotelReviewRoomAttribute::valueIsValid($item)) {\n throw new \\InvalidArgumentException(sprintf('Value \"%s\" is invalid, please use one of: %s', $item, implode(', ', \\EnumType\\HotelReviewRoomAttribute::getValidValues())), __LINE__);\n }\n $this->RoomAttribute[] = $item;\n return $this;\n }", "title": "" }, { "docid": "55bcb130253cecd98987814c095d5034", "score": "0.4489871", "text": "public function add_group()\n\t{\n\t\tif($this->isloggedIn())\n\t\t{\n\t\t\t$group = $this->session->userdata['role'];\n\t\t\t$data['menu'] = $this->Menu_model->getMenuItems($group);\n\t\t\t$data['company_info'] = $this->Settings_model->get_company_info();\n\t\t\t$data['groups'] = $this->Users_model->get_all_user_groups();\n\t\t\t//echo '<pre>'; print_r($data['groups']); exit;\n\t\t\t$data['active_groups'] = $this->Login_model->get_active_groups();\n\t\t\t$data['title'] = $data['company_info']['name'].\" | Add Group\";\n\t\t\t$this->load->view(\"backend/users/add_group\", $data);\n\t\t}\n\t\telse {\n\t\t\tredirect(base_url());\n\t\t}\n\t}", "title": "" }, { "docid": "f08e443e459779e13d6089bd1f7c65a1", "score": "0.4488264", "text": "public function add($_item)\n\t{\n\t\treturn XiGlobalFundamentalsTypeGlobalFundamentalTypes::valueIsValid($_item)?parent::add($_item):false;\n\t}", "title": "" } ]
a6ed60a467a32112a040103942580a87
Test if loggedin cannot view login page.
[ { "docid": "185d243196a7df5f0c07d663598f6d47", "score": "0.7922523", "text": "public function testCannotViewLoginIfLoggedIn()\n {\n $user = factory(User::class)->create([\n 'email' => '[email protected]',\n 'password' => bcrypt('testing')\n ]);\n\n $this->actingAs($user)->visit('/')->visit('/login')->seePageIs('/');\n }", "title": "" } ]
[ { "docid": "a06e744936cc517359de2899463cae90", "score": "0.77056414", "text": "public function testNotLoggedInUser() {\n $this->visit('/dashboard')\n ->seePageIs('/auth/login')\n ->visit('/categories')\n ->seePageIs('/auth/login')\n ->visit('/calendar')\n ->seePageIs('/auth/login')\n ->visit('/analytics')\n ->seePageIs('/auth/login');\n }", "title": "" }, { "docid": "1e21a239e500b338bd236974690331e8", "score": "0.73718566", "text": "private function notLoggedInRedirection()\r\n {\r\n if (! $this->auth->hasIdentity()) {\r\n \r\n $this->logoutCondition();\r\n //$this->getredirect()->toRoute(\"client_login\");\r\n }\r\n }", "title": "" }, { "docid": "3c2948c994259aa18f6d35ddb1a3c6d2", "score": "0.7313655", "text": "public static function noAccess(){\n\t\t// Checking if the user is logged in\n\t\tif(!self::loggedIn(self::$user_login)){\n\t\t\t$url = URL::currentPage() != \"logout\" ? \n\t\t\tself::$login_page.\"&\".self::$redirect.\"=\".URL::currentPage() : \n\t\t\tself::$login_page;\n\t\t\t\n\t\t\tCheck::redirect($url);\n\t\t}\n\t}", "title": "" }, { "docid": "29f2f036d2c59199c85dd9a4b6684e44", "score": "0.71453315", "text": "public function testNonPrivilagedPages()\n {\n //action\n $return = $this->getJson('api/user/status')->error;\n\n //assert\n $this->assertEquals('Invalid Credentials', $return->message);\n $this->assertResponseStatus(401);\n }", "title": "" }, { "docid": "589a7e74d7b09bbb6a4e5a25c2340617", "score": "0.71285635", "text": "public static function preventUnauthorisedLogin()\n {\n if (!self::isLoggedIn())\n {\n Authenticate::logout();\n }\n//protects the student section\n //self::redirect();\n\n\n }", "title": "" }, { "docid": "346334f15c4abaecfa1f2ec79daf3806", "score": "0.710798", "text": "protected function logged_in_required()\n\t{\n\t\tif ($this->auth->logged_in() == FALSE)\n\t\t{\n\t\t\tthrow HTTP_Exception::Factory(401, 'Login to access this page!');\n\t\t}\n\t}", "title": "" }, { "docid": "ec4eef988d8060dad3f09311a0824859", "score": "0.7104948", "text": "static function ForcedLogin(){\r\n\t\tif(isset($_SESSION['user_id'])){\r\n\t\t\t// User is allowed on this page\r\n\t\t} else{\r\n\t\t\t// The user is not allowed on this page\r\n\t\t\theader(\"Location: /login.php\"); exit;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "24da942403f8a635a9e9a84b42467976", "score": "0.71005756", "text": "function restrict()\n\t{\n\t\tif($this->is_logged_in() == false)\n\t\t{\n\t\t\tredirect('home/login');\n\t\t}\n\t}", "title": "" }, { "docid": "52aa8bfac40f649f830519c02c0be3fe", "score": "0.70688367", "text": "public static function onlyForLogged() {\n if (!Session::get('logged')) {\n (new ErrorController)->pageNotFound(\"Page doesn't exists!\");die;\n }\n }", "title": "" }, { "docid": "8d53f8dac3379a32456a831aae5274bb", "score": "0.6998558", "text": "public function check_login()\n\t{\n\t\tif(!UID)\n\t\t\tredirect(\"login\");\n\t}", "title": "" }, { "docid": "25428614f6f73e4c6aa9ca15e0ad98fc", "score": "0.69787854", "text": "function private_page(){\r\n\t\t$this->user->on_invalid_session('login');\r\n\t\t\r\n\t\t// ... else he will view home\r\n\t\t$this->load->view('home');\r\n\t}", "title": "" }, { "docid": "b9ae0f191f59cc907b5a58bb0beffb54", "score": "0.69542855", "text": "protected function isUserAllowedToLogin() {}", "title": "" }, { "docid": "b9ae0f191f59cc907b5a58bb0beffb54", "score": "0.69542855", "text": "protected function isUserAllowedToLogin() {}", "title": "" }, { "docid": "1595ed62e121083dc48e607ef1b7018c", "score": "0.6949481", "text": "public function checkLoginStatus() {\n\t\tif (!LoginSession::currentUser()->canViewSite()) {\n\t\t\theader('Location: ' . BASE_URL . '/login');\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "60d52999f5e014f74ef8b88718358a2f", "score": "0.69136643", "text": "public function loginUserConditionMatchIfUserIsNotLoggedIn() : void {}", "title": "" }, { "docid": "7af2c962eb8832318ea775fbfde2f583", "score": "0.6888517", "text": "public function testIsLoggedIn()\n {\n self::assertFalse($this->guard->isLoggedIn(), 'worked with no input.');\n\n // 2. Test with bad input\n $_SESSION['userInfo'] = uniqid();\n self::assertFalse($this->guard->isLoggedIn(), 'worked with bad input.');\n\n // 3. Test with good input\n self::simulateLogin();\n self::assertTrue($this->guard->isLoggedIn(), 'didn\\'t work with good input.');\n }", "title": "" }, { "docid": "80a3f09edcc27cc7859f4a4e725dce8f", "score": "0.6881188", "text": "public function redirect_is_not_loggedin() {\n\t\t\t// Si el no esta logueado y entra en la pagina del perfil lo redireccionamos al login\n\t\t\tif ( ( ! is_user_logged_in() ) && is_page( $this->page_profile_id ) ) {\n\t\t\t\twp_redirect( get_permalink( $this->page_login_id ));\n\t\t\t\texit;\n\t\t\t} \n\t\t}", "title": "" }, { "docid": "9434675e4f9c405eaab9d7e6d68be58b", "score": "0.6875474", "text": "function testInvalidLogin() \n {\n global $webUrl;\n global $SUPER_USER_NAME;\n global $lang;\n \n // Login with invalid user name.\n $this->login($this->_invalidUserName, $this->_invalidPassword, \"$webUrl/login.php\");\n \n // Verify the error messages.\n $this->assertWantedText($lang['strloginfailed']);\n \n // Login with valid username and invalid password.\n $this->login($SUPER_USER_NAME, $this->_invalidPassword, \"$webUrl/login.php\");\n \n // Verify the error messages.\n $this->assertWantedText($lang['strloginfailed']);\n \n return TRUE;\n }", "title": "" }, { "docid": "fc5d6fe3bbf29043562fad04f0a6223a", "score": "0.6874534", "text": "function ifNotAdmin()\n {\n if (!isAdmin()) {\n return $this->goToUrl(loginUrl(), \"<br>Access protected! Only Admin can access\", DANGER);\n }\n }", "title": "" }, { "docid": "49f1f72a55d4f1129037dd1100378898", "score": "0.68702924", "text": "public function testNotLoggedLoginAction()\n {\n $this->dispatch('backend/admin/auth/login');\n /** @var $backendUrlModel \\Magento\\Backend\\Model\\UrlInterface */\n $backendUrlModel = \\Magento\\TestFramework\\Helper\\Bootstrap::getObjectManager()->get(\n \\Magento\\Backend\\Model\\UrlInterface::class\n );\n $backendUrlModel->turnOffSecretKey();\n $url = $backendUrlModel->getUrl('admin');\n $this->assertRedirect($this->stringStartsWith($url));\n }", "title": "" }, { "docid": "ad1cfa738dd6e94a59ff58cd2f0aa753", "score": "0.68589646", "text": "public function testNotAuthenticatedYet()\n {\n $response = $this->get('/login');\n\n // Redirect is expected since we're not logged in\n $response->assertStatus(302);\n $response->assertRedirect('/login');\n }", "title": "" }, { "docid": "84aa25ec72be8c542a0698eec8a619b6", "score": "0.68549365", "text": "private function checkLogin() {\n\t\t\n\t\tif ( ! $this->user_model->isLoggedIn() )\n\t\t\tredirect( base_url() . 'admin' );\n\n\t}", "title": "" }, { "docid": "b0308cb67b9a9c4b070b73bb33bd475a", "score": "0.68463445", "text": "public function test_guest_cant_see_page() {\n\t\t$this->get(action('Admin\\ShiftController@index'))->assertRedirect(action('Auth\\LoginController@login'));\n\t}", "title": "" }, { "docid": "7baa8717956dec20cd436c41436a1354", "score": "0.68436867", "text": "public function isPageLogin()\n {\n return self::getURI( self::URI_PAGE ) == self::PAGE_LOGIN || !self::getURI( self::URI_PAGE );\n }", "title": "" }, { "docid": "17882f94fc7c4d030b6e82d978d8f05d", "score": "0.68423134", "text": "public function loginCheckAction()\n {\n throw new \\LogicException(\"You should not view this page !\");\n }", "title": "" }, { "docid": "e2eb295103f421b21216cff3eafb65fd", "score": "0.6806561", "text": "public function testLoginPage()\n {\n $this->visit('/auth/login')\n ->see('Login')\n ->see('Forgot password?')\n ->dontSee('Welcome to your Dashboard.');\n }", "title": "" }, { "docid": "c78331f76cc0b542be91c7836927b45a", "score": "0.6806479", "text": "public static function requireLogIn()\n {\n if (!Auth::isLoggedIn()) {\n die(\"<a href='../login.php'>log in </a>to see this page\");\n }\n }", "title": "" }, { "docid": "ee8eb7a3e602cfca7c4f09b04c897cc0", "score": "0.68026173", "text": "public function testNotAuthenticated()\n {\n // Create a user\n $user = User::create([\n 'password' => Hash::make('password'),\n 'email' => '[email protected]',\n 'name' => 'John Doe',\n ]);\n\n // Login that user in\n Auth::login($user);\n\n // Get the login page\n $response = $this->get('/login');\n\n // Asser user is logged in now\n $this->assertAuthenticatedAs($user);\n\n // Redirect is expected since we're logged in\n $response->assertStatus(302);\n $response->assertRedirect('/rooms/edit');\n }", "title": "" }, { "docid": "456be1b7ae559da8aa5167c92e0c4caf", "score": "0.67769074", "text": "public static function loginCheck()\n {\n if (isset($_SESSION['admin_logged_in'])) {\n return true;\n } else if (isset($_SESSION['user_logged_in'])) {\n return true;\n } else {\n return false;\n // Better no direct to login page for security\n // $ERROR = 'SORRY. You have insufficient credentials to use this page.';\n // require_once '_fb/403_2.html';\n // exit();\n }\n }", "title": "" }, { "docid": "410afc6f2dd6d9414e16d708bc5fe407", "score": "0.67662215", "text": "public function logged_out_protect(){\n if($this->logged_in() === false){\n header('Location:index.php');\n exit();\n }\n }", "title": "" }, { "docid": "0e825bf793c49ccd92df6c51518563a1", "score": "0.67579925", "text": "public function test_guest_user_cannot_view_patient_page()\n {\n $response = $this->get('/patients');\n\n $response->assertRedirect('/login');\n $this->assertGuest();\n }", "title": "" }, { "docid": "11f0e48e8bd29c6f51b46e09e94f2421", "score": "0.6750909", "text": "function protect_page() {\n\tif(logged_in() == false) {\n\t\theader(\"Location: nosession.php\");\n\t\texit();\n\t}\n}", "title": "" }, { "docid": "9a5e9987279eaadd6ad84f10a3ec2ca1", "score": "0.6734506", "text": "public function testHomePageForUnauthenticatedUsers()\n {\n $this->visit('/admin')\n ->seePageIs('/register');\n }", "title": "" }, { "docid": "0084f67b22926108b48cebd38d61fbe3", "score": "0.672901", "text": "public function testPermisions()\r\n {\r\n \t// 1. if user is not logegd in, redirect to login with message\r\n \tif($this->Session->loggedIn() === false || $this->Session->hasPermission(1) !== true) {\r\n \t\t$this->Session->setError($this->Lang->get('application_notlogged_in'));\r\n \t\tHelper::redirectTo('/account/index/login/');\r\n \t\texit;\r\n \t}\r\n }", "title": "" }, { "docid": "5675a3b4ac9083e34b3e03d787be7cd0", "score": "0.6726262", "text": "private function _mustLoginValidation(){\n ($this->session->userdata('isLogin') == 1) ?\n\t\t\t: (redirect(base_url(), 'refresh'));\n\t}", "title": "" }, { "docid": "5d2fa1497658b4cc2e0fab577ae71ef0", "score": "0.67003566", "text": "private function checkAccess()\n {\n if(Yii::$app->user->isGuest) {\n \n Yii::$app->session->setFlash('danger', Yii::t('login','Please, login to continue...'));\n return $this->redirect(['/user/default/login']);\n }\n }", "title": "" }, { "docid": "414a36d06d4d2ae799d8bc6e43301833", "score": "0.6693873", "text": "protected function _testLogin() {\n\t\t$actor = $this->openBrowserPage();\n\n\t\t$actor->login();\n\n\t\t$actor->seeElement( '#wpadminbar', 'Could not login.' );\n\t}", "title": "" }, { "docid": "c9a48f486c64d16880087e8763934dc9", "score": "0.66715837", "text": "function check_valid_user(){\n\t\tif(isset($_SESSION['valid_user'])){\n\t\t\treturn true;\n\t\t}else {\n\t\t\t//they are not logged in\n\t\t\techo \"PROBLEM. You are not logged in.<br />\";\n\t\t\tdo_html_URL('index.php','Login');\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "806432e98715fcb1e98c6de7b9d44e85", "score": "0.666924", "text": "protected function _enforceLogon() {\n\t\tif(!$this->loggedIn) {\n\t\t\t$this->Incident->reportIncident(\"Permission Error: Guest is attempting access to a Logon-Enforced Page\", \"core/user, permissions\", 1);\n\t\t\t$this->redirect($this->Iris->siteURL(\"/pages/404\"));\n\t\t}\n\t}", "title": "" }, { "docid": "ff5d8daf3a644a7958a4f7cbf5b0be35", "score": "0.66672164", "text": "public function test_user_is_not_logged()\n {\n $response = $this->withSession(['banned' => false])\n ->get('/pianificazioneproduzione/creapianificazioneform');\n\n $response->assertStatus(302);\n }", "title": "" }, { "docid": "b04f1ac203b8768c40909c903579c708", "score": "0.6667134", "text": "private function checker()\n {\n if (isset($_SESSION['username'])) {\n return true;\n } else {\n $this->load->view(\"login\");\n return false;\n }\n }", "title": "" }, { "docid": "7763b871c1bdda8bc6bf717656e07573", "score": "0.6662896", "text": "function is_logged_in()\r\n\t{\r\n\t$is_logged_in = $this->session->userdata('is_logged_in');\r\n\t\r\n\tif(!isset($is_logged_in) || $is_logged_in != true){\r\n\t\techo 'you don\\'t have permission to access this page.';\r\n\t\t redirect('pages/login');\r\n\t\tdie();\r\n\t\t}\t\r\n\t}", "title": "" }, { "docid": "9b267a1b4494c5943c0b5657f4cd2646", "score": "0.6659644", "text": "private function checkLogin(){\n\n\t\tif($this->s->isLoggedIn() == false){\n\t\t\t$this->v->setWelcomeMsg();\n\t\t\t$this->s->setLoggedIn();\n\t\t}\n\t\telse{\n\t\t\t$this->v->setClearMsg();\n\t\t}\n\t}", "title": "" }, { "docid": "066867e32e01ba51f4da3e2e57b76b27", "score": "0.6650382", "text": "public function testGuestCantAccess()\n {\n $this->get(route('admin.overnight_hours.index'))->assertRedirect('/login');\n $this->get(route('admin.overnight_hours.create'))->assertRedirect('/login');\n }", "title": "" }, { "docid": "4c8a611e5238a17784ed994ba3c300b5", "score": "0.6649967", "text": "function redirectIfNotLoggedIn() {\n include(\"public_urls.include.php\");\n\n if (in_array(basename($_SERVER[\"REQUEST_URI\"]), $allowableURLS) || isset($_SESSION[\"user_id\"])) {\n return;\n } else if (!isset($_SESSION[\"user_id\"])) {\n header(\"Location: /login.php\");\n die();\n }\n \t}", "title": "" }, { "docid": "39ed07eb34c6be9b0da6525022eda793", "score": "0.6642512", "text": "function pageProtection()\n{\n\tif (login() === false)\n\t{\n\t\theader('location: ../Pages/locked.php');\n\t\texit();\n\t}\n}", "title": "" }, { "docid": "fe5e25df02af601ef393e185f57b3bc5", "score": "0.6638082", "text": "public function isLoggedIn()\n {\n if (!$this->di->session->has(\"username\")) {\n $this->di->response->redirect('login');\n }\n }", "title": "" }, { "docid": "5a955d7f0e0292e78afa48913af84878", "score": "0.6634496", "text": "public static function ForceLogin(){\n if (isset($SESSION['user_id'])){\n //the user is allowed here\n }else{\n //not allowed here\n // redirect to login pagr\n header(\"Location:../Source/Login.php\");\n exit;\n }\n }", "title": "" }, { "docid": "485af05a64830bf60bf3d1ff7bfe2aab", "score": "0.6624052", "text": "public function isLoginRequired()\n {\n return true;\n }", "title": "" }, { "docid": "84ad5503ccb15911a3947094d84cd136", "score": "0.66228735", "text": "public function test_unathorized_user()\n {\n // => redirect to login page and get 302 status\n $response = $this->get('/panel');\n $response->assertStatus(302)\n ->assertRedirect('/panel/login');\n }", "title": "" }, { "docid": "80d40dc27fc869d2616eb886150fb7d9", "score": "0.66057706", "text": "public static function not_admin(){\n if(!isset($_SESSION['korisnik_id'])){\n header(\"Location:login.php\");\n }\n }", "title": "" }, { "docid": "0e0b547d28dd54f65c1a51f1c04c68ac", "score": "0.6604319", "text": "public final function isLoginDisabled()\n {\n $this->loginDisabled;\n }", "title": "" }, { "docid": "ecabb5872d3a6f6101e48a5fa8b97f2e", "score": "0.6593734", "text": "public function logged_in_protect(){\n if($this->logged_in() === true){\n header('Location: index.php');\n exit();\n }\n }", "title": "" }, { "docid": "3e255265732a8a60ec8466b73b3912a6", "score": "0.65936685", "text": "public function testBadLogin()\n {\n $client = $this->createClient();\n\n $crawler = $client->request('GET', '/auth/login');\n $form = $crawler->selectButton('login-submit')->form([\n 'username' => 'Johnny',\n 'password' => 'test'\n ]);\n\n // submit the form\n $client->submit($form);\n\n //Verify redirect back\n $crawler = $client->followRedirect();\n $this->assertEquals($crawler->getUri(), 'http://localhost/auth/login');\n }", "title": "" }, { "docid": "f094b9c0e4828cc0cb805614b7977b02", "score": "0.6587471", "text": "function checkLogin()\r\r\n\t\t{\r\r\n\t\t\tif(!$_SESSION['user_info']['user_id'] && $_SESSION['user_info']['user_id'] == NULL)\r\r\n\t\t\t{\r\r\n\t\t\t\t//go to login controller\r\r\n\t\t\t\tredirect(\"UsersController/login/sitelogin\");\r\r\n\t\t\t}\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t//ok, let go\r\r\n\t\t\t\treturn;\r\r\n\t\t\t}\r\r\n\t\t}", "title": "" }, { "docid": "425fe22e2f3716f772441a2c60521519", "score": "0.65873027", "text": "public function testUnauthenticatedHomePageTest()\n {\n $response = $this->get('/');\n\n $response->assertStatus(302);\n $response->assertRedirect('/login');\n }", "title": "" }, { "docid": "e633b9e738faa326e54fd2f548d86488", "score": "0.65841883", "text": "public function checkLoged()\n {\n if (!isset($_SESSION['loggedin'])) {\n header('Location: login.php');\n exit;\n }\n }", "title": "" }, { "docid": "af0eb4e4b11ce3bd6c844a8f749a5eac", "score": "0.6575567", "text": "private function check_current_user_and_log_out() {\n if (count($this -> user_login_data) > 0) {\n $data = $this -> user_login_data;\n if (count($data[0]) === 0) {\n //the logined user is not log in and it needs to be log out now\n header(\"location: \" . site_url());\n exit ;\n }\n }\n }", "title": "" }, { "docid": "cd0f3d0e0189935f28b511add9499d60", "score": "0.65487874", "text": "function __validateLoginStatus() {\r\n\t if($this->action != 'login' && $this->action != 'logout') { //make sure this function wasn't called from the login or logout functions\r\n\r\n\t\t//check if the admin or user is logged in, if they aren't then redirect to the employee login page\r\n\t\tif( ($this->Session->check('sessionUser') == false) && ($this->Session->check('sessionAdmin') == false) ) { \r\n\t\t $this->flash('You must login to view this page. ...redirecting...', '/users/login');\r\n\t\t} //end if\r\n\r\n\t\t//Check if a user is logged in, they must be redirected to the incidents component after logging in\r\n\t\tif( ($this->Session->check('sessionUser') == true) ){\r\n\t\t $this->redirect('/articles/');\r\n\t\t} //end if\r\n\r\n\t } //end if\r\n\t}", "title": "" }, { "docid": "32d9569a34b1ef7cf868b5841fe6e7cf", "score": "0.6545054", "text": "public function user_can_not_login()\n {\n $request = new UserLoginRequest([], [], ['email' => '[email protected]', 'password' => '123456']);\n $response = $this->authService->login($request);\n $this->assertInstanceOf(Json::class, $response);\n $arrayResponse = (array) json_decode($response->content());\n $this->assertArrayHasKey('message', $arrayResponse);\n }", "title": "" }, { "docid": "8b8caae1382c777dc424ae54ca425491", "score": "0.6541234", "text": "public function testDeniedAccessToPermissionIndexPageWithoutPermission()\n {\n $response = $this->get(route('admin.permissions.index'));\n\n $response->assertRedirect(route('login'));\n }", "title": "" }, { "docid": "2287c42f1bc3289b355547029af510cd", "score": "0.6540564", "text": "public function verify()\r\n\t{\r\n\t\tif ($this->session->userdata('isLoggedIn'))\r\n\t\t{\r\n\t\t\tif ($this->session->userdata('tipe') == \"Admin\")\r\n\t\t\t{\r\n\t\t\t\treturn TRUE;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->load->view('blank');\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->load->view('login');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5db44acb63a9c4e79a5d2b893c6dffc3", "score": "0.65366787", "text": "public static function verifyLogin() {\n if(empty($_SESSION)) {\n header(\"Location:/Treinamento2020/views/home.php\");\n }\n }", "title": "" }, { "docid": "5b67202353cc6722f0977d0f2b5d3f15", "score": "0.65323937", "text": "function is_logged_in()\r\n {\r\n $is_logged_in = $this->session->userdata('is_logged_in');\r\n\r\n /**\r\n * if information is not retrieved from session,\r\n * then user is has no permission to be in this page\r\n */\r\n if(!isset($is_logged_in) || $is_logged_in != true)\r\n {\r\n echo '<div style=\"width: 600px; margin: 20px auto;\"> ';\r\n echo '<h2>You don\\'t have permission to access this page</h2>';\r\n echo anchor('login', 'Login Now');\r\n echo '</div>';\r\n die();\r\n }\r\n }", "title": "" }, { "docid": "da3f54bf1430d7e3620f71ea3ac217fb", "score": "0.65295833", "text": "public function checkLogin($restricted = true) {\n\t\tif (! isset ( $_SESSION ['User'] ) && $restricted) {\n\t\t\t$_SESSION ['error'] = \"You must be logged in to access that page\";\n\t\t\t$this->redirect ( 'index.php' );\n\t\t\texit ();\n\t\t}\n\t}", "title": "" }, { "docid": "fd0e3afdb5cddcf9b820ff620d7360a8", "score": "0.65276265", "text": "public function loginRequired() {\n if (!$this->isLogged()) {\n $this->setError('You need to login.');\n $this->redirect('login.php');\n }\n }", "title": "" }, { "docid": "8b553c5abff709781e1339b9f86be54f", "score": "0.65265924", "text": "public static function checkAuthentication()\n {\n Session::init();\n\n // if user is not logged in, then destroy session, treat user as \"not logged in\" and redirect to login page\n if (!Session::userIsLoggedIn()) {\n Session::destroy();\n header('location: ' . URL . 'login');\n // to prevent fetching views via cURL (which \"ignores\" the header-redirect above) we leave the application\n // the hard way, via exit(). @see https://github.com/panique/php-login/issues/453\n exit();\n }\n }", "title": "" }, { "docid": "bdf61c858204d3c779044556e6811117", "score": "0.6516645", "text": "function require_login() {\n if(!is_logged_in()) {\n redirect_to(url_for('/sign-in.php'));\n } else {\n // Do nothing, let the rest of the page proceed\n }\n }", "title": "" }, { "docid": "b35df44dbccb5c1ad77f09f7600ca903", "score": "0.6516283", "text": "public function testRedirectToLoginIfUserNotAuthenticatedAndAccessToAdminHomeUrl()\n {\n $response = $this->call('GET', $this->adminHomeUrl);\n $response->assertStatus(302);\n }", "title": "" }, { "docid": "ae513395011ea251788273bd03d38dec", "score": "0.6515693", "text": "function access_denied()\n{\n global $user;\n\n $login_url =\n get_root_url().'identification.php?redirect='\n .urlencode(urlencode($_SERVER['REQUEST_URI']));\n\n set_status_header(401);\n if ( isset($user) and !is_a_guest() )\n {\n echo '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">';\n echo '<div style=\"text-align:center;\">'.lang('You are not authorized to access the requested page').'<br>';\n echo '<a href=\"'.get_root_url().'identification.php\">'.lang('Identification').'</a>&nbsp;';\n echo '<a href=\"'.make_index_url().'\">'.lang('Home').'</a></div>';\n echo str_repeat( ' ', 512); //IE6 doesn't error output if below a size\n exit();\n }\n else\n {\n redirect_html($login_url);\n }\n}", "title": "" }, { "docid": "865758d4100b60f0a4ba50c611f5e2c6", "score": "0.65057427", "text": "function verifyUserlogin(){\n if(isset($_SESSION['userID']) && !empty($_SESSION['userID'])){\n //Valid\n //Check For User Permission\n getView();\n } else{\n\n //No Valid\n header('Location: ../login/view/');\n }\n}", "title": "" }, { "docid": "29b9bd44de5fabf45afe4f700659fd73", "score": "0.6497941", "text": "private function userNotLoggedIn(): RedirectResponse\n {\n $this->addFlash(\n 'errors',\n 'Please login first!'\n );\n return $this->redirectToRoute('login');\n }", "title": "" }, { "docid": "817ea04a45b10e75fe8cb0e62841e774", "score": "0.6495081", "text": "public function loginUserConditionDoesNotMatchSingleLoggedInUser() : void {}", "title": "" }, { "docid": "91b9fd0b897c3ad43a38d5f05a391c7e", "score": "0.6489169", "text": "function testSpecialLogin() \n {\n global $webUrl;\n global $NORMAL_USER_NAME;\n global $lang;\n \n // Login with special user name \"postgres\".\n $this->login('postgres', $this->_invalidPassword, \"$webUrl/login.php\");\n \n // Verify the error messages.\n $this->assertWantedText($lang['strlogindisallowed']);\n\t\t$this->assertWantedText($lang['strviewfaq']);\n // Login with special user name \"postgres\".\n $this->login($NORMAL_USER_NAME, '', \"$webUrl/login.php\");\n \n // Verify the error messages.\n $this->assertWantedText($lang['strlogindisallowed']);\n $this->assertWantedText($lang['strviewfaq']);\n \n return TRUE;\n }", "title": "" }, { "docid": "c6c4135dabe8587c4e23e65aa51e27d2", "score": "0.6481805", "text": "function invalidlogin()\r\n\t\t{\r\n\t\t\t$lang = new language;\r\n\t\t\t$this->pagelayout .= '<br /><br /><br />\r\n<center>\r\n<table style=\"width: 200px\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n<tr>\r\n<td style=\"width: 100%; font-size: 16px; text-align: center\">\r\n<b>'.$lang->word_access_denied.'</b>\r\n</td>\r\n</tr>\r\n</table>\r\n</center>\r\n';\r\n\t\t\tunset($lang);\r\n\t\t}", "title": "" }, { "docid": "a6e712ec065fbcaec7944e0a702bc4b7", "score": "0.64723265", "text": "public function cantAccessAsGuest($uri)\n {\n $loggedUser = null;\n if (!Yii::$app->user->isGuest) {\n $loggedUser = Yii::$app->user->identity;\n Yii::$app->user->logout();\n }\n\n $this->amOnPage($uri);\n $this->seeResponseCodeIs(200);\n $this->expectTo('redirect to the login page');\n $this->seeCurrentUrlEquals(['site/entrance']);\n\n if ($loggedUser) {\n Yii::$app->user->login($loggedUser, 0);\n }\n }", "title": "" }, { "docid": "a29391c32fba7f0a5ec486a9807d2427", "score": "0.64705825", "text": "private function check_is_user_login()\n\t{\n\t\tif($this->session->userdata('logged_in') != FALSE)\n\t\t{\n\t\t\tredirect('home');\n\t\t}\n\t}", "title": "" }, { "docid": "be71761067ececd8c166ff4557bdadbd", "score": "0.64690816", "text": "public function notFound()\n {\n if ( !Session::exists('username') )\n header('location: ?p=admin&a=login');\n\n $this->util->getView('index');\n }", "title": "" }, { "docid": "b5740790ef600658f8624e3a83aae88e", "score": "0.64678323", "text": "public function test_permissions_page_response_without_login()\n {\n $response = $this->get('admin/permission');\n $response->assertRedirect('/admin-login');\n }", "title": "" }, { "docid": "53bf46ae1db75821bf536122f763151b", "score": "0.64612514", "text": "function test_authentication_page_no_user() {\n\t\tob_start();\n\t\t$this->provider->authentication_page( false );\n\t\t$contents = ob_get_clean();\n\n\t\t$this->assertEmpty( $contents );\n\t}", "title": "" }, { "docid": "88bdf89ef8fbb1752ce6736f37ff72e5", "score": "0.64590204", "text": "public function testUserCanViewLoginForm()\n {\n $response = $this->get('/login');\n $response->assertSuccessful();\n $response->assertViewIs('auth.login');\n }", "title": "" }, { "docid": "ddb46e243cf7ce15a0136d60eaeb4361", "score": "0.6450634", "text": "private function is_logged_in() {\n if ($this->session->userType == \"Caregiver\")\n return true;\n else {\n echo \"You are not allowed to access this page\";\n $this->output->set_header('refresh:3; url=' . base_url(\"AccountController/login\"));\n return false;\n }\n }", "title": "" }, { "docid": "05df87c4dfc7b0bf900952ea78331ec9", "score": "0.64441156", "text": "private function checkLoggedIn(){\n // Check if the user is not loggedIn, so change him to LoginPage\n if(!isset($_SESSION[\"loggedin\"])){\n header('Location: '.base_url('index.php/LoginController/index'));\n exit;\n }\n\n\n\n\n\n\n}", "title": "" }, { "docid": "809232d240fbd8406e59be1f0234666d", "score": "0.64429414", "text": "public function unauthorized()\n {\n if (isLoggedIn()) {\n http_response_code(401);\n return view('pages/unauthorized');\n } else {\n expiredSession();\n }\n }", "title": "" }, { "docid": "2da87ce56b31d56a60c83620972bcdd1", "score": "0.6430892", "text": "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "title": "" }, { "docid": "fce9249146479e1f2c64191d9904ca9a", "score": "0.6414043", "text": "public function loginUserConditionDoesNotMatchIfNotUserIsLoggedId() : void {}", "title": "" }, { "docid": "e17e1c61934b035f1be8fe032396902c", "score": "0.6411997", "text": "public function check_session(){\n\t\tif(! $this->session->userdata('logged_in')){\n\t\t\tredirect('login');\n\t\t}\n\t}", "title": "" }, { "docid": "3af8444ac6665343fa19221fa887aa52", "score": "0.6410018", "text": "function access_checker()\r\t{\r\t\t$ses = $_SESSION;\r\t $login = isset($ses['admin_login'])?$ses['admin_login']:false;\r\t \r\t\tif($login == true){\r\t\t\treturn true;\r\t\t}else{\r\t\t\theader('location: '.HTTP_PATH.'login');\r\t\t\tdie();\r\t\t}\t\r\t}", "title": "" }, { "docid": "45b353ce7054f203c628d6cda739b24e", "score": "0.6404718", "text": "public function testLoginError()\n {\n $crawler = $this->client->request('GET', '/logout');\n $crawler = $this->client->followRedirect();\n\n $crawler = $this->client->request('GET', '/login');\n\n $form = $crawler->selectButton('_submit')->form(array(\n '_username' => '[email protected]',\n '_password' => 'amicale',\n ));\n\n $this->client->submit($form);\n $crawler = $this->client->followRedirect();\n\n $this->assertContains('Erreur de connexion !', $this->client->getResponse()->getContent());\n }", "title": "" }, { "docid": "68baf70fd2d506f1991a37af1ac8850f", "score": "0.64040476", "text": "public function expect_loggedIn() {\n\t\tif ( ! $this->user_loggedIn() ) {\n\t\t\tthrow new Exception(\"Expected logged in user!\");\n\t\t}\n\t}", "title": "" }, { "docid": "ba50ae65d89b8476cd6c85104935fc92", "score": "0.6386319", "text": "function checkIfLoggedIn()\n {\n session_start();\n if(empty($_SESSION['LoginUser'])) // || empty($_SESSION['LoginPwd']))\n {\n header(\"location:mainLogin.html\");\n }\n }", "title": "" }, { "docid": "e17389353f26599389a5e79ad3ee2975", "score": "0.6383618", "text": "public function loginWithGuest() {\n\t\t$check = SecurityFacade::accessWithGuest ();\n if($check)\n\t\t return redirect ( '' );\n else return view('errors.404');\n\t}", "title": "" }, { "docid": "18cb4f275b2b841519bd73c071cb1a8a", "score": "0.63801", "text": "function is_logged_in() {\n $is_logged_in = $this -> session -> userdata('is_logged_in');\n $username = $this -> uri -> segment(3);\n \n if ((!isset($is_logged_in) || $is_logged_in != true)) {\n redirect('');\n }\n }", "title": "" }, { "docid": "ddacadffcea8c362caf2553450246f5b", "score": "0.6377489", "text": "public function skipPage() {\n\t\tglobal $wgRequest;\n\n\t\t$title = $wgRequest->getVal( 'title' );\n\t\tif ( ( $title == Title::makeName( NS_SPECIAL, 'UserLogout' ) ) ||\n\t\t\t( $title == Title::makeName( NS_SPECIAL, 'UserLogin' ) ) ) {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "97ac76ff15b9ced1c162ddc997834cbf", "score": "0.6373116", "text": "public function iShouldNotBeLoggedIntoTheSession()\n {\n $this->executeCommand('session:info');\n $output = $this->getOutput();\n Assert::assertRegExp('/live .*no/', $output);\n }", "title": "" }, { "docid": "bd3288dfc56b09bd4b1f00f2b7b3cd9d", "score": "0.6372027", "text": "private function checkIfUserLoggedIn()\n {\n if (!$this->getUser() instanceof UserInterface) {\n return $this->redirect($this->generateUrl('login'));\n }\n }", "title": "" }, { "docid": "cd5cebf62b54bae07b529ac49f06b0eb", "score": "0.63667315", "text": "public function testNewReportRequiresLogin()\n\t{\n\t\t$this->visit($this->pageUrl());\n\t\t$this->assertEquals('/auth?require-auth=1', $this->current_path());\n\t}", "title": "" }, { "docid": "ab74eb494ccebf4ea29fa8a85f959012", "score": "0.63627315", "text": "public static function checkLogin()\n {\n self::init();\n if (self::get(\"adminlogin\") == true) {\n header(\"Location:dashboard.php\");\n }\n }", "title": "" }, { "docid": "baa99e31b76e54369ab633d5f53aa673", "score": "0.6361402", "text": "public function testResourcesUserNoLog(){ //tests if the user can see the resources if they go directly to the index without being logged in \n\n\t\t$this->call('GET','/index');\n\t\t$this->see('Recursos usados recientemente');\n\n// the result should be false since the user can't visit index without being logged in.\n\n\t}", "title": "" }, { "docid": "d22b3f4685fb4d74ee4336575e8f7a2c", "score": "0.6360899", "text": "public function isPageValid()\n {\n return $this->context->getSession()->getPage()->has(\n 'css',\n self::LOGIN_FIELD_SELECTOR\n );\n }", "title": "" } ]
0b8c9dff861889fd79fce878f6dde17d
isSsl retourne vrai si l'uri est https
[ { "docid": "e7b3a9c23488ee236fc9306efed44a99", "score": "0.74502224", "text": "final public static function isSsl(string $uri,bool $decode=false):bool\n {\n return self::scheme($uri,$decode) === Http::scheme(true);\n }", "title": "" } ]
[ { "docid": "600cd21f2c741135ea839cdbe7b1e90b", "score": "0.8543353", "text": "public function ssl(): bool\n {\n return $this->url()->scheme() === 'https';\n }", "title": "" }, { "docid": "d85071d5c809da3388df0ccc1af2cefa", "score": "0.84884995", "text": "function _ssl(){\n\t$protocol = _protocol();\n\treturn ($protocol == 'https') ? true : false;\n}", "title": "" }, { "docid": "b1676ff3ed4175d5f5d5107560503ff4", "score": "0.83734787", "text": "public function isHttps();", "title": "" }, { "docid": "87a8cb8c6daa4295d2949567a2026253", "score": "0.8307128", "text": "public static function isSsl()\n {\n return getenv('HTTPS') == 'on';\n }", "title": "" }, { "docid": "44f7543b6cc78d5fb0b07d1df89bfc40", "score": "0.8291346", "text": "public function isSsl()\n {\n return isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] === true || $_SERVER['HTTPS'] == 'on');\n }", "title": "" }, { "docid": "eceebfa58e7093416deed5f6c284bbf9", "score": "0.828799", "text": "function isSsl() {\n\tif ( isset($_SERVER['HTTPS']) ) {\n\t\tif ( 'on' == strtolower($_SERVER['HTTPS']) )\n\t\t\treturn true;\n\t\tif ( '1' == $_SERVER['HTTPS'] )\n\t\t\treturn true;\n\t} elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {\n\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "a3554f03a5c1360771e9a70772fc8c20", "score": "0.82502073", "text": "public function isUsingSSL(): bool;", "title": "" }, { "docid": "efd5bb64dd006ea51e25576ee5d2155d", "score": "0.82048076", "text": "public static function ssl() {\n return array_key_exists( 'HTTPS', self::server() ) && self::server( 'HTTPS' ) == 'on';\n }", "title": "" }, { "docid": "adf5b18ab9b6932e03b0d237c87ad590", "score": "0.8178392", "text": "public function isSsl()\n {\n return (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443)) ? TRUE : FALSE;\n }", "title": "" }, { "docid": "c12872d048dd0b892e4e97cafb086bb3", "score": "0.8165558", "text": "public function isHttps(): bool;", "title": "" }, { "docid": "eb9077186efc1b2107d6956031e84426", "score": "0.8076901", "text": "public function isSSL(){\n if(!isset($_SERVER['HTTPS']))\n return FALSE;\n\n //Apache\n if($_SERVER['HTTPS'] === 1) {\n return TRUE;\n }\n //IIS\n elseif ($_SERVER['HTTPS'] === 'on') {\n return TRUE;\n }\n //other servers\n elseif ($_SERVER['SERVER_PORT'] == 443){\n return TRUE;\n }\n return FALSE;\n }", "title": "" }, { "docid": "245e7dba65c53b3737e8745696a1a886", "score": "0.80475", "text": "function detectSSL() {\n\treturn (strtolower($_SERVER[\"HTTPS\"]) !== \"off\" && (strtolower($_SERVER[\"HTTPS\"]) == \"on\" || $_SERVER[\"HTTPS\"] == true || $_SERVER['SERVER_PORT'] == 443)) ? true : false;\n}", "title": "" }, { "docid": "4a9cd70133cd42f7e31d5dc85972717a", "score": "0.80194193", "text": "function is_ssl() {\n if ( isset($_SERVER['HTTPS']) ) {\n if ( 'on' == strtolower($_SERVER['HTTPS']) )\n return true;\n if ( '1' == $_SERVER['HTTPS'] )\n return true;\n } elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "ab51b83b9df379537bcff316dcf70e60", "score": "0.7996234", "text": "public function isSecure()\n\t\t{\n\t\t\treturn $this->uri->getScheme() == 'https';\n\t\t}", "title": "" }, { "docid": "2f8d8cff6252174aa1d23e4655fb7938", "score": "0.7988951", "text": "public static function isSSL()\n {\n if (isset($_SERVER['HTTPS']) ) {\n if (strtolower($_SERVER['HTTPS']) === 'on')\n return true;\n if ($_SERVER['HTTPS'] == '1')\n return true;\n } elseif (isset($_SERVER['SERVER_PORT']) && ('443' == $_SERVER['SERVER_PORT'])) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "6ce17403f20452189cd525495742b281", "score": "0.79767966", "text": "public static function is_secure()\n\t{\n\t\treturn (static::protocol() == 'https');\n\t}", "title": "" }, { "docid": "030d56eeb8867500fa1bf350ff449e0d", "score": "0.7902392", "text": "function is_ssl() {\n if(isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') {\n return true;\n //\n } elseif(!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || !empty($_SERVER['HTTP_X_FORWARDED_SSL']) && strtolower($_SERVER['HTTP_X_FORWARDED_SSL']) == 'on') {\n return true;\n //\n }\n //\n return false;\n }", "title": "" }, { "docid": "66c61d7b818d0da4a96b714eb2f01517", "score": "0.7881375", "text": "public function isSecure() : bool\n {\n return $this->url->scheme === 'https';\n }", "title": "" }, { "docid": "cafd52bf7dfae2677875150c05d7f842", "score": "0.78702337", "text": "public static function isSecureUrl(){\n\t\treturn (!empty($_SERVER[self::HTTPS]) && $_SERVER[self::HTTPS] != self::OFF);\n\t}", "title": "" }, { "docid": "bf22f29421bea023b553824ce062f469", "score": "0.7850203", "text": "function is_ssl(){\n if (!isset($_SERVER['HTTPS']) ||\n preg_match('/^(|off|false|disabled)$/i',$_SERVER['HTTPS'])){\n return false;\n }else{\n return true;\n }\n}", "title": "" }, { "docid": "9ea34e41f40834553ab583b1bd625c3c", "score": "0.78498125", "text": "private function checkSecureUrl()\n {\n $custom_ssl_var = 0;\n\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": "e281cca20337debbfef96dfe627a7d20", "score": "0.7842463", "text": "public function isHttps()\n {\n return $this->https;\n }", "title": "" }, { "docid": "fd9362f2023313c88669c9e0d8be9c50", "score": "0.7838808", "text": "public function isSecure()\n {\n return strtolower($this->getScheme()) === 'https' ? true : false;\n }", "title": "" }, { "docid": "7f93d06246a5d9bb94463bbb92b2003b", "score": "0.7822193", "text": "public static function isHTTPS() {\n\n\t\t$url = self::getBaseURL();\n\n\t\t$end = strpos($url,'://');\n\t\t$protocol = substr($url, 0, $end);\n\n\t\tif ($protocol === 'https') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\n\t}", "title": "" }, { "docid": "e625581a4a0147b7a2caf173e2fe9da5", "score": "0.77929145", "text": "function isHttps() {\n return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443);\n}", "title": "" }, { "docid": "f1a548a0b113346410f55c6f4a6522d1", "score": "0.77812153", "text": "public static function isHTTPS()\n {\n return strpos(self::getSelfURL(), 'https://') === 0;\n }", "title": "" }, { "docid": "db40a5648fc5cfe53589248ab934935c", "score": "0.77669495", "text": "function is_https()\n{\n if(isset($_SERVER[\"HTTPS\"]) && $_SERVER[\"HTTPS\"] == 'on')\n return true;\n else\n return false;\n}", "title": "" }, { "docid": "8a73db4676d1117bca7c6d57a7c27a24", "score": "0.7759388", "text": "static public function is_https() {\n\t\tswitch ( true ) {\n\t\tcase ( isset( $_SERVER['HTTPS'] ) &&\n\t\t\t\tUtil_Environment::to_boolean( $_SERVER['HTTPS'] ) ):\n\t\tcase ( isset( $_SERVER['SERVER_PORT'] ) &&\n\t\t\t\t(int) $_SERVER['SERVER_PORT'] == 443 ):\n\t\tcase ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) &&\n\t\t\t\t$_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ):\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "06859eda15e0f904e9e1e65621ce1b4c", "score": "0.77549124", "text": "public static function isHttps(){\n\t\treturn !empty($_SERVER['HTTPS']) && strcasecmp($_SERVER['HTTPS'],'off');\n\t}", "title": "" }, { "docid": "956708275fddb887147eae82a54177bc", "score": "0.77506644", "text": "function isHttps()\n {\n return (bool)(isset($_SERVER['HTTPS']) and strtolower($_SERVER['HTTPS']) !== 'off');\n }", "title": "" }, { "docid": "d3dcfe1dc8df270104d8de1c8da28b02", "score": "0.7746812", "text": "public static function isSslconnection()\n\t{\n\t\treturn ( ( isset( $_SERVER['HTTPS'] ) && ( $_SERVER['HTTPS'] == 'on' ) ) || getenv( 'SSL_PROTOCOL_VERSION' ) );\n\t}", "title": "" }, { "docid": "a18d42c22d09252c2f9207dcabcb5ef2", "score": "0.7733609", "text": "public static function isHttps()\n {\n $server = &self::$globalStateProvider->getServerSuperGlobal();\n\n if (isset($server['HTTP_X_FORWARDED_PROTO'])) {\n if ($server['HTTP_X_FORWARDED_PROTO'] === 'https') {\n // Client <=> Proxy is encrypted\n return true;\n }\n else {\n // Proxy <=> Server link unknown, Client <=> Proxy is not encrypted.\n return false;\n }\n }\n\n if (isset($server['HTTPS'])) {\n if ($server['HTTPS'] === 'off') {\n // ISAPI on IIS breaks the spec. :(\n return false;\n }\n\n if ($server['HTTPS'] !== '') {\n // Set to a non-empty value\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "09bedd5a5d1867c4bee88bc8eb723262", "score": "0.7717522", "text": "public function isSecuredByHttps(): bool\n {\n return $this->isSecuredByHttps;\n }", "title": "" }, { "docid": "24fa62033d5bbd8e96994429485dfc6d", "score": "0.7714294", "text": "public function ssl()\n {\n if (isset($_SERVER['HTTPS'])) {\n return !empty($_SERVER['HTTPS']);\n } elseif (isset($_SERVER['SERVER_PORT'])) {\n return (string)$_SERVER['SERVER_PORT'] === '443';\n } elseif (isset($_SERVER['REQUEST_SCHEME'])) {\n return strtolower($_SERVER['REQUEST_SCHEME']) === 'https';\n }\n return null;\n }", "title": "" }, { "docid": "668c5d5b69fbccf2b3155a2e6ceba0b5", "score": "0.76732975", "text": "public function requiresHttps()\n {\n return (!$this->calledUri->isHttps() && $this->route->requiresHttps());\n }", "title": "" }, { "docid": "b115664830a8da33c733c848d98c5cfb", "score": "0.76511985", "text": "public function isSecure()\n {\n return ($this->getScheme() === self::SCHEME_HTTPS);\n }", "title": "" }, { "docid": "0ee04f74e14f227a6f7eff36ed948d6f", "score": "0.76249945", "text": "public function isSecure()\n\t{\n\t\treturn strtoupper($this->server('HTTPS')) === 'ON';\n\t}", "title": "" }, { "docid": "c3db8872601b373fc43c475175fa9f76", "score": "0.7619506", "text": "private static function getServerHTTPS() {\n\n\t\tif(!array_key_exists('HTTPS', $_SERVER)) {\n\t\t\t/* Not an https-request. */\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif($_SERVER['HTTPS'] === 'off') {\n\t\t\t/* IIS with HTTPS off. */\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t/* Otherwise, HTTPS will be a non-empty string. */\n\t\treturn $_SERVER['HTTPS'] !== '';\n\n\t}", "title": "" }, { "docid": "3939739da19afb58d134c35b3eb0427b", "score": "0.7569968", "text": "function isConnectedHttps()\n {\n $connected = @fsockopen(\"www.example.com\", 443);\n if ($connected){\n fclose($connected);\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "d6907eba5f530fc59734c57998a54211", "score": "0.75683564", "text": "public static function isHttps() {\n\n\t\tif (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d60808b1ea799c4ef86d4570a21a526b", "score": "0.75655913", "text": "public static function is_https()\n {\n if (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {\n return TRUE;\n } else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "68af4340dd07119b10fac0a74548f24b", "score": "0.7557468", "text": "public function isSecure(): bool\n {\n return array_key_exists('HTTPS', $this->server)\n && $this->server['HTTPS'] !== 'off'\n ;\n }", "title": "" }, { "docid": "1e82340e37b64501868484474b9eee5c", "score": "0.7549548", "text": "public function isHttps()\n {\n $https = $this->getServerValue('HTTPS');\n\n if ($https !== null\n && $https !== 'off'\n ) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "b75b49bff1d6d5de85fd2658c572c6d4", "score": "0.75157833", "text": "function IsSecure() {\n return\n (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')\n || $_SERVER['SERVER_PORT'] == 443;\n}", "title": "" }, { "docid": "57282e5de6c6891faf2e4931d7e4a3e6", "score": "0.75137115", "text": "protected function require_https() {\n if ( (!isset($_SERVER['HTTPS'])) || ($_SERVER['HTTPS'] != 'on') ) {\n $url = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\n $this->redirect_to($url);\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "a845d9bb0fa6caf9c4f7da004864d50f", "score": "0.7499533", "text": "public function getIsSecureConnection()\n {\n return isset($_SERVER['HTTPS']) && (strcasecmp($_SERVER['HTTPS'],'on')===0 || $_SERVER['HTTPS']==1)\n || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'],'https')===0;\n }", "title": "" }, { "docid": "f7b7413f809d08a167703fbfdaa61bd6", "score": "0.7499141", "text": "public function isSecure()\n {\n return ($this->getRequestScheme() === self::SCHEME_HTTPS);\n }", "title": "" }, { "docid": "f4c2aff3a3b11b340eda6b1c58d79dbe", "score": "0.7495484", "text": "public function verifySsl(): bool\n {\n return (bool)config('instrumentation.verify_ssl', true);\n }", "title": "" }, { "docid": "86a89aed9fd6276bbd0d7d6f3fd15388", "score": "0.7479857", "text": "public function supportsHttps()\n {\n return in_array(ApiDefinition::HTTPS, $this->protocols);\n }", "title": "" }, { "docid": "3fb8fd8879a77e6ab933c7dcc09a90f4", "score": "0.7458445", "text": "public function isSecureConnection(): bool\n\t{\n\t\treturn isset($_SERVER['HTTPS'])\n && !strcasecmp($_SERVER['HTTPS'], 'on');\n\t}", "title": "" }, { "docid": "09284e985d0c3ab9987ed7afc677900f", "score": "0.7457813", "text": "public static function isHTTPS()\n\t{\t\t\n\t\tif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {\n\n\t\t \treturn true;\n\t\t}\n\t\telse if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || !empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') {\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "80651d08c49f99a9084d0ec6e46b771f", "score": "0.7398962", "text": "public function getIsSecureConnection()\n\t{\n\t\treturn !empty($_SERVER['HTTPS']) && strcasecmp($_SERVER['HTTPS'],'off');\n\t}", "title": "" }, { "docid": "fc797f85a0e9b7bc6105acf7c57d6a11", "score": "0.7395567", "text": "public function getIsSecureConnection()\n {\n return (null !== $forwardedProto = $this->_headers->get('x-forwarded-proto')) && strcasecmp($forwardedProto, 'https') === 0;\n }", "title": "" }, { "docid": "7e3dd47dddf88c004ffd6b8955a7ab0e", "score": "0.738995", "text": "public function testIsHttpsOnlySameUrlWithSSl() {\n $res = $this->isHttpsOnlySameUrl(true);\n $this->assertTrue( $res);\n }", "title": "" }, { "docid": "a008afcfb7ffa9a5d8ea0ad34ea6e615", "score": "0.7379432", "text": "public static function ssl() {}", "title": "" }, { "docid": "5757dad62f4c49ae63b0f5fd4f0bb605", "score": "0.7377603", "text": "public function testIsHttpsOnlySameUrlNotSsl() {\n $res = $this->isHttpsOnlySameUrl(false);\n $this->assertFalse($res);\n }", "title": "" }, { "docid": "fefe60041126b713b3002d124ea8f342", "score": "0.7351909", "text": "public function RequiresSSL();", "title": "" }, { "docid": "fd373d931600ff1aed2ba911b8e5268d", "score": "0.73241794", "text": "public function getSsl()\n {\n return (bool) $this->ssl;\n }", "title": "" }, { "docid": "e47baa438f9052be80ecbe528b2876d4", "score": "0.7318094", "text": "public function isHttps(): bool\n {\n if ($this->get('is_https') !== null) {\n return $this->get('is_https');\n }\n\n $url = $this->get('PmaAbsoluteUri');\n\n $is_https = false;\n if (! empty($url) && parse_url($url, PHP_URL_SCHEME) === 'https') {\n $is_https = true;\n } elseif (strtolower(Core::getenv('HTTP_SCHEME')) === 'https') {\n $is_https = true;\n } elseif (strtolower(Core::getenv('HTTPS')) === 'on') {\n $is_https = true;\n } elseif (strtolower(substr(Core::getenv('REQUEST_URI'), 0, 6)) === 'https:') {\n $is_https = true;\n } elseif (strtolower(Core::getenv('HTTP_HTTPS_FROM_LB')) === 'on') {\n // A10 Networks load balancer\n $is_https = true;\n } elseif (strtolower(Core::getenv('HTTP_FRONT_END_HTTPS')) === 'on') {\n $is_https = true;\n } elseif (strtolower(Core::getenv('HTTP_X_FORWARDED_PROTO')) === 'https') {\n $is_https = true;\n } elseif (strtolower(Core::getenv('HTTP_CLOUDFRONT_FORWARDED_PROTO')) === 'https') {\n // Amazon CloudFront, issue #15621\n $is_https = true;\n } elseif (Util::getProtoFromForwardedHeader(Core::getenv('HTTP_FORWARDED')) === 'https') {\n // RFC 7239 Forwarded header\n $is_https = true;\n } elseif (Core::getenv('SERVER_PORT') == 443) {\n $is_https = true;\n }\n\n $this->set('is_https', $is_https);\n\n return $is_https;\n }", "title": "" }, { "docid": "e36bdb531d79d29c49f0cf295a0b3b25", "score": "0.7285527", "text": "public function isSecure()\n\t{\n\t\treturn ((empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === 'off') && empty($_SERVER['HTTP_X_USING_SSL'])) ? false : true;\n\t}", "title": "" }, { "docid": "9c38b895ae7502e9e8ffd573ea4a48cf", "score": "0.7273292", "text": "public function isSecure()\n {\n return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? true : false ;\n }", "title": "" }, { "docid": "73840d118115b2ed770a079d9b233fd0", "score": "0.72732", "text": "public function isSSLConnection()\n\t{\n\t\t\\JLog::add(\n\t\t\t'Browser::isSSLConnection() is deprecated. Use the isSSLConnection method on the application object instead.',\n\t\t\t\\JLog::WARNING,\n\t\t\t'deprecated'\n\t\t);\n\n\t\treturn (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on')) || getenv('SSL_PROTOCOL_VERSION');\n\t}", "title": "" }, { "docid": "d75d86760b3bff216fe39eb69052f181", "score": "0.7268932", "text": "public static function forceHTTPS()\n {\n if (!self::isSsl()) {\n header('location: https://' . self::host() . @$_SERVER['REQUEST_URI']);\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "26208d25b590330e41ef1f0583bf9f9e", "score": "0.7253648", "text": "private function isHttpsOnlySameUrl($withSsl)\n {\n $config = $this->getMock(\\OxidEsales\\Eshop\\Core\\Config::class, array('isSsl', 'getSslShopUrl', 'getShopUrl'));\n $config->expects($this->any())->method('isSsl')->will($this->returnValue($withSsl));\n foreach (['getSslShopUrl', 'getShopUrl'] as $method) {\n $config->expects($this->any())->method($method)->will($this->returnValue('http'. ($withSsl?'s':'') . '://oxid-esales.com'));\n }\n $res = $config->isHttpsOnly();\n return $res;\n }", "title": "" }, { "docid": "f6a23b6cd086e2176342bb442ddbd902", "score": "0.72517467", "text": "protected function sslCheck()\n\t{\n\t\tServices::Registry()->get('ApplicationsParameters');\n\n\t\tif ((int)Services::Registry()->get('Configuration', 'url_force_ssl', 0) > 0) {\n\n\t\t\tif ((Application::Request()->get('connection')->isSecure() === true)) {\n\n\t\t\t} else {\n\n\t\t\t\t$redirectTo = (string)'https' .\n\t\t\t\t\tsubstr(BASE_URL, 4, strlen(BASE_URL) - 4) .\n\t\t\t\t\tAPPLICATION_URL_PATH .\n\t\t\t\t\t'/' . Application::Request()->get('requested_resource_for_route');\n\n\t\t\t\tServices::Redirect()\n\t\t\t\t\t->set($redirectTo, 301);\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "da61f8bed10fd197f1a68fca8da6d90f", "score": "0.72468376", "text": "public function isSecure(): bool\n {\n if (\n (array_key_exists('HTTPS', $this->getServerArray()) &&\n (! empty($this->getServer('https')) && $this->getServer('https') !== 'off')) ||\n $this->getServer('server-port') === '443'\n ) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "e2387a382a79b8f42e510bb32902bc6b", "score": "0.7240809", "text": "public static function getServerHTTPS()\n {\n if (!array_key_exists('HTTPS', $_SERVER)) {\n // not an https-request\n return false;\n }\n\n if ($_SERVER['HTTPS'] === 'off') {\n // IIS with HTTPS off\n return false;\n }\n\n // otherwise, HTTPS will be non-empty\n return !empty($_SERVER['HTTPS']);\n }", "title": "" }, { "docid": "ad5bd960b78f2ff822feee90800f00b4", "score": "0.72077227", "text": "public function testIsSsl_specialHandling()\n {\n oxTestModules::addFunction(\"oxUtilsServer\", \"getServerVar\", '{ if ( $aA[0] == \"HTTPS\" ) { return null; } else { return array( \"HTTP_X_FORWARDED_SERVER\" => \"sslsites.de\" ); } }');\n\n $oConfig = $this->getMock(\\OxidEsales\\Eshop\\Core\\Config::class, array('getConfigParam'), array(), '', false);\n $oConfig->expects($this->never())->method('getConfigParam');\n $this->assertTrue($oConfig->isSsl());\n }", "title": "" }, { "docid": "0de184b751df34c694582364c9a357de", "score": "0.7204532", "text": "public function isSslEnabled()\n\t{\n\t\treturn $this->scopeConfig->getValue(\n\t\t\tself::XML_CONFIG_PATH_ONESIGNAL_GENERAL_SSL,\n\t\t\t\\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n\t\t);\n\t}", "title": "" }, { "docid": "0236ac162c5c1801fce4fbc1ebb65109", "score": "0.7198386", "text": "private function _isSecure() {\n $https = getenv('HTTPS');\n\n if (!empty($https) && $https !== 'off') {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "bf93648ae8ff21f0ad664fcdf9e8f2f2", "score": "0.71938443", "text": "private function curlHasSsl()\n {\n // @codingStandardsIgnoreStart\n $curlVersion = curl_version();\n // @codingStandardsIgnoreEnd\n\n return $curlVersion['features'] & CURL_VERSION_SSL;\n }", "title": "" }, { "docid": "84395f7bf7360589629f6124b27b2a84", "score": "0.71785736", "text": "public static function isHTTPS()\n {\n if ( isset( $_SERVER['HTTPS'] ) && ! empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] != 'off' ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "d261ea8842d4f453f18f6a9c4f8930f1", "score": "0.7158893", "text": "function is_ssl_request()\n\t{\t\n\t\t$CI =& get_instance();\n\t\tif ($CI->config->item(\"proxy_ssl\")===FALSE && $CI->config->item(\"enable_ssl\")===FALSE)\n\t\t{\n\t\t\t//dont't check anything\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t//current page is loaded using HTTPS?\t\n\t\t$is_https=FALSE;\n\t\t\n\t\tif ($CI->config->item(\"proxy_ssl\"))\n\t\t{\n\t\t\t//echo \"using proxy\";\n\t\t\t$proxy_ssl_header=$CI->config->item(\"proxy_ssl_header\");\n\t\t\t$proxy_ssl_header_value=$CI->config->item(\"proxy_ssl_header_value\");\n\t\t\t\n\t\t\t//check if using SSL/Proxy/Headers\n\t\t\tif ($proxy_ssl_header!='' && $proxy_ssl_header_value!='')\n\t\t\t{\t\t\n\t\t\t\t//see if the variable is set\n\t\t\t\tif (isset($_SERVER[$proxy_ssl_header]))\n\t\t\t\t{\n\t\t\t\t\tif ($_SERVER[$proxy_ssl_header]==$proxy_ssl_header_value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$is_https=TRUE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//check SSL using server HTTPS variablbe\n\t\telse if ($CI->config->item(\"enable_ssl\") && isset($_SERVER['HTTPS']))\n\t\t{\n\t\t\t//echo \"dfoudfdfdfd\";\n\t\t\tif($_SERVER['HTTPS']==\"on\")\n\t\t\t{\n\t\t\t\t$is_https=TRUE;\n\t\t\t}\t\n\t\t}\n\n\t\treturn $is_https;\t\t\n\t}", "title": "" }, { "docid": "a3314a283a33c3a23141b94730be1d41", "score": "0.715609", "text": "public function isSecure()\n {\n $pathArray = $this->getPathInfoArray();\n return (\n (isset($pathArray['HTTPS']) && (strtolower($pathArray['HTTPS']) == 'on' || $pathArray['HTTPS'] == 1))\n ||\n (isset($pathArray['HTTP_SSL_HTTPS']) && (strtolower($pathArray['HTTP_SSL_HTTPS']) == 'on' || $pathArray['HTTP_SSL_HTTPS'] == 1))\n ||\n (isset($pathArray['HTTP_X_FORWARDED_PROTO']) && strtolower($pathArray['HTTP_X_FORWARDED_PROTO']) == 'https')\n );\n }", "title": "" }, { "docid": "f73d57bdade94c2d838bb72f25b768f6", "score": "0.71521723", "text": "public function testIsSsl_SslMode_WithSslShopUrl()\n {\n oxTestModules::addFunction(\"oxUtilsServer\", \"getServerVar\", '{ if ( $aA[0] == \"HTTPS\" ) { return 1; } else { return array(); } }');\n\n $oConfig = $this->getMock(\\OxidEsales\\Eshop\\Core\\Config::class, array('getConfigParam'));\n $oConfig->expects($this->once())->method('getConfigParam')->with($this->equalTo('sSSLShopURL'))->will($this->returnValue('https://eshop/'));\n\n $this->assertTrue($oConfig->isSsl());\n }", "title": "" }, { "docid": "9147c67faaf186e86fbe4f05760cb16d", "score": "0.71503496", "text": "public static function isSecure() {\n $s = &$_SERVER;\n $ssl = (!empty($s['HTTPS']) && $s['HTTPS'] == 'on') ? true : false;\n return $ssl;\n }", "title": "" }, { "docid": "4a8bd5729cb16cd281ac1350f89c0f85", "score": "0.7139305", "text": "public function isSecure(): bool\n\t{\n\t\treturn strtoupper(\n\t\t\t(string)filter_input(INPUT_SERVER, 'HTTPS', FILTER_SANITIZE_STRING)\n\t\t) === 'ON';\n\t}", "title": "" }, { "docid": "7219c56e03005174dbebe79531f59b98", "score": "0.7124024", "text": "public static function usingSecureMode()\n {\n if (isset($_SERVER['HTTPS'])) {\n return $_SERVER['HTTPS'] == 1 || strtolower($_SERVER['HTTPS']) == 'on';\n }\n // $_SERVER['SSL'] exists only in some specific configuration\n if (isset($_SERVER['SSL'])) {\n return $_SERVER['SSL'] == 1 || strtolower($_SERVER['SSL']) == 'on';\n }\n\n return false;\n }", "title": "" }, { "docid": "783dd350165538e5f08b2788b6f13275", "score": "0.71007663", "text": "function is_ssl_enabled()\n\t{\n\t\t$CI =& get_instance();\n\t\tif ($CI->config->item(\"proxy_ssl\")===FALSE && $CI->config->item(\"enable_ssl\")===FALSE)\n\t\t{\n\t\t\t//dont't check anything\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t$is_https=FALSE;\n\t\t\n\t\tif ($CI->config->item(\"proxy_ssl\"))\n\t\t{\n\t\t\t//echo \"using proxy\";\n\t\t\t$proxy_ssl_header=$CI->config->item(\"proxy_ssl_header\");\n\t\t\t\n\t\t\t//see if the variable is set\n\t\t\tif (isset($_SERVER[$proxy_ssl_header]))\n\t\t\t{\n\t\t\t\t$is_https=TRUE;\n\t\t\t}\n\t\t}\n\t\t//check SSL using server HTTPS variablbe\n\t\telse if ($CI->config->item(\"enable_ssl\") && isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']==\"on\")\n\t\t{\n\t\t\t\t$is_https=TRUE;\n\t\t}\n\n\t\treturn $is_https;\n\t}", "title": "" }, { "docid": "668324085543af74a565615e5998ee18", "score": "0.7083769", "text": "function isSecure() : bool {\n\tstatic $secure;\n\tif ( isset( $secure ) ) {\n\t\treturn $secure;\n\t}\n\t\n\t$ssl\t= $_SERVER['HTTPS'] ?? '0';\n\t$frd\t= \n\t\t$_SERVER['HTTP_X_FORWARDED_PROTO'] ?? \n\t\t$_SERVER['HTTP_X_FORWARDED_PROTOCOL'] ?? \n\t\t$_SERVER['HTTP_X_URL_SCHEME'] ?? 'http';\n\t\n\tif ( \n\t\t0 === \\strcasecmp( $ssl, 'on' )\t\t|| \n\t\t0 === \\strcasecmp( $ssl, '1' )\t\t|| \n\t\t0 === \\strcasecmp( $frd, 'https' )\n\t) {\n\t\t$secure = true;\n\t\treturn true;\n\t}\n\t\n\t$secure = \n\t( 443 == ( int ) ( $_SERVER['SERVER_PORT'] ?? 80 ) ) ? \n\t\ttrue : false;\n\treturn $secure;\n}", "title": "" }, { "docid": "af60a4259ffb76cce3818ca96a9eb38e", "score": "0.7083485", "text": "public function isSecure()\n {\n if (\n $_SERVER['SERVER_PORT'] != 80\n && \n (\n !empty($_SERVER['HTTPS']) \n && \n $_SERVER['HTTPS'] !== 'off'\n || \n $_SERVER['SERVER_PORT'] == 443\n )\n ) {\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "d9704bf781064f9cee79e0780804840b", "score": "0.70737565", "text": "public function isSecure()\n {\n $pathArray = $this->getPathInfoArray();\n\n return (\n (isset($pathArray['HTTPS']) && (strtolower($pathArray['HTTPS']) == 'on' || $pathArray['HTTPS'] == 1))\n ||\n (isset($pathArray['HTTP_SSL_HTTPS']) && (strtolower($pathArray['HTTP_SSL_HTTPS']) == 'on' || $pathArray['HTTP_SSL_HTTPS'] == 1))\n ||\n (isset($pathArray['HTTP_X_FORWARDED_PROTO']) && strtolower($pathArray['HTTP_X_FORWARDED_PROTO']) == 'https')\n );\n }", "title": "" }, { "docid": "cb4b74fed2abe61c572c83f1ebc80762", "score": "0.7068016", "text": "public function isSecure() {\n\t\treturn $this->cache(__METHOD__, function() {\n\t\t\t$https = mb_strtolower($this->env('HTTPS'));\n\n\t\t\tif ($https === 'on') {\n\t\t\t\t$https = true;\n\t\t\t} else if ($https === 'off') {\n\t\t\t\t$https = false;\n\t\t\t}\n\n\t\t\treturn ($https || $this->env('SERVER_PORT') == 443);\n\t\t});\n\t}", "title": "" }, { "docid": "01a6762b6fed791e6b35d3a934ae3552", "score": "0.6960962", "text": "public static function httpsEnabled(): bool\n {\n return ((!empty($_SERVER['HTTPS'])\n && $_SERVER['HTTPS'] !== 'off') || (!empty($_SERVER['HTTP_HTTPS'])\n && $_SERVER['HTTP_HTTPS'] !== 'off') || isset($_SERVER['REQUEST_SCHEME']) === 'https' || $_SERVER['SERVER_PORT'] === 443);\n }", "title": "" }, { "docid": "0f5c6efd7d39598aa40ddd6cbbbbfae2", "score": "0.69497645", "text": "public static function isHttps($trust_proxy_headers = FALSE) {\n\n // Check standard HTTPS header\n if (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {\n\n return isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off';\n }\n // Check proxy headers if allowed\n return (boolean) $trust_proxy_headers && isset($_SERVER['X-FORWARDED-PROTO']) && $_SERVER['X-FORWARDED-PROTO'] == 'https';\n }", "title": "" }, { "docid": "96cc52ab4db6dd830dcd99b9025d3049", "score": "0.6922333", "text": "function verify_https_support() {\n\tif ( is_ssl() ) {\n\t\treturn true;\n\t}\n\n\t$response = wp_remote_request(\n\t\tget_rest_url( null, '/airstory/v1', 'https' ), array(\n\t\t\t'method' => 'HEAD',\n\t\t\t'sslverify' => false,\n\t\t)\n\t);\n\n\tif ( is_wp_error( $response ) ) {\n\t\treturn false;\n\t}\n\n\t/*\n\t * 200 is the only status code we're looking for here — redirecting to the HTTP version will\n\t * produced mixed-content warnings within Airstory, and WP's default behavior is to not redirect\n\t * REST API URIs to use the canonical domain/protocol.\n\t */\n\treturn 200 === wp_remote_retrieve_response_code( $response );\n}", "title": "" }, { "docid": "8962132b3546ecbb8d9d913d5cad8849", "score": "0.69210315", "text": "public function test_isHttps()\n {\n $_SERVER['HTTPS'] = 'On';\n $_SERVER['HTTP_X_FORWARDED_PROTO'] = 'Off';\n $isHttps = isHttps();\n $this->assertFalse($isHttps);\n\n $_SERVER['HTTPS'] = 'On';\n $_SERVER['HTTP_X_FORWARDED_PROTO'] = 'On';\n $isHttps = isHttps();\n $this->assertTrue($isHttps);\n\n $_SERVER['HTTPS'] = 'Off';\n $_SERVER['HTTP_X_FORWARDED_PROTO'] = 'Off';\n $isHttps = isHttps();\n $this->assertFalse($isHttps);\n\n $_SERVER['HTTPS'] = 'Off';\n $_SERVER['HTTP_X_FORWARDED_PROTO'] = 'On';\n $isHttps = isHttps();\n $this->assertTrue($isHttps);\n\n $_SERVER['HTTPS'] = 'Off';\n $_SERVER['HTTP_X_FORWARDED_PROTO'] = '';\n $isHttps = isHttps();\n $this->assertFalse($isHttps);\n\n $_SERVER['HTTPS'] = 'On';\n $_SERVER['HTTP_X_FORWARDED_PROTO'] = '';\n $isHttps = isHttps();\n $this->assertTrue($isHttps);\n\n unset($_SERVER['HTTPS']);\n unset($_SERVER['HTTP_X_FORWARDED_PROTO']);\n }", "title": "" }, { "docid": "c0112a09d4f5f5db267cb9284e0fed60", "score": "0.6901461", "text": "public function is_secure_connection()\n {\n if (!empty($_SERVER['HTTPS']) && filter_var($_SERVER['HTTPS'], FILTER_VALIDATE_BOOLEAN)) {\n return true;\n }\n if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {\n return true;\n }\n if (!empty($_SERVER['HTTP_FRONT_END_HTTPS']) && filter_var($_SERVER['HTTP_FRONT_END_HTTPS'],\n FILTER_VALIDATE_BOOLEAN)\n ) {\n return true;\n }\n if (in_array($_SERVER['REMOTE_ADDR'], $this->trust_proxy)) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "6bf9f2d9c709f6a31d477a9ed7bb6a05", "score": "0.68903935", "text": "public function ssl(): static;", "title": "" }, { "docid": "d259501cbb31e0e28237d7aa73885f71", "score": "0.68742746", "text": "public function do_conditional_ssl_redirect() {\n\n\t\tif ( 'cli' === php_sapi_name() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$settings = ITSEC_Modules::get_settings( 'ssl' );\n\t\t$protocol = 'http';\n\n\t\tif ( 2 === $settings['frontend'] ) {\n\t\t\t$protocol = 'https';\n\t\t} else if ( 1 === $settings['frontend'] && is_singular() ) {\n\t\t\tglobal $post;\n\n\t\t\t$enable_ssl = get_post_meta( $post->ID, 'itsec_enable_ssl' );\n\n\t\t\tif ( ! empty( $enable_ssl ) ) {\n\t\t\t\tif ( $enable_ssl[0] ) {\n\t\t\t\t\t$protocol = 'https';\n\t\t\t\t} else {\n\t\t\t\t\tdelete_post_meta( $post->ID, 'itsec_enable_ssl' );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\t$is_ssl = is_ssl();\n\n\t\tif ( $is_ssl && ( 'http' === $protocol ) ) {\n\t\t\t$this->redirect_to_http();\n\t\t} else if ( ! $is_ssl && ( 'https' == $protocol ) ) {\n\t\t\t$this->redirect_to_https();\n\t\t}\n\t}", "title": "" }, { "docid": "a469fbf22ad2085e64bf7100188f95d6", "score": "0.6867588", "text": "public function getHttpsOnly(): bool\n {\n return $this->httpsOnly;\n }", "title": "" }, { "docid": "789b8fea170c1ad9482da781f0eb938a", "score": "0.68611264", "text": "protected function isStandardSecurePort(): bool\n {\n return $this->scheme === Scheme::HTTPS && $this->port === Port::HTTPS;\n }", "title": "" }, { "docid": "d0ce8b9ed5a75203b6b3bc5af48f701e", "score": "0.6838923", "text": "function check_ssl_available() {\n\tif (function_exists('openssl_open')) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "b2a92d2f59018eabaaae6103c72925d6", "score": "0.6821023", "text": "static public function home_url_maybe_https() {\n\t\t$home_url = get_home_url();\n\t\t$ssl = Util_Environment::url_to_maybe_https( $home_url );\n\n\t\treturn $ssl;\n\t}", "title": "" }, { "docid": "08ac334827225ae9b983bb408010f398", "score": "0.6820458", "text": "protected function isSecure(UriInterface $uri): bool\n {\n return strtolower($uri->getScheme()) === 'https';\n }", "title": "" }, { "docid": "69bf2b5de2ecff76c7cc6c5e783cbfa6", "score": "0.6790205", "text": "function contentpaybyzong_supportsSSLl()\n\t {\n\t $v = curl_version();\n\t if(is_array($v)) {\n\t return in_array('https', $v['protocols']);\n\t } elseif (is_string($v)) {\n\t return preg_match('/OpenSSL/i', $v);\n\t } else {\n\t return 0;\n\t }\n\t\t}", "title": "" }, { "docid": "00bc6da16f42ff63475c285e27f2e0d5", "score": "0.6786796", "text": "public function testIsSsl_SslMode_NoSslShopUrl()\n {\n oxTestModules::addFunction(\"oxUtilsServer\", \"getServerVar\", '{ if ( $aA[0] == \"HTTPS\" ) { return 1; } else { return array(); } }');\n\n $oConfig = $this->getMock(\\OxidEsales\\Eshop\\Core\\Config::class, array('getConfigParam'));\n $oConfig->expects($this->at(0))->method('getConfigParam')->with($this->equalTo('sSSLShopURL'))->will($this->returnValue(''));\n $oConfig->expects($this->at(1))->method('getConfigParam')->with($this->equalTo('sMallSSLShopURL'))->will($this->returnValue(''));\n\n $this->assertFalse($oConfig->isSsl());\n }", "title": "" }, { "docid": "886aaf0b5b2f0fc5bc5342db68e9899e", "score": "0.6777558", "text": "public function testIsSsl_SslMode_WithDifferentParams()\n {\n oxTestModules::addFunction(\"oxUtilsServer\", \"getServerVar\", '{ if ( $aA[0] == \"HTTPS\" ) { return 1; } else { return array(); } }');\n\n $oConfig = $this->getMock(\\OxidEsales\\Eshop\\Core\\Config::class, array('getConfigParam'));\n $oConfig->expects($this->at(0))->method('getConfigParam')->with($this->equalTo('sSSLShopURL'))->will($this->returnValue('https://eshop'));\n $this->assertTrue($oConfig->isSsl());\n\n oxTestModules::cleanUp();\n oxTestModules::addFunction(\"oxUtilsServer\", \"getServerVar\", '{ if ( $aA[0] == \"HTTPS\" ) { return \"on\"; } else { return array(); } }');\n $this->assertTrue($oConfig->isSsl());\n }", "title": "" }, { "docid": "fa228ef453be10d5b099f62987cee28b", "score": "0.6758689", "text": "public function setSecuredByHttps(): void\n {\n $this->isSecuredByHttps = true;\n }", "title": "" }, { "docid": "f3943af92986ab3d9db533a173e2ef45", "score": "0.6756742", "text": "public function __https()\n{\n\tif(strpos($_SERVER['HTTP_HOST'],'www') === false or !isset($_SERVER['HTTPS']))\n\t{\n\t\t$_uri = ($_SERVER['REQUEST_URI'])?substr($_SERVER['REQUEST_URI'],1):NULL;\n\t\theader('Location: '.self::_https.$_uri);\n\t\texit(0);\n\t}\n}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "66eb6aaaee00f0a3367324ffbc97e4a5", "score": "0.0", "text": "public function index()\n {\n $products = product::all();\n return view(\"index\",[\"products\"=>$products]);\n }", "title": "" } ]
[ { "docid": "a2c82e645f33199ca3af4df01daa0da0", "score": "0.73454344", "text": "public function listAction()\n {\n $this->view->headTitle('Book Listing ','PREPEND');\n $this->view->books = $this->bookService->listService();\n }", "title": "" }, { "docid": "2ecb35785c4b9e881de2de7a961178df", "score": "0.7216204", "text": "public function action_list(){\n\t\t$v = View::factory(static::$entity.'/list');\n\t\t$this->template->body = $v;\n\t}", "title": "" }, { "docid": "dad0a13a73bcf8293bb4d9e710796f56", "score": "0.7157767", "text": "public function listAction()\n {\n $this->processList();\n }", "title": "" }, { "docid": "e5d3acc1f5204195de85b93044bfcb61", "score": "0.71494645", "text": "function listAction()\n {\n $pageTitle = 'Golf listings';\n $listLinkStyle = 'current_page';\n $isLoggedIn = $this->isLoggedInFromSession();\n $username = $this->usernameFromSession();\n\n $golfRepository = new GolfRepository();\n $golfs = $golfRepository->getAll();\n\n require_once __DIR__ . '/../templates/list.php';\n }", "title": "" }, { "docid": "bd3a7b4e07a2548dae8d575849df412a", "score": "0.7130363", "text": "public function index() {\n return view('admin.resources.index', [\n 'resources' => Resource::paginate(10)\n ]);\n }", "title": "" }, { "docid": "174c016a6d20963698d0780d8861782d", "score": "0.710266", "text": "function showListPage() {\n\t\t$this->setCacheLevelNone();\n\n\t\t$this->render($this->getTpl('list'));\n\t}", "title": "" }, { "docid": "598d9caa73e88220c1d2180531a736f9", "score": "0.70930976", "text": "public function index()\n {\n $className = $this->modelClass;\n $model = $className::orderby('created_at', 'desc')->paginate(10);\n \n return view('admin.listing')\n ->with('pageTitle', $this->pageTitle)\n ->with('secondTitle', $this->secondTitle)\n ->with('columns', $this->columns)\n ->with('urlName', $this->urlName)\n ->with('model', $model);\n }", "title": "" }, { "docid": "3e6e80d5cb774ecfe48382a53469b26e", "score": "0.70829386", "text": "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getContents();\t\n\t\t$page = (int)($this->_request->getParam('page'));\n\t\tGlobals::doPaging($result, $page, $this->view); \n\t\t\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "title": "" }, { "docid": "4033d77018807de6b615c3ca97da7bef", "score": "0.70523685", "text": "public function index()\n {\n return TodoListResource::collection($this->listRepository->list());\n }", "title": "" }, { "docid": "fbd940db6024ed547d75a84196b6efcc", "score": "0.7010042", "text": "public function index()\n {\n //get shows\n $shows = ShowsModel::paginate(10);\n\n return ShowsResource::collection($shows);\n }", "title": "" }, { "docid": "22e061b6e387c7871a6d54e088305a74", "score": "0.69801855", "text": "public function index()\n {\n return RecipeListResource::collection(Recipe::all());\n }", "title": "" }, { "docid": "937d8c67ef1e241cc6f04440a03a35d5", "score": "0.6966139", "text": "public function listing(){\n return view('interface/listing');\n }", "title": "" }, { "docid": "43a3797d462201f8486a324b4e596f68", "score": "0.6948928", "text": "public function list()\n {\n $flash = '';\n\n if(!empty($_SESSION['flash'])){\n $flash = $_SESSION['flash'];\n $_SESSION['flash'] = '';\n }\n\n # it will be populated\n $data = [];\n\n $bookInstance = new Book();\n $books = $bookInstance->select()->get();\n\n # fill data\n $data['flash'] = $flash;\n $data['books'] = $books;\n $data['loggedUser'] = $this->loggedUser;\n $data['url'] = Request::getUrl();\n\n $this->render('library', $data);\n }", "title": "" }, { "docid": "a74b64d14d05fcd4b8d8543c548d39b6", "score": "0.69425523", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:FeastStageArtist:list.html.twig');\n }", "title": "" }, { "docid": "161606f4dde01f5513c0d576501b3cb7", "score": "0.6905698", "text": "public function _index()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "836499ad8af32deefc4b356617470307", "score": "0.6899619", "text": "public function index()\n {\n return view('laramanager::entries.index.index')\n ->with('resource', $this->resource)\n ->with('entries', $this->entriesRepository->getList($this->resource));\n }", "title": "" }, { "docid": "378b941376864b0adca2a47f6d9cbc14", "score": "0.6898765", "text": "public function action_index(){\n\t\t$v = View::factory(static::$entity.'/list');\n\t\t$this->template->body = $v;\n\t}", "title": "" }, { "docid": "a657a499da3c1e94405a12a48a398286", "score": "0.6889014", "text": "public function action_list()\n\t{\n\t\t$recordings = Model_Recording::factory()\n\t\t\t->with('Quotes')\n\t\t\t->find_all();\n\n\t\t// Generate and output the view\n\t\t$content = View::factory('recording/list')\n\t\t\t\t ->set('recordings', $recordings);\n\t\t$template = View::factory('templates/default')\n\t\t\t\t\t->set('title', 'All recordings')\n\t\t\t\t\t->set('content', $content->render());\n\n\t\t$this->response->body($template->render());\n\t}", "title": "" }, { "docid": "b41517724d4cdbc80c63a80b966a7b01", "score": "0.68746614", "text": "public function listAction() {\n\n\t\t}", "title": "" }, { "docid": "e908ab42fc450a9a0594cc9564f4eeb9", "score": "0.68608236", "text": "public function listAction() {\n $this->model->updateStatus();\n Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagecontrol.phtml');\n\n $where = '1 = 1';\n\n $filter = $this->_request->getParam('search');\n $this->view->filter = $filter;\n\n if ($filter == 'active') {\n $where = 'status = 0';\n } else if ($filter == 'disabled') {\n $where = 'status = 2';\n } else if ($filter == 'expired') {\n $where = 'status = 1';\n }\n\n $sort = $this->_request->getParam('sort');\n if (!$sort) {\n $sort = 'description';\n }\n\n if (!isset($this->session_sorting->sort)) {\n $this->session_sorting->sort = 0;\n }\n\n if ($this->session_sorting->sort == 0) {\n $this->session_sorting->sort = 1;\n $data = $this->table->fetchAll($this->table->select()->where($where)->order($sort . ' desc'));\n } else {\n $this->session_sorting->sort = 0;\n $data = $this->table->fetchAll($this->table->select()->where($where)->order($sort . ' asc'));\n }\n\n $paginator = Zend_Paginator::factory($data);\n $paginator->setCurrentPageNumber($this->_getParam('page', 1));\n $paginator->setItemCountPerPage(10);\n\n $this->view->page = $this->_getParam('page');\n $this->view->discounts = $paginator;\n }", "title": "" }, { "docid": "8ef49cf3a3eb21ff0a74662ea3579be6", "score": "0.68547213", "text": "public function index()\n {\n // Get cards\n $cards = Card::orderBy('created_at', 'desc')->paginate(10);\n\n // Return collection of cards as a resource\n return CardResource::collection($cards);\n }", "title": "" }, { "docid": "6e9ab9b623d3bae20d9be7b36335891d", "score": "0.68502206", "text": "public function listAction()\n {\n $this->forward('index');\n }", "title": "" }, { "docid": "d6111f19a7aca7d26ffbe0986ebf3edd", "score": "0.68407434", "text": "public function indexAction()\n {\n $this->listAction();\n }", "title": "" }, { "docid": "88277ff9376f997f91e6b5491575d7bb", "score": "0.6833471", "text": "public function index()\n {\n return ShoppingListResource::collection(ShoppingList::paginate(15));\n }", "title": "" }, { "docid": "546b231c03944da42a8e98b848f51fa9", "score": "0.68256605", "text": "public function list()\n {\n $shelves = Bookshelf::visible();\n\n return $this->apiListingResponse($shelves, [\n 'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by',\n ]);\n }", "title": "" }, { "docid": "755da2e01052312a756038c9d166d9cb", "score": "0.6794544", "text": "public function listAction() {\n $this->view->headTitle($this->view->translate('List of templates'), 'PREPEND');\n $templateModel = new Unisender_Model_UnisenderTemplate();\n $this->view->template_list = $templateModel->getAll();\n }", "title": "" }, { "docid": "d05cc4d736f09bef3c6bdf24844ac8c6", "score": "0.67895305", "text": "public function index()\n\t{\n\t\t$artists = Artist::paginate(100);\n\n\t\treturn $this->respond([\n\t\t\t'data' => $this->artistTransformer->transformCollection($artists->all())\n\t\t]);\n\t}", "title": "" }, { "docid": "89d40e37a12f5ea687a94247a2fdb4da", "score": "0.6786343", "text": "public function actionIndex()\n {\n $this->layout = '@backend/views/layouts/list';\n return $this->render('index', [\n 'dataProvider' => $this->getDataProvider(),\n 'model' => $this->getModelSearch(),\n 'currentView' => $this->getCurrentView(),\n 'availableViews' => $this->getAvailableViews()\n ]);\n }", "title": "" }, { "docid": "1647b90a06fcd39c33c32b33bf9fa133", "score": "0.67860115", "text": "public function index()\n {\n return view('list_wrapper', [\n 'entityType' => 'itemscanner',\n 'datatable' => new ItemScannerDatatable(),\n 'title' => mtrans('itemscanner', 'itemscanner_list'),\n ]);\n }", "title": "" }, { "docid": "487c93a93f48c83d96a649e03fdb104d", "score": "0.6774347", "text": "public function index()\n {\n //\n return DishResource::collection(Dish::orderBy('id', 'asc')->paginate());\n }", "title": "" }, { "docid": "6265f2e35f1c819b84733e2d894fc9f3", "score": "0.6763496", "text": "public function __list()\r\n {\r\n $current = SamsonLocale::current();\r\n\r\n $default = 'ru';\r\n\r\n if (defined('DEFAULT_LOCALE')){\r\n $default = DEFAULT_LOCALE;\r\n }\r\n\r\n // Render all available locales\r\n $html = '';\r\n foreach (SamsonLocale::get() as $locale) {\r\n if ($current != $default) {\r\n $urlText = substr(url()->text,strlen($current)+1);\r\n } else {\r\n $urlText = url()->text;\r\n }\r\n if ($locale == $default) {\r\n $url = 'http://'.$_SERVER['HTTP_HOST'].__SAMSON_BASE__.$urlText;\r\n } else {\r\n $url = 'http://'.$_SERVER['HTTP_HOST'].__SAMSON_BASE__.$locale.'/'.$urlText;\r\n }\r\n\t $localeName = '';\r\n\t if ($this->isLocaleLinkText) {\r\n\t\t $localeName = $this->translate($locale, $current);\r\n\t }\r\n $html .= $this->view('list/item')\r\n ->css(self::CSS_PREFIX)\r\n ->locale($locale == SamsonLocale::DEF && SamsonLocale::DEF == ''? 'def' : $locale)\r\n ->active($locale == $current ? self::CSS_PREFIX.'active':'')\r\n ->url($url)\r\n\t ->name($localeName)\r\n ->output();\r\n }\r\n\r\n // Set locale list view\r\n $this->view('list/index')->locale($current)->css(self::CSS_PREFIX)->items($html);\r\n }", "title": "" }, { "docid": "9574508ae15a68d9552788d66f6069d4", "score": "0.67439693", "text": "public function all()\n\t{\n\t\t$recipes = Recipe::findRecipe(array('recipe_images.is_cover'=>'yes'));\t\n\t\t\n\t\t$this->template->recipes = $recipes;\n\t\t$this->template->display('list.html.php');\n\t}", "title": "" }, { "docid": "e1224469d7f8380d5b96958c49bfc327", "score": "0.67368996", "text": "public function index()\n {\n $offers = Offer::filter()->paginate();\n\n return OfferResource::collection($offers);\n }", "title": "" }, { "docid": "e89b2c9176e1e2ba1660cebc077dc45d", "score": "0.6728091", "text": "public function index()\n {\n $user = $this->userContract->findWith(request()->user()->id, ['profile']);\n $resources = $this->resourceContract->getResourcesOrdered();\n $trashed = $this->resourceContract->getTrashedResourcesOrdered();\n\n return view('backend.resources.index', compact('user', 'resources', 'trashed'));\n }", "title": "" }, { "docid": "2422a439354b2d9d0c8e13222d75b791", "score": "0.67135084", "text": "public function indexAction()\r\n {\r\n \t$this->openApi->getItems();\r\n $this->view->data = $this->openApi->getDataResponse();\r\n }", "title": "" }, { "docid": "f38c30f9e765863f55cf5c7e5b441e0a", "score": "0.6695974", "text": "public function listAction()\n {\n $this->_title($this->__('System'))->_title($this->__('Index Management'));\n\n $this->loadLayout();\n $this->_setActiveMenu('system/index');\n $this->renderLayout();\n }", "title": "" }, { "docid": "c28bf83f5ff7f88cca0b895b2e8d3ae8", "score": "0.669245", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Reviews list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the reviews.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/reviews/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Reviews::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "a90256f37c65707c557ad75ce4efde1a", "score": "0.66915387", "text": "public function index()\n {\n return $this->service->getList();\n }", "title": "" }, { "docid": "4cc7c30861d929f90a57a50b59a5a1f5", "score": "0.66879165", "text": "public function listAction(){\n\t\t//Passes values from the Todo Mysql table into the $todos value\n\t\t$todos = $this->getDoctrine()\n\t\t\t\t\t ->getRepository('AppBundle:Todo')\n\t\t\t\t\t ->findAll();\n\t\t//Loading the todo view in here...\n return $this->render('todo/index.html.twig', array(\n\t\t\t'todos' => $todos\n\t\t));\n }", "title": "" }, { "docid": "1a9cb6255c77fe1bff8fb9d77615f930", "score": "0.66870624", "text": "public function list(): Response\n {\n return $this->renderList(\n [],\n ['artist' => 'ASC', 'title' => 'ASC']\n );\n }", "title": "" }, { "docid": "a8ee22092f12cd9a55fa2d36291251f4", "score": "0.6683523", "text": "public function action_list() {\n if (Input::method() != 'GET') { $this->response($this->no_access); return; }\n\n $params = Input::get();\n $user = $this->user_login->user;\n\n try {\n $resp = $this->listStuff($params, $user);\n } catch (Exception $exc) {\n return $this->_error_response($exc->getMessage());\n }\n \n // Set the output\n $data = array('data' => array('offers' => $resp[\"all_offers\"]), 'meta' => $resp[\"meta\"]);\n $this->response($data);\n\t}", "title": "" }, { "docid": "5a18d2c52cb259d958c945d4d6a9ea33", "score": "0.6676733", "text": "public function listAction()\n {\n $task = new Task($this->config);\n $tasks = $task->getAll();\n $amountOfTasks = $task->getAmountTasks();\n \n // load views.\n $this->view('task/list', [\n 'tasks' => $tasks,\n 'amountOfTasks' => $amountOfTasks\n ]);\n }", "title": "" }, { "docid": "fb257c74bec9eb0cfbe648823975e645", "score": "0.6653098", "text": "public function index()\n {\n $requests = ModelsRequests::paginate();\n\n return ResourcesRequests::collection($requests);\n }", "title": "" }, { "docid": "f186543d4e229fe60c320d197652a0ac", "score": "0.6648046", "text": "public function index()\n {\n return BookResource::collection(Book::paginate());\n }", "title": "" }, { "docid": "097ff24f05f0eef21fe921e55bd3b80d", "score": "0.66470236", "text": "public function listAction()\n {\n try {\n $cd = $this->currentFolder();\n return new ViewModel(array(\n 'currentFolder' => $cd,\n 'seperator' => $this->seperator,\n 'entries' => $this->directoryContent($this->getEntity(), $cd)\n ));\n } catch (\\Exception $e) {\n echo Json::encode(array(\n 'error' => $e->getCode()\n ));\n exit();\n }\n }", "title": "" }, { "docid": "59475f9f5ef859f09d1ee48e7e27d0ea", "score": "0.66406596", "text": "public function index()\n {\n return $this->showAll(SpeciesResource::collection(Species::get()));\n }", "title": "" }, { "docid": "3e9e7ace6967f2049a9e3a5287aa7bc1", "score": "0.6639121", "text": "public function index()\n {\n if ($ref = \\Request::get('getRef')) {\n return $this->getRef($ref);\n }\n\n $per_page = \\Request::get('perPage');\n $data = $this->repository->paginate($per_page);\n\n return $this->sendSuccess($data, __('api.success_list', ['name' => $this->name]));\n }", "title": "" }, { "docid": "aa0d5690d16cbfb9dc97e701071da2f2", "score": "0.6637484", "text": "public function listAction() {\n $imageService = $this->container->get(\"dft_foapi.image\");\n return $this->render('dftFoapiBundle:Common:data.json.twig', array(\n \"data\" => $imageService->fetchAll(\n $this->getAuthenticatedUserIdAndSubAccountIds()\n )\n )\n );\n }", "title": "" }, { "docid": "479fb582c4dbcbc65e4bb28c2bb3a697", "score": "0.66345435", "text": "public function list()\n {\n // and this sorting and paging logics must be in separate components\n // but for our case ... ))\n $sortTypes = ['author', 'email', 'done', 'author DESC', 'email DESC', 'done DESC'];\n $sort = input('sort', null);\n if ($sort && in_array($sort, $sortTypes)) {\n $sortSql = \" ORDER BY {$sort} \";\n } else {\n $sortSql = '';\n }\n $offset = (int) input('offset', 0);\n $offsetSql = \" LIMIT {$offset}, \" . static::PER_PAGE;\n $sql = '1 ' . $sortSql . $offsetSql;\n $todos = R::findAll('todo', $sql);\n $total = R::count('todo');\n\n //paging\n $next = false;\n $prev = false;\n\n if ($total > $offset + static::PER_PAGE) {\n $next = $offset + static::PER_PAGE;\n }\n\n if ($offset !== 0) {\n $prev = $offset - static::PER_PAGE;\n }\n\n //sorting\n $sortings = [];\n foreach (['author', 'email', 'done'] as $sortAttribute) {\n if (strpos($sort, $sortAttribute) !== false && $sort === $sortAttribute) {\n $sortings[$sortAttribute] = \"{$sortAttribute} DESC\";\n } else {\n $sortings[$sortAttribute] = $sortAttribute;\n }\n }\n\n return $this->render('list', compact('todos', 'next', 'prev', 'sortings', 'total'));\n }", "title": "" }, { "docid": "317c606a7e54f34736590f60393be790", "score": "0.662934", "text": "function index()\n\t{\n\t\t$this->items();\n\t}", "title": "" }, { "docid": "0ef8e5b1a7ba68c743bcff23cd0cf130", "score": "0.6628069", "text": "public function index()\n {\n return Resource::all();\n }", "title": "" }, { "docid": "fda26526263c4f32a26eb1c3721263e4", "score": "0.6623293", "text": "public function index()\n {\n $listings = $this->listing->latest()->paginate(50);\n\n return view('admin.listings.index', compact('listings'));\n }", "title": "" }, { "docid": "7c0e8a5f42c42d1c4f18968bb494ad0e", "score": "0.6621373", "text": "public function paginatedListAction() {\n return $this->getList();\n }", "title": "" }, { "docid": "0e1a46d9ea752b3e205c54aab701c4fd", "score": "0.6619698", "text": "public function listings() {\r\n $data = $this->model->getData();\r\n $this->template->data = $data;\r\n $this->set('general/list');\r\n }", "title": "" }, { "docid": "3e2ce9e0dce5419c500b0a60774b7605", "score": "0.6616485", "text": "public function index()\n {\n return $this->service->lists();\n }", "title": "" }, { "docid": "bca6e37ce935bd0d2b77093989d408cd", "score": "0.6612557", "text": "public function actionIndex()\n {\n $searchModel = new ListingSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "67562fbc2bb858bc588d4a91237cb673", "score": "0.6603778", "text": "function index() {\r\n\t\t// Getting the whole list\r\n\t\t$itemList = $this->model->find('all');\r\n\r\n\t\t$this->set('itemList', $itemList);\r\n\t}", "title": "" }, { "docid": "8ec8da14e071283716d59393a382ab24", "score": "0.65982807", "text": "public function listAction()\n {\n\t\t$identity = Zend_Auth::getInstance()->getIdentity();\n\t\n\t\t// if identity and user aren't the same identity, add an entry to the identityBoard (menu )\n\t\tif( $identity->id != $this->_user->id ){\n\t\t\tApplication_Model_Ui_Boards_IdentityBoard::getInstance()->addEntry(\n\t\t\t\tAnta_Core::getBase().\"/documents/\".$this->_user->cryptoId,\n\t\t\t\tI18n_Json::get( 'userDocumentList' ).' @ '.$this->_user->username , array( \n\t\t\t\t\t'class' => 'admin entry-selected'\n\t\t\t));\n\t\t\tApplication_Model_Ui_Boards_IdentityBoard::getInstance()->addEntry(\n\t\t\t\tAnta_Core::getBase().\"/gexf/entities/user/\".$this->_user->cryptoId,\n\t\t\t\tI18n_Json::get( 'gexf' ).' @ '.$this->_user->username , array( \n\t\t\t\t\t'class' => 'admin'\n\t\t\t));\n\n\t\t}\n\t\t$this->view->dock = new Application_Model_Ui_Docks_Dock();\n\t\t\n\t\t$this->view->dock->addCraft( new Application_Model_Ui_Crafts_Cargo( 'documents', I18n_Json::get( 'documentsList' ).\": \".$this->_user->username ) );\n\t\t\n\t\t$totalDocuments = Application_Model_DocumentsMapper::getNumberOfDocuments( $this->_user ); \n\t\t\n\t\t// no documents? send directly to upload, with a link, and stop this script\n\t\tif( $totalDocuments == 0 ){\n\t\t\t\n\t\t\t// draw nice upload link \"start uploading file!\" and welcome message as well\n\t\t\t$this->view->dock->documents->setHeader( new Ui_Crafts_Headers_Welcome( $this->_user ) );\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// remove menu items\n\t\t\tUi_Board::getInstance( \"Documents\", array( 'user' => $this->_user ) )->removeItem(\n\t\t\t\t\"documents.import-tags\", \n\t\t\t\t\"documents.export-tags\",\n\t\t\t\t\"api.reset\"\n\t\t\t);\n\t\t\t\n\t\t\treturn $this->render( 'index');\n\t\t}\n\t\t\n\t\t// start listening to request filter, or default vars here\n\t\t// values and their validators\n\t\tDnst_Filter::start( array(\n\t\t\t\t\"offset\" => 0,\n\t\t\t\t\"limit\" => 100,\n\t\t\t\t\"order\" => array( \"mimetype DESC\" ),\n\t\t\t\t\"tags\"\t => array(),\n\t\t\t\t\"query\" => \"\",\n\t\t\t\t\"date_start\"=>\"\",\n\t\t\t\t\"date_end\" =>\"\"\n\t\t\t), array (\n\t\t\t\t\"order\" => new Dnst_Filter_Validator_Array( array(\n\t\t\t\t\t\"id_document DESC\", \"id_document ASC\",\n\t\t\t\t\t\"title ASC\", \"title DESC\", \"date ASC\", \"date DESC\",\"`ignore` DESC\", \"`ignore` ASC\",\n\t\t\t\t\t\"status ASC\", \"status DESC\",\n\t\t\t\t\t\"language ASC\", \"language DESC\", \"mimetype ASC\", \"mimetype DESC\",\n\t\t\t\t)),\n\t\t\t\t\"offset\" => new Dnst_Filter_Validator_Range( 0, 10000000 ),\n\t\t\t\t\"limit\" => new Dnst_Filter_Validator_Range( 1, 500 ),\n\t\t\t\t\"query\" => new Dnst_Filter_Validator_Pattern( 0, 100 )\n\t\t\t)\n\t\t);\n\t\t\n\t\tif( !Dnst_Filter::isValid() ){\n\t\t\t// if you set the filters properly, then these variables MUST be in place\n\t\t\tAnta_Core::setError(\"uhm..not valid string..\".Dnst_Filter::getErrors() );\n\t\t\treturn $this->render( 'index' );\n\t\t}\n\t\t// print_r( Dnst_Filter::read() );\n\t\t// get all the documents\n\t\t$documents = Application_Model_DocumentsMapper::select(\n\t\t\t$this->_user,\n\t\t\tDnst_Filter::read()\n\t\t);\n\t\t// send some variables to the view\n\t\t$this->view->totalItems = $documents->totalItems;\n\t\t$this->view->loadedItems = count( $documents->results );\n\t\t\n\t\t// query to group documents by month according to number of groups\n\t\t$stmt = Anta_Core::mysqli()->query(\"\n\t\t\tSELECT COUNT(*) as countable, DATE_FORMAT(date,'%d.%m.%Y') as simple_date FROM anta_{$this->_user->username}.`documents` GROUP BY (`simple_date`)\"\n\t\t);\n\t\t$timestamps = array();\n\t\twhile ( $row = $stmt->fetchObject() ){\n\t\t\t$timestamps[] =\tnew Ui_D3_Timeline_Point( \n\t\t\t\t$row->simple_date, \n\t\t\t\tarray( \n\t\t\t\t\t\"y\" => $row->countable,\n\t\t\t\t\t\"title\" => $row->simple_date .\" (\".$row->countable.\")\",\n\t\t\t\t\t\"href\" => $_SERVER['REFERRER_URI'].'?'.Dnst_Filter::setProperty( 'date_start', $row->simple_date )\n\t\t\t\t) \n\t\t\t);\t\n\t\t}\n\t\t\n\t\t// prepare headers\n\t\t$header = new Anta_Ui_Header_Documents();\n\t\t$header->user = $this->_user;\n\t\t$header->loadedItems = count( $documents->results );\n\t\t$header->totalItems = $documents->totalItems;\n\t\t$header->offset = Dnst_Filter::getProperty( \"offset\" );\n\t\t$header->limit = Dnst_Filter::getProperty( \"limit\" );\n\t\t$header->searchQuery = Dnst_Filter::getProperty( \"query\" );\n\t\t$header->setTimeline( new Ui_D3_Timeline( \n\t\t\t$timestamps, \"dd.mm.yy\", \n\t\t\tarray( \"width\"=>832, \"height\"=>40)\n\t\t));\n\t\t\n\t\t$this->view->dock->documents->setHeader( \n\t\t\t$header\n\t\t);\n\t\t\n\t\t\n\t\t\n\t\tforeach (array_keys( $documents->results ) as $k ){\n\t\t\t$this->view->dock->documents->addItem( new Anta_Ui_Item_Document( $documents->results[ $k ] ) );\n\t\t}\n\t\t\n\t\t$this->render( 'index' );\n\t\t\n }", "title": "" }, { "docid": "51ab41ffa64c6b6b7fbb813516203da1", "score": "0.6593938", "text": "public function index()\n {\n return PharmacyResource::collection($this->pharmacyRepoInstance->paginate(self::PER_PAGE, ['id', 'name', 'address']));\n }", "title": "" }, { "docid": "be3ed76ca60da4c3caa2d8528ae5c319", "score": "0.659177", "text": "public function actionIndex()\n {\n if(Yii::$app->user->can('admin')){\n $dataProvider = new ActiveDataProvider([\n 'query' => Resource::find()->where(['size'=>0]),\n ]);\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }\n else{\n $dataProvider = new ActiveDataProvider([\n 'query' => Resource::find(),\n ]);\n return $this->render('list', [\n 'dataProvider' => $dataProvider,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "ccecdc5f92158721af216deee02beaf2", "score": "0.65850216", "text": "public function action_index() \n\t{\n\t\t$this->rest_output(array(\n\t\t\t'GET example!', \n\t\t));\n\t}", "title": "" }, { "docid": "c971fcbed7a0406b3764b8ecdb481920", "score": "0.6572927", "text": "protected function listAction()\r\n {\r\n $contentUid = $this->configurationManager->getContentObject()->data['uid'];\r\n $configuration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);\r\n if (!isset($configuration['view']['pluginNamespace'])) {\r\n $configuration['view']['pluginNamespace'] = 'tx_ameosfilemanager_fe_filemanager';\r\n }\r\n\r\n $this->settings['columnsTable'] = explode(',', $this->settings['columnsTable']);\r\n $this->settings['actionDetail'] = explode(',', $this->settings['actionDetail']);\r\n $this->view->assign('settings', $this->settings);\r\n\r\n $args = $this->request->getArguments();\r\n $t = $this->fileRepository->findBySearchCriterias($args, $this->settings['startFolder'], $configuration['view']['pluginNamespace'], $this->settings['recursion']);\r\n $this->view->assign('files', $t);\r\n $this->view->assign('value', $args); \r\n $this->view->assign('content_uid', $contentUid);\r\n\r\n if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'\r\n && $contentUid == GeneralUtility::_POST('ameos_filemanager_content')) {\r\n header('Content-Type: text/json; charset=utf8;');\r\n echo json_encode(['html' => $this->view->render()]);\r\n die();\r\n }\r\n }", "title": "" }, { "docid": "ef4fec830260d9dfb3f1e7e325eac9e0", "score": "0.6572855", "text": "public function actionList()\n {\n $products = new ActiveDataProvider([\n 'query' => Product::find(),\n 'pagination' => [\n 'pageSize' => 10\n ]\n ]);\n return $this->render('list', ['products' => $products]);\n }", "title": "" }, { "docid": "9500e1733deedb51878d2d909f31751a", "score": "0.65667915", "text": "public function actionList()\r\n {\r\n $objectClassId = $this->_input->filterSingle('object_class_id', XenForo_Input::STRING);\r\n $class = $this->_getClassOrError($objectClassId);\r\n\r\n $objectModel = $this->_getObjectModel();\r\n\r\n $objects = $objectModel->getObjects(array(\r\n 'object_class_id' => $objectClassId\r\n ));\r\n\r\n $viewParams = array(\r\n 'class' => $class,\r\n 'objects' => $objects\r\n );\r\n\r\n return $this->responseView('ThemeHouse_Objects_ViewAdmin_Object_List', 'object_list', $viewParams);\r\n }", "title": "" }, { "docid": "6b6ca26ff623891fbb04a6646a0e894c", "score": "0.6566177", "text": "public function index(Request $request)\n {\n $this->checkRole();\n\n //\tGet all records of the model and set default ordering\n $builder = $this->model('orderBy', $request->orderby ?: ((property_exists($this, 'list_order_by')) ? $this->list_order_by : 'name'), $request->order ?: ((property_exists($this, 'list_order')) ? $this->list_order : 'desc'));\n\n //\tRetrieve the fields which will be used in records table\n $fields = new RenderList($this->getFieldsForList());\n\n // Handle list search\n if ($request->has('s')) {\n $builder->where($this->list_search_on, 'LIKE', '%' . $request->s . '%');\n }\n\n // Handle list filtering\n if ($request->has('filter') && $request->has('set')) {\n $builder->where($request->filter, $request->set);\n }\n\n // Move $builder to $records with default paging of 40 p/p\n $records = $builder->paginate(40);\n\n //\tLoad the view\n return view('crud::templates.index', $this->parseViewData(compact('records', 'fields')));\n }", "title": "" }, { "docid": "22313e01879ad9cf6aefe5b6cf7eaac2", "score": "0.65648544", "text": "public function listeAction()\n {\n // des éléments de contrôle de la pagination pour plus d'informations\n Zend_View_Helper_PaginationControl::setDefaultViewPartial('controls.phtml');\n\n $mapper = new Application_Model_FilmMapper();\n $film = new Application_Model_Film();\n $film = $mapper->obtenirAllFilms();\n\n // Créons un paginateur pour cette requête\n $paginator = Zend_Paginator::factory($film);\n\n // Nous lisons le numéro de page depuis la requête. Si le paramètre n'est pas précisé\n // la valeur 1 sera utilisée par défaut\n $paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\n // Assignons enfin l'objet Paginator à notre vue\n $this->view->paginator = $paginator;\n }", "title": "" }, { "docid": "ea842597a9d8fad1df58d74c6b12ab97", "score": "0.6560148", "text": "public function index()\n {\n $statuses = Status::all();\n $statuses->transformer = StatusCollection::class;\n return $this->showAll($statuses);\n }", "title": "" }, { "docid": "9854a8a0b5996147689b1cfb93901fba", "score": "0.65570813", "text": "public function index()\n {\n $entities = Entity::all();\n\n return view('actions.entity.read', compact('entities'));\n }", "title": "" }, { "docid": "6eadfe639301106d65142408b4536a7d", "score": "0.65397066", "text": "public function index()\n {\n return CentroResource::collection(Centro::paginate());\n }", "title": "" }, { "docid": "b1c6918b8a647032258b39902afb3198", "score": "0.6532946", "text": "public function index()\n {\n $this->initialiseRequest();\n $items = $this->queryRepository->all();\n if (!$items) {\n return $this->apiManager->respondNotFound('Items do not exist.');\n }\n $itemsResource = new Collection($items, $this->transformer);\n $processedItems = $this->fractalManager->createData($itemsResource)->toArray();\n return $this->apiManager->respond($processedItems);\n }", "title": "" }, { "docid": "47bc2129e22deb7b10f9cd1b3ca97140", "score": "0.65329", "text": "public function index()\n {\n\n if ($this->model->count() <> 0) {\n return $this->resource::collection($this->model);\n }\n return Response::json([\n 'error' => 'Record not found'\n ], 404);\n\n }", "title": "" }, { "docid": "b09ff22d2468ad0a34a73b6be1c564e7", "score": "0.6529856", "text": "public function index()\n {\n $questions = Question::pimp()->paginate();\n\n QuestionResource::collection($questions);\n\n return $this->sendResponse(compact('questions'));\n }", "title": "" }, { "docid": "289c02bb55888cea68db6bb293329f8b", "score": "0.65295684", "text": "public function listAction()\n {\n if (false === $this->admin->isGranted('LIST')) {\n throw new AccessDeniedException();\n }\n\n /** @var \\Symfony\\Component\\HttpFoundation\\Request $request */\n $request = $this->container->get('request_stack')->getCurrentRequest();\n\n /** @var \\Sonata\\MediaBundle\\Provider\\Pool $mediaPool */\n $mediaPool = $this->container->get('sonata.media.pool');\n\n $contexts = $mediaPool->getContexts();\n\n reset($contexts);\n $contextName = key($contexts);\n $datagrid = $this->admin->getDatagrid($request->get('context', $contextName));\n $datagrid->setValue('context', null, $this->admin->getPersistentParameter('context'));\n\n $formView = $datagrid->getForm()->createView();\n\n // set the theme for the current Admin Form\n $this->get('twig')->getExtension('form')->renderer->setTheme($formView, $this->admin->getFilterTheme());\n\n return $this->render(\n $this->admin->getTemplate('list'),\n array(\n 'action' => 'list',\n 'form' => $formView,\n 'datagrid' => $datagrid,\n 'csrf_token' => $this->getCsrfToken('sonata.batch'),\n )\n );\n }", "title": "" }, { "docid": "9541d55e53804985d6027f052d293580", "score": "0.652877", "text": "public function index()\n {\n return $this->render('index', [\n 'model' => $this->model,\n 'endpoints' => $this->getAvailableApiEndpoints(),\n 'groupsCount' => $this->model->getGroups()->count(),\n ]);\n }", "title": "" }, { "docid": "9541d55e53804985d6027f052d293580", "score": "0.652877", "text": "public function index()\n {\n return $this->render('index', [\n 'model' => $this->model,\n 'endpoints' => $this->getAvailableApiEndpoints(),\n 'groupsCount' => $this->model->getGroups()->count(),\n ]);\n }", "title": "" }, { "docid": "cc3607ce8a88164b64b1133094816f12", "score": "0.6522748", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst(($this->chapter ? $this->chapter->name . ' --> ' : '') . $this->crud->entity_name_plural);\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "cdc6c11bca5c8d643c1f6a1a0d80d23d", "score": "0.65212315", "text": "public function indexAction()\r\n {\r\n $this->parseRequestForPager();\r\n\r\n $pager = $this->getPager();\r\n $form = $this->getFilterForm()->createView();\r\n\r\n $result = array(\r\n 'list' => $this->getList($pager),\r\n 'pager' => $this->getPagination($pager),\r\n 'filters' => $this->get('pizone_form')->formDataToArray($form)\r\n );\r\n\r\n $view = new View($result);\r\n return $this->handleView($view);\r\n }", "title": "" }, { "docid": "d06d606c40c9d56f52b80f958f43b5ce", "score": "0.65188295", "text": "public function index()\n\t{\n\t\t// will show list of Data\n\t}", "title": "" }, { "docid": "3f1eb8293a667a2878f4d80d96280084", "score": "0.6518673", "text": "public function index()\n {\n return BookResource::collection(Book::paginate(25));\n }", "title": "" }, { "docid": "d44d85e06d4eeb7940282586d59ecb10", "score": "0.65124106", "text": "public function index()\n {\n return UnitResource::collection(Unit::paginate(5));\n }", "title": "" }, { "docid": "81a94e8c32b6134de5e7342f4235e4ec", "score": "0.6507357", "text": "public function index()\n {\n\n // Get articles\n $chairs = Chair::paginate(15);\n\n // Return collection of articles as a resource\n return ChairResource::collection($chairs);\n\n }", "title": "" }, { "docid": "22fb95b3636c2f407abebe88d13d8888", "score": "0.6505021", "text": "public function index()\n {\n $authors = Author::all();\n return AuthorResource::collection($authors);\n }", "title": "" }, { "docid": "1071b7d841a42ebb958087fb23ea72c9", "score": "0.64993095", "text": "public function index()\n {\n //return $this->repository->all();\n return $this->service->showAll();\n }", "title": "" }, { "docid": "cad2135c8b884f5e32721aec5b9bea32", "score": "0.6497837", "text": "public function index()\n {\n return CategoryResource::collection(Category::paginate());\n }", "title": "" }, { "docid": "1a823c7469d426833399140a05c28243", "score": "0.64936584", "text": "public function listAction()\n\t{\n\t\t$asResponse = array();\n\t\t$client = new Zend_Http_Client($this->ssUri.'/list');\n\t\t$client->setParameterGet(array('bIsRest' => true));\n\t\t$client->setConfig(array('timeout' => 30));\n\t\t$ssResponse = $client->request('GET');\n\t\t\n\t\tif($ssResponse->isSuccessful())\n\t\t{\n\t\t\t$ssResponseBody = $ssResponse->getBody();\n\t\t\t$asResponse = Zend_Json_Decoder::decode($ssResponseBody,Zend_Json::TYPE_ARRAY);\n\t\t}\n\t\t$this->view->users = $asResponse;\n\t}", "title": "" }, { "docid": "516498e2faf9e3833f4a0c0889c0d1a6", "score": "0.64926285", "text": "public function index()\n {\n $this->authorize('index', Category::class);\n\n return CategoryResource::collection(Category::paginate(15));\n }", "title": "" }, { "docid": "baeb75c01b41d5a02e946acdd0870ae9", "score": "0.6491589", "text": "public function showBooksAction()\n {\n $result = $this->model->getBooks();\n // Get params of books and pagination\n $data = $result[0];\n $pagination_params = $result[1];\n\n $this->view->render('List of books', $data, $pagination_params);\n }", "title": "" }, { "docid": "7029a5ba2d86ddb638223bf9a830e61a", "score": "0.648616", "text": "public function actionIndex()\r\n {\r\n $dataProvider = $this->getIndex('api/books', 'app\\models\\Book');\r\n\r\n return $this->render('index', [\r\n 'dataProvider' => $dataProvider\r\n ]);\r\n }", "title": "" }, { "docid": "ad2789681d764a50f799c66b64e9e3f5", "score": "0.64843917", "text": "public function index()\n {\n $data = GuestResource::collection(\n $this->guest->paginate(request()->per_page)\n );\n\n if (! $data) {\n return response()->json([\n 'message' => 'Failed to retrieve resource'\n ], 400);\n }\n\n return $data;\n }", "title": "" }, { "docid": "64c5cb71d29bff854bd1d4c026363eb2", "score": "0.6484192", "text": "public function index()\n {\n $cust = Customers::paginate(20);\n return CustomersResource::collection($cust);\n }", "title": "" }, { "docid": "fc608464ab00efa2883cbaa1ca108cd1", "score": "0.6481522", "text": "public function index()\n {\n return $this->collection($this->repository->all());\n }", "title": "" }, { "docid": "c22119f1d6e05e764e700b1cf1e15c3a", "score": "0.648076", "text": "public function index()\n {\n // Get articles\n $trackings = Tracking::paginate(10);\n\n // Return\n return BackendResource::collection($trackings);\n }", "title": "" }, { "docid": "90f607a4b7e80fdd2bcd6f3ce3d9959e", "score": "0.6477766", "text": "public function index()\n {\n $perPage = request('perPage', 10);\n $products = Product::paginate($perPage);\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "59002099eafa8643a05ba19fcbd9fedd", "score": "0.6477562", "text": "public function index()\n {\n //\n $items = Item::orderBy('id')->paginate(10);\n \n return view('manage.item.items_list', compact('items'));\n \n }", "title": "" }, { "docid": "c8bce961d8c00f94db1cc45bb581d8eb", "score": "0.6476608", "text": "public function index()\n {\n $products = Product::all();\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "c1799a28a7e3f24be756df7e3d5ed18d", "score": "0.6474707", "text": "public function index()\n {\n $people = QueryBuilder::for(Person::class)\n ->defaultSort('created_at')\n ->allowedSorts([\n 'created_at'\n ])\n ->paginate(10)\n ->appends(request()->query());\n\n return PersonResource::collection($people);\n }", "title": "" }, { "docid": "974e723cf42c91c850116aa22b80f587", "score": "0.6472995", "text": "public function index()\n {\n //\n $parent_details = \\App\\ParentDetail::orderBy('id', 'desc')->paginate(10);\n return ParentDetailResource::collection($parent_details);\n }", "title": "" }, { "docid": "b6d79dbbd4bd8f24a2ee993dec416fde", "score": "0.64697886", "text": "public function index() {\n\t\t\t$datas=DAO::getAll($this->model);\n\t\t\techo $this->_getResponseFormatter()->get($datas);\n\t}", "title": "" }, { "docid": "85336711eddcf6c317cce3da86408817", "score": "0.6469765", "text": "public function actionList()\n {\n $users = User::find()\n ->orderBy('id')\n ->all();\n if (count($users)) {\n $separator = sprintf(self::LIST_FORMAT_SEP.PHP_EOL, str_repeat('-', 10), str_repeat('-', 22), str_repeat('-', 9), str_repeat('-', 32), str_repeat('-', 42));\n echo $separator;\n printf(self::LIST_FORMAT_HEADER.PHP_EOL, 'id', 'username', 'status', 'fullname', 'email');\n echo $separator;\n foreach ($users as $user) {\n printf(self::LIST_FORMAT_LINE.PHP_EOL, $user->id, $user->username, $this->statusMap[$user->status], $user->fullname, $user->email);\n }\n echo $separator;\n }\n return Controller::EXIT_CODE_NORMAL;\n }", "title": "" }, { "docid": "f9d8426baa3f2a5993b5c1f018099562", "score": "0.64684117", "text": "public function resources_index()\n\t{\n\t\t$init = new admin_model();\n\t\t$resources = $init->getAllResources()->getResultArray();\n\n\t\t$menus = $init->getAllMenu()->getResultArray();\n\t\t$this->data = ['menus' => $menus, 'resources' => $resources];\n\t\treturn view('admin' . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'index', $this->data);\n\t}", "title": "" }, { "docid": "b9a94eb6086245c9e4f089dc9aede055", "score": "0.64675385", "text": "public function index(Request $request)\n {\n $this->authorize('listing', [$this->authorizedModel]);\n\n return response(\n $this->obj->getAll(\n ($request->has('limit') ? $request->input('limit') : 0),\n ($request->has('sort') ? $request->input('sort') : 'id'),\n ($request->has('order') ? $request->input('order') : 'desc'),\n ($request->has('offset') ? $request->input('offset') : 0)\n )\n );\n }", "title": "" } ]
82d588f1b70354622ee092f4706d7ac0
Method returns string of statistics based on selected statistics in select
[ { "docid": "0d4448ff9bef5b2ecfdbeaddf6e934cb", "score": "0.5489958", "text": "public function str() {\n $string = '';\n foreach ($this->select as $sel) {\n if ('loc' == $sel)\n $string .= \"$this->loc\\n\";\n elseif ('comments' == $sel)\n $string .= \"$this->comments\\n\";\n elseif ('labels' == $sel)\n $string .= \"$this->labels\\n\";\n elseif ('jumps' == $sel)\n $string .= \"$this->jumps\\n\";\n }\n return $string;\n }", "title": "" } ]
[ { "docid": "97af9e74e3713b77fdd94f618281ea4a", "score": "0.62110937", "text": "public function getStatistics() {\n\t\t$base_q = Models_Thread::getSelectCount();\n\t\t$threads_cnt = Models_Thread::getCount($base_q);\n\t\t$threads_ans = Models_Thread::getCount($base_q . \"WHERE `answer_id` IS NOT NULL\");\n\t\t$threads_una = $threads_cnt - $threads_ans;\n\t\t$threads_rat = number_format(100 * $threads_ans / $threads_cnt, 2);\n\n\t\t$cat_cnt = Models_Category::getCount(Models_Category::getSelectCount());\n\t\t$usr_cnt = Models_User::getCount(Models_User::getSelectCount());\n\t\t$rpl_cnt = Models_Reply::getCount(Models_Reply::getSelectCount());\n\n\t\treturn \"\t\t\t\t\t<div class='statistics_container'>\n\t\t\t\t\t\t<h3><span class='hero_number'>{$threads_cnt}</span> vragen</h3>\n\t\t\t\t\t\t<h3><span class='hero_number'>{$threads_ans}</span> beantwoord</h3>\n\t\t\t\t\t\t<h3><span class='hero_number'>{$threads_una}</span> onbeantwoord</h3>\n\t\t\t\t\t\t<h3><span class='hero_number'>{$threads_rat} %</span> verhouding</h3>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class='statistics_container'>\n\t\t\t\t\t\t<h3><span class='hero_number'>{$cat_cnt}</span> categorie&euml;n</h3>\n\t\t\t\t\t\t<h3><span class='hero_number'>{$usr_cnt}</span> gebruikers</h3>\n\t\t\t\t\t\t<h3><span class='hero_number'>{$rpl_cnt}</span> reacties</h3>\n\t\t\t\t\t</div>\n\t\t\";\n\t}", "title": "" }, { "docid": "e55ee117ef6dc13f56a59e4fce93bccf", "score": "0.58934534", "text": "function getStatsSummary();", "title": "" }, { "docid": "c7a16dc51b5b93026163af500237a4f0", "score": "0.58452827", "text": "private function evaluateSelect( Select $select )\r\n {\r\n // pueden haber agregaciones y funciones.\r\n $projections = $select->getAll();\r\n if (count($projections) == 0) return \"SELECT *\";\r\n else\r\n {\r\n $res = \"SELECT \";\r\n foreach ($projections as $proj)\r\n {\r\n // FIXME: la aggregation puede ser una evaluacion\r\n // recursiva porque param es SelectItem y\r\n // puede ser que tenga una agg adentro, asi sucesivamente.\r\n if ($proj instanceof SelectAttribute)\r\n $res .= $proj->getTableAlias() .'.'. $proj->getAttrName(); // Projection\r\n else if ($proj instanceof SelectAggregation)\r\n $res .= $proj->getName() .'('. $proj->getParam()->getTableAlias() .'.'. $proj->getParam()->getAttrName() .')';\r\n \r\n if (($alias = $proj->getAlias()) !== null)\r\n {\r\n $res .= ' AS '. $alias;\r\n }\r\n \r\n $res .= ', ';\r\n }\r\n return substr($res, 0, -2); // Saca ultimo \"; \"\r\n }\r\n }", "title": "" }, { "docid": "4c1734046c8dd2d53c4bd7a7d3429298", "score": "0.57628155", "text": "public function stats()\n {\n $threads = $this->total_threads;\n $posts = $this->total_posts;\n return sprintf(\"$threads %s – $posts %s\", trans_choice('forum.thread.label', $threads), trans_choice('forum.post.label', $posts));\n }", "title": "" }, { "docid": "faa89a82a60021bd5ff9d621793b6c77", "score": "0.57166904", "text": "function summary($parametrized = true) {\n //\n //Get teh detailed sql\n $posted = $this->record->invoice->posted ? \"report\": \"poster\";\n //\n $fname = \"detailed_$posted\";\n //\n return $this->chk(\n // \n \"select \"\n //\n //The summary field is called value; by default it is bases on \n //th amount comun of the detailed sql\n . \"detailed.id as value \"\n \n . \"from \"\n //\n . \"({$this->$fname($parametrized)}) as detailed \"\n . \"group by detailed.id \"\n );\n }", "title": "" }, { "docid": "902ccf266a8e00ef7dbbc9d6afe820ef", "score": "0.5688108", "text": "public function __toString ()\r\n\t{\r\n\t\t$stats = sprintf (\r\n\t\t\t'(%s/%s values group sorted by \"%s\" in %s sec.)', \r\n\t\t\t$this->_max_num_values,\r\n\t\t\t$this->_results['total_found'],\r\n\t\t\t$this->_group_sort,\r\n\t\t\t$this->_results['time']\r\n\t\t);\r\n\t\t$s = sprintf ( '%s: %s' . PHP_EOL, $this->_name, $stats );\r\n\t\tforeach ( $this->_results['matches'] as $index => $match )\r\n\t\t{\r\n\t\t\t$s .= sprintf ( \"\\t%s. %s, \", $index + 1, $match['@term'] );\r\n\t\t\t$s .= sprintf ( '@count=%s, @groupby=%s, ', $match['@count'], $match['@groupby'] );\r\n\t\t\t$items = array ();\r\n\t\t\tforeach ( $match as $key => $value )\r\n\t\t\t{\r\n\t\t\t\tif ( $key != '@term' && $key != '@count' && $key != '@groupby' )\r\n\t\t\t\t\t$items[] = sprintf ( '%s=%s', $key, $value );\r\n\t\t\t}\r\n\t\t\t$s .= implode ( ', ', $items ) . PHP_EOL;\r\n\t\t}\r\n\t\treturn $s;\r\n\t}", "title": "" }, { "docid": "c961f30b5a970fe746da07d3e5f2e2ad", "score": "0.5668044", "text": "public static function render_stats()\n\t{\n\t\t$run = Profiler::application();\n\t\t$run = $run['current'];\n\t\t$queries = Profiler::groups();\n\t\t$queries = count($queries['database (default)']);\n\t\treturn \"Page rendered in \" . Num::format($run['time'],3) . \" seconds using \" . Num::format($run['memory']/1024/1024,2) . \"MB and \" . $queries . \" queries.\";\n\t}", "title": "" }, { "docid": "d8d47d8e536795e49ad1db358afb1341", "score": "0.5667134", "text": "public function getStatistics();", "title": "" }, { "docid": "ff006f46cb232036c4bdfe49cca4c4c4", "score": "0.56180084", "text": "public function get_statistics();", "title": "" }, { "docid": "022eefab9bd591020e23ee6b146b21b9", "score": "0.5532926", "text": "function driver_stats (array $option = array ());", "title": "" }, { "docid": "d71d813b2213f902d4462c7e0c53e3d2", "score": "0.552985", "text": "public function showStatistics()\n {\n $students = Student::where('graduated', false)->count();\n\n //count students who are in a certain cohort\n $cohorts = Cohort::withCount(['students as student_cohort_count' => function ($query) {\n $query->where('graduated', false);\n }])\n ->with(['students' => function ($query) {\n $query->where('graduated', false);\n }])->get();\n\n //count students who are either busy or finished with a certain module, also calculate the average mark\n $moduleInfo = Module::withCount(['studentModules as student_modules_count' => function ($query) {\n $query->whereNotNull('begin_date')->whereNull('approved_by');\n },\n 'studentModules as finished_modules_count' => function ($query) {\n $query->whereNotNull('approved_by');\n }, 'studentModules as avg_mark' => function ($query) {\n $query->select(DB::raw('avg(mark) average'));\n },\n ])->with(['studentModules.student'])\n ->get();\n \n return [ \"cohorts\" => $cohorts, \"student_amount\" => $students, \"module_info\" => $moduleInfo ];\n }", "title": "" }, { "docid": "c87d445a8b3589e037af9d01571ed229", "score": "0.55255187", "text": "public function format_select();", "title": "" }, { "docid": "79627973b953f0f84c0ba6271481f6bd", "score": "0.55126125", "text": "public function queryString()\n {\n $table = $this->table;\n $group = $this->filter->group;\n $selectedGroup = strtolower($this->filter->selectedGroup);\n if ($selectedGroup == 'program') {\n $group = 'channel';\n }\n $string = $table . '.metric, ';\n // Year if table is monthly metrics\n if ($table == 'monthly_metrics') {\n $string .= $table . '.year, ';\n }\n $string .= $table . '.program, ';\n \n // Channel & Initiative\n if ($this->filter->channel || $group == 'channel') {\n $string .= $table . '.channel, ';\n if ($this->hasInitiative($table)) {\n $string .= $table . '.initiative, ';\n }\n } elseif ($this->filter->initiative || $group == 'initiative') {\n $string .= $table . '.channel, ';\n if ($this->hasInitiative($table)) {\n $string .= $table . '.initiative, ';\n }\n }\n $time = new Time;\n $sumString = $time->monthSumDigits();\n\n if ($sumString == '') {\n $string = rtrim($string, ', ');\n } else {\n $string .= $sumString;\n }\n return $string;\n }", "title": "" }, { "docid": "fb57ae3cbf6b5eed987eb76c5f2dcc57", "score": "0.5454271", "text": "protected function generateReport() : string\n {\n return json_encode($this->getComparedResults()); \n }", "title": "" }, { "docid": "7499fee1a6868483e2686c5283cb1867", "score": "0.5404477", "text": "function toString() {\r\n $result = $this->first_name . ' ' . $this->surname;\r\n $result .= ' ('.$this->average().\")\\n\";\r\n foreach($this->emails as $which=>$what)\r\n $result .= $which . ': '. $what. \"\\n\";\r\n $result .= \"\\n\";\r\n return '<pre>'.$result.'</pre>';\r\n }", "title": "" }, { "docid": "66aed33cde31e8554a48ea21402892cb", "score": "0.5403364", "text": "function summary($parametrized = true) {\n //\n //Get the detailed sql\n $posted = $this->record->invoice->posted ? \"report\": \"poster\";\n //\n $fname = \"detailed_$posted\";\n //\n return $this->chk(\n // \n \"select \"\n //\n //The summary field is called value; by default it is base on \n //the amount column of the detailed sql\n . \"sum(detailed.amount) as value \"\n . \"from \"\n //\n //Ensure that the posstage constarint is ommited; i.e., there \n //is none\n . \"({$this->$fname($parametrized, false)}) as detailed \"\n );\n }", "title": "" }, { "docid": "490ce4ee267739919094225bdb6d9885", "score": "0.5390492", "text": "function toString() {\r\n $result = $this->first_name . ' ' . $this->surname;\r\n $result .= ' ('.$this->average().\")\\n\";\r\n foreach($this->emails as $which=>$what){\r\n $result .= $which . ': '. $what. \"\\n\";\r\n }\r\n $result .= \"\\n\";\r\n return '<pre>'.$result.'</pre>';\r\n }", "title": "" }, { "docid": "e0e3e15258102ca87579fd20b607e78d", "score": "0.53857917", "text": "function download_summary($resource)\n\t{\n\treturn sql_query(\"select usageoption,count(*) c from resource_log where resource='$resource' and type='D' group by usageoption order by usageoption\");\n\t}", "title": "" }, { "docid": "ef974c398911bb96f1d5efc0c06efe4c", "score": "0.53837174", "text": "function wpv_get_filter_status_summary_txt($selected, $short=false) {\n\tob_start();\n\n\tif (sizeof($selected)) {\n\t\tif ($short) {\n\t\t\t_e('status of ', 'wpv-views');\n\t\t} else {\n\t\t\t_e('Select posts with status of ', 'wpv-views');\n\t\t}\n\t$first = true;\n\tforeach($selected as $value) {\n\t\tif ($first) {\n\t\techo '<strong>' . $value . '</strong>';\n\t\t$first = false;\n\t\t} else {\n\t\t_e(' or ', 'wpv-views');\n\t\techo '<strong>' . $value . '</strong>';\n\t\t}\n\t}\n\t} else { // !TODO review this wording: this filter is not applied and indeed disapears from the edit screen on save\n\t\tif ($short) {\n\t\t\t_e('any status.', 'wpv-views');\n\t\t} else {\n\t\t\t_e('Do not apply any filter based on status.', 'wpv-views');\n\t\t}\n\t}\n\t$data = ob_get_clean();\n\n\treturn $data;\n\n}", "title": "" }, { "docid": "3766467af25ccbe1389fb34e55ca3dc1", "score": "0.53701156", "text": "function toString() {\n \t\t$result = $this->first_name . ' ' . $this->surname;\n \t\t$result .= ' ('.$this->average().\")\\n\";\n \t\tforeach($this->emails as $which=>$what)\n \t\t$result .= $which . ': '. $what. \"\\n\";\n \t\t$result .= \"\\n\";\n \t\treturn '<pre>'.$result.'</pre>';\n\t}", "title": "" }, { "docid": "207d88a823317e096a981b89c94b6b62", "score": "0.5364581", "text": "public function getStatistic()\n {\n return $this->statistic;\n }", "title": "" }, { "docid": "f5907947bc8e0c102a5dd813a398f20d", "score": "0.5327919", "text": "public function dash03Stats(){\n $sDate = \" '\" . FksFormatter::StrToDate($this->dtInicio) . \"' and '\" .\n FksFormatter::StrToDate($this->dtTermino) . \"' \";\n $sql = \"select \".\n \"q.name as queue_name, \".\n \"count(te.ticket_id) as qtd \".\n \"from vw_tickets_encerrados te \".\n \"join queue q on te.queue_finish = q.id \".\n \"where date(te.finish_time) between $sDate \".\n \"group by q.id, q.name \".\n \"order by q.name \";\n \n $resultSet = Yii::app()->dbINCRA->createCommand($sql)->queryAll();\n\n return $resultSet;\n }", "title": "" }, { "docid": "bcc0e763929ac2e483ad880ebcd441bf", "score": "0.532347", "text": "public function getEditorStatistics($options) {\r\n $statistics = array();\r\n $daoBakendLog = Admin_Model_DAO_BackendLog::factory();\r\n try {\r\n \t$rStatistics = $daoBakendLog->getEditorStatistics($options);\r\n \t $statistics[$options['table']] = $rStatistics;\r\n } catch (Exception $exc) {\r\n \tprBinh($exc);\r\n \tUtils_Global::storeLog($exc, __FILE__, __LINE__);\r\n }\r\n \r\n return $statistics;\r\n }", "title": "" }, { "docid": "976441c292afef1435e27475a3055655", "score": "0.5316283", "text": "function get_group_stats( $a )\n {\n return \"SELECT g.g_title, g.g_id, SUM( i.file_size ) as diskspace, COUNT( i.file_size ) as uploads\n FROM \".SQL_PREFIX.\"groups g, \".SQL_PREFIX.\"members m, \".SQL_PREFIX.\"gallery_images i\n WHERE i.member_id=m.id AND m.mgroup=g.g_id GROUP BY m.mgroup ORDER BY diskspace DESC\n \";\n }", "title": "" }, { "docid": "e97b44b9b6c246306fe9478219665844", "score": "0.53119665", "text": "private static function show_statistics()\n\t{\n\t\t$tests = Colors::blue(\"Tests: \" . self::$statistics['tests']);\n\t\t$failed = Colors::red(\"Failed: \" . self::$statistics['tests_failed']);\n\t\t$success = Colors::green(\"Success: \" . (self::$statistics['tests'] - self::$statistics['tests_failed']));\n\t\t$reqs = \"Requirements: \" . self::$statistics['requirements'];\n\t\t\n\t\tputs(PHP_EOL . \"$reqs | $tests | $success | $failed\");\n\t}", "title": "" }, { "docid": "7f4ba78ad3f214837f63a6194a54673f", "score": "0.53084826", "text": "public function get_protection_stats()\n {\n jsonView(\n Jamf_protect_model::selectRaw(\"COUNT(CASE WHEN `protection_status` = 'Protected' THEN 1 END) AS 'protected'\")\n ->selectRaw(\"COUNT(CASE WHEN `protection_status` <> 'Protected' THEN 1 END) AS 'unprotected'\")\n ->filter()\n ->first()\n ->toLabelCount()\n );\n }", "title": "" }, { "docid": "0f7238081b68cb9b067bd0a799f75d44", "score": "0.5284518", "text": "public function statistic()\n {\n return Statistic::i();\n }", "title": "" }, { "docid": "91cbf1d8141d707e3db3888bd57ef716", "score": "0.5274495", "text": "public abstract function getUsageStatistics();", "title": "" }, { "docid": "52b85b53e4d3955113649850adaa8d87", "score": "0.52711725", "text": "function getResults($datasetid) {\n $sqlstring = \"SELECT results.studentid,\n COUNT(grade) as grades, \n SUM(CASE WHEN shortname = 'ENG' AND points >= 40 THEN 1 ELSE 0 END) AS eng,\n SUM(CASE WHEN shortname = 'MAT' AND points >= 40 THEN 1 ELSE 0 END) AS mat,\n SUM(CASE WHEN shortname = 'GEO' OR 'HIS' AND points >= 40 THEN 1 ELSE 0 END) as hums,\n SUM(CASE WHEN shortname = 'FRE' OR 'GER' AND points >= 40 THEN 1 ELSE 0 END) as mfl,\n SUM(CASE WHEN points >= 52 THEN 1 ELSE 0 END) AS aa,\n SUM(CASE WHEN points >= 40 THEN 1 ELSE 0 END) AS ac, \n SUM(CASE WHEN points >= 16 THEN 1 ELSE 0 END) AS ag,\n SUM(clevel1) as clevel1,\n SUM(clevel2) as clevel2,\n SUM(clevel3) as clevel3,\n SUM(points) as points \n FROM results \n INNER JOIN grades ON results.gradeid = grades.gradeid\n INNER JOIN subjects ON results.subjectid = subjects.subjectid\n INNER JOIN students ON results.studentid = students.studentid\n \";\n $sqlstring .= buildSQLStringIncDataSet($datasetid);\n $sqlstring .= \" GROUP BY studentid\";\n\n $results = mysql_query($sqlstring);\n return $results;\n}", "title": "" }, { "docid": "504963cad0785a3549714b37925edb9a", "score": "0.52503985", "text": "protected function getStatsSubmissionsFields()\r\n {\r\n $select = array(\r\n // App\r\n 'app_id',\r\n\r\n // Date/time\r\n 'collector_tstamp',\r\n\r\n 'domain_sessionidx',\r\n\r\n // Location\r\n 'geo_country',\r\n 'geo_city',\r\n\r\n // Referrer URL components\r\n 'refr_urlhost',\r\n\r\n // Referrer details\r\n 'refr_medium',\r\n\r\n // Browser\r\n 'br_family',\r\n\r\n // Operating System\r\n 'os_family',\r\n\r\n // Device/Hardware\r\n 'dvce_type',\r\n 'dvce_ismobile',\r\n );\r\n\r\n return $select;\r\n }", "title": "" }, { "docid": "03ac671eab692fa1ae41c048ee6ffdb3", "score": "0.52470285", "text": "public function getSummary();", "title": "" }, { "docid": "03ac671eab692fa1ae41c048ee6ffdb3", "score": "0.52470285", "text": "public function getSummary();", "title": "" }, { "docid": "b9a54ced815be9be66600ffee569fe96", "score": "0.5237181", "text": "public function getSummary(): string;", "title": "" }, { "docid": "e16be82df7d33f5c96d059790a76d636", "score": "0.5235872", "text": "public function __toString() {\n\t\t$res = \"Function: | Total: | Running: | Available:\\n\";\n\t\t$res .= \"----------------------------------------------\\n\";\n\n\t\tforeach ($this->getFunctions() as $function) {\n\t\t\t$res .= sprintf(\"%-12s | %6d | %8d | %10d\\n\", $function, $this->getTotal($function), $this->getRunning($function), $this->getAvailable($function));\n\t\t}\n\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "1d36e2aebc8732935d472d2515cb2675", "score": "0.52281886", "text": "function webform_stats_display_index(){\n $types = webform_stats_get_types();\n $output = \"yo\";\n return $output;\n}", "title": "" }, { "docid": "feafb1d0efe39206ac904b11d79a1cbb", "score": "0.51968086", "text": "protected function getStatsData($options) {\n\t\t$kurogoOption = new KurogoStatsOption();\n\t\t$type = isset($options['stattype']) ? $options['stattype'] : 'count';\n $kurogoOption->setType($type);\n\n if ($options['service']) {\n $kurogoOption->setService($options['service']);\n unset($options['service']);\n }\n\n if ($options['start']) {\n $kurogoOption->addFilter('timestamp', 'GT', $options['start']);\n }\n\n if ($options['end']) {\n $kurogoOption->addFilter('timestamp', 'LT', $options['end']);\n }\n\n if (isset($options['sort'])) {\n $kurogoOption->setSortField($options['sort']);\n }\n\n if (isset($options['sort_dir'])) {\n $kurogoOption->setSortDir($options['sort_dir']);\n }\n\n if (isset($options['group'])) { \n $kurogoOption->setGroup($options['group']);\n }\n\n if (isset($options['field'])) { \n $kurogoOption->setField($options['field']);\n }\n \n if (isset($options['top'])) {\n $kurogoOption->setLimit($options['top']);\n }\n\n foreach (KurogoStats::validFields() as $field) {\n if (isset($options[$field])) {\n $kurogoOption->addFilter($field, 'EQ', $options[$field]);\n }\n }\n\n return KurogoStats::retrieveStats($kurogoOption);\n\t}", "title": "" }, { "docid": "c61db86ea016abdfe2fc2780e50e6392", "score": "0.5168504", "text": "public function getSqlArrayForStats()\n\t{\n\t // CHANGE THIS: Optionnal\n\n\t\t//var $statssql=array();\n //$this->statssql[0]=\"SELECT field1 as label, count(distinct(email)) as nb FROM mytable WHERE email IS NOT NULL\";\n\t\treturn array();\n\t}", "title": "" }, { "docid": "703cf0afd524ba848d3e256d9fa19a40", "score": "0.51663303", "text": "function displayResults() { \n\t\tglobal $wgRequest;\n\t\t$selectedPurposeValue =\t$wgRequest->getVal( 'Purpose-value' );\n\t\t$level = $wgRequest->getVal( 'level' );\n\t\t$queryObject = $this->getInput();\n\t\t$retval = $queryObject->executeQuery();\n\t\treturn $this->buildForm( true , true , $selectedPurposeValue , $level).$retval;\t\t\n\t}", "title": "" }, { "docid": "4214713037716d38466fed3224715384", "score": "0.5158862", "text": "public function SelectStat()\n\t{\n\t\t$requette=\"SELECT ID,REFCHANGEMENT,DATEPUBIR,DATEPUBPM,TYPECAUSE,TYPECAUSESECONDAIRE,TYPOLIGYGTS,KINDIMPACT,RESPONSIBLETEAM,FOURNISSEURRESPONSIBLE,POWERPROD,LEGACY,COMPOSANT,COMPOSANTCOMPLEMENT,ZONEGEOGRAPHIQUE \";\n\t\t$requette=\"FROM \".SCHEMA.\".STATISTIQUE \";\n\t\n\t\t\n\t\t$db = new db();\n\t\t$db->db_connect();\n\t\t$db->db_query($requette);\n\t\t$res=$db->db_fetch_array();\n\t\t$db->close();\n\t\t$tab = array();\n\t\tfor ($i=0; $i < count($res) ; $i++) \n\t\t{ \n\t\t$valeur=$res[$i];\n\t\tarray_push($tab, $this->SetParam($valeur[0],$valeur[1],$valeur[2],$valeur[3],$valeur[4],$valeur[5],$valeur[6],$valeur[7],$valeur[8],$valeur[9],$valeur[10],$valeur[11],$valeur[12],$valeur[13],$valeur[14]));\n\t\t} \n\t\n\t\treturn $tab;\n\t}", "title": "" }, { "docid": "4e5968148d3fa18d3925c4baf7e6b72b", "score": "0.51549363", "text": "public function getStatistics()\n {\n $cacheKey = 'statistics';\n $res = $this->_fetchFromCache($cacheKey);\n if (!$res) {\n $res = $this->_calculateStatistics();\n $this->_storeInCache($res, $cacheKey);\n }\n return $res;\n }", "title": "" }, { "docid": "85647e06e8d28d75d4dff100ef7cf8d2", "score": "0.51420754", "text": "static function profilerQueriesInfo2Html($aNameAdapterDB) {\n $strEcho = '';\n $longTime = 0;\n //-----------------------------\n $db = Zend_Registry::get($aNameAdapterDB);\n $profiler = $db->getProfiler();\n\n if ($profiler->getEnabled() == false) {\n return $strEcho;\n }\n\n $strEcho .= \"<b>---\" . self::Translate(\"Информация о времени выполнения каждого запроса к базе данных\") . \" ---</b><br /><br />\";\n foreach ($profiler->getQueryProfiles() as $query) {\n\n $longTime = $query->getElapsedSecs();\n $longTime = number_format($longTime, 5, '.', '');\n $myQuery = $query->getQuery();\n $arrParams = $query->getQueryParams();\n\n foreach ($arrParams as $param) {\n $param = $db->quote($param);\n $pos = strpos($myQuery, '?');\n $myQuery = substr_replace($myQuery, $param, $pos, 1);\n }\n $strEcho .= self::Translate(\"Запрос\") . \": \" . $myQuery . \"<br />\";\n $strEcho .= self::Translate('Время выполнения запроса') . ': ' . $longTime . ' sec.' . \"<br /><br />\";\n }\n return $strEcho;\n }", "title": "" }, { "docid": "f460bd42ccf4fbf3431ccbd81be77650", "score": "0.51369864", "text": "public static function getReportSql()\n {\n return \"\n SELECT t.command, t.task_id,\n SUM(CASE WHEN tr.status = 'started' THEN 1 ELSE 0 END) AS started,\n SUM(CASE WHEN tr.status = 'completed' THEN 1 ELSE 0 END) AS completed,\n SUM(CASE WHEN tr.status = 'error' THEN 1 ELSE 0 END) AS error,\n round(AVG(tr.execution_time),2) AS time_avg,\n count(*) AS runs\n FROM task_runs AS tr\n LEFT JOIN tasks AS t ON t.task_id=tr.task_id\n WHERE tr.ts BETWEEN ? AND ? + INTERVAL 1 DAY\n GROUP BY command\n ORDER BY tr.task_id\";\n }", "title": "" }, { "docid": "22ec1ab955b009658731ccca6143c9ed", "score": "0.5128612", "text": "public function gatherStats() {\r\n\t\treturn array (\r\n\t\t\t\"num_sentences\" => $this->numSentences,\r\n\t\t\t\"num_words\" => $this->numWords,\r\n\t\t\t\"num_uniq_words\" => $this->numUniqWords,\r\n\t\t\t\"num_chars\" => $this->numEnChar,\r\n\t\t\t\"freq_tbl\" => $this->freqTbl2JSON($this->freqChar),\r\n\t\t\t\"most_freq\" => $this->freqTbl2JSON($this->freqTopWords)\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "7daf04dc4b22e2206a0efbc89ecf34bc", "score": "0.5122145", "text": "public function summary() {\n\n\t\t$totalincoming = Payment::select(DB::raw('SUM(invoice_amount) as total_amount'))->where('payment_form', 'Incoming')->value('total_amount');\n\t\t$totaloutgoing = Payment::select(DB::raw('SUM(invoice_amount) as total_amount'))->where('payment_form', 'Outgoing')->value('total_amount');\n\n\t\tif ($totalincoming == \"\") {\n\n\t\t\t$incoming = 0;\n\t\t} else {\n\t\t\t$incoming = $totalincoming;\n\t\t}\n\n\t\tif ($totaloutgoing == \"\") {\n\t\t\t$outgoing = 0;\n\t\t} else {\n\t\t\t$outgoing = $totaloutgoing;\n\t\t}\n\n\t\t/*Approved statistics*/\n\t\t$approvedtotal = Payment::select(DB::raw('SUM(invoice_amount) as total_amount'))->where('account_status', '=', '1')->value('total_amount');\n\t\t$approvedincoming = Payment::select(DB::raw('SUM(invoice_amount) as total_amount'))->where('account_status', '=', '1')->where('payment_form', '=', 'Incoming')->value('total_amount');\n\t\t$approvedoutgoing = Payment::select(DB::raw('SUM(invoice_amount) as total_amount'))->where('account_status', '=', '1')->where('payment_form', '=', 'Outgoing')->value('total_amount');\n\n\t\tif ($approvedincoming == \"\") {\n\t\t\t$approved = 0;\n\t\t} else {\n\t\t\t$approved = $approvedincoming;\n\t\t}\n\n\t\tif ($approvedoutgoing == \"\") {\n\t\t\t$outapproved = 0;\n\t\t} else {\n\t\t\t$outapproved = $approvedoutgoing;\n\t\t}\n\n\t\t/*Approved statistics*/\n\n\t\t/* Decline statistics*/\n\t\t$declineincoming = Payment::select(DB::raw('SUM(invoice_amount) as total_amount'))->where('account_status', '=', '2')->where('payment_form', '=', 'Incoming')->value('total_amount');\n\t\t$declineoutgoing = Payment::select(DB::raw('SUM(invoice_amount) as total_amount'))->where('account_status', '=', '2')->where('payment_form', '=', 'Outgoing')->value('total_amount');\n\t\tif ($declineincoming == \"\") {\n\t\t\t$decline = 0;\n\t\t} else {\n\t\t\t$decline = $declineincoming;\n\t\t}\n\n\t\tif ($declineoutgoing == \"\") {\n\t\t\t$outdecline = 0;\n\t\t} else {\n\t\t\t$outdecline = $declineoutgoing;\n\t\t}\n\n\t\t/* Decline statistics*/\n\n\t\t$paymentType = array('Over Due', 'Cuurent Due', 'Future Due');\n\t\t/*Approved incoming Graph statistics*/\n\t\t$over_dueapprove = Payment::join('payment_types', 'payments.payment_type', '=', 'payment_types.id')->select('payments.*', 'payment_types.name')->whereRaw(\"due_date < DATE(NOW()) AND due_date <= TIME(NOW())\")->select(DB::raw('SUM(invoice_amount) as total_amount'))->where('account_status', '=', '1')->where('payment_form', '=', 'Incoming')->value('total_amount');\n\t\t$past_dueapprove = Payment::join('payment_types', 'payments.payment_type', '=', 'payment_types.id')->select('payments.*', 'payment_types.name')->whereRaw(\"due_date >= DATE(NOW()) && due_date <= DATE_ADD(CURDATE(), interval 15 DAY)\")->where('account_status', '=', '1')->select(DB::raw('SUM(invoice_amount) as total_amount'))->where('payment_form', '=', 'Incoming')->value('total_amount');\n\t\t$future_dueapprove = Payment::join('payment_types', 'payments.payment_type', '=', 'payment_types.id')->select('payments.*', 'payment_types.name')->whereRaw(\"due_date >= DATE_ADD(CURDATE(), interval 16 DAY)\")->select(DB::raw('SUM(invoice_amount) as total_amount'))->where('account_status', '=', '1')->where('payment_form', '=', 'Incoming')->value('total_amount');\n\n\t\tif ($over_dueapprove == \"\") {\n\t\t\t$overdue_approve = 0;\n\t\t} else {\n\t\t\t$overdue_approve = $over_dueapprove;\n\t\t}\n\t\tif ($past_dueapprove == \"\") {\n\t\t\t$pastdue_approve = 0;\n\t\t} else {\n\t\t\t$pastdue_approve = $past_dueapprove;\n\t\t}\n\t\tif ($future_dueapprove == \"\") {\n\t\t\t$futuredue_approve = 0;\n\t\t} else {\n\t\t\t$futuredue_approve = $future_dueapprove;\n\t\t}\n\n\t\t$datechart = Charts::create('bar', 'highcharts')\n\t\t\t->title('Incoming - Approved Due Amount')\n\t\t\t->yAxisTitle('<b>' . 'Total Amount' . '</b>')\n\t\t\t->xAxisTitle('<b>' . 'Due Type' . '</b>')\n\t\t\t->elementLabel('Incoming - Approved Due Amount')\n\t\t\t->labels([$paymentType[0], $paymentType[1], $paymentType[2]])\n\t\t\t->values([$overdue_approve, $pastdue_approve, $futuredue_approve])\n\t\t\t->dimensions(100, 100)\n\t\t\t->responsive(true);\n\t\t/*Approved incoming Graph statistics*/\n\n\t\t/*Decline incoming Graph statistics*/\n\t\t$over_duedecline = Payment::join('payment_types', 'payments.payment_type', '=', 'payment_types.id')->select('payments.*', 'payment_types.name')->whereRaw(\"due_date < DATE(NOW()) AND due_date <= TIME(NOW())\")->select(DB::raw('SUM(invoice_amount) as total_amount'))->where('account_status', '=', '2')->where('payment_form', '=', 'Incoming')->value('total_amount');\n\n\t\t$past_duedecline = Payment::join('payment_types', 'payments.payment_type', '=', 'payment_types.id')->select('payments.*', 'payment_types.name')->whereRaw(\"due_date >= DATE(NOW()) && due_date <= DATE_ADD(CURDATE(), interval 15 DAY)\")->select(DB::raw('SUM(invoice_amount) as total_amount'))->where('account_status', '=', '2')->where('payment_form', '=', 'Incoming')->value('total_amount');\n\n\t\t$future_duedecline = Payment::join('payment_types', 'payments.payment_type', '=', 'payment_types.id')->select('payments.*', 'payment_types.name')->whereRaw(\"due_date >= DATE_ADD(CURDATE(), interval 16 DAY)\")->select(DB::raw('SUM(invoice_amount) as total_amount'))->where('account_status', '=', '2')->where('payment_form', '=', 'Incoming')->value('total_amount');\n\n\t\tif ($over_duedecline == \"\") {\n\t\t\t$overdue_decline = 0;\n\t\t} else {\n\t\t\t$overdue_decline = round($over_duedecline, 2);\n\t\t}\n\t\tif ($past_duedecline == \"\") {\n\n\t\t\t$pastdue_decline = 0;\n\t\t} else {\n\t\t\t$pastdue_decline = round($past_duedecline, 2);\n\t\t}\n\t\tif ($future_duedecline == \"\") {\n\t\t\t$futuredue_decline = 0;\n\t\t} else {\n\t\t\t$futuredue_decline = round($future_duedecline, 2);\n\t\t}\n\n\t\t$datechartdecline = Charts::create('bar', 'highcharts')\n\t\t\t->title('Incoming - Declined Due Amount')\n\t\t\t->yAxisTitle('<b>' . 'Total Amount' . '</b>')\n\t\t\t->xAxisTitle('<b>' . 'Due Date Type' . '</b>')\n\t\t\t->elementLabel('Incoming - Declined Due Amount')\n\t\t\t->labels([$paymentType[0], $paymentType[1], $paymentType[2]])\n\t\t\t->values([$overdue_decline, $pastdue_decline, $futuredue_decline])\n\t\t\t->dimensions(100, 100)\n\t\t\t->responsive(true);\n\t\t/*Decline incoming Graph statistics*/\n\n\t\t/*Approved outgoing Graph statistics*/\n\t\t$over_dueapproveout = Payment::join('payment_types', 'payments.payment_type', '=', 'payment_types.id')->select('payments.*', 'payment_types.name')->whereRaw(\"due_date < DATE(NOW()) AND due_date <= TIME(NOW())\")->select(DB::raw('SUM(invoice_amount) as total_amount'))->where('account_status', '=', '1')->where('payment_form', '=', 'Outgoing')->value('total_amount');\n\n\t\t$past_dueapproveout = Payment::join('payment_types', 'payments.payment_type', '=', 'payment_types.id')->select('payments.*', 'payment_types.name')->whereRaw(\"due_date >= DATE(NOW()) && due_date <= DATE_ADD(CURDATE(), interval 15 DAY)\")->where('account_status', '=', '1')->where('payment_form', '=', 'Outgoing')->value('total_amount');\n\t\t$future_dueapproveout = Payment::join('payment_types', 'payments.payment_type', '=', 'payment_types.id')->select('payments.*', 'payment_types.name')->whereRaw(\"due_date >= DATE_ADD(CURDATE(), interval 16 DAY)\")->where('account_status', '=', '1')->where('payment_form', '=', 'Outgoing')->value('total_amount');\n\n\t\tif ($over_dueapproveout == \"\") {\n\t\t\t$overdue_outapprove = 0;\n\t\t} else {\n\t\t\t$overdue_outapprove = $over_dueapproveout;\n\t\t}\n\t\tif ($past_dueapproveout == \"\") {\n\t\t\t$pastdue_outapprove = 0;\n\t\t} else {\n\t\t\t$pastdue_outapprove = $past_dueapproveout;\n\n\t\t}\n\t\tif ($future_dueapproveout == \"\") {\n\t\t\t$futuredue_outapprove = 0;\n\t\t} else {\n\t\t\t$futuredue_outapprove = $future_dueapproveout;\n\t\t}\n\n\t\t$datechartapproveout = Charts::create('bar', 'highcharts')\n\t\t\t->title('Outgoing - Approved Due Amount')\n\t\t\t->yAxisTitle('<b>' . 'Total Amount' . '</b>')\n\t\t\t->xAxisTitle('<b>' . 'Due Date Type' . '</b>')\n\t\t\t->elementLabel('Outgoing - Approved Due Amount')\n\t\t\t->labels([$paymentType[0], $paymentType[1], $paymentType[2]])\n\t\t\t->values([$overdue_outapprove, $pastdue_outapprove, $futuredue_outapprove])\n\t\t\t->dimensions(100, 100)\n\t\t\t->responsive(true);\n\t\t/*Approved outgoing Graph statistics*/\n\n\t\t/*Decline outgoing Graph statistics*/\n\t\t$over_duedeclineout = Payment::join('payment_types', 'payments.payment_type', '=', 'payment_types.id')->select('payments.*', 'payment_types.name')->whereRaw(\"due_date < DATE(NOW()) AND due_date <= TIME(NOW())\")->select(DB::raw('SUM(invoice_amount) as total_amount'))->where('account_status', '=', '2')->where('payment_form', '=', 'Outgoing')->value('total_amount');\n\n\t\t$past_duedeclineout = Payment::join('payment_types', 'payments.payment_type', '=', 'payment_types.id')->select('payments.*', 'payment_types.name')->whereRaw(\"due_date >= DATE(NOW()) && due_date <= DATE_ADD(CURDATE(), interval 15 DAY)\")->select(DB::raw('SUM(invoice_amount) as total_amount'))->where('account_status', '=', '2')->where('payment_form', '=', 'Outgoing')->value('total_amount');\n\n\t\t$future_duedeclineout = Payment::join('payment_types', 'payments.payment_type', '=', 'payment_types.id')->select('payments.*', 'payment_types.name')->whereRaw(\"due_date >= DATE_ADD(CURDATE(), interval 16 DAY)\")->where('account_status', '=', '2')->where('payment_form', '=', 'Outgoing')->value('total_amount');\n\t\t$paymentType = array('Over-Due', 'Current-Due', 'Future-Due');\n\n\t\tif ($over_duedeclineout == \"\") {\n\t\t\t$overdue_outdecline = 0;\n\t\t} else {\n\t\t\t$overdue_outdecline = $over_duedeclineout;\n\t\t}\n\t\tif ($past_duedeclineout == \"\") {\n\t\t\t$pastdue_outdecline = 0;\n\t\t} else {\n\t\t\t$pastdue_outdecline = $past_duedeclineout;\n\n\t\t}\n\t\tif ($future_duedeclineout == \"\") {\n\t\t\t$futuredue_outdecline = 0;\n\t\t} else {\n\t\t\t$futuredue_outdecline = $future_duedeclineout;\n\t\t}\n\n\t\t$datechartdeclineout = Charts::create('bar', 'highcharts')\n\t\t\t->title('Outgoing - Declined Due Amount')\n\t\t\t->yAxisTitle('<b>' . 'Total Amount' . '</b>')\n\t\t\t->xAxisTitle('<b>' . 'Due Date Type' . '</b>')\n\t\t\t->elementLabel('Outgoing - Declined Due Amount')\n\t\t\t->labels([$paymentType[0], $paymentType[1], $paymentType[2]])\n\t\t\t->values([$overdue_outdecline, $pastdue_outdecline, $futuredue_outdecline])\n\t\t\t->dimensions(100, 100)\n\t\t\t->responsive(true);\n\t\t/*Decline outgoing Graph statistics*/\n\n\t\treturn view('account/payments/summary', compact('incoming', 'outgoing', 'approvedtotal', 'approved', 'decline', 'outapproved', 'outdecline', 'over_dueapprove', 'past_dueapprove', 'future_dueapprove', 'over_duedecline', 'past_duedecline', 'future_duedecline', 'over_dueapproveout', 'past_dueapproveout', 'future_dueapproveout', 'over_duedeclineout', 'past_duedeclineout', 'future_duedeclineout', 'datechart', 'datechartdecline', 'datechartapproveout', 'datechartdeclineout'));\n\t}", "title": "" }, { "docid": "8ec7d67248fb681e6ac52521dff396a3", "score": "0.51185507", "text": "public function output(): string\n {\n return $this->criteria;\n }", "title": "" }, { "docid": "658fb980d32352a9382b931e06a83546", "score": "0.50943005", "text": "public function viewMaterialStatistic()\n {\n $viewStatisticCount = UsersMaterialStatistics::join('materials as ma', 'material_id', '=', 'ma.id')\n ->select('materialType', DB::raw('count(materialType) as totalrecords'))\n ->groupBy('materialType')\n ->get();\n return $viewStatisticCount;\n }", "title": "" }, { "docid": "484fc7375da602023ddb6db455c2e826", "score": "0.50937295", "text": "public function summary() {\n return $this->getLabelValue();\n }", "title": "" }, { "docid": "64c676b02db3c3b5e2f6f8ec6972fe1c", "score": "0.5090589", "text": "public function __toString()\n {\n $this->parameters = [];\n\n $select = 'SELECT ' . $this->strColumns()\n . ' FROM ' . $this->getTableNameAndAlias()\n . $this->strJoins()\n . $this->strWhere()\n . $this->strOrderBy()\n . $this->strGroupBy()\n . $this->strHaving()\n . ($this->limit ? ' LIMIT ' . $this->limit : '')\n . ($this->offset ? ' OFFSET ' . $this->offset : '');\n\n return $select;\n }", "title": "" }, { "docid": "0f1d576b91b88f11a02db563db5373a6", "score": "0.5089924", "text": "public function getStatsColumnDescriptor();", "title": "" }, { "docid": "7e2148470931e30ef3fd511739f3ba2f", "score": "0.5086962", "text": "public function __toString() {\n\n // start with the summary, usually something like \"Chance Rain Showers\"\n $str = $this->summary;\n\n if (count($this->values) > 0) {\n $str .= ' (';\n $vals = array();\n foreach ($this->values as $v) {\n\n $words = array();\n\n // does this day have multiple conditions? the additive will be set to \"and\" or \"or\"\n if (isset($v['additive'])) {\n $words[] = $v['additive'];\n }\n\n // \"chance\", \"patchy\", \"intermittent\", etc.\n $words[] = $v['coverage'];\n\n // ignore \"none\" for intensity. We don't want to say \"patchy none fog\", but rather \"patchy fog\" instead.\n // if set, this is something like \"light\",\n if (isset($v['intensity']) && $v['intensity'] !== 'none') {\n $words[] = $v['intensity'];\n }\n\n // \"rain showers\", \"thunderstorms\", \"fog\", \"snow\", etc.\n $words[] = $v['weather-type'];\n\n // convert all the attributes into a string like \"slight chance light rain showers\"\n $vals[] = implode(' ', $words);\n\n }\n $str .= implode(' ', $vals);\n $str .= ')';\n }\n\n return $str;\n\n }", "title": "" }, { "docid": "608c5a0f5f3e0c9c07c84184984eb75c", "score": "0.50846934", "text": "public static function stats($return = false)\n {\n $stats = '';\n $dbStats = Yii::app()->getDb()->getStats();\n\n if (is_array($dbStats)) {\n $stats = 'Queries: ' . $dbStats[0] . ' (time ' . round($dbStats[1], 5) . ' sec.)<br />';\n }\n\n $logger = Yii::getLogger();\n $memory = round($logger->getMemoryUsage() / 1048576, 3);\n $time = round($logger->getExecutionTime(), 3);\n\n $stats .= 'Used memory: ' . $memory . ' Mb<br />';\n $stats .= 'Execution time: ' . $time . ' sec.';\n\n if ($return) {\n return $stats;\n }\n\n echo $stats;\n }", "title": "" }, { "docid": "eb45fe0a1d27981f612b0db5170b79eb", "score": "0.50826055", "text": "public function getTitleDetails(): string\n\t{\n\t\treturn '(' . count(static::$queries) . ' Queries across ' . ($countConnection = count($this->connections)) . ' Connection' .\n\t\t\t\t($countConnection > 1 ? 's' : '') . ')';\n\t}", "title": "" }, { "docid": "36275005d26ee0e48298ef8498b16f2b", "score": "0.5061814", "text": "function get_summary_text()\n {\n return \"$this->name\";\n }", "title": "" }, { "docid": "62b21f4d8f347370b6a0adcc52ccc5a7", "score": "0.5058368", "text": "function getPrimaryStdFilterHTML($module, $selected = '') {\n\tglobal $ogReport, $current_language;\n\t$ogReport->oCustomView=new CustomView();\n\t$result = $ogReport->oCustomView->getStdCriteriaByModule($module);\n\t$mod_strings = return_module_language($current_language, $module);\n\t$shtml = '';\n\tif (isset($result)) {\n\t\tforeach ($result as $key => $value) {\n\t\t\tif (isset($mod_strings[$value])) {\n\t\t\t\tif ($key == $selected) {\n\t\t\t\t\t$shtml .= '<option selected value=\"'.$key.'\">'.getTranslatedString($module, $module).' - '.$mod_strings[$value].'</option>';\n\t\t\t\t} else {\n\t\t\t\t\t$shtml .= '<option value=\"'.$key.'\">'.getTranslatedString($module, $module).' - '.$mod_strings[$value].'</option>';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($key == $selected) {\n\t\t\t\t\t$shtml .= '<option selected value=\"'.$key.'\">'.getTranslatedString($module, $module).' - '.$value.'</option>';\n\t\t\t\t} else {\n\t\t\t\t\t$shtml .= '<option value=\"'.$key.'\">'.getTranslatedString($module, $module).' - '.$value.'</option>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $shtml;\n}", "title": "" }, { "docid": "67d6fddb7d423af5b6d3910c8e93ab90", "score": "0.50582045", "text": "function show_stats() {\n //$this->cpanelx->api_output();\t \n\t \n\t $ret = $this->title();\n\t \n\t //$ret .= $this->cpanelx->show_awstats();\n\t $ret .= $this->cpanel_tools->show_awstats();\n\t //print_r($ret);\n\t return ($ret);\n\t}", "title": "" }, { "docid": "7b0cb36bf559e969918a28612c92bd63", "score": "0.5055181", "text": "protected function _calculateStatistics()\n {\n $stats = array();\n\n //Totals\n $totals = new ACI_Model_Table_Totals();\n $totals->countTotals();\n // Number of databases\n $stats['databases'] = $totals->getNumSourceDatabases();\n // Number of new databases\n $stats['new_databases'] = $totals->getNumNewSourceDatabases();\n // Number of common names\n $stats['common_names'] = $totals->getNumCommonNames();\n // Number of synonyms\n $stats['synonyms'] = $totals->getNumSynonyms();\n // Number of infraspecific taxa\n $stats['infraspecific_taxa'] = $totals->getNumInfraspecificTaxa();\n // Number of accepted names\n $stats['species'] = $totals->getNumSpecies();\n\n // Fossils\n $stats['extinct_infraspecific_taxa'] = $totals->getNumExtinctInfraspecificTaxa();\n $stats['extinct_species'] = $totals->getNumExtinctSpecies();\n $stats['living_species'] = $stats['species'] - $stats['extinct_species'];\n $stats['living_infraspecific_taxa'] = $stats['infraspecific_taxa'] -\n $stats['extinct_infraspecific_taxa'];\n\n return array_map('number_format', $stats);\n }", "title": "" }, { "docid": "3e5c7e983537c14124b3648d28bfcd33", "score": "0.505357", "text": "public function printStatment()\n\t{\n\t\treturn 'Take train ' . $this->train . ' from ' . Root::getDeparture($this) . ' to ' . Root::getarrival($this) . '. Sit in seat ' . Root::getSeat($this) . '.';\n\t}", "title": "" }, { "docid": "4564aa12701644b6d7ab017dce265ffd", "score": "0.50516725", "text": "public function statisticsQuestion(Request $request){\n $statement = \"SELECT COUNT(*) data,\n question_employees.value,\n questions.description,\n question_categories.id,\n CASE question_employees.value\n WHEN 1 THEN 'Absoluto desacuerdo'\n WHEN 2 THEN 'En desacuerdo'\n WHEN 3 THEN 'Un poco de acuerdo'\n WHEN 4 THEN 'De acuerdo'\n WHEN 5 THEN 'Muy de acuerdo'\n WHEN 6 THEN 'Absolutamente de acuerdo'\n ELSE 'more'\n END as respuesta,\n CASE question_employees.value\n WHEN 1 THEN '#FF6E40'\n WHEN 2 THEN '#1565C0'\n WHEN 3 THEN '#FFFF00'\n WHEN 4 THEN '#76FF03'\n WHEN 5 THEN '#80DEEA'\n WHEN 6 THEN '#FF9800'\n ELSE 'more'\n END as color\n FROM questions INNER JOIN question_employees ON questions.id=question_employees.question_id\n INNER JOIN question_categories ON questions.question_category_id=question_categories.id\n WHERE questions.id=\".$request->id.\" GROUP by question_employees.value\";\n\n $result=DB::select(DB::raw($statement));\n return $result;\n }", "title": "" }, { "docid": "ea88edd95dd2664595a6708b45ae7d7b", "score": "0.5042885", "text": "public function printTotals()\n {\n // Create result array\n $result = array();\n $result['NoiseLevelsCounter'] = self::countReports('noiseLevels');\n $result['SoundSamplesCounter'] = self::countReports('soundSamples');\n $result['DeviceInfosCounter'] = self::countReports('deviceInfos');\n $result['UniqueUsersCounter'] = self::countReports('uniqueUsers');\n\n // Echo result array as JSON code\n echo json_encode($result);\n }", "title": "" }, { "docid": "7fadc799446ec2551ec42cc76b43ad58", "score": "0.50382364", "text": "public function getSummary()\n {\n return '';\n }", "title": "" }, { "docid": "94c6be341c357066a4c19f008e02b073", "score": "0.50341636", "text": "function getStats();", "title": "" }, { "docid": "434b636429e2abb33c4bddf22caeb1f2", "score": "0.5033602", "text": "public function asSummary(): string\n {\n if (1 === count($this->differences)) {\n $difference = reset($this->differences);\n return $this->asSummaryForSingleObject($difference);\n }\n\n // 2. Multiple changes\n $names = [];\n foreach ($this->differences as $difference) {\n $names[] = $difference->getName();\n }\n\n // 2.1. Up to 3 tools changed: 'Update versions of \"tool-name\", \"tool-name-2\", \"tool-name-3\"'\n if (3 >= count($names)) {\n return 'Update versions of \"' . implode('\", \"', $names) . '\"';\n }\n\n // 2.2. More than 3 tools changed: 'Update versions of \"tool-name\", \"tool-name-2\" and 2 more tools'\n return 'Update versions of \"' . implode('\", \"', array_slice($names, 0, 2)) . '\" and ' .\n (count($names) - 2) . ' more';\n }", "title": "" }, { "docid": "64ee7ef6905fa371bbb8eb2b4e230ca9", "score": "0.5031806", "text": "public function printStatment()\n\t{\n\t\treturn 'From ' . Root::getDeparture($this) . ', take flight ' . $this->flight . ' to ' . Root::getarrival($this) . '. Gate ' . $this->gate . ', seat ' . Root::getSeat($this) . '. ' . ($this->index ? 'Baggage drop at ticket counter ' . $this->index . '.' : 'Baggage will be automatically transferred from your last leg.');\n\t}", "title": "" }, { "docid": "831c463899e457111ee967f822cccc29", "score": "0.50215477", "text": "function translationStat($state){\n $stat = null;\n\n if ($state === '1') {\n $stat = '<option selected value=\"'.$state.'\">Habilitada</option>\n <option value=\"0\">Deshabilitada</option>';\n }else if ($state === '0') {\n $stat = '<option selected value=\"'.$state.'\">Deshabilitada</option>\n <option value=\"1\">Habilitada</option>';\n }\n\n return $stat;\n }", "title": "" }, { "docid": "8052cc23af3c8805c3ac85c5b9847ddd", "score": "0.5017864", "text": "public function load_report(){\n\t\t$query = $this->db->query('SELECT name, eng, maths, bio, phy, chem, FORMAT(((eng + maths + bio + phy + chem)/5),0) AS average FROM students_record');\n\n\t\t$data = array();\n\n\t\t// Covert results to array\n\t\tforeach ($query->result() as $row){\n\n\t\t\t$data[] = array('name' => $row->name, 'eng' => $row->eng, 'maths' => $row->maths, 'bio' => $row->bio, 'phy' => $row->phy, 'chem' => $row->chem, 'average' => $row->average);\n\t\t}\n\n\t\t/* Return empty array if no record found or add median and mode section in the get_median_mode method */\n\n\t\treturn (count($data) > 0 ) ? $this->get_median_mode($data) : $data;\n\n\t}", "title": "" }, { "docid": "7bc09a2dd4fe73a7368f243ba693e5bf", "score": "0.5009576", "text": "public function htmlStatistics($periodStat = array())\n\t{\n\t\t$periodStat = array_merge($periodStat, $this->statistics['date_on']);\n\t\t$htmlString = parent::htmlStatistics($periodStat);\n\n\t\t// Quantity\n\t\t$statistic = 'quantity';\n\n\t\tif ($this->statistics[$statistic]['sum'])\n\t\t{\n\t\t\t$htmlString .= JText::sprintf(JText::_('LIB_GBJ_STAT_MEASURE'),\n\t\t\t\tJText::_('COM_GBJFAMILY_FIELD_FUEL_QUANTITY_LABEL')\n\t\t\t);\n\t\t\t$htmlString .= JText::sprintf(JText::_('LIB_GBJ_STAT_VARIABLE'), JText::_('LIB_GBJ_STAT_SUM'),\n\t\t\t\tHelper::formatNumber($this->statistics[$statistic]['sum'], JText::_('COM_GBJFAMILY_FIELD_FUEL_QUANTITY_FORMAT'))\n\t\t\t);\n\t\t\t$htmlString .= JText::sprintf(JText::_('LIB_GBJ_STAT_VARIABLE'), JText::_('LIB_GBJ_STAT_AVG'),\n\t\t\t\tHelper::formatNumber($this->statistics[$statistic]['avg'], JText::_('COM_GBJFAMILY_FIELD_FUEL_QUANTITY_FORMAT'))\n\t\t\t);\n\t\t\t$htmlString .= JText::sprintf(JText::_('LIB_GBJ_STAT_RANGE'), JText::_('LIB_GBJ_STAT_RNG'),\n\t\t\t\tHelper::formatNumber($this->statistics[$statistic]['min'], JText::_('COM_GBJFAMILY_FIELD_FUEL_QUANTITY_FORMAT')),\n\t\t\t\tHelper::formatNumber($this->statistics[$statistic]['max'], JText::_('COM_GBJFAMILY_FIELD_FUEL_QUANTITY_FORMAT'))\n\t\t\t);\n\t\t}\n\n\t\t// Period\n\t\t$statistic = 'period';\n\n\t\tif ($this->statistics[$statistic]['sum'])\n\t\t{\n\t\t\t$htmlString .= JText::sprintf(JText::_('LIB_GBJ_STAT_MEASURE'),\n\t\t\t\tJText::_('COM_GBJFAMILY_FIELD_FUEL_PERIOD_LABEL')\n\t\t\t);\n\t\t\t$htmlString .= JText::sprintf(JText::_('LIB_GBJ_STAT_VARIABLE'), JText::_('LIB_GBJ_STAT_SUM'),\n\t\t\t\tHelper::formatNumber($this->statistics[$statistic]['sum'], JText::_('COM_GBJFAMILY_FIELD_FUEL_PERIOD_FORMAT'))\n\t\t\t);\n\t\t\t$htmlString .= JText::sprintf(JText::_('LIB_GBJ_STAT_VARIABLE'), JText::_('LIB_GBJ_STAT_AVG'),\n\t\t\t\tHelper::formatNumber($this->statistics[$statistic]['avg'], JText::_('COM_GBJFAMILY_FIELD_FUEL_PERIOD_FORMAT'))\n\t\t\t);\n\t\t\t$htmlString .= JText::sprintf(JText::_('LIB_GBJ_STAT_RANGE'), JText::_('LIB_GBJ_STAT_RNG'),\n\t\t\t\tHelper::formatNumber($this->statistics[$statistic]['min'], JText::_('COM_GBJFAMILY_FIELD_FUEL_PERIOD_FORMAT')),\n\t\t\t\tHelper::formatNumber($this->statistics[$statistic]['max'], JText::_('COM_GBJFAMILY_FIELD_FUEL_PERIOD_FORMAT'))\n\t\t\t);\n\t\t}\n\n\t\t// Distance\n\t\t$statistic = 'distance';\n\n\t\tif ($this->statistics[$statistic]['sum'])\n\t\t{\n\t\t\t$htmlString .= JText::sprintf(JText::_('LIB_GBJ_STAT_MEASURE'),\n\t\t\t\tJText::_('COM_GBJFAMILY_FIELD_FUEL_DISTANCE_LABEL')\n\t\t\t);\n\t\t\t$htmlString .= JText::sprintf(JText::_('LIB_GBJ_STAT_VARIABLE'), JText::_('LIB_GBJ_STAT_SUM'),\n\t\t\t\tHelper::formatNumber($this->statistics[$statistic]['sum'], JText::_('COM_GBJFAMILY_FIELD_FUEL_DISTANCE_FORMAT'))\n\t\t\t);\n\t\t\t$htmlString .= JText::sprintf(JText::_('LIB_GBJ_STAT_VARIABLE'), JText::_('LIB_GBJ_STAT_AVG'),\n\t\t\t\tHelper::formatNumber($this->statistics[$statistic]['avg'], JText::_('COM_GBJFAMILY_FIELD_FUEL_DISTANCE_FORMAT'))\n\t\t\t);\n\t\t\t$htmlString .= JText::sprintf(JText::_('LIB_GBJ_STAT_RANGE'), JText::_('LIB_GBJ_STAT_RNG'),\n\t\t\t\tHelper::formatNumber($this->statistics[$statistic]['min'], JText::_('COM_GBJFAMILY_FIELD_FUEL_DISTANCE_FORMAT')),\n\t\t\t\tHelper::formatNumber($this->statistics[$statistic]['max'], JText::_('COM_GBJFAMILY_FIELD_FUEL_DISTANCE_FORMAT'))\n\t\t\t);\n\t\t}\n\n\t\t// Consumption\n\t\t$statistic = 'consumption';\n\n\t\tif ($this->statistics[$statistic]['sum'])\n\t\t{\n\t\t\t$htmlString .= JText::sprintf(JText::_('LIB_GBJ_STAT_MEASURE'),\n\t\t\t\tJText::_('COM_GBJFAMILY_FIELD_FUEL_CONSUMPTION_LABEL')\n\t\t\t);\n\t\t\t$htmlString .= JText::sprintf(JText::_('LIB_GBJ_STAT_VARIABLE'), JText::_('LIB_GBJ_STAT_AVG'),\n\t\t\t\tHelper::formatNumber($this->statistics[$statistic]['avg'], JText::_('COM_GBJFAMILY_FIELD_FUEL_CONSUMPTION_FORMAT'))\n\t\t\t);\n\t\t\t$htmlString .= JText::sprintf(JText::_('LIB_GBJ_STAT_RANGE'), JText::_('LIB_GBJ_STAT_RNG'),\n\t\t\t\tHelper::formatNumber($this->statistics[$statistic]['min'], JText::_('COM_GBJFAMILY_FIELD_FUEL_CONSUMPTION_FORMAT')),\n\t\t\t\tHelper::formatNumber($this->statistics[$statistic]['max'], JText::_('COM_GBJFAMILY_FIELD_FUEL_CONSUMPTION_FORMAT'))\n\t\t\t);\n\t\t}\n\n\t\treturn $htmlString;\n\t}", "title": "" }, { "docid": "772faf355dd447772f36e6acea7e3cdf", "score": "0.49919152", "text": "public function getUserChartSummaryLog() {\n //$sql_chart=\"SELECT USER_NAME, USER_LOGIN_STATUS, COUNT(*) FROM USER_LOG GROUP BY USER_NAME, USER_LOGIN_STATUS\";\n $sql_chart=\"SELECT USER_LOGIN_STATUS, COUNT(*) FROM USER_LOG GROUP BY USER_LOGIN_STATUS\";\n $c=new ConnectionDB();\n $c->openConnection();\n $query_chart=mysql_query($sql_chart) or die (mysql_error());\n return $query_chart;\n }", "title": "" }, { "docid": "a8a2ea2bd982426289ee45ad5f319b8a", "score": "0.49907744", "text": "public function getSQL() {\n\t\t$sql = '';\n\t\t$sql .= $this->getSelect();\n\t\t$sql .= $this->getSource();\n\t\t$sql .= $this->getWhere();\n\t\t$sql .= $this->getGroup();\n\t\t$sql .= $this->getOrder();\n\t\t$sql .= $this->getLimits();\n\n\t\t$this->init();\n\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "00b6bf806a14eca4f637a85e499e409b", "score": "0.49896744", "text": "abstract public function getSummaryForDisplay();", "title": "" }, { "docid": "6df0ba9c91dd63a550078a6a1ff32156", "score": "0.49871242", "text": "public function __toString()\n {\n return 'View Count=' . $this->_viewCount .\n ' VideoWatchCount=' . $this->_videoWatchCount .\n ' SubscriberCount=' . $this->_subscriberCount .\n ' LastWebAccess=' . $this->_lastWebAccess .\n ' FavoriteCount=' . $this->_favoriteCount;\n }", "title": "" }, { "docid": "ddd709a5a977af4ac735914f1029a66f", "score": "0.49870625", "text": "private function get_reporting_data_as_html()\n {\n $score = 0;\n $count_score = 0;\n $count_feedback = 0;\n $count_submissions = 0;\n \n foreach ($this->submissions->as_array() as $submission)\n {\n $score_tracker = $this->get_score_tracker_for_submission($submission->get_id());\n \n if ($score_tracker)\n {\n $score += $score_tracker->get_score();\n $count_score ++;\n }\n \n $feedback_tracker = $this->get_feedback_tracker_for_submission($submission->get_id());\n \n if ($feedback_tracker)\n {\n $count_feedback ++;\n }\n \n $count_submissions ++;\n }\n \n $html = array();\n $html[] = $count_score . '/' . $count_submissions . '<br />';\n $html[] = $count_feedback . '/' . $count_submissions . '<br/>';\n \n if ($count_score == 0)\n {\n $html[] = '-';\n }\n else\n {\n $html[] = round($score / $count_score, 2) . '%<br />';\n }\n \n return implode(PHP_EOL, $html);\n }", "title": "" }, { "docid": "1c7001232fd9ac63f2dcc44fc16a2d46", "score": "0.49865964", "text": "function GetDetailedStats($data, $event=BANNER_EVENT_VIEW){\n $SQL = sprintf(\"SELECT count(*) as counter, banner_id\n FROM %s \n WHERE DATE_FORMAT(event_time, '%s')='%s'\n AND event_type = %d \n %s\n %s\n %s\n GROUP BY banner_id ORDER BY banner_id\",\n $this->defaultTableName,\n \"%Y-%m-%d\", $data[\"date\"],\n $event,\n ($data[\"banner_id\"] ? sprintf(\"AND banner_id=%d\", $data[\"banner_id\"]) : \"\"),\n ($data[\"page_id\"] ? sprintf(\"AND page_id=%d\", $data[\"page_id\"]) : \"\"),\n ($data[\"place_id\"] ? sprintf(\"AND place_id=%d\", $data[\"place_id\"]) : \"\")\n );\n return $this->Connection->ExecuteReader($SQL); \n }", "title": "" }, { "docid": "21996acba72b2df3aa4f30f427762896", "score": "0.49812335", "text": "public function adminSummary() {\n\n if ($this->isAGroup()) {\n return $this->t('grouped');\n }\n if (!empty($this->options['exposed'])) {\n return $this->t('exposed') . ', ' . $this->t('default state') . ': ' . $this->value['state'];\n } else {\n return $this->t('state') . ': ' . $this->value['state'];\n }\n }", "title": "" }, { "docid": "20fc357946af34fc0912dbdf18e8416c", "score": "0.49797016", "text": "public function action_getMetricsKeyValueStatistics(){\n $eventName = Request::get('eventName','',AnalyticsModule::PARAMS_LOCATION);\n $columnName = Request::get('columnName','',AnalyticsModule::PARAMS_LOCATION);\n $groupBy = Request::get('groupBy','',AnalyticsModule::PARAMS_LOCATION);\n $selectionEvent = false;\n $selectionBool = false;\n if($groupBy == \"game\" ){\n $selectionBool = true;\n }\n if($groupBy == \"event\" ){\n $selectionEvent = true;\n }\n if($columnName == '' || $eventName == '' ){\n return array('Action'=>'Failed');\n }\n $metrics = AnalyticsAggregator::getMetricsForValue($eventName,$selectionBool,$columnName,$selectionEvent );\n return array(\"Metrics\"=>DataObject::objectListToArrayList($metrics));\n }", "title": "" }, { "docid": "cd19fc5d1d07fc06b4531a57e4b9d070", "score": "0.49644282", "text": "public function sql_select()\n {\n \n $select = \"SELECT {$this->top} \";\n \n if(isset($this->filter['based_on']) && $this->filter['based_on'] == 'Org. Full name'){\n $select .= \"OR1_FullName, OR1_InternalOrExternal, SUM(J_FeeDue) As TotalIncome, COUNT(J_FeeDue) As NoJobs \";\n }else{\n $select .= \"OR1_name_ind, OR1_InternalOrExternal, SUM(J_FeeDue) As TotalIncome, COUNT(J_FeeDue) As NoJobs \";\n }\n \n return $select;\n }", "title": "" }, { "docid": "26a8411fd8716a4e01e8ef385140464a", "score": "0.4963137", "text": "public function getResult()\n {\n // first build summary table\n $this->_sTableContent .= \"<tr><td><b>&nbsp;</b></td><td>&nbsp;</td></tr>\".PHP_EOL;\n $this->_sTableContent .= \"<tr><td colspan=\\\"2\\\"><h2>Summary</h2></td></tr>\".PHP_EOL;\n $this->_sTableContent .= \"<tr><td><b>OK</b></td><td>\".$this->_aResultCount['OK'].\"</td></tr>\".PHP_EOL;\n $this->_sTableContent .= \"<tr><td><b>Modified</b></td><td>\".$this->_aResultCount['MODIFIED'].\"</td></tr>\".PHP_EOL;\n $this->_sTableContent .= \"<tr><td><b>Version mismatch</b></td><td>\".$this->_aResultCount['VERSIONMISMATCH'].\"</td></tr>\".PHP_EOL;\n $this->_sTableContent .= \"<tr><td><b>Unknown</b></td><td>\".$this->_aResultCount['UNKNOWN'].\"</td></tr>\".PHP_EOL;\n $this->_sTableContent .= \"<tr><td><b>Number of investigated files in total:</b> </td><td>\".count($this->_aFiles).\"</td></tr>\".PHP_EOL;\n\n $this->_sTableContent .= \"<tr><td><b>&nbsp;</b></td><td>&nbsp;</td></tr>\".PHP_EOL;\n if ($this->_blShopIsOK) {\n $this->_sTableContent .= \"<tr><td colspan=2><b><font color=\\\"green\\\">This OXID eShop was not modified and is fully original.</font></b></td></tr>\".PHP_EOL;\n } else {\n $this->_sTableContent .= \"<tr><td colspan=2><b><font color=\\\"red\\\">This OXID eShop does not fit 100% \".$this->_sVersionTag.\".</font></b></td></tr>\".PHP_EOL;\n }\n\n $sHints = \"\";\n if ($this->_aResultCount['MODIFIED'] > 0) {\n $sHints .= \"<tr><td colspan=\\\"2\\\">* \".oeLanguage::getLanguageValueByKey('oxShopCheck_ModifiedHints1').\"</td></tr>\".PHP_EOL;\n $sHints .= \"<tr><td colspan=\\\"2\\\">* \".oeLanguage::getLanguageValueByKey('oxShopCheck_ModifiedHints2').\"</td></tr>\".PHP_EOL;\n }\n\n if ($this->_aResultCount['VERSIONMISMATCH'] > 0) {\n $sHints .= \"<tr><td colspan=\\\"2\\\">* \".oeLanguage::getLanguageValueByKey('oxShopCheck_VersionMismatchHints').\"</td></tr>\".PHP_EOL;\n }\n\n if ($sHints) {\n $this->_sTableContent .= \"<tr><td colspan=\\\"2\\\"><b>&nbsp;</b></td></tr>\".PHP_EOL;\n $this->_sTableContent .= \"<tr><td colspan=\\\"2\\\"><h2>Hints</h2> </td></tr>\".PHP_EOL;\n $this->_sTableContent .= $sHints;\n }\n\n\n // then print result output\n if ($this->sResultOutput) {\n $this->_sTableContent .= \"<tr><td><b>&nbsp;</b></td><td>&nbsp;</td></tr>\".PHP_EOL;\n $this->_sTableContent .= $this->sResultOutput;\n }\n\n $this->_sTableContent = \"<table>\".PHP_EOL.$this->_sTableContent.PHP_EOL.\"</table>\";\n\n return str_replace ('%HTMLCONTENT%', $this->_sTableContent, oeLanguage::getLanguageValueByKey('HTMLTemplate'));\n }", "title": "" }, { "docid": "2005be6b19ae081022b3cd7d6ed05902", "score": "0.4961448", "text": "protected function getSummary()\n \t{\n\n \t\t$QuesStatsDiffEasy = QuestionMaster::whereIn('for_selectionTest', [1])->where('category_id', 1)->where('difficulty_level',0)->where('active', '=', 1)->count();//apti, tag easy\n\t\t$QuesStatsDiffMed = QuestionMaster::whereIn('for_selectionTest', [1])->where('category_id', 1)->where('difficulty_level',1)->where('active', '=', 1)->count();//apti, tag medium\n\t\t$QuesStatsDiffHard = QuestionMaster::whereIn('for_selectionTest', [1])->where('category_id', 1)->where('difficulty_level',2)->where('active', '=', 1)->count(); //apti, tag hard\n\t\t///////////\n\t\t/////////////\n\t\t$apti = [];\n\t\t$payload = array(\n\t\t\t'difficulty_level'=>'easy',\n\t\t\t'tag'=> $QuesStatsDiffEasy\n\n\t\t);\n\t\tarray_push($apti, $payload);\n\t\t$payload = array(\n\t\t\t'difficulty_level'=>'medium',\n\t\t\t'tag'=> $QuesStatsDiffMed\n\n\t\t);\n\t\tarray_push($apti, $payload);\n\t\t$payload = array(\n\t\t\t'difficulty_level'=>'hard',\n\t\t\t'tag'=> $QuesStatsDiffHard\n\n\t\t);\n\t\tarray_push($apti, $payload);\n\t\t///////////////////////////////////////////////////////////\n\t\t$QuesStatsDiffEasy = QuestionMaster::whereIn('for_selectionTest', [1])->where('category_id', 2)->where('difficulty_level',0)->where('active', '=', 1)->count();//elec, tag easy\n\t\t$QuesStatsDiffMed = QuestionMaster::whereIn('for_selectionTest', [1])->where('category_id', 2)->where('difficulty_level',1)->where('active', '=', 1)->count();//elec, tag medium\n\t\t$QuesStatsDiffHard = QuestionMaster::whereIn('for_selectionTest', [1])->where('category_id', 2)->where('difficulty_level',2)->where('active', '=', 1)->count(); //elec, tag hard\n\t\t/////////////\n\t\t$elec = [];\n\t\t$payload = array(\n\t\t\t'difficulty_level'=>'easy',\n\t\t\t'tag'=> $QuesStatsDiffEasy\n\n\t\t);\n\t\tarray_push($elec, $payload);\n\t\t$payload = array(\n\t\t\t'difficulty_level'=>'medium',\n\t\t\t'tag'=> $QuesStatsDiffMed\n\n\t\t);\n\t\tarray_push($elec, $payload);\n\t\t$payload = array(\n\t\t\t'difficulty_level'=>'hard',\n\t\t\t'tag'=> $QuesStatsDiffHard\n\n\t\t);\n\t\tarray_push($elec, $payload);\n\t\t///////////////////////////////////////////////////////////\n\t\t$QuesStatsDiffEasy = QuestionMaster::whereIn('for_selectionTest', [1])->where('category_id', 3)->where('difficulty_level',0)->where('active', '=', 1)->count();//programming, tag easy\n\t\t$QuesStatsDiffMed = QuestionMaster::whereIn('for_selectionTest', [1])->where('category_id', 3)->where('difficulty_level',1)->where('active', '=', 1)->count();//programming, tag medium\n\t\t$QuesStatsDiffHard = QuestionMaster::whereIn('for_selectionTest', [1])->where('category_id', 3)->where('difficulty_level',2)->where('active', '=', 1)->count(); //programming, tag hard\n\n\t\t/////////////\n\t\t$prog = [];\n\t\t$payload = array(\n\t\t\t'difficulty_level'=>'easy',\n\t\t\t'tag'=> $QuesStatsDiffEasy\n\n\t\t);\n\t\tarray_push($prog, $payload);\n\t\t$payload = array(\n\t\t\t'difficulty_level'=>'medium',\n\t\t\t'tag'=> $QuesStatsDiffMed\n\n\t\t);\n\t\tarray_push($prog, $payload);\n\t\t$payload = array(\n\t\t\t'difficulty_level'=>'hard',\n\t\t\t'tag'=> $QuesStatsDiffHard\n\n\t\t);\n\t\tarray_push($prog, $payload);\n\t\t// $prog = json_encode($prog);\n\n\t\treturn array($apti, $elec, $prog);\n \t}", "title": "" }, { "docid": "dd9e43f942d10b6768d708a52df8cd1c", "score": "0.49605814", "text": "public function getGridStatistic() {\n static $statistics;\n if (!$statistics) {\n $count = LanguageSource::find()->count();\n if ($count == 0) {\n return 0;\n }\n\n $languageTranslates = LanguageTranslate::find()\n ->select(['language', 'COUNT(*) AS cnt'])\n ->andWhere('translation IS NOT NULL')\n ->groupBy(['language'])\n ->all();\n\n foreach ($languageTranslates as $languageTranslate) {\n $statistics[$languageTranslate->language] = floor(($languageTranslate->cnt / $count) * 100);\n }\n }\n\n return isset($statistics[$this->language_id]) ? $statistics[$this->language_id] : 0;\n }", "title": "" }, { "docid": "b0438185229506e59e5deb163f3f3925", "score": "0.4958002", "text": "public function select(){\n $res = Outputs\n ::select(\n DB::raw('COUNT(od.id) AS total_details'),\n 'o.*',\n 'l.name AS locations_name',\n 'l_d.name AS target_locations_name',\n 'u.name AS user_name'\n )\n ->from('outputs AS o')\n ->leftJoin('locations AS l', 'l.id', 'o.locations_id') // almacen\n ->leftJoin('locations AS l_d', 'l_d.id', 'o.target_locations_id') // destino\n ->leftJoin('output_details AS od', 'o.id', 'od.outputs_id')\n ->leftJoin('users AS u', 'u.id', 'o.user_id');\n // dd($res->toSql());\n return $res;\n }", "title": "" }, { "docid": "27ecc5514aff2b2ae399caa9432da09a", "score": "0.4954443", "text": "public function format_select() {\r\n\t\treturn $this->get_field_name() . '+0';\r\n\t}", "title": "" }, { "docid": "2d813f55570fd4a7c1c4e95439f40625", "score": "0.49474046", "text": "static function profilerDbSumInfo2Html($aNameAdapterDB) {\n\n $strEcho = '';\n //-----------------------------\n $db = Zend_Registry::get($aNameAdapterDB);\n $profiler = $db->getProfiler();\n\n if ($profiler->getEnabled() == false) {\n return $strEcho;\n }\n\n //Суммарная информация\n $totalTime = $profiler->getTotalElapsedSecs();\n// $totalTime = number_format($totalTime, 5, '.', '');\n $queryCount = $profiler->getTotalNumQueries();\n $longesTime = 0;\n $longesQuery = null;\n\n foreach ($profiler->getQueryProfiles() as $query) {\n if ($query->getElapsedSecs() > $longesTime) {\n $longesTime = $query->getElapsedSecs();\n $longesQuery = $query->getQuery();\n }\n }\n\n $longesTime = number_format($longesTime, 5, '.', ' ');\n\n $strEcho .= \"<b>--- \" . self::Translate(\"Суммарная информация о времени выполнения запросов к базе данных\") . \" ---</b><br /><br />\";\n $strEcho .= self::Translate(\"Выполнено запросов %s за %s sec.\", $queryCount, number_format($totalTime, 5, '.', '')) . \"<br /><br />\";\n if ($queryCount) {\n $strEcho .= self::Translate('Средняя длительность запроса') . ': ' . number_format($totalTime / $queryCount, 5, '.', '') . ' sec.' . \"<br /><br />\";\n }\n if ($totalTime) {\n $strEcho .= self::Translate('Может быть выполнено запросов за sec.') . ': ' . number_format($queryCount / $totalTime, 0, '.', ' ') . \"<br /><br />\";\n }\n\n $strEcho .= self::Translate('Максимальное время выполнения запроса') . ': ' . $longesTime . ' sec.' . \"<br /><br />\";\n $strEcho .= self::Translate(\"Запрос с самым большим временем исполнения\") . \": <br>\" . $longesQuery . \"<br /><br />\";\n\n return $strEcho;\n }", "title": "" }, { "docid": "ce8859c7b2e36ebb2bb7300b81e92761", "score": "0.4942027", "text": "public function SQO_Stats($sGroup,$sqlFilt=NULL) {\n\t$qoStock = vcqtStockLinesInfo::SQO_forItemStatus();\n\t//$sroItem = new fcSQL_TableSource($this->Name(),'i');\n\t$sroItem = $this->SQO_Source('i');\n\n\t$qeItem = new fcSQL_JoinElement($sroItem);\n\t$qeSub = new fcSQL_JoinElement(new fcSQL_SubQuerySource($qoStock,'s'),'s.ID_Item=i.ID');\n\t/*\n\tif ($doInactive) {\n\t $qeSub->Verb('LEFT JOIN');\n\t}//*/\n\t\n\t$joStats = new fcSQL_JoinSource(array($qeItem,$qeSub));\n\t$sel = new fcSQL_Select($joStats);\n\t$sel->Fields()->Values(array(\n\t $sGroup,\n\t 'MIN(PriceBuy)' => 'PriceBuy_min',\n\t 'MAX(PriceBuy)' => 'PriceBuy_max',\n\t 'SUM(QtyForSale)' => 'QtyForSale',\n\t 'COUNT(isAvail)' => 'QtyAvail',\n\t \"GROUP_CONCAT(DISTINCT CatSfx SEPARATOR ', ')\" => 'SfxList'\n\t )\n\t );\n\t$arTerms = array(\n\t //new fcSQLt_Group(array($sGroup.' WITH ROLLUP'))\n\t new fcSQLt_Group(array($sGroup))\t// WITH ROLLUP seems to be just confusing things\n\t );\n\tif (!is_null($sqlFilt)) {\n\t $arTerms[] = new fcSQLt_Filt(NULL,array($sqlFilt));\n\t}\n\t$qry = new fcSQL_Query($sel,new fcSQL_Terms($arTerms));\n\t\n\treturn $qry;\n }", "title": "" }, { "docid": "84b335c9156e895d0cd22b5b2dfcfd7a", "score": "0.49403077", "text": "function getSecondaryStdFilterHTML($module, $selected = '') {\n\tglobal $ogReport, $current_language;\n\t$ogReport->oCustomView=new CustomView();\n\t$shtml = '';\n\tif ($module != '') {\n\t\t$secmodule = explode(':', $module);\n\t\tfor ($i=0; $i < count($secmodule); $i++) {\n\t\t\t$result = $ogReport->oCustomView->getStdCriteriaByModule($secmodule[$i]);\n\t\t\t$mod_strings = return_module_language($current_language, $secmodule[$i]);\n\t\t\tif (isset($result)) {\n\t\t\t\tforeach ($result as $key => $value) {\n\t\t\t\t\tif (isset($mod_strings[$value])) {\n\t\t\t\t\t\tif ($key == $selected) {\n\t\t\t\t\t\t\t$shtml .= '<option selected value=\"'.$key.'\">'.getTranslatedString($secmodule[$i], $secmodule[$i]).' - '.$mod_strings[$value].'</option>';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$shtml .= '<option value=\"'.$key.'\">'.getTranslatedString($secmodule[$i], $secmodule[$i]).' - '.$mod_strings[$value].'</option>';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($key == $selected) {\n\t\t\t\t\t\t\t$shtml .= '<option selected value=\"'.$key.'\">'.getTranslatedString($secmodule[$i], $secmodule[$i]).' - '.$value.'</option>';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$shtml .= '<option value=\"'.$key.'\">'.getTranslatedString($secmodule[$i], $secmodule[$i]).' - '.$value.'</option>';\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 $shtml;\n}", "title": "" }, { "docid": "eec286e606704a6d62f7aa638bc5011e", "score": "0.49340856", "text": "public function get_stats()\r\n\t\t{\r\n\t\t\t$retArr = null;\r\n\r\n\t\t\t// Scaffolding Code For Array:\r\n\t\t\t$objs = $this->obj->find_all();\r\n\t\t\tforeach($objs as $obj)\r\n\t\t\t{\r\n\t\t\t\t$retArr[] = $obj->getBasics();\r\n\t\t\t}\r\n\r\n\t\t\treturn $retArr;\r\n\t\t}", "title": "" }, { "docid": "f58e9b0463f9d83885aea2439cef2aac", "score": "0.4933828", "text": "public function getSummary() {\r\n\t\treturn \"\";\r\n\t}", "title": "" }, { "docid": "365dafabad168c540186fc9476e6c7c5", "score": "0.49238053", "text": "private function getSql()\n {\n $concat = $this->getConcat('`currency_from`', \"'/'\", '`currency_to`');\n\n return \"SELECT\n (\n SELECT COUNT(*) FROM `messages` AS a\n WHERE `a`.`originating_country`=`b`.`originating_country`\n GROUP BY `originating_country`\n ) AS `message_count`,\n `originating_country` AS `country_code`,\n AVG(`rate`) AS `top_pair_avg_rate`,\n $concat AS `top_currency_pair`,\n COUNT(*) AS `top_pair_msg_cnt`\n FROM `messages` AS b\n GROUP BY $concat, `originating_country`\n HAVING `top_pair_msg_cnt` = (\n SELECT COUNT(*) AS `cnt`\n FROM `messages` AS c\n WHERE `c`.`originating_country`=`b`.`originating_country`\n GROUP BY $concat\n ORDER BY `cnt` DESC\n LIMIT 1\n )\";\n }", "title": "" }, { "docid": "01837ea75e7fd0fc9d7cbbd43ecfbdac", "score": "0.49204293", "text": "function OutputPerformanceSelect($label = '')\n\t\t{\n\t\t\t$myDBaseObj = $this->myDBaseObj;\n\n\t\t\techo $label;\n\t\t\t\n\t\t\t// Get performances list for this show\n\t\t\t$perfsList = $myDBaseObj->GetPerformancesDetailsByShowID($this->showID);\n\t\t\t\n\t\t\techo '<select name=\"perfID\">'.\"\\n\";\n\t\t\tforeach ($perfsList as $perfRecord)\n\t\t\t{\n\t\t\t\t$perfDateTime = StageShowWPOrgDBaseClass::FormatDateForAdminDisplay($perfRecord->perfDateTime).'&nbsp;&nbsp;';\n\t\t\t\t$perfID = $perfRecord->perfID;\n\t\t\t\techo \"<option value=\\\"$perfID\\\">$perfDateTime</option>\\n\";\n\t\t\t}\n\t\t\techo '</select>'.\"\\n\";\n\t\t}", "title": "" }, { "docid": "076a165387f1f88316c5f79cb6d2afc0", "score": "0.49151614", "text": "function fetch_stats($mode = '')\n {\n global $ilance;\n \n if ($mode == 'countcats')\n {\n $pcats = $ilance->db->query(\"SELECT category_id FROM \" . DB_PREFIX . \"attachment WHERE attachtype = 'portfolio' AND visible='1' GROUP BY category_id\");\n $rcats = $ilance->db->num_rows($pcats);\n return number_format($rcats);\n }\n else if ($mode == 'countitems')\n {\n $pitems = $ilance->db->query(\"SELECT COUNT(*) AS count FROM \" . DB_PREFIX . \"attachment WHERE attachtype = 'portfolio' AND visible='1'\");\n $ritems = $ilance->db->fetch_array($pitems, DB_ASSOC);\n return number_format($ritems['count']);\n }\n else if ($mode == 'countviews')\n {\n $pviews = $ilance->db->query(\"SELECT SUM(counter) AS count FROM \" . DB_PREFIX . \"attachment WHERE attachtype = 'portfolio' AND visible='1'\");\n $rviews = $ilance->db->fetch_array($pviews, DB_ASSOC);\n return number_format($rviews['count']);\n }\n else if ($mode == 'diskspace')\n {\n $pspace = $ilance->db->query(\"SELECT SUM(filesize) AS count FROM \" . DB_PREFIX . \"attachment WHERE attachtype = 'portfolio' AND visible='1'\");\n $rspace = $ilance->db->fetch_array($pspace, DB_ASSOC);\n return print_filesize($rspace['count']);\n }\n }", "title": "" }, { "docid": "891985ccc44d085290b847332e25068a", "score": "0.490944", "text": "public function __toString() : string\n {\n $this->addColNames();\n return $this->select->__toString();\n }", "title": "" }, { "docid": "ed0543a268d238e719e16cdba7ab2802", "score": "0.4906673", "text": "public function getStatusText() {\n return $this->statsText;\n }", "title": "" }, { "docid": "2cae4128f47957b857fc954ad2430ac7", "score": "0.49058366", "text": "public function getStatistics()\n {\n if ($this->cmdexists) {\n //Command invokes intel_gpu_top in JSON output mode with an update rate of 5 seconds\n $command = self::STATISTICS_WRAPPER . ES . self::CMD_UTILITY;\n $this->runCommand($command, self::STATISTICS_PARAM, false);\n if (!empty($this->stdout) && strlen($this->stdout) > 0) {\n $this->parseStatistics();\n } else {\n $this->pageData['error'][] = Error::get(Error::VENDOR_DATA_NOT_RETURNED);\n }\n }\n }", "title": "" }, { "docid": "c9c1ca5952ba583124e6e7bf568c0a81", "score": "0.49007106", "text": "function PrintClassBuildStatNormalizedVPS()\n{\n\tglobal $UniqueStatCombos,$StatComboNormalizedVPS,$UniqueBuildNames,$StatComboVPSBasedAvg,$StatComboVPSBasedMax,$StatComboVPSBasedMin;\n\techo \"<table border=1>\";\n\techo \"<tr>\";\n\techo \"<td>StatCombo</td>\";\n\tforeach($UniqueBuildNames as $BuildName => $val2)\n\t\techo \"<td>$BuildName</td>\";\n\techo \"</tr>\";\t\t\n\tforeach($UniqueStatCombos as $StatCombo => $val)\n\t{\t\n\t\techo \"<tr>\";\n\t\techo \"<td>$StatCombo</td>\";\n\t\tforeach($UniqueBuildNames as $BuildName => $val2 )\n\t\t{\n\t\t\tif(!isset($StatComboNormalizedVPS[$BuildName]) || !isset($StatComboNormalizedVPS[$BuildName][$StatCombo]))\n\t\t\t\techo \"<td></td>\";\n\t\t\telse\n\t\t\t\techo \"<td>\".$StatComboNormalizedVPS[$BuildName][$StatCombo].\"</td>\";\n\t\t}\t\n\t\techo \"</tr>\\n\";\n\t}\n\techo \"</table>\";\n}", "title": "" }, { "docid": "0be276b9d8ca09dcbd89f72e8cbcaead", "score": "0.4897773", "text": "public function getBoxOrderStatistics(){\n $sql_select = \" SELECT count(o.id) as count, o.order_status_id, os.name\n from orders as o\n left join order_status as os on o.order_status_id = os.id\n group by o.order_status_id\"; \n \n $select_query = $this->db->query($sql_select);\n $statistics = $select_query->result_array();\n \n foreach ($statistics as $statistic) {\n $countNames[$statistic['name']] = $statistic;\n }\n\n $sql_selectName = \"SELECT name FROM order_status\"; \n\n $query = $this->db->query($sql_selectName);\n $statNames = $query->result_array();\n \n $i = 0;\n foreach ($statNames as $status) {\n if ($countNames[$status['name']]) {\n $return[$i]['count'] = (int)$countNames[$status['name']]['count'];\n $return[$i]['name'] = $status['name']; \n } else {\n $return[$i]['count'] = (int)\"0\";\n $return[$i]['name'] = $status['name']; \n }\n $i++;\n }\n return $return;\n }", "title": "" }, { "docid": "2c430918ce12993c996fb43eeba43fbf", "score": "0.48941317", "text": "public function reportStatsAction()\n {\n return $this->render(\n '@Gui/gui/reports.html.twig',\n ['reports' => $this->get('gui.statistics')->getReports()]\n );\n }", "title": "" }, { "docid": "f8d144be2c0657543c8071508e3331de", "score": "0.48934948", "text": "function coverage_summary() {\n global $dir,$set,$id,$corpus;\n\n if (array_key_exists(\"by\",$_GET)) { $by = $_GET['by']; }\n else { $by = 'token'; }\n\n $total = array(); $count = array();\n foreach (array(\"ttable\",\"corpus\") as $corpus) {\n foreach (array(\"token\",\"type\") as $b) {\n foreach (array(\"6+\",\"2-5\",\"1\",\"0\") as $c) {\n $count[$corpus][$b][$c] = 0;\n }\n $total[$corpus][$b] = 0;\n }\n $coverage_id = get_coverage_analysis_version($dir,$set,$id);\n $data = file(\"$dir/evaluation/$set.analysis.$coverage_id/$corpus-coverage-summary\");\n for($i=0;$i<count($data);$i++) {\n $item = split(\"\\t\",$data[$i]);\n if ($item[0] == 1) {\n if ($item[1]>5) {\n $count[$corpus][\"type\"][\"6+\"] += $item[2];\n\t $count[$corpus][\"token\"][\"6+\"] += $item[3];\n }\n else if ($item[1]>1) {\n $count[$corpus][\"type\"][\"2-5\"] += $item[2];\n \t $count[$corpus][\"token\"][\"2-5\"] += $item[3];\n }\n else if ($item[1]==1) {\n $count[$corpus][\"type\"][\"1\"] += $item[2];\n\t $count[$corpus][\"token\"][\"1\"] += $item[3];\n }\n else {\n $count[$corpus][\"type\"][\"0\"] += $item[2];\n\t $count[$corpus][\"token\"][\"0\"] += $item[3];\n }\n $total[$corpus][\"type\"] += $item[2];\n $total[$corpus][\"token\"] += $item[3];\n }\n }\n }\n\n print \"<b>Coverage</b>\\n\";\n print \"<table><tr><td></td><td>model</td><td>corpus</td></tr>\\n\";\n foreach (array(\"0\",\"1\",\"2-5\",\"6+\") as $range) {\n print \"<tr><td>$range</td>\";\n foreach (array(\"ttable\",\"corpus\") as $corpus) {\n printf(\"<td align=right nowrap>%d (%.1f%s)</td>\",$count[$corpus][$by][$range],100*$count[$corpus][$by][$range]/($total[$corpus][$by]+0.0001),\"%\");\n }\n print \"</tr>\\n\";\n }\n print \"</table>\\n\";\n if ($by == 'token') { print \"by token\"; } else {\n print \"<A HREF=\\\"javascript:generic_show('CoverageSummary','by=token')\\\">by token</A> \";\n }\n print \" / \";\n if ($by == 'type') { print \"by type\"; } else {\n print \"<A HREF=\\\"javascript:generic_show('CoverageSummary','by=type')\\\">by type</A> \";\n }\n print \" / \";\n print \"<div id=\\\"CoverageDetailsLink\\\"><A HREF=\\\"javascript:generic_show('CoverageDetails','')\\\">details</A></div> \";\n}", "title": "" }, { "docid": "8d4cf5babec7e52dd5c3e0022a9df261", "score": "0.48890072", "text": "public function getPerformanceReviewSummary()\n {\n return $this->createQueryBuilder('pr') //alias of the table\n ->leftJoin('pr.counselor', 'counselor') //left join of performance review table and counselor table\n ->addSelect('pr.performanceReviewId', 'pr.date', 'pr.clientEmail', 'pr.clientFirstName', 'pr.clientLastName',\n 'pr.satisfactionLevel', 'pr.comment', 'pr.usefulnessOfService', 'pr.city', 'pr.phone','counselor.firstName',\n 'counselor.initial', 'counselor.lastName') //Select clause of the query\n ->addOrderBy('pr.date') //Order By\n ->getQuery() //finishing the query\n ->execute();\n }", "title": "" }, { "docid": "17bf2baf07ca564e4cf0e72ed9659aac", "score": "0.48858577", "text": "public function getStatistics(){\n\t\treturn $ses->getSendStatistics();\n\t}", "title": "" }, { "docid": "5adb591884be6b8a402f67ffe86e0cc6", "score": "0.48801306", "text": "public function getStatistics()\n {\n return $this->_statistics;\n }", "title": "" }, { "docid": "ed48752d8180f6343fffd5b7213fc88a", "score": "0.48795077", "text": "public function fetchstatment()\n {\n $sql = \" SELECT \";\n \n if($this->select)\n {\n $sql .= \\implode(\" , \" , $this->select);\n }\n else\n {\n $sql .= \" * \";\n }\n $sql .= \" FROM \".$this->tablename;\n\n // [left join 'users on userid.id = contat.id refernce ...']\n if($this->join)\n {\n $sql .= \\implode(\" \" , $this->join);\n }\n\n if($this->groupby)\n {\n $sql.= \" GROUP BY \".$this->groupby;\n }\n\n if($this->having)\n {\n $sql.= \" HAVING \".implode(\" , \",$this->having);\n }\n\n if($this->orderby)\n {\n $sql .= \" ORDER BY \" .\\implode(\" \" , $this->orderby);\n }\n\n if($this->limit)\n {\n $sql .= \" LIMIT \". $this->limit;\n }\n if($this->offset)\n {\n $sql .= \" OFFSET \". $this->offset;\n }\n if($this->wheres)\n {\n $sql .= ' WHERE '. \\implode(\" \" , $this->wheres);\n }\n\n\n\n return $sql;\n \n }", "title": "" }, { "docid": "a4049aaf32c48c084925853ba5d03ce6", "score": "0.4878263", "text": "public function getInfo(){\n $str = \"{$this->judul} | {$this->getLabel()} (Rp. {$this->harga})\";\n \n return $str;\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "2a46fdbfc8cb01983bb03691388f0169", "score": "0.0", "text": "public function create()\n {\n //\n }", "title": "" } ]
[ { "docid": "a5a742c5eb76d32c32823659c256e71f", "score": "0.783437", "text": "public function actionCreate() {\n $this->render('resource_create');\n }", "title": "" }, { "docid": "246a2b1ff9c2e296275420128d62692d", "score": "0.7765723", "text": "public function create()\n {\n return view(\"aasource.addform\");\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": "012fdc290aa72d4266b090e3a18611f3", "score": "0.7522791", "text": "public function create()\n\t{\n return View::make('resources.create');\n\t}", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "5d140c321df7acb8c739eadcc5bc3d54", "score": "0.746548", "text": "public function create()\n {\n return view('laramanager::resources.create');\n }", "title": "" }, { "docid": "4408460962e2d641154ff1e778cccd2d", "score": "0.7411503", "text": "public function create()\n {\n $view_elements = [];\n \n $view_elements['page_title'] = 'Resources'; \n $view_elements['component'] = 'resources'; \n $view_elements['menu'] = 'resources'; \n $view_elements['breadcrumbs']['All Resources'] = array(\"link\"=>'/resources',\"active\"=>'1');\n \n\n $view = viewName('resources.add');\n return view($view, $view_elements);\n }", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "e3088f55fa2e4660ea43003f9f05103e", "score": "0.738591", "text": "public function create()\n\t{\n\t\treturn view('subResourceDetails.create');\n\t}", "title": "" }, { "docid": "8346857a727217603e3b507224e6f4fb", "score": "0.7360721", "text": "public function create()\n {\n return view(\"form\");\n }", "title": "" }, { "docid": "a88dfafe57fd2497dd585577ba27a652", "score": "0.7350552", "text": "public function create()\n {\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('pages.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "d56752c440e87fca7ccd76e6743512e6", "score": "0.7350431", "text": "public function create()\n\t{\n\t\treturn View::make('catalogue.form');\t\n\t}", "title": "" }, { "docid": "33b0ce2d35b3db36c2ec35ffb91a2cba", "score": "0.733998", "text": "public function showCreateForm(){\n return view('client.create');\n }", "title": "" }, { "docid": "e1c4a637db2fd84ef7dabb5b305e9961", "score": "0.7336561", "text": "public function create()\n {\n $resource = $this->resource;\n $resource['action'] = 'Create';\n return view('dashboard.views.'.$this->resources.'.create',compact( 'resource'));\n\n }", "title": "" }, { "docid": "e6adbf3fbac4429738c92777eeac55a6", "score": "0.7333788", "text": "public function create()\n {\n $this->authorize('create', Form::class);\n\n return view('forms.create');\n }", "title": "" }, { "docid": "d3a655273e3662ac11954ec099dd187c", "score": "0.7281861", "text": "public function create()\n {\n //\n $data = array('new' => True,\n 'contentTitle' => 'Registrar Livro',);\n return view('bookform', $data);\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "70a09b9f9f3cf55e7b53ed7137155a00", "score": "0.7273827", "text": "public function create()\n {\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('countries.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "c5dd91fcabe4863a8febd91fd23029bc", "score": "0.7238648", "text": "public function create()\n {\n return view ('penilaian.form');\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "21f60e4229ecd12f595a1f02490e2be5", "score": "0.7207343", "text": "public function create()\n\t{\n\t\tdd('show create form');\n\t}", "title": "" }, { "docid": "99deb8b0d3d11f3aacdf9b0837643062", "score": "0.7185418", "text": "public function create()\n {\n return view('Meringue/Form/views/new');\n }", "title": "" }, { "docid": "f5c4717b4547490715e81217fb91fcef", "score": "0.71719545", "text": "public function create() {\n $this->setObject();\n $record = $this->object;\n $page_title = \"Create {$this->singular_name}\";\n $route = $this->route;\n $form_fields = $this->setLabelClass($this->fields_config['form_fields']); \n return view($this->view . '.create', compact('record', 'page_title', 'route', 'form_fields'));\n }", "title": "" }, { "docid": "a46b2fb11623e72b333198e2c3c5bf3c", "score": "0.71715325", "text": "public function create()\n {\n $this->authorize('create', [ShowBusinessIdeas::class]);\n\n return view('resourceRoute.create');\n }", "title": "" }, { "docid": "f2873502c738e8bf31240f26e62893fc", "score": "0.71546483", "text": "public function create()\n {\n\t\t\treturn view('partner.form');\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": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "c403d39d383b8b091f07950a420dc3f5", "score": "0.7114736", "text": "public function create()\n\t{\n\n\t\treturn view('new');\n\n\n\t}", "title": "" }, { "docid": "05a788f6cee6a481e60579669c5fc2cd", "score": "0.71131325", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make(\"newUserForm\");\n\t}", "title": "" }, { "docid": "52886d3e49bbf4a926e71b6960578798", "score": "0.7101583", "text": "public function create()\n {\n //displaying form to create task\n return view('crud.create');\n }", "title": "" }, { "docid": "d304f8f134892d68ca540b0b858fd6cd", "score": "0.7088207", "text": "public function create()\n {\n return view('Home.add-new');\n }", "title": "" }, { "docid": "d1aa4707a9c6ebf5c8103249dbc1a2a3", "score": "0.7087244", "text": "public function create()\n {\n $view = 'create';\n\n $active = $this->active;\n $word = $this->create_word;\n $model = null;\n $select = null;\n $columns = null;\n $actions = null;\n $item = null;\n\n return view('admin.crud.form', compact($this->compact));\n }", "title": "" }, { "docid": "5dcbca5c2b296e16817ce45da193474b", "score": "0.70829123", "text": "public function create()\n {\n return view ('nafila.add');\n }", "title": "" }, { "docid": "dc7d007f8e9a89a82e7dd48856914140", "score": "0.7073015", "text": "public function newAction()\n {\n \t$this->_helper->noCacheHeader();\n\n \t// check if the backButton is diabled if so redirect\n\t\tif (isset($this->_namespace->noBackButton)) {\n\t\t\t$this->_redirectToDefault();\n\t\t}\n\n \t$this->view->form =\t$this->_service->getPopulatedForm(null, false);\n \t$this->_viewRenderer->render($this->_viewFolder . '/form', null, true);\n }", "title": "" }, { "docid": "533cfd54aea57067b2e130dc0d9b0d25", "score": "0.7060761", "text": "public function create()\n {\n return view('conection.form');\n }", "title": "" }, { "docid": "05e2241ee7d60144e91c052c80c01ae0", "score": "0.70603824", "text": "public function newAction()\n {\n $entity = new Book();\n $form = $this->formFactory->create(new BookType(), $entity);\n\n return $this->templating->renderResponse('elseymShelfBundle:Book:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "29f2d81a8230f1a71f0b822e8888c4b6", "score": "0.70505977", "text": "public function create()\n\t{\n\t\t//load the create form\n\t\treturn View::make('products.create');\n\t}", "title": "" }, { "docid": "eef8c1edfb3ab338d65c165479d67819", "score": "0.70433134", "text": "public function create()\n {\n return view('.form');\n }", "title": "" }, { "docid": "201ef6ea5f0160eb38fbe375126231cb", "score": "0.7032151", "text": "public function create()\n\t{\n\t\treturn View('materi.create');\n\t}", "title": "" }, { "docid": "b4abce55cb4a2ce8c33525b5a465907f", "score": "0.7024339", "text": "public function create()\n {\n return view(\"dashboard.car.create-edit\");\n }", "title": "" }, { "docid": "69091643d0249f6381b6ffd4215df94c", "score": "0.70228004", "text": "public function create()\n {\n return view('admin.books.book-form');\n }", "title": "" }, { "docid": "a1f0d1fef33570d235574b68a0aebcaf", "score": "0.7007119", "text": "public function create()\n {\n return view('fp4forms.create');\n }", "title": "" }, { "docid": "8c02f51227a2ebf45d5aa88aa1fbdd14", "score": "0.70046675", "text": "public function create()\n {\n return view('forms.create_late');\n }", "title": "" }, { "docid": "e3b7436816780585c955089205ac6539", "score": "0.69987273", "text": "public function newAction()\n {\n $this->view->form = new PersonajeForm(null, array('edit' => true));\n }", "title": "" }, { "docid": "9ba9ef4da9377c7d495a4dbf879551a4", "score": "0.69980985", "text": "public function create()\n\t{\n\t\treturn 'This should render the view to create a new resource!!';\n\t}", "title": "" }, { "docid": "21ac5bcda502a99b37477c3732d29a10", "score": "0.6997003", "text": "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"home_page\"));\n $breadcrumbs->addItem(\"Usuario\", $this->get(\"router\")->generate(\"usuario\"));\n $breadcrumbs->addItem(\"Nuevo\", $this->get(\"router\")->generate(\"usuario_new\"));\n\n $entity = new Usuario();\n $form = $this->createForm(new UsuarioType(), $entity);\n\n return $this->render('UsuarioBundle:Usuario:new.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "1cd57fc10fe9533cb291e668546ebc3f", "score": "0.69927114", "text": "public function createAction()\n {\n $action = $this->view->url(['action' => 'save'], 'controllers');\n $this->view->userForm = $this->service->getFormForCreating($action);\n }", "title": "" }, { "docid": "fd33fc0da35476a9bd97bd2366215cad", "score": "0.69897515", "text": "public function actionCreate()\n {\n return $this->render('create');\n }", "title": "" }, { "docid": "fd33fc0da35476a9bd97bd2366215cad", "score": "0.69897515", "text": "public function actionCreate()\n {\n return $this->render('create');\n }", "title": "" }, { "docid": "552c23a4878608a4c2d75ce4352fa7ec", "score": "0.6985989", "text": "public function create()\n {\n return view('add.create');\n }", "title": "" }, { "docid": "19bcb614303c40b1d1ee9ab328c61c1b", "score": "0.69832903", "text": "public function showCreateForm(){\n\t\t\n\t\t// Set the state and tell plugins.\n\t\t$this->setState('SHOW_CREATE_FORM');\n\t\t$this->notifyObservers();\n\t\t\n\t\t//Get Create Form Title\n\t\t$title = $this->openFile(\"core/fragments/users/newUserTitle.phtml\");\n\t\t\n\t\t//Get Create Form\n\t\t$form = $this->openFile(\"core/fragments/users/newUser.phtml\");\n\n\t\t//Set form content to show\n\t\t$this->setContentTitle($title);\n\t\n\t\t//Set form content to show\n\t\t$this->setContent($form);\n\t}", "title": "" }, { "docid": "cab3875b40e1926cadf5d240d5755c33", "score": "0.69831926", "text": "public function create()\n\t{\n\t\treturn view('add');\n\t}", "title": "" }, { "docid": "7b27be70fa64e0a7965ca1f5f2324b8d", "score": "0.6981883", "text": "public function create()\n {\n //\n return view('new.create');\n }", "title": "" }, { "docid": "a4ac77c2b41d5381f9f521f9a9ef9c15", "score": "0.69774544", "text": "public function create()\n {\n return view('manage::create');\n }", "title": "" }, { "docid": "16ebda2fce028f53ff9acd2cdb27e61a", "score": "0.6973155", "text": "public function create()\n {\n return view('prijave.create');\n }", "title": "" }, { "docid": "1c39811f7717ee4b671fb0dabc86d306", "score": "0.69695777", "text": "public function create()\n {\n //\n return view('Sponsors/Admin/form');\n }", "title": "" }, { "docid": "f6da1d0450698bec5313ba023877e2c9", "score": "0.6969481", "text": "public function create()\n {\n return view(\"librarians.create\");\n }", "title": "" }, { "docid": "b9dcd814df4a67ac3130f45aff38f1ee", "score": "0.6968916", "text": "public function create()\n {\n return view('nbform.create');\n }", "title": "" }, { "docid": "67affbe8defecaec0068c8df880bef78", "score": "0.6957839", "text": "public function create()\n {\n return view('hr::create');\n }", "title": "" }, { "docid": "3ff55b7631fd394f17ff84e6d8858428", "score": "0.6957047", "text": "public function create()\n {\n \n return view('pabrik.create');\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": "13cfb81541a9764e54a683020f59b8bd", "score": "0.6952626", "text": "public function create() {\n $breadcrumb = [\n 'pageLable' => 'Create '.$this->className,\n 'links' => [\n ['name' => 'Create '.$this->className]\n ]\n ];\n return view('backend.layouts.form.create',\n $this->preparedCreateForm())\n ->with(['className' => $this->className, 'breadcrumb' => $breadcrumb])\n ->with('formAttributes', $this->formAttributes);\n }", "title": "" }, { "docid": "8ed65484ff2ee4c220e635b0137f51c9", "score": "0.69491976", "text": "public function create()\n {\n return view('show.create');\n }", "title": "" }, { "docid": "edcff5ad61f56a5f713509f282ab987f", "score": "0.694893", "text": "public function create()\n {\n //return form\n return view('admin.store.create');\n }", "title": "" }, { "docid": "07b43788dfee25823f1bfa779101007b", "score": "0.69488627", "text": "public function create()\n {\n return view('hrm::create');\n }", "title": "" }, { "docid": "86e74634806a61ed0f710d1b4aa1b622", "score": "0.69432896", "text": "public function create()\n {\n //return create view\n return view($this->getViewFolder().'.create',[\n 'properties' => $this->model->getPropertiesCreate(),\n 'resource' => $this->resource\n ]);\n }", "title": "" }, { "docid": "5e44d678b4e0518c96aebd2237cd5c11", "score": "0.69430643", "text": "public function create()\n {\n return view('dashboard.post.form_create');\n }", "title": "" }, { "docid": "9d347981a9dc58fed97cdffb7431509a", "score": "0.69423616", "text": "public function create()\n\t{\n\t\treturn view('admin.marca.new');\n\t}", "title": "" }, { "docid": "c8545d13c92a2bfc49784e47f3eece3a", "score": "0.6937241", "text": "public function create()\n {\n // Menampilkan form create\n return view('mahasiswa.create');\n }", "title": "" }, { "docid": "a8643f5298a2feeab2dd1817ae9a5e62", "score": "0.69359756", "text": "public function create(){\r\n\t\t\t$this->view('create');\r\n\t\t}", "title": "" }, { "docid": "62264d4253eb3b74399ec1e90a8bbcda", "score": "0.69322455", "text": "public function newAction()\n {\n $entity = new Phone();\n $form = $this->createForm(new PhoneType(), $entity);\n\n return $this->render('JblStudioBundle:Phone:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "03eea4206e77f982ad1e30911c57b32a", "score": "0.6929893", "text": "public function create()\n {\n return view('matakuliahs.create');\n }", "title": "" }, { "docid": "58cf4220e8a5e664b1119cbca77648f3", "score": "0.6928969", "text": "public function create()\n {\n $data = array_merge([\n 'tabs' => TabManager::get($this->getModel()->getTable()),\n $this->getResourceName() => $this->getModel(),\n ], $this->getFormData('create'));\n\n return view(\"{$this->viewPath}.create\", $data);\n }", "title": "" }, { "docid": "64f42d4ca1c0601a437ae6c5d9a1f2a9", "score": "0.6928629", "text": "public function create()\n {\n return view(\"residentials.add\");\n }", "title": "" }, { "docid": "8e841fda4e78530e752dec74ec809b42", "score": "0.69278556", "text": "public function create()\n {\n return view('ryutsuisen::role.form');\n }", "title": "" }, { "docid": "0fb248e24532b7357981b8412bbcd700", "score": "0.6917571", "text": "public function create()\n {\n return view('buku.form');\n }", "title": "" }, { "docid": "4e929a4b2808dee4d30b9afc14bcf480", "score": "0.6917477", "text": "public function create()\n {\n return view('landlord.add');\n }", "title": "" }, { "docid": "6945326379d789dcaf379e8368057f99", "score": "0.6915064", "text": "public function newAction()\n {\n $entity = new Rezyser();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AppBundle:Rezyser:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "a09a0efe9eece0c7f21dac4f5e096ee9", "score": "0.6912519", "text": "public function create()\n {\n return view('objectAdmin.create');\n }", "title": "" }, { "docid": "efb1a49f7e393c53db8698527f5440e8", "score": "0.69094497", "text": "public function create()\n\t{\n\t\treturn view('admin.book.create');\n\t}", "title": "" }, { "docid": "74bad321580cd692d72a5bc68292375c", "score": "0.6907924", "text": "public function create()\n {\n return view('projects.form', ['project' => new Project()]);\n }", "title": "" }, { "docid": "d135d57cf231c80bd81581e84bc5d101", "score": "0.689978", "text": "public function create()\n {\n return view(\"pages.mahasiswa.form\");\n }", "title": "" }, { "docid": "e193be5267ce5df3d9a89c422be1cdf0", "score": "0.6896789", "text": "public function newAction()\n {\n $repertoire = new Repertoire();\n $form = $this->createForm( RepertoireType::class, $repertoire);\n\n \n\t\treturn $this->render('repertoire/new.html.twig', array( 'repertoire' => $repertoire,\n 'form' => $form->createView(), ));\n }", "title": "" }, { "docid": "1e595d1c40410662eea090eb45d97ba4", "score": "0.6890229", "text": "public function create()\n {\n $model = $this->model;\n $role = Role::pluck('title', 'id')->all();\n return view(\"{$this->view}.form\", compact('model', 'role'));\n }", "title": "" }, { "docid": "e7931b0c0f69aa6a52b8b61f7d2e9a87", "score": "0.68901664", "text": "public function newAction() { \t\n \t$this->view->form = $this->_form; \t\n }", "title": "" }, { "docid": "e4e19ff4b09ce0b41c6e81d7794d0b45", "score": "0.6888766", "text": "public function create()\n {\n return view('product-create-form');\n }", "title": "" }, { "docid": "1964a7650dd5906a93274754d7b9a2d1", "score": "0.68877786", "text": "public function newAction()\n {\n $entity = new Regiao();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CMSConfiguracoesBundle:Regiao:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'error' => null\n ));\n }", "title": "" }, { "docid": "e7b489419b81ae7a77026305a8b01920", "score": "0.6885279", "text": "public function create()\n {\n return view('procrm::create');\n }", "title": "" }, { "docid": "e5666dcb2071335d352cdbc90f7e0f4d", "score": "0.6883182", "text": "public function create() { dd($this);\n return view('forms.create');\n }", "title": "" }, { "docid": "fddc7b44639ba32c68e6fa179d42af11", "score": "0.6882655", "text": "public function create() {\n\t\treturn view('admin::create');\n\t}", "title": "" }, { "docid": "e541aa1606e75bbf5778d3a7f0256cb1", "score": "0.6881101", "text": "public function create() {\n return view('admin.new');\n }", "title": "" }, { "docid": "2185bccd0ff9ecd23830f83e5ad143d4", "score": "0.6879935", "text": "public function create()\n {\n return view('regimen.create');\n }", "title": "" }, { "docid": "9f6a0c281e47a1d0a3dec201147718e6", "score": "0.68771493", "text": "public function newAction()\n {\n $entity = new BaseForms();\n\n $form = $this->createCreateForm($entity);\n\n return $this->render('AppBundle:BaseForms:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "edef682535630deffcd3d6a6fdcdbe2f", "score": "0.6877042", "text": "public function create()\n {\n //\n return view('pages/createitemform');\n }", "title": "" }, { "docid": "64134e0334d9a96a3451da65dbded2e2", "score": "0.6874127", "text": "public function newAction()\n {\n $this->readAndSetExtendsTemplate();\n $entity = new Status();\n $form = $this->createForm(new StatusType(), $entity);\n\n return $this->render('HttpiCoreBundle:Status:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'extendsTemplate' => $this->extendsTemplate\n ));\n }", "title": "" }, { "docid": "4a3a37470b286041123bc977ccd01097", "score": "0.6870055", "text": "public function create()\n {\n return view('backend.forms.etudiant.create');\n }", "title": "" }, { "docid": "64be16e54c6140be0cde6c7bfb89beab", "score": "0.68632406", "text": "public function create()\n {\n return view('admin.show.create');\n }", "title": "" }, { "docid": "ad131f9e123018caa9b4e43a222f86af", "score": "0.68617475", "text": "public function create()\n {\n return view ('prelims.create');\n }", "title": "" }, { "docid": "bde062793a4b4defae59a778a806e252", "score": "0.68591446", "text": "public function create()\n\t{\n\t\t$tool = new Tool;\n\t\t$form_data = ['route' => self::$prefixRoute . 'store', 'method' => 'POST'];\n\n\t\treturn view(self::$prefixView . 'form', compact('tool', 'form_data'));\n\t}", "title": "" } ]
f69689dde0e4327222583fbce096b52b
/ Init, called in wp init hook void, no args sets up data types, e.g., post types and taxonomies
[ { "docid": "59ccdbaf3cf542440255300890448717", "score": "0.0", "text": "public function init()\n {\n $this->plugin_name = __( 'Random Post Generator', 'random-post-generator' );\n \n }", "title": "" } ]
[ { "docid": "dc6ccaa3e6634dc1b4e8405c0ea53db4", "score": "0.7722126", "text": "public function initPostType(){\n\t\tregister_post_type( $this->posType, $this->argsRegister() );\n\t}", "title": "" }, { "docid": "0892005ca2f762e0280562895bace5f6", "score": "0.7642687", "text": "public function init()\r\n \t{\r\n \t\t// Initialize Post Type\r\n \t\t$this->create_post_type();\r\n \t\tadd_action('save_post', array(&$this, 'save_post'));\r\n add_action('save_post', array(&$this, 'treatments_metabox_save'));\r\n \t}", "title": "" }, { "docid": "d7a4cb01723a67e87a8a11025870b2b9", "score": "0.7597781", "text": "static function setup_post_types_and_taxonomies() {\n\t\t\tMyCondo_API_Handler::setup( array('endpoints' => MyCondo_Config::get_api_endpoints() ) );\n\t\t\tMyCondo_Thermostat_Component::setup();\n\t\t\tMyCondo_Music_Component::setup();\n\t\t\tMyCondo_Lights_Component::setup();\n\t}", "title": "" }, { "docid": "03b754332c7ba7b6b37b9668059a4c4c", "score": "0.75677866", "text": "public function init() {\n\t\t$defaults = $this->defaults();\n\t\t$config = $defaults->get('post_type_config', array());\n\t\t$labels = array();\n\t\tforeach($defaults->get('post_type_admin_labels', array()) as $k => $v) {\n\t\t\t$labels [$k] = call_user_func_array('_x', $v);\n\t\t}\n\n\t\tforeach($defaults->get('post_type_labels', array()) as $k => $v) {\n\t\t\t$labels [$k] = call_user_func_array('__', $v);\n\t\t}\n\n\t\t$config['description'] = call_user_func_array('__', $defaults->get('post_type_description'));\n\t\t$config['labels'] = $labels;\n\t\tregister_post_type($defaults['post_type'], $config);\n\t\tregister_taxonomy('record_tag', 'track_record',\n\t\t\tarray( \n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'query_var' => 'tag',\n\t\t\t\t'rewrite' => array(\n\t\t\t\t\t'hierarchical' => false,\n\t\t\t\t\t'slug' => get_option('tag_base') ? get_option('tag_base') : 'tag',\n\t\t\t\t\t'ep_mask' => EP_TAGS\n\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_admin_column' => true,\n\t\t\t\t'_builtin' => true,\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "5ae4d24dae47d8a4a9cfdc548ad543a6", "score": "0.7458106", "text": "static function init(){\n self::$taxonomy = strtolower(__CLASS__);\n \n // Coloque aqui o slug dos post types aos quais essa taxonomia vai se aplicar\n self::$post_types = array ( 'post' );\n \n add_action( 'init', array(self::$taxonomy, 'register') ,0);\n\n }", "title": "" }, { "docid": "b290732ab58b8c4960c5deef22d33a22", "score": "0.74327207", "text": "private static function setup_post_types() {\n $plugin_post_types = new JPID_Post_Types();\n\n $plugin_post_types->register_taxonomies();\n $plugin_post_types->register_post_types();\n $plugin_post_types->register_post_statuses();\n }", "title": "" }, { "docid": "7adad25aad3261fcef788dd398d5d344", "score": "0.7418366", "text": "public function init()\n \t{\n \t\t// Initialize Post Type\n\t\t\t$this->slug = get_option(setting_portal);\n \t\t$this->template_url_init();\n \t}", "title": "" }, { "docid": "76aa61f69145b65b84bb120a293bcd53", "score": "0.741049", "text": "function flo_init_post_types() {\n\tif (function_exists('flotheme_get_post_types')) {\n\t\tforeach (flotheme_get_post_types() as $type => $options) {\n\t\t\tflo_add_post_type($type, $options['config'], $options['singular'], $options['multiple']);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "4b42fbccc27c53dfc0f32db6a0eaa890", "score": "0.7403935", "text": "private function _setup_post_types() {\r\n\t\t\t/**\r\n\t\t\t * If db version is not set\r\n\t\t\t */\r\n\r\n\t\t\tif ( !get_option( 'learnpress_db_version' ) ) {\r\n\r\n\t\t\t\t$this->_remove_notices();\r\n\t\t\t\t$this->course_post_type = 'lpr_course';\r\n\t\t\t\t$this->lesson_post_type = 'lpr_lesson';\r\n\t\t\t\t$this->quiz_post_type = 'lpr_quiz';\r\n\t\t\t\t$this->question_post_type = 'lpr_question';\r\n\t\t\t\t$this->order_post_type = 'lpr_order';\r\n\t\t\t\t$this->teacher_role = 'lpr_teacher';\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "88090e4f644c3654061178dac54e965c", "score": "0.7299935", "text": "private static function setup_stuffs() {\n\t\tDW_Post_types::register_post_types();\n\t\tDW_Post_types::register_taxonomies();\n\t}", "title": "" }, { "docid": "f147e06e245a68a04eb201a17a3cfd64", "score": "0.7267776", "text": "public function init() {\n\t\tif ( !empty( $this -> _post_types ) ) {\n\t\t\tadd_action( 'init', [ $this, 'register_post_type' ], 1 );\n\t\t}\n\t\tif ( !empty( $this -> _taxonomies ) ) {\n\t\t\tadd_action( 'init', [ $this, 'register_taxonomy' ], 1 );\n\t\t}\n\t}", "title": "" }, { "docid": "9aca32e0859d7141c8a755ee112a7111", "score": "0.72563845", "text": "public static function action_init() {\n\t\tstatic::inherit_post_types();\n\t\tstatic::create_taxonomies();\n\t\tstatic::create_post_types();\n\t}", "title": "" }, { "docid": "7ab538a5f7eb5b3165c2cb878965da02", "score": "0.72537017", "text": "public function init() {\n\t\tforeach ($this->post_types as $post_type) {\n\t\t\tadd_meta_box($this->id, $this->name, array($this, 'box'), $post_type, $this->context, $this->priority);\n\t\t}\n\t\t\n\t\t//Register the meta box on the post types that \"support\" the meta box\n\t\tforeach ((array)get_post_types(array('public' => true)) as $post_type) {\n\t\t\t\t\t\t\n\t\t\tif ( post_type_supports($post_type, $this->post_type_supports_id) )\n\t\t\t\tadd_meta_box($this->id, $this->name, array($this, 'box'), $post_type, $this->context, $this->priority);\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "897b6f25be8cf4afb71296d133aef2f0", "score": "0.71891975", "text": "public static function init() {\n\n\t\tself::register_post_types();\n\t\tself::set_user_roles_and_capabilities();\n\n\t\t// handle custom post type admin messages\n\t\tadd_filter( 'post_updated_messages', array( __CLASS__, 'updated_messages' ) );\n\t\tadd_filter( 'bulk_post_updated_messages', array( __CLASS__, 'bulk_updated_messages' ), 10, 2 );\n\t}", "title": "" }, { "docid": "b2025f83c215b7221f352a2ec0c1ea3d", "score": "0.71873266", "text": "public function init() {\n\n\t\t// Taxonomies\n\t\tadd_action( 'cptui_taxonomy_after_fieldsets', [\n\t\t\t$this,\n\t\t\t'add_taxonomy_graphql_settings'\n\t\t], 10, 1 );\n\t\tadd_filter( 'cptui_before_update_taxonomy', [ $this, 'before_update_taxonomy' ], 10, 2 );\n\t\tadd_filter( 'cptui_pre_register_taxonomy', [\n\t\t\t$this,\n\t\t\t'add_graphql_settings_to_registry'\n\t\t], 10, 3 );\n\t\tadd_filter( 'cptui_pre_save_taxonomy', [ $this, 'save_graphql_settings' ], 10, 2 );\n\n\t\t// Post Types\n\t\tadd_action( 'cptui_post_type_after_fieldsets', [\n\t\t\t$this,\n\t\t\t'add_graphql_post_type_settings'\n\t\t], 10, 1 );\n\t\tadd_filter( 'cptui_before_update_post_type', [ $this, 'before_update_post_type' ], 10, 2 );\n\t\tadd_filter( 'cptui_pre_register_post_type', [\n\t\t\t$this,\n\t\t\t'add_graphql_settings_to_registry'\n\t\t], 10, 3 );\n\t\tadd_filter( 'cptui_pre_save_post_type', [ $this, 'save_graphql_settings' ], 10, 2 );\n\t}", "title": "" }, { "docid": "bf9609dfbff4fdeb0a8452d193c23c3a", "score": "0.71347654", "text": "public static function init() {\n\t\t// register Time post type\n\t\t$post_type_args = array(\n\t\t\t'public' => false,\n\t\t\t'has_archive' => false,\n\t\t\t'show_ui' => false,\n\t\t\t'supports' => array( '' )\n\t\t);\n\t\tself::register_post_type( self::POST_TYPE, 'Time', 'Time Type', $post_type_args );\n\n\t\tadd_action( 'si_plugin_activation_hook', array( __CLASS__, 'default_time' ) );\n\t}", "title": "" }, { "docid": "54b278d2a26a1445590532f00224199b", "score": "0.7118", "text": "function __construct() {\r\n\t\t\trequire_once plugin_dir_path ( __FILE__ ) . '/dt-portfolio-post-type.php';\r\n\t\t\tif (class_exists ( 'DTPortfolioPostType' )) {\r\n\t\t\t\t\r\n\t\t\t\tnew DTPortfolioPostType ();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Teachers Custom Post Type */\r\n\t\t\trequire_once plugin_dir_path ( __FILE__ ) . '/dt-teachers-post-type.php';\r\n\t\t\tif (class_exists ( 'DTTeachersPostType' )) {\t\t\t\t\r\n\t\t\t\tnew DTTeachersPostType ();\r\n\t\t\t}\r\n\r\n\t\t\t/* Courses Custom Post Type */\r\n\t\t\trequire_once plugin_dir_path ( __FILE__ ) . '/dt-courses-post-type.php';\r\n\t\t\tif (class_exists ( 'DTCoursesPostType' )) {\t\t\t\t\r\n\t\t\t\tnew DTCoursesPostType ();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Lesson Custom Post Type */\r\n\t\t\trequire_once plugin_dir_path ( __FILE__ ) . '/dt-lessons-post-type.php';\r\n\t\t\tif (class_exists ( 'DTLessonsPostType' )) {\t\t\t\t\r\n\t\t\t\tnew DTLessonsPostType ();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Quizes Custom Post Type */\r\n\t\t\trequire_once plugin_dir_path ( __FILE__ ) . '/dt-quizes-post-type.php';\r\n\t\t\tif (class_exists ( 'DTQuizesPostType' )) {\t\t\t\t\r\n\t\t\t\tnew DTQuizesPostType ();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Questions Custom Post Type */\r\n\t\t\trequire_once plugin_dir_path ( __FILE__ ) . '/dt-questions-post-type.php';\r\n\t\t\tif (class_exists ( 'DTQuestionsPostType' )) {\t\t\t\t\r\n\t\t\t\tnew DTQuestionsPostType ();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Assignemnts Custom Post Type */\r\n\t\t\trequire_once plugin_dir_path ( __FILE__ ) . '/dt-assignments-post-type.php';\r\n\t\t\tif (class_exists ( 'DTAssignmentsPostType' )) {\t\t\t\t\r\n\t\t\t\tnew DTAssignmentsPostType ();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Grading Custom Post Type */\r\n\t\t\trequire_once plugin_dir_path ( __FILE__ ) . '/dt-gradings-post-type.php';\r\n\t\t\tif (class_exists ( 'DTGradingsPostType' )) {\t\t\t\t\r\n\t\t\t\tnew DTGradingsPostType ();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Payments History Custom Post Type */\r\n\t\t\trequire_once plugin_dir_path ( __FILE__ ) . '/dt-payments-post-type.php';\r\n\t\t\tif (class_exists ( 'DTPaymentsPostType' )) {\t\t\t\t\r\n\t\t\t\tnew DTPaymentsPostType ();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* All Certificates Custom Post Type */\r\n\t\t\trequire_once plugin_dir_path ( __FILE__ ) . '/dt-certificates-post-type.php';\r\n\t\t\tif (class_exists ( 'DTCertificatesPostType' )) {\t\t\t\t\r\n\t\t\t\tnew DTCertificatesPostType ();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Alter Taxonomy to Radio Button */\r\n\t\t\trequire_once plugin_dir_path ( __FILE__ ) . '/dt-alter-taxonomy-to-radio-button.php';\r\n\t\t\tif (class_exists ( 'DT_RadioButtonTaxonomy' )) {\r\n\t\t\t\tnew DT_RadioButtonTaxonomy ('lesson_complexity');\r\n\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\trequire_once plugin_dir_path ( __FILE__ ) . 'functions.php';\r\n\t\t\t\r\n\t\t\t// Add Hook into the 'init()' action\r\n\t\t\tadd_action ( 'init', array (\r\n\t\t\t\t\t$this,\r\n\t\t\t\t\t'dt_init' \r\n\t\t\t) );\r\n\t\t\t\r\n\t\t\t// Add Hook into the 'admin_init()' action\r\n\t\t\tadd_action ( 'admin_init', array (\r\n\t\t\t\t\t$this,\r\n\t\t\t\t\t'dt_admin_init' \r\n\t\t\t) );\r\n\t\t\t\r\n\t\t\t// Add Hook into the 'admin_init()' action\r\n\t\t\tadd_action ( 'admin_menu', array (\r\n\t\t\t\t\t$this,\r\n\t\t\t\t\t'dt_admin_menu' \r\n\t\t\t) );\r\n\t\t\t\r\n\t\t\tadd_filter ( 'ws_plugin__s2member_add_meta_boxes_excluded_types', array (\r\n\t\t\t\t\t$this,\r\n\t\t\t\t\t's2_meta_box_exclude_post_types'\r\n\t\t\t) );\r\n\t\t\t\r\n\t\t\tadd_action( 'parent_file', array (\r\n\t\t\t\t$this,\r\n\t\t\t\t'dt_change_active_menu'\r\n\t\t\t) );\r\n\t\t\t\r\n\t\t\trequire_once plugin_dir_path ( __FILE__ ) . 'dt-payments.php';\r\n\t\t\trequire_once plugin_dir_path ( __FILE__ ) . 'dt-statistics.php';\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "f3958223a87f3bc8f75ca060c89892f6", "score": "0.7077872", "text": "public function init() {\r\n\t\t$utility = new Utility();\r\n\r\n\t\t// Book\r\n\t\t$book = new Type\\Book();\r\n\t\t$book_meta = new Type\\Meta\\Book();\r\n\t\t$book_category = new Type\\Taxonomy\\Book_Category();\r\n\t\t$book_p2p = new Type\\P2P\\Book();\r\n\r\n\t\t// Writer\r\n\t\t$writer = new Type\\Writer();\r\n\t\t$writer_meta = new Type\\Meta\\Writer();\r\n\r\n\t\t// Page\r\n\t\t$page_meta = new Type\\Meta\\Page();\r\n\t\t$page_category = new Type\\Taxonomy\\Page_Category();\r\n\r\n\t\tadd_action( 'widgets_init', [ $this, 'register_widgets' ] );\r\n\t\tadd_action( 'widgets_init', [ $this, 'unregister_default_widgets' ] );\r\n\t}", "title": "" }, { "docid": "104ccb22a0ff811459535a5b2655bddd", "score": "0.69408417", "text": "public function init() {\n\n\t\t/**\n\t\t * Including all classes needed.\n\t\t */\n\t\trequire_once plugin_dir_path( __FILE__ ) . 'class/class-roc-stats-save.php';\n\t\trequire_once plugin_dir_path( __FILE__ ) . 'class/class-roc-stats-shortcode.php';\n\t\trequire_once plugin_dir_path( __FILE__ ) . 'class/class-widget-roc-iconbox.php';\n\t\t//Admin Class\n\t\trequire_once plugin_dir_path( __FILE__ ) . 'admin/class-admin.php';\n\t\t\n\t\t//==== Adding new post type for STATS Plugin\n\t\tadd_action( 'init', array($this,'register_types' ));\n\n\t\t\n\t\t//Instantiate objects, initialize classes and objects\n\t\tnew ROC_Stat_shortcode();\n\t\tnew ROC_Stat_Save();\n\t\tnew ROC_Stat_Admin();\n\t\tnew ROC_Icon_Box();\n\t\t\n\t}", "title": "" }, { "docid": "5c45c0ff4edf63d9366e750acefebfe2", "score": "0.690475", "text": "public static function install_data(){\n\t\t\tglobal $wpdb;\n\n\t\t\t$defaluts = array('text','textarea','upload','select','list-item');\n\t\t\t$table_name = $wpdb->prefix . 'pb_meta_field_types';\n\n\t\t\tforeach ( $defaluts as $defalut ) {\n\n\t\t\t\t$sql = \"INSERT INTO $table_name (field_type)\n\t\t\t\tSELECT * FROM (SELECT '$defalut') AS tmp\n\t\t\t\tWHERE NOT EXISTS (\n\t\t\t\t SELECT field_type FROM $table_name WHERE field_type = '$defalut'\n\t\t\t\t) LIMIT 1\";\n\n\t\t\t\t$wpdb->query( $sql );\n\t\t\t}\n\n\t\t\t//Default zone types\n\t\t\tLH_Page_Builder_Database::title_and_text_zone_setup();\n\n\t\t}", "title": "" }, { "docid": "3348999f40e0281168a5e82080827ee0", "score": "0.68760175", "text": "function me_rb4_custom_post_types_init() {\n\n\t// Partners CPT.\n\t$partner_labels = array(\n\t\t'name' => _x( 'Partners', 'post type general name' ),\n\t\t'singular_name' => _x( 'Partner', 'post type singular name' ),\n\t\t'add_new' => _x( 'Add New', 'book' ),\n\t\t'add_new_item' => __( 'Add New Partner' ),\n\t\t'edit_item' => __( 'Edit Partner' ),\n\t\t'new_item' => __( 'New Partner' ),\n\t\t'all_items' => __( 'All Partners' ),\n\t\t'view_item' => __( 'View Partner' ),\n\t\t'search_items' => __( 'Search Partners' ),\n\t\t'not_found' => __( 'No Partners found' ),\n\t\t'not_found_in_trash' => __( 'No Partners found in the Trash' ),\n\t\t'parent_item_colon' => '',\n\t\t'menu_name' => 'Partners',\n\t);\n\n\t$partner_args = array(\n\t\t'labels' => $partner_labels,\n\t\t'description' => 'Holds our Partners and Partner specific data',\n\t\t'public' => true,\n\t\t'menu_position' => 5, // '5' places menu item directly below Posts\n\t\t'menu_icon' => 'dashicons-universal-access', // https://developer.wordpress.org/resource/dashicons/\n\t\t'taxonomies' => array( '' ), // associates with custom taxonomy\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt' ),\n\t\t'has_archive' => false,\n\t);\n\tregister_post_type( 'partner', $partner_args );\n\n\t// Sponsors CPT.\n\t$sponsor_labels = array(\n\t\t'name' => _x( 'Sponsors', 'post type general name' ),\n\t\t'singular_name' => _x( 'Sponsor', 'post type singular name' ),\n\t\t'add_new' => _x( 'Add New', 'book' ),\n\t\t'add_new_item' => __( 'Add New Sponsor' ),\n\t\t'edit_item' => __( 'Edit Sponsor' ),\n\t\t'new_item' => __( 'New Sponsor' ),\n\t\t'all_items' => __( 'All Sponsors' ),\n\t\t'view_item' => __( 'View Sponsor' ),\n\t\t'search_items' => __( 'Search Sponsors' ),\n\t\t'not_found' => __( 'No Sponsors found' ),\n\t\t'not_found_in_trash' => __( 'No Sponsors found in the Trash' ),\n\t\t'parent_item_colon' => '',\n\t\t'menu_name' => 'Sponsors',\n\t);\n\n\t$sponsor_args = array(\n\t\t'labels' => $sponsor_labels,\n\t\t'description' => 'Holds our Sponsors and Sponsor specific data',\n\t\t'public' => true,\n\t\t'menu_position' => 5, // '5' places menu item directly below Posts\n\t\t'menu_icon' => 'dashicons-carrot', // https://developer.wordpress.org/resource/dashicons/\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt' ),\n\t\t'has_archive' => false,\n\t);\n\tregister_post_type( 'sponsor', $sponsor_args );\n\n\t// Staff/Leadership CPT.\n\t$staff_labels = array(\n\t\t'name' => _x( 'Staff/Leaderships', 'post type general name' ),\n\t\t'singular_name' => _x( 'Staff/Leadership', 'post type singular name' ),\n\t\t'add_new' => _x( 'Add New', 'book' ),\n\t\t'add_new_item' => __( 'Add New Staff/Leadership' ),\n\t\t'edit_item' => __( 'Edit Staff/Leadership' ),\n\t\t'new_item' => __( 'New Staff/Leadership' ),\n\t\t'all_items' => __( 'All Staff/Leaderships' ),\n\t\t'view_item' => __( 'View Staff/Leadership' ),\n\t\t'search_items' => __( 'Search Staff/Leaderships' ),\n\t\t'not_found' => __( 'No Staff/Leaderships found' ),\n\t\t'not_found_in_trash' => __( 'No Staff/Leaderships found in the Trash' ),\n\t\t'parent_item_colon' => '',\n\t\t'menu_name' => 'Staff & Leaders',\n\t);\n\n\t$staff_args = array(\n\t\t'labels' => $staff_labels,\n\t\t'description' => 'Holds our Staff/Leaderships and Staff/Leadership specific data',\n\t\t'public' => true,\n\t\t'menu_position' => 5, // '5' places menu item directly below Posts\n\t\t'menu_icon' => 'dashicons-groups', // https://developer.wordpress.org/resource/dashicons/\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt' ),\n\t\t'has_archive' => false,\n\t);\n\tregister_post_type( 'staff-leadership', $staff_args );\n\n\t// Impact Locations CPT.\n\t$impact_labels = array(\n\t\t'name' => _x( 'Impact Locations', 'post type general name' ),\n\t\t'singular_name' => _x( 'Impact Location', 'post type singular name' ),\n\t\t'add_new' => _x( 'Add New', 'book' ),\n\t\t'add_new_item' => __( 'Add New Impact Location' ),\n\t\t'edit_item' => __( 'Edit Impact Location' ),\n\t\t'new_item' => __( 'New Impact Location' ),\n\t\t'all_items' => __( 'All Impact Locations' ),\n\t\t'view_item' => __( 'View Impact Location' ),\n\t\t'search_items' => __( 'Search Impact Location' ),\n\t\t'not_found' => __( 'No Impact Locations found' ),\n\t\t'not_found_in_trash' => __( 'No Impact Locations found in the Trash' ),\n\t\t'parent_item_colon' => '',\n\t\t'menu_name' => 'Impact Loc.',\n\t);\n\n\t$impact_args = array(\n\t\t'labels' => $impact_labels,\n\t\t'description' => 'Holds our Impact Locations and Impact Location specific data',\n\t\t'public' => true,\n\t\t'menu_position' => 5, // '5' places menu item directly below Posts\n\t\t'menu_icon' => 'dashicons-location', // https://developer.wordpress.org/resource/dashicons/\n\t\t'taxonomies' => array( 'location-type' ), // associates with custom taxonomy\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt' ),\n\t\t'has_archive' => false,\n\t);\n\tregister_post_type( 'impact-locations', $impact_args );\n\n\t// Materials CPT.\n\t$material_labels = array(\n\t\t'name' => _x( 'Materials', 'post type general name' ),\n\t\t'singular_name' => _x( 'Material', 'post type singular name' ),\n\t\t'add_new' => _x( 'Add New', 'book' ),\n\t\t'add_new_item' => __( 'Add New Material' ),\n\t\t'edit_item' => __( 'Edit Material' ),\n\t\t'new_item' => __( 'New Material' ),\n\t\t'all_items' => __( 'All Materials' ),\n\t\t'view_item' => __( 'View Materials' ),\n\t\t'search_items' => __( 'Search Materials' ),\n\t\t'not_found' => __( 'No Materials found' ),\n\t\t'not_found_in_trash' => __( 'No Materials found in the Trash' ),\n\t\t'parent_item_colon' => '',\n\t\t'menu_name' => 'Materials',\n\t);\n\n\t$material_args = array(\n\t\t'labels' => $material_labels,\n\t\t'description' => 'Holds our Material and Material specific data',\n\t\t'public' => true,\n\t\t'menu_position' => 5, // '5' places menu item directly below Posts\n\t\t'menu_icon' => 'dashicons-cloud', // https://developer.wordpress.org/resource/dashicons/\n\t\t'taxonomies' => array( 'material-type' ), // associates with custom taxonomy\n\t\t'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt' ),\n\t\t'has_archive' => false,\n\t);\n\tregister_post_type( 'material', $material_args );\n}", "title": "" }, { "docid": "9999d343f55bc26a68e400e9f897929f", "score": "0.6872968", "text": "static function init_action(){\n //addition of brands post type\n register_post_type(self::$post_name, [\n 'label' => 'Brands',\n 'description' => __('Post type used to relate brands in projects.', 'aecom-indigo'),\n 'public' => true,\n 'menu_position' => 5,\n 'supports'=> ['title', 'editor', 'thumbnail'],\n ]);\n }", "title": "" }, { "docid": "331a08873be79d04ad9f8646538630c6", "score": "0.686858", "text": "private function init_hooks(){\r\n\t\tadd_filter('bamobile_mobiconnector_custom_post_type_detail',array($this,'bamobile_get_details_rest_api_post_type'),10,2);\r\n\t}", "title": "" }, { "docid": "b9a1ca48a6446bea6c8284a305adc073", "score": "0.6867226", "text": "private function setup() {\n\t\tadd_action( 'init', array( $this, 'create_post_type' ) );\n\t\tadd_action( 'admin_menu', array( $this, 'remove_menus' ) );\n\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );\n\t\tadd_action( 'admin_head', array( $this, 'cpt_icon' ) );\n\n\t\tadd_filter( 'post_updated_messages', array( $this, 'post_updated_messages' ) );\n\t\tadd_filter( 'enter_title_here', array( $this, 'enter_title_here' ), 10, 2 );\n\t\tadd_action( 'edit_form_after_title', array( $this, 'edit_form_after_title' ) );\n\n\t\tadd_action( 'save_post', array( $this, 'save_points' ), 10, 2 );\n\t}", "title": "" }, { "docid": "2ef522370af497c6ca4174ec1cf3cead", "score": "0.6866289", "text": "function _admin_init() {\n\t\t\n\t\t// Debug voodoo\n\t\t//add_action('all', create_function('', 'var_dump(current_filter());'));\n\t\t\n\t\t// Adds the metabox for each post type\n\t\tforeach ( $this->post_types as $post_type => $sections )\n\t\t\tforeach ( $sections as $section_id )\n\t\t\t\tadd_meta_box( 'post-options-' . $section_id, $this->sections[$section_id]['title'], array( &$this, '_meta_box_post_options' ), $post_type, 'normal', 'default', array( 'section_id' => $section_id ) );\n\t\t\t\n\t\t// Register the save_post action (for all post types)\n\t\tadd_action( 'save_post', array( &$this, '_save_post' ), 10, 2 );\n\t}", "title": "" }, { "docid": "d5e5f444884c722eba15affd36d0ed7f", "score": "0.6856845", "text": "public static function init() {\n add_action( 'init', array( __CLASS__, 'definition' ) );\n add_action( 'pre_get_posts', array( __CLASS__, 'reorder_by_menu_order' ), 1 );\n add_filter( 'manage_edit-field_columns', array( __CLASS__, 'custom_columns' ) );\n\n # has to be executed later than Inventor_Fields_Post_Type_Metabox::add_metaboxes_to_post_types()\n add_action( 'cmb2_init', array( __CLASS__, 'fields' ), 14 );\n add_action( 'cmb2_init', array( __CLASS__, 'add_fields_to_metaboxes' ), 15 );\n }", "title": "" }, { "docid": "7cdd2f51ee59e390260f39438d654abd", "score": "0.6850724", "text": "function base_set_custom_post_types()\n{\n\t$base_post_types = array();\n\n\t/*\n\t *\n\t * Left empty : populate after examples library\n\t *\n\t */\n\n\tif (!empty($base_post_types)) {\n\t\tforeach ($base_post_types as $base_post_type) {\n\t\t\t// Register post type\n\t\t\tif (!empty($base_post_type['post_type_name']) && !empty($base_post_type['post_type_args'])) {\n\t\t\t\tregister_post_type($base_post_type['post_type_name'], $base_post_type['post_type_args']);\n\t\t\t\t// Register taxonomy for post type\n\t\t\t\tif (!empty($base_post_type['taxonomy_name']) && !empty($base_post_type['taxonomy_args'])) {\n\t\t\t\t\tregister_taxonomy($base_post_type['taxonomy_name'], $base_post_type['post_type_name'], $base_post_type['taxonomy_args']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "5e1963b8c412a8421756453f467d7101", "score": "0.6830898", "text": "function iboltema_init() {\n register_taxonomy_for_object_type( 'category', 'attachment' );\n register_taxonomy_for_object_type( 'post_tag', 'attachment' );\n\n /*\n * Register custom post types. You can also move this code to a plugin.\n */\n /* Pinegrow generated Custom Post Types Begin */\n\n /* Pinegrow generated Custom Post Types End */\n \n /*\n * Register custom taxonomies. You can also move this code to a plugin.\n */\n /* Pinegrow generated Taxonomies Begin */\n\n /* Pinegrow generated Taxonomies End */\n\n}", "title": "" }, { "docid": "dd1f6952e0421f1cfc66d0934db916ec", "score": "0.68207824", "text": "public function setup_post_type() {\n\t\tnew WPGP_CPT_GUEST_POST();\n\t}", "title": "" }, { "docid": "0f3b79d7b921590b437cd6d290d67001", "score": "0.6812427", "text": "private function define_post_types()\n {\n $actions = array();\n\n $this->set_actions($actions);\n }", "title": "" }, { "docid": "9ef4509b7100fa9f2db0cf3e0b401db2", "score": "0.67899585", "text": "function byron_register_post_types()\n{\n}", "title": "" }, { "docid": "cd257d6b455e7007891653558601b33d", "score": "0.67730266", "text": "public static function init() {\n\t\t// register Client post type\n\t\t$post_type_args = array(\n\t\t\t'public' => false,\n\t\t\t'exclude_from_search' => true,\n\t\t\t'has_archive' => false,\n\t\t\t'show_in_nav_menus' => false,\n\t\t\t'show_in_menu' => true,\n\t\t\t'menu_icon' => 'dashicons-businessman',\n\t\t\t// 'show_in_menu' => 'edit.php?post_type='.SI_Invoice::POST_TYPE,\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => self::REWRITE_SLUG,\n\t\t\t\t'with_front' => false,\n\t\t\t),\n\t\t\t'supports' => array( '' ),\n\t\t);\n\t\tself::register_post_type( self::POST_TYPE, 'Lead', 'Leads', $post_type_args );\n\n\t\t// Add the role.\n\t\tadd_action( 'si_plugin_activation_hook', array( __CLASS__, 'client_role' ), 10, 0 );\n\n\t\t$singular = 'Type';\n\t\t$plural = 'Types';\n\t\t$taxonomy_args = array(\n\t\t\t'meta_box_cb' => false,\n\t\t\t'hierarchical' => false,\n\t\t);\n\t\tself::register_taxonomy( self::TYPE_TAXONOMY, array( self::POST_TYPE ), $singular, $plural, $taxonomy_args );\n\n\t\t$singular = 'Status';\n\t\t$plural = 'Statuses';\n\t\t$taxonomy_args = array(\n\t\t\t'meta_box_cb' => false,\n\t\t\t'hierarchical' => false,\n\t\t);\n\t\tself::register_taxonomy( self::STATUS_TAXONOMY, array( self::POST_TYPE ), $singular, $plural, $taxonomy_args );\n\t}", "title": "" }, { "docid": "b8bfc5ccb72df43d06fd17b55a9c7166", "score": "0.6745735", "text": "public static function register_custom_post_types() \n\t{\t\n\n\t\t$data = get_option( self::db_key, array() );\n\t\tforeach ($data as $post_type => $def) \n\t\t{\n\t\t\tif ( isset($def['is_active']) \n\t\t\t\t&& !empty($def['is_active']) \n\t\t\t\t&& !in_array($post_type, self::$built_in_post_types)) \n\t\t\t{\t\n\t\t\t\tregister_post_type( $post_type, $def );\n\t\t\t}\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "5285bbc6c63da246d974442e9585929a", "score": "0.67317885", "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": "308a2de5a98c1fdb7efca55161ea518f", "score": "0.6725399", "text": "public function __construct()\n {\n add_action('init', array($this, 'registerTaxonomy'));\n\n //Flush rewrite-rules on data update & sanitize post type name\n add_filter('acf/update_value/key=field_56c5e5d43eb50', function ($value, $post_id, $field) {\n flush_rewrite_rules(true);\n return $value;\n }, 10, 3);\n\n //Sanitize permalinks\n add_filter('acf/update_value/key=field_56c5e580621be', function ($value, $post_id, $field) {\n return sanitize_title($value, $value);\n }, 10, 3);\n\n //Disable filled fields\n add_action('admin_head', function () {\n echo '<script>';\n echo '\n jQuery(function(){\n jQuery(\".acf-field-56c5e5d43eb50\").each(function(index,item){\n if(jQuery(\"input\",item).val() != \"\" ) {\n jQuery(\"input\",item).attr(\"readonly\",\"readonly\");\n }\n })\n });\n ';\n echo '</script>';\n });\n\n //Populate select box\n add_filter('acf/load_field/key=field_56c5e67222b8b', array($this, 'populatePostTypeSelect'));\n\n }", "title": "" }, { "docid": "ca963a9def76c2be87cc26aa503a6d44", "score": "0.67206454", "text": "private function post_types() {\n\n\t\t$post_types = include_once(self::get_schema_path( __FUNCTION__, 'content' ));\n\n\t\tforeach ( $post_types as $post_type => $args ) {\n\t\t\tregister_post_type( $post_type, $args );\n\t\t}\n\t}", "title": "" }, { "docid": "2c18c1836cef27d2106879bf3459ae58", "score": "0.667816", "text": "public function init(){\n\t\tadd_action( 'save_post', [$this,'saveData'] );\n\t\tadd_action('add_meta_boxes',[$this,'addMetaBox']);\n }", "title": "" }, { "docid": "5ead989cf9c951a51aa8f25e965323a4", "score": "0.66781235", "text": "function register_post_types() {\n }", "title": "" }, { "docid": "14fdc11cba878287422ff332aca4202f", "score": "0.66618484", "text": "function pilau_register_post_types() {\n\n}", "title": "" }, { "docid": "7b48f1f93ead0c00efa295b3109e756c", "score": "0.66579384", "text": "public function load() {\n\t\tadd_action( 'init', [ $this, 'register_post_type' ] );\n\t\tadd_action( 'p4fb_save_form_submission', [ $this, 'save_form_submission' ], 10, 3 );\n\t\tif ( is_admin() ) {\n\t\t\tadd_filter( 'manage_' . P4FB_ENTRY_CPT . '_posts_columns', [ $this, 'manage_posts_columns' ], 10 );\n\t\t\tadd_action( 'manage_' . P4FB_ENTRY_CPT . '_posts_custom_column', [ $this, 'manage_posts_custom_column' ], 10, 2 );\n\t\t\tadd_filter( 'post_row_actions', [ $this, 'post_row_actions' ], 10, 2 );\n\t\t\tadd_action( 'post_action_requeue', [ $this, 'post_action_requeue_entry_handler' ] );\n\t\t}\n\t}", "title": "" }, { "docid": "33b9a7f12ed49074d48438dd1cdc472e", "score": "0.6652304", "text": "public function register_post_types() {\n\t}", "title": "" }, { "docid": "24ddd1dde4e86dfed09e58ad27d3ee8c", "score": "0.66491836", "text": "public function __construct(){\n /**\n * Register your hooks here. Remember to register only on admin side if\n * it's only admin plugin and so forth.\n */\n add_action('init', [$this, 'register_fontset_post_type']);\n add_action('wp_head', [$this, 'load_published_fontsets']);\n add_filter('acf/settings/load_json', [$this, 'add_acf_json_load_point']);\n }", "title": "" }, { "docid": "715417d2c0aa92736f4dfaf09fad2047", "score": "0.6638433", "text": "public function register_post_types() {\n\n\t}", "title": "" }, { "docid": "715417d2c0aa92736f4dfaf09fad2047", "score": "0.6638433", "text": "public function register_post_types() {\n\n\t}", "title": "" }, { "docid": "715417d2c0aa92736f4dfaf09fad2047", "score": "0.6638433", "text": "public function register_post_types() {\n\n\t}", "title": "" }, { "docid": "715417d2c0aa92736f4dfaf09fad2047", "score": "0.6638433", "text": "public function register_post_types() {\n\n\t}", "title": "" }, { "docid": "715417d2c0aa92736f4dfaf09fad2047", "score": "0.6638433", "text": "public function register_post_types() {\n\n\t}", "title": "" }, { "docid": "7993f7420d30040234b48264aadddf61", "score": "0.6634341", "text": "public function register_post_types()\n {\n }", "title": "" }, { "docid": "7993f7420d30040234b48264aadddf61", "score": "0.6634341", "text": "public function register_post_types()\n {\n }", "title": "" }, { "docid": "957a773cc313eb49ca22e7ec9f34f48d", "score": "0.6624831", "text": "function register_post_types() {\n\t}", "title": "" }, { "docid": "957a773cc313eb49ca22e7ec9f34f48d", "score": "0.6624831", "text": "function register_post_types() {\n\t}", "title": "" }, { "docid": "0b0474c7af917649f9d3ddf401008cb6", "score": "0.66200465", "text": "public function cs_reports_init()\r\n\t\t\t{\r\n\t\t\t\t// Initialize Post Type\r\n\t\t\t\t$this->cs_reports_register();\r\n\t\t\t}", "title": "" }, { "docid": "c5ce6ab746ede7b5daed65b0b735168f", "score": "0.6599522", "text": "public function __construct() {\n\n\t\t// add post types\n\t\t$this->add_post_types();\n\n\t\t// add taxonomies\n\t\t$this->add_taxonomies();\n\n\t}", "title": "" }, { "docid": "a4fa5ab0551c4999f74169883840beef", "score": "0.65964216", "text": "function register_post_types() {\n\n}", "title": "" }, { "docid": "06e56f598e4ffbe1594af7f1b46c5efa", "score": "0.65705043", "text": "protected function _init() {\n\t\tadd_action( 'save_post', array( $this, 'update_shadow_taxonomy' ) );\n\t\tadd_action( 'before_delete_post', array( $this, 'delete_shadow_tax_term' ) );\n\t}", "title": "" }, { "docid": "da40ff171e95566e73c420695d6391f9", "score": "0.6565344", "text": "function initialize() {\n\n\t\t\t// globals\n\t\t\tglobal $typenow;\n\n\t\t\t$acf_post_types = acf_get_internal_post_types();\n\n\t\t\tforeach ( $acf_post_types as $post_type ) {\n\t\t\t\tremove_meta_box( 'submitdiv', $post_type, 'side' );\n\t\t\t}\n\n\t\t\t// restrict specific post types\n\t\t\t$restricted = array_merge( $acf_post_types, array( 'acf-taxonomy', 'attachment' ) );\n\t\t\tif ( in_array( $typenow, $restricted ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// enqueue scripts\n\t\t\tacf_enqueue_scripts(\n\t\t\t\tarray(\n\t\t\t\t\t'uploader' => true,\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// actions\n\t\t\tadd_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ), 10, 2 );\n\t\t}", "title": "" }, { "docid": "b1dd7f87a26ac4a792fcc3ad6547b4b4", "score": "0.65625113", "text": "public function on_site_initialization( WP_Site $site ): void {\n\t\t$this->register_post_type();\n\t}", "title": "" }, { "docid": "c314cf78b6b6cb01fac4f9fa1878f6de", "score": "0.65473145", "text": "function dmnmlk_setup_post_types()\n{\n\tregister_post_type( 'book', ['public' => 'true'] );\n}", "title": "" }, { "docid": "ddadaac9e6efc08c73fdf39dff043f8a", "score": "0.65281326", "text": "public function initialize()\n {\n register_post_type('talk', [\n 'public' => true,\n 'label' => 'Talks',\n 'labels' => [\n 'name' => 'Talks',\n 'singular_name' => 'Talks',\n ],\n 'description' => 'A talk is given by a speaker',\n 'supports' => ['title', 'author', 'excerpt', 'editor', 'thumbnail', 'revisions'],\n 'taxonomies' => ['edition'],\n 'has_archive' => true,\n ]);\n\n\n /** @var Posts $postsService */\n $postsService = $this->getContainer()['posts'];\n $postsService->addThumbnailSupport('talk');\n\n add_action('save_post_talk', function ($postId) {\n wp_cache_delete('talks_with_thumbnails');\n });\n\n add_shortcode('talks', [$this, 'talksShortcode']);\n add_action('admin_init', [$this, 'registerMetabox']);\n }", "title": "" }, { "docid": "ccb23b136df81a024cb28a2403a7664c", "score": "0.6500623", "text": "function pluton_init() {\n register_taxonomy_for_object_type( 'category', 'attachment' );\n register_taxonomy_for_object_type( 'post_tag', 'attachment' );\n\n /*\n * Register custom post types. You can also move this code to a plugin.\n */\n /* Pinegrow generated Custom Post Types Begin */\n\n register_post_type('service', array(\n\t\t'labels' => \n\t\t\tarray(\n\t\t\t\t'name' => __( 'Services', 'pluton' ),\n\t\t\t\t'singular_name' => __( 'Service', 'pluton' )\n\t\t\t),\n\t\t'public' => true,\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'custom-fields', 'revisions', 'page-attributes' ),\n\t\t'show_in_menu' => true\n\t));\n\n register_post_type('ours_testemonials', array(\n\t\t'labels' => \n\t\t\tarray(\n\t\t\t\t'name' => __( 'ours Testemonials', 'pluton' ),\n\t\t\t\t'singular_name' => __( 'Testemonial', 'pluton' )\n\t\t\t),\n\t\t'public' => true,\n\t\t'supports' => array( 'title', 'editor', 'thumbnail' ),\n\t\t'show_in_menu' => true\n\t));\n\n /* Pinegrow generated Custom Post Types End */\n\n /*\n * Register custom taxonomies. You can also move this code to a plugin.\n */\n /* Pinegrow generated Taxonomies Begin */\n\n /* Pinegrow generated Taxonomies End */\n\n}", "title": "" }, { "docid": "1a9675d74b322b6cf90e26599c948228", "score": "0.64977217", "text": "public function load_post_types() {\r\n\t\t$post_types = array();\r\n\r\n\t\t// built in public post types\r\n\t\tforeach ( get_post_types( array( '_builtin' => true, 'public' => true ), 'objects', 'and' ) as $key => $post_type ) {\r\n\t\t\tif ( $key !== 'attachment' )\r\n\t\t\t\t$post_types[$key] = $post_type->labels->name;\r\n\t\t}\r\n\r\n\t\t// public custom post types\r\n\t\tforeach ( get_post_types( array( '_builtin' => false, 'public' => true ), 'objects', 'and' ) as $key => $post_type ) {\r\n\t\t\t$post_types[$key] = $post_type->labels->name;\r\n\t\t}\r\n\r\n\t\t// sort post types alphabetically with their keys\r\n\t\tasort( $post_types, SORT_STRING );\r\n\r\n\t\t$this->post_types = $post_types;\r\n\t}", "title": "" }, { "docid": "f292b1eaeeb44071a14e526e410b4c25", "score": "0.6494428", "text": "function select_setup_post_type() {\n // register the \"book\" custom post type\n register_post_type( 'book', ['public' => 'true'] );\n}", "title": "" }, { "docid": "16ab8596c3188bcb37cbed3758b1f778", "score": "0.6459148", "text": "function init() {\n\t\t$collections = array(\n\t\t\t'name' => _x( 'Collections', 'post type general name', 'wplr-sync-collections' ),\n\t\t\t'singular_name' => _x( 'Collection', 'post type singular name', 'wplr-sync-collections' ),\n\t\t\t'menu_name' => _x( 'Collections', 'admin menu', 'wplr-sync-collections' ),\n\t\t\t'name_admin_bar' => _x( 'Collection', 'add new on admin bar', 'wplr-sync-collections' ),\n\t\t\t'add_new' => _x( 'Add New', 'collection', 'wplr-sync-collections' ),\n\t\t\t'add_new_item' => __( 'Add New Collection', 'wplr-sync-collections' ),\n\t\t\t'new_item' => __( 'New Collection', 'wplr-sync-collections' ),\n\t\t\t'edit_item' => __( 'Edit Collection', 'wplr-sync-collections' ),\n\t\t\t'view_item' => __( 'View Collection', 'wplr-sync-collections' ),\n\t\t\t'all_items' => __( 'All Collections', 'wplr-sync-collections' ),\n\t\t\t'search_items' => __( 'Search Collections', 'wplr-sync-collections' ),\n\t\t\t'parent_item_colon' => __( 'Parent Collections:', 'wplr-sync-collections' ),\n\t\t\t'not_found' => __( 'No collections found.', 'wplr-sync-collections' ),\n\t\t\t'not_found_in_trash' => __( 'No collections found in Trash.', 'wplr-sync-collections' )\n\t\t);\n\t\t$args = array(\n\t\t\t'labels' \t\t=> $collections,\n\t\t\t'public' \t\t=> true,\n\t\t\t'publicly_queryable' \t\t=> true,\n\t\t\t'show_ui' \t\t=> true,\n\t\t\t'show_in_menu' \t\t=> true,\n\t\t\t'query_var' \t\t=> true,\n\t\t\t'rewrite' \t\t=> array( 'slug' => 'collection' ),\n\t\t\t'has_archive' \t\t=> true,\n\t\t\t'hierarchical' \t\t=> true,\n\t\t\t'capability_type'\t\t \t\t=> 'post',\n\t\t\t'map_meta_cap'\t\t\t \t\t=> true,\n\t\t\t'menu_position' \t\t=> 10,\n\t\t\t'menu_icon' => 'dashicons-camera',\n\t\t\t'supports'\t\t\t\t\t\t\t=> array( 'title', 'editor', 'thumbnail' )\n\t\t);\n\t\tregister_post_type( 'collection', $args );\n\t}", "title": "" }, { "docid": "981af6a2a246102caa85a77764045905", "score": "0.64531356", "text": "function create_post_type() {\n\t// Register news tax\n\t// register_taxonomy('news_type', array('news'), \n\t// \tarray(\n\t// \t\t'hierarchical' => true,\n\t// \t\t'labels' => array(\n\t// \t\t\t'name' => __('News Types'),\n\t// \t\t\t'singular_name' => __('News Type'),\n\t// \t\t\t'add_new_item' => __('Add News Type')\n\t// \t\t),\t\t\t\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' => 'news', 'with_front' => false),\n\t// \t)\n\t// );\n\n\t// \tregister_taxonomy('org_level', array('people'), array(\n\t// \t\t'hierarchical' => true,\n\t// \t\t'labels' => array(\n\t// \t\t\t'name' => __('Org Level'),\n\t// \t\t\t'singular_name' => __('Org Level'),\n\t// \t\t\t'add_new_item' => __('Add Org Level')\n\t// \t\t),\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' => 'org', 'with_front' => false),\n\t// \t)\n\t// );\n\n\t// Custom post types\n\t// register_post_type('people',\n\t// \tarray(\n\t// \t\t'labels' => array(\n\t// \t\t\t'name' => __('People'),\n\t// \t\t\t'singular_name' => __('Person')\n\t// \t\t),\n\t// \t\t'public' => true,\n\t// \t\t'has_archive' => true,\n\t// \t\t'menu_position'=> 4,\n\t// \t\t'rewrite' => array('slug' => 'people', 'with_front' => false),\n\t// \t\t'supports' => array('title', 'thumbnail', 'excerpt', 'editor', 'author'),\n\t// \t\t'menu_icon'=> 'dashicons-universal-access',\n\t// \t\t'exclude_from_search' => false,\n\t// \t\t'publicly_queryable'=> true,\n\t// \t\t'show_in_nav_menus'=> true,\n\t// \t\t'query_var' => true,\n\t// \t\t'taxonomies' => array('org_level')\n\t// \t)\n\t// );\n\n\t// register_post_type('news',\n\t// \tarray(\n\t// \t\t'labels' => array(\n\t// \t\t\t'name' => __('News'),\n\t// \t\t\t'singular_name' => __('News')\n\t// \t\t),\n\t// \t\t'public' => true,\n\t// \t\t'has_archive' => false,\n\t// \t\t'menu_position'=> 4,\n\t// \t\t'rewrite' => array('slug' => 'press/%news_type%', 'with_front' => false),\n\t// \t\t'supports' => array('title', 'thumbnail', 'excerpt', 'editor', 'author'),\n\t// \t\t'menu_icon'=> 'dashicons-media-document',\n\t// \t\t'exclude_from_search' => false,\n\t// \t\t'publicly_queryable'=> true,\n\t// \t\t'show_in_nav_menus'=> true,\n\t// \t\t'query_var' => true,\n\t// \t\t'taxonomies' => array('news_type')\n\t// \t)\n\t// );\n}", "title": "" }, { "docid": "4365fe43568dd8fbf80ff7d687f7e497", "score": "0.6440522", "text": "abstract protected function get_default_post_types();", "title": "" }, { "docid": "2deeb94c4406cd61a2060d11b75197ed", "score": "0.64355886", "text": "function custom_post_types() {\n\n \tregister_post_type( 'info_facts',\n\t\t\t\tarray(\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t\t'name' => __( 'Infographic Facts' ),\n\t\t\t\t\t\t'singular_name' => __( 'Infographic Fact' ),\n\t\t\t\t\t\t'add_new' => __( 'Add New' ),\n\t\t\t\t\t\t'add_new_item' => __( 'Add New Infographic Fact' ),\n\t\t\t\t\t\t'edit_item' => __( 'Edit Infographic Fact' ),\n\t\t\t\t\t\t'new_item' => __( 'New Infographic Fact' ),\n\t\t\t\t\t\t'view_item' => __( 'View Infographic Fact' ),\n\t\t\t\t\t\t'not_found' => __( 'Sorry, we couldn\\'t find the Infographic Fact you are looking for.' )\n\t\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t'exclude_from_search' => true,\n\t//\t\t\t'menu_icon' => get_template_directory_uri() . '/img/icons/en.gif',\n\t//\t\t\t'show_in_menu' => false,\n\t\t\t\t'menu_position' => 14,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'hierarchical' => true, \n\t\t\t\t'capability_type' => 'post',\n\t\t\t\t'rewrite' => array( 'slug' => 'fact' ),\n\t\t\t\t'supports' => array( 'title', 'editor', 'thumbnail')\n\t\t\t\t)\n\t\t\t);\n \t \tregister_post_type( 'team_members',\n\t\t\t\tarray(\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t\t'name' => __( 'Team Members' ),\n\t\t\t\t\t\t'singular_name' => __( 'Team Member' ),\n\t\t\t\t\t\t'add_new' => __( 'Add New' ),\n\t\t\t\t\t\t'add_new_item' => __( 'Add New Team Member' ),\n\t\t\t\t\t\t'edit_item' => __( 'Edit Team Member' ),\n\t\t\t\t\t\t'new_item' => __( 'New Team Member' ),\n\t\t\t\t\t\t'view_item' => __( 'View Team Member' ),\n\t\t\t\t\t\t'not_found' => __( 'Sorry, we couldn\\'t find the Team Member you are looking for.' )\n\t\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t'exclude_from_search' => true,\n\t//\t\t\t'menu_icon' => get_template_directory_uri() . '/img/icons/en.gif',\n\t//\t\t\t'show_in_menu' => false,\n\t\t\t\t'menu_position' => 14,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'hierarchical' => true, \n\t\t\t\t'capability_type' => 'post',\n\t\t\t\t'rewrite' => array( 'slug' => 'fact' ),\n\t\t\t\t'supports' => array( 'title', 'editor', 'thumbnail')\n\t\t\t\t)\n\t\t\t);\n\n \n}", "title": "" }, { "docid": "42c94e8b582230e90ed4618a92eebfab", "score": "0.64213705", "text": "function __construct() {\n\t\t$this->get_type_name();\n\t\t//$this->set_type_name();\n\t}", "title": "" }, { "docid": "6d94316e3873137a63b256b5612727d8", "score": "0.6408934", "text": "function register_post_types()\n{\n // GET CPTUI Fields\n require \"config/cptui-settings.php\";\n}", "title": "" }, { "docid": "a921c3faaadcbf987db82ebad2e4ab27", "score": "0.6394533", "text": "public function posttypes() {\n\t\trequire_once($this->get_filepath('includes').'posttypes.php');\n\t}", "title": "" }, { "docid": "eb9c9e7d0ae7a92a815e30516a434be7", "score": "0.63859487", "text": "public function before_update_post_type( array $data ) {\n\t\t$this->show_in_graphql = isset( $data['cpt_custom_post_type']['show_in_graphql'] ) ? $data['cpt_custom_post_type']['show_in_graphql'] : false;\n\t\t$this->graphql_single_name = isset( $data['cpt_custom_post_type']['graphql_single_name'] ) ? \\WPGraphQL\\Utils\\Utils::format_type_name( $data['cpt_custom_post_type']['graphql_single_name'] ) : '';\n\t\t$this->graphql_plural_name = isset( $data['cpt_custom_post_type']['graphql_plural_name'] ) ? \\WPGraphQL\\Utils\\Utils::format_type_name( $data['cpt_custom_post_type']['graphql_plural_name'] ) : '';\n\t}", "title": "" }, { "docid": "6040344ff2426d8d0c65d4a36f19c712", "score": "0.6358006", "text": "public static function init() {\n\n\t\t$labels\t = array(\n\t\t\t'name'\t\t\t\t => _x( 'Items', 'Post Type General Name', 'bookpress' ),\n\t\t\t'singular_name'\t\t => _x( 'Item', 'Post Type Singular Name', 'bookpress' ),\n\t\t\t'menu_name'\t\t\t => __( 'Collection', 'bookpress' ),\n\t\t\t'parent_item_colon'\t => __( 'Parent Item:', 'bookpress' ),\n\t\t\t'all_items'\t\t\t => __( 'All Items', 'bookpress' ),\n\t\t\t'view_item'\t\t\t => __( 'View Item', 'bookpress' ),\n\t\t\t'add_new_item'\t\t => __( 'Add New Item', 'bookpress' ),\n\t\t\t'add_new'\t\t\t => __( 'Add New', 'bookpress' ),\n\t\t\t'edit_item'\t\t\t => __( 'Edit Item', 'bookpress' ),\n\t\t\t'update_item'\t\t => __( 'Update Item', 'bookpress' ),\n\t\t\t'search_items'\t\t => __( 'Search Item', 'bookpress' ),\n\t\t\t'not_found'\t\t\t => __( 'Item not found', 'bookpress' ),\n\t\t\t'not_found_in_trash' => __( 'Item not found in Trash', 'bookpress' ),\n\t\t);\n\t\t$rewrite = array(\n\t\t\t'slug'\t\t => 'acervo',\n\t\t\t'with_front' => true,\n\t\t\t'pages'\t\t => true,\n\t\t\t'feeds'\t\t => false,\n\t\t);\n\t\t$args\t = array(\n\t\t\t'label'\t\t\t\t\t => __( 'item', 'bookpress' ),\n\t\t\t'description'\t\t\t => __( 'Library items', 'bookpress' ),\n\t\t\t'labels'\t\t\t\t => $labels,\n\t\t\t'supports'\t\t\t\t => array( 'title', 'editor', 'excerpt', 'thumbnail', 'post-formats', 'comments', ),\n\t\t\t'hierarchical'\t\t\t => false,\n\t\t\t'public'\t\t\t\t => true,\n\t\t\t'show_ui'\t\t\t\t => true,\n\t\t\t'show_in_menu'\t\t\t => true,\n\t\t\t'show_in_nav_menus'\t\t => false,\n\t\t\t'show_in_admin_bar'\t\t => true,\n\t\t\t'menu_position'\t\t\t => 5,\n\t\t\t'can_export'\t\t\t => true,\n\t\t\t'has_archive'\t\t\t => true,\n\t\t\t'exclude_from_search'\t => false,\n\t\t\t'publicly_queryable'\t => true,\n\t\t\t'rewrite'\t\t\t\t => $rewrite,\n\t\t\t'capability_type'\t\t => 'post',\n\t\t\t'taxonomies'\t\t\t => array( 'category', 'post_tag' ),\n\t\t);\n\t\tregister_post_type( 'item', $args );\n\t}", "title": "" }, { "docid": "9cc1b60b46f664633fcd5dd9eb36234c", "score": "0.6357986", "text": "public function define_post_types() {\n\n // Return if vc_set_default_editor_post_types doesn't exist\n if ( ! function_exists( 'vc_set_default_editor_post_types' ) ) {\n return;\n }\n\n // Set default post types for the VC\n vc_set_default_editor_post_types( array( 'page', 'portfolio', 'staff' ) );\n\n }", "title": "" }, { "docid": "0187859e4d4e61729cac744facf86612", "score": "0.6351154", "text": "function __construct( $post_type = '', $taxonomy = '', $taxonomy_slug = '', $taxonomy_labels = array() ) {\t\t\r\n\t\t$this->post_type = $post_type;\r\n\t\t$this->taxonomy = $taxonomy;\r\n\t\t$this->taxonomy_slug = $taxonomy_slug;\r\n\t\t$this->taxonomy_labels = $taxonomy_labels;\r\n\t}", "title": "" }, { "docid": "2d6411197158b8e2ac507c1dac6230c7", "score": "0.63474673", "text": "public function init()\n {\n $this->dateType = new MongoDateType();\n $this->idType = new MongoIdType();\n }", "title": "" }, { "docid": "245323096327f927224053f8d99d6f44", "score": "0.63405913", "text": "public function meta_box_setup() {\n $post_types = get_post_types();\n\n foreach ( $post_types as $post_type ) {\n\n if ( $post_type == 'page' ) {\n continue;\n }\n\n add_meta_box(\n 'primary_category',\n 'Choose Primary Category',\n array( $this, 'meta_box_content' ),\n $post_type,\n 'side',\n 'core'\n );\n }\n }", "title": "" }, { "docid": "cf958e125f5329afbec688b72b7bb1e8", "score": "0.6340119", "text": "function settings_post_types_option() {\n global $edit_flow;\n $edit_flow->settings->helper_option_custom_post_type( $this->module );\n }", "title": "" }, { "docid": "b5e617e6be403a4519c17eb494a29ae3", "score": "0.63364756", "text": "public function init()\n {\n add_filter('bam_get_ads_types', [$this, 'registerType']);\n add_filter('bam_get_ads_templates', [$this, 'registerTemplate']);\n add_action('bam_pick_ads_attributes', [$this, 'addMetaboxAttributes']);\n add_action('bam_save_pick_ad', [$this, 'saveAttributes'], 10, 2);\n add_action('admin_notices', [$this, 'displayErrorNotice']);\n add_action('wp_enqueue_scripts', [$this, 'enqueueScripts']);\n }", "title": "" }, { "docid": "dd35044b3549ec8e7164795ef063b93a", "score": "0.633287", "text": "public static function initialize() {\r\n\t\tself::_add_taxonomy_support();\r\n\t}", "title": "" }, { "docid": "e02c7921e04dc840f2f30aec597bd489", "score": "0.6324422", "text": "public function create_post_type() {\n\n\t\t\t$this->register_post_type( $this->get_args() );\n\n\t\t}", "title": "" }, { "docid": "67a77370fb79ba5543380a791244e4ef", "score": "0.6319603", "text": "public function action_init() {\n\t\tregister_post_type( $this->post_type, array(\n\t\t\t'label' => __( 'Timeline', 'eth-timeline' ),\n\t\t\t'labels' => array(\n\t\t\t\t'name' => __( 'Timeline', 'eth-timeline' ),\n\t\t\t\t'singular_name' => __( 'Timeline', 'eth-timeline' ),\n\t\t\t\t'menu_name' => __( 'Timeline', 'eth-timeline' ),\n\t\t\t\t'all_items' => __( 'All Entries', 'eth-timeline' ),\n\t\t\t\t'add_new' => __( 'Add New', 'eth-timeline' ),\n\t\t\t\t'add_new_item' => __( 'Add New', 'eth-timeline' ),\n\t\t\t\t'edit_item' => __( 'Edit Entry', 'eth-timeline' ),\n\t\t\t\t'new_item' => __( 'New Entry', 'eth-timeline' ),\n\t\t\t\t'view_item' => __( 'View Entry', 'eth-timeline' ),\n\t\t\t\t'items_archive' => __( 'Entries List', 'eth-timeline' ),\n\t\t\t\t'search_items' => __( 'Search Timeline Entries', 'eth-timeline' ),\n\t\t\t\t'not_found' => __( 'No entries found', 'eth-timeline' ),\n\t\t\t\t'not_found_in_trash' => __( 'No trashed entries', 'eth-timeline' ),\n\t\t\t\t'parent_item_colon' => __( 'Entries:', 'eth-timeline' ),\n\t\t\t),\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => false,\n\t\t\t'query_var' => false,\n\t\t\t'has_archive' => false,\n\t\t\t'exclude_from_search' => true,\n\t\t\t'show_in_nav_menus' => false,\n\t\t\t'show_in_admin_bar' => true,\n\t\t\t'rewrite' => false,\n\t\t\t'delete_with_user' => false,\n\t\t\t'supports' => array(\n\t\t\t\t'title',\n\t\t\t\t'editor',\n\t\t\t\t'author',\n\t\t\t)\n\t\t) );\n\n\t\tadd_shortcode( 'eth-timeline', array( $this, 'do_shortcode' ) );\n\t}", "title": "" }, { "docid": "3dadaed8feb0bbd684c53607f18e9939", "score": "0.63167065", "text": "public function init()\n {\n \tadd_action( 'init', array($this,'register_slider_post_type') );\n \tadd_shortcode( 'VowelWebSlider', array($this,'VowelWebSlider') );\n \tadd_action( 'wp_enqueue_scripts', array($this,'child_enqueue_styles'));\n }", "title": "" }, { "docid": "6d04f056156b7730134c2491a9d1b02e", "score": "0.6315633", "text": "public function listing_taxonomies_init() {\n\t\t\t$object_taxonomies = get_object_taxonomies( $this->post_type );\n\n\t\t\tif ( has_filter( 'learndash-admin-taxonomy-filters-display' ) ) {\n\t\t\t\t/**\n\t\t\t\t * Filters admin settings taxonomy filters list.\n\t\t\t\t *\n\t\t\t\t * @deprecated 3.2.3 Use {@see 'learndash_listing_taxonomies'} instead.\n\t\t\t\t *\n\t\t\t\t * @param array $object_taxonomies An array of the names or objects of all taxonomies of all the listing post types.\n\t\t\t\t * @param array $post_types An array of listing post types.\n\t\t\t\t */\n\t\t\t\t$object_taxonomies = apply_filters_deprecated(\n\t\t\t\t\t'learndash-admin-taxonomy-filters-display',\n\t\t\t\t\tarray( $object_taxonomies, $this->post_type ),\n\t\t\t\t\t'3.2.3',\n\t\t\t\t\t'learndash_listing_taxonomies'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Filters admin listing table taxonomy filters.\n\t\t\t *\n\t\t\t * @since 3.2.3\n\t\t\t *\n\t\t\t * @param array $object_taxonomies An array of the names or objects of all taxonomies of all the listing post types.\n\t\t\t * @param array $post_type Listing table post type.\n\t\t\t */\n\t\t\t$object_taxonomies = apply_filters( 'learndash_listing_taxonomies', $object_taxonomies, $this->post_type );\n\n\t\t\tif ( ( ! empty( $object_taxonomies ) ) && ( is_array( $object_taxonomies ) ) ) {\n\t\t\t\tforeach ( $object_taxonomies as $taxonomy_slug ) {\n\n\t\t\t\t\tif ( $this->hide_empty_taxonomy( $taxonomy_slug ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( 'category' === $taxonomy_slug ) {\n\t\t\t\t\t\t$query_arg = 'cat'; // Used for WP_Query filtering\n\t\t\t\t\t\t$field_name = 'category_name'; // Used for Selector name\n\t\t\t\t\t\t$field_id = 'category_name'; // Used for Selector ID\n\t\t\t\t\t} elseif ( 'post_tag' === $taxonomy_slug ) {\n\t\t\t\t\t\t$query_arg = 'tag_id'; // Used for WP_Query filtering\n\t\t\t\t\t\t$field_name = 'tag'; // Used for Selector name\n\t\t\t\t\t\t$field_id = 'tag_id'; // Used for Selector ID\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$query_arg = $taxonomy_slug;\n\t\t\t\t\t\t$field_name = $taxonomy_slug;\n\t\t\t\t\t\t$field_id = $taxonomy_slug;\n\t\t\t\t\t}\n\t\t\t\t\t$this->selectors[ $taxonomy_slug ] = array(\n\t\t\t\t\t\t'type' => 'taxonomy',\n\t\t\t\t\t\t'taxonomy' => $taxonomy_slug,\n\t\t\t\t\t\t'selected' => '',\n\t\t\t\t\t\t'field_name' => $field_name,\n\t\t\t\t\t\t'field_id' => $field_id,\n\t\t\t\t\t\t'listing_query_function' => array( $this, 'listing_filter_by_taxonomy' ),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f364eb3dc629addc206779434db68772", "score": "0.6313979", "text": "public function check_post_types() {\n\t\t$all_post_types = Kiwi_Social_Share_Helper::get_custom_post_types();\n\t\tforeach ( $all_post_types as $k => $v ) {\n\t\t\t$this->post_types[] = $k;\n\t\t}\n\n\t\tif ( ! $this->global ) {\n\t\t\t$this->post_types = Kiwi_Social_Share_Helper::get_setting_value( 'custom_meta_boxes_posttypes_list', array() );\n\t\t}\n\t}", "title": "" }, { "docid": "4445e1e095b7859e464f56d67f4a4e31", "score": "0.63052845", "text": "public function post_types() {\n \t//'show_in_nav_menus' => true,\n\t\t\tregister_post_type('session', \n\t\t\t\tarray(\n\t\t\t\t'label' => 'Sessions',\n\t\t\t\t'description' => 'This is used to created session to be used with scheduling active classes.',\n\t\t\t\t'public' => true,\n\t\t\t\t'show_ui' => false,\n\t\t\t\t'show_in_menu' => true,\n\t\t\t\t'capability_type' => 'page',\n\t\t\t\t'map_meta_cap' => true,\n\t\t\t\t'hierarchical' => true,\n\t\t\t\t'rewrite' => array('slug' => 'session', 'with_front' => true),\n\t\t\t\t'query_var' => true,\n\t\t\t\t'menu_position' => '5',\n\t\t\t\t'menu_icon' => $this->plugin_img_url.'png/24/schedule.png',\n\t\t\t\t'supports' => array('title','custom-fields','revisions','thumbnail','page-attributes'),\n\t\t\t\t'labels' => array (\n\t\t\t\t 'name' => 'Sessions',\n\t\t\t\t 'singular_name' => 'Session',\n\t\t\t\t 'menu_name' => 'Sessions',\n\t\t\t\t 'add_new' => 'Add Session',\n\t\t\t\t 'add_new_item' => 'Add New Session',\n\t\t\t\t 'edit' => 'Edit',\n\t\t\t\t 'edit_item' => 'Edit Session',\n\t\t\t\t 'new_item' => 'New Session',\n\t\t\t\t 'view' => 'View Session',\n\t\t\t\t 'view_item' => 'View Session',\n\t\t\t\t 'search_items' => 'Search Sessions',\n\t\t\t\t 'not_found' => 'No Sessions Found',\n\t\t\t\t 'not_found_in_trash' => 'No Sessions Found in Trash',\n\t\t\t\t 'parent' => 'Parent Session',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_post_type('instructor', \n\t\t\t\tarray(\n\t\t\t\t'label' => 'Instructors',\n\t\t\t\t'description' => '',\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'show_in_nav_menus' => true,\n\t\t\t\t'capability_type' => 'page',\n\t\t\t\t'map_meta_cap' => true,\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'rewrite' => array('slug' => 'instructor', 'with_front' => true),\n\t\t\t\t'query_var' => true,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'menu_position' => '5',\n\t\t\t\t'menu_icon' => $this->plugin_img_url.'png/24/person.png',\n\t\t\t\t'supports' => array('title','excerpt','custom-fields','revisions','thumbnail'),\n\t\t\t\t'labels' => array (\n\t\t\t\t 'name' => 'Instructors',\n\t\t\t\t 'singular_name' => 'Instructor',\n\t\t\t\t 'menu_name' => 'Instructors',\n\t\t\t\t 'add_new' => 'Add Instructor',\n\t\t\t\t 'add_new_item' => 'Add New Instructor',\n\t\t\t\t 'edit' => 'Edit',\n\t\t\t\t 'edit_item' => 'Edit Instructor',\n\t\t\t\t 'new_item' => 'New Instructor',\n\t\t\t\t 'view' => 'View Instructor',\n\t\t\t\t 'view_item' => 'View Instructor',\n\t\t\t\t 'search_items' => 'Search Instructors',\n\t\t\t\t 'not_found' => 'No Instructors Found',\n\t\t\t\t 'not_found_in_trash' => 'No Instructors Found in Trash',\n\t\t\t\t 'parent' => 'Parent Instructor',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_post_type('course', \n\t\t\t\tarray(\n\t\t\t\t'label' => 'Courses',\n\t\t\t\t'description' => '',\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'show_in_nav_menus' => true,\n\t\t\t\t'capability_type' => 'page',\n\t\t\t\t'map_meta_cap' => true,\n\t\t\t\t'hierarchical' => true,\n\t\t\t\t'rewrite' => array('slug' => 'course', 'with_front' => true),\n\t\t\t\t'query_var' => true,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'menu_position' => '5',\n\t\t\t\t'menu_icon' => $this->plugin_img_url.'png/24/filing.png',\n\t\t\t\t'supports' => array('title','editor','custom-fields','revisions','thumbnail','page-attributes'),\n\t\t\t\t'labels' => array (\n\t\t\t\t 'name' => 'Courses',\n\t\t\t\t 'singular_name' => 'Course',\n\t\t\t\t 'menu_name' => 'Courses',\n\t\t\t\t 'add_new' => 'Add Course',\n\t\t\t\t 'add_new_item' => 'Add New Course',\n\t\t\t\t 'edit' => 'Edit',\n\t\t\t\t 'edit_item' => 'Edit Course',\n\t\t\t\t 'new_item' => 'New Course',\n\t\t\t\t 'view' => 'View Course',\n\t\t\t\t 'view_item' => 'View Course',\n\t\t\t\t 'search_items' => 'Search Courses',\n\t\t\t\t 'not_found' => 'No Courses Found',\n\t\t\t\t 'not_found_in_trash' => 'No Courses Found in Trash',\n\t\t\t\t 'parent' => 'Parent Course',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n \tregister_post_type('student_directory', \n \t\tarray(\n\t\t\t\t'label' => 'Student Directory',\n\t\t\t\t'description' => '',\n\t\t\t\t'public' => false,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_in_menu' => true,\n\t\t\t\t'capability_type' => 'page',\n\t\t\t\t'map_meta_cap' => true,\n\t\t\t\t'hierarchical' => true,\n\t\t\t\t'rewrite' => array('slug' => 'student_directory', 'with_front' => true),\n\t\t\t\t'query_var' => true,\n\t\t\t\t'exclude_from_search' => true,\n\t\t\t\t'menu_position' => '5',\n\t\t\t\t'menu_icon' => $this->plugin_img_url.'png/24/directory.png',\n\t\t\t\t'supports' => array('title','custom-fields','revisions','thumbnail','page-attributes'),\n\t\t\t\t'labels' => array (\n\t\t\t\t 'name' => 'Student Directory',\n\t\t\t\t 'singular_name' => 'Student',\n\t\t\t\t 'menu_name' => 'Student Directory',\n\t\t\t\t 'add_new' => 'Add Student',\n\t\t\t\t 'add_new_item' => 'Add New Student',\n\t\t\t\t 'edit' => 'Edit',\n\t\t\t\t 'edit_item' => 'Edit Student',\n\t\t\t\t 'new_item' => 'New Student',\n\t\t\t\t 'view' => 'View Student',\n\t\t\t\t 'view_item' => 'View Student',\n\t\t\t\t 'search_items' => 'Search Student Directory',\n\t\t\t\t 'not_found' => 'No Student Directory Found',\n\t\t\t\t 'not_found_in_trash' => 'No Student Directory Found in Trash',\n\t\t\t\t 'parent' => 'Parent Student',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_post_type('assignment', \n\t\t\t\tarray(\n\t\t\t\t'label' => 'Assignments',\n\t\t\t\t'description' => '',\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'show_in_nav_menus' => true,\n\t\t\t\t'capability_type' => 'page',\n\t\t\t\t'map_meta_cap' => true,\n\t\t\t\t'hierarchical' => true,\n\t\t\t\t'rewrite' => array('slug' => 'assignment', 'with_front' => true),\n\t\t\t\t'query_var' => true,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'menu_position' => '5',\n\t\t\t\t'menu_icon' => $this->plugin_img_url.'png/24/assignment.png',\n\t\t\t\t'supports' => array('title','editor','custom-fields','revisions','thumbnail','page-attributes'),\n\t\t\t\t'labels' => array (\n\t\t\t\t 'name' => 'Assignments',\n\t\t\t\t 'singular_name' => 'Assignment',\n\t\t\t\t 'menu_name' => 'Assignments',\n\t\t\t\t 'add_new' => 'Add Assignment',\n\t\t\t\t 'add_new_item' => 'Add New Assignment',\n\t\t\t\t 'edit' => 'Edit',\n\t\t\t\t 'edit_item' => 'Edit Assignment',\n\t\t\t\t 'new_item' => 'New Assignment',\n\t\t\t\t 'view' => 'View Assignment',\n\t\t\t\t 'view_item' => 'View Assignment',\n\t\t\t\t 'search_items' => 'Search Assignments',\n\t\t\t\t 'not_found' => 'No Assignments Found',\n\t\t\t\t 'not_found_in_trash' => 'No Assignments Found in Trash',\n\t\t\t\t 'parent' => 'Parent Assignment',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_post_type('lecture', \n\t\t\t\tarray(\n\t\t\t\t'label' => 'Lectures',\n\t\t\t\t'description' => '',\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'show_in_nav_menus' => true,\n\t\t\t\t'capability_type' => 'page',\n\t\t\t\t'map_meta_cap' => true,\n\t\t\t\t'hierarchical' => true,\n\t\t\t\t'rewrite' => array('slug' => 'lecture', 'with_front' => true),\n\t\t\t\t'query_var' => true,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'menu_position' => '5',\n\t\t\t\t'menu_icon' => $this->plugin_img_url.'png/24/lecture.png',\n\t\t\t\t'supports' => array('title','editor','custom-fields','revisions','thumbnail','page-attributes'),\n\t\t\t\t'labels' => array (\n\t\t\t\t 'name' => 'Lectures',\n\t\t\t\t 'singular_name' => 'Lecture',\n\t\t\t\t 'menu_name' => 'Lectures',\n\t\t\t\t 'add_new' => 'Add Lecture',\n\t\t\t\t 'add_new_item' => 'Add New Lecture',\n\t\t\t\t 'edit' => 'Edit',\n\t\t\t\t 'edit_item' => 'Edit Lecture',\n\t\t\t\t 'new_item' => 'New Lecture',\n\t\t\t\t 'view' => 'View Lecture',\n\t\t\t\t 'view_item' => 'View Lecture',\n\t\t\t\t 'search_items' => 'Search Lectures',\n\t\t\t\t 'not_found' => 'No Lectures Found',\n\t\t\t\t 'not_found_in_trash' => 'No Lectures Found in Trash',\n\t\t\t\t 'parent' => 'Parent Lecture',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_post_type('timeline', \n\t\t\t\tarray(\n\t\t\t\t'label' => 'Timeline',\n\t\t\t\t'description' => '',\n\t\t\t\t'public' => true,\n\t\t\t\t'show_ui' => false,\n\t\t\t\t'show_in_menu' => false,\n\t\t\t\t'capability_type' => 'page',\n\t\t\t\t'map_meta_cap' => true,\n\t\t\t\t'hierarchical' => true,\n\t\t\t\t'rewrite' => array('slug' => 'timeline', 'with_front' => true),\n\t\t\t\t'query_var' => true,\n\t\t\t\t'menu_position' => '5',\n\t\t\t\t'supports' => array('title','editor','custom-fields','revisions','thumbnail','page-attributes'),\n\t\t\t\t'labels' => array (\n\t\t\t\t 'name' => 'Timeline',\n\t\t\t\t 'singular_name' => 'Timeline',\n\t\t\t\t 'menu_name' => 'Timeline',\n\t\t\t\t 'add_new' => 'Add Timeline',\n\t\t\t\t 'add_new_item' => 'Add New Timeline',\n\t\t\t\t 'edit' => 'Edit',\n\t\t\t\t 'edit_item' => 'Edit Timeline',\n\t\t\t\t 'new_item' => 'New Timeline',\n\t\t\t\t 'view' => 'View Timeline',\n\t\t\t\t 'view_item' => 'View Timeline',\n\t\t\t\t 'search_items' => 'Search Timeline',\n\t\t\t\t 'not_found' => 'No Timeline Found',\n\t\t\t\t 'not_found_in_trash' => 'No Timeline Found in Trash',\n\t\t\t\t 'parent' => 'Parent Timeline',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_post_type('schedule', \n\t\t\t\tarray(\n\t\t\t\t'label' => 'Schedules',\n\t\t\t\t'description' => '',\n\t\t\t\t'public' => true,\n\t\t\t\t'show_ui' => false,\n\t\t\t\t'show_in_menu' => false,\n\t\t\t\t'capability_type' => 'page',\n\t\t\t\t'map_meta_cap' => true,\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'rewrite' => array('slug' => 'schedule', 'with_front' => true),\n\t\t\t\t'query_var' => true,\n\t\t\t\t'menu_position' => '5',\n\t\t\t\t'supports' => array('title','custom-fields','revisions','page-attributes'),\n\t\t\t\t'labels' => array (\n\t\t\t\t 'name' => 'Schedules',\n\t\t\t\t 'singular_name' => 'Schedule',\n\t\t\t\t 'menu_name' => 'Schedules',\n\t\t\t\t 'add_new' => 'Add Schedule',\n\t\t\t\t 'add_new_item' => 'Add New Schedule',\n\t\t\t\t 'edit' => 'Edit',\n\t\t\t\t 'edit_item' => 'Edit Schedule',\n\t\t\t\t 'new_item' => 'New Schedule',\n\t\t\t\t 'view' => 'View Schedule',\n\t\t\t\t 'view_item' => 'View Schedule',\n\t\t\t\t 'search_items' => 'Search Schedules',\n\t\t\t\t 'not_found' => 'No Schedules Found',\n\t\t\t\t 'not_found_in_trash' => 'No Schedules Found in Trash',\n\t\t\t\t 'parent' => 'Parent Schedule',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\t/**\n\t\t\t *\t Taxonomy\n\t\t\t*/\n\t\t\tregister_taxonomy( 'course_start_date',\n\t\t\t\tarray(\n\t\t\t \t0 => 'course',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'Start Date',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => false,\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'Start Date',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t); \n\t\t\tregister_taxonomy( 'course_status',\n\t\t\t\tarray(\n\t\t\t \t0 => 'course',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'Course Status',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => true,\n\t\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'Course Status',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_taxonomy( 'course_instructor_na',\n\t\t\t\tarray(\n\t\t\t \t0 => 'course',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'Instructor',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => true,\n\t\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'Instructor',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_taxonomy( 'course_days_na',\n\t\t\t\tarray(\n\t\t\t\t 0 => 'course',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'Course Days',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => true,\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'Course Day',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_taxonomy( 'course_days_nu',\n\t\t\t\tarray(\n\t\t\t\t 0 => 'course',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'Course Day Numbers',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => false,\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'Course Day Number',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_taxonomy( '_instructor_na_lecture_active', \n\t\t\t\tarray(\n\t\t\t \t0 => 'lecture',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'Active Instructor',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => true,\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'Active Instructor',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_taxonomy( '_instructor_nu_lecture_active',\n\t\t\t\tarray(\n\t\t\t \t0 => 'lecture',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'Instructor',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => false,\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'Instructor',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_taxonomy( '_instructor_na_lecture', \n\t\t\t\tarray(\n\t\t\t \t0 => 'lecture',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'Instructor',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => false,\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'Instructor',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_taxonomy( '_instructor_nu_lecture',\n\t\t\t\tarray(\n\t\t\t \t0 => 'lecture',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'Instructor',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => false,\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'Instructor',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_taxonomy( '_course_na_lecture',\n\t\t\t\tarray(\n\t\t\t \t0 => 'lecture',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'Course',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => true,\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'Course',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_taxonomy( '_course_nu_lecture',\n\t\t\t\tarray(\n\t\t\t \t0 => 'lecture',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'Course',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => false,\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'Course',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_taxonomy( '_instructor_na_assignment_active', \n\t\t\t\tarray(\n\t\t\t \t0 => 'assignment',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'Active Instructor',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => true,\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'Active Instructor',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_taxonomy( '_instructor_nu_assignment_active',\n\t\t\t\tarray(\n\t\t\t \t0 => 'assignment',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'A Instructor',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => false,\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'A Instructor',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_taxonomy( '_instructor_na_assignment',\n\t\t\t\tarray(\n\t\t\t \t0 => 'assignment',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'Instructor',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => false,\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'Instructor',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_taxonomy( '_instructor_nu_assignment',\n\t\t\t\tarray(\n\t\t\t \t0 => 'assignment',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'Instructor',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => false,\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'Instructor',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_taxonomy( '_course_na_assignment',\n\t\t\t\tarray(\n\t\t\t \t0 => 'assignment',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'Course',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => true,\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'Course',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t) \n\t\t\t);\n\t\t\tregister_taxonomy( '_course_nu_assignment',\n\t\t\t\tarray(\n\t\t\t\t 0 => 'assignment',\n\t\t\t\t),\n\t\t\t\tarray( 'hierarchical' => false,\n\t\t\t\t\t'label' => 'Course',\n\t\t\t\t\t'show_ui' => false,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'show_admin_column' => false,\n\t\t\t\t\t'labels' => array(\n\t\t\t\t\t 'search_items' => 'Course',\n\t\t\t\t\t 'popular_items' => '',\n\t\t\t\t\t 'all_items' => '',\n\t\t\t\t\t 'parent_item' => '',\n\t\t\t\t\t 'parent_item_colon' => '',\n\t\t\t\t\t 'edit_item' => '',\n\t\t\t\t\t 'update_item' => '',\n\t\t\t\t\t 'add_new_item' => '',\n\t\t\t\t\t 'new_item_name' => '',\n\t\t\t\t\t 'separate_items_with_commas' => '',\n\t\t\t\t\t 'add_or_remove_items' => '',\n\t\t\t\t\t 'choose_from_most_used' => '',\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t); \n\n }", "title": "" }, { "docid": "219f471584b30b52725ab82c6b40ebef", "score": "0.6295666", "text": "function mpfy_plugin_init() {\n\tinclude_once(MAPIFY_PLUGIN_DIR . '/options/post-types.php');\n\n\t// Flush rewrite rules after an update to make sure that the custom post types are included in rewrite rules\n\tif (get_option('mpfy_flush_required') === 'y') {\n\t\tupdate_option('mpfy_flush_required', 'n');\n\n\t\tif (function_exists('flush_rewrite_rules')) {\n\t\t\tflush_rewrite_rules();\n\t\t} else {\n\t\t\tadd_action('wp', 'flush_rewrite_rules');\n\t\t}\n\t}\n\n\t// enqueue generic dependencies\n\twp_enqueue_script('jquery');\n}", "title": "" }, { "docid": "eb0784a7f1849c7478088905a19dd420", "score": "0.62899035", "text": "function catch_register_post_types() {\n // Blog / Posts\n unregister_taxonomy_for_object_type( 'post_tag', 'post' );\n unregister_taxonomy_for_object_type( 'category', 'post' );\n remove_post_type_support( 'post', 'comments' );\n\n $home_url = get_home_url();\n $bcn_options = get_option( 'bcn_options' );\n\n $story_root_id = $bcn_options['apost_story_root'];\n $story_slug = trim( str_ireplace( $home_url, '', get_permalink( $story_root_id ) ), '/' );\n\n $team_root_id = $bcn_options['apost_team_root'];\n $team_slug = trim( str_ireplace( $home_url, '', get_permalink( $team_root_id ) ), '/' );\n\n $event_root_id = $bcn_options['apost_event_root'];\n $event_slug = trim( str_ireplace( $home_url, '', get_permalink( $event_root_id ) ), '/' );\n\n $slugs = array(\n 'story' => $story_slug,\n 'team' => $team_slug,\n 'event' => $event_slug,\n 'story_id' => $story_root_id,\n 'team_id' => $team_root_id,\n 'event_id' => $event_root_id,\n );\n\n // Stories\n register_post_type( 'story', array(\n 'labels' => array(\n 'name' => 'Stories',\n 'singular_name' => 'Story',\n 'add_new_item' => 'Add New Story',\n 'edit_item' => 'Edit Story',\n ),\n 'description' => '',\n 'menu_icon' => 'dashicons-id-alt',\n 'public' => true,\n 'show_ui' => true,\n 'has_archive' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => false,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'post',\n 'capabilities' => array(),\n 'supports' => array( 'title', 'editor', 'revisions' ),\n 'map_meta_cap' => true,\n 'map_meta_cap' => true,\n 'hierarchical' => false,\n 'rewrite' => array(\n 'slug' => $slugs['story'],\n 'with_front' => false,\n ),\n 'query_var' => true,\n ) );\n\n // Team\n register_taxonomy( 'team_type', 'team', array(\n 'labels' => array(\n 'name' => 'Types',\n 'add_new_item' => 'Add New Type',\n 'new_item_name' => 'New Type',\n ),\n 'show_ui' => true,\n 'show_tagcloud' => false,\n 'show_admin_column' => true,\n 'hierarchical' => true,\n 'rewrite' => array(\n 'slug' => $slugs['team'] . '/type',\n 'with_front' => false,\n ),\n ) );\n\n register_post_type( 'team', array(\n 'labels' => array(\n 'name' => 'Team',\n 'singular_name' => 'Team Member',\n 'add_new_item' => 'Add New Team Member',\n 'edit_item' => 'Edit Team Member',\n ),\n 'description' => '',\n 'menu_icon' => 'dashicons-groups',\n 'public' => true,\n 'show_ui' => true,\n 'has_archive' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => false,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'post',\n 'capabilities' => array(),\n 'supports' => array( 'title', 'editor', 'revisions' ),\n 'map_meta_cap' => true,\n 'map_meta_cap' => true,\n 'hierarchical' => false,\n 'rewrite' => array(\n 'slug' => $slugs['team'],\n 'with_front' => false,\n ),\n 'query_var' => true,\n ) );\n\n\n //Event \n\n register_post_type( 'event', array(\n 'labels' => array(\n 'name' => 'Events',\n 'singular_name' => 'Event',\n 'add_new_item' => 'Add New Event',\n 'edit_item' => 'Edit Event',\n ),\n 'description' => '',\n 'menu_icon' => 'dashicons-tickets-alt',\n 'public' => true,\n 'show_ui' => true,\n 'has_archive' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => false,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'post',\n 'capabilities' => array(),\n 'supports' => array( 'title', 'editor', 'revisions' ),\n 'map_meta_cap' => true,\n 'map_meta_cap' => true,\n 'hierarchical' => false,\n 'rewrite' => array(\n 'slug' => $slugs['event'],\n 'with_front' => false,\n ),\n 'query_var' => true,\n ) );\n\n register_taxonomy_for_object_type( 'team_type', 'team' );\n\n // Callouts\n register_post_type( 'callout', array(\n 'labels' => array(\n 'name' => 'Callouts',\n 'singular_name' => 'Callout',\n 'add_new_item' => 'Add New Callout',\n 'edit_item' => 'Edit Callout',\n ),\n 'description' => '',\n 'menu_icon' => 'dashicons-format-aside',\n 'public' => true,\n 'show_ui' => true,\n 'has_archive' => false,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => false,\n 'exclude_from_search' => true,\n 'publicly_queryable' => false,\n 'capability_type' => 'post',\n 'capabilities' => array(),\n 'supports' => array( 'title' ),\n 'map_meta_cap' => true,\n 'map_meta_cap' => true,\n 'hierarchical' => false,\n 'rewrite' => false,\n 'query_var' => true,\n ) );\n\n $old_slugs = get_option( 'catch_post_type_slugs' );\n if ( empty( $old_slugs ) || (\n $slugs['story'] != $old_slugs['story'] ||\n $slugs['team'] != $old_slugs['team'] ||\n $slugs['event'] != $old_slugs['event']\n ) ) {\n flush_rewrite_rules();\n update_option( 'catch_post_type_slugs', $slugs );\n }\n}", "title": "" }, { "docid": "7410b05200fa96a83d269e6357f978fd", "score": "0.6288134", "text": "function cone_register_post_types() {\n // Custom post types should be registered here\n}", "title": "" }, { "docid": "84fc31d07ebe4d78f49050549f467018", "score": "0.6285424", "text": "public function __construct() {\n\n // TODO: Edit the calls here to only include the ones you want, or add more\n\n // Admin page calls:\n add_action( 'init', array( $this, 'registerPostType' ) );\n add_action( 'admin_menu', array( $this, 'addAdminMenu' ) ); \n\n // Add Javascript and CSS for admin screens\n add_action('admin_enqueue_scripts', array($this,'enqueueAdmin'));\n\n // Add Javascript and CSS for front-end display\n add_action('wp_enqueue_scripts', array($this,'enqueue'));\n\n $this->load_dependencies();\n }", "title": "" }, { "docid": "b30474548736f37d3919a90d6444905f", "score": "0.6283446", "text": "function aerospace_post_types() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Types', 'Taxonomy General Name', 'aerospace' ),\n\t\t'singular_name' => _x( 'Type', 'Taxonomy Singular Name', 'aerospace' ),\n\t\t'menu_name' => __( 'Types', 'aerospace' ),\n\t\t'all_items' => __( 'Types', 'aerospace' ),\n\t\t'parent_item' => __( 'Type', 'aerospace' ),\n\t\t'parent_item_colon' => __( 'Type:', 'aerospace' ),\n\t\t'new_item_name' => __( 'New Type', 'aerospace' ),\n\t\t'add_new_item' => __( 'Add Type', 'aerospace' ),\n\t\t'edit_item' => __( 'Edit Type', 'aerospace' ),\n\t\t'update_item' => __( 'Update Type', 'aerospace' ),\n\t\t'view_item' => __( 'View Type', 'aerospace' ),\n\t\t'separate_items_with_commas' => __( 'Separate types with commas', 'aerospace' ),\n\t\t'add_or_remove_items' => __( 'Add or remove types', 'aerospace' ),\n\t\t'choose_from_most_used' => __( 'Choose from the most used', 'aerospace' ),\n\t\t'popular_items' => __( 'Popular Types', 'aerospace' ),\n\t\t'search_items' => __( 'Search Types', 'aerospace' ),\n\t\t'not_found' => __( 'Not Found', 'aerospace' ),\n\t\t'no_terms' => __( 'No types', 'aerospace' ),\n\t\t'items_list' => __( 'Types list', 'aerospace' ),\n\t\t'items_list_navigation' => __( 'Types list navigation', 'aerospace' ),\n\t);\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'hierarchical' => true,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_typecloud' => true,\n\t\t'show_in_rest'\t\t\t\t\t\t\t => true\n\t);\n\tregister_taxonomy( 'post_types', array( 'post' ), $args );\n}", "title": "" }, { "docid": "d8baad77a0bb42e77237e82858357e2e", "score": "0.6283354", "text": "function post_type() {\n register_post_type( self::$post_type, array(\n 'labels' => array(\n 'name' => __( 'Downloads', 'sdw' ),\n 'singular_name' => __( 'Download', 'sdw' ),\n 'add_new_item' => __( 'New Download', 'sdw' ),\n 'edit_item' => __( 'Edit Download', 'sdw' ),\n ),\n 'public' => true,\n 'map_meta_cap' => true,\n 'rewrite' => array( 'slug' => self::$post_type ),\n 'supports' => array( 'title', 'editor', 'thumbnail' ),\n 'taxonomies' => array( 'downloadcat' ),\n 'register_meta_box_cb' => array( __CLASS__, 'meta_boxes' ),\n 'show_ui' => true,\n 'has_archive' => self::$post_type_slug\n ) );\n register_taxonomy(\n 'downloadcat',\n 'download',\n array(\n 'label' => __( 'Downloads Category', 'vivanista' ),\n 'show_ui' => true,\n 'query_var' => true,\n 'hierarchical' => true,\n 'rewrite' => array( 'slug' => 'download-category' ),\n )\n );\n }", "title": "" }, { "docid": "cbb45e00ae97d8891d1885b54a8fbf6d", "score": "0.6281767", "text": "function o_klubie_init() {\n\tregister_post_type( 'o-klubie', array(\n\t\t'labels' => array(\n\t\t\t'name' => __( 'O klubies', 'motyw' ),\n\t\t\t'singular_name' => __( 'O klubie', 'motyw' ),\n\t\t\t'all_items' => __( 'Wszystkie o klubie', 'motyw' ),\n\t\t\t'archives' => __( 'O klubie Archives', 'motyw' ),\n\t\t\t'attributes' => __( 'O klubie Attributes', 'motyw' ),\n\t\t\t'insert_into_item' => __( 'Insert into o klubie', 'motyw' ),\n\t\t\t'uploaded_to_this_item' => __( 'Uploaded to this o klubie', 'motyw' ),\n\t\t\t'featured_image' => _x( 'Featured Image', 'o-klubie', 'motyw' ),\n\t\t\t'set_featured_image' => _x( 'Set featured image', 'o-klubie', 'motyw' ),\n\t\t\t'remove_featured_image' => _x( 'Remove featured image', 'o-klubie', 'motyw' ),\n\t\t\t'use_featured_image' => _x( 'Use as featured image', 'o-klubie', 'motyw' ),\n\t\t\t'filter_items_list' => __( 'Filter o klubies list', 'motyw' ),\n\t\t\t'items_list_navigation' => __( 'O klubies list navigation', 'motyw' ),\n\t\t\t'items_list' => __( 'O klubies list', 'motyw' ),\n\t\t\t'new_item' => __( 'New O klubie', 'motyw' ),\n\t\t\t'add_new' => __( 'Add New', 'motyw' ),\n\t\t\t'add_new_item' => __( 'Add New O klubie', 'motyw' ),\n\t\t\t'edit_item' => __( 'Edit O klubie', 'motyw' ),\n\t\t\t'view_item' => __( 'View O klubie', 'motyw' ),\n\t\t\t'view_items' => __( 'View O klubies', 'motyw' ),\n\t\t\t'search_items' => __( 'Search o klubies', 'motyw' ),\n\t\t\t'not_found' => __( 'No o klubies found', 'motyw' ),\n\t\t\t'not_found_in_trash' => __( 'No o klubies found in trash', 'motyw' ),\n\t\t\t'parent_item_colon' => __( 'Parent O klubie:', 'motyw' ),\n\t\t\t'menu_name' => __( 'O klubie', 'motyw' ),\n\t\t),\n\t\t'public' => true,\n\t\t'hierarchical' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'supports' => array( 'title', 'editor' ),\n\t\t'has_archive' => true,\n\t\t'rewrite' => true,\n\t\t'query_var' => true,\n\t\t'menu_icon' => 'dashicons-admin-post',\n\t\t'show_in_rest' => true,\n\t\t'rest_base' => 'o-klubie',\n\t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n\t) );\n\n}", "title": "" }, { "docid": "59424c0075ca502afd2b8fc29079d351", "score": "0.62814015", "text": "function wpsight_taxonomy_types_register() {\n\t\n\t$types_name\t\t= apply_filters( 'wpsight_taxonomy_types_name', __( 'Listing Types', 'wpsight' ) );\n\t$types_singular\t= apply_filters( 'wpsight_taxonomy_types_singular', __( 'Listing Type', 'wpsight' ) );\n\t\n\t$types_labels = array(\n\t\t'name' \t\t\t\t\t\t => $types_name,\n\t\t'singular_name' \t\t\t => $types_singular,\n\t\t'menu_name' \t\t \t\t => _x( 'Listing Types', 'taxonomy types', 'wpsight' ),\n 'all_items' \t\t \t\t => _x( 'All Listing Types', 'taxonomy types', 'wpsight' ),\n 'edit_item' \t\t \t\t => _x( 'Edit Listing Type', 'taxonomy types', 'wpsight' ),\n 'view_item' \t\t \t\t => _x( 'View Listing Type', 'taxonomy types', 'wpsight' ),\n 'update_item' \t\t \t\t => _x( 'Update Listing Type', 'taxonomy types', 'wpsight' ),\n 'add_new_item' \t\t \t\t => _x( 'Add New Listing Type', 'taxonomy types', 'wpsight' ),\n 'new_item_name' \t \t\t => _x( 'New Listing Type Name', 'taxonomy types', 'wpsight' ),\n 'parent_item' \t\t \t\t => _x( 'Parent Listing Type', 'taxonomy types', 'wpsight' ),\n 'parent_item_colon' \t\t => _x( 'Parent Listing Type:', 'taxonomy types', 'wpsight' ),\n 'search_items' \t\t \t\t => _x( 'Search listing types', 'taxonomy types', 'wpsight' ),\n 'popular_items' \t \t\t => _x( 'Popular Listing Types', 'taxonomy types', 'wpsight' ),\n 'separate_items_with_commas' => _x( 'Separate listing types with commas', 'taxonomy types', 'wpsight' ),\n 'add_or_remove_items' \t\t => _x( 'Add or remove listing types', 'taxonomy types', 'wpsight' ),\n 'choose_from_most_used' \t => _x( 'Choose from the most used listing types', 'taxonomy types', 'wpsight' ),\n 'not_found' \t\t \t\t => _x( 'No listing type found', 'taxonomy types', 'wpsight' )\n\t);\n\t\n\t// Set args incl rewrite rules\n\n\t$types_args = array(\n\t\t'labels' \t => $types_labels,\n\t\t'hierarchical' => false,\n\t\t'capabilities' => array(\n\t\t\t'manage_terms' => 'edit_others_listings',\n 'edit_terms' => 'edit_others_listings',\n 'delete_terms' => 'edit_others_listings',\n\t\t\t'assign_terms' => 'edit_listings'\n\t\t),\n\t\t'rewrite' \t => array( \n\t\t\t'slug' \t\t => apply_filters( 'wpsight_rewrite_types_slug', 'type' ),\n\t\t\t'with_front' => false\n\t\t)\n\t);\n\t\n\t$types_args = apply_filters( 'wpsight_taxonomy_types_args', $types_args );\n\t\n\t// Register taxonomy\n\t\n\tregister_taxonomy( 'listing-type', array( wpsight_listing_post_type() ), $types_args );\n\n}", "title": "" }, { "docid": "6df3cd441f03c31071778929a68a1098", "score": "0.62790215", "text": "public function set_custom_fields($post_type){\n\n\t // When creating a new Post, register the meta fields\n\t switch ($post_type) {\n case 'clientstory' :ClientStory::add_meta_box(); break;\n case 'service' :Service::add_meta_box(); break;\n case 'faq' :FrequentlyAskedQuestion::add_meta_box(); break;\n case 'link' :Link::add_meta_box(); break;\n case 'perk' :Perk::add_meta_box(); break;\n case 'companyvalue' :CompanyValue::add_meta_box(); break;\n case 'location' :Location::add_meta_box(); break;\n case 'mindshare' :MindShare::add_meta_box(); break;\n case 'author'\t\t :Author::add_meta_box();\t\t\t\t\t break;\n }\n\t}", "title": "" }, { "docid": "8ded7839973b134a2f8a05c14cd97cf5", "score": "0.62768805", "text": "public function __construct()\n\t\t{\n\t\t\t// Register custom post types\n\t\t\trequire_once(sprintf(\"%s/post-types/custom_post_types.php\", dirname(__FILE__)));\n\t\t\t$Production = new CustomPostTypes(array('production' => 'productions'), array(), 'dashicons-exerpt-view');\n\t\t\t$Person = new CustomPostTypes(array('person' => 'people'), array('role' => 'roles'), 'dashicons-admin-users');\n\n\t\t\t// Register shortcodes\n\t\t\trequire_once(sprintf(\"%s/shortcodes.php\", dirname(__FILE__)));\n\t\t\t$HeartsAndEyes_CustomShortcodes = new HeartsAndEyes_CustomShortcodes();\n\n\t\t\t// Register stylesheet\n\t\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'register_plugin_styles' ) );\n\n\t\t\tadd_action( 'dashboard_glance_items', array( $this, 'admin_dashboard_widget' ) );\n\t\t}", "title": "" }, { "docid": "d91d25ae09f1b3716a7e093427d0b07c", "score": "0.62754536", "text": "function create_post_types() {\n\n\t// home listings\n\t$labels_homes = array(\n\t\t'name' => 'Home Listings',\n\t\t'singular_name' => 'Home Listing',\n\t\t'menu_name' => 'Home Listings',\n\t\t'name_admin_bar' => 'Home Listing',\n\t\t'archives' => 'Home Listing Archives',\n\t\t'all_items' => 'All Home Listings',\n\t\t'add_new_item' => 'Add New Home Listing',\n\t\t'add_new' => 'Add New Home Listing',\n\t\t'new_item' => 'New Home Listing',\n\t\t'edit_item' => 'Edit Home Listing',\n\t\t'update_item' => 'Update Home Listing',\n\t\t'view_item' => 'View Home Listing',\n\t\t'search_items' => 'Search Home Listings',\n\t\t'not_found' => 'Not found',\n\t\t'not_found_in_trash' => 'Not found in Trash',\n\t\t'featured_image' => 'Listing Image',\n\t\t'set_featured_image' => 'Set listing image',\n\t\t'remove_featured_image' => 'Remove listing image',\n\t\t'use_featured_image' => 'Use as listing image',\n\t\t'insert_into_item' => 'Insert into listing',\n\t\t'uploaded_to_this_item' => 'Uploaded to this listing',\n\t\t'items_list' => 'Home Listings list',\n\t\t'items_list_navigation' => 'Home Listings list navigation',\n\t\t'filter_items_list' => 'Filter Home Listings list',\n\t);\n\t$args_homes = array(\n\t\t'label' => 'Home Listings',\n\t\t'description' => 'Home Listings',\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'revisions' ),\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-hammer',\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'exclude_from_search' => false,\n\t\t'capability_type' => 'post',\n\t);\t\n\tregister_post_type( 'homes', $args_homes );\n\n\t// home listings\n\t$labels_plans = array(\n\t\t'name' => 'Home Plans',\n\t\t'singular_name' => 'Home Plan',\n\t\t'menu_name' => 'Home Plans',\n\t\t'name_admin_bar' => 'Home Plan',\n\t\t'archives' => 'Home Plan Archives',\n\t\t'all_items' => 'All Home Plans',\n\t\t'add_new_item' => 'Add New Home Plan',\n\t\t'add_new' => 'Add New Home Plan',\n\t\t'new_item' => 'New Home Plan',\n\t\t'edit_item' => 'Edit Home Plan',\n\t\t'update_item' => 'Update Home Plan',\n\t\t'view_item' => 'View Home Plan',\n\t\t'search_items' => 'Search Home Plans',\n\t\t'not_found' => 'Not found',\n\t\t'not_found_in_trash' => 'Not found in Trash',\n\t\t'items_list' => 'Home Plans list',\n\t\t'items_list_navigation' => 'Home Plans list navigation',\n\t\t'filter_items_list' => 'Filter Home Plans list',\n\t);\n\t$args_plans = array(\n\t\t'label' => 'Home Plans',\n\t\t'description' => 'Home Plans',\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'revisions' ),\n\t\t'taxonomies'\t\t\t=> array( 'neighborhood' ),\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-home',\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'exclude_from_search' => false,\n\t\t'capability_type' => 'post',\n\t);\t\n\tregister_post_type( 'plans', $args_plans );\n\n}", "title": "" }, { "docid": "22dbf413c09a4e96f1e22c933e3db22e", "score": "0.6266034", "text": "function sample_menu_init() {\n\tregister_post_type( 'sample_menu', array(\n\t\t'labels' => array(\n\t\t\t'name' => __( 'Sample Menus', 'util' ),\n\t\t\t'singular_name' => __( 'Sample Menu', 'util' ),\n\t\t\t'all_items' => __( 'All Sample Menus', 'util' ),\n\t\t\t'archives' => __( 'Sample Menu Archives', 'util' ),\n\t\t\t'attributes' => __( 'Sample Menu Attributes', 'util' ),\n\t\t\t'insert_into_item' => __( 'Insert into sample Menu', 'util' ),\n\t\t\t'uploaded_to_this_item' => __( 'Uploaded to this sample Menu', 'util' ),\n\t\t\t'featured_image' => _x( 'Featured Image', 'sample-Menu', 'util' ),\n\t\t\t'set_featured_image' => _x( 'Set featured image', 'sample-Menu', 'util' ),\n\t\t\t'remove_featured_image' => _x( 'Remove featured image', 'sample-Menu', 'util' ),\n\t\t\t'use_featured_image' => _x( 'Use as featured image', 'sample-Menu', 'util' ),\n\t\t\t'filter_items_list' => __( 'Filter sample Menus list', 'util' ),\n\t\t\t'items_list_navigation' => __( 'Sample Menus list navigation', 'util' ),\n\t\t\t'items_list' => __( 'Sample Menus list', 'util' ),\n\t\t\t'new_item' => __( 'New Sample Menu', 'util' ),\n\t\t\t'add_new' => __( 'Add New', 'util' ),\n\t\t\t'add_new_item' => __( 'Add New Sample Menu', 'util' ),\n\t\t\t'edit_item' => __( 'Edit Sample Menu', 'util' ),\n\t\t\t'view_item' => __( 'View Sample Menu', 'util' ),\n\t\t\t'view_items' => __( 'View Sample Menus', 'util' ),\n\t\t\t'search_items' => __( 'Search sample Menus', 'util' ),\n\t\t\t'not_found' => __( 'No sample Menus found', 'util' ),\n\t\t\t'not_found_in_trash' => __( 'No sample Menus found in trash', 'util' ),\n\t\t\t'parent_item_colon' => __( 'Parent Sample Menu:', 'util' ),\n\t\t\t'menu_name' => __( 'Sample Menus', 'util' ),\n\t\t),\n\t\t'public' => true,\n\t\t'hierarchical' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'supports' => array( 'title', 'editor' ),\n\t\t'has_archive' => 'events',\n\t\t'rewrite' => array('slug' => 'events/sample-menus', 'with_front' => false),\n\t\t'query_var' => true,\n\t\t'menu_icon' => 'dashicons-pressthis',\n\t\t'show_in_rest' => true,\n\t\t'rest_base' => 'sample-menu',\n\t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n\t));\n\n\t// create taxonomy for meals\n\tregister_taxonomy('event_types', 'sample_menu', array(\n\t// Hierarchical taxonomy (like categories)\n\t'hierarchical' => false,\n\t'show_admin_column' => true,\n\t'show_in_quick_edit' => true,\n\t'sort' => true,\n\t// This array of options controls the labels displayed in the WordPress Admin UI\n\t'labels' => array(\n\t 'name' => _x( 'Event Types', 'taxonomy general name' ),\n\t 'singular_name' => _x( 'Event Type', 'taxonomy singular name' ),\n\t 'search_items' => __( 'Search Event Types' ),\n\t 'all_items' => __( 'All Event Types' ),\n\t 'parent_item' => __( 'Parent Event Types' ),\n\t 'parent_item_colon' => __( 'Parent Event Type:' ),\n\t 'edit_item' => __( 'Edit Event Type' ),\n\t 'update_item' => __( 'Update Event Type' ),\n\t 'add_new_item' => __( 'Add New Event Type' ),\n\t 'new_item_name' => __( 'New Event Type Name' ),\n\t 'menu_name' => __( 'Event Types' ),\n\t),\n\t// Control the slugs used for this taxonomy\n\t'rewrite' => array(\n\t 'slug' => 'events', // This controls the base slug that will display before each term\n\t 'with_front' => false, // Don't display the category base before \"/locations/\"\n\t 'hierarchical' => false, // This will allow URL's like \"/locations/boston/cambridge/\"\n\t 'query_var' => true,\n\t 'show_in_rest' => true,\n\t\t'rest_base' => 'meal_type',\n\t\t'rest_controller_class' => 'WP_REST_Terms_Controller'\n\t ),\n\t));\n}", "title": "" }, { "docid": "fa1efbf7beb31234461e55f44876c304", "score": "0.6264448", "text": "public function create_types() {\n\n\t\t\t$labels = array(\n\t\t\t\t'name' => _x( 'Types', 'Taxonomy General Name', 'wps' ),\n\t\t\t\t'singular_name' => _x( 'Type', 'Taxonomy Singular Name', 'wps' ),\n\t\t\t\t'menu_name' => __( 'Types', 'wps' ),\n\t\t\t\t'all_items' => __( 'All Items', 'wps' ),\n\t\t\t\t'parent_item' => __( 'Parent Item', 'wps' ),\n\t\t\t\t'parent_item_colon' => __( 'Parent Item:', 'wps' ),\n\t\t\t\t'new_item_name' => __( 'New Item Name', 'wps' ),\n\t\t\t\t'add_new_item' => __( 'Add New Item', 'wps' ),\n\t\t\t\t'edit_item' => __( 'Edit Item', 'wps' ),\n\t\t\t\t'update_item' => __( 'Update Item', 'wps' ),\n\t\t\t\t'view_item' => __( 'View Item', 'wps' ),\n\t\t\t\t'separate_items_with_commas' => __( 'Separate items with commas', 'wps' ),\n\t\t\t\t'add_or_remove_items' => __( 'Add or remove items', 'wps' ),\n\t\t\t\t'choose_from_most_used' => __( 'Choose from the most used', 'wps' ),\n\t\t\t\t'popular_items' => __( 'Popular Items', 'wps' ),\n\t\t\t\t'search_items' => __( 'Search Items', 'wps' ),\n\t\t\t\t'not_found' => __( 'Not Found', 'wps' ),\n\t\t\t\t'no_terms' => __( 'No items', 'wps' ),\n\t\t\t\t'items_list' => __( 'Items list', 'wps' ),\n\t\t\t\t'items_list_navigation' => __( 'Items list navigation', 'wps' ),\n\t\t\t);\n\t\t\t$rewrite = array(\n\t\t\t\t'slug' => $this->post_type . '-type',\n\t\t\t\t'with_front' => true,\n\t\t\t\t'hierarchical' => false,\n\t\t\t);\n\t\t\t$args = array(\n\t\t\t\t'labels' => $labels,\n\t\t\t\t'hierarchical' => true,\n\t\t\t\t'public' => true,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_admin_column' => true,\n\t\t\t\t'show_in_nav_menus' => true,\n\t\t\t\t'show_tagcloud' => true,\n\t\t\t\t'rewrite' => $rewrite,\n\t\t\t\t'show_in_rest' => true,\n\t\t\t);\n\t\t\tregister_taxonomy( $this->post_type . '-type', array( $this->post_type ), $args );\n\n\t\t}", "title": "" }, { "docid": "c286408f35f2e7f1666e68ec089880be", "score": "0.6260306", "text": "function register_post_types(){\n\t\tglobal $CPT;\n\n\t\t// create custom post types\n\t\tforeach($CPT as $parent => $children){\n\t\t\t// register the parent page\n\t\t\t$args = $this->get_args($parent, 'page');\n\t\t\tregister_post_type($this->get_post_slug($parent), $args);\n\n\t\t\t// loop thru the children and register each\n\t\t\tforeach($children as $child){\n\t\t\t\t$args = $this->get_args($child, 'post', $parent);\n\t\t\t\tregister_post_type($this->get_post_slug($child), $args);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "dab3e7b1709f69033cff1579cb2c8efa", "score": "0.6251438", "text": "function rah_setup_post_types() {\n\n\t$hosts_labels = apply_filters( 'rah_hosts_labels', array(\n\t\t\t'name' => 'Hosts',\n\t\t\t'singular_name' => 'Host',\n\t\t\t'add_new' => __( 'Add Host', 'rah-hosts' ),\n\t\t\t'add_new_item' => __( 'Add Host', 'rah-hosts' ),\n\t\t\t'edit_item' => __( 'Edit Host', 'rah-hosts' ),\n\t\t\t'new_item' => __( 'New Host', 'rah-hosts' ),\n\t\t\t'all_items' => __( 'All Hosts', 'rah-hosts' ),\n\t\t\t'view_item' => __( 'View Host', 'rah-hosts' ),\n\t\t\t'search_items' => __( 'Search Hosts', 'rah-hosts' ),\n\t\t\t'not_found' => __( 'No hosts found', 'rah-hosts' ),\n\t\t\t'not_found_in_trash' => __( 'No hosts found in Trash', 'rah-hosts' ),\n\t\t\t'parent_item_colon' => '',\n\t\t\t'menu_name' => __( 'Hosts', 'rah-hosts' )\n\t\t) );\n\n\t$hosts_args = array(\n\t\t'labels' => $hosts_labels,\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_ui' => true,\n\t\t'menu_position' => 20,\n\t\t'menu_icon' => 'dashicons-businessman',\n\t\t'show_in_menu' => true,\n\t\t'query_var' => true,\n\t\t'map_meta_cap' => true,\n\t\t'has_archive' => true,\n\t\t'hierarchical' => false,\n\t\t'supports' => apply_filters( 'rah_hosts_supports', array( 'title', 'thumbnail', 'author', 'revisions', 'custom-fields' ) ),\n\t);\n\tregister_post_type( 'hosts', apply_filters( 'rah_host_post_type_args', $hosts_args ) );\n\n\tregister_taxonomy(\n\t\t'type',\n\t\t'hosts',\n\t\tarray(\n\t\t\t'label' => __( 'Host Types' ),\n\t\t\t'rewrite' => array( 'slug' => 'type' ),\n\t\t\t'hierarchical' => true\n\t\t)\n\t);\n\n\tregister_taxonomy(\n\t\t'buys',\n\t\t'hosts',\n\t\tarray(\n\t\t\t'label' => __( 'Buys' ),\n\t\t\t'rewrite' => array( 'slug' => 'buys' ),\n\t\t\t'hierarchical' => false,\n\t\t)\n\t);\n\n\t$reviews_labels = apply_filters( 'rah_reviews_labels', array(\n\t\t\t'name' => 'Reviews',\n\t\t\t'singular_name' => 'Review',\n\t\t\t'add_new' => __( 'Add Review', 'rah-hosts' ),\n\t\t\t'add_new_item' => __( 'Add Review', 'rah-hosts' ),\n\t\t\t'edit_item' => __( 'Edit Review', 'rah-hosts' ),\n\t\t\t'new_item' => __( 'New Review', 'rah-hosts' ),\n\t\t\t'all_items' => __( 'All Reviews', 'rah-hosts' ),\n\t\t\t'view_item' => __( 'View Review', 'rah-hosts' ),\n\t\t\t'search_items' => __( 'Search Reviews', 'rah-hosts' ),\n\t\t\t'not_found' => __( 'No reviews found', 'rah-hosts' ),\n\t\t\t'not_found_in_trash' => __( 'No reviews found in Trash', 'rah-hosts' ),\n\t\t\t'parent_item_colon' => '',\n\t\t\t'menu_name' => __( 'Reviews', 'rah-hosts' )\n\t\t) );\n\n\t$reviews_args = array(\n\t\t'labels' => $reviews_labels,\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_ui' => true,\n\t\t'menu_position' => 20,\n\t\t'menu_icon' => 'dashicons-star-filled',\n\t\t'show_in_menu' => true,\n\t\t'query_var' => true,\n\t\t'map_meta_cap' => true,\n\t\t'has_archive' => false,\n\t\t'hierarchical' => false,\n\t\t'exclude_from_search' => true,\n\t\t'supports' => apply_filters( 'rah_reviews_supports', array( 'comments', 'title', 'editor', 'thumbnail', 'author', 'revisions', 'custom-fields' ) ),\n\t);\n\tregister_post_type( 'reviews', apply_filters( 'rah_review_post_type_args', $reviews_args ) );\n\n\t$groups_labels = apply_filters( 'rah_groups_labels', array(\n\t\t\t'name' => 'Groups',\n\t\t\t'singular_name' => 'Group',\n\t\t\t'add_new' => __( 'Add Groups', 'rah-hosts' ),\n\t\t\t'add_new_item' => __( 'Add Group', 'rah-hosts' ),\n\t\t\t'edit_item' => __( 'Edit Group', 'rah-hosts' ),\n\t\t\t'new_item' => __( 'New Group', 'rah-hosts' ),\n\t\t\t'all_items' => __( 'All Groups', 'rah-hosts' ),\n\t\t\t'view_item' => __( 'View Group', 'rah-hosts' ),\n\t\t\t'search_items' => __( 'Search Groups', 'rah-hosts' ),\n\t\t\t'not_found' => __( 'No groups found', 'rah-hosts' ),\n\t\t\t'not_found_in_trash' => __( 'No groups found in Trash', 'rah-hosts' ),\n\t\t\t'parent_item_colon' => '',\n\t\t\t'menu_name' => __( 'Groups', 'rah-hosts' )\n\t\t) );\n\n\t$groups_args = array(\n\t\t'labels' => $groups_labels,\n\t\t'public' => true,\n\t\t'publicly_queryable' => true,\n\t\t'show_ui' => true,\n\t\t'menu_position' => 20,\n\t\t'menu_icon' => 'dashicons-groups',\n\t\t'show_in_menu' => true,\n\t\t'query_var' => true,\n\t\t'map_meta_cap' => true,\n\t\t'has_archive' => true,\n\t\t'hierarchical' => false,\n\t\t'supports' => apply_filters( 'rah_groups_supports', array( 'title', 'editor', 'thumbnail', 'author', 'revisions', 'custom-fields' ) ),\n\t);\n\tregister_post_type( 'groups', apply_filters( 'rah_groups_post_type_args', $groups_args ) );\n}", "title": "" }, { "docid": "15c5a9913f80019d59427cb0dbfa534d", "score": "0.62502867", "text": "public function register_post_type() {\n\t\tforeach ( $this -> _post_types as $pt ) {\n\t\t\t$pt['options']['label'] = $pt['label'];\n\t\t\tif ( !empty( $this -> _taxonomies ) ) {\n\t\t\t\t$taxonomies = [];\n\t\t\t\tforeach ( $this -> _taxonomies as $tax ) {\n\t\t\t\t\tif ( in_array( $pt['post_type'], $tax['post_types'] ) )\n\t\t\t\t\t\t$taxonomies[] = $tax['taxonomy'];\n\t\t\t\t}\n\t\t\t\tif ( !empty( $taxonomies ) ) {\n\t\t\t\t\t$pt['options'] = array_merge(\n\t\t\t\t\t\t$pt['options'],\n\t\t\t\t\t\t[ 'taxonomies' => $taxonomies ]\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tregister_post_type( $pt['post_type'], $pt['options'] );\n\t\t}\n\t}", "title": "" }, { "docid": "840cfdb7a0166cbcb0611cf22eabcc4b", "score": "0.6248522", "text": "function aletheme_get_post_types() {\n\treturn array(\n\t\t'tour' => array(\n\t\t\t'config' => array(\n\t\t\t\t'public' => true,\n\t\t\t\t'menu_position' => 20,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'supports'=> array(\n\t\t\t\t\t'title',\n\t\t\t\t\t'editor',\n\t\t\t\t\t'thumbnail',\n\t\t\t\t\t'comments',\n\t\t\t\t),\n\t\t\t\t'show_in_nav_menus'=> true,\n\t\t\t),\n\t\t\t'singular' => 'Tour',\n\t\t\t'multiple' => 'Tour',\n\t\t\t'columns' => array(\n\t\t\t\t'first_image',\n\t\t\t)\n\t\t),\n\t\t'hot_deals' => array(\n\t\t\t'config' => array(\n\t\t\t\t'public' => true,\n\t\t\t\t'menu_position' => 20,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'supports'=> array(\n\t\t\t\t\t'title',\n\t\t\t\t\t'editor',\n\t\t\t\t\t'thumbnail',\n\t\t\t\t\t'comments',\n\t\t\t\t),\n\t\t\t\t'show_in_nav_menus'=> true,\n\t\t\t),\n\t\t\t'singular' => 'Hot Deals',\n\t\t\t'multiple' => 'Hot Deals',\n\t\t\t'columns' => array(\n\t\t\t\t'first_image',\n\t\t\t)\n\t\t),\n\t\t'testimonial' => array(\n\t\t\t'config' => array(\n\t\t\t\t'public' => true,\n\t\t\t\t'menu_position' => 20,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'supports'=> array(\n\t\t\t\t\t'title',\n\t\t\t\t\t'thumbnail',\n\t\t\t\t\t'editor',\n\t\t\t\t\t'comments',\n\t\t\t\t),\n\t\t\t\t'show_in_nav_menus'=> true,\n\t\t\t),\n\t\t\t'singular' => 'Testimonial',\n\t\t\t'multiple' => 'Testimonials',\n\t\t\t'columns' => array(\n\t\t\t\t'first_image',\n\t\t\t)\n\t\t),\n\t\t'gallery' => array(\n\t\t\t'config' => array(\n\t\t\t\t'public' => true,\n\t\t\t\t'menu_position' => 20,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'supports'=> array(\n\t\t\t\t\t'title',\n\t\t\t\t\t'editor',\n\t\t\t\t\t'thumbnail',\n\t\t\t\t\t'comments',\n\t\t\t\t),\n\t\t\t\t'show_in_nav_menus'=> true,\n\t\t\t),\n\t\t\t'singular' => 'Gallery',\n\t\t\t'multiple' => 'Galleries',\n\t\t\t'columns' => array(\n\t\t\t\t'first_image',\n\t\t\t)\n\t\t),\n\t\t'team' => array(\n\t\t\t'config' => array(\n\t\t\t\t'public' => true,\n\t\t\t\t'menu_position' => 20,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'supports'=> array(\n\t\t\t\t\t'title',\n\t\t\t\t\t'editor',\n\t\t\t\t\t'thumbnail',\n\t\t\t\t\t'comments',\n\t\t\t\t),\n\t\t\t\t'show_in_nav_menus'=> true,\n\t\t\t),\n\t\t\t'singular' => 'Team',\n\t\t\t'multiple' => 'Team',\n\t\t\t'columns' => array(\n\t\t\t\t'first_image',\n\t\t\t)\n\t\t),\n\t);\n}", "title": "" } ]
f3963cc044961a57f0fd5c6de06ad386
Add the necessary information for a user logging in for the first time.
[ { "docid": "49393129789d52af6d8f161769d768c9", "score": "0.0", "text": "public function insertAdUser($attributes, $credentials)\n {\n $user = new \\App\\User;\n\n $user->username = $attributes['dn'];\n $user->givenname = $attributes['givenname'];\n $user->surname = $attributes['surname'];\n $user->email = $attributes['email'];\n $user->title = $attributes['title'];\n $user->user_type = 'Active Directory';\n\n return $user->save();\n }", "title": "" } ]
[ { "docid": "36be5b9855beb0412482ec4e3717cc70", "score": "0.6775143", "text": "protected function startup()\n {\n parent::startup();\n // pokud neni prihlaseny tak ho presmerujeme pryc\n if (!$this->getUser()->isLoggedIn())\n {\n\n if ($this->getUser()->getLogoutReason() === IUserStorage::INACTIVITY)\n {\n $this->flashMessage('Byl jste z důvodu dlouhé neaktivity odhlášen. Přihlašte se prosím znovu.');\n }\n\n $this->redirect('Sign:in', array(\n 'backlink' => $this->storeRequest()\n ));\n }\n\n if (!$this->getUser()->isAllowed($this->name, $this->action))\n {\n $this->flashMessage('Access denied');\n $this->redirect('Homepage:');\n }\n\n // nactu entitu prihlaseneho uzivatele\n $this->me = $this->getUser()->getIdentity();\n }", "title": "" }, { "docid": "49d32a288bcc27bbd6e47667b928f1c6", "score": "0.6753263", "text": "private function _fbUserInit()\n {\n $db = DataAccess::getInstance();\n //set temporary setting to NOT require pass to edit user info\n $db->set_site_setting('info_edit_require_pass', false, false, false);\n //also set temporary setting to NOT allow changing password\n $db->set_site_setting('info_edit_password_no_edit', 1, false, false);\n }", "title": "" }, { "docid": "3b5522351434696ea2f989d83f60443f", "score": "0.6746697", "text": "public function init() {\n $this->userLoggedIn();\n }", "title": "" }, { "docid": "e0887b5143b50b93e4878d9c137b028d", "score": "0.6719931", "text": "protected function startup()\n{\n\tparent::startup();\n\tif (!$this->getUser()->isLoggedIn()) {\n\t\t$this->redirect('Sign:in');\n\t}\n}", "title": "" }, { "docid": "609f06cb6c14253bb29f59b70fd283e1", "score": "0.66580194", "text": "public function initUser() {\n // $user = $_SESSION['user'] ?? null;\n // if (!$user) { \n $user = $this->getUserFromSession();\n // }\n if ($user) {\n $this->setUser($user);\n }\n }", "title": "" }, { "docid": "a0abb5b1a2f077cdca9d78b39b389639", "score": "0.6638747", "text": "public function login()\n {\n $this->recordAndApplyEvent(\n new UserHasLoggedIn($this->userId(), DateTime::now())\n );\n }", "title": "" }, { "docid": "d2055fc056f85f231267b435f1c220ad", "score": "0.6542727", "text": "public function memberAutoLoggedIn() {\n if ($_COOKIE['alc_enc']) {\n list($uid, $usedToken) = explode(':', $_COOKIE['alc_enc'], 2);\n\n // Update the DB entry, replace the old token/hash with the new one\n $this->updateTokenList($usedToken);\n } else\n $this->addToTokenList();\n }", "title": "" }, { "docid": "79c3b56a754452570755600843263056", "score": "0.65183574", "text": "public function loginUser() {\n SessionUtilities::createSession('User', $this->username);\n /* Added userType */\n $this->setUsersTypeInSession();\n }", "title": "" }, { "docid": "37ce37f75eb82e008ed4de445b25d724", "score": "0.65175647", "text": "public static function intro()\n {\n global $_G,$_E,$permission,$_config;\n\n $session_setting = session_get_cookie_params();\n session_set_cookie_params($session_setting[\"lifetime\"],$_E['SITEDIR']);\n session_start();\n\n $acctable = DB::tname('account');\n if (self::CheckToken('login')) {\n //load user data\n //$_COOKIE[$_config['cookie']['namepre'].'_uid'] is checked in userControl::checktoken\n $loginuid = self::GetCookie('uid');\n\n if ($sqldata = DB::fetch(\"SELECT * FROM `$acctable` \".\n 'WHERE `uid` = ?', [$loginuid])) {\n $_G = $sqldata;\n } else {\n LOG::msg(Level::Error, 'Caonnot Load login info from DB', $loginuid);\n $_G = $permission['guest'];\n }\n } else {\n // guest\n\n self::DeleteToken('login');\n $_G = $permission['guest'];\n }\n }", "title": "" }, { "docid": "b54a56da82bc7bd1a759684b2b48edf2", "score": "0.6450406", "text": "public function authInit()\n\t{\n\t\taddPageAction('/user', function()\n\t\t{\n\t\t\t$elem = null;\n\t\t\t$attr = getSettingValue('user-request');\n\n\t\t\tif(request()->has($attr))\n\t\t\t{\n\t\t\t\t$elem = request()->input($attr);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif(auth()->check())\n\t\t\t\t{\n\t\t\t\t\t$elem = auth()->user()->$attr;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$user = \\Models\\User::where($attr, '=', $elem)->first();\n\n\t\t\tif(!$user)\n\t\t\t{\n\t\t\t\treturn redirect()->back();\n\t\t\t}\n\n\t\t\treturn ['user' => $user];\n\t\t});\n\n\t\taddParseableElement('user', function(string $attribute)\n\t\t{\n\t\t\t$uid = null;\n\n\t\t\tif(request()->has('user'))\n\t\t\t{\n\t\t\t\t$uid = request()->input('user');\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif(auth()->check())\n\t\t\t\t{\n\t\t\t\t\t$uid = auth()->user()->uid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$user = \\Models\\User::where('uid', '=', $uid)->first();\n\n\t\t\tif(!$user)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn $user->$attribute;\n\t\t});\n\t}", "title": "" }, { "docid": "47a5a99d7befb8169c6a2fe1d0dad40f", "score": "0.6448276", "text": "public function onLoad()\r\n { \r\n // Pass on to parent function\r\n parent::onLoad();\r\n \r\n global $f;\r\n \r\n // User isn't logged in\r\n if (!$this->isLoggedIn())\r\n {\r\n // Check for cookies\r\n if (Cookie::exists('userInfo'))\r\n {\r\n // Grab cookie information\r\n list ($email, $password) = explode(':', Cookie::get('userInfo'));\r\n \r\n // Build query\r\n $f->db->query = \"SELECT * FROM {$this->table} WHERE email='$email' LIMIT 1\";\r\n\r\n // Query database and fetch row as object\r\n if ($row = $f->db->fetchRow())\r\n {\r\n // Make sure passwords match\r\n if ($row->password == $password)\r\n {\r\n // Register session\r\n Session::set('loggedIn', $row->id);\r\n }\r\n }\r\n }\r\n\r\n // User is not logged in\r\n else\r\n {\r\n // Do stuff\r\n }\r\n }\r\n \r\n // If the user is now logged in, update things\r\n if ($this->isLoggedIn())\r\n {\r\n // Update users IP and last_on time\r\n $this->_update();\r\n \r\n // Cache user data\r\n $this->_cacheData();\t\r\n }\r\n }", "title": "" }, { "docid": "45cfd65df6215cce0a5dd0f8005c72e5", "score": "0.64049786", "text": "function appthemes_first_login( $user_id ) {\n\tupdate_user_meta( $user_id, 'last_login', current_time( 'mysql' ) );\n}", "title": "" }, { "docid": "996fa61e23e1185a57434d67d5fc84c2", "score": "0.6403984", "text": "public function init()\n\t{\n\t\tif (method_exists(Yii::app(), 'getSession'))\n\t\t{\n\t\t\tif($this->getIsGuest() && $this->allowAutoLogin)\n\t\t\t\t$this->restoreFromCookie();\n\t\t\telse if($this->autoRenewCookie && $this->allowAutoLogin)\n\t\t\t\t$this->renewCookie();\n\t\t\tif($this->autoUpdateFlash)\n\t\t\t\t$this->updateFlash();\n\n\t\t\t$this->updateAuthStatus();\n\t\t}\n $this->setState('PLINTHUSER', true);\n\t}", "title": "" }, { "docid": "6005775ff4a37f5e18290ce681ee0697", "score": "0.63918173", "text": "public function onBeforeSecurityLogin()\n {\n if (Authenticator::get_default_authenticator() != 'SAMLAuthenticator') {\n return;\n }\n\n // by going to the URL Security/login?showloginform=1 we bypass the auto sign on\n if ($this->owner->request->getVar('showloginform') == 1) {\n return;\n }\n\n // if member is already logged in, don't auto-sign-on, this is most likely because\n // of unsufficient permissions.\n $member = Member::currentUser();\n if ($member && $member->exists()) {\n return;\n }\n\n // if there are form messages, don't auto-sign-on, this is most likely because of\n // login errors / failures or other notices.\n if (Session::get('FormInfo')) {\n // since FormInfo can be a \"nulled\" array, we have to check\n foreach (Session::get('FormInfo') as $form => $info) {\n foreach ($info as $name => $value) {\n if ($value !== null) {\n return;\n }\n }\n }\n }\n\n $backURL = Session::get('BackURL');\n if ($this->owner->request->getVar('BackURL')) {\n $backURL = $this->owner->request->getVar('BackURL');\n }\n\n $authenticator = Injector::inst()->create('SAMLAuthenticator');\n $authenticator->authenticate([\"BackURL\" => $backURL]);\n }", "title": "" }, { "docid": "c2dc863ce996dda623785f8a7c9ec77a", "score": "0.63790363", "text": "function initializeUser()\n {\n // If we have a uid construct a fUser Object for this user. This gets done *after* fSession is constructed.\n if ( ( isset($this->uid) ) && ( !is_object($this->fUser) ) )\n {\n $this->fDebug->add(\"Member ID #\" . $this->uid . \" found, creating fUser object\", 6);\n $this->fUser = new fUser($this->uid);\n }\n elseif ( $this->saveHashUserID !== NULL )\n {\n try\n {\n $this->fUser = new fUser($this->saveHashUserID);\n if ( $this->fUser->authenticateAgainstHash($this->saveHash) )\n {\n $this->fDebug->add(\"Found a user (\" . $this->fUser->id . \") for a 'Remember Me' cookie.\", 2);\n $this->fUser->lastActivity = strftime('%X %x');\n $this->authenticated = true;\n $this->uid = $this->fUser->id;\n } else {\n $this->fDebug->add(\"No user was found matching the saved hash.\",4);\n setcookie('rememberme', NULL, time() - 3600, '/');\n unset($_COOKIE['rememberme']);\n }\n } catch ( Exception $e ) {\n $e;\n $this->fDebug->add(\"No user was found matching the saved hash.\",4);\n setcookie('rememberme', NULL, time() - 3600, '/');\n unset($_COOKIE['rememberme']);\n }\n unset($this->saveHashUserID);\n }\n }", "title": "" }, { "docid": "874957508e92b60566b1baf02867c074", "score": "0.63572353", "text": "private function _populateUserdata()\n {\n $this->userdata = array();\n\n if ($this->logged_in) {\n $data = $this->getInfoArray();\n foreach ($data as $key => $value) {\n $this->userdata[$key] = $value;\n }\n }\n }", "title": "" }, { "docid": "57fff4865299484acdedd3709ae30524", "score": "0.6328219", "text": "public function complete_login()\n\t{\n\t\tif ($this->_loaded)\n\t\t{\n\t\t\t// Update the number of logins\n\t\t\t$this->logins_cnt = new Database_Expression('logins_cnt + 1');\n\n\t\t\t// Set the last login date\n\t\t\t$this->last_login_at = Date::formatted_time('now','Y-m-d H:i:s');\n\n\t\t\t// Set the last login IP\n\t\t\t$this->last_login_ip = ip2long( Arr::get($_SERVER, 'HTTP_X_REAL_IP', Arr::get($_SERVER, 'REMOTE_ADDR', 0)));\n\n\t\t\t// Save the user\n\t\t\t$this->update();\n\t\t}\n\t}", "title": "" }, { "docid": "01353992699514bb39ee90bcb48567c3", "score": "0.63213897", "text": "public function init()\n {\n global $c;\n\n if ( ! $c['Auth']->hasIdentity()) { // if user has not identity ? \n $c['Url']->redirect('membership/login'); // redirect user to login page\n }\n }", "title": "" }, { "docid": "5e45f856f278813952a44c2665e564dc", "score": "0.6309116", "text": "function _init_user_details() {\n\t\t\t\n\t\t\t$this->username\t\t = $this->Common_model->safe_html($this->input->post(\"username\"));\n\t\t\t$this->password \t = $this->Common_model->safe_html($this->input->post(\"password\"));\n\t\t\t$this->forced_login = $this->Common_model->safe_html($this->input->post(\"forced_login\"));\n\t\t}", "title": "" }, { "docid": "95e8e7019f6358adb61bb84a99ef7ea9", "score": "0.6302297", "text": "public function admin_init()\n\t{\n\t\tif ( $this->is_user_logged_in() ) {\n\t\t\t$this->log->update( $this->get_current_user_id() );\n\t\t}\n\t}", "title": "" }, { "docid": "6fe77778dd70648856fa381b3e7af521", "score": "0.629094", "text": "private function _initUser()\r\n {\r\n if (count($this->user_types_tables) && $this->module_user_type) {\r\n $this->_initAuthenticate();\r\n $this->authenticate->init_user();\r\n }\r\n }", "title": "" }, { "docid": "26ccbf34364e5b8efc83c022fae1ac2b", "score": "0.62582487", "text": "public function initialiseUser()\n {\n if (isset($_REQUEST['auth-token']) && $_REQUEST['auth-token'] && strlen($_REQUEST['auth-token']) == 8) {\n $user = User::loadFromAuthToken($_REQUEST['auth-token']);\n }\n\n // Try and use the cookie:\n if (!($user instanceof User)) {\n $username = Symphony::Cookie()->get('username');\n $password = Symphony::Cookie()->get('pass');\n $user = User::loadFromCredentials($username, $password, true);\n }\n\n if ($user instanceof User) {\n if ($user->login()) {\n self::$User = $user;\n }\n }\n\n // The credentials were invalid, remove them:\n else {\n Symphony::Cookie()->expire();\n }\n }", "title": "" }, { "docid": "169c09ac3622bc6d397781fad7ab46cc", "score": "0.62397313", "text": "function first_auth() {\r\n\t\tif ($this->bind_ldap()) {\r\n\t\t\t// check if user is in DB\r\n\t\t\tif ($this->fetch_db_data()) {\r\n\t\t\t\t// then good to go\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// find if the username exists\r\n\t\t\t\tif (!in_array($this->lang['login_username'], $this->current_user->errors) && $this->current_user->user_id > 0) {\r\n\t\t\t\t\t// find if password was updated\r\n\t\t\t\t\t// update database password\r\n\t\t\t\t\t$this->current_user->user_password = md5($this->password);\r\n\t\t\t\t\t$this->current_user->edit();\r\n\t\t\t\t}\r\n\t\t\t\t// find if the objectguid exists\r\n\t\t\t\telse if (isset($this->current_user->ldap_attributes->objectguid)\t&& \r\n\t\t\t\t\t\tis_array($this->current_user->ldap_attributes->objectguid)\t&& \r\n\t\t\t\t\t\t$this->current_user->get_record(\r\n\t\t\t\t\t\t\t\tarray('requirements' => \r\n\t\t\t\t\t\t\t\t\tarray('user_objectguid' => $this->current_user->ldap_attributes->objectguid[0])\r\n\t\t\t\t\t\t\t\t)) &&\r\n\t\t\t\t\t\t\t\t$this->current_user->user_id > 0) {\r\n\t\t\t\t\t// the user changed usernames, update username and password\r\n\t\t\t\t\t$this->current_user->user_username = $this->username;\r\n\t\t\t\t\t$this->current_user->user_password = md5($this->password);\r\n\t\t\t\t\t$this->current_user->edit();\r\n\t\t\t\t}\r\n\t\t\t\t// the user doesn't exists in the database yet\r\n\t\t\t\telse {\r\n\t\t\t\t\t// add the user to the database\r\n\t\t\t\t\t$this->current_user->user_username = $this->username;\r\n\t\t\t\t\t$this->current_user->user_password = md5($this->password);\r\n\t\t\t\t\t$this->current_user->user_level = 2;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (isset($this->current_user->ldap_attributes->objectguid) && is_array($this->current_user->ldap_attributes->objectguid)) {\r\n\t\t\t\t\t\t$this->current_user->user_objectguid = $this->current_user->ldap_attributes->objectguid[0];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (isset($this->current_user->ldap_attributes->sn) && is_array($this->current_user->ldap_attributes->sn)) {\r\n\t\t\t\t\t\t$this->current_user->user_last = $this->current_user->ldap_attributes->sn[0];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (isset($this->current_user->ldap_attributes->givenname) && is_array($this->current_user->ldap_attributes->givenname)) {\r\n\t\t\t\t\t\t$this->current_user->user_first = $this->current_user->ldap_attributes->givenname[0];\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->current_user->create(array('get_new_id' => true));\r\n\t\t\t\t\t//printer($this->current_user);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// try and auth again from the db\r\n\t\t\t\treturn $this->fetch_db_data();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse { // bind failed\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2815000469e06bd11b68a7b563d962d4", "score": "0.62346536", "text": "function loginCreate() {\n\n\t\teditMemberDetails(LOGIN_CREATE);\n\t\n\t}", "title": "" }, { "docid": "ef6580458cc3dcd1576c99e3e7e2caa4", "score": "0.62309074", "text": "public function onUserLogin($event)\n {\n $this->describeUserEventAction($event, 'User logged in', 'User ', 'logged in');\n //create online status\n $event->user->setCache(5);\n }", "title": "" }, { "docid": "9983e13e4f9375830c4f28bf32a21efc", "score": "0.6226604", "text": "protected function recordLogin() {\r\n\t\t\r\n\t\t$db = Loader::db();\r\n\t\t$uLastIP = $db->getOne(\"select uLastIP from Users where uID = ?\", array($this->uID));\r\n\t\t\r\n\t\t$this->saveConfig( 'last_ip', long2ip($uLastIP) );\r\n\t\t\r\n\t\t//call to parent\r\n\t\tparent::recordLogin();\r\n\t}", "title": "" }, { "docid": "ac6cab167208bec846737e3838cfe147", "score": "0.6222519", "text": "private function check_the_login(){\n\t\tif(isset($_SESSION['user_id'])){\n\t\t\t$this->user_id = $_SESSION['user_id'];\n\t\t\t$this->signed_in = true;\n\t\t}else{\n\t\t\tunset($this->user_id);\n\t\t\t$this->signed_in = false;\t\n\t\t}\t\n\t}", "title": "" }, { "docid": "8642ac453cd8d6322e0d0274deceb4ff", "score": "0.62013465", "text": "public function auto_login(): void {\n\t\t\t$users = get_users(\n\t\t\t\tarray(\n\t\t\t\t\t'role' => 'administrator',\n\t\t\t\t\t'orderby' => 'ID',\n\t\t\t\t)\n\t\t\t);\n\t\t\tif ( count( $users ) > 0 ) {\n\t\t\t\t$user = $users[0];\n\t\t\t\twp_set_auth_cookie( $user->ID, true, '' );\n\n\t\t\t\t// Set cookie for admin\n\t\t\t\t$this->set_cookie();\n\n\t\t\t\tdo_action( 'wp_login', $user->get( 'user_login' ), $user );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "26464d99677e885e37801293e7f5dddd", "score": "0.6199898", "text": "public function addLoginAttempt()\n {\n $this->userStorage->setLoginAttempts($this->userId, $this->getLoginAttempts() + 1);\n }", "title": "" }, { "docid": "4929be94b3f534eb73d0623256bc9b81", "score": "0.6192592", "text": "public function preLogin(ElggUser $user) {\n\n\t}", "title": "" }, { "docid": "117c5858a55160a2fd6cdf0e5f12e75d", "score": "0.6191652", "text": "public function loginWithSessionData()\n {\n $this->user_name = $_SESSION['user_name'];\n $this->user_email = $_SESSION['user_email'];\n\n // set logged in status to true, because we just checked for this:\n // !empty($_SESSION['user_name']) && ($_SESSION['user_logged_in'] == 1)\n // when we called this method (in the constructor)\n $this->user_is_logged_in = true;\n }", "title": "" }, { "docid": "275c53f8fe1cea677b114e9ddc527833", "score": "0.6190766", "text": "private function initUser()\n\t{\n\t\tif (self::env('cli', false)) {\n\t\t\t$argv = $this->getServer('argv', []);\n\t\t\t$this->user = new \\Orange\\Portal\\Core\\Model\\User(isset($argv[2]) ? intval($argv[2]) : null);\n\t\t} else {\n\t\t\tif ($this->session->cookieExists() && !is_null($this->session->get('uid'))) {\n\t\t\t\t$this->user = new \\Orange\\Portal\\Core\\Model\\User(intval($this->session->get('uid')));\n\t\t\t} else {\n\t\t\t\t$signin_login = $this->getPost('signin_login');\n\t\t\t\t$signin_password = $this->getPost('signin_password');\n\t\t\t\tif (!is_null($signin_login) && !is_null($signin_password)) {\n\t\t\t\t\t$tmp_user = new \\Orange\\Portal\\Core\\Model\\User('user_login', $signin_login);\n\t\t\t\t\tif ($tmp_user->id) {\n\t\t\t\t\t\tif ($tmp_user->verifyPassword($signin_password)) {\n\t\t\t\t\t\t\tif ($tmp_user->get('user_status') > 0) {\n\t\t\t\t\t\t\t\t$this->user = $tmp_user;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\\Orange\\Portal\\Core\\Model\\User::$auth_error = Lang::t('Account was blocked.');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\\Orange\\Portal\\Core\\Model\\User::$auth_error = Lang::t('Password is wrong.');\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\\Orange\\Portal\\Core\\Model\\User::$auth_error = Lang::t('Account was not found.');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (is_null(\\Orange\\Portal\\Core\\Model\\User::$auth_error) && $this->user && $this->user->id) {\n\t\t\t\t\t$this->session->set('uid', $this->user->id);\n\t\t\t\t} else {\n\t\t\t\t\t$this->user = new \\Orange\\Portal\\Core\\Model\\User();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8f27948f0f62dd0b596f603cf5d2aac2", "score": "0.6177357", "text": "public function init()\n {\n\t\tif (!Zend_Auth::getInstance()->hasIdentity()) {\n\t\t\t$redirectSession = new Zend_Session_Namespace('redirect');\n\t\t\t$redirectSession->next = \"/booking/index\";\n\t\t\t$this->_redirect('/user/mustbe');\n\t\t}\n // userid from session\n\t\t$userSession \t= new Zend_Session_Namespace('user');\n\t\t$userData \t= $userSession->user;\n\t\t$this->userId = $userData['userid'];\n\t\t$this->fullname = $userData['firstname'] . ' ' . $userData['lastname'];\n\t\t$this->username = $userData['username'];\n\t\t\n }", "title": "" }, { "docid": "4f726bcfb02730436050e4a19a105419", "score": "0.6162543", "text": "private function doLoginWithSessionData()\n {\n $this->user_is_logged_in = true; // ?\n }", "title": "" }, { "docid": "3f3cb7be1b96bf80cde5e659a540d741", "score": "0.6148962", "text": "function onLaunch()\n {\n if (!$userName = $_POST['user_id']) {\n return false;\n }\n if (!$user = $this->userManager->findUserByUsername($userName)) {\n $user = $this->userManager->createUser();\n $user->setFirstName($_POST['lis_person_name_given']);\n $user->setLastName($_POST['lis_person_name_family']);\n $user->setUsername($userName);\n $user->setEmail($_POST['lis_person_contact_email_primary']);\n $user->setPlainPassword($userName);\n $user->setEnabled(true);\n $this->userManager->updateUser($user);\n }\n $token = new UsernamePasswordToken($user, null, 'main', $user->getRoles());\n $this->tokenStorage->setToken($token);\n $this->session->set('_security_main', serialize($token));\n // Fire the login event manually\n $event = new InteractiveLoginEvent($this->getRequest(), $token);\n $this->eventDispatcher->dispatch(\"security.interactive_login\", $event);\n\n\n return $user;\n }", "title": "" }, { "docid": "161a3bef7b10b46b81dfe0ab9b427f3e", "score": "0.6129743", "text": "function authLikeInInit() {\n\t\tglobal $TYPO3_CONF_VARS;\n\n\t\t$XMLRPC_USER = t3lib_div::makeInstance('t3lib_beUserAuth');\t// New backend user object\n\t\t$XMLRPC_USER->name = 'xmlrpc_typo_user';\n\t\t$XMLRPC_USER->security_level = 'normal';\n\n\t\t$XMLRPC_USER->warningEmail = $TYPO3_CONF_VARS['BE']['warning_email_addr'];\n\t\t$XMLRPC_USER->lockIP = $TYPO3_CONF_VARS['BE']['lockIP'];\n\t\t$XMLRPC_USER->auth_timeout_field = intval($TYPO3_CONF_VARS['BE']['sessionTimeout']);\n\t\t$XMLRPC_USER->OS = TYPO3_OS;\n\t\t$XMLRPC_USER->start();\t\t\t// Object is initialized\n\t\t$XMLRPC_USER->backendCheckLogin();\t// Checking if there's a user logged in\n\t}", "title": "" }, { "docid": "2ba627b47c24b28f3643f9724fb052ba", "score": "0.61123407", "text": "public function initUserOnline()\n {\n $onlineSessionId = $this->Session->id();\n $this->UserOnline->init($onlineSessionId);\n $onlineNow = $this->UserOnline->countOnline();\n $totalVisit = $this->UserOnline->totalVisit();\n $this->set(array(\n 'onlineNow' => $onlineNow,\n 'totalVisit' => $totalVisit\n ));\n }", "title": "" }, { "docid": "d8413a8304c2885990d96175c5739040", "score": "0.6105951", "text": "private function loginWithSessionData()\n\n {\n $this->user_is_logged_in = true;\n\n }", "title": "" }, { "docid": "2ea04a97fb8c0f11c50fd66561f33644", "score": "0.6097545", "text": "public function loginpage_hook() {\n global $CFG;\n\n if ($CFG->registerauth == $this->authtype and empty($CFG->auth_instructions)) {\n $url = '/login/signup.php';\n $CFG->auth_instructions = get_string('signup_auth_instructions', 'auth_enrolkey', $url);\n }\n\n }", "title": "" }, { "docid": "094619dc6f313e896194b2429c0d4966", "score": "0.6088228", "text": "public function preExecute() {\n\t\tparent::preExecute();\n\n\t\t// get the user object\n\t\t$this->user = $this->getUserObject();\n\t}", "title": "" }, { "docid": "3af0e56f4319ac505c4ff453af52c3f5", "score": "0.6075503", "text": "public function hook_login_login_pre(){return;}", "title": "" }, { "docid": "a17b0ddf467cbb2f20501a273581909b", "score": "0.6066533", "text": "function LoggedInConstruct()\n\t{\tparent::LoggedInConstruct('details');\n\t\t$this->css[] = 'page.css';\n\t\t\n\t\tif (isset($_POST['username']))\n\t\t{\t$saved = $this->user->SaveDetails($_POST);\n\t\t\t$this->failmessage = $saved['fail'];\n\t\t\t$this->successmessage = $saved['success'];\n\t\t}\n\t\t\n\t\tif ($_GET['show'])\n\t\t{\tswitch ($_GET['show'])\n\t\t\t{\tcase 'justreg': \n\t\t\t\t\t$this->successmessage = 'Welcome to IIDR, you are now registered';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ef90ea7875601e916e410ad2e4efaf65", "score": "0.60142356", "text": "public function log_in( )\n\t{\n\t\t// this will redirect and exit upon failure\n\t\tparent::log_in( );\n\n\t\t// test an arbitrary property for existence, so we don't _pull twice unnecessarily\n\t\t// but don't test color, because it might actually be null when valid\n\t\tif (is_null($this->last_online)) {\n\t\t\t$this->_mysql->insert(self::EXTEND_TABLE, ['player_id' => $this->id]);\n\n\t\t\t$this->_pull( );\n\t\t}\n\n\t\t// don't update the last online time if we logged in as an admin\n\t\tif ( ! isset($_SESSION['admin_id'])) {\n\t\t\t$this->_mysql->insert(self::EXTEND_TABLE, ['last_online' => NULL], \" WHERE player_id = '{$this->id}' \");\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "338c21f1927da8bf162237bd945a9600", "score": "0.6009045", "text": "public function loadNewUser()\n {\n\n \t$this->sessionId = $this->_generateSessionId();\n $this->user->setSessionId($this->sessionId);\n \n //lookup for this user & start session\n $response = $this->dispatcher->trigger('session/start', [\n 'sessionId' => $this->sessionId,\n 'host' => $this->request->getHost(),\n 'user' => $this->user->getInfo()\n ]);\n \n if ($response && $response->status == 'success') {\n $this->user->setScore($response->score);\n } \n }", "title": "" }, { "docid": "593a437d4b477810aca6040eca3ffa96", "score": "0.60017586", "text": "public function signIn() {\n\t\t}", "title": "" }, { "docid": "11b2c6c50bbd442cf8752fa464952fed", "score": "0.59985983", "text": "function _pre()\n\t{\n\t\t$this->email = '[email protected]';\n\t\t$this->password = 'test';\n\t\t$this->group = 1;\n\t\t\n\t\t$this->userId = $this->user->register($this->email,$this->password,$this->group);\n\t}", "title": "" }, { "docid": "570a4612172dbf8a9eb59a25160f5481", "score": "0.5994376", "text": "public function beforeFilter() {\n\t\tparent::beforeFilter();\n\t\t$user = $this->Auth->user();\n\t\tif (empty($user)) {\n\t\t\t$fb = $this->connectFb();\n\t\t\t$user = $this->User->getLoginData($fb);\n\t\t\tif (!empty($user)) {\n\t\t\t\t$this->Auth->login($user);\n\t\t\t} else {\n\t\t\t\t$this->redirect('/');\n\t\t\t}\n\t\t}\n\n\t\t$this->logindata = $user;\n\t}", "title": "" }, { "docid": "65083d6c576886c5f2a5a248dc45369a", "score": "0.59935826", "text": "function logged_in() // adds points count after logged in username\r\n\t\t{\r\n\t\t\tif (qa_is_logged_in())\r\n $this->output('<DIV CLASS=\"qa-logged-in-avatar\">'.qa_get_user_avatar_html(qa_get_logged_in_user_field('flags'), qa_get_logged_in_user_field('email'), qa_get_logged_in_user_field('handle'), qa_get_logged_in_user_field('avatarblobid'), 24,24, qa_opt('avatar_users_size'), false).'</DIV>');\r\n\r\n\t\t\tqa_html_theme_base::logged_in();\r\n\r\n\t\t\tif (qa_is_logged_in()) {\r\n\t\t\t\t$userpoints=qa_get_logged_in_points();\r\n\t\t\t\t\r\n\t\t\t\t$pointshtml=($userpoints==1)\r\n\t\t\t\t\t? qa_lang_html_sub('main/1_point', '1', '1')\r\n\t\t\t\t\t: qa_lang_html_sub('main/x_points', qa_html(number_format($userpoints)));\r\n\t\t\t\t\t\t\r\n\t\t\t\t$this->output(\r\n\t\t\t\t\t'<SPAN CLASS=\"qa-logged-in-points\">',\r\n\t\t\t\t\t'('.$pointshtml.')',\r\n\t\t\t\t\t'</SPAN>'\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "bcbe4f9bf9e13a5bb20f33eb6a288bc5", "score": "0.5989966", "text": "public function onUserLogin($event)\r\n {\r\n activity('signin')->withProperties(['app_id' => $event->user->app_id])->log(\"({$event->user->email}) \". __('app.log_signin')); // log\r\n }", "title": "" }, { "docid": "ad268729357c103e9bad263729dfae52", "score": "0.59885436", "text": "public function filterStartup() {\n try {\n $user = new AuthUser();\n } catch (AuthUserNotAuthenticatedException $e) {\n $_SESSION['Route'] = $this->request->getQuery('route');\n $this->redirectTo('/auth/');\n }\n }", "title": "" }, { "docid": "7953698882919b456bda8be3cefcfbb4", "score": "0.5979453", "text": "function set_user() {\n // Note: If the user has attempted to login, this funtion getUser() in the\n // FB PHP SDK is smart enough to detect that and exchange the code that \n // FB returns after the login in the $_GET for the right access token. \n try {\n $this->user = $this->facebook->getUser();\n } catch (FacebookApiException $e) {\n $this->msg = $e->getMessage();\n return false;\n }\n\n if ( $this->user ) { // User successfully found.\n // First check to see if user session is already saved\n $sessions = get_option('fb_facebook_session'); $session_exists = null;\n foreach ($sessions as $session) {\n $session_exists = ( $session['uid'] == $this->user ) ? true : false;\n }\n\n // If the user id does not exist, then save a new session.\n if ( !$session_exists ) {\n $user_profile = $this->facebook->api('/me');\n $new_session = array(\n 'uid' => $this->user,\n 'access_token' => $this->facebook->getAccessToken(),\n 'name' => $user_profile['name'],\n 'link' => $user_profile['link']\n );\n array_push($sessions, $new_session);\n update_option('fb_facebook_session', $sessions);\n $this->msg = 'Fotobook is now linked to '.$new_session['name'].'\\'s Facebook account. Now you need to <a href=\"'.FB_MANAGE_URL.'\">import</a> your albums.';\n }\n\n } \n\n }", "title": "" }, { "docid": "7df9a57369731756628ff6439424103f", "score": "0.59791607", "text": "protected function init()\n\t{\n\t\tCore::getUser()->checkPermissions(\"CAN_MODERATE_USER\");\n\t\tCore::getLanguage()->load(array(\"Prefs\" ,\"Statistics\", \"Registration\"));\n\t\t$this->userid = (Core::getRequest()->getPOST(\"userid\")) ? Core::getRequest()->getPOST(\"userid\") : Core::getRequest()->getGET(\"1\");\n\t\tparent::init();\n\t}", "title": "" }, { "docid": "6f564a628a0a63017cd8daf1554e61aa", "score": "0.5963923", "text": "public function init()\n {\n\n // Yii::$app->user->on(\\yii\\web\\User::EVENT_BEFORE_LOGIN, function ($event)\n // {\n // echo \"Before\";\n // var_dump(Yii::$app->user->getIdentity());\n // });\n // Yii::$app->user->on(\\yii\\web\\User::EVENT_AFTER_LOGIN, function ($event)\n // {\n // echo \"AFTER\";\n // var_dump(Yii::$app->user->getIdentity());\n // exit();\n // });\n }", "title": "" }, { "docid": "86cc8ddd79c94df208e38f2a6474de59", "score": "0.59618694", "text": "function startup(&$controller) {\n //Need the is_array because control->data can be an XML object if it's a soap request\n if (is_array($controller->data) && isset($controller->data[$this->userModel])) {\n $username = $controller->data[$this->userModel][$this->fields['username']];\n\n $password = $controller->data[$this->userModel][$this->fields['password']];\n\n $res = $this->preauthUser($username, $password);\n\n if (!$res) {\n //set password to blank to ensure the auth fails\n $controller->data[$this->userModel][$this->fields['password']] ='';\n }\n }\n \n //Continue with standard auth process\n return parent::startup(&$controller);\n }", "title": "" }, { "docid": "7bf7ccd9390bd55c1adf9c6911a44e5f", "score": "0.59484476", "text": "function UserAuthentication()\n\t\t\t{\n\t\t\t\n\t\t\tif(!$_SESSION['member_id'])\n\t\t\t{\n\t\t\t\t$_SESSION['isRedirect'] = \"yes\";\n\t\t\t\t$_SESSION['Session_Previous_Page']\t=\t$_SERVER['PHP_SELF'] . \"?\" . $_SERVER['QUERY_STRING'];\n\t\t\t\techo \"<script>location.href=\\\"index.php?stage=member&mode=login\\\"</script>\";\n\t\t\t\tdie();\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "75a904f788c63406c20e67b9352f9aae", "score": "0.59474266", "text": "public function __pre() {\n if($this->getSession()->get(\"user_id\") === null) {\n $this->redirect(\\Configuration::BASE . \"administrator/login\");\n }\n }", "title": "" }, { "docid": "aca2d4179255f1710cc7c6d336e240a5", "score": "0.5945023", "text": "function newlogin(){\n\t\t\tif(isset($this->username)){\n\t\t\t\tglobal $db_auth;\n\t\t\t\t$useragent = $_SERVER['HTTP_USER_AGENT'];\n\t\t\t\t$ipAddy = $_SERVER['REMOTE_ADDR'];\n\t\t\t\t$logintime = time();\n\t\t\t\t$sprinkles = '|' . $logintime . '-' . md5(uniqid(rand(),true)) . sha1(uniqid(rand(),true));\n\t\t\t\t$cookieString = $this->username . $sprinkles;\n\t\t\t\t$db_auth->query(\"INSERT INTO activeLogins (username, loginID, loginTime, IP, useragent) VALUES ('\".$this->username.\"', '$sprinkles', '$logintime', '$ipAddy', '$useragent')\");\n\t\t\t\t$this->cookieMonster('set',$cookieString);\n\t\t\t\t$db_auth->query(\"UPDATE users SET lastLogin='$logintime' WHERE username='\".$this->username.\"' LIMIT 1\");\n\t\t\t\t$this->loginID = $sprinkles;\n\t\t\t}else{\n\t\t\t\ttrigger_error(\"UserMgmt tried to create a new login, and username is not set.\", E_USER_ERROR);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "26cd47fce0fcc3d8a09c161e7ad0c799", "score": "0.59410757", "text": "public function onUserLogin($event)\n {\n $user = Auth::user();\n $user->last_login = date('Y-m-d H:i:s');\n $user->visits = $user->visits+1;\n $user->ip = request()->ip();\n $user->save();\n }", "title": "" }, { "docid": "40e0691e472fb96ad5431baeb7651072", "score": "0.59381574", "text": "public function onUserLogin($event) {\n $event->user->last_login = Carbon::now();\n $event->user->save();\n }", "title": "" }, { "docid": "8e6117069324f20ee146a68c3ea21293", "score": "0.59251714", "text": "function _loginAddCheck()\n {\n return true;\n }", "title": "" }, { "docid": "626115cc97eaeb4ad2562fb22335069a", "score": "0.5914294", "text": "protected function beforeInsert() {\n\t\t$date = gmdate('Y-m-d H:i:s');\n\t\t$this->setLastLogin($date);\n\n\t\t$lookup = new LookupUsernameDao();\n\t\t$lookup->setAdminId($this->getId());\n\t\t$lookup->setUsername($this->getUsername());\n\t\t$lookup->setIsActive('Y');\n\t\t$lookup->save();\n\t}", "title": "" }, { "docid": "33d80e7117ec79caa4295f4246bae46b", "score": "0.5910897", "text": "public function onUserLoginAttempt($event)\n {\n //\\Log::info(\"User Login Attempt: \" . $event['email']);\n }", "title": "" }, { "docid": "d588fc3242ce9faf2d159ab645522433", "score": "0.5905315", "text": "private function autologin()\n {\n // not logged in (as any user)\n if (!$this->is_logged_in() AND !$this->is_logged_in(FALSE)) {\n\n $this->ci->load->helper('cookie');\n\n if ($cookie = get_cookie('autologin', TRUE)) {\n\n $data = unserialize($cookie);\n\n if (isset($data['key']) AND isset($data['user_id'])) {\n\n $this->ci->load->model('auth/user_autologin');\n $user = $this->ci->user_dal->get_user_by_id($data['user_id']);\n\n if ($user && !$user->banned) {\n $data = array(\n 'user_id' => $user->id,\n 'username' => $user->username,\n 'status' => ($user->activated == 1) ? 1 : 0,\n 'threads_shown' => $user->threads_shown,\n 'hide_enemy_posts' => $user->hide_enemy_posts,\n 'comments_shown' => $user->comments_shown,\n 'view_html' => $user->view_html,\n 'new_post_notification' => $user->new_post_notification,\n 'random_titles' => $user->random_titles,\n 'emoticon' => $user->emoticon,\n 'custom_css' => $user->custom_css\n );\n\n // This should just be global data, does not need to go through\n // cookies as it is read on every page request\n $this->ci->session->set_userdata($data);\n $this->ci->user_id = (int)$user->id;\n\n $ip = $this->ci->config->item('login_record_ip', 'auth');\n $time = $this->ci->config->item('login_record_time', 'auth');\n $this->ci->user_dal->update_login_info($user->id, $ip, $time);\n return TRUE;\n }\n } else {\n return FALSE;\n }\n }\n }\n return FALSE;\n }", "title": "" }, { "docid": "5e69a154de30b7d8c0bae811d746c193", "score": "0.590198", "text": "public function initUser() {\n #\n # If user cookie is not present...\n #\n $cookie_user = FILTER::get('COOKIE', self::$cookie_user);\n if (empty($cookie_user) || empty($_SESSION['user'])) {\n self::$logged_in = FALSE;\n return FALSE;\n }\n if ($cookie_user !== $_SESSION['user']) {\n return self::clearCookie();\n }\n #\n # Now we must validate user's data\n #\n if (!$this->checkUser($cookie_user, $_SESSION['pass'], TRUE, self::$user)) {\n self::$logged_in = FALSE;\n return self::clearCookie();\n }\n $userdata = self::getUserData($cookie_user);\n if (empty($userdata)) {\n self::$logged_in = FALSE;\n return self::clearCookie();\n }\n $this->loginSuccess($userdata);\n return TRUE;\n }", "title": "" }, { "docid": "03f32618f1942a1a95dd789fd61ebbd6", "score": "0.589138", "text": "public function before()\n\t{\n\n\t\tparent::before(); \t \n\t\tif ( ! (Session::instance()->get('user_id')))\n\t\t{\n\t\t\t\t\t\n\t\t\t// User is NOT signed in, redirect to Sign In page\n\t\t\t$this->redirect('User');\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "4645baae6b56388f1cc740a27f47f065", "score": "0.58913386", "text": "public function init() {\n $auth = Zend_Auth::getInstance();\n if ($auth->hasIdentity()) {\n $this->user_id = $auth->getIdentity()->id;\n }\n if (!($auth->hasIdentity()) ) {\n $this->redirect(\"Auth/login\");\n }\n }", "title": "" }, { "docid": "95390b424c7bf3084692e14cdf61103b", "score": "0.58820444", "text": "function _pre()\n\t{\n\t\t$this->email = '[email protected]';\n\t\t$this->password = 'test';\n\t\t$this->group = 1;\n\t\t\n\t\t$this->userId = $this->usermodel->register($this->email,$this->password,$this->group);\n\t}", "title": "" }, { "docid": "fc9b752b8012ac43a514434bc0713d39", "score": "0.5879392", "text": "public function on_user_page_init() {\n\t\t// This is only needed if users are not added to the network automatically.\n\t\tif ( get_network_option( get_current_site()->id, 'wp_sub_add_users_to_network' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_action( 'users_list_table_query_args', [ $this, 'users_list_table_query_args' ] );\n\t\tadd_filter( 'views_users', [ $this, 'views_users' ] );\n\t}", "title": "" }, { "docid": "cf948b627fee7a2152612d1c0882a817", "score": "0.58781284", "text": "private function initRememberMe()\n {\n /** @var $objResult ADORecordSet */\n $sessionId = !empty($_COOKIE[session_name()]) ? $_COOKIE[session_name()] : null;\n if (isset($_POST['remember_me'])) {\n $this->rememberMe = true;\n if ($this->sessionExists($sessionId)) {//remember me status for new sessions will be stored in cmsSessionRead() (when creating the appropriate db entry)\n \\Env::get('db')->Execute('UPDATE `' . DBPREFIX . 'sessions` SET `remember_me` = 1 WHERE `sessionid` = \"' . contrexx_input2db($sessionId) . '\"');\n }\n } else {\n $objResult = \\Env::get('db')->Execute('SELECT `remember_me` FROM `' . DBPREFIX . 'sessions` WHERE `sessionid` = \"' . contrexx_input2db($sessionId) . '\"');\n if ($objResult && ($objResult->RecordCount() > 0)) {\n if ($objResult->fields['remember_me'] == 1) {\n $this->rememberMe = true;\n }\n }\n }\n }", "title": "" }, { "docid": "92c7635bd75378b8a0e77c1a22a6e359", "score": "0.58716846", "text": "public function log_in() {\n\t\t$_SESSION['logged_in'] = true;\n\t}", "title": "" }, { "docid": "b39d68b4504d416b931eaaa26fc6910a", "score": "0.58669686", "text": "public function onUserLogin($event) {\n // log\n $log = new \\App\\UserLog;\n $log->ip = $_SERVER['REMOTE_ADDR']? $_SERVER['REMOTE_ADDR'] : 'N/A';\n $log->user_id = \\Auth::user()->id;\n $log->action = 'Login';\n $log->save();\n\n // record online status\n $user = \\App\\User::find(\\Auth::user()->id);\n $user->last_online = \\Carbon\\Carbon::now()->toDateTimeString();\n $user->save();\n }", "title": "" }, { "docid": "f12fe26dd0e590b6c5264ff13b9f5624", "score": "0.5853312", "text": "protected function auto_login()\n\t{\n\t\t// if user already has a session, auto login\n\t\t$auth = Factory_Authenticate::create( $this->auth_object );\n\t\t$response = $auth->logged_in();\n\t\tif ($response) \n\t\t{\n\t\t\t$this->redirect('home', 302);\n\t\t}\n\t\t\n\t\t// check for auto auth cookie\n\t\t$response = $auth->auto_login();\n\t\tif ($response) \n\t\t{\n\t\t\t$this->redirect('home', 302);\n\t\t}\n\t}", "title": "" }, { "docid": "a8da50a7705aa1740c81eab3005cc76d", "score": "0.5847461", "text": "public function preDispatch()\n {\n parent::preDispatch();\n\n if (!Mage::getSingleton('customer/session')->authenticate($this)) {\n $this->setFlag('', 'no-dispatch', true);\n Mage::getSingleton('core/session')->addSuccess('Please sign in or create a new account');\n }\n }", "title": "" }, { "docid": "cea69d978f729c56d24e34b52426d230", "score": "0.5845299", "text": "public function init_user_profile() {\n\t\tnew Portum_Profile_Fields();\n\t}", "title": "" }, { "docid": "bd00df1cc7ccafa79afb62210d7cc925", "score": "0.5838641", "text": "public function init()\n {\n $loginSession = new Zend_Session_Namespace('user');\n $layout = $this->_helper->layout();\n $layout->setLayout('admlayout');\n\n $auth = Zend_Auth::getInstance();\n $storage = $auth->getStorage();\n $userData = $storage->read();\n $person = (array)$userData;\n //either shopperID or customerID\n $personKey=key($person);\n if($personKey != \"adminID\" && $personKey !=\"\" ){\n $this->redirect(\"/index\");\n }\n if (!$auth->hasIdentity() && ($this->getRequest()->getActionName() != 'login') &&\n ($this->getRequest()->getActionName() != 'add'))\n {\n $this->redirect(\"admin/login\");\n }\n\n \n if ($auth->hasIdentity() && ((($this->getRequest()->getActionName() == 'login')) || (($this->getRequest()->getActionName() == 'add'))) )\n {\n $this->redirect(\"/index\");\n }\n\n\n }", "title": "" }, { "docid": "aefd50f436751411b76c11a701c11c50", "score": "0.58370465", "text": "public static function init()\n\t{\n\t\tif (!isset($_SESSION[self::C_STR_SESSION_IS_LOGGED_IN]))\n\t\t{\n\t\t\t$_SESSION[self::C_STR_SESSION_IS_LOGGED_IN] = false;\n\t\t}\n\t\tif (!isset($_SESSION[self::C_STR_SESSION_CUR_USERNAME]))\n\t\t{\n\t\t\t$_SESSION[self::C_STR_SESSION_CUR_USERNAME] = \"\";\n\t\t}\n\t\tif (!isset($_SESSION[self::C_STR_SESSION_CUR_USERID]))\n\t\t{\n\t\t\t$_SESSION[self::C_STR_SESSION_CUR_USERID] = \"\";\n\t\t}\n\t\tif (!isset($_SESSION[self::C_STR_SESSION_CUR_LASTURL]))\n\t\t{\n\t\t\t$_SESSION[self::C_STR_SESSION_CUR_LASTURL] = \"\";\n\t\t}\n\t\tif (!isset($_SESSION[self::C_STR_SESSION_CUR_LOGINATTEMPT]))\n\t\t{\n\t\t\t$_SESSION[self::C_STR_SESSION_CUR_LOGINATTEMPT] = 0;\n\t\t}\n\t}", "title": "" }, { "docid": "6a266db922b813fd49ad61b51d47bd3a", "score": "0.58364516", "text": "public function logInUser() {\n $request = new Request();\n\n Auth::attempt(['email' => $request->getData()['email'], 'password' => $request->getData()['password']]);\n\n if (isset($_SESSION['user'])); {\n echo json_encode($_SESSION['user']);\n }\n }", "title": "" }, { "docid": "8585ae6ef8328b0e62e8a78e6a56c52d", "score": "0.5830474", "text": "public function handleUserLogin()\n {\n $user = $this->user;\n\n $instance = \\App\\Models\\User::class;\n if (!($user instanceof $instance)) {\n return;\n }\n\n try {\n $new_data = [\n 'ip' => $_SERVER['REMOTE_ADDR'],\n 'user_agent' => $_SERVER['HTTP_USER_AGENT'],\n ];\n\n UserLogable::create([\n 'user_id' => $user->id,\n 'new_data' => $new_data,\n 'logable_type' => get_class($user),\n 'logable_id' => $user->id,\n 'old_data' => [],\n 'type' => 'login',\n ]);\n } catch (\\Throwable $th) {\n }\n }", "title": "" }, { "docid": "cb669f6777a14e1b68574bd021ac9554", "score": "0.5829907", "text": "public function check(): void\n {\n if ($this->isLoggedIn()) {\n // if user is already logged in\n $this->addUserMenu();\n } else {\n // if user is not logged in, then show login form\n $this->displayLoginForm();\n }\n }", "title": "" }, { "docid": "1f96102cbbcdce25ef4c416499e26695", "score": "0.5825152", "text": "private function refreshUser() {\n $user = User::find($this->currentUser->id);\n $this->currentUser = $user;\n Auth::login($user);\n }", "title": "" }, { "docid": "7d90ebcdec880ce17e0d2d6777fd7f3f", "score": "0.58213055", "text": "public function log_login_attempt(){\n\t\t$this->ERR = '';\n\t\t$this->run(sprintf('INSERT IGNORE INTO logins VALUES(\"%s\",\"%s\",\"%s\",NOW(),\"%s\",\"%s\")',\n\t\t\tget_client_ip(),\n\t\t\t$this->_safe($this->id),\n\t\t\t$this->_safe($this->uname),\n\t\t\taddslashes(json_encode($this->DATA)),\n\t\t\t$this->_safe(@$_SERVER['HTTP_USER_AGENT'])\n\t\t));\n\t}", "title": "" }, { "docid": "6123815b6f05213cadb39edd4efa4c62", "score": "0.58189434", "text": "public function onUserLogin($event) {\n /** @var \\App\\User $user */\n $user = $event->user;\n\n $logUser = new LogUser();\n $logUser->user_id = $user->id;\n $logUser->logged_in = now();\n $logUser->save();\n }", "title": "" }, { "docid": "9229607ba10e4520e2521207ef98c27a", "score": "0.58128244", "text": "protected function _activateLogin() {\n \t$updTz = '';\n \tif (isset($_REQUEST['appUserTimeZone'])) {\n \t\tif ($this->obj->get('time_zone') != $_REQUEST['appUserTimeZone']) {\n\t\t\t\t$this->obj->set('time_zone',$_REQUEST['appUserTimeZone']);\n\t\t\t\t$updTz = ',time_zone';\n\t\t\t}\n \t}\n // register session\n $_SESSION[\"appUserId\"] = $this->obj->getUid();\n $_SESSION[\"appUserLastLogin\"] = $this->obj->get('last_login_date');\n\t\t$_SESSION[\"appUserLastAddress\"] = $this->obj->get('last_login_address');\n\t\t$this->updateSessionVariables();\n\n // update last login\n $this->obj->set('last_login_date',APP_SQL_NOW);\n\t\t$this->obj->set('last_login_address', $_SERVER['REMOTE_ADDR']);\n\t\t$_SESSION['appUserCurrentAddress'] = $this->obj->get('last_login_address');\n\t\t$this->obj->_isLoggedIn = true;\n $this->obj->set('bad_access',0);\n\t\t$this->obj->set('visits',$this->obj->get('visits')+1);\n\t\t$this->obj->fields('last_login_date,last_login_address,bad_access,visits'.$updTz);\n $this->obj->update();\n }", "title": "" }, { "docid": "a865aea473b78447281224b119b2f11a", "score": "0.5806729", "text": "public function logUserIn() {\n\t\t$connection = new createConnection();\n\t\t$connection->connectToDatabase();\n\t\t\n\t\t// Insert the budget\n\t\t$sql = 'SELECT user_id, name\n\t\t\t\tFROM ' . $connection->database . '.user\n\t\t\t\tWHERE email = \"' . htmlentities($this->email) . '\" AND\n\t\t\t\t\t password = \"' . htmlentities($this->password) . '\"\n\t\t\t\tLIMIT 1';\n\t\t$user_data = $connection->runSqlWithReturn($sql);\n\t\t\n\t\t// If user exist\n\t\tforeach ($user_data as $k)\n\t\t\tif ($k['user_id']) {\n\t\t\t\t// Store the user into a session\n\t\t\t\t$_SESSION['user_id'] = $k['user_id'];\n\t\t\t\t$_SESSION['user_name'] = $k['name'];\n\t\t\t\t$_SESSION['email'] = $this->email;\n\t\t\t\t$_SESSION['password'] = $this->password;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\n\t\t// Close database connection\n\t\t$connection->closeConnection();\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "a1bdfaa27a3557fe6c0c3290b9331157", "score": "0.5802974", "text": "public function initialize()\n {\n Log::info(__METHOD__.\" - \".$this->name);\n// $this->buildWizardHelp();\n// $this->buildWizardStartup();\n $this->getCurrentProject();\n session(['user' => $this, 'org' => $this->org, 'currentProject' => $this->currentProject]);\n }", "title": "" }, { "docid": "4ba7bc43c6ca6f30ee4e558a3d480d78", "score": "0.57996327", "text": "public function init()\n {\n $this->_user = Zend_Registry::get('user');\n if (!isset($this->_user)) {\n $this->_redirect('/');\n }\n }", "title": "" }, { "docid": "19135fac62188978fe79de0a4b4c2e83", "score": "0.5795226", "text": "function onUserBeforeInsert(Am_Event_UserBeforeInsert $event)\n {\n // skip this code if running from aMember CP\n if (defined('AM_ADMIN') && AM_ADMIN) return;\n $aff_id = @$_COOKIE[self::COOKIE_NAME];\n if (empty($aff_id))\n {\n $aff_id = $this->getDi()->affClickTable->findAffIdByIp($_SERVER['REMOTE_ADDR']);\n }\n // remember for usage in onUserAfterInsert\n $this->last_aff_id = $aff_id;\n if ($aff_id > 0)\n $event->getUser()->aff_id = intval($aff_id);\n if (empty($event->getUser()->is_affiliate))\n $event->getUser()->is_affiliate = $this->getDi()->config->get('aff.signup_type') == 1 ? 1 : 0;\n }", "title": "" }, { "docid": "aff27a477ef911d470bb6ddd5b7b7b1d", "score": "0.57906365", "text": "public function preauth()\n {\n\n }", "title": "" }, { "docid": "b4d5d36167c12f336f66dee35bcb2784", "score": "0.5789789", "text": "function login(){\n\t\t//authentication required as uploads to server will be needed\n\t}", "title": "" }, { "docid": "fce01f8495c3395959c18c6af3df7163", "score": "0.5789763", "text": "public function init()\n {\n \t$auth = Zend_Auth::getInstance();\n\t\tif($auth->hasIdentity())\n \t\t$this->_user_id = Zend_Auth::getInstance()->getIdentity()->user_id;\n }", "title": "" }, { "docid": "8ea57d792448eb6d44ef6d303e88c52f", "score": "0.57880056", "text": "public function init()\n {\n\t\t// add login form to identity board\n\t\t// Dnst_History_Carnivore::toString();\n }", "title": "" }, { "docid": "8ff23afda576d407e967e2a086cf66f2", "score": "0.5786605", "text": "protected function coreInit(): void\n {\n $this->metaData = VnConfig::siteConfig();\n $this->metaData->baseUrl = url();\n\n $user_info = VnUser::getUser();\n $this->uid = $user_info ? $user_info->id : 0;\n $this->setData['__userData'] = $user_info;\n }", "title": "" }, { "docid": "2a3f06265f231fad264000d6e95884f5", "score": "0.5785218", "text": "public function before()\n\t{\n\t\tif ( !Sentry::check() )\n\t\t{\n\t\t\t// User is not loggedin\n\t\t\tResponse::redirect( Uri::create('auth/') );\n\t\t}\n\t}", "title": "" }, { "docid": "72b47a65c4a591a4b4cbb26ce7acf506", "score": "0.57798326", "text": "public function loggedIn()\n {\n $query = 'UPDATE biz_webuser SET lastLogin=NOW() WHERE id=?';\n $project = wcmProject::getInstance();\n $connector = $project->datalayer->getConnectorByReference(\"biz\");\n $db = $connector->getBusinessDatabase();\n $db->executeStatement($query, array($this->id)); \n }", "title": "" }, { "docid": "d5d2e41be6d7d560b0612f972b26a952", "score": "0.57726544", "text": "function before($args){\n $this->app->db->connect();\n \n $this->userid = -1;\n $this->username = null;\n \n // if logged in, tell the view\n if( $this->app->user->is_logged_in() ){\n \n // this users id\n $this->userid = $this->app->user->get_user_id();\n \n // this users username\n $this->username = $this->app->user->get_user_name();\n \n // add them both to the view\n $this->view->add('username', $this->username );\n // add id to the view\n $this->view->add( 'userid', $this->userid );\n }\n \n // add registration style\n $this->view->add_style('registration');\n }", "title": "" }, { "docid": "ded74684d2ec43b35ecec74877032888", "score": "0.576913", "text": "public function setUserConnected() {\n $this->storage->set(\"gk_session.{$this->providerId}.is_logged_in\", 1);\n }", "title": "" }, { "docid": "eabf36b6dfce5c68840d2e6589fc2bcd", "score": "0.57666343", "text": "public function login()\n {\n\t\t\t// Load Community Auth variables.\n\t\t\t$this->is_logged_in();\n\n\t\t\t// Is the user logged in?\n\t\t\tif($this->auth_level !== NULL)\n\t\t\t{\n\t\t\t\t$this->view('myprofile', NULL);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif( strtolower( $_SERVER['REQUEST_METHOD'] ) == 'post' )\n\t\t\t\t{\n\t\t\t\t\t$this->require_min_level(1);\n\t\t\t\t}\n\n\t\t\t\t$this->setup_login_form();\n\n\t\t\t\t$this->view('login_form', null);\n\t\t\t}\n }", "title": "" }, { "docid": "92ef72cf25b298ec982fb2f308669a0b", "score": "0.57637465", "text": "function newuser_init() {\n\t\t$username = $_POST['userName'];\n\t\t$password = $_POST['passUser'];\n\t\t$email = $_POST['email'];\n\t\t$nombre = $_POST['completeName'];\n\n\t\t$userdata = array(\n\t\t 'user_login' => $username,\n\t\t 'user_pass' => $password,\n\t\t 'user_email' => $email,\n\t\t 'user_nicename' => $nombre\n\t\t);\n\n\t\t// Insertar Usuario en DB\n\t\t$user_id = wp_insert_user( $userdata ) ;\n\n\t\t//On success\n\t\tif ( ! is_wp_error( $user_id ) ) {\n\t\t\techo \"Felicidades ya estas Registrado\";\n\t\t die();\n\t\t} else{\n\t\t echo \"El Usuario Ya Estaba Registrado\";\n\t\t\tdie();\n\t\t}\n\t}", "title": "" }, { "docid": "ecfdf7f6be580f189a3fecd44bd9caf4", "score": "0.57597554", "text": "private function userAccess()\n { \n if(isset($_COOKIE['remember_repzone']) && !empty($_COOKIE['remember_repzone']) ){ $this->user_is_logged_in = true; }\n if(isset($_SESSION['rep_zone_user']) && !empty($_SESSION['rep_zone_user'])) { $this->user_is_logged_in = true; }\n }", "title": "" }, { "docid": "ded45a0b19dce3ea619b98acb8c2aee6", "score": "0.5756424", "text": "public static function initialise()\n\t{\n\t\tif( !isset( $_SESSION['user'] ) )\n\t\t{\n\t\t\t$_SESSION['user'] = 0;\n\t\t}\n\t\t\n\t\t/* check if already logged in */\n\t\tif( $_SESSION['user'] instanceof data_user )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t/* check if user has login cookie */\n\t\tif( !isset( $_COOKIE['user_id'] ) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t/* get user from cookie */\n\t\t$id = security::decrypt( $_COOKIE['user_id'] );\n\t\tif( !is_numeric( $id ) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t/* get user data */\n\t\t$user = self::getById( $id );\n\t\t\n\t\tif( empty( $user->id ) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$_SESSION['user'] = $user;\n\t\treturn true;\n\t\t\t\t\n\t}", "title": "" }, { "docid": "a7a638f779b136e186564fd269e94d8a", "score": "0.5756267", "text": "private function authenticate_user_login()\n\t{\n\t\tif(is_object($this->password_salt))\n\t\t{\n\t\t\tif(verifyPasswordHash($this->input->post('password'),$this->password_salt->sb_hotel_userpasswd) === TRUE)\n\t\t\t{\n\t\t\t\t$this->logged_in_user_meta \t= $this->User_model->authenticated_hoteleir_records($this->input->post('username'),$this->password_salt->sb_hotel_userpasswd);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->redirectWithErrMsg(ERR_MSG_LEVEL_1);\n\t\t\t}\t\n\t\t}\n\t\t$this->register_user_session();\n\t}", "title": "" } ]
4272b62d11c83657b1b1d2ea368ba57e
Updates entity rows to reflect translation status.
[ { "docid": "72e8c211a29d28689a46d0d137597341", "score": "0.5869163", "text": "function globallink_entity_update_row_document(&$globallink_arr) {\r\n foreach ($globallink_arr as $globallink) {\r\n if ($globallink->cancelled) {\r\n db_update('globallink_core_entity')\r\n ->fields(array(\r\n 'status' => 'Pending Translations',\r\n 'timestamp' => REQUEST_TIME,\r\n 'changed' => 1,\r\n ))\r\n ->condition('rid', $globallink->tptRowId, '=')\r\n ->execute();\r\n }\r\n }\r\n}", "title": "" } ]
[ { "docid": "ccbd86199553516cd8b72c87881013eb", "score": "0.6117789", "text": "public function updateTranslations()\r\n\t\t{\r\n\t\t\tforeach($this->dirtyTrans as $languageId => $attrs)\r\n\t\t\t{\r\n\t\t\t\tforeach($attrs as $attr => $allwaysTrue)\r\n\t\t\t\t{\r\n\t\t\t\t\tstatic::dbConnection()->query(\"REPLACE INTO `translation_items`\r\n\t\t\t\t\t\t(`languageId`, `translationId`, `data`)\r\n\t\t\t\t\t\tVALUES ('$languageId', '\".$this->getAttr($attr).\"', \r\n\t\t\t\t\t\t\t\".static::dbConnection()->quote($this->rowTrans[$languageId][$attr]).\")\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->dirtyTrans = array();\r\n\t\t}", "title": "" }, { "docid": "e03d199a7df4b59f0fc5944b6d8bc959", "score": "0.6116136", "text": "private function updateTranslations()\n {\n $trans = $this->getTranslations()->one();\n Yii::$app->db->createCommand()->update('article_has_translations',\n ['category_id' => $this->category_id, 'date' => $this->date, 'state' => $this->state, 'time_to_read' => $this->getTimeToRead()],\n ['article_' . $this->language_id => $this->id])\n ->execute();\n return Yii::$app->db->createCommand()->update('article',\n ['category_id' => $this->category_id, 'date' => $this->date, 'state' => $this->state],\n ['in', 'id', [$trans->article_ca, $trans->article_es, $trans->article_en]])\n ->execute();\n }", "title": "" }, { "docid": "2443bc0870ee19c4fe95d4067fd2e870", "score": "0.5951344", "text": "public function update()\r\n\t\t{\r\n\t\t\t$this->updateTranslations();\r\n\t\t\t$this->updateTable();\r\n\t\t}", "title": "" }, { "docid": "7d8066206c536bc35020a04bf142a11b", "score": "0.57712626", "text": "public function refreshTranslationsFromLogData(EntityAccess $entity): void\n {\n $this->toggleLoggable(false);\n \n $objectType = $entity->get_objectType();\n \n // remove all existing translations\n $entityManager = $this->entityFactory->getEntityManager();\n $translationClass = 'Zikula\\ContentModule\\Entity\\\\' . ucfirst($objectType) . 'TranslationEntity';\n $repository = $entityManager->getRepository($translationClass);\n $translationMeta = $entityManager->getClassMetadata($translationClass);\n $qb = $entityManager->createQueryBuilder();\n $qb->delete($translationMeta->rootEntityName, 'trans')\n ->where('trans.objectClass = :objectClass')\n ->andWhere('trans.foreignKey = :objectId')\n ->setParameter('objectClass', get_class($entity))\n ->setParameter('objectId', $entity->getKey())\n ;\n $query = $qb->getQuery();\n $query->execute();\n \n $translatableFields = $this->getTranslatableFields($objectType);\n $translationData = $entity->getTranslationData();\n $supportedLanguages = $this->getSupportedLanguages($objectType);\n foreach ($supportedLanguages as $language) {\n // check if this revision has translation data for current locale\n if (!isset($translationData[$language])) {\n continue;\n }\n \n foreach ($translatableFields as $fieldName) {\n if (!isset($translationData[$language][$fieldName])) {\n continue;\n }\n $setter = 'set' . ucfirst($fieldName);\n $entity->$setter($translationData[$language][$fieldName]);\n }\n \n $entity->setLocale($language);\n $entityManager->flush();\n }\n \n $this->toggleLoggable(true);\n }", "title": "" }, { "docid": "5da37feed85dd97df5ba1e1d11944487", "score": "0.5591009", "text": "public function save_translations() {\n list($table, $field) = $this->table_field();\n if ($table && $field) {\n if ($keys = $this->get_translations_keys()) {\n return db_update($table)\n ->fields(array($field => $this->tsid))\n ->condition($this->key_field(), $keys)\n ->execute();\n }\n else {\n return $this->delete_translations();\n }\n }\n \n }", "title": "" }, { "docid": "19e4cabe888f91c26d9778ce29fb3dcd", "score": "0.5561104", "text": "public function update($udpate_translations = FALSE) {\n $this->changed = REQUEST_TIME;\n $status = drupal_write_record('i18n_translation_set', $this, 'tsid');\n if ($udpate_translations) {\n $this->clean_translations();\n $this->save_translations();\n }\n $this->invoke_all('update');\n return $status;\n }", "title": "" }, { "docid": "024dc2692734dea3d3449ae89accf874", "score": "0.5532166", "text": "protected function updateEntity(EntityInterface $entity, Row $row) {\n // This is a translation if the language in the active config does not\n // match the language of this row.\n $translation = FALSE;\n if ($this->isTranslationDestination() && $row->hasDestinationProperty('langcode') && $this->languageManager instanceof ConfigurableLanguageManager) {\n $config = $entity->getConfigDependencyName();\n $langcode = $this->configFactory->get('langcode');\n if ($langcode != $row->getDestinationProperty('langcode')) {\n $translation = TRUE;\n }\n }\n\n if ($translation) {\n if (!$row->hasDestinationProperty('property')) {\n throw new \\LogicException('The \"property\" property is required');\n }\n if (!$row->hasDestinationProperty('translation')) {\n throw new \\LogicException('The \"translation\" property is required');\n }\n $config_override = $this->languageManager->getLanguageConfigOverride($row->getDestinationProperty('langcode'), $config);\n $config_override->set(str_replace(Row::PROPERTY_SEPARATOR, '.', $row->getDestinationProperty('property')), $row->getDestinationProperty('translation'));\n $config_override->save();\n }\n else {\n foreach ($row->getRawDestination() as $property => $value) {\n $this->updateEntityProperty($entity, explode(Row::PROPERTY_SEPARATOR, $property), $value);\n }\n $this->setRollbackAction($row->getIdMap());\n }\n }", "title": "" }, { "docid": "94ea4907ddf925f8306ede1fa22eb182", "score": "0.55049944", "text": "public function testUpdateCheckStatus() {\n // Case when contributed modules are absent.\n $this->drupalGet('admin/reports/translations');\n $this->assertSession()->pageTextContains('Missing translations for one project');\n\n $config = $this->config('locale.settings');\n // Set a flag to let the locale_test module replace the project data with a\n // set of test projects.\n \\Drupal::state()->set('locale.test_projects_alter', TRUE);\n\n // Create local and remote translations files.\n $this->setTranslationFiles();\n $config->set('translation.default_filename', '%project-%version.%language._po')->save();\n\n // Set the test conditions.\n $edit = [\n 'use_source' => LOCALE_TRANSLATION_USE_SOURCE_LOCAL,\n ];\n $this->drupalGet('admin/config/regional/translate/settings');\n $this->submitForm($edit, 'Save configuration');\n\n // Get status of translation sources at local file system.\n $this->drupalGet('admin/reports/translations/check');\n $result = locale_translation_get_status();\n $this->assertEquals(LOCALE_TRANSLATION_LOCAL, $result['contrib_module_one']['de']->type, 'Translation of contrib_module_one found');\n $this->assertEquals($this->timestampOld, $result['contrib_module_one']['de']->timestamp, 'Translation timestamp found');\n $this->assertEquals(LOCALE_TRANSLATION_LOCAL, $result['contrib_module_two']['de']->type, 'Translation of contrib_module_two found');\n $this->assertEquals($this->timestampNew, $result['contrib_module_two']['de']->timestamp, 'Translation timestamp found');\n $this->assertEquals(LOCALE_TRANSLATION_LOCAL, $result['locale_test']['de']->type, 'Translation of locale_test found');\n $this->assertEquals(LOCALE_TRANSLATION_LOCAL, $result['custom_module_one']['de']->type, 'Translation of custom_module_one found');\n\n // Set the test conditions.\n $edit = [\n 'use_source' => LOCALE_TRANSLATION_USE_SOURCE_REMOTE_AND_LOCAL,\n ];\n $this->drupalGet('admin/config/regional/translate/settings');\n $this->submitForm($edit, 'Save configuration');\n\n // Get status of translation sources at both local and remote locations.\n $this->drupalGet('admin/reports/translations/check');\n $result = locale_translation_get_status();\n $this->assertEquals(LOCALE_TRANSLATION_REMOTE, $result['contrib_module_one']['de']->type, 'Translation of contrib_module_one found');\n $this->assertEquals($this->timestampNew, $result['contrib_module_one']['de']->timestamp, 'Translation timestamp found');\n $this->assertEquals(LOCALE_TRANSLATION_LOCAL, $result['contrib_module_two']['de']->type, 'Translation of contrib_module_two found');\n $this->assertEquals($this->timestampNew, $result['contrib_module_two']['de']->timestamp, 'Translation timestamp found');\n $this->assertEquals(LOCALE_TRANSLATION_LOCAL, $result['contrib_module_three']['de']->type, 'Translation of contrib_module_three found');\n $this->assertEquals($this->timestampOld, $result['contrib_module_three']['de']->timestamp, 'Translation timestamp found');\n $this->assertEquals(LOCALE_TRANSLATION_LOCAL, $result['locale_test']['de']->type, 'Translation of locale_test found');\n $this->assertEquals(LOCALE_TRANSLATION_LOCAL, $result['custom_module_one']['de']->type, 'Translation of custom_module_one found');\n }", "title": "" }, { "docid": "a5656efb209f939e3e794aa2b2fe10f5", "score": "0.5444199", "text": "public static function updateTranslationList(){\n\t\t\t$selectedLang = self::getSelectedLanguage();\n\n\t\t\t$db = Database::getDb();\n\n\t\t\t//Text translations\n\t\t\t$db->query(\"SELECT translations.name,translations.value FROM translations WHERE (language = :language)\",\n\t\t\t\tarray(\":language\" => $selectedLang));\n\n\t\t\tself::$translations = array();\n\t\t\tforeach($db->getAllRows() as $row){\n\t\t\t\tself::$translations[$row[\"name\"]] = $row[\"value\"];\n\t\t\t}\n\n\t\t\t//Update translations for items and categories as well\n\t\t\tItemTranslation::updateItemTranslations();\n\t\t\tItemCategoryTranslation::updateCategoryTranslations();\n\t\t}", "title": "" }, { "docid": "f559db74dc2b82e7ff2dcd8eeef3f288", "score": "0.5420281", "text": "function trstatus()\r\n {\r\n $this->reservation_model->update_status_tr();\r\n }", "title": "" }, { "docid": "3b7d3b8d5e40069d50d55cf4537a41b0", "score": "0.5339248", "text": "public function executeUpdate()\n {\n $template = TemplatePeer::retrieveByPk($this->getRequestParameter('id'));\n if (!$template) return $this->renderText('No');\n \n $langs = sfConfig::get('app_lang_array', array('es'));\n foreach($langs as $lang){\n $template->setCulture($lang);\n $template->setText($this->getRequestParameter('text_' . $lang, ' '));\n }\n $template->save();\n return $this->renderText('Ok');\n }", "title": "" }, { "docid": "6d2382b582534a3b2b5be79d53b15ac1", "score": "0.52840966", "text": "function EditRow() {\n\t\tglobal $conn, $Security, $Language, $system_message;\n\t\t$sFilter = $system_message->KeyFilter();\n\t\t$system_message->CurrentFilter = $sFilter;\n\t\t$sSql = $system_message->SQL();\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE)\n\t\t\treturn FALSE;\n\t\tif ($rs->EOF) {\n\t\t\t$EditRow = FALSE; // Update Failed\n\t\t} else {\n\n\t\t\t// Save old values\n\t\t\t$rsold =& $rs->fields;\n\t\t\t$rsnew = array();\n\n\t\t\t// content\n\t\t\t$system_message->content->SetDbValueDef($rsnew, $system_message->content->CurrentValue, NULL, FALSE);\n\n\t\t\t// status\n\t\t\t$system_message->status->SetDbValueDef($rsnew, $system_message->status->CurrentValue, 0, FALSE);\n\n\t\t\t// message_type\n\t\t\t$system_message->message_type->SetDbValueDef($rsnew, $system_message->message_type->CurrentValue, 0, FALSE);\n\n\t\t\t// bonus\n\t\t\t$system_message->bonus->SetDbValueDef($rsnew, $system_message->bonus->CurrentValue, 0, FALSE);\n\n\t\t\t// url\n\t\t\t$system_message->url->SetDbValueDef($rsnew, $system_message->url->CurrentValue, \"\", FALSE);\n\n\t\t\t// cp\n\t\t\t$system_message->cp->SetDbValueDef($rsnew, $system_message->cp->CurrentValue, \"\", FALSE);\n\n\t\t\t// date_begin\n\t\t\t$system_message->date_begin->SetDbValueDef($rsnew, ew_UnFormatDateTime($system_message->date_begin->CurrentValue, 5, FALSE), ew_CurrentDate());\n\n\t\t\t// date_end\n\t\t\t$system_message->date_end->SetDbValueDef($rsnew, ew_UnFormatDateTime($system_message->date_end->CurrentValue, 5, FALSE), ew_CurrentDate());\n\n\t\t\t// date_created\n\t\t\t$system_message->date_created->SetDbValueDef($rsnew, ew_UnFormatDateTime($system_message->date_created->CurrentValue, 5, FALSE), ew_CurrentDate());\n\n\t\t\t// Call Row Updating event\n\t\t\t$bUpdateRow = $system_message->Row_Updating($rsold, $rsnew);\n\t\t\tif ($bUpdateRow) {\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t\t\t$EditRow = $conn->Execute($system_message->UpdateSQL($rsnew));\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t} else {\n\t\t\t\tif ($system_message->CancelMessage <> \"\") {\n\t\t\t\t\t$this->setMessage($system_message->CancelMessage);\n\t\t\t\t\t$system_message->CancelMessage = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->setMessage($Language->Phrase(\"UpdateCancelled\"));\n\t\t\t\t}\n\t\t\t\t$EditRow = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// Call Row_Updated event\n\t\tif ($EditRow)\n\t\t\t$system_message->Row_Updated($rsold, $rsnew);\n\t\t$rs->Close();\n\t\treturn $EditRow;\n\t}", "title": "" }, { "docid": "a9b6465bee015d07ff42a0f99a882b06", "score": "0.5244466", "text": "public function update() {\n \t $this->_check_entities();\n\n \t // Change information.\n \t return $this->change();\n }", "title": "" }, { "docid": "d80a6de9229b50c89df17e008424b98a", "score": "0.52428395", "text": "public function updateTranslations() {\n $this->mustHaveTable(\"gk-waypointy-type\");\n $this->mustHaveTable(\"gk-waypointy-country\");\n //~ kraj\n $countries = $this->getWaypointyCountries();\n $this->updateCountryTranslations($countries);\n //~ typ\n $typs = $this->getWaypointyTyps();\n $this->updateTypeTranslations($typs);\n }", "title": "" }, { "docid": "d27d46df92fccbd384838e2b15a0f9f9", "score": "0.51801664", "text": "public function update()\n\t{\n\t\t//\n /**\n\t\t$lang_id = Input::get('lang_id');\n\t\tforeach($lang_id as $childid => $translation){\n\t\t\t$locale_id = LocaleTranslation::where('translation_id', '=', $childid)->pluck('id');\n\t\t\t$locale = LocaleTranslation::find($locale_id);\n\t\t\t\n\t\t\t$locale->translation = $translation;\n $locale->parent()->dissociate();\n //$locale->parent()->associate()\n\t\t\t$locale->update();\n\t\t}\n\t\t$json['status'] = true;\n\t\t$json['message'] = 'Translation updated!';\n\t\treturn json_encode($json);\n * \n */\n\t}", "title": "" }, { "docid": "4c1f6ff59fb60dde95cd66757b96d1d0", "score": "0.51569074", "text": "function update_translation($postdata,$id){\n\n\t\t\tforeach($postdata as $lang => $val){\n\t\t\t\tif(array_filter($val)){\n\t\t\t\t\t$title = $val['title'];\n\t\t\t\t\t$desc = $val['desc'];\n\t\t\t\t\t$transAvailable = $this->getTicketLevelTranslation($lang,$id);\n\n\t\t\t\t\tif(empty($transAvailable)){\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t'trans_title' => $title,\n\t\t\t\t\t\t\t'trans_desc' => $desc,\n\t\t\t\t\t\t\t'item_id' => $id,\n\t\t\t\t\t\t\t'trans_lang' => $lang\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->db->insert('pt_ticket_levels_translation', $data);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t'trans_title' => $title,\n\t\t\t\t\t\t\t'trans_desc' => $desc,\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->db->where('item_id', $id);\n\t\t\t\t\t\t$this->db->where('trans_lang', $lang);\n\t\t\t\t\t\t$this->db->update('pt_ticket_levels_translation', $data);\n\t\t\t\t\t}\n\t\t\t\t}\n }\n\t\t}", "title": "" }, { "docid": "29aabbe57eb23a5f1940a31ef96bf3e6", "score": "0.512331", "text": "protected function editRow()\n {\n global $Security, $Language;\n $oldKeyFilter = $this->getRecordFilter();\n $filter = $this->applyUserIDFilters($oldKeyFilter);\n $conn = $this->getConnection();\n $this->CurrentFilter = $filter;\n $sql = $this->getCurrentSql();\n $rsold = $conn->fetchAssoc($sql);\n $editRow = false;\n if (!$rsold) {\n $this->setFailureMessage($Language->phrase(\"NoRecord\")); // Set no record message\n $editRow = false; // Update Failed\n } else {\n // Save old values\n $this->loadDbValues($rsold);\n $rsnew = [];\n\n // nik\n $this->nik->setDbValueDef($rsnew, $this->nik->CurrentValue, \"\", $this->nik->ReadOnly);\n\n // skor_aktifitas\n $this->skor_aktifitas->setDbValueDef($rsnew, $this->skor_aktifitas->CurrentValue, null, $this->skor_aktifitas->ReadOnly);\n\n // max_aktifitas\n $this->max_aktifitas->setDbValueDef($rsnew, $this->max_aktifitas->CurrentValue, null, $this->max_aktifitas->ReadOnly);\n\n // skor_kapasitas\n $this->skor_kapasitas->setDbValueDef($rsnew, $this->skor_kapasitas->CurrentValue, null, $this->skor_kapasitas->ReadOnly);\n\n // max_kapasitas\n $this->max_kapasitas->setDbValueDef($rsnew, $this->max_kapasitas->CurrentValue, null, $this->max_kapasitas->ReadOnly);\n\n // skor_pangan\n $this->skor_pangan->setDbValueDef($rsnew, $this->skor_pangan->CurrentValue, null, $this->skor_pangan->ReadOnly);\n\n // max_pangan\n $this->max_pangan->setDbValueDef($rsnew, $this->max_pangan->CurrentValue, null, $this->max_pangan->ReadOnly);\n\n // skor_sni\n $this->skor_sni->setDbValueDef($rsnew, $this->skor_sni->CurrentValue, null, $this->skor_sni->ReadOnly);\n\n // max_sni\n $this->max_sni->setDbValueDef($rsnew, $this->max_sni->CurrentValue, null, $this->max_sni->ReadOnly);\n\n // skor_kemasan\n $this->skor_kemasan->setDbValueDef($rsnew, $this->skor_kemasan->CurrentValue, null, $this->skor_kemasan->ReadOnly);\n\n // max_kemasan\n $this->max_kemasan->setDbValueDef($rsnew, $this->max_kemasan->CurrentValue, null, $this->max_kemasan->ReadOnly);\n\n // skor_bahanbaku\n $this->skor_bahanbaku->setDbValueDef($rsnew, $this->skor_bahanbaku->CurrentValue, null, $this->skor_bahanbaku->ReadOnly);\n\n // max_bahanbaku\n $this->max_bahanbaku->setDbValueDef($rsnew, $this->max_bahanbaku->CurrentValue, null, $this->max_bahanbaku->ReadOnly);\n\n // skor_alat\n $this->skor_alat->setDbValueDef($rsnew, $this->skor_alat->CurrentValue, null, $this->skor_alat->ReadOnly);\n\n // max_alat\n $this->max_alat->setDbValueDef($rsnew, $this->max_alat->CurrentValue, null, $this->max_alat->ReadOnly);\n\n // skor_gudang\n $this->skor_gudang->setDbValueDef($rsnew, $this->skor_gudang->CurrentValue, null, $this->skor_gudang->ReadOnly);\n\n // max_gudang\n $this->max_gudang->setDbValueDef($rsnew, $this->max_gudang->CurrentValue, null, $this->max_gudang->ReadOnly);\n\n // skor_layout\n $this->skor_layout->setDbValueDef($rsnew, $this->skor_layout->CurrentValue, null, $this->skor_layout->ReadOnly);\n\n // max_layout\n $this->max_layout->setDbValueDef($rsnew, $this->max_layout->CurrentValue, null, $this->max_layout->ReadOnly);\n\n // skor_sop\n $this->skor_sop->setDbValueDef($rsnew, $this->skor_sop->CurrentValue, null, $this->skor_sop->ReadOnly);\n\n // max_sop\n $this->max_sop->setDbValueDef($rsnew, $this->max_sop->CurrentValue, null, $this->max_sop->ReadOnly);\n\n // skor_produksi\n $this->skor_produksi->setDbValueDef($rsnew, $this->skor_produksi->CurrentValue, null, $this->skor_produksi->ReadOnly);\n\n // maxskor_produksi\n $this->maxskor_produksi->setDbValueDef($rsnew, $this->maxskor_produksi->CurrentValue, null, $this->maxskor_produksi->ReadOnly);\n\n // bobot_produksi\n $this->bobot_produksi->setDbValueDef($rsnew, $this->bobot_produksi->CurrentValue, 0, $this->bobot_produksi->ReadOnly);\n\n // Call Row Updating event\n $updateRow = $this->rowUpdating($rsold, $rsnew);\n\n // Check for duplicate key when key changed\n if ($updateRow) {\n $newKeyFilter = $this->getRecordFilter($rsnew);\n if ($newKeyFilter != $oldKeyFilter) {\n $rsChk = $this->loadRs($newKeyFilter)->fetch();\n if ($rsChk !== false) {\n $keyErrMsg = str_replace(\"%f\", $newKeyFilter, $Language->phrase(\"DupKey\"));\n $this->setFailureMessage($keyErrMsg);\n $updateRow = false;\n }\n }\n }\n if ($updateRow) {\n if (count($rsnew) > 0) {\n try {\n $editRow = $this->update($rsnew, \"\", $rsold);\n } catch (\\Exception $e) {\n $this->setFailureMessage($e->getMessage());\n }\n } else {\n $editRow = true; // No field to update\n }\n if ($editRow) {\n }\n } else {\n if ($this->getSuccessMessage() != \"\" || $this->getFailureMessage() != \"\") {\n // Use the message, do nothing\n } elseif ($this->CancelMessage != \"\") {\n $this->setFailureMessage($this->CancelMessage);\n $this->CancelMessage = \"\";\n } else {\n $this->setFailureMessage($Language->phrase(\"UpdateCancelled\"));\n }\n $editRow = false;\n }\n }\n\n // Call Row_Updated event\n if ($editRow) {\n $this->rowUpdated($rsold, $rsnew);\n }\n\n // Clean upload path if any\n if ($editRow) {\n }\n\n // Write JSON for API request\n if (IsApi() && $editRow) {\n $row = $this->getRecordsFromRecordset([$rsnew], true);\n WriteJson([\"success\" => true, $this->TableVar => $row]);\n }\n return $editRow;\n }", "title": "" }, { "docid": "620095d035fac867d2bc8a2e2d0846cf", "score": "0.5121046", "text": "public function translateRow($row) {\n foreach ($row as &$label) {\n $label = $this->translate($label);\n }\n return $row;\n }", "title": "" }, { "docid": "cbae7c045e31bfaf1813f53f396ed7bd", "score": "0.5115437", "text": "public function complete($entity, $row) {\n parent::complete($entity, $row);\n // Make sure the messages have the proper timestamp.\n $this->messageInsertSave($entity, $row);\n\n $this->messageUpdateSave($entity, $row);\n }", "title": "" }, { "docid": "bf739ce7df491355b0de2040dfb100eb", "score": "0.507209", "text": "function UpdateRows() {\n\t\tglobal $conn, $mst_material_part;\n\t\t$conn->BeginTrans();\n\t\t$this->WriteAuditTrailDummy(\"*** Batch update begin ***\"); // Batch update begin\n\n\t\t// Get old recordset\n\t\t$mst_material_part->CurrentFilter = $this->BuildKeyFilter();\n\t\t$sSql = $mst_material_part->SQL();\n\t\t$rsold = $conn->Execute($sSql);\n\n\t\t// Update all rows\n\t\t$sKey = \"\";\n\t\tforeach ($this->arRecKeys as $sThisKey) {\n\t\t\t$sThisKey = trim($sThisKey);\n\t\t\tif ($this->SetupKeyValues($sThisKey)) {\n\t\t\t\t$mst_material_part->SendEmail = FALSE; // Do not send email on update success\n\t\t\t\t$UpdateRows = $this->EditRow(); // Update this row\n\t\t\t} else {\n\t\t\t\t$UpdateRows = FALSE;\n\t\t\t}\n\t\t\tif (!$UpdateRows)\n\t\t\t\treturn; // Update failed\n\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t$sKey .= $sThisKey;\n\t\t}\n\n\t\t// Check if all rows updated\n\t\tif ($UpdateRows) {\n\t\t\t$conn->CommitTrans(); // Commit transaction\n\n\t\t\t// Get new recordset\n\t\t\t$rsnew = $conn->Execute($sSql);\n\t\t\t$this->WriteAuditTrailDummy(\"*** Batch update successful ***\"); // Batch update success\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback transaction\n\t\t\t$this->WriteAuditTrailDummy(\"*** Batch update rollback ***\"); // Batch update rollback\n\t\t}\n\t\treturn $UpdateRows;\n\t}", "title": "" }, { "docid": "5d94f7683dee7975436c390441034f47", "score": "0.50328815", "text": "protected function editRow()\n {\n global $Security, $Language;\n $oldKeyFilter = $this->getRecordFilter();\n $filter = $this->applyUserIDFilters($oldKeyFilter);\n $conn = $this->getConnection();\n\n // Load old row\n $this->CurrentFilter = $filter;\n $sql = $this->getCurrentSql();\n $rsold = $conn->fetchAssociative($sql);\n if (!$rsold) {\n $this->setFailureMessage($Language->phrase(\"NoRecord\")); // Set no record message\n return false; // Update Failed\n } else {\n // Save old values\n $this->loadDbValues($rsold);\n $this->background->OldUploadPath = \"certificate/bgs\";\n $this->background->UploadPath = $this->background->OldUploadPath;\n }\n\n // Set new row\n $rsnew = [];\n\n // description\n $this->description->setDbValueDef($rsnew, $this->description->CurrentValue, null, $this->description->ReadOnly);\n\n // background\n if ($this->background->Visible && !$this->background->ReadOnly && !$this->background->Upload->KeepFile) {\n $this->background->Upload->DbValue = $rsold['background']; // Get original value\n if ($this->background->Upload->FileName == \"\") {\n $rsnew['background'] = null;\n } else {\n $rsnew['background'] = $this->background->Upload->FileName;\n }\n }\n\n // title\n $this->_title->setDbValueDef($rsnew, $this->_title->CurrentValue, null, $this->_title->ReadOnly);\n\n // titlePosX\n $this->titlePosX->setDbValueDef($rsnew, $this->titlePosX->CurrentValue, null, $this->titlePosX->ReadOnly);\n\n // titlePosY\n $this->titlePosY->setDbValueDef($rsnew, $this->titlePosY->CurrentValue, null, $this->titlePosY->ReadOnly);\n\n // titleFont\n $this->titleFont->setDbValueDef($rsnew, $this->titleFont->CurrentValue, null, $this->titleFont->ReadOnly);\n\n // titleFontSize\n $this->titleFontSize->setDbValueDef($rsnew, $this->titleFontSize->CurrentValue, null, $this->titleFontSize->ReadOnly);\n\n // titleAlign\n $this->titleAlign->setDbValueDef($rsnew, $this->titleAlign->CurrentValue, null, $this->titleAlign->ReadOnly);\n\n // text01\n $this->text01->setDbValueDef($rsnew, $this->text01->CurrentValue, null, $this->text01->ReadOnly);\n\n // txt01PosX\n $this->txt01PosX->setDbValueDef($rsnew, $this->txt01PosX->CurrentValue, null, $this->txt01PosX->ReadOnly);\n\n // txt01PosY\n $this->txt01PosY->setDbValueDef($rsnew, $this->txt01PosY->CurrentValue, null, $this->txt01PosY->ReadOnly);\n\n // text02\n $this->text02->setDbValueDef($rsnew, $this->text02->CurrentValue, null, $this->text02->ReadOnly);\n\n // txt02PosX\n $this->txt02PosX->setDbValueDef($rsnew, $this->txt02PosX->CurrentValue, null, $this->txt02PosX->ReadOnly);\n\n // txt02PosY\n $this->txt02PosY->setDbValueDef($rsnew, $this->txt02PosY->CurrentValue, null, $this->txt02PosY->ReadOnly);\n\n // textFont\n $this->textFont->setDbValueDef($rsnew, $this->textFont->CurrentValue, null, $this->textFont->ReadOnly);\n\n // textSize\n $this->textSize->setDbValueDef($rsnew, $this->textSize->CurrentValue, null, $this->textSize->ReadOnly);\n\n // studentFont\n $this->studentFont->setDbValueDef($rsnew, $this->studentFont->CurrentValue, null, $this->studentFont->ReadOnly);\n\n // studentSize\n $this->studentSize->setDbValueDef($rsnew, $this->studentSize->CurrentValue, null, $this->studentSize->ReadOnly);\n\n // studentPosX\n $this->studentPosX->setDbValueDef($rsnew, $this->studentPosX->CurrentValue, null, $this->studentPosX->ReadOnly);\n\n // studentPosY\n $this->studentPosY->setDbValueDef($rsnew, $this->studentPosY->CurrentValue, null, $this->studentPosY->ReadOnly);\n\n // instructorFont\n $this->instructorFont->setDbValueDef($rsnew, $this->instructorFont->CurrentValue, null, $this->instructorFont->ReadOnly);\n\n // instructorSize\n $this->instructorSize->setDbValueDef($rsnew, $this->instructorSize->CurrentValue, null, $this->instructorSize->ReadOnly);\n\n // instructorPosX\n $this->instructorPosX->setDbValueDef($rsnew, $this->instructorPosX->CurrentValue, null, $this->instructorPosX->ReadOnly);\n\n // instructorPosY\n $this->instructorPosY->setDbValueDef($rsnew, $this->instructorPosY->CurrentValue, null, $this->instructorPosY->ReadOnly);\n\n // assistantPosX\n $this->assistantPosX->setDbValueDef($rsnew, $this->assistantPosX->CurrentValue, null, $this->assistantPosX->ReadOnly);\n\n // assistantPosY\n $this->assistantPosY->setDbValueDef($rsnew, $this->assistantPosY->CurrentValue, null, $this->assistantPosY->ReadOnly);\n\n // schoolId\n $this->schoolId->setDbValueDef($rsnew, $this->schoolId->CurrentValue, null, $this->schoolId->ReadOnly);\n\n // orientation\n $this->orientation->setDbValueDef($rsnew, $this->orientation->CurrentValue, null, $this->orientation->ReadOnly);\n\n // size\n $this->size->setDbValueDef($rsnew, $this->size->CurrentValue, null, $this->size->ReadOnly);\n\n // martialArtId\n $this->martialArtId->setDbValueDef($rsnew, $this->martialArtId->CurrentValue, null, $this->martialArtId->ReadOnly);\n\n // Update current values\n $this->setCurrentValues($rsnew);\n if ($this->background->Visible && !$this->background->Upload->KeepFile) {\n $this->background->UploadPath = \"certificate/bgs\";\n $oldFiles = EmptyValue($this->background->Upload->DbValue) ? [] : [$this->background->htmlDecode($this->background->Upload->DbValue)];\n if (!EmptyValue($this->background->Upload->FileName)) {\n $newFiles = [$this->background->Upload->FileName];\n $NewFileCount = count($newFiles);\n for ($i = 0; $i < $NewFileCount; $i++) {\n if ($newFiles[$i] != \"\") {\n $file = $newFiles[$i];\n $tempPath = UploadTempPath($this->background, $this->background->Upload->Index);\n if (file_exists($tempPath . $file)) {\n if (Config(\"DELETE_UPLOADED_FILES\")) {\n $oldFileFound = false;\n $oldFileCount = count($oldFiles);\n for ($j = 0; $j < $oldFileCount; $j++) {\n $oldFile = $oldFiles[$j];\n if ($oldFile == $file) { // Old file found, no need to delete anymore\n array_splice($oldFiles, $j, 1);\n $oldFileFound = true;\n break;\n }\n }\n if ($oldFileFound) { // No need to check if file exists further\n continue;\n }\n }\n $file1 = UniqueFilename($this->background->physicalUploadPath(), $file); // Get new file name\n if ($file1 != $file) { // Rename temp file\n while (file_exists($tempPath . $file1) || file_exists($this->background->physicalUploadPath() . $file1)) { // Make sure no file name clash\n $file1 = UniqueFilename([$this->background->physicalUploadPath(), $tempPath], $file1, true); // Use indexed name\n }\n rename($tempPath . $file, $tempPath . $file1);\n $newFiles[$i] = $file1;\n }\n }\n }\n }\n $this->background->Upload->DbValue = empty($oldFiles) ? \"\" : implode(Config(\"MULTIPLE_UPLOAD_SEPARATOR\"), $oldFiles);\n $this->background->Upload->FileName = implode(Config(\"MULTIPLE_UPLOAD_SEPARATOR\"), $newFiles);\n $this->background->setDbValueDef($rsnew, $this->background->Upload->FileName, null, $this->background->ReadOnly);\n }\n }\n\n // Call Row Updating event\n $updateRow = $this->rowUpdating($rsold, $rsnew);\n if ($updateRow) {\n if (count($rsnew) > 0) {\n $this->CurrentFilter = $filter; // Set up current filter\n $editRow = $this->update($rsnew, \"\", $rsold);\n } else {\n $editRow = true; // No field to update\n }\n if ($editRow) {\n if ($this->background->Visible && !$this->background->Upload->KeepFile) {\n $oldFiles = EmptyValue($this->background->Upload->DbValue) ? [] : [$this->background->htmlDecode($this->background->Upload->DbValue)];\n if (!EmptyValue($this->background->Upload->FileName)) {\n $newFiles = [$this->background->Upload->FileName];\n $newFiles2 = [$this->background->htmlDecode($rsnew['background'])];\n $newFileCount = count($newFiles);\n for ($i = 0; $i < $newFileCount; $i++) {\n if ($newFiles[$i] != \"\") {\n $file = UploadTempPath($this->background, $this->background->Upload->Index) . $newFiles[$i];\n if (file_exists($file)) {\n if (@$newFiles2[$i] != \"\") { // Use correct file name\n $newFiles[$i] = $newFiles2[$i];\n }\n if (!$this->background->Upload->SaveToFile($newFiles[$i], true, $i)) { // Just replace\n $this->setFailureMessage($Language->phrase(\"UploadErrMsg7\"));\n return false;\n }\n }\n }\n }\n } else {\n $newFiles = [];\n }\n if (Config(\"DELETE_UPLOADED_FILES\")) {\n foreach ($oldFiles as $oldFile) {\n if ($oldFile != \"\" && !in_array($oldFile, $newFiles)) {\n @unlink($this->background->oldPhysicalUploadPath() . $oldFile);\n }\n }\n }\n }\n }\n } else {\n if ($this->getSuccessMessage() != \"\" || $this->getFailureMessage() != \"\") {\n // Use the message, do nothing\n } elseif ($this->CancelMessage != \"\") {\n $this->setFailureMessage($this->CancelMessage);\n $this->CancelMessage = \"\";\n } else {\n $this->setFailureMessage($Language->phrase(\"UpdateCancelled\"));\n }\n $editRow = false;\n }\n\n // Call Row_Updated event\n if ($editRow) {\n $this->rowUpdated($rsold, $rsnew);\n }\n\n // Clean upload path if any\n if ($editRow) {\n // background\n CleanUploadTempPath($this->background, $this->background->Upload->Index);\n }\n\n // Write JSON for API request\n if (IsApi() && $editRow) {\n $row = $this->getRecordsFromRecordset([$rsnew], true);\n WriteJson([\"success\" => true, $this->TableVar => $row]);\n }\n return $editRow;\n }", "title": "" }, { "docid": "34518ba3b5c07059ec1add7047b4ab1b", "score": "0.50321424", "text": "protected function bundleTranslatedFields(EntityInterface $entity): void\n {\n /** @var array<string, \\Cake\\Datasource\\EntityInterface> $translations */\n $translations = (array)$entity->get('_translations');\n\n if (empty($translations) && !$entity->isDirty('_translations')) {\n return;\n }\n\n $fields = $this->_config['fields'];\n $primaryKey = (array)$this->table->getPrimaryKey();\n $key = $entity->get((string)current($primaryKey));\n $find = [];\n $contents = [];\n\n foreach ($translations as $lang => $translation) {\n foreach ($fields as $field) {\n if (!$translation->isDirty($field)) {\n continue;\n }\n $find[] = ['locale' => $lang, 'field' => $field, 'foreign_key IS' => $key];\n $contents[] = new Entity(['content' => $translation->get($field)], [\n 'useSetters' => false,\n ]);\n }\n }\n\n if (empty($find)) {\n return;\n }\n\n $results = $this->findExistingTranslations($find);\n\n foreach ($find as $i => $translation) {\n if (!empty($results[$i])) {\n $contents[$i]->set('id', $results[$i], ['setter' => false]);\n $contents[$i]->setNew(false);\n } else {\n $translation['model'] = $this->_config['referenceName'];\n $contents[$i]->set($translation, ['setter' => false, 'guard' => false]);\n $contents[$i]->setNew(true);\n }\n }\n\n $entity->set('_i18n', $contents);\n }", "title": "" }, { "docid": "1b64e36dbfeeb248e13e4431a3004ab8", "score": "0.5014906", "text": "function EditRow() {\n\t\tglobal $conn, $Security, $Language;\n\t\t$sFilter = $this->KeyFilter();\n\t\t$this->CurrentFilter = $sFilter;\n\t\t$sSql = $this->SQL();\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE)\n\t\t\treturn FALSE;\n\t\tif ($rs->EOF) {\n\t\t\t$EditRow = FALSE; // Update Failed\n\t\t} else {\n\n\t\t\t// Begin transaction\n\t\t\tif ($this->getCurrentDetailTable() <> \"\")\n\t\t\t\t$conn->BeginTrans();\n\n\t\t\t// Save old values\n\t\t\t$rsold = &$rs->fields;\n\t\t\t$this->LoadDbValues($rsold);\n\t\t\t$rsnew = array();\n\n\t\t\t// numero\n\t\t\t$this->numero->SetDbValueDef($rsnew, $this->numero->CurrentValue, NULL, $this->numero->ReadOnly);\n\n\t\t\t// propietario\n\t\t\t$this->propietario->SetDbValueDef($rsnew, $this->propietario->CurrentValue, NULL, $this->propietario->ReadOnly);\n\n\t\t\t// cuenta\n\t\t\t$this->cuenta->SetDbValueDef($rsnew, $this->cuenta->CurrentValue, NULL, $this->cuenta->ReadOnly);\n\n\t\t\t// monto\n\t\t\t$this->monto->SetDbValueDef($rsnew, $this->monto->CurrentValue, 0, $this->monto->ReadOnly);\n\n\t\t\t// fecha\n\t\t\t$this->fecha->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->fecha->CurrentValue, 7), NULL, $this->fecha->ReadOnly);\n\n\t\t\t// descripcion\n\t\t\t$this->descripcion->SetDbValueDef($rsnew, $this->descripcion->CurrentValue, NULL, $this->descripcion->ReadOnly);\n\n\t\t\t// cheque_estado\n\t\t\t$this->cheque_estado->SetDbValueDef($rsnew, $this->cheque_estado->CurrentValue, \"\", $this->cheque_estado->ReadOnly);\n\n\t\t\t// estado\n\t\t\t$this->estado->SetDbValueDef($rsnew, $this->estado->CurrentValue, \"\", $this->estado->ReadOnly);\n\n\t\t\t// Call Row Updating event\n\t\t\t$bUpdateRow = $this->Row_Updating($rsold, $rsnew);\n\t\t\tif ($bUpdateRow) {\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t\t\tif (count($rsnew) > 0)\n\t\t\t\t\t$EditRow = $this->Update($rsnew, \"\", $rsold);\n\t\t\t\telse\n\t\t\t\t\t$EditRow = TRUE; // No field to update\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($EditRow) {\n\t\t\t\t}\n\n\t\t\t\t// Update detail records\n\t\t\t\tif ($EditRow) {\n\t\t\t\t\t$DetailTblVar = explode(\",\", $this->getCurrentDetailTable());\n\t\t\t\t\tif (in_array(\"pago_cliente\", $DetailTblVar) && $GLOBALS[\"pago_cliente\"]->DetailEdit) {\n\t\t\t\t\t\tif (!isset($GLOBALS[\"pago_cliente_grid\"])) $GLOBALS[\"pago_cliente_grid\"] = new cpago_cliente_grid(); // Get detail page object\n\t\t\t\t\t\t$EditRow = $GLOBALS[\"pago_cliente_grid\"]->GridUpdate();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Commit/Rollback transaction\n\t\t\t\tif ($this->getCurrentDetailTable() <> \"\") {\n\t\t\t\t\tif ($EditRow) {\n\t\t\t\t\t\t$conn->CommitTrans(); // Commit transaction\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$conn->RollbackTrans(); // Rollback transaction\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t\t// Use the message, do nothing\n\t\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->setFailureMessage($Language->Phrase(\"UpdateCancelled\"));\n\t\t\t\t}\n\t\t\t\t$EditRow = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// Call Row_Updated event\n\t\tif ($EditRow)\n\t\t\t$this->Row_Updated($rsold, $rsnew);\n\t\t$rs->Close();\n\t\treturn $EditRow;\n\t}", "title": "" }, { "docid": "98a1d764a09f6e9e5d1f63bdecf253c0", "score": "0.5012191", "text": "public function updateEntries(string $msgid, array $translations): void {\n\t\tif (\n\t\t\t!isset($this->entriesAsArrays[$msgid])\n\t\t\t|| count($translations) !== count($this->entriesAsArrays[$msgid]['msgstr'])\n\t\t) {\n\t\t\tthrow new Exception('Cannot update entry translation');\n\t\t}\n\t\t$this->removeFuzzyFlagForMsgId($msgid);\n\t\t$this->entriesAsArrays[$msgid]['msgstr'] = $translations;\n\t}", "title": "" }, { "docid": "271271b98f41f4438cd4a6592dd9bb61", "score": "0.5003997", "text": "public function updateTranslation(Request $request) {\n $translations = json_decode($request->translations);\n\n foreach ($translations as $item) {\n $translation = Translation::find($item->id);\n\n if ($translation)\n $translation->update([\n \"word_en\" => $item->word_en,\n \"word_ar\" => $item->word_ar,\n ]);\n }\n\n\n return Message::success(Message::$DONE);\n }", "title": "" }, { "docid": "0658e43a4af392dd64616d6bb91cf288", "score": "0.49857408", "text": "private function UpdateEstado() {\n $ConsultaEstado = new SqlDataProvider([\n 'sql' => 'SELECT id FROM Archivos WHERE Estado=:Estado',\n 'params' => [':Estado' => \"subidos\"],\n ]);\n $result = $ConsultaEstado->getModels();\n $count = $ConsultaEstado->getCount();\n for ($i = 0; $i <= ($count - 1); $i++) {\n $id = $result[$i];\n foreach ($id as $idE) {\n $Archivo = Archivos::findOne($idE);\n $Archivo->Estado = \"Procesado\";\n $Archivo->update();\n }\n }\n $Archivo = Archivos::findOne($idE);\n }", "title": "" }, { "docid": "03a6e485178692c1aaa189b48e0e032f", "score": "0.49850142", "text": "function setStatus() {\n $this->_initContentLanguage();\n $success = $this->setArticleStatus(\n $this->params['article'],\n $this->language,\n $this->params['status']\n );\n if (FALSE !== $success) {\n $this->addMsg(\n MSG_INFO,\n sprintf(\n $this->_gt('Set status of article \"%s\" to %s'),\n $this->params['article'],\n $this->_gt($this->status[$this->params['status']])\n )\n );\n } else {\n $this->addMsg(MSG_ERROR, $this->_gt('Status change failed'));\n }\n }", "title": "" }, { "docid": "d7f384c958356fd4ef1c095d5a9b835d", "score": "0.4979183", "text": "public function update() {\n\t\t// temporary disable relations\n\t\t$tmp_relations = $this->relations;\n\t\t$this->relations = array ();\n\t\t\n\t\t// Build query and execute update\n\t\t$query = \\DB::update ( call_user_func ( $this->model . '::table' ) );\n\t\t$tmp = $this->build_query ( $query, array (), 'update' );\n\t\t$query = $tmp ['query'];\n\t\t$res = $query->set ( $this->values )->execute ( $this->write_connection );\n\t\t\n\t\t// put back any relations settings\n\t\t$this->relations = $tmp_relations;\n\t\t\n\t\t// Update can affect 0 rows when input types are different but outcome stays the same\n\t\treturn $res >= 0;\n\t}", "title": "" }, { "docid": "9b62293a385930d3fdba7daff8405938", "score": "0.4964034", "text": "public function updateNonTranslatableFieldsInOtherLanguages()\n\t{\n\t\t$updatedIds = [];\n\t\t\n\t\t// For performance concerns,\n\t\t// Don't perform this action during languages setup.\n\t\tif (Str::contains(Route::currentRouteAction(), 'Admin\\app\\Http\\Controllers\\LanguageController')) {\n\t\t\treturn $updatedIds;\n\t\t}\n\t\t\n\t\t// Don't perform this action for non-translatable models.\n\t\tif (!isTranlatableModel($this)) {\n\t\t\treturn $updatedIds;\n\t\t}\n\t\t\n\t\t// Perform this action for default language entries only, to prevent infinite recursion.\n\t\t// NOTE: The primary key and the 'translation_of' field value are equal for the default language.\n\t\tif ($this->getKey() == $this->translation_of) {\n\t\t\t// Don't select the current translated entry to prevent infinite recursion\n\t\t\t$currentEntryInOtherLanguages = self::where($this->getKeyName(), '!=', $this->getKey())->where('translation_of', $this->translation_of)->get();\n\t\t\t\n\t\t\t// Copy-Paste for all languages\n\t\t\tif (!empty($currentEntryInOtherLanguages)) {\n\t\t\t\t// Get values to update in other languages\n\t\t\t\t$valuesToStore = $this->toArray();\n\t\t\t\tif (isset($valuesToStore[$this->getKeyName()])) {\n\t\t\t\t\tunset($valuesToStore[$this->getKeyName()]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Get protected fields that will ben not updated in other languages\n\t\t\t\t$protectedFields = array_merge([$this->getKeyName(), 'translation_lang', 'translation_of'], $this->translatable);\n\t\t\t\t\n\t\t\t\tforeach ($currentEntryInOtherLanguages as $entry) {\n\t\t\t\t\t$canSave = false;\n\t\t\t\t\tforeach ($valuesToStore as $field => $value) {\n\t\t\t\t\t\t// Reject all non fillable fields\n\t\t\t\t\t\tif (!$this->isFillable($field)) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Don't overwrite translatable data\n\t\t\t\t\t\tif (in_array($field, $protectedFields)) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Update only if fields value is different\n\t\t\t\t\t\tif (md5($entry->{$field}) != md5($value)) {\n\t\t\t\t\t\t\t$entry->{$field} = $value;\n\t\t\t\t\t\t\t$canSave = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($canSave) {\n\t\t\t\t\t\t$entry->save();\n\t\t\t\t\t\t$updatedIds[] = $entry->getKey();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $updatedIds;\n\t}", "title": "" }, { "docid": "aaaf81eec2622c3020ff81dd3a41cd16", "score": "0.496134", "text": "public function testVariousTableUpdates() {\n // We want to test the following permutations of entity definition updates:\n // base <-> base + translation\n // base + translation <-> base + translation + revision\n // base + revision <-> base + translation + revision\n // base <-> base + revision\n // base <-> base + translation + revision\n\n // base <-> base + translation\n $this->updateEntityTypeToTranslatable(TRUE);\n [$view, $display] = $this->getUpdatedViewAndDisplay();\n\n $this->assertEquals('entity_test_update', $view->get('base_table'));\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['id']['table']);\n $this->assertEquals('entity_test_update_data', $display['display_options']['fields']['name']['table']);\n\n $this->updateEntityTypeToNotTranslatable(TRUE);\n [$view, $display] = $this->getUpdatedViewAndDisplay();\n\n $this->assertEquals('entity_test_update', $view->get('base_table'));\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['id']['table']);\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['name']['table']);\n\n $this->resetEntityType();\n\n // base + translation <-> base + translation + revision\n $this->updateEntityTypeToTranslatable(TRUE);\n [$view, $display] = $this->getUpdatedViewAndDisplay();\n\n $this->assertEquals('entity_test_update', $view->get('base_table'));\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['id']['table']);\n $this->assertEquals('entity_test_update_data', $display['display_options']['fields']['name']['table']);\n\n $this->updateEntityTypeToRevisionable(TRUE);\n [$view, $display] = $this->getUpdatedViewAndDisplay();\n\n $this->assertEquals('entity_test_update', $view->get('base_table'));\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['id']['table']);\n $this->assertEquals('entity_test_update_data', $display['display_options']['fields']['name']['table']);\n\n $this->updateEntityTypeToNotRevisionable(TRUE);\n [$view, $display] = $this->getUpdatedViewAndDisplay();\n\n $this->assertEquals('entity_test_update', $view->get('base_table'));\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['id']['table']);\n $this->assertEquals('entity_test_update_data', $display['display_options']['fields']['name']['table']);\n\n $this->resetEntityType();\n\n // base + revision <-> base + translation + revision\n $this->updateEntityTypeToRevisionable();\n [$view, $display] = $this->getUpdatedViewAndDisplay();\n\n $this->assertEquals('entity_test_update', $view->get('base_table'));\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['id']['table']);\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['name']['table']);\n\n $this->updateEntityTypeToTranslatable(TRUE);\n [$view, $display] = $this->getUpdatedViewAndDisplay();\n\n $this->assertEquals('entity_test_update', $view->get('base_table'));\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['id']['table']);\n $this->assertEquals('entity_test_update_data', $display['display_options']['fields']['name']['table']);\n\n $this->updateEntityTypeToNotTranslatable(TRUE);\n [$view, $display] = $this->getUpdatedViewAndDisplay();\n\n $this->assertEquals('entity_test_update', $view->get('base_table'));\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['id']['table']);\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['name']['table']);\n\n $this->resetEntityType();\n\n // base <-> base + revision\n $this->updateEntityTypeToRevisionable(TRUE);\n [$view, $display] = $this->getUpdatedViewAndDisplay();\n\n $this->assertEquals('entity_test_update', $view->get('base_table'));\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['id']['table']);\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['name']['table']);\n\n $this->updateEntityTypeToNotRevisionable(TRUE);\n [$view, $display] = $this->getUpdatedViewAndDisplay();\n\n $this->assertEquals('entity_test_update', $view->get('base_table'));\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['id']['table']);\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['name']['table']);\n\n $this->resetEntityType();\n\n // base <-> base + translation + revision\n $this->updateEntityTypeToRevisionable(TRUE);\n $this->updateEntityTypeToTranslatable(TRUE);\n [$view, $display] = $this->getUpdatedViewAndDisplay();\n\n $this->assertEquals('entity_test_update', $view->get('base_table'));\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['id']['table']);\n $this->assertEquals('entity_test_update_data', $display['display_options']['fields']['name']['table']);\n\n $this->updateEntityTypeToNotRevisionable(TRUE);\n $this->updateEntityTypeToNotTranslatable(TRUE);\n [$view, $display] = $this->getUpdatedViewAndDisplay();\n\n $this->assertEquals('entity_test_update', $view->get('base_table'));\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['id']['table']);\n $this->assertEquals('entity_test_update', $display['display_options']['fields']['name']['table']);\n\n // Check that only the impacted views have been updated.\n $this->assertUpdatedViews([\n 'test_view_entity_test',\n 'test_view_entity_test_data',\n 'test_view_entity_test_revision',\n ]);\n }", "title": "" }, { "docid": "cd5d08462535a4404107ffa87c19046f", "score": "0.49515522", "text": "public function UpdateRow()\n {\n\n $this->onBeforeUpdate();\n\n\n if (($validation = $this->Validate()) !== true) return $validation;\n\n\n\n $params = [];\n\n $param_value = [];\n\n $id_placeholder = \"\";\n\n\n foreach ($this->Fields() as $fld) :\n\n /**@var $fld Field*/\n\n if ( isset( $fld[Field::AUTO_INCREMENT] ) && $fld[Field::AUTO_INCREMENT] ) continue;\n\n if ($fld->ReadOnly) continue;\n\n\n\n $named_placeholder = $fld->WhereClausePrepareValue(\":{$fld->Name}\", true);\n\n\n if ($fld->IsID)\n\n $id_placeholder = $named_placeholder;\n\n\n $params[] = \"`{$fld->Name}` = {$named_placeholder}\";\n\n\n $param_value[$fld->Name] = [$fld->Value === '' ? null : $fld->Value, $fld->Type];\n\n\n endforeach;\n\n /** @noinspection SqlNoDataSourceInspection */\n /** @noinspection SqlResolve */\n $sql=\"UPDATE {$this->TableName()} SET \".join(\", \", $params).\" WHERE `{$this->ID['name']}` = {$id_placeholder}\";\n\n //dd($sql);\n\n //dd($param_value);\n\n $res = $this->ActiveConnection()->Cmd( $sql, $param_value ) ? Msg::DBOK : Msg::DBERR;\n\n $this->onSave($res);\n\n $this->onUpdate($res);\n\n return $res;\n }", "title": "" }, { "docid": "f32435e9e2465c42b0312110f1b9cbed", "score": "0.49441436", "text": "public function testUpdateImportSourceLocal() {\n $config = $this->config('locale.settings');\n\n // Build the test environment.\n $this->setTranslationFiles();\n $this->setCurrentTranslations();\n $config->set('translation.default_filename', '%project-%version.%language._po');\n\n // Set the update conditions for this test.\n $edit = [\n 'use_source' => LOCALE_TRANSLATION_USE_SOURCE_LOCAL,\n 'overwrite' => LOCALE_TRANSLATION_OVERWRITE_ALL,\n ];\n $this->drupalGet('admin/config/regional/translate/settings');\n $this->submitForm($edit, 'Save configuration');\n\n // Execute the translation update.\n $this->drupalGet('admin/reports/translations/check');\n $this->drupalGet('admin/reports/translations');\n $this->submitForm([], 'Update translations');\n\n // Check if the translation has been updated, using the status cache.\n $status = locale_translation_get_status();\n $this->assertEquals(LOCALE_TRANSLATION_CURRENT, $status['contrib_module_one']['de']->type, 'Translation of contrib_module_one found');\n $this->assertEquals(LOCALE_TRANSLATION_CURRENT, $status['contrib_module_two']['de']->type, 'Translation of contrib_module_two found');\n $this->assertEquals(LOCALE_TRANSLATION_CURRENT, $status['contrib_module_three']['de']->type, 'Translation of contrib_module_three found');\n\n // Check the new translation status.\n // The static cache needs to be flushed first to get the most recent data\n // from the database. The function was called earlier during this test.\n drupal_static_reset('locale_translation_get_file_history');\n $history = locale_translation_get_file_history();\n // Verify that the translation of contrib_module_one is imported.\n $this->assertGreaterThanOrEqual($this->timestampMedium, $history['contrib_module_one']['de']->timestamp);\n $this->assertEquals($this->timestampMedium, $history['contrib_module_one']['de']->last_checked, 'Translation of contrib_module_one is updated');\n $this->assertEquals($this->timestampNew, $history['contrib_module_two']['de']->timestamp, 'Translation of contrib_module_two is imported');\n // Verify that the translation of contrib_module_two is updated.\n $this->assertGreaterThanOrEqual($this->timestampNow, $history['contrib_module_two']['de']->last_checked);\n $this->assertEquals($this->timestampMedium, $history['contrib_module_three']['de']->timestamp, 'Translation of contrib_module_three is not imported');\n $this->assertEquals($this->timestampMedium, $history['contrib_module_three']['de']->last_checked, 'Translation of contrib_module_three is not updated');\n\n // Check whether existing translations have (not) been overwritten.\n // cSpell:disable\n $this->assertEquals('Januar_customized', t('January', [], ['langcode' => 'de']), 'Translation of January');\n $this->assertEquals('Februar_2', t('February', [], ['langcode' => 'de']), 'Translation of February');\n $this->assertEquals('Marz_2', t('March', [], ['langcode' => 'de']), 'Translation of March');\n $this->assertEquals('April_2', t('April', [], ['langcode' => 'de']), 'Translation of April');\n $this->assertEquals('Mai_customized', t('May', [], ['langcode' => 'de']), 'Translation of May');\n $this->assertEquals('Juni', t('June', [], ['langcode' => 'de']), 'Translation of June');\n $this->assertEquals('Montag', t('Monday', [], ['langcode' => 'de']), 'Translation of Monday');\n // cSpell:enable\n }", "title": "" }, { "docid": "95306427a3ac1b8356f00d1b3fa9dae6", "score": "0.493336", "text": "public function updateEntityLanguage( int $_entityId, string $_languageCode ): void;", "title": "" }, { "docid": "21446ed0f58db9ad84b1460d8bc9acb8", "score": "0.4927195", "text": "public function saveTranslations()\n {\n $res = true;\n foreach ($this->_models as $model) {\n $dirty = $model->getDirtyAttributes();\n if (empty($dirty)) {\n continue;\n }\n /** @var \\yii\\db\\ActiveQuery $relation */\n $relation = $this->owner->getRelation($this->relation);\n $model->{key($relation->link)} = $this->owner->getPrimaryKey();\n\n //Is translation valid?\n if (!$this->isTranslationActive($model)) {\n $this->deleteTranslation($model);\n continue;\n }\n\n if (!$model->save()) {\n $res = false;\n }\n }\n return $res;\n }", "title": "" }, { "docid": "6804d613c6a078e9f2503999a2ea2703", "score": "0.49115816", "text": "protected function updateEntitySubmissionStatus($targetStoreIds)\n {\n $statusesByStores = $this->translationStatusResource->getForTypeAndEntity($this->getEntityTypeId(), $this->getEntityId(), $targetStoreIds);\n foreach ($statusesByStores as $status) {\n $storeId = $status['store_view_id'];\n switch ($status['translation_status']) {\n case TranslationStatus::STATUS_ENTITY_TRANSLATION_REQUIRED:\n // do not change status\n $targetStoreIds = array_diff($targetStoreIds, [$storeId]);\n break;\n\n case TranslationStatus::STATUS_ENTITY_IN_PROGRESS:\n $items = $this->getCollection();\n $items->addFieldToFilter('entity_id', $this->getEntityId());\n $items->addFieldToFilter('entity_type_id', $this->getEntityTypeId());\n $items->addFieldToFilter('target_stores', ['like' => '%,' . $storeId . ',%']);\n $items->setOrder('id', 'desc');\n $items->setPageSize(1)->setCurPage(1);\n foreach ($items as $item) {\n if ($this->getId() != $item->getId()) {\n // applied item is not last from all which were created for the entity\n // so do not change status\n $targetStoreIds = array_diff($targetStoreIds, [$storeId]);\n }\n }\n break;\n }\n }\n $allEntities[$this->getEntityTypeId()] = [$this->getEntityId()];\n $this->translationStatusResource->moveToTranslated($allEntities, $targetStoreIds);\n }", "title": "" }, { "docid": "78d84980a8fae5d418f568b977c3cd20", "score": "0.48983273", "text": "public function markAsUpdated()\n\t{\n\t\t$this->row->markAsUpdated();\n\t}", "title": "" }, { "docid": "eccf5724f35e0ff982344ebf47b36430", "score": "0.48819447", "text": "public function status_update()\n {\n\n // insert query\n $query = \"UPDATE \" . $this->table_name . \"\n SET\n status = :status\n WHERE id = :id\";\n\n // prepare the query\n $stmt = $this->conn->prepare($query);\n\n // sanitize\n $this->status = htmlspecialchars(strip_tags($this->status));\n\n // bind the values\n $stmt->bindParam(':status', $this->status);\n $stmt->bindParam(':id', $this->id);\n\n // execute the query, also check if query was successful\n if($stmt->execute()){\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "d56e1311e60cdc41220f907a000656e9", "score": "0.48753652", "text": "protected function editRow()\n {\n global $Security, $Language;\n $oldKeyFilter = $this->getRecordFilter();\n $filter = $this->applyUserIDFilters($oldKeyFilter);\n $conn = $this->getConnection();\n\n // Load old row\n $this->CurrentFilter = $filter;\n $sql = $this->getCurrentSql();\n $rsold = $conn->fetchAssociative($sql);\n if (!$rsold) {\n $this->setFailureMessage($Language->phrase(\"NoRecord\")); // Set no record message\n return false; // Update Failed\n } else {\n // Save old values\n $this->loadDbValues($rsold);\n $this->photo->OldUploadPath = \"files/fotos\";\n $this->photo->UploadPath = $this->photo->OldUploadPath;\n }\n\n // Set new row\n $rsnew = [];\n\n // name\n $this->name->setDbValueDef($rsnew, $this->name->CurrentValue, null, $this->name->ReadOnly);\n\n // lastName\n $this->lastName->setDbValueDef($rsnew, $this->lastName->CurrentValue, null, $this->lastName->ReadOnly);\n\n // birthdate\n $this->birthdate->setDbValueDef($rsnew, UnFormatDateTime($this->birthdate->CurrentValue, $this->birthdate->formatPattern()), null, $this->birthdate->ReadOnly);\n\n // gender\n $this->gender->setDbValueDef($rsnew, $this->gender->CurrentValue, null, $this->gender->ReadOnly);\n\n // address\n $this->address->setDbValueDef($rsnew, $this->address->CurrentValue, null, $this->address->ReadOnly);\n\n // neighborhood\n $this->neighborhood->setDbValueDef($rsnew, $this->neighborhood->CurrentValue, null, $this->neighborhood->ReadOnly);\n\n // countryId\n $this->countryId->setDbValueDef($rsnew, $this->countryId->CurrentValue, null, $this->countryId->ReadOnly);\n\n // UFId\n $this->UFId->setDbValueDef($rsnew, $this->UFId->CurrentValue, null, $this->UFId->ReadOnly);\n\n // cityId\n $this->cityId->setDbValueDef($rsnew, $this->cityId->CurrentValue, null, $this->cityId->ReadOnly);\n\n // zip\n $this->zip->setDbValueDef($rsnew, $this->zip->CurrentValue, null, $this->zip->ReadOnly);\n\n // celphone\n $this->celphone->setDbValueDef($rsnew, $this->celphone->CurrentValue, null, $this->celphone->ReadOnly);\n\n // email\n $this->_email->setDbValueDef($rsnew, $this->_email->CurrentValue, null, $this->_email->ReadOnly);\n\n // facebook\n $this->facebook->setDbValueDef($rsnew, $this->facebook->CurrentValue, null, $this->facebook->ReadOnly);\n\n // instagram\n $this->instagram->setDbValueDef($rsnew, $this->instagram->CurrentValue, null, $this->instagram->ReadOnly);\n\n // father\n $this->father->setDbValueDef($rsnew, $this->father->CurrentValue, null, $this->father->ReadOnly);\n\n // fatherCellphone\n $this->fatherCellphone->setDbValueDef($rsnew, $this->fatherCellphone->CurrentValue, null, $this->fatherCellphone->ReadOnly);\n\n // receiveSmsFather\n $this->receiveSmsFather->setDbValueDef($rsnew, $this->receiveSmsFather->CurrentValue, null, $this->receiveSmsFather->ReadOnly);\n\n // fatherEmail\n $this->fatherEmail->setDbValueDef($rsnew, $this->fatherEmail->CurrentValue, null, $this->fatherEmail->ReadOnly);\n\n // receiveEmailFather\n $this->receiveEmailFather->setDbValueDef($rsnew, $this->receiveEmailFather->CurrentValue, null, $this->receiveEmailFather->ReadOnly);\n\n // fatherOccupation\n $this->fatherOccupation->setDbValueDef($rsnew, $this->fatherOccupation->CurrentValue, null, $this->fatherOccupation->ReadOnly);\n\n // fatherBirthdate\n $this->fatherBirthdate->setDbValueDef($rsnew, UnFormatDateTime($this->fatherBirthdate->CurrentValue, $this->fatherBirthdate->formatPattern()), null, $this->fatherBirthdate->ReadOnly);\n\n // mother\n $this->mother->setDbValueDef($rsnew, $this->mother->CurrentValue, null, $this->mother->ReadOnly);\n\n // motherCellphone\n $this->motherCellphone->setDbValueDef($rsnew, $this->motherCellphone->CurrentValue, null, $this->motherCellphone->ReadOnly);\n\n // receiveSmsMother\n $this->receiveSmsMother->setDbValueDef($rsnew, $this->receiveSmsMother->CurrentValue, null, $this->receiveSmsMother->ReadOnly);\n\n // motherEmail\n $this->motherEmail->setDbValueDef($rsnew, $this->motherEmail->CurrentValue, null, $this->motherEmail->ReadOnly);\n\n // receiveEmailMother\n $this->receiveEmailMother->setDbValueDef($rsnew, $this->receiveEmailMother->CurrentValue, null, $this->receiveEmailMother->ReadOnly);\n\n // motherOccupation\n $this->motherOccupation->setDbValueDef($rsnew, $this->motherOccupation->CurrentValue, null, $this->motherOccupation->ReadOnly);\n\n // motherBirthdate\n $this->motherBirthdate->setDbValueDef($rsnew, UnFormatDateTime($this->motherBirthdate->CurrentValue, $this->motherBirthdate->formatPattern()), null, $this->motherBirthdate->ReadOnly);\n\n // emergencyContact\n $this->emergencyContact->setDbValueDef($rsnew, $this->emergencyContact->CurrentValue, null, $this->emergencyContact->ReadOnly);\n\n // emergencyFone\n $this->emergencyFone->setDbValueDef($rsnew, $this->emergencyFone->CurrentValue, null, $this->emergencyFone->ReadOnly);\n\n // obs\n $this->obs->setDbValueDef($rsnew, $this->obs->CurrentValue, null, $this->obs->ReadOnly);\n\n // modalityId\n $this->modalityId->setDbValueDef($rsnew, $this->modalityId->CurrentValue, null, $this->modalityId->ReadOnly);\n\n // instructorStatus\n $tmpBool = $this->instructorStatus->CurrentValue;\n if ($tmpBool != \"1\" && $tmpBool != \"0\") {\n $tmpBool = !empty($tmpBool) ? \"1\" : \"0\";\n }\n $this->instructorStatus->setDbValueDef($rsnew, $tmpBool, null, $this->instructorStatus->ReadOnly);\n\n // martialArtId\n $this->martialArtId->setDbValueDef($rsnew, $this->martialArtId->CurrentValue, null, $this->martialArtId->ReadOnly);\n\n // rankId\n $this->rankId->setDbValueDef($rsnew, $this->rankId->CurrentValue, null, $this->rankId->ReadOnly);\n\n // schoolId\n if ($this->schoolId->getSessionValue() != \"\") {\n $this->schoolId->ReadOnly = true;\n }\n $this->schoolId->setDbValueDef($rsnew, $this->schoolId->CurrentValue, 0, $this->schoolId->ReadOnly);\n\n // memberStatusId\n $this->memberStatusId->setDbValueDef($rsnew, $this->memberStatusId->CurrentValue, 0, $this->memberStatusId->ReadOnly);\n\n // photo\n if ($this->photo->Visible && !$this->photo->ReadOnly && !$this->photo->Upload->KeepFile) {\n $this->photo->Upload->DbValue = $rsold['photo']; // Get original value\n if ($this->photo->Upload->FileName == \"\") {\n $rsnew['photo'] = null;\n } else {\n $rsnew['photo'] = $this->photo->Upload->FileName;\n }\n $this->photo->ImageWidth = 300; // Resize width\n $this->photo->ImageHeight = 0; // Resize height\n }\n\n // beltSize\n $this->beltSize->setDbValueDef($rsnew, $this->beltSize->CurrentValue, null, $this->beltSize->ReadOnly);\n\n // dobokSize\n $this->dobokSize->setDbValueDef($rsnew, $this->dobokSize->CurrentValue, null, $this->dobokSize->ReadOnly);\n\n // memberLevelId\n $this->memberLevelId->setDbValueDef($rsnew, $this->memberLevelId->CurrentValue, 0, $this->memberLevelId->ReadOnly);\n\n // instructorLevelId\n $this->instructorLevelId->setDbValueDef($rsnew, $this->instructorLevelId->CurrentValue, null, $this->instructorLevelId->ReadOnly);\n\n // judgeLevelId\n $this->judgeLevelId->setDbValueDef($rsnew, $this->judgeLevelId->CurrentValue, null, $this->judgeLevelId->ReadOnly);\n\n // createDate\n $this->createDate->CurrentValue = CurrentDate();\n $this->createDate->setDbValueDef($rsnew, $this->createDate->CurrentValue, null);\n\n // createUserId\n $this->createUserId->CurrentValue = GetLoggedUserID();\n $this->createUserId->setDbValueDef($rsnew, $this->createUserId->CurrentValue, null);\n\n // lastUpdate\n $this->lastUpdate->CurrentValue = CurrentDate();\n $this->lastUpdate->setDbValueDef($rsnew, $this->lastUpdate->CurrentValue, null);\n\n // lastUserId\n $this->lastUserId->CurrentValue = GetLoggedUserID();\n $this->lastUserId->setDbValueDef($rsnew, $this->lastUserId->CurrentValue, null);\n\n // marketingSourceId\n $this->marketingSourceId->setDbValueDef($rsnew, $this->marketingSourceId->CurrentValue, null, $this->marketingSourceId->ReadOnly);\n\n // marketingSourceDetail\n $this->marketingSourceDetail->setDbValueDef($rsnew, $this->marketingSourceDetail->CurrentValue, null, $this->marketingSourceDetail->ReadOnly);\n\n // Update current values\n $this->setCurrentValues($rsnew);\n if ($this->photo->Visible && !$this->photo->Upload->KeepFile) {\n $this->photo->UploadPath = \"files/fotos\";\n $oldFiles = EmptyValue($this->photo->Upload->DbValue) ? [] : [$this->photo->htmlDecode($this->photo->Upload->DbValue)];\n if (!EmptyValue($this->photo->Upload->FileName)) {\n $newFiles = [$this->photo->Upload->FileName];\n $NewFileCount = count($newFiles);\n for ($i = 0; $i < $NewFileCount; $i++) {\n if ($newFiles[$i] != \"\") {\n $file = $newFiles[$i];\n $tempPath = UploadTempPath($this->photo, $this->photo->Upload->Index);\n if (file_exists($tempPath . $file)) {\n if (Config(\"DELETE_UPLOADED_FILES\")) {\n $oldFileFound = false;\n $oldFileCount = count($oldFiles);\n for ($j = 0; $j < $oldFileCount; $j++) {\n $oldFile = $oldFiles[$j];\n if ($oldFile == $file) { // Old file found, no need to delete anymore\n array_splice($oldFiles, $j, 1);\n $oldFileFound = true;\n break;\n }\n }\n if ($oldFileFound) { // No need to check if file exists further\n continue;\n }\n }\n $file1 = UniqueFilename($this->photo->physicalUploadPath(), $file); // Get new file name\n if ($file1 != $file) { // Rename temp file\n while (file_exists($tempPath . $file1) || file_exists($this->photo->physicalUploadPath() . $file1)) { // Make sure no file name clash\n $file1 = UniqueFilename([$this->photo->physicalUploadPath(), $tempPath], $file1, true); // Use indexed name\n }\n rename($tempPath . $file, $tempPath . $file1);\n $newFiles[$i] = $file1;\n }\n }\n }\n }\n $this->photo->Upload->DbValue = empty($oldFiles) ? \"\" : implode(Config(\"MULTIPLE_UPLOAD_SEPARATOR\"), $oldFiles);\n $this->photo->Upload->FileName = implode(Config(\"MULTIPLE_UPLOAD_SEPARATOR\"), $newFiles);\n $this->photo->setDbValueDef($rsnew, $this->photo->Upload->FileName, null, $this->photo->ReadOnly);\n }\n }\n\n // Call Row Updating event\n $updateRow = $this->rowUpdating($rsold, $rsnew);\n if ($updateRow) {\n if (count($rsnew) > 0) {\n $this->CurrentFilter = $filter; // Set up current filter\n $editRow = $this->update($rsnew, \"\", $rsold);\n } else {\n $editRow = true; // No field to update\n }\n if ($editRow) {\n if ($this->photo->Visible && !$this->photo->Upload->KeepFile) {\n $oldFiles = EmptyValue($this->photo->Upload->DbValue) ? [] : [$this->photo->htmlDecode($this->photo->Upload->DbValue)];\n if (!EmptyValue($this->photo->Upload->FileName)) {\n $newFiles = [$this->photo->Upload->FileName];\n $newFiles2 = [$this->photo->htmlDecode($rsnew['photo'])];\n $newFileCount = count($newFiles);\n for ($i = 0; $i < $newFileCount; $i++) {\n if ($newFiles[$i] != \"\") {\n $file = UploadTempPath($this->photo, $this->photo->Upload->Index) . $newFiles[$i];\n if (file_exists($file)) {\n if (@$newFiles2[$i] != \"\") { // Use correct file name\n $newFiles[$i] = $newFiles2[$i];\n }\n if (!$this->photo->Upload->ResizeAndSaveToFile($this->photo->ImageWidth, $this->photo->ImageHeight, 100, $newFiles[$i], true, $i)) {\n $this->setFailureMessage($Language->phrase(\"UploadErrMsg7\"));\n return false;\n }\n }\n }\n }\n } else {\n $newFiles = [];\n }\n if (Config(\"DELETE_UPLOADED_FILES\")) {\n foreach ($oldFiles as $oldFile) {\n if ($oldFile != \"\" && !in_array($oldFile, $newFiles)) {\n @unlink($this->photo->oldPhysicalUploadPath() . $oldFile);\n }\n }\n }\n }\n }\n } else {\n if ($this->getSuccessMessage() != \"\" || $this->getFailureMessage() != \"\") {\n // Use the message, do nothing\n } elseif ($this->CancelMessage != \"\") {\n $this->setFailureMessage($this->CancelMessage);\n $this->CancelMessage = \"\";\n } else {\n $this->setFailureMessage($Language->phrase(\"UpdateCancelled\"));\n }\n $editRow = false;\n }\n\n // Call Row_Updated event\n if ($editRow) {\n $this->rowUpdated($rsold, $rsnew);\n }\n\n // Clean upload path if any\n if ($editRow) {\n // photo\n CleanUploadTempPath($this->photo, $this->photo->Upload->Index);\n }\n\n // Write JSON for API request\n if (IsApi() && $editRow) {\n $row = $this->getRecordsFromRecordset([$rsnew], true);\n WriteJson([\"success\" => true, $this->TableVar => $row]);\n }\n return $editRow;\n }", "title": "" }, { "docid": "6d95e5c4261ec2a26b23172d575111a5", "score": "0.4856753", "text": "public function testUpdateImportModeNonCustomized() {\n $config = $this->config('locale.settings');\n\n // Build the test environment.\n $this->setTranslationFiles();\n $this->setCurrentTranslations();\n $config->set('translation.default_filename', '%project-%version.%language._po');\n\n // Set the test conditions.\n $edit = [\n 'use_source' => LOCALE_TRANSLATION_USE_SOURCE_REMOTE_AND_LOCAL,\n 'overwrite' => LOCALE_TRANSLATION_OVERWRITE_NON_CUSTOMIZED,\n ];\n $this->drupalGet('admin/config/regional/translate/settings');\n $this->submitForm($edit, 'Save configuration');\n\n // Execute translation update.\n $this->drupalGet('admin/reports/translations/check');\n $this->drupalGet('admin/reports/translations');\n $this->submitForm([], 'Update translations');\n\n // Check whether existing translations have (not) been overwritten.\n // cSpell:disable\n $this->assertEquals('Januar_customized', t('January', [], ['langcode' => 'de']), 'Translation of January');\n $this->assertEquals('Februar_customized', t('February', [], ['langcode' => 'de']), 'Translation of February');\n $this->assertEquals('Marz_2', t('March', [], ['langcode' => 'de']), 'Translation of March');\n $this->assertEquals('April_2', t('April', [], ['langcode' => 'de']), 'Translation of April');\n $this->assertEquals('Mai_customized', t('May', [], ['langcode' => 'de']), 'Translation of May');\n $this->assertEquals('Juni', t('June', [], ['langcode' => 'de']), 'Translation of June');\n $this->assertEquals('Montag', t('Monday', [], ['langcode' => 'de']), 'Translation of Monday');\n // cSpell:enable\n }", "title": "" }, { "docid": "1a6ce664606df59709a9d5ebc9692653", "score": "0.4853592", "text": "public function testUpdateImportModeNone() {\n $config = $this->config('locale.settings');\n\n // Build the test environment.\n $this->setTranslationFiles();\n $this->setCurrentTranslations();\n $config->set('translation.default_filename', '%project-%version.%language._po');\n\n // Set the test conditions.\n $edit = [\n 'use_source' => LOCALE_TRANSLATION_USE_SOURCE_REMOTE_AND_LOCAL,\n 'overwrite' => LOCALE_TRANSLATION_OVERWRITE_NONE,\n ];\n $this->drupalGet('admin/config/regional/translate/settings');\n $this->submitForm($edit, 'Save configuration');\n\n // Execute translation update.\n $this->drupalGet('admin/reports/translations/check');\n $this->drupalGet('admin/reports/translations');\n $this->submitForm([], 'Update translations');\n\n // Check whether existing translations have (not) been overwritten.\n // cSpell:disable\n $this->assertTranslation('January', 'Januar_customized', 'de');\n $this->assertTranslation('February', 'Februar_customized', 'de');\n $this->assertTranslation('March', 'Marz', 'de');\n $this->assertTranslation('April', 'April_2', 'de');\n $this->assertTranslation('May', 'Mai_customized', 'de');\n $this->assertTranslation('June', 'Juni', 'de');\n $this->assertTranslation('Monday', 'Montag', 'de');\n // cSpell:enable\n }", "title": "" }, { "docid": "24829ba30c4ec6c2f4fb46f588c8a767", "score": "0.48510066", "text": "function translate($arr) { \r\n \r\n $object = $this;\r\n $table = $object->getTable(); \r\n $primary = $object->getKeyName(); \r\n \r\n self::$translatableColumns=$arr;\r\n $Translation=\\DB::table(\"translation\");\r\n $translations=\\DB::table(self::$langauseTableName)->get();\r\n\r\n \r\n static::addGlobalScope(new LanguageScope($table, $primary,self::$lang,self::$translatableColumns ));\r\n \r\n \r\n self::saved (function($model) use($primary,$table,$translations){\r\n \r\n foreach($translations as $translation){\r\n foreach(self::$translatableColumns as $translatableColumn){\r\n if(Input::get(\"translation_\".$translatableColumn.\"_\".$translation->code)){\r\n \r\n $Translation=\\DB::table(\"translation\");\r\n \r\n $TranslationQry= $Translation \r\n ->where(\"fk\",$model->{$primary})\r\n ->where(\"table_name\",$table)\r\n ->where(\"column_name\",$translatableColumn)\r\n ->where(\"locale\",$translation->code);\r\n if($TranslationQry->count()>0){\r\n $TranslationQry->update(['value'=>Input::get(\"translation_\".$translatableColumn.\"_\".$translation->code)]);\r\n }else{\r\n $Translation-> insert(\r\n [\"fk\"=>$model->{$primary},\r\n \"table_name\"=> $table,\r\n \"column_name\"=>$translatableColumn,\r\n \"locale\"=>$translation->code,\r\n \"value\"=>Input::get(\"translation_\".$translatableColumn.\"_\".$translation->code),\r\n ]\r\n );\r\n }\r\n\r\n \r\n }\r\n }\r\n }\r\n \r\n });\r\n \r\n\r\n }", "title": "" }, { "docid": "4b9fb0009cb14e3e2cb50a4c0d009e8b", "score": "0.48508996", "text": "function saveLanguageContent($tableName, $token)\n{\n $selectedIndex = $_POST['langMaquetacion'];\n $idiomasTerminos = Doctrine_Query::create()->from('Language')->where('isActive = ?', 1)->orderBy('isocode ASC')->execute();\n $idiomaSeleccionado = $idiomasTerminos[$selectedIndex];\n $termName = UrlFriend($tableName).'-'.UrlFriend('content');\n\n $terminoBD = Doctrine_Query::create()->from('Translation')\n ->where('tableName = ?', $tableName)\n ->andWhere('token = ?', $token)\n ->andWhere('term = ?', stripslashes($termName))\n ->andWhere('isocode = ?', $idiomaSeleccionado->isocode)\n ->limit(1)->execute()->getFirst();\n if(!$terminoBD)\n {\n $terminoBD = new Translation();\n }\n $terminoBD->isocode = $idiomaSeleccionado->isocode;\n $terminoBD->term = $termName;\n $terminoBD->tableName = $tableName;\n $terminoBD->field = $termName;\n $terminoBD->token = $token;\n if($terminoBD->translation != $_POST['maquetacion'])\n {\n Doctrine_Query::create()->update('Translation')->set('updatedAt', 'NOW()')->where('term = ?', $termName)->execute();\n }\n $terminoBD->translation = $_POST['maquetacion'];\n try\n {\n $terminoBD->save();\n return true;\n }catch(Exception $e){\n return false;\n error_log('Error: ' . __FILE__ . ' linea ' . __LINE__ . $e);\n }\n}", "title": "" }, { "docid": "afca82511c2a513aff492c64e34de40d", "score": "0.48347065", "text": "public function processTranslationsUpdate($post)\n {\n if (isset($post['translations'])) {\n // new yml before legacy code makes changes to $post\n if (\n !(isset($this->featureFlags['languageFileWriteIncOnlyNotYml'])\n && $this->featureFlags['languageFileWriteIncOnlyNotYml'])\n ) {\n $localisation = new L10n($this->prefixUiL10n, $this->MyCMS->TRANSLATIONS);\n Assert::isArray($post['tr']); // array<array<string>>\n Assert::isArray($post['new']); // array<string>\n Assert::string($post['old_name']);\n Assert::string($post['new_name']);\n $localisation->updateLocalisation(\n $post['tr'],\n $post['new'],\n $post['old_name'],\n $post['new_name'],\n isset($post['delete']) && $post['delete'] === '1'\n );\n }\n\n foreach (array_keys($this->MyCMS->TRANSLATIONS) as $code) {\n // deprecated writing to inc.php\n // update the file only if it still exists\n if (file_exists(\"language-$code.inc.php\")) {\n // TODO in the next version delete the inc.php file instead of updating it\n $fp = fopen(\"language-$code.inc.php\", 'w+');\n Assert::resource($fp);\n fwrite($fp, \"<?php\\n\\n// MyCMS->getSessionLanguage expects \\$translation=\\n\\$translation = [\\n\");\n\n Assert::isArray($post['new']);\n if ($post['new'][0]) {\n Assert::isArray($post['tr']);\n $post['tr'][$code][$post['new'][0]] = $post['new'][$code];\n }\n Assert::isArray($post['tr']);\n Assert::isArray($post['tr'][$code]);\n foreach ($post['tr'][$code] as $key => $value) {\n if ($key == $post['old_name']) {\n $key = $post['new_name'];\n $value = Tools::set($post['delete']) ? false : $value;\n }\n if ($value) {\n Assert::string($key);\n fwrite($fp, \" '\" . strtr($key, array('&apos;' => \"\\\\'\", \"'\" => \"\\\\'\", '&amp;' => '&'))\n . \"' => '\" . strtr($value, array('&appos;' => \"\\\\'\", \"'\" => \"\\\\'\", '&amp;' => '&'))\n . \"',\\n\");\n }\n }\n fwrite($fp, \"];\\n\");\n fclose($fp);\n }\n }\n // finish\n Tools::addMessage('info', $this->tableAdmin->translate('Processed.'));\n $this->redir();\n }\n }", "title": "" }, { "docid": "e52344352a7e2744ab7672acd54ba058", "score": "0.48282295", "text": "public function refresh()\n {\n $this->translationValues = [];\n\n return parent::refresh();\n }", "title": "" }, { "docid": "882373bfbe9099e6e7db53fc33f3fc67", "score": "0.48270658", "text": "protected function applyTranslationReview()\n {\n $entityId = $this->getEntityId();\n $targetStoreIds = $this->getTargetStoreIds();\n $sourceStoreId = $this->getSourceStoreId();\n $translatedData = $this->getTranslatedData();\n\n foreach ($targetStoreIds as $targetStoreId) {\n\n $oldEntity = $this->reviewCollectionFactory->create()->getItemById($entityId);\n $needNewEntity = true;\n\n if ($needNewEntity) {\n $newEntity = $this->reviewFactory->create();\n $newEntity->unsetData('review_id');\n $newEntity->setEntityId($newEntity->getEntityIdByCode(\\Magento\\Review\\Model\\Review::ENTITY_PRODUCT_CODE));\n $newEntity->setEntityPkValue($oldEntity->getEntityPkValue());\n $newEntity->setStatusId(\\Magento\\Review\\Model\\Review::STATUS_PENDING);\n $newEntity->setData('title', $oldEntity->getTitle());\n $newEntity->setNickname($oldEntity->getNickname());\n $newEntity->addData($translatedData['attributes']);\n $newEntity->setStoreId($targetStoreId);\n $newEntity->setStores($targetStoreId);\n $newEntity->save();\n $this->setData('new_entity_id', $newEntity->getReviewId());\n }\n }\n // if we're here all ok. Update item status, set success message\n $this->setStatusId(self::STATUS_APPLIED);\n $this->save();\n $this->messageManager->addSuccess(__('Translation of Item %1 (%2) successfully applied to all target stores', $this->getId(), $this->getEntityName()));\n $this->updateEntitySubmissionStatus($targetStoreIds);\n $this->removeXml();\n }", "title": "" }, { "docid": "614050f3d222a6f122134d30a11b5e66", "score": "0.48064843", "text": "protected function updateRecords()\n {\n /** @var $modelClassName string holds name of model class */\n $modelClassName = $this->getTableModelClassName();\n\n if ( $this->article_id === NULL )\n {\n throw new CException( 'attribute article_id is not set' );\n }\n\n // updates all catalog records with the same catalog_id\n foreach( $this->getLanguages() as $lang )\n {\n $titleField = 'title_' . $lang;\n $textField = 'text_' . $lang;\n $metaDescriptionField = 'meta_description_' . $lang;\n $metaKeywordsField = 'meta_keywords_' . $lang;\n\n /** @var $model BaseArticleTableML */\n $model = $modelClassName::model()->findByAttributes(\n array(\n 'article_id' => $this->article_id,\n 'lang' => $lang\n )\n );\n\n if ( $model )\n {\n $model->catalog_id = $this->catalog_id;\n $model->title = $this->{$titleField};\n $model->text = $this->{$textField};\n $model->meta_description = $this->{$metaDescriptionField};\n $model->meta_keywords = $this->{$metaKeywordsField};\n $model->publish_at = empty( $this->publish_at ) ? 0 : strtotime( $this->publish_at );\n $model->save();\n $model->image = $this->image;\n }\n else\n {\n // if record not found ( for example to project add more languages) - create new one\n /** @var $model BaseCatalogArticleTableML */\n $model = new $modelClassName;\n $model->article_id = $this->article_id;\n $model->catalog_id = $this->catalog_id;\n $model->title = $this->{$titleField};\n $model->text = $this->{$textField};\n $model->lang = $lang;\n $model->publish_at = empty( $this->publish_at ) ? 0 : strtotime( $this->publish_at );\n $model->meta_description = $this->{$metaDescriptionField};\n $model->meta_keywords = $this->{$metaKeywordsField};\n $model->image = $this->image;\n $model->save();\n }\n }\n\n if ( static::USE_TAGS )\n {\n $this->updateTags();\n }\n\n if ( static::USE_IMAGE )\n {\n $this->saveImage();\n }\n }", "title": "" }, { "docid": "7d645521a06507a79b029765800cc227", "score": "0.48030365", "text": "public function updateRelationEntitiesOnUpdate()\n {\n $entities = $this->getRelationEntitiesForUpdate();\n $this->updateRelationEntities($entities);\n }", "title": "" }, { "docid": "1a2d25b46aaeac4806c71adc220cd2f3", "score": "0.4801515", "text": "public static function update_status(){\n\t\t$connection = Yii::app()->db;\n\t\t$descripcion = $_POST['descripcion'];\n\t\t$idStatus = $_POST['idStatus'];\n\t\treturn Yii::app()->db->createCommand()->update( 'campaigns_status', array('name'=>$descripcion), \n\t\t\t'id=:idStatus', array(':idStatus'=>$idStatus)\n\t\t);\n\t}", "title": "" }, { "docid": "aa86becd0272f2a05d7ff80a9acc6a6e", "score": "0.47991124", "text": "function update() {\r\n CRUD::update(self::table(), $this->as_array(), $this->id);\r\n }", "title": "" }, { "docid": "9eff0a48b6c7772fac2b488c281cf905", "score": "0.47985908", "text": "public function updated(IsTranslatable $translatable)\n {\n $attributes = $translatable->only(\n $translatable->getNonTranslatable()\n );\n\n $related = $translatable->translatedParents(nova_translation()->otherLocales($translatable->translation->locale));\n\n $translatable::withoutEvents(function () use ($translatable, $attributes, $related) {\n $translatable->translations->each(function (Translation $translation) use ($attributes, $related) {\n $attributes = array_merge($attributes, $related[$translation->locale->iso] ?? []);\n $translation->translatable->update($attributes);\n });\n });\n }", "title": "" }, { "docid": "15b0bf4430edfc64fd6325a617647172", "score": "0.47943786", "text": "public function testUpdateTable()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "7216d5d4a81bf446e645ae16c7ab6388", "score": "0.4793447", "text": "public function update()\n {\n $manager = new EntityManager($this->mainEntity);\n $updated = $manager->updateByEntityQuery($this);\n $this->reset();\n return $updated;\n }", "title": "" }, { "docid": "8a7cb5b38bbe0c05ea746b3534d38a22", "score": "0.479117", "text": "function EditRow() {\n\t\tglobal $Security, $Language;\n\t\t$sFilter = $this->KeyFilter();\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\n\t\t$conn = &$this->Connection();\n\t\t$this->CurrentFilter = $sFilter;\n\t\t$sSql = $this->SQL();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE)\n\t\t\treturn FALSE;\n\t\tif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // Set no record message\n\t\t\t$EditRow = FALSE; // Update Failed\n\t\t} else {\n\n\t\t\t// Save old values\n\t\t\t$rsold = &$rs->fields;\n\t\t\t$this->LoadDbValues($rsold);\n\t\t\t$rsnew = array();\n\n\t\t\t// no_spj\n\t\t\t$this->no_spj->SetDbValueDef($rsnew, $this->no_spj->CurrentValue, NULL, $this->no_spj->ReadOnly);\n\n\t\t\t// no_sbp\n\t\t\t$this->no_sbp->SetDbValueDef($rsnew, $this->no_sbp->CurrentValue, NULL, $this->no_sbp->ReadOnly);\n\n\t\t\t// kode_rekening\n\t\t\t$this->kode_rekening->SetDbValueDef($rsnew, $this->kode_rekening->CurrentValue, NULL, $this->kode_rekening->ReadOnly);\n\n\t\t\t// belanja\n\t\t\t$this->belanja->SetDbValueDef($rsnew, $this->belanja->CurrentValue, NULL, $this->belanja->ReadOnly);\n\n\t\t\t// program\n\t\t\t$this->program->SetDbValueDef($rsnew, $this->program->CurrentValue, NULL, $this->program->ReadOnly);\n\n\t\t\t// kegiatan\n\t\t\t$this->kegiatan->SetDbValueDef($rsnew, $this->kegiatan->CurrentValue, NULL, $this->kegiatan->ReadOnly);\n\n\t\t\t// sub_kegiatan\n\t\t\t$this->sub_kegiatan->SetDbValueDef($rsnew, $this->sub_kegiatan->CurrentValue, NULL, $this->sub_kegiatan->ReadOnly);\n\n\t\t\t// tahun_anggaran\n\t\t\t$this->tahun_anggaran->SetDbValueDef($rsnew, $this->tahun_anggaran->CurrentValue, NULL, $this->tahun_anggaran->ReadOnly);\n\n\t\t\t// tgl_sbp\n\t\t\t$this->tgl_sbp->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->tgl_sbp->CurrentValue, 0), NULL, $this->tgl_sbp->ReadOnly);\n\n\t\t\t// tgl_spj\n\t\t\t$this->tgl_spj->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->tgl_spj->CurrentValue, 0), NULL, $this->tgl_spj->ReadOnly);\n\n\t\t\t// id_spj\n\t\t\t$this->id_spj->SetDbValueDef($rsnew, $this->id_spj->CurrentValue, NULL, $this->id_spj->ReadOnly);\n\n\t\t\t// jenis_spj\n\t\t\t$this->jenis_spj->SetDbValueDef($rsnew, $this->jenis_spj->CurrentValue, NULL, $this->jenis_spj->ReadOnly);\n\n\t\t\t// Check referential integrity for master table 't_spj'\n\t\t\t$bValidMasterRecord = TRUE;\n\t\t\t$sMasterFilter = $this->SqlMasterFilter_t_spj();\n\t\t\t$KeyValue = isset($rsnew['no_spj']) ? $rsnew['no_spj'] : $rsold['no_spj'];\n\t\t\tif (strval($KeyValue) <> \"\") {\n\t\t\t\t$sMasterFilter = str_replace(\"@no_spj@\", ew_AdjustSql($KeyValue), $sMasterFilter);\n\t\t\t} else {\n\t\t\t\t$bValidMasterRecord = FALSE;\n\t\t\t}\n\t\t\t$KeyValue = isset($rsnew['id_spj']) ? $rsnew['id_spj'] : $rsold['id_spj'];\n\t\t\tif (strval($KeyValue) <> \"\") {\n\t\t\t\t$sMasterFilter = str_replace(\"@id@\", ew_AdjustSql($KeyValue), $sMasterFilter);\n\t\t\t} else {\n\t\t\t\t$bValidMasterRecord = FALSE;\n\t\t\t}\n\t\t\t$KeyValue = isset($rsnew['tgl_spj']) ? $rsnew['tgl_spj'] : $rsold['tgl_spj'];\n\t\t\tif (strval($KeyValue) <> \"\") {\n\t\t\t\t$sMasterFilter = str_replace(\"@tgl_spj@\", ew_AdjustSql($KeyValue), $sMasterFilter);\n\t\t\t} else {\n\t\t\t\t$bValidMasterRecord = FALSE;\n\t\t\t}\n\t\t\t$KeyValue = isset($rsnew['program']) ? $rsnew['program'] : $rsold['program'];\n\t\t\tif (strval($KeyValue) <> \"\") {\n\t\t\t\t$sMasterFilter = str_replace(\"@program@\", ew_AdjustSql($KeyValue), $sMasterFilter);\n\t\t\t} else {\n\t\t\t\t$bValidMasterRecord = FALSE;\n\t\t\t}\n\t\t\t$KeyValue = isset($rsnew['kegiatan']) ? $rsnew['kegiatan'] : $rsold['kegiatan'];\n\t\t\tif (strval($KeyValue) <> \"\") {\n\t\t\t\t$sMasterFilter = str_replace(\"@kegiatan@\", ew_AdjustSql($KeyValue), $sMasterFilter);\n\t\t\t} else {\n\t\t\t\t$bValidMasterRecord = FALSE;\n\t\t\t}\n\t\t\t$KeyValue = isset($rsnew['tahun_anggaran']) ? $rsnew['tahun_anggaran'] : $rsold['tahun_anggaran'];\n\t\t\tif (strval($KeyValue) <> \"\") {\n\t\t\t\t$sMasterFilter = str_replace(\"@tahun_anggaran@\", ew_AdjustSql($KeyValue), $sMasterFilter);\n\t\t\t} else {\n\t\t\t\t$bValidMasterRecord = FALSE;\n\t\t\t}\n\t\t\t$KeyValue = isset($rsnew['sub_kegiatan']) ? $rsnew['sub_kegiatan'] : $rsold['sub_kegiatan'];\n\t\t\tif (strval($KeyValue) <> \"\") {\n\t\t\t\t$sMasterFilter = str_replace(\"@sub_kegiatan@\", ew_AdjustSql($KeyValue), $sMasterFilter);\n\t\t\t} else {\n\t\t\t\t$bValidMasterRecord = FALSE;\n\t\t\t}\n\t\t\t$KeyValue = isset($rsnew['jenis_spj']) ? $rsnew['jenis_spj'] : $rsold['jenis_spj'];\n\t\t\tif (strval($KeyValue) <> \"\") {\n\t\t\t\t$sMasterFilter = str_replace(\"@jenis_spj@\", ew_AdjustSql($KeyValue), $sMasterFilter);\n\t\t\t} else {\n\t\t\t\t$bValidMasterRecord = FALSE;\n\t\t\t}\n\t\t\tif ($bValidMasterRecord) {\n\t\t\t\tif (!isset($GLOBALS[\"t_spj\"])) $GLOBALS[\"t_spj\"] = new ct_spj();\n\t\t\t\t$rsmaster = $GLOBALS[\"t_spj\"]->LoadRs($sMasterFilter);\n\t\t\t\t$bValidMasterRecord = ($rsmaster && !$rsmaster->EOF);\n\t\t\t\t$rsmaster->Close();\n\t\t\t}\n\t\t\tif (!$bValidMasterRecord) {\n\t\t\t\t$sRelatedRecordMsg = str_replace(\"%t\", \"t_spj\", $Language->Phrase(\"RelatedRecordRequired\"));\n\t\t\t\t$this->setFailureMessage($sRelatedRecordMsg);\n\t\t\t\t$rs->Close();\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\t// Call Row Updating event\n\t\t\t$bUpdateRow = $this->Row_Updating($rsold, $rsnew);\n\t\t\tif ($bUpdateRow) {\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\tif (count($rsnew) > 0)\n\t\t\t\t\t$EditRow = $this->Update($rsnew, \"\", $rsold);\n\t\t\t\telse\n\t\t\t\t\t$EditRow = TRUE; // No field to update\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($EditRow) {\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t\t// Use the message, do nothing\n\t\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->setFailureMessage($Language->Phrase(\"UpdateCancelled\"));\n\t\t\t\t}\n\t\t\t\t$EditRow = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// Call Row_Updated event\n\t\tif ($EditRow)\n\t\t\t$this->Row_Updated($rsold, $rsnew);\n\t\t$rs->Close();\n\t\treturn $EditRow;\n\t}", "title": "" }, { "docid": "48391c6721d9fa30d8fb0f6a4e278f44", "score": "0.4789198", "text": "private function updateTranslations(): void\n {\n // @TODO:: retrieve languages for current project.\n $languages = [];\n foreach ($languages as $language) {\n $endpoint = $_ENV['ICAPPS_TRANSLATIONS_TOOL'] . $language . '.json';\n\n try {\n // Retrieve translations from translation tool endpoint.\n $response = $this->httpClient->request('GET', $endpoint, [\n 'headers' => [\n 'Authorization' => 'Token ' . $_ENV['ICAPPS_TRANSLATIONS_TOKEN'],\n ],\n ]);\n\n // Decode results.\n $content = json_decode($response->getContent(), true);\n\n // Update translation files if necessary.\n if (isset($content['translations']) && !empty($content['translations'])) {\n file_put_contents('translations/icapps/messages.' . $language . '.json', json_encode($content['translations']));\n }\n } catch (TransportExceptionInterface $e) {\n $this->logger->critical('Could not download translations from icapps translation tool');\n }\n }\n }", "title": "" }, { "docid": "c442008e9b89c24d32eabcb01a7066dd", "score": "0.47749445", "text": "public function updateAndGetTranslations()\n {\n $this->eventManager->dispatch('adminhtml_cache_flush_system');\n $translations = $this->translateResource->getTranslationArray(null, $this->localeResolver->getLocale());\n $this->fileManager->updateTranslationFileContent(json_encode($translations));\n return $translations;\n }", "title": "" }, { "docid": "0a8187007e5a1fa1885acb802c324299", "score": "0.47743827", "text": "public function complete($entity, $row) {\n // Make sure the messages have the proper timestamp.\n $this->messageInsertSave($entity, $row);\n }", "title": "" }, { "docid": "9c900b0292a2dd94d88cdaa641440e86", "score": "0.47725877", "text": "public function update(){\n\t\t\n\t\tglobal $DATABASE;\n\n\t\t$inData = $this->getValues();\n\t\t\n\t\t$rowsAffected = $DATABASE->update($this->db_name, $inData, array($this->db_index => $this->getID()));\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f50efc0578eec4ac0e119f4f00a76d9d", "score": "0.47724187", "text": "function update($table, $arFieldValues, $arConditions)\r\n\t{\r\n\t\t$this->results->Set('false', $strDefaultMessage);\r\n\t\t\r\n\t\treturn -1;\r\n\t}", "title": "" }, { "docid": "65a804ae7559ee23cb2d33428b0a7c6c", "score": "0.47691756", "text": "public function updateTranslate($data) {\n $translate_finded;\n\n foreach ($data as $dat) {\n $translate_finded=Translate::with('languages')\n ->where('tipo_content',$dat['tipo_content'])\n ->where('id_content_trans',$dat['id_content_trans'])\n ->where('indice_content',$dat['indice_content'])\n ->get();\n\n foreach ($translate_finded as $translated) {\n if($translated->languages[0]->id===$dat['trans_lang'] && $translated->id===$translated->languages[0]->pivot->translate_id){\n $date_updated=Carbon::now()->format('Y-m-d');\n $update_state= $translated->languages()->updateExistingPivot($translated->languages[0]->id,array('content_trans'=>$dat['content_trans'],'updated_at'=>$date_updated));\n\n }\n\n }\n\n }\n\n\n return $translate_finded;\n }", "title": "" }, { "docid": "0c64d2be1d73c8ad4c9858825cfaf3fd", "score": "0.47667563", "text": "public static function AtualizarStatusMotorista(){\n self::$id = $_POST['id'];\n self::$status = $_POST['status'];\n try {\n self::query(\"UPDATE tbUsuario set ds_status = \".self::$status.\" where id_usuario = \".self::$id.\"\");\n echo \"1\";\n } catch(Exception $e) {\n echo $e;\n }\n }", "title": "" }, { "docid": "5622e17e04d4396b969bc720330fcec5", "score": "0.47651526", "text": "private function updateRow($row) {\n\t\t$this->id = $row[$this->id_field];\n\t\t/* Update the row to match the latest set of data. */\n\t\t$update = \"UPDATE $this->table SET \";\n\t\tforeach ($row as $key => $value) {\n\t\t\t$update .= \"$key = :$key,\";\n\t\t}\n\t\t$update = rtrim($update, \",\");\n\t\t$update .= \" WHERE $this->id_field = :$this->id_field;\";\n\t\ttry {\n\t\t\t$sth = $this->db->prepare($update);\n\t\t\t$sth->execute($row);\n\t\t\t$this->row = $row;\n\t\t} catch(PDOException $e) {\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "76aea954bc92daf1174f7f604682a2ec", "score": "0.4754332", "text": "function updateObjTermAllLangs($object, $urlFriendField, $value)\n{\n $tableName = get_class($object);\n $token = $object->token;\n\n // Recorrer idiomas\n $idiomasTerminos = Doctrine_Query::create()->from('Language')->where('isActive = ?', 1)->orderBy('isocode ASC')->execute();\n foreach($idiomasTerminos as $idioma)\n {\n $urlfriend = Doctrine_Query::create()->select('translation')\n ->from('Translation')\n ->where('tableName = ?', $tableName)\n ->andWhere('token = ?', $token)\n ->andWhere('term = ?', UrlFriend($urlFriendField))\n ->andWhere('isocode = ?', $idioma->isocode)\n ->execute()\n ->getFirst();\n\n if($urlfriend)\n {\n $urlfriend->translation = $value;\n try\n {\n $urlfriend->save();\n }\n catch(Exception $e)\n {\n error_log($e);\n return false;\n }\n }\n }\n return true;\n}", "title": "" }, { "docid": "2864a4f645409f72d08a0327c9d956ed", "score": "0.47530285", "text": "public function testUpdateDatatable()\n {\n }", "title": "" }, { "docid": "afcb5ee693e4eb1212fd3982b79b2d01", "score": "0.47390708", "text": "public function testUpdateImportSourceRemote() {\n $config = $this->config('locale.settings');\n\n // Build the test environment.\n $this->setTranslationFiles();\n $this->setCurrentTranslations();\n $config->set('translation.default_filename', '%project-%version.%language._po');\n\n // Set the update conditions for this test.\n $edit = [\n 'use_source' => LOCALE_TRANSLATION_USE_SOURCE_REMOTE_AND_LOCAL,\n 'overwrite' => LOCALE_TRANSLATION_OVERWRITE_ALL,\n ];\n $this->drupalGet('admin/config/regional/translate/settings');\n $this->submitForm($edit, 'Save configuration');\n\n // Get the translation status.\n $this->drupalGet('admin/reports/translations/check');\n\n // Check the status on the Available translation status page.\n $this->assertSession()->responseContains('<label for=\"edit-langcodes-de\" class=\"visually-hidden\">Update German</label>');\n $this->assertSession()->pageTextContains('Updates for: Contributed module one, Contributed module two, Custom module one, Locale test');\n /** @var \\Drupal\\Core\\Datetime\\DateFormatterInterface $date_formatter */\n $date_formatter = $this->container->get('date.formatter');\n $this->assertSession()->pageTextContains('Contributed module one (' . $date_formatter->format($this->timestampNew, 'html_date') . ')');\n $this->assertSession()->pageTextContains('Contributed module two (' . $date_formatter->format($this->timestampNew, 'html_date') . ')');\n\n // Execute the translation update.\n $this->drupalGet('admin/reports/translations');\n $this->submitForm([], 'Update translations');\n\n // Check if the translation has been updated, using the status cache.\n $status = locale_translation_get_status();\n $this->assertEquals(LOCALE_TRANSLATION_CURRENT, $status['contrib_module_one']['de']->type, 'Translation of contrib_module_one found');\n $this->assertEquals(LOCALE_TRANSLATION_CURRENT, $status['contrib_module_two']['de']->type, 'Translation of contrib_module_two found');\n $this->assertEquals(LOCALE_TRANSLATION_CURRENT, $status['contrib_module_three']['de']->type, 'Translation of contrib_module_three found');\n\n // Check the new translation status.\n // The static cache needs to be flushed first to get the most recent data\n // from the database. The function was called earlier during this test.\n drupal_static_reset('locale_translation_get_file_history');\n $history = locale_translation_get_file_history();\n // Verify that the translation of contrib_module_one is imported and\n // updated.\n $this->assertGreaterThanOrEqual($this->timestampNow, $history['contrib_module_one']['de']->timestamp);\n $this->assertGreaterThanOrEqual($this->timestampNow, $history['contrib_module_one']['de']->last_checked);\n $this->assertEquals($this->timestampNew, $history['contrib_module_two']['de']->timestamp, 'Translation of contrib_module_two is imported');\n // Verify that the translation of contrib_module_two is updated.\n $this->assertGreaterThanOrEqual($this->timestampNow, $history['contrib_module_two']['de']->last_checked);\n $this->assertEquals($this->timestampMedium, $history['contrib_module_three']['de']->timestamp, 'Translation of contrib_module_three is not imported');\n $this->assertEquals($this->timestampMedium, $history['contrib_module_three']['de']->last_checked, 'Translation of contrib_module_three is not updated');\n\n // Check whether existing translations have (not) been overwritten.\n // cSpell:disable\n $this->assertEquals('Januar_1', t('January', [], ['langcode' => 'de']), 'Translation of January');\n $this->assertEquals('Februar_2', t('February', [], ['langcode' => 'de']), 'Translation of February');\n $this->assertEquals('Marz_2', t('March', [], ['langcode' => 'de']), 'Translation of March');\n $this->assertEquals('April_2', t('April', [], ['langcode' => 'de']), 'Translation of April');\n $this->assertEquals('Mai_customized', t('May', [], ['langcode' => 'de']), 'Translation of May');\n $this->assertEquals('Juni', t('June', [], ['langcode' => 'de']), 'Translation of June');\n $this->assertEquals('Montag', t('Monday', [], ['langcode' => 'de']), 'Translation of Monday');\n // cSpell:enable\n }", "title": "" }, { "docid": "646fa5dd2625e0c38ca8b8ae45903697", "score": "0.4735689", "text": "public function prepareEntityForEditing(EntityAccess $entity): array\n {\n $translations = [];\n $objectType = $entity->get_objectType();\n \n if (!$this->variableApi->getSystemVar('multilingual')) {\n return $translations;\n }\n \n // check if there are any translated fields registered for the given object type\n $fields = $this->getTranslatableFields($objectType);\n if (!count($fields)) {\n return $translations;\n }\n \n // get translations\n $entityManager = $this->entityFactory->getEntityManager();\n $repository = $entityManager->getRepository(\n 'Zikula\\ContentModule\\Entity\\\\' . ucfirst($objectType) . 'TranslationEntity'\n );\n $entityTranslations = $repository->findTranslations($entity);\n \n $supportedLanguages = $this->getSupportedLanguages($objectType);\n $currentLanguage = $this->getCurrentLanguage();\n foreach ($supportedLanguages as $language) {\n if ($language === $currentLanguage) {\n foreach ($fields as $fieldName) {\n if (null === $entity[$fieldName]) {\n $entity[$fieldName] = '';\n }\n }\n // skip current language as this is not treated as translation on controller level\n continue;\n }\n $translationData = [];\n foreach ($fields as $fieldName) {\n $translationData[$fieldName] = $entityTranslations[$language][$fieldName] ?? '';\n }\n if (isset($translationData['slug']) && in_array($objectType, ['page'])) {\n $slugParts = explode('/', $translationData['slug']);\n $translationData['slug'] = end($slugParts);\n }\n // add data to collected translations\n $translations[$language] = $translationData;\n }\n \n return $translations;\n }", "title": "" }, { "docid": "25e1108f1e242caca7dc95955c06f0df", "score": "0.47303838", "text": "function updateObjUrlFriendLangText($object, $arrayLangText)\n{\n $tableName = get_class($object);\n $token = $object->token;\n\n // Recorrer idiomas\n $idiomasTerminos = Doctrine_Query::create()->from('Language')->where('isActive = ?', 1)->orderBy('isocode ASC')->execute();\n foreach($idiomasTerminos as $idioma)\n {\n // Crear urlfriend a partir de urlFriendField\n $urlfriendFinal = $arrayLangText[$idioma->isocode];\n if(!empty($urlfriendFinal))\n {\n $campoUrlFriendTranslation = UrlFriend($tableName).'-'.UrlFriend('urlfriend');\n $reg = Doctrine_Query::create()->select('translation')\n ->from('Translation')\n ->where('tableName = ?', $tableName)\n ->andWhere('token = ?', $token)\n ->andWhere('term = ?', $campoUrlFriendTranslation)\n ->andWhere('isocode = ?', $idioma->isocode)\n ->execute()\n ->getFirst();\n\n if(!empty($urlfriendFinal))$reg->translation = UrlFriend($urlfriendFinal);\n $reg->trySave();\n }\n }\n}", "title": "" }, { "docid": "85668f6705d720b0c7904956e9b79b02", "score": "0.47275913", "text": "function EditRow() {\r\n\t\tglobal $conn, $Security, $Language, $users;\r\n\t\t$sFilter = $users->KeyFilter();\r\n\t\t$users->CurrentFilter = $sFilter;\r\n\t\t$sSql = $users->SQL();\r\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\r\n\t\t$rs = $conn->Execute($sSql);\r\n\t\t$conn->raiseErrorFn = '';\r\n\t\tif ($rs === FALSE)\r\n\t\t\treturn FALSE;\r\n\t\tif ($rs->EOF) {\r\n\t\t\t$EditRow = FALSE; // Update Failed\r\n\t\t} else {\r\n\r\n\t\t\t// Save old values\r\n\t\t\t$rsold =& $rs->fields;\r\n\t\t\t$rsnew = array();\r\n\r\n\t\t\t// Call Row Updating event\r\n\t\t\t$bUpdateRow = $users->Row_Updating($rsold, $rsnew);\r\n\t\t\tif ($bUpdateRow) {\r\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\r\n\t\t\t\t$EditRow = $conn->Execute($users->UpdateSQL($rsnew));\r\n\t\t\t\t$conn->raiseErrorFn = '';\r\n\t\t\t} else {\r\n\t\t\t\tif ($users->CancelMessage <> \"\") {\r\n\t\t\t\t\t$this->setMessage($users->CancelMessage);\r\n\t\t\t\t\t$users->CancelMessage = \"\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->setMessage($Language->Phrase(\"UpdateCancelled\"));\r\n\t\t\t\t}\r\n\t\t\t\t$EditRow = FALSE;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Call Row_Updated event\r\n\t\tif ($EditRow)\r\n\t\t\t$users->Row_Updated($rsold, $rsnew);\r\n\t\t$rs->Close();\r\n\t\treturn $EditRow;\r\n\t}", "title": "" }, { "docid": "23368b108b6d2759629217a16d4ebe1b", "score": "0.47238004", "text": "final public function updatePage($module, $controller, array $options, array $translations)\n {\n // Update entity\n $this->db->update(static::getTableName(), $options)\n ->whereEquals(self::PARAM_COLUMN_ID, $options[self::PARAM_COLUMN_ID])\n ->execute();\n\n // Process translations\n foreach ($translations as $translation) {\n $translation = $this->prepareTranslation($translation);\n\n // Is there a translation for current entity ID and its attached language ID?\n if ($this->translationExists($translation[self::PARAM_COLUMN_ID], $translation[self::PARAM_COLUMN_LANG_ID])) {\n // If exists, then update it\n $this->updateTranslation($translation, $controller);\n } else {\n // Otherwise just insert a new row\n $this->insertTranslation($module, $controller, $translation);\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "c830e266caf75a140885db6308ec6dce", "score": "0.4712018", "text": "public function update()\n {\n $s = new static();\n\n $where = \"id = {$s::$ID}\";\n\n self::$db->update($s::$entity_table, $this->db_fields, $where);\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.47074974", "text": "public function update($entity);", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.47074974", "text": "public function update($entity);", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.47074974", "text": "public function update($entity);", "title": "" }, { "docid": "cf52e1343869e387111bd4c3ed92c692", "score": "0.47065568", "text": "public static function Update($table, $row, $where, $values) {\n $db = self::getInstance();\n\n $changes = '';\n $exec_arr = [\n ':where' => $where\n ];\n\n foreach ($values as $key => $value) {\n if ( array_search($key, array_keys($values)) !== count($values)-1 ) {\n $changes = $changes . $key . ' = :' . $key . ', ';\n } else {\n $changes = $changes . $key . ' = :' . $key;\n }\n $exec_arr[':'.$key] = $value;\n }\n\n try {\n $req = $db->prepare(\"UPDATE $table SET $changes WHERE $row = :where\");\n $req->execute($exec_arr);\n } catch( PDOException $Exception ) {\n return $Exception->getMessage();\n }\n\n return true;\n }", "title": "" }, { "docid": "6e49d9f699539436ba67cde7e302ff68", "score": "0.4700832", "text": "public function testTranslation()\n {\n $manager = $this->getContainer()->get('doctrine_mongodb.odm.default_document_manager');\n $translator = new Translator(\n $manager,\n 'en',\n new ArrayAdapter(),\n 3\n );\n\n $translation = $translator->translate('English');\n\n $this->assertEquals('English', $translation['en']);\n $this->assertEquals('Englisch', $translation['de']);\n $this->assertEquals('Anglais', $translation['fr']);\n\n // change some\n $newtrans = Translatable::createFromTranslations(\n [\n 'en' => 'English',\n 'de' => 'Sö inglisch'\n ]\n );\n $translator->persistTranslatable($newtrans);\n\n $translation = $translator->translate('English');\n\n $this->assertEquals('English', $translation['en']);\n $this->assertEquals('Sö inglisch', $translation['de']);\n $this->assertEquals('Anglais', $translation['fr']);\n }", "title": "" }, { "docid": "bfe498be42efea97f2b25b96360652e1", "score": "0.46956116", "text": "function update($entity)\n {\n }", "title": "" }, { "docid": "83822b0e8bcce846f2b72bfebdfd2e58", "score": "0.46949655", "text": "public function getTranslationTable();", "title": "" }, { "docid": "eb6477e8f196ac7cd43a39f8bfab0d88", "score": "0.4694832", "text": "function EditRow() {\n\t\tglobal $conn, $Security, $Language;\n\t\t$sFilter = $this->KeyFilter();\n\t\t$this->CurrentFilter = $sFilter;\n\t\t$sSql = $this->SQL();\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE)\n\t\t\treturn FALSE;\n\t\tif ($rs->EOF) {\n\t\t\t$EditRow = FALSE; // Update Failed\n\t\t} else {\n\n\t\t\t// Save old values\n\t\t\t$rsold = &$rs->fields;\n\t\t\t$this->LoadDbValues($rsold);\n\t\t\t$this->avatar->OldUploadPath = '../webroot/uploads/accounts/';\n\t\t\t$this->avatar->UploadPath = $this->avatar->OldUploadPath;\n\t\t\t$this->commercial_register->OldUploadPath = '../webroot/uploads/accounts/';\n\t\t\t$this->commercial_register->UploadPath = $this->commercial_register->OldUploadPath;\n\t\t\t$rsnew = array();\n\n\t\t\t// avatar\n\t\t\tif (!($this->avatar->ReadOnly) && !$this->avatar->Upload->KeepFile) {\n\t\t\t\t$this->avatar->Upload->DbValue = $rsold['avatar']; // Get original value\n\t\t\t\tif ($this->avatar->Upload->FileName == \"\") {\n\t\t\t\t\t$rsnew['avatar'] = NULL;\n\t\t\t\t} else {\n\t\t\t\t\t$rsnew['avatar'] = $this->avatar->Upload->FileName;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// first_name\n\t\t\t$this->first_name->SetDbValueDef($rsnew, $this->first_name->CurrentValue, \"\", $this->first_name->ReadOnly);\n\n\t\t\t// last_name\n\t\t\t$this->last_name->SetDbValueDef($rsnew, $this->last_name->CurrentValue, \"\", $this->last_name->ReadOnly);\n\n\t\t\t// email\n\t\t\t$this->_email->SetDbValueDef($rsnew, $this->_email->CurrentValue, \"\", $this->_email->ReadOnly);\n\n\t\t\t// integra_account_id\n\t\t\t$this->integra_account_id->SetDbValueDef($rsnew, $this->integra_account_id->CurrentValue, NULL, $this->integra_account_id->ReadOnly);\n\n\t\t\t// company\n\t\t\t$this->company->SetDbValueDef($rsnew, $this->company->CurrentValue, \"\", $this->company->ReadOnly);\n\n\t\t\t// job_title\n\t\t\t$this->job_title->SetDbValueDef($rsnew, $this->job_title->CurrentValue, \"\", $this->job_title->ReadOnly);\n\n\t\t\t// phone\n\t\t\t$this->phone->SetDbValueDef($rsnew, $this->phone->CurrentValue, 0, $this->phone->ReadOnly);\n\n\t\t\t// address\n\t\t\t$this->address->SetDbValueDef($rsnew, $this->address->CurrentValue, \"\", $this->address->ReadOnly);\n\n\t\t\t// ship_monthly\n\t\t\t$this->ship_monthly->SetDbValueDef($rsnew, $this->ship_monthly->CurrentValue, \"\", $this->ship_monthly->ReadOnly);\n\n\t\t\t// commercial_register\n\t\t\tif (!($this->commercial_register->ReadOnly) && !$this->commercial_register->Upload->KeepFile) {\n\t\t\t\t$this->commercial_register->Upload->DbValue = $rsold['commercial_register']; // Get original value\n\t\t\t\tif ($this->commercial_register->Upload->FileName == \"\") {\n\t\t\t\t\t$rsnew['commercial_register'] = NULL;\n\t\t\t\t} else {\n\t\t\t\t\t$rsnew['commercial_register'] = $this->commercial_register->Upload->FileName;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// status\n\t\t\t$this->status->SetDbValueDef($rsnew, $this->status->CurrentValue, \"\", $this->status->ReadOnly);\n\t\t\tif (!$this->avatar->Upload->KeepFile) {\n\t\t\t\t$this->avatar->UploadPath = '../webroot/uploads/accounts/';\n\t\t\t\tif (!ew_Empty($this->avatar->Upload->Value)) {\n\t\t\t\t\tif ($this->avatar->Upload->FileName == $this->avatar->Upload->DbValue) { // Overwrite if same file name\n\t\t\t\t\t\t$this->avatar->Upload->DbValue = \"\"; // No need to delete any more\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$rsnew['avatar'] = ew_UploadFileNameEx(ew_UploadPathEx(TRUE, $this->avatar->UploadPath), $rsnew['avatar']); // Get new file name\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!$this->commercial_register->Upload->KeepFile) {\n\t\t\t\t$this->commercial_register->UploadPath = '../webroot/uploads/accounts/';\n\t\t\t\tif (!ew_Empty($this->commercial_register->Upload->Value)) {\n\t\t\t\t\tif ($this->commercial_register->Upload->FileName == $this->commercial_register->Upload->DbValue) { // Overwrite if same file name\n\t\t\t\t\t\t$this->commercial_register->Upload->DbValue = \"\"; // No need to delete any more\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$rsnew['commercial_register'] = ew_UploadFileNameEx(ew_UploadPathEx(TRUE, $this->commercial_register->UploadPath), $rsnew['commercial_register']); // Get new file name\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Call Row Updating event\n\t\t\t$bUpdateRow = $this->Row_Updating($rsold, $rsnew);\n\t\t\tif ($bUpdateRow) {\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\n\t\t\t\tif (count($rsnew) > 0)\n\t\t\t\t\t$EditRow = $this->Update($rsnew, \"\", $rsold);\n\t\t\t\telse\n\t\t\t\t\t$EditRow = TRUE; // No field to update\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($EditRow) {\n\t\t\t\t\tif (!$this->avatar->Upload->KeepFile) {\n\t\t\t\t\t\tif (!ew_Empty($this->avatar->Upload->Value)) {\n\t\t\t\t\t\t\t$this->avatar->Upload->SaveToFile($this->avatar->UploadPath, $rsnew['avatar'], TRUE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($this->avatar->Upload->DbValue <> \"\")\n\t\t\t\t\t\t\t@unlink(ew_UploadPathEx(TRUE, $this->avatar->OldUploadPath) . $this->avatar->Upload->DbValue);\n\t\t\t\t\t}\n\t\t\t\t\tif (!$this->commercial_register->Upload->KeepFile) {\n\t\t\t\t\t\tif (!ew_Empty($this->commercial_register->Upload->Value)) {\n\t\t\t\t\t\t\t$this->commercial_register->Upload->SaveToFile($this->commercial_register->UploadPath, $rsnew['commercial_register'], TRUE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($this->commercial_register->Upload->DbValue <> \"\")\n\t\t\t\t\t\t\t@unlink(ew_UploadPathEx(TRUE, $this->commercial_register->OldUploadPath) . $this->commercial_register->Upload->DbValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t\t// Use the message, do nothing\n\t\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->setFailureMessage($Language->Phrase(\"UpdateCancelled\"));\n\t\t\t\t}\n\t\t\t\t$EditRow = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// Call Row_Updated event\n\t\tif ($EditRow)\n\t\t\t$this->Row_Updated($rsold, $rsnew);\n\t\t$rs->Close();\n\n\t\t// avatar\n\t\tew_CleanUploadTempPath($this->avatar, $this->avatar->Upload->Index);\n\n\t\t// commercial_register\n\t\tew_CleanUploadTempPath($this->commercial_register, $this->commercial_register->Upload->Index);\n\t\treturn $EditRow;\n\t}", "title": "" }, { "docid": "7f27eccf290ae89e98425c68492b71fe", "score": "0.46943578", "text": "public function update(RowRequest $request, $id)\n {\n //\n $targetPageId = $request->input(\"page.targetPageId\");\n $currRowId = $request->input(\"page.currRowId\");\n $rowPos = $request->input(\"rowPos\");\n\n DB::beginTransaction();\n try {\n Row::where('id', $currRowId)->update([\n 'page_id' => $targetPageId\n ]);\n foreach($rowPos as $k => $pos){\n //$pos = is_null($pos)? $newContent->id : $pos;\n\n Row::where('page_id', $targetPageId)\n ->where('id', $pos)\n ->update([\n 'position' => $k\n ]);\n }\n DB::commit();\n return response()->json([\n 'success' => true,\n 'message' => 'Success',\n 'data' => []\n ]); \n } catch(\\Exception $e){\n DB::rollback();\n return response()->json([\n 'success' => false,\n 'message' => $e->getMessage()\n ], 500);\n }\n }", "title": "" }, { "docid": "3e43f9198315a02f6a2b8e2bf19718dd", "score": "0.4691499", "text": "public function update() {\n $conn = new BDmyMusicalU();\n if (mysqli_connect_errno()) {\n printf(\"Error en connexió amb la base de dades: %s\\n\", mysqli_connect_error());\n exit();\n }\n //preparar sentencia actualització\n $stmt = $conn->stmt_init();\n if ($stmt->prepare(\"update `\".threadClass::$tableName.\"` set \".threadClass::$colNameReplies.\" = ? where \".threadClass::$colNameId.\" = ?\" )) {\n $stmt->bind_param(\"ii\", $this->getTotalReplies(),$this->getId());\n //executar consulta\n $stmt->execute();\n }\n if ( $conn != null ) $conn->close();\n\n }", "title": "" }, { "docid": "1748465fe552ee56f26158b0a18a1978", "score": "0.46880627", "text": "public function delete_translations() {\n list($table, $field) = $this->table_field();\n if ($table && $field) {\n return db_update($table)\n ->fields(array($field => 0))\n ->condition($field, $this->tsid)\n ->execute();\n }\n }", "title": "" }, { "docid": "7bcc0c190b52f4680fc71a4a508cb37c", "score": "0.4688002", "text": "protected function update(){\n $this->setUpdated();\n }", "title": "" }, { "docid": "93e4b100b1b859e5c61e5de5379afc16", "score": "0.46876648", "text": "public function run()\n {\n DB::table('property_status_translations')->truncate();\n\n $data = [\n [\n 'property_status_id' =>1,\n 'locale' =>'en',\n 'title'=>'New property',\n ],\n [\n 'property_status_id' =>1,\n 'locale' =>'km',\n 'title'=>'ទ្រព្យសម្បត្តិថ្មី',\n ],\n [\n 'property_status_id' =>1,\n 'locale' =>'zh',\n 'title'=>'新房产',\n ],\n [\n 'property_status_id' =>2,\n 'locale' =>'en',\n 'title'=>'Resale property',\n ],\n [\n 'property_status_id' =>2,\n 'locale' =>'km',\n 'title'=>'ទ្រព្យសម្បត្តិលក់បន្ត',\n ],\n [\n 'property_status_id' =>2,\n 'locale' =>'zh',\n 'title'=>'财产转让',\n ],\n [\n 'property_status_id' =>3,\n 'locale' =>'en',\n 'title'=>'New project',\n ],\n [\n 'property_status_id' =>3,\n 'locale' =>'km',\n 'title'=>'គម្រោង​ថ្មី',\n ],\n [\n 'property_status_id' =>3,\n 'locale' =>'zh',\n 'title'=>'新项目',\n ],\n ];\n foreach ($data as $record) {\n \\App\\PropertyStatusTranslation::create($record);\n }\n }", "title": "" }, { "docid": "75dc77a040e98d42295d17040f3bd7b6", "score": "0.46828604", "text": "final protected function updateTable($entity, $quotedTableName, array $updateData, $versioned = false)\n {\n $set = [];\n $types = [];\n $params = [];\n\n foreach ($updateData as $columnName => $value) {\n $column = $this->columns[$columnName];\n $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName());\n $type = $column->getType();\n $placeholder = $type->convertToDatabaseValueSQL('?', $this->platform);\n\n $set[] = sprintf('%s = %s', $quotedColumnName, $placeholder);\n $params[] = $value;\n $types[] = $column->getType();\n }\n\n // @todo guilhermeblanco Bring this back: $this->em->getUnitOfWork()->getEntityIdentifier($entity);\n $identifier = $this->getIdentifier($entity);\n $where = [];\n\n foreach ($this->class->identifier as $idField) {\n $property = $this->class->getProperty($idField);\n\n switch (true) {\n case $property instanceof FieldMetadata:\n $where[] = $this->platform->quoteIdentifier($property->getColumnName());\n $params[] = $identifier[$idField];\n $types[] = $property->getType();\n break;\n\n case $property instanceof ToOneAssociationMetadata:\n $targetPersister = $this->em->getUnitOfWork()->getEntityPersister($property->getTargetEntity());\n\n foreach ($property->getJoinColumns() as $joinColumn) {\n /** @var JoinColumnMetadata $joinColumn */\n $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());\n $referencedColumnName = $joinColumn->getReferencedColumnName();\n $value = $targetPersister->getColumnValue($identifier[$idField], $referencedColumnName);\n\n $where[] = $quotedColumnName;\n $params[] = $value;\n $types[] = $joinColumn->getType();\n }\n break;\n }\n }\n\n if ($versioned) {\n $versionProperty = $this->class->versionProperty;\n $versionColumnType = $versionProperty->getType();\n $versionColumnName = $this->platform->quoteIdentifier($versionProperty->getColumnName());\n\n $where[] = $versionColumnName;\n $types[] = $versionColumnType;\n $params[] = $versionProperty->getValue($entity);\n\n switch ($versionColumnType->getName()) {\n case Type::SMALLINT:\n case Type::INTEGER:\n case Type::BIGINT:\n $set[] = $versionColumnName . ' = ' . $versionColumnName . ' + 1';\n break;\n\n case Type::DATETIME:\n $set[] = $versionColumnName . ' = CURRENT_TIMESTAMP';\n break;\n }\n }\n\n $sql = 'UPDATE ' . $quotedTableName\n . ' SET ' . implode(', ', $set)\n . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';\n\n $result = $this->conn->executeUpdate($sql, $params, $types);\n\n if ($versioned && ! $result) {\n throw OptimisticLockException::lockFailed($entity);\n }\n }", "title": "" }, { "docid": "e64a5f40ed7dac5c599111633028b852", "score": "0.46795282", "text": "public function flushed(){\n\t\tforeach($this->es as $rec){\n\t\t\t$rec->setStatus(Record::STATUS_NONE);\n\t\t}\n\t}", "title": "" }, { "docid": "1449a35efef166f2e470abafddbb12ae", "score": "0.46746922", "text": "public function transformContextTableProxy(Doctrine_Record $from, Doctrine_Record $to)\n {\n \t$table = $this->getTable();\n \t$q = Doctrine_Query::create()->update($table->getComponentName() . ' c')\n \t->set('c.' . $this->getOption('modelIdField'), '?', $to->id)\n \t->set('c.' . $this->getOption('modelClassField'), '?', get_class($to))\n \t->andWhere('c.' . $this->getOption('modelIdField') . ' = ?', $from->id)\n \t->andWhere('c.' . $this->getOption('modelClassField') . ' = ?', get_class($from));\n \t\n \treturn $q->execute();\n }", "title": "" }, { "docid": "2282fa98b7f5b12e12d81513b86827b0", "score": "0.46666983", "text": "final public function update(IRow &$row, $data)\n {\n if (array_key_exists('state', $data) && $row->state !== $data['state']) {\n if ($row->trigger_id) {\n $this->triggerStatsRepository->increment($row->trigger_id, $data['state']);\n } else {\n $this->elementStatsRepository->increment($row->element_id, $data['state']);\n }\n }\n\n $data['updated_at'] = new DateTime();\n return parent::update($row, $data);\n }", "title": "" }, { "docid": "9d6e8bccc4bb20d33025bdb7c36cf132", "score": "0.46559793", "text": "public function testUpdateRow()\n {\n // Open data store\n $this->DB = new DB('../' . DB_PATH);\n \n // Check DB\n $this->assertInstanceOf('DB', $this->DB);\n \n // Update the row with the mask\n $result = $this->DB->update('alltypes-test', $this->testUpdateMask);\n \n // Verify one affected row\n $this->assertEquals(1, $result->affected);\n }", "title": "" }, { "docid": "5a514944d443e1a15e6d42cc0ec418c7", "score": "0.46544096", "text": "static public function modifyDBRow(&$row, $table) {\n\t\tif (isset($row['_MIGRATED']) && $row['_MIGRATED'] === TRUE) {\n\t\t\treturn;\n\t\t}\n\t\tif (array_key_exists($table, static::$migrateFields)) {\n\t\t\tforeach (static::$migrateFields[$table] as $migrateFieldName => $oldFieldNames) {\n\t\t\t\tif ($row !== NULL && isset($row[$migrateFieldName]) && self::fieldIsInType($migrateFieldName, $table, $row)) {\n\t\t\t\t\t/** @var $fileRepository \\TYPO3\\CMS\\Core\\Resource\\FileRepository */\n\t\t\t\t\t$fileRepository = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileRepository');\n\t\t\t\t\tif ($table === 'pages' && isset($row['_LOCALIZED_UID']) && intval($row['sys_language_uid']) > 0) {\n\t\t\t\t\t\t$table = 'pages_language_overlay';\n\t\t\t\t\t}\n\t\t\t\t\t$files = $fileRepository->findByRelation($table, $migrateFieldName, isset($row['_LOCALIZED_UID']) ? intval($row['_LOCALIZED_UID']) : intval($row['uid']));\n\t\t\t\t\t$fileFieldContents = array(\n\t\t\t\t\t\t'paths' => array(),\n\t\t\t\t\t\t'titleTexts' => array(),\n\t\t\t\t\t\t'captions' => array(),\n\t\t\t\t\t\t'links' => array(),\n\t\t\t\t\t\t'alternativeTexts' => array(),\n\t\t\t\t\t\t$migrateFieldName . '_fileUids' => array()\n\t\t\t\t\t);\n\t\t\t\t\t$oldFieldNames[$migrateFieldName . '_fileUids'] = $migrateFieldName . '_fileUids';\n\n\t\t\t\t\tforeach ($files as $file) {\n\t\t\t\t\t\t/** @var $file \\TYPO3\\CMS\\Core\\Resource\\FileReference */\n\t\t\t\t\t\t$fileProperties = $file->getProperties();\n\t\t\t\t\t\t$fileFieldContents['paths'][] = '../../' . $file->getPublicUrl();\n\t\t\t\t\t\t$fileFieldContents['titleTexts'][] = $fileProperties['title'];\n\t\t\t\t\t\t$fileFieldContents['captions'][] = $fileProperties['description'];\n\t\t\t\t\t\t$fileFieldContents['links'][] = $fileProperties['link'];\n\t\t\t\t\t\t$fileFieldContents['alternativeTexts'][] = $fileProperties['alternative'];\n\t\t\t\t\t\t$fileFieldContents[$migrateFieldName . '_fileUids'][] = $file->getOriginalFile()->getUid();\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($oldFieldNames as $oldFieldType => $oldFieldName) {\n\t\t\t\t\t\tif ($oldFieldType === '__typeMatch') {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// For paths, make comma separated list\n\t\t\t\t\t\tif ($oldFieldType === 'paths' || substr($oldFieldType, -9) == '_fileUids') {\n\t\t\t\t\t\t\t$fieldContents = implode(',', $fileFieldContents[$oldFieldType]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// For all other fields, separate by newline\n\t\t\t\t\t\t\t$fieldContents = implode(chr(10), $fileFieldContents[$oldFieldType]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$row[$oldFieldName] = $fieldContents;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$row['_MIGRATED'] = TRUE;\n\t\t\n\t\tvar_dump($row);\n\t\tdie();\n\t}", "title": "" }, { "docid": "55bdfabef315831bae2cec9cef54811e", "score": "0.465348", "text": "public function update(UpdateRequest $request)\n {\n //$this->crud->getCurrentEntry()->translatable = '';\n $redirect_location = parent::updateCrud($request);\n // your additional operations after save here\n // use $this->data['entry'] or $this->crud->entry\n return $redirect_location;\n }", "title": "" }, { "docid": "910e2c2a5bda2e818598ff8cb4f3001b", "score": "0.4651773", "text": "function LoadRowValues(&$rs) {\n\t\tglobal $conn, $system_message;\n\t\t$system_message->id->setDbValue($rs->fields('id'));\n\t\t$system_message->content->setDbValue($rs->fields('content'));\n\t\t$system_message->status->setDbValue($rs->fields('status'));\n\t\t$system_message->message_type->setDbValue($rs->fields('message_type'));\n\t\t$system_message->bonus->setDbValue($rs->fields('bonus'));\n\t\t$system_message->url->setDbValue($rs->fields('url'));\n\t\t$system_message->cp->setDbValue($rs->fields('cp'));\n\t\t$system_message->date_begin->setDbValue($rs->fields('date_begin'));\n\t\t$system_message->date_end->setDbValue($rs->fields('date_end'));\n\t\t$system_message->date_created->setDbValue($rs->fields('date_created'));\n\t}", "title": "" }, { "docid": "6f4640846c62f9d6a8631ca455235238", "score": "0.46440402", "text": "public function saveTranslation()\n {\n $model = $this->getTranslation();\n $dirty = $model->getDirtyAttributes();\n if (empty($dirty)) {\n return true; // we do not need to save anything\n }\n /** @var \\yii\\db\\ActiveQuery $relation */\n $relation = $this->owner->getRelation($this->relation);\n $model->{key($relation->link)} = $this->owner->getPrimaryKey();\n\n\n //Is translation valid?\n if (!$this->isTranslationActive($model)) {\n $this->deleteTranslation($model);\n return false;\n }\n\n return $model->save();\n }", "title": "" }, { "docid": "0f883dbe5664f0b79f64176459dbab97", "score": "0.46428034", "text": "public function save()\n {\n $bResult = false;\n try {\n if (!empty($this->deleteItems)) {\n $items = explode(',', $this->deleteItems);\n RepeaterTranslation::destroy($items);\n }\n if (count($this->groupFields)) {\n foreach ($this->groupFields as $groupId => $group) {\n $fields = $group['fields'];\n $order = $this->defaultOrder[$groupId];\n\n $translate_id = 0;\n foreach ($fields as $field) {\n if ($translate_id) {\n $field->setTranslateId($translate_id);\n }\n $field->save();\n $translate_id = $field->getTranslateId();\n }\n // update order\n $translate = RepeaterTranslation::find($translate_id);\n $translate->order = $order;\n $translate->save();\n }\n }\n $bResult = true;\n } catch (\\Exception $e) {\n //exception handling\n }\n\n return $bResult;\n }", "title": "" }, { "docid": "d76468a274516aa15ffa87bcef445142", "score": "0.46356654", "text": "function translation_status($dir, $version) {\n global $translations;\n\n $number_of_strings = translation_number_of_strings('drupal-pot', $version);\n\n $line = exec(\"$msgfmt --statistics $dir/$dir.po 2>&1\");\n $words = preg_split('[\\s]', $line, -1, PREG_SPLIT_NO_EMPTY);\n\n if (is_numeric($words[0]) && is_numeric($number_of_strings)) {\n $percentage = floor((100 * $words[0]) / ($number_of_strings));\n if ($percentage >= 100) {\n $translations[$dir][$version] = \"<td style=\\\"color: green; font-weight: bold;\\\">100% (complete)</td>\";\n }\n else {\n $translations[$dir][$version] = \"<td>\". $percentage .\"% (\". ($number_of_strings - $words[0]). \" missing)</td>\";\n }\n }\n else {\n $translations[$dir][$version] = \"<td style=\\\"color: red; font-weight: bold;\\\">translation broken</td>\";\n }\n}", "title": "" }, { "docid": "3eb105ce3fa5a1fc3cda04649c16820f", "score": "0.46348414", "text": "public function processEntityAfterEditing(EntityAccess $entity, FormInterface $form): void\n {\n $this->toggleLoggable(false);\n \n $objectType = $entity->get_objectType();\n $entityManager = $this->entityFactory->getEntityManager();\n $supportedLanguages = $this->getSupportedLanguages($objectType);\n foreach ($supportedLanguages as $language) {\n $translationInput = $this->readTranslationInput($form, $language);\n if (!count($translationInput)) {\n continue;\n }\n \n foreach ($translationInput as $fieldName => $fieldData) {\n $setter = 'set' . ucfirst($fieldName);\n $entity->$setter($fieldData);\n }\n \n $entity->setLocale($language);\n $entityManager->flush();\n }\n \n $this->toggleLoggable(true);\n }", "title": "" }, { "docid": "f3746a151df2ac2f2a2ec3e448e81585", "score": "0.46296352", "text": "static public function mdlEditarEncuesta($tabla,$datos){\n\n $stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET Titulo = :Titulo, Descripcion = :Descripcion, Estado = :Estado, FechaInicio = :FechaInicio, FechaFin = :FechaFin WHERE Id = :IdEncuesta \");\n\n $stmt -> bindParam(\":IdEncuesta\", $datos['idEncuesta'], PDO::PARAM_INT);\n $stmt -> bindParam(\":Titulo\", $datos['titulo'], PDO::PARAM_STR);\n $stmt -> bindParam(\":Descripcion\", $datos['descripcion'], PDO::PARAM_STR);\n $stmt -> bindParam(\":Estado\", $datos['estado'], PDO::PARAM_INT);\n $stmt -> bindParam(\":FechaInicio\", $datos['fechaInicio'], PDO::PARAM_STR);\n $stmt -> bindParam(\":FechaFin\", $datos['fechaFin'], PDO::PARAM_STR);\n\n if ($stmt->execute()) {\n \n return \"ok\";\n\n }else{\n\n return $stmt->errorinfo();\n\n }\n\n $stmt = null;\n \n }", "title": "" }, { "docid": "514cc93aa5fbe1d638312398500a184b", "score": "0.46263406", "text": "function updateStatus($column,$status,$id){\n \n $data = array($column => $status);\n $this->update($data,'forumID = '.$id);\n return $this->fetchAll()->toArray(); \n }", "title": "" }, { "docid": "68a5bb09c4a95cef4f6efa1b7e7d34d9", "score": "0.46258724", "text": "public function updateSuccess();", "title": "" }, { "docid": "333e3938772f7ee72d6cc56f490dd16e", "score": "0.46197215", "text": "function globallink_entity_get_submission_status() {\r\n module_load_include('inc', 'globallink', 'globallink');\r\n module_load_include('inc', 'globallink', 'globallink_settings');\r\n module_load_include('inc', 'globallink', 'gl_ws/gl_ws_common');\r\n\r\n $query = db_select('globallink_core_entity', 'tc');\r\n $query->fields('tc', array('submission_ticket'));\r\n $query->distinct();\r\n $query->condition('status', 'Sent for Translations', '=');\r\n\r\n $results = $query->execute();\r\n\r\n foreach ($results as $row) {\r\n if ($row->submission_ticket) {\r\n try {\r\n $pd4 = globallink_get_project_director_details();\r\n $status = globallink_get_status($pd4, $row->submission_ticket);\r\n\r\n if (!$status || $status == 'CANCELLED') {\r\n globallink_entity_update_submission_status($row->submission_ticket);\r\n }\r\n }\r\n catch (SoapFault $se) {\r\n globallink_entity_update_submission_status($row->submission_ticket);\r\n }\r\n catch (Exception $ex) {\r\n globallink_entity_update_submission_status($row->submission_ticket);\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "1887017fcd42f7cd5b48f07f3af5866e", "score": "0.4614262", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set nombre=\\\"$this->nombre\\\",calle=\\\"$this->calle\\\",comuna=\\\"$this->comuna\\\",ciudad=\\\"$this->ciudad\\\",is_active=\\\"$this->is_active\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "6809da21d09f58c4592546fda7bb93d0", "score": "0.46108297", "text": "public function toggleEntityStatus($id)\n\t{\n\t\t$table = $this->__TABLE;\n\t\t$updateData = [ $this->__STATUS => '1-'.$this->__STATUS ];\n\t\t$where = [\n\t\t\t$this->__ID => $id\n\t\t];\n\t\t$this->model->toggle_entity_status($table, $updateData, $where);\n\t\techo json_encode(['status'=>true, 'message'=>'Status Changed Successfully']);\n\t}", "title": "" } ]
c49722ec8f4e7aef18dd6fc96c54354f
Test the creation of a new user.
[ { "docid": "b45f631eb5166ade89956c8af004e302", "score": "0.84848225", "text": "public function test_creating_a_new_user()\n {\n $response = $this->postUser();\n\n $response\n ->assertStatus(201)\n ->assertJson([\n 'message' => 'Usuário criado com sucesso!',\n 'data' => [\n 'type' => 0,\n 'name' => 'John Doe',\n 'cpf_cnpj' => '12345678901',\n 'email' => '[email protected]',\n ]\n ]);\n }", "title": "" } ]
[ { "docid": "ae8a9a07967bb053380ba4246ec26692", "score": "0.85200095", "text": "public function testUserCreate()\n {\n $user = $this->createUserAdmin();\n\n $this->actingAs($user)\n ->get(route('backend.users.create'))\n ->assertStatus(200)\n ->assertViewIs('backend.user.new');\n }", "title": "" }, { "docid": "8b194f1cc7ff89fe6dcec922124cfa97", "score": "0.8169203", "text": "public function testAUserCanBeCreated()\n {\n $new = factory(User::class)->make(['email_verified_at' => null]);\n\n // i visit the endpoint\n $response = $this->post(route('register'), $new->toArray() + ['password' => $new->password, 'password_confirmation' => $new->password]);\n\n // and should be redirected\n $response->assertRedirect();\n\n // there are no errors\n $response->assertSessionHasNoErrors();\n\n // and the user is not stored in the database\n $this->assertDatabaseHas('users', $new->toArray());\n }", "title": "" }, { "docid": "6940ae1af28df26c7033f7ccc45ba281", "score": "0.81544775", "text": "public function testCreate()\n {\n $data = [\n 'first_name' => 'Fernando',\n 'last_name' => 'Machado',\n 'cpf' => '08805064076',\n 'email' => '[email protected]',\n 'password' => 'secret',\n 'type' => 'default'\n ];\n\n $this->json('POST', '/user', $data)->seeStatusCode(201);\n\n unset($data['password']);\n\n $this->seeInDatabase('users', $data);\n }", "title": "" }, { "docid": "9a5f423673a6ee20ceb25a0914f2d8f2", "score": "0.81207967", "text": "public function shouldCreateUser(){\n\n $faker = Faker::create();\n $parameters = [\n 'firstname' => $faker->firstname(),\n 'lastname' => $faker->lastname(),\n 'email' => $faker->email(),\n 'password' => 'mysecretlove',\n 'password_confirmation' => 'mysecretlove'\n ];\n\n $this->post('api/auth/register', $parameters, []);\n $this->seeStatusCode(201);\n }", "title": "" }, { "docid": "b8e0660bdd9f4071ae9d7606e651d3cf", "score": "0.81159467", "text": "public function testCreateNewUserSucceedsForValidData()\n {\n $this->_user->username = \"[email protected]\";\n $this->_user->password = \"Nautilus\";\n $this->assertTrue($this->_user->save());\n }", "title": "" }, { "docid": "6ac78de39ad909f4ab1ac25adef5b8f0", "score": "0.8110404", "text": "public function testCreateUser() {\n\t\t$user = $this->createUser();\n\n\t\t$this->actingAs($user)\n\t\t\t->get('/api/v1/authenticate')\n\t\t\t->receiveJson()\n\t\t\t->seeJsonStructure([\n\t\t\t\t'user' => [\n\t\t\t\t\t'id',\n\t\t\t\t\t'email',\n\t\t\t\t\t'first_name',\n\t\t\t\t\t'last_name',\n\t\t\t\t\t'created_at',\n\t\t\t\t\t'updated_at',\n\t\t\t\t],\n\t\t\t]);\n\t}", "title": "" }, { "docid": "a2caa264b6664a8843d0106d07bfea88", "score": "0.8106423", "text": "public function testCreateUser()\n {\n $userData = [\n 'name' => 'example',\n 'email' => strtolower(Str::random(10)) . '@gmail.com', // Because the factory generated e-mail may be repeated\n 'password' => 123456\n ];\n $response = $this->auth()->post(api_route('users.store'), $userData);\n\n $response->assertSuccessful();\n\n $this->assertTrue(User::whereEmail($userData['email'])->exists(), 'The user does not exist after created the user.');\n }", "title": "" }, { "docid": "2c5aa3dde428dc00f31415f22004ae88", "score": "0.8017846", "text": "public function testAdminNewUser(): void\n {\n $client = $this->authAsAdmin($this);\n $crawler = $client->request('GET', '/en/admin/user/new');\n\n $form = $crawler->selectButton('Create user')->form([\n 'user[profile][full_name]' => 'test',\n 'user[username]' => 'test',\n 'user[profile][phone]' => 'test',\n 'user[email]' => '[email protected]',\n 'user[email_verified]' => true,\n 'user[password]' => 'test',\n ]);\n $client->submit($form);\n\n $this->assertSame(Response::HTTP_FOUND, $client->getResponse()->getStatusCode());\n $user = $this->getUser($client, 'test');\n\n $this->assertNotNull($user);\n $this->assertSame('test', $user->getProfile()->getFullName());\n $this->assertSame('test', $user->getUsername());\n $this->assertNotNull($user->getEmailVerifiedAt());\n }", "title": "" }, { "docid": "b4df2a353dbdb8590177716675f864aa", "score": "0.80116254", "text": "public function test_create_user()\n {\n $user = factory(User::class)->create();\n $this->actingAs($user, 'api');\n\n $createData = [\n 'name' => 'testuser',\n 'age' => '22',\n 'address' => '5463 test address'\n ];\n $response = $this->post('api/users', $createData);\n $response->assertStatus(201);\n }", "title": "" }, { "docid": "aacb18dd8431b130f05ea2746586a02e", "score": "0.8001617", "text": "public function user_can_create_user()\n {\n $user = factory(User::class)->make()->toArray();\n\n $user['password'] = Hash::make('12345678Aa');\n $user['password_confirmation'] = Hash::make('12345678Aa');\n\n $response = $this->actingAs($this->user)->post(route('user.store'), $user);\n\n $response->assertRedirect(route('user.index'));\n }", "title": "" }, { "docid": "5c9e6feabbcfbc5f4888e9f5ca809878", "score": "0.7968732", "text": "public function testCreate()\n {\n TestUtil::setupCassette('users/create.yml');\n\n $user = self::$client->user->create([\n 'name' => 'Test User',\n ]);\n\n $this->assertInstanceOf(User::class, $user);\n $this->assertStringMatchesFormat('user_%s', $user->id);\n $this->assertEquals('Test User', $user->name);\n\n // Delete the user once done so we don't pollute with hundreds of child users\n self::$client->user->delete($user->id);\n }", "title": "" }, { "docid": "a656deeec797b7091a3e409687c86722", "score": "0.7954426", "text": "public function testCreateValidUser()\n {\n $email = $this->faker->unique()->safeEmail;\n\n (new CreateNewUser())->create([\n 'firstname' => 'Test',\n 'lastname' => 'Test2',\n 'age' => 21,\n 'email' => $email,\n 'password' => 'Azerty1234',\n 'password_confirmation' => 'Azerty1234'\n ]);\n\n $this->assertDatabaseHas('users', [\n 'email' => $email\n ]);\n }", "title": "" }, { "docid": "8276bdf1ca07695af8e83dc602a49512", "score": "0.7928944", "text": "public function testCreateUser()\n {\n $user = factory(User::class)->create();\n $this->json('POST', '/users', [$user]);\n $this->assertDatabaseHas('users', [\n 'name' => 'Joshua'\n ]);\n }", "title": "" }, { "docid": "01074b09de883bc53db1b48d58146c40", "score": "0.7922508", "text": "public function testUserIsCreated(): void\n {\n $this\n ->artisan('hydrofon:init')\n ->expectsQuestion('Name', 'New User')\n ->expectsQuestion('E-mail Address', '[email protected]')\n ->expectsQuestion('Password', 'password')\n ->expectsOutput('User was created successfully!')\n ->assertSuccessful();\n\n $this->assertDatabaseHas(User::class, [\n 'name' => 'New User',\n 'email' => '[email protected]',\n ]);\n }", "title": "" }, { "docid": "00e9bb357bc35397484ef5ff116cb174", "score": "0.7883672", "text": "public function testCreateUser()\n {\n $users = factory(\\App\\User::class,3)->create();\n \n Log::info('TEST: User Create == '.$users); \n echo 'TEST: User Create SUCCESS';\n echo \"\\n\";\n \n $this->assertTrue(true);\n }", "title": "" }, { "docid": "e435917090c5ce6a7720a233f8f8ba87", "score": "0.78572845", "text": "public function createUser();", "title": "" }, { "docid": "bc3769a07a6760c9586aa16ae01cec21", "score": "0.7843854", "text": "public function test_user_creation()\n {\n $email = 'test_' . $this->faker->email();\n\n $response = $this->json('POST', 'api/usuario', [\n 'first_name' => 'Patrick',\n 'last_name' => 'Pessanha',\n 'email' => $email,\n 'telephone' => '+5521979886657',\n 'password' => 'password',\n 'password_confirmation' => 'password',\n ]);\n\n $user = User::where('email', $email)->first();\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'success' => true,\n ]);\n\n $this->assertInstanceOf(User::class, $user);\n\n if ($user) {\n $user->delete();\n }\n\n }", "title": "" }, { "docid": "4de8c961724d7713212009fd988f2dd6", "score": "0.77437186", "text": "public function testCreateUser()\n\t{\n\t\t$repository = app(UserRepository::class);\n\t\t$repository->create([\n\t\t\t'email' => '[email protected]'\n\t\t]);\n\n\t\t$this->assertNotEmpty($repository->getByEmail('[email protected]'));\n\t}", "title": "" }, { "docid": "bd97a21406552397c16e2b67a9d83ebd", "score": "0.77201647", "text": "public function testCreateUser()\r\n {\r\n //create a web client\r\n $client = static::createClient();\r\n\r\n //go to the registration page\r\n $crawler = $client->request('GET', '/register');\r\n\r\n //fill out the form with the parameters below\r\n $form = $crawler->selectButton('Register!')->form(array(\r\n\r\n 'user[email]' => '[email protected]',\r\n 'user[plainPassword][first]' => 'Password1',\r\n 'user[plainPassword][second]' => 'Password1',\r\n 'user[firstName]' => \"Bob\",\r\n 'user[lastName]' => \"Loblaw\",\r\n 'user[birthDate]' => '1969-04-20',\r\n 'user[city]' => 'Saskatoon'\r\n ));\r\n $form['user[country]']->select('CA');\r\n $form['user[termsAccepted]']->tick();\r\n\r\n //submit the form\r\n $crawler = $client->submit($form);\r\n\r\n //query the database and pull the user created out\r\n $this->userResult = $this->em\r\n ->getRepository(User::class)\r\n ->findBy(['email' => '[email protected]']);\r\n\r\n //assert that the user is a user\r\n $this->assertTrue($this->userResult[0] instanceof User);\r\n\r\n }", "title": "" }, { "docid": "a5edc8f1cc1ae579e9260fa10ccadf2e", "score": "0.77080303", "text": "public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }", "title": "" }, { "docid": "758555d2f527ca70889f6de52c4ced21", "score": "0.7680051", "text": "public function testNew()\n {\n /** @var Crawler $crawler */\n $crawler = $this->getClient()->request('GET', sprintf('/user/new', $this->getTestUser()->getId()));\n /** @var Form $form */\n $form = $crawler->selectButton('Сохранить')->form();\n $form->setValues(\n [\n 'user[firstname]' => Uuid::uuid4(),\n 'user[lastname]' => Uuid::uuid4(),\n 'user[login]' => Uuid::uuid4(),\n 'user[password]' => Uuid::uuid4(),\n 'user[birthDate]' => (new \\DateTime())->format('d.m.Y'),\n 'user[phone]' => $this->getRandomPhoneNumber(),\n ]\n );\n $this->getClient()->submit($form);\n $this->assertTrue($this->getClient()->getResponse()->isRedirection());\n $this->assertRegExp('#/user/\\d+/show#', $this->getClient()->getResponse()->headers->get('Location'));\n }", "title": "" }, { "docid": "ff4a075c905f744dce0aa52dd1f00993", "score": "0.76150995", "text": "private function create_test_user() {\n global $CFG;\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n $user = new user(array(\n 'idnumber' => 'testuseridnumber',\n 'username' => 'testuserusername',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'email' => '[email protected]',\n 'country' => 'CA'\n ));\n $user->save();\n\n return $user->id;\n }", "title": "" }, { "docid": "b2efc5efb7fcac0731dc912bc421b893", "score": "0.76038194", "text": "public function testUserCreated()\n {\n $this->assertInstanceOf(User::class, self::$user);\n }", "title": "" }, { "docid": "59fc8c121a02f5f5eb432549d475614e", "score": "0.75684124", "text": "public function testCreateUser()\n {\n User::create(\n [\n 'name' => 'Admin User',\n 'email' => '[email protected]',\n 'password' => bcrypt(123456)\n ]\n );\n\n $this->assertDatabaseHas(\n 'users',\n [\n 'email' => '[email protected]'\n ]\n );\n }", "title": "" }, { "docid": "02aab877ee807b88923e3afdf714a324", "score": "0.7551185", "text": "public function testCreateNew() {\n\t\t$expectedArray = $this->getFixture( 'user-3' );\n\n\t\t$data = [\n\t\t\t'first_name' => $expectedArray['first_name'],\n\t\t\t'last_name' => $expectedArray['last_name'],\n\t\t\t'email' => $expectedArray['email'],\n\t\t];\n\n\t\t$api = $this->getApiMock();\n\t\t$api->expects( $this->once() )\n\t\t\t->method( 'post' )\n\t\t\t->with( '/users', $data )\n\t\t\t->will( $this->returnValue( $expectedArray ) );\n\n\t\t$this->assertEquals( $expectedArray, $api->create( $data ) );\n\t}", "title": "" }, { "docid": "67200b9d2ba5858fc4fa7946ed324aff", "score": "0.7543826", "text": "public function signUpUser()\n\t{\n\t\t$this->assertTrue(true);\n\t}", "title": "" }, { "docid": "a46b4bcfb02c4b72717f3df4314fc27f", "score": "0.7540098", "text": "public function testUserCreate()\n {\n $testUserName = Str::random(10);\n $testUserEmail = $testUserName . '@fake.email';\n $messages = [\n 'generated_email' => 'Email \"%s\" is generated from username.',\n 'same_password' => 'Password is assigned same as username.',\n 'user_created' => 'User \"%s\" has been created.',\n 'duplicated_user' => 'User already exists with email \"%s\"!',\n ];\n\n $this->artisan('user:create', [\n 'username' => $testUserName\n ])\n ->expectsOutput(sprintf($messages['generated_email'], $testUserEmail))\n ->expectsOutput($messages['same_password'])\n ->expectsOutput(sprintf($messages['user_created'], $testUserName))\n ->assertExitCode(0);\n\n $this->artisan('user:create', [\n 'username' => $testUserName\n ])\n ->expectsOutput(sprintf($messages['generated_email'], $testUserEmail))\n ->expectsOutput(sprintf($messages['duplicated_user'], $testUserEmail))\n ->assertExitCode(0);\n\n $testUserName = 'user_with_email';\n $this->artisan('user:create', [\n 'username' => $testUserName,\n '--email' => $testUserName . '@mail.fake'\n ])\n ->expectsOutput($messages['same_password'])\n ->expectsOutput(sprintf($messages['user_created'], $testUserName))\n ->assertExitCode(0);\n\n $testUserName = 'user_with_pass';\n $this->artisan('user:create', [\n 'username' => $testUserName,\n '--password' => $testUserName,\n '--email' => $testUserName . '@mail.fake'\n ])\n ->expectsOutput(sprintf($messages['user_created'], $testUserName))\n ->assertExitCode(0);\n }", "title": "" }, { "docid": "90bc7be6f750be4c1cd3a7fb129b580a", "score": "0.74949527", "text": "public function testCreateUser()\n {\n\n\n $this->post('/api/user',$this->dados,$this->api_token);\n $this->assertResponseOk();\n\n $resposta = (array) json_decode($this->response->content());\n\n $this->assertArrayHasKey('name',$resposta);\n $this->assertArrayHasKey('email',$resposta);\n $this->assertArrayHasKey('id',$resposta);\n\n $this->seeInDatabase('users',[\n 'name' => $this->dados['name'],\n 'email' => $this->dados['email']\n ]);\n\n }", "title": "" }, { "docid": "deaf6e09ac81e6b4a0327869b56ae1c4", "score": "0.7449463", "text": "function test_create_new(){\n\t\t$controller = $this->client->get(\"main/index\");\n\t\t$this->assertEquals(200,$this->client->getStatusCode());\n\t\t$this->assertNotContains(\"john.doe.tester\",$this->client->getContent()); // the front page doesn't contain info about user john.doe.tester, actually this user doesn't exist yet\n\t\t$this->assertEquals(null,$controller->logged_user);\n\n\t\t// we are visiting the page for user registration\n\t\t$controller = $this->client->get(\"users/create_new\");\n\n\t\tif(defined(\"USER_REGISTRATION_ENABLED\") && !constant(\"USER_REGISTRATION_ENABLED\")){\n\t\t\t$this->assertEquals(404,$this->client->getStatusCode());\n\t\t\treturn;\n\t\t}\n\n\t\t$this->assertEquals(200,$this->client->getStatusCode());\n\t\t$this->assertEquals(null,$controller->logged_user);\n\n\t\t// passwords don't match to each other\n\t\t$params = $this->params;\n\t\t$params[\"password_repeat\"] = \"no_more_feras\";\n\t\t$controller = $this->client->post(\"users/create_new\",$params);\n\t\t$this->assertEquals(true,$controller->form->has_errors());\n\t\t$this->assertEquals(200,$this->client->getStatusCode());\n\n\t\t// we are posting data to the page\n\t\t$params = $this->params;\n\t\t$controller = $this->client->post(\"users/create_new\",$params);\n\t\t$this->assertEquals(false,$controller->form->has_errors());\n\t\t$this->assertEquals(303,$this->client->getStatusCode()); // redirecting to $params[\"return_uri\"]...\n\t\t$this->assertContains('You have been successfully registered',(string)$controller->flash->success());\n\n\t\t// testing outgoing email\n\t\t$mailer = $controller->mailer;\n\t\t$this->assertEquals('[email protected]',$mailer->to);\n\t\t$this->assertContains('Thanks for signing up',$mailer->body_html);\n\t\t$this->assertContains('login: john.doe.tester',$mailer->body_html);\n\n\t\t// we are visiting the front page again\n\t\t$controller = $this->client->get(\"main/index\");\n\t\t$this->assertEquals(200,$this->client->getStatusCode());\n\t\t$this->assertContains(\"john.doe.tester\",$this->client->getContent()); // now the page contains info about user john.doe.tester\n\t\t$this->assertEquals(\"john.doe.tester\",$controller->logged_user->getLogin());\n\n\t\t// the new user has hashed password\n\t\t$john = User::FindByLogin(\"john.doe.tester\");\n\t\t$this->assertNotEquals(\"no_more_fears\",$john->getPassword());\n\t\t$this->assertTrue(MyBlowfish::IsHash($john->getPassword()));\n\n\t\t$this->_logout_user();\n\t}", "title": "" }, { "docid": "44768063785184226d06ad1568c8f4c1", "score": "0.74493974", "text": "public function testCreateUser()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "211dab34d64734ccb153b46766e7e762", "score": "0.7448044", "text": "protected function createUser()\n {\n factory(App\\User::class, 5)->create();\n }", "title": "" }, { "docid": "c467e7e14d6cef549cf1b2c778ae4e03", "score": "0.7444327", "text": "public function test_user_can_see_create_form()\n {\n $user = User::create(['name'=>'testName', 'password' => password_hash('123', 1),'email'=>'[email protected]']);\n $response = $this->actingAs($user)->get('/popularopinion'); \n $response->assertSuccessful();\n $response->assertViewIs('popularopinion.create');\n $user->delete();\n }", "title": "" }, { "docid": "5a04792c9407f9efcc8b0e8407df5e21", "score": "0.7374435", "text": "private function createTestUser()\n {\n return factory(App\\User::class)->create(['email' => config('credentials.vocabulary.email'), 'password' => bcrypt(config('credentials.vocabulary.password'))]);\n }", "title": "" }, { "docid": "4e28c513befbaac1d080279db4f60e2a", "score": "0.73591036", "text": "public function createUser()\n\t\t{\n\t\t\t\t\tlog_message('info', \"userCtrl\");\n\t\t\t\t\t$userData = $this->jsonbourne->decodeReqBody(); //get json\n\t\t\t\t\t$resultFromCreateANewUser = $this->userModel->create($userData); // pass arguments as array\n\t\t\t\t\techo count($resultFromCreateANewUser) > 1 ? $this->jsonbourne->forge(0, \"The user has been created\", $resultFromCreateANewUser): $this->jsonbourne->forge(1, \"error in the creation of user\", null);\n\t\t}", "title": "" }, { "docid": "c17240848868ff6d5a1d02cf485c1425", "score": "0.73470885", "text": "public function test_creating_a_new_user_with_empty_name()\n {\n $response = $this->postJson('/api/user', [\n 'type' => 0,\n 'cpf_cnpj' => '12345678901',\n 'email' => '[email protected]',\n 'password' => '12345678'\n ]);\n\n $response\n ->assertStatus(400)\n ->assertExactJson(['message' => 'O campo nome é obrigatório.']);\n }", "title": "" }, { "docid": "4c7d531a02ce13babb234055b746d5c8", "score": "0.73457116", "text": "public function setup_createuser()\n {\n //\n // Create user\n //\n $response = $this->fusionAuthClient->createUser(null, [\"user\" => [\n \"email\" => \"unittest\" . $this->sessionIdentifier . \"@fusionauth.localdomain\",\n \"password\" => \"password\",\n \"firstName\" => \"unittest\"\n ]]);\n $this->handleResponse($response);\n $this->userId = $response->successResponse->user->id;\n $this->setup_loginuser();\n }", "title": "" }, { "docid": "fe5bab050f4bd604fd9fb968dd882bd6", "score": "0.73417497", "text": "public function test_it_can_create_user_if_logged_in_user_is_super_admin()\n {\n\n $data = [\n 'fullname' => $this->faker->name,\n 'email' => $this->faker->unique()->safeEmail,\n ];\n\n $response = $this->actingAs($this->user)->post(route('users.store'), $data);\n $response->assertStatus(302);\n $response->assertRedirect(route('users.index'));\n $response->assertSessionHas('message', 'User Successfully created');\n }", "title": "" }, { "docid": "d410c5500e0b804696f612337d3cbf8e", "score": "0.7340264", "text": "public function testAddNewUser()\n {\n $email = \"NEWphpunit@test_nonAdmin.com\";\n $pass = 'NEWphpPassword';\n $admin = 0;\n\n $register = new Register();\n $this->assertTrue($register->addNewUser($email, $pass, $admin));\n }", "title": "" }, { "docid": "b262d3145aef4f92fa3e6fb78adf3627", "score": "0.7339296", "text": "public function testThatCreateUserRequestIsFormedProperly()\n {\n $api = new MockManagementApi( [ new Response( 200, self::$headers ) ] );\n\n $api->call()->users->create( [\n 'connection' => '__test_connection__',\n 'email' => '__test_email__',\n 'password' => '__test_password__',\n ] );\n\n $this->assertEquals( 'POST', $api->getHistoryMethod() );\n $this->assertEquals( 'https://api.test.local/api/v2/users', $api->getHistoryUrl() );\n $this->assertEmpty( $api->getHistoryQuery() );\n\n $headers = $api->getHistoryHeaders();\n $this->assertEquals( 'Bearer __api_token__', $headers['Authorization'][0] );\n $this->assertEquals( self::$expectedTelemetry, $headers['Auth0-Client'][0] );\n\n $body = $api->getHistoryBody();\n $this->assertArrayHasKey( 'connection', $body );\n $this->assertEquals( '__test_connection__', $body['connection'] );\n $this->assertArrayHasKey( 'email', $body );\n $this->assertEquals( '__test_email__', $body['email'] );\n $this->assertArrayHasKey( 'password', $body );\n $this->assertEquals( '__test_password__', $body['password'] );\n }", "title": "" }, { "docid": "2fd2e904b904017565ca311a7b2204a0", "score": "0.73299515", "text": "protected function createTestUser() {\n\t\treturn wp_insert_user(array(\n\t\t\t'user_login' => 'test_developer',\n\t\t\t'user_pass' => '123456789',\n\t\t\t'user_email' => '[email protected]',\n\t\t\t'role' => 'developer',\n\t\t\t));\n\t}", "title": "" }, { "docid": "7327198779fe8d5722a5597605f6f491", "score": "0.72847366", "text": "public function testUserCanCreatePost()\n {\n $user = factory(User::class)->create();\n\n $faker = Factory::create();\n $body = $faker->text($maxNbChars = 200);\n\n $this->browse(function ($browser) use ($user, $body) {\n $browser->loginAs($user)\n ->visit('/' . $user->username)\n ->type('body', $body)\n ->press('Submit')\n ->assertSee($body);\n });\n }", "title": "" }, { "docid": "b80f86e6860579e5d6199d1c7d99d718", "score": "0.72755456", "text": "public function setUp()\n {\n parent::setUp();\n factory(User::class, self::NUMBER_USER_CREAT_BY_FACTORY)->create();\n }", "title": "" }, { "docid": "5922bfce46d0d5a76a14e4c5150f70bf", "score": "0.7240286", "text": "public function testAdminCreateAsUserOK()\n {\n $crawler = $this->client->request('GET', '/users');\n\n $link = $crawler->selectLink('Créer un utilisateur')->link();\n $crawler = $this->client->click($link);\n\n $form = $crawler->selectButton('Ajouter')->form();\n $form['user[username]'] = 'NewUser';\n $form['user[password][first]'] = 'password';\n $form['user[password][second]'] = 'password';\n $form['user[email]'] = '[email protected]';\n $this->client->submit($form);\n\n $crawler = $this->client->followRedirect();\n\n static::assertEquals(200, $this->client->getResponse()->getStatusCode());\n static::assertEquals(1, $crawler->filter('html:contains(\"Superbe ! L\\'utilisateur a bien été ajouté.\") ')->count());\n static::assertEquals(1, $crawler->filter('html:contains(\"NewUser\") ')->count());\n\n $this->client = static::createClient(array(), array(\n 'PHP_AUTH_USER' => 'NewUser',\n 'PHP_AUTH_PW' => 'password',\n ));\n\n $crawler=$this->client->request('GET', '/login');\n\n $form = $crawler->selectButton('Se connecter')->form();\n $form['_username'] = 'NewUser';\n $form['_password'] = 'password';\n $this->client->submit($form);\n\n $this->client->followRedirect();\n\n $array = $this->client->getContainer()->get('security.token_storage')->getToken()->getUser()->getRoles();\n\n $this->assertContains('ROLE_USER', $array);\n $this->assertNotContains('ROLE_ADMIN', $array);\n }", "title": "" }, { "docid": "a6ccd838af0e7cf2f48681713aa5fc9c", "score": "0.7229947", "text": "public function testAccountCreateOk()\n {\n $user = factory(\\App\\Models\\User::class)->states(\"enough_salary\")->create();\n $userId = $user->id ?: \"dummy\";\n\n $response = $this->post(\"/api/v1/users/{$userId}/accounts\", [\n \"first_name\" => \"Shawn\",\n \"last_name\" => \"Pug\",\n \"address\" => \"NSW\",\n \"gender\" => \\App\\Models\\Account::GENDER__MALE,\n \"date_of_birth\" => \"2012-12-11\",\n ]);\n $response->assertStatus(201);\n }", "title": "" }, { "docid": "fc77378a11907bbd234ffd074ca398cb", "score": "0.7201438", "text": "public function testUserRegistration()\n {\n $user = User::register('Test User', '[email protected]', 'password');\n $this->assertEquals('Test User', $user->name);\n $this->assertEquals('[email protected]', $user->email);\n }", "title": "" }, { "docid": "eabc2f89ce520307043edab7179a42a6", "score": "0.718578", "text": "public function testCreate()\n {\n $response = $this->get('/usuarios/create');\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "bd80b7a16dcb5a8526c5127c4f3e5ab0", "score": "0.71799546", "text": "private function createUser()\n\t{\n\t\t$user = new User;\n\t\t$user->username = 'PHPUnit Test';\n\t\t$user->email = 'phpunit@localhost';\n\t\t$user->password = 'test';\n\t\t$user->status = 1;\n\t\t$user->save();\t\n\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "e12abe7fe0a54dfe668673a6f9ca8ab7", "score": "0.7179538", "text": "public function testRegisterReturnSuccess()\n {\n $userRepository = new UserRepository();\n \tTestHelper::createUser($userRepository);\n\n $this->assertTrue($userRepository->success);\n\n // remove registered user in DB after test\n TestHelper::removeUser();\n }", "title": "" }, { "docid": "f02423066394deb884e5d051f642e0ec", "score": "0.71709985", "text": "public function create($user);", "title": "" }, { "docid": "64dacf64435a6ca86cf82eb86b23b153", "score": "0.7158894", "text": "public function testRegisterUser()\n {\n $response = $this->withHeaders(['Authorization' => \"Bearer \" . $this->getJwtToken(env('TEST_ROOT_LOGIN'))])->json('POST', '/api/users/add', [\n 'login' => $this->login,\n 'password' => $this->password,\n 'password_confirmation' => $this->password,\n 'enabled' => true,\n 'role' => 'user',\n 'note' => 'test user'\n ]);\n echo $response->getContent() . PHP_EOL;\n $response->assertStatus(200)->assertJson([\n \"status\" => \"success\"\n ]);\n }", "title": "" }, { "docid": "5845bd9d417f85a7f4c9cdf589aa2e9c", "score": "0.71466416", "text": "public function testInsertUser()\n {\n\n $userId = null;\n $tableName = \"users\";\n $this->userData();\n $response = $this->_user->insertUser($this->_post, $userId, $tableName);\n $this->assertEquals($response['status'], 200);\n\n }", "title": "" }, { "docid": "ed3be29b257bc6f0f12d14fd662d79a7", "score": "0.7144083", "text": "public function testRegistration()\n {\n Event::fake();\n Mail::fake();\n\n $userSvc = app('App\\Services\\UserService');\n\n setting('pilots.auto_accept', true);\n\n $user = factory(App\\Models\\User::class)->create();\n $user = $userSvc->createUser($user);\n\n $this->assertEquals(UserState::ACTIVE, $user->state);\n\n Event::assertDispatched(\\App\\Events\\UserRegistered::class, function ($e) use ($user) {\n return $e->user->id === $user->id\n && $e->user->state === $user->state;\n });\n\n /*Mail::assertSent(\\App\\Mail\\UserRegistered::class, function ($mail) use ($user) {\n return $mail->user->id === $user->id\n && $mail->user->state === $user->state;\n });*/\n }", "title": "" }, { "docid": "1595b84515fe0c58931d7a50faeab85b", "score": "0.7142244", "text": "public function testRegisterUser()\n {\n $response = $this->withHeaders(['Authorization' => \"Bearer \" . $this->getJwtToken(env('TEST_ROOT_LOGIN'))])->json('POST', '/api/users/add', [\n 'login' => 'test_login',\n 'password' => 'test_pass',\n 'password_confirmation' => 'test_pass',\n 'enabled' => true,\n 'role' => 'user',\n 'note' => 'test user'\n ]);\n echo $response->getContent() . PHP_EOL;\n $response->assertStatus(200)->assertJson([\n \"status\" => \"success\"\n ]);\n }", "title": "" }, { "docid": "99aaf16c27f798ad516fa6c56da4f3de", "score": "0.71348995", "text": "public function test_creating_a_user_with_same_email()\n {\n $response = $this->postUser();\n\n $response = $this->postJson('/api/user', [\n 'type' => 0,\n 'name' => 'John Doe 2',\n 'cpf_cnpj' => '12345678901234',\n 'email' => '[email protected]',\n 'password' => '12345678'\n ]);\n\n $response\n ->assertStatus(400)\n ->assertExactJson(['message' => 'Já existe esse e-mail registrado.',]);\n }", "title": "" }, { "docid": "7d046f1e507da11042b4c23e04e457c3", "score": "0.7123344", "text": "public function testUserRegistration()\n {\n // Trying invalid data by appending a special character to the user name\n $response = $this->post('/api/register',\n [\n 'name' => 'Test_User$',\n 'email' => '[email protected]',\n 'password' => 'secret',\n ],\n [\n 'Accept' => 'application/json',\n ]\n );\n\n // Validation failed\n $response->assertStatus(422);\n\n // Trying valid data now\n $response = $this->post('/api/register',\n [\n 'name' => 'Test_User',\n 'email' => '[email protected]',\n 'password' => 'secret',\n ],\n [\n 'Accept' => 'application/json',\n ]\n );\n\n $response\n ->assertStatus(201)\n ->assertJsonFragment([\n 'name' => 'Test_User',\n 'email' => '[email protected]',\n ]);\n\n $this->assertDatabaseHas('users', [\n 'name' => 'Test_User',\n 'email' => '[email protected]',\n ]);\n }", "title": "" }, { "docid": "1a71fc411d23ef7622804dcbb5c4a6e1", "score": "0.7121193", "text": "public function create(User $user): bool\n {\n }", "title": "" }, { "docid": "17930f89dde9841ef928c7ecd390b126", "score": "0.7109893", "text": "public function new_user_post() {\n if ($this->post(\"username\") && $this->post(\"password\")) {\n $this->load->model(\"api_model\");\n $new_user = $this->api_model->create_user($this->post(\"username\"), $this->post(\"password\"));\n if ($new_user === false) {\n $this->response(array(\"status\" => \"failed\"));\n } else {\n $this->response(array(\"status\" => \"success\"));\n }\n }\n }", "title": "" }, { "docid": "d1c89745d0e1d47d5abdabf402db00c7", "score": "0.71094686", "text": "public function test_elis_createorupdate_creates_user() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Run the user create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->username = 'testuserusername';\n $record->email = '[email protected]';\n $record->idnumber = 'testuseridnumber';\n $record->firstname = 'testuserfirstname';\n $record->lastname = 'testuserlastname';\n $record->country = 'CA';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('user', $record, 'bogus');\n\n // Validation.\n $params = array(\n 'username' => 'testuserusername',\n 'email' => '[email protected]',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname'\n );\n\n $this->assertTrue($DB->record_exists(user::TABLE, $params));\n }", "title": "" }, { "docid": "1a2d6bd3a124cdefb9a930bf95740048", "score": "0.7106198", "text": "public function testCreateUser()\n {\n\n\t\t$response = $this->withHeaders([\n 'Accept' => 'application/x.jt.v1+json',\n ])->json('POST', '/api/login', ['name' => 'admin', 'password' => '123456']);\n\t\t\n\t\t$response\n ->assertStatus(200)\n ->assertJsonStructure([\n\t\t\t\t\t'access_token',\n\t\t\t\t\t'expires_in',\n\t\t\t\t\t'token_type',\n ]);\n\t\t$access_token = $response->json()[\"access_token\"];\n\t\n\t\t$response = $this->withHeaders([\n \t'Accept' => 'application/x.jt.v1+json',\n\t\t\t'Authorization' => 'Bearer '. $access_token,\n\t\t])->json('PUT', '/api/user', ['name' => 'guest2', 'password' => '123456']);\n\n\t\t$response\n\t\t\t->assertStatus(200)\n\t\t\t->assertJsonStructure([\n\t\t\t\t'data',\n\t\t\t\t'meta',\n\t\t\t]);\n\n\t\t$response = $this->withHeaders([\n 'Accept' => 'application/x.jt.v1+json',\n ])->json('POST', '/api/login', ['name' => 'guest', 'password' => '123456']);\n\t\t\n\t\t$response\n ->assertStatus(200)\n ->assertJsonStructure([\n\t\t\t\t\t'access_token',\n\t\t\t\t\t'expires_in',\n\t\t\t\t\t'token_type',\n ]);\n\t\t$access_token = $response->json()[\"access_token\"];\n\t\n\t\t$response = $this->withHeaders([\n \t'Accept' => 'application/x.jt.v1+json',\n\t\t\t'Authorization' => 'Bearer '. $access_token,\n\t\t])->json('PUT', '/api/user', ['name' => 'guest2', 'password' => '123456']);\n\n\t\t$response->assertStatus(422);\n }", "title": "" }, { "docid": "4d627bb942422b614825b75302daa9e5", "score": "0.71024066", "text": "public function testUser()\n {\n $user=\\App\\Models\\User::factory()->create();\n $response = $this->actingAs($user)\n ->get('/profile');\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "3f26f6b54c5515afe003341e17ae29a7", "score": "0.708603", "text": "public function testCreate()\n {\n $user = new User();\n $mapper = new UserDataMapper($this->pdo);\n\n // Initialize User\n $user->setEmail('[email protected]');\n $user->setPassword('newuser');\n $user->setFirstname('New');\n $user->setLastname('User');\n\n // Persist new User\n $id = $mapper->save($user);\n\n // Fetch result\n $result = $this->pdo->query(\"\n SELECT *\n FROM `users`\n \")->fetchAll(PDO::FETCH_ASSOC);\n\n // We should have fixtures + 1 records\n $this->assertCount(sizeof($this->fixtures) + 1, $result);\n\n // Id should corespond with number of fixtures + 1\n $this->assertEquals(sizeof($this->fixtures) + 1, $id);\n\n // Assert record came back with proper fields\n $record = $result[sizeof($this->fixtures)];\n $this->assertEquals($record['email'], '[email protected]');\n $this->assertEquals($record['password'], 'newuser');\n $this->assertEquals($record['firstname'], 'New');\n $this->assertEquals($record['lastname'], 'User');\n $this->assertTrue( ! is_null($record['created_at']));\n $this->assertNull($record['updated_at']);\n }", "title": "" }, { "docid": "eaa0647d7c2117c40b11da4f01283b79", "score": "0.7079618", "text": "public function testUserRegistration()\n {\n $name = $this->faker->name;\n $email = $this->faker->safeEmail;\n $password = $this->faker->password(8);\n\n $invite_code = Doorman::generate()->uses(1)->make();\n\n $response = $this->post('register', [\n 'name' => $name,\n 'email' => $email,\n 'code' => $invite_code[0]->code,\n 'password' => $password,\n ]);\n\n $response->assertRedirect(route('dashboard'));\n\n $user = User::where('email', $email)->where('name', $name)->first();\n $this->assertNotNull($user);\n\n $this->assertAuthenticatedAs($user);\n }", "title": "" }, { "docid": "c7cc163ed6baf4b0b14c9608c5db7ff6", "score": "0.7074672", "text": "public function testUserForCreation( $user, $autocreate, array $options = [] ) {\n global $wgLang;\n if ($wgLang->ucFirst($wgLang->lc($user->getName())) != $user->getName()) {\n return StatusValue::newFatal(\"Please login with username in lowercase\");\n }\n return StatusValue::newGood();\n }", "title": "" }, { "docid": "689421ed18e255258519eded0d3c4182", "score": "0.70445853", "text": "public function testCreateTeam()\n {\n Event::fake();\n\n $this->actingAs(factory(User::class)->create());\n $response = $this->post('/teams', $this->data());\n\n $this->assertCount(1, User::all());\n }", "title": "" }, { "docid": "28e4b737d3ba0cbe081e6b3d64a0c93f", "score": "0.7039502", "text": "public function testUserInsertTest()\n {\n $user = factory(\\App\\User::class)->create();\n $this->assertDatabaseHas('users', ['name' => $user->name]);\n }", "title": "" }, { "docid": "427407591dfc5b39e4e51c0e6874cc79", "score": "0.7039146", "text": "public function create_user($values, $expected)\n\t{\n\t\t$return = parent::create_user($values, $expected);\n\n\t\t$this->add('roles', ORM::factory('role', 1));\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "c85913b6e470ca20a0bb70c36d13e246", "score": "0.7038576", "text": "public function testCreate()\n {\n // $this->get('/');\n\n // $this->assertEquals(\n // $this->response->getContent(), $this->app->version()\n // );\n \n\n $this->json('POST', '/user', ['name' => 'Sally'])\n ->seeJsonEquals([\n 'created' => true,\n ]);\n }", "title": "" }, { "docid": "91ae8125a2e821687aa989194a154c30", "score": "0.70158076", "text": "public function newUser($data);", "title": "" }, { "docid": "d4d9e44736acead78108bd79d3ccb177", "score": "0.70082784", "text": "public function testInsertValidUser() : void {\n\t\t$numRows = $this->getConnection()->getRowCount(\"user\");\n\n\t\t$userId = generateUuidV4();\n\n\t\t// create and insert a User to own the Test recipe\n\t\t$user = new User($userId, $this->VALID_ACTIVATION, $this->VALID_EMAIL, $this->VALID_FULLNAME, $this->VALID_HANDLE, $this->VALID_USER_HASH);\n\t\t$user->insert($this->getPDO());\n\n\t\t//grab the data from mySQL and enforce the fields match our expectation\n\t\t$pdoUser = User::getUserByUserId($this->getPDO(), $user->getUserId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"user\"));\n\t\t$this->assertEquals($pdoUser->getUserId(), $userId);\n\t\t$this->assertEquals($pdoUser->getUserActivationToken(), $this->VALID_ACTIVATION);\n\t\t$this->assertEquals($pdoUser->getUserEmail(), $this->VALID_EMAIL);\n\t\t$this->assertEquals($pdoUser->getUserFullName(), $this->VALID_FULLNAME);\n\t\t$this->assertEquals($pdoUser->getUserHandle(), $this->VALID_HANDLE);\n\t\t$this->assertEquals($pdoUser->getUserHash(), $this->VALID_USER_HASH);\n\t\t}", "title": "" }, { "docid": "203ef980fad915b55124ed17afa01e1b", "score": "0.7007932", "text": "public function create( $user)\n {\n //\n }", "title": "" }, { "docid": "182df0a0c11eb0861659373bb2fcd5a5", "score": "0.7006331", "text": "public function sendPostCreateUserValid(ApiTester $I)\n {\n $data = [\n 'email' => 'yurii.lobas+'.fake::create()->md5.'@gmail.com',\n 'firstName' => fake::create()->firstName,\n 'lastName' => fake::create()->lastName,\n 'password' => '!pass'.fake::create()->randomNumber(5, true),\n 'pin' => fake::create()->randomNumber(4, true),\n 'dateOfBirth' => fake::create()->date(\"2000-01-09\"),\n 'defaultZip' => fake::create()->randomNumber(6,true),\n 'phoneNumber' => '+98765432198'.fake::create()->randomDigitNotNull\n ];\n $I->saveUser([\n $data['email'], ' ',\n $data['firstName'], ' ',\n $data['lastName'], ' ',\n $data['password'], ' ',\n $data['pin'], ' ',\n $data['dateOfBirth'], ' ',\n $data['defaultZip'], ' ',\n $data['phoneNumber'], ' '\n ], 'user.txt');\n $I->sendPOST($this->route, $data);\n $I->seeResponseCodeIs(201);\n $this->userID = $I->grabDataFromResponseByJsonPath('$.id');\n $this->token = $I->grabDataFromResponseByJsonPath('$.token');\n $this->userPhone = $I->grabDataFromResponseByJsonPath('$.phoneNumber');\n }", "title": "" }, { "docid": "c856ed8eedf327bc2360fcd1ee12ae14", "score": "0.69849396", "text": "public function testSignUp()\n { \n }", "title": "" }, { "docid": "7cb96a795d8bbfa42cf320825e692805", "score": "0.6983323", "text": "public function createTestUser()\n {\n $user = factory(User::class)->create([\n 'email' => 'jackie.chan@' . env('DOMAIN'),\n 'first_name' => 'Jackie',\n 'last_name' => 'Chan',\n 'password' => bcrypt('secret')\n ]);\n\n return $user;\n }", "title": "" }, { "docid": "1b2c0b3ca706bbb05106761ae0cf05be", "score": "0.69796455", "text": "public function testCanCreateToken()\n {\n $uuid = Str::orderedUuid();\n\n $response = $this->post('api/v1/generate/user/token', [\n 'uuid' => $uuid,\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseCount('user_tokens', 1);\n }", "title": "" }, { "docid": "d2a098a04fc9f918ec23989d0abb6b89", "score": "0.6978167", "text": "public function create(User $user)\n {\n //\n }", "title": "" }, { "docid": "701ad50a3985ad182b1b807547c86110", "score": "0.69738305", "text": "public function create()\n {\n foreach (range(0,10) as $i) {\n $user = User::create([\n 'name' => \"user_{$i}\",\n 'email' => \"user_email_{$i}@am.com\",\n 'email_verified_at' => now(),\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n 'remember_token' => Str::random(10),\n ]);\n\n $this->assertInstanceOf(User::class, $user);\n }\n\n dump(\"Created a bunch of users...\");\n dump(User::all()->toArray());\n dump((new User())->getTable());\n dump(DB::connection()->getDatabaseName());\n }", "title": "" }, { "docid": "a756cc556fe9eaaa805bb64d0afabf08", "score": "0.69732165", "text": "protected function createUser() {\n\t\t$this->u_key = null;\n\t\t$this->u_key = $this->u_obj->create();\n\t}", "title": "" }, { "docid": "95b946df76c496238f665f04382d35ac", "score": "0.696565", "text": "public function testCreate()\n {\n $this->get(route('customer.create'))\n ->assertStatus(302)\n ->assertRedirect('/login');\n\n // authed should get too\n $this->actingAs($this->user)\n ->get(route('customer.create'))\n ->assertStatus(200);\n }", "title": "" }, { "docid": "76d69d5add64409d9bae559ca754ce11", "score": "0.6965352", "text": "public static function createUser(): void\n\t{\n\t\t$recordModel = \\Vtiger_Record_Model::getCleanInstance('Users');\n\t\t$recordModel->set('user_name', 'TestMultiCompany');\n\t\t$recordModel->set('email1', '[email protected]');\n\t\t$recordModel->set('first_name', 'Test');\n\t\t$recordModel->set('last_name', 'MultiCompany');\n\t\t$recordModel->set('user_password', 'Demo12345678T');\n\t\t$recordModel->set('confirm_password', 'Demo12345678T');\n\t\t$recordModel->set('roleid', self::$role->getId());\n\t\t$recordModel->set('is_admin', 'on');\n\t\t$recordModel->save();\n\n\t\tself::$user = $recordModel;\n\t}", "title": "" }, { "docid": "55bbe6b77b948ca8f6842706399a3c74", "score": "0.6963041", "text": "public function testUser()\n {\n $this->seed();\n\n SocialAccount::unguard();\n\n $social = SocialAccount::create([\n 'social_provider' => 'test',\n 'social_id' => 777,\n 'user_id' => 1\n ]);\n\n $email = $social->user()->first()->email;\n\n $this->assertEquals('[email protected]', $email);\n }", "title": "" }, { "docid": "73867a9904215706a604fea725ebee5a", "score": "0.69597656", "text": "public function createAction() {\n\t\tif (Minz_Request::isPost() && (\n\t\t\t\tFreshRSS_Auth::hasAccess('admin') ||\n\t\t\t\t!max_registrations_reached()\n\t\t)) {\n\t\t\t$new_user_name = Minz_Request::param('new_user_name');\n\t\t\t$passwordPlain = Minz_Request::param('new_user_passwordPlain', '', true);\n\t\t\t$new_user_language = Minz_Request::param('new_user_language', FreshRSS_Context::$user_conf->language);\n\n\t\t\t$ok = self::createUser($new_user_name, $passwordPlain, '', array('language' => $new_user_language));\n\t\t\tMinz_Request::_param('new_user_passwordPlain');\t//Discard plain-text password ASAP\n\t\t\t$_POST['new_user_passwordPlain'] = '';\n\t\t\tinvalidateHttpCache();\n\n\t\t\t$notif = array(\n\t\t\t\t'type' => $ok ? 'good' : 'bad',\n\t\t\t\t'content' => _t('feedback.user.created' . (!$ok ? '.error' : ''), $new_user_name)\n\t\t\t);\n\t\t\tMinz_Session::_param('notification', $notif);\n\t\t}\n\n\t\t$redirect_url = urldecode(Minz_Request::param('r', false, true));\n\t\tif (!$redirect_url) {\n\t\t\t$redirect_url = array('c' => 'user', 'a' => 'manage');\n\t\t}\n\t\tMinz_Request::forward($redirect_url, true);\n\t}", "title": "" }, { "docid": "0a75970f3a7003e164edf98f525d2021", "score": "0.69465023", "text": "public function testRegistration()\n {\n use DatabaseMigrations;\n\n $this->browse(function ($browser) use ($user) {\n $browser->visit('/login')\n ->type('name', 'Andreas')\n ->type('email', '[email protected]')\n ->type('password', 'abcd1234')\n ->type('password-confirmation', 'abcd1234')\n ->press('Register')\n ->assertPathIs('/');\n\n });\n }", "title": "" }, { "docid": "cb5d0ecc86607858434670c84fd24dde", "score": "0.6944223", "text": "public function testSuccessfulRegistration()\n {\n // first, ensure that the user name does not exist\n $this->notSeeInDatabase('users', ['email' => '[email protected]']);\n\n // then, call the Register API\n // and check the following:\n // - Status code is 201\n // - Status message is \"User successfully registered\"\n // - The correct user and password is created in the database\n $this->json('POST', '/register', ['email' => '[email protected]', 'password' => 'test123'])\n ->seeStatusCode(201)\n ->seeJson(['message' => \"User successfully registered\"])\n ->seeInDatabase('users', ['email' => '[email protected]']);\n }", "title": "" }, { "docid": "73760ed28b093f404c83b2b816af0a3d", "score": "0.6943947", "text": "public function create(User $user)\n {\n //\n\treturn true;\n }", "title": "" }, { "docid": "9a02c7c20172e2203d3b7d42cba3f679", "score": "0.6941991", "text": "public function create()\n\t{\n\t\t//\n\t\treturn 'to create new user';\n\t}", "title": "" }, { "docid": "30a0514df77b5ea0e2eb7ea02fbd1f3a", "score": "0.69398165", "text": "public function testForAccountCreation( $user, $creator, array $reqs ) {\n $req = AuthenticationRequest::getRequestByClass( $reqs, PasswordAuthenticationRequest::class );\n if ( $req ) {\n return StatusValue::newGood();\n }\n $temp_req = AuthenticationRequest::getRequestByClass( $reqs, TemporaryPasswordAuthenticationRequest::class );\n if ( $temp_req ){\n return StatusValue::newGood();\n }\n\n return StatusValue::newFatal(\"no Password Authentication Request found\");\n }", "title": "" }, { "docid": "f50873c2fb7b03208dab353549d97dea", "score": "0.69373345", "text": "public function create(User $user)\n {\n //\n }", "title": "" }, { "docid": "f50873c2fb7b03208dab353549d97dea", "score": "0.69373345", "text": "public function create(User $user)\n {\n //\n }", "title": "" }, { "docid": "f50873c2fb7b03208dab353549d97dea", "score": "0.69373345", "text": "public function create(User $user)\n {\n //\n }", "title": "" }, { "docid": "f50873c2fb7b03208dab353549d97dea", "score": "0.69373345", "text": "public function create(User $user)\n {\n //\n }", "title": "" }, { "docid": "f50873c2fb7b03208dab353549d97dea", "score": "0.69373345", "text": "public function create(User $user)\n {\n //\n }", "title": "" }, { "docid": "f50873c2fb7b03208dab353549d97dea", "score": "0.69373345", "text": "public function create(User $user)\n {\n //\n }", "title": "" }, { "docid": "f50873c2fb7b03208dab353549d97dea", "score": "0.69373345", "text": "public function create(User $user)\n {\n //\n }", "title": "" }, { "docid": "f50873c2fb7b03208dab353549d97dea", "score": "0.69373345", "text": "public function create(User $user)\n {\n //\n }", "title": "" }, { "docid": "f50873c2fb7b03208dab353549d97dea", "score": "0.69373345", "text": "public function create(User $user)\n {\n //\n }", "title": "" }, { "docid": "f50873c2fb7b03208dab353549d97dea", "score": "0.69373345", "text": "public function create(User $user)\n {\n //\n }", "title": "" }, { "docid": "f50873c2fb7b03208dab353549d97dea", "score": "0.69373345", "text": "public function create(User $user)\n {\n //\n }", "title": "" }, { "docid": "f50873c2fb7b03208dab353549d97dea", "score": "0.69373345", "text": "public function create(User $user)\n {\n //\n }", "title": "" }, { "docid": "f50873c2fb7b03208dab353549d97dea", "score": "0.69373345", "text": "public function create(User $user)\n {\n //\n }", "title": "" }, { "docid": "f50873c2fb7b03208dab353549d97dea", "score": "0.69373345", "text": "public function create(User $user)\n {\n //\n }", "title": "" } ]
d35f77f7c5da8f3efe9e5dff82c84d91
Add new robot position
[ { "docid": "bacec6da5a7bbd44ea50244b37bf912a", "score": "0.79680955", "text": "public function addRobotPositionAction()\n {\n $paramList = $this->_handlerPositionSaveParams();\n $result = $this->_robotModel->savePosition($paramList);\n $this->echoJson($result);\n }", "title": "" } ]
[ { "docid": "68fdcba13f0f861d394c62696b84bd40", "score": "0.58930415", "text": "public function move(): void\n {\n $this->location = $this->location->move($this->direction);\n }", "title": "" }, { "docid": "3fafde7333b55b4a86b399bf89ce993d", "score": "0.5526811", "text": "public function __construct()\n {\n $this->robotPlace = ['x' => null,'y' => null];\n parent::__construct();\n }", "title": "" }, { "docid": "22b7a0b516afdb0e9718c41b9e3a9810", "score": "0.54695946", "text": "public function testIsPlaced()\n {\n $pos = new Position(5, 5);\n $robot = new ToyRobot($pos, new Direction());\n self::assertFalse($robot->isPlaced());\n\n # position true when set position\n $pos->setX(2);\n $pos->setY(3);\n $robot = new ToyRobot($pos, new Direction());\n self::assertTrue($robot->isPlaced());\n\n }", "title": "" }, { "docid": "d280183754e2b4739a468b0dc6fd7404", "score": "0.5406559", "text": "public function move() {\n\t}", "title": "" }, { "docid": "9ed188e2ff2de5aa3b1f71b6edd6ef23", "score": "0.5388131", "text": "private function addToButtonLocations()\n\t{\n\t\tarray_push($this->buttonLocations, \"{$this->x},{$this->y}\");\n\t}", "title": "" }, { "docid": "825e1adb1ecbe61c82398fc0006a1be5", "score": "0.52908826", "text": "function position_put()\n { \n $position = new Position($this->put('id'));\n\n $position->date_modified = date('Y-m-d H:i:s');\n $position->modifiedbypk = $this->get_user()->user_id;\n \n $this->response($this->_position_save($position, 'put'));\n }", "title": "" }, { "docid": "2412b509e545da421e5de68801eb5708", "score": "0.5285759", "text": "function moveTo($newx, $newy) {\n $this->setX($newx);\n $this->setY($newy);\n }", "title": "" }, { "docid": "2939527870c4acc4686fd7c9210e6676", "score": "0.5270052", "text": "public function addMovement($movement) {\n\t if($movement){\n\t $this->movements[]=$movement;\n }else{\n\t echo \"EL Movimiento no es válido\";\n }\n\n\t}", "title": "" }, { "docid": "23cd74a54742c3f533a05110cf7c31fb", "score": "0.5258804", "text": "protected function updateMovement(){\n\t}", "title": "" }, { "docid": "bbcae092ef69f72a3e288b5d41a3c564", "score": "0.5240819", "text": "public function addPosition(PosMap $position)\n {\n $this->positions[$position->generated->column] = $position;\n }", "title": "" }, { "docid": "dff9724db4130543c8fe8bc14919e077", "score": "0.5221743", "text": "public function project_update_positions()\n {\n foreach($this->params['form'] as $key => $data)\n {\n $todoId = str_replace('Todo','',$key);\n $position = $data;\n \n $this->Todo->id = $todoId;\n $check = $this->Todo->saveField('position',$position);\n \n debug($check);\n }\n }", "title": "" }, { "docid": "4655c1ff73fb335d18e884bf5d55c004", "score": "0.52040863", "text": "function MoveWheels() {\n echo \"Wheels move\";\n $this->wheels = 10;\n }", "title": "" }, { "docid": "58c3cce812df637d66db68465b38aed7", "score": "0.52022994", "text": "public function add()\n\t\t{\n\t\t\t$data \t\t= [\n\t\t\t\t'position_code' \t=> $this->input->post('position_code'),\n\t\t\t\t'department_code' \t=> $this->input->post('department_code'),\n\t\t\t\t'division_code' \t=> $this->input->post('division_code'),\n\t\t\t\t'position_name'\t\t=> $this->input->post('position_name')\n\t\t\t];\n\n\t\t\t$this->db->insert('ms_position', $data);\n\t\t}", "title": "" }, { "docid": "431c4d2d8a14adb38fb56dd14b9bb613", "score": "0.51381785", "text": "public function run()\n {\n $postion = [\n [\n 'name' => 'Penyerang'\n ],\n [\n 'name' => 'Gelandang'\n ],\n [\n 'name' => 'Bertahan'\n ],\n [\n 'name' => 'Penjaga Gawang'\n ]\n ];\n\n Position::insert($postion);\n }", "title": "" }, { "docid": "ee077bd6cb6608cf3aaf1dd0013ea9ae", "score": "0.5112174", "text": "public function _position(string $position, string $moves = \"\"): void\n {\n\n $command = \"position \";\n if ($position === \"startpos\") {\n $command .= \"startpos\";\n } else {\n $command .= \"fen {$position}\";\n }\n $command .= \"\\n\";\n $success = fwrite($this->engineStdIn, $command);\n if ($success === false) {\n throw new RuntimeException(\"Unable to send command! (Connection lost?)\");\n }\n }", "title": "" }, { "docid": "7aa41fb04d62988a614126513df7043f", "score": "0.5083626", "text": "public function move(){\n echo 'Moviendo coche <br>';\n }", "title": "" }, { "docid": "f705bae325cb77965d6fe6f1b6d88a9b", "score": "0.5072321", "text": "public function move()\n {\n $direction_info = $this->direction->getDirectionInfo();\n switch ($direction_info['target']) {\n case 'x':\n $this->x += ($direction_info['value'] * $this->speed);\n if ($this->x > $this->grid->getTop('x')) {\n $this->x = $this->grid->getTop('x');\n } else if ($this->x < $this->grid->getGround('x')){\n $this->x = $this->grid->getGround('x');\n }\n break;\n case 'y':\n $this->y += ($direction_info['value'] * $this->speed);\n if ($this->y > $this->grid->getTop('y')) {\n $this->y = $this->grid->getTop('y');\n } else if ($this->y < $this->grid->getGround('y')){\n $this->y = $this->grid->getGround('y');\n }\n break;\n }\n }", "title": "" }, { "docid": "6844e4688f6866bcd33aed577dfb4d5a", "score": "0.5009563", "text": "function ncurses_move_panel($panel, $startx, $starty)\n{\n}", "title": "" }, { "docid": "56c406f1963d28035aff4eb15feccf0f", "score": "0.49960232", "text": "public function setposition() {\n $this->autoRender=false;\n if (!$this -> hasAccess([Roles::HOST])) return $this->redirect([\"controller\" => \"users\", \"action\" => \"login\", \"redirect_url\" => $_SERVER[\"REQUEST_URI\"]]); \n \n if ($this -> request -> is('post')) {\n\n $model = TableRegistry::get('Hosts');\n $user = $this->getloggedInUser();\n $row = $model->get($user->id);\n\n $data = $this->request->getData();\n $model->patchEntity($row, [\"lat\" => $data[\"lat\"], \"lng\" => $data[\"lng\"], \"lat_loose\" => null, \"lng_loose\" => null] );\n\n $model->save($row);\n\n $model->calclatlngloose();\n }\n }", "title": "" }, { "docid": "b64ee11d521083901f70b3defa7a687b", "score": "0.4992885", "text": "function internalMoveBy($positions){}", "title": "" }, { "docid": "5a414aaacfe3e3daad5d14c1773c3280", "score": "0.49887994", "text": "public function action_position()\r\n\t{\r\n\t\t$this->template = '';\r\n\t\t$this->auto_render = FALSE;\r\n\t\r\n\t\t\r\n\t\t$order_id = isset($_GET['o']) ? $_GET['o']: 0;\n\t\t$position = isset($_GET['p']) ? $_GET['p']: null;\n\t\t$direction = isset($_GET['d']) ? $_GET['d']: null;\n\t\t\r\n\t\tif($order_id !== 0 AND $position != null AND $direction != null)\r\n\t\t{\r\n\t\t\t$order = ORM::factory('Order', $order_id);\n\t\t\tif($direction == \"left\")\n\t\t\t{\n\t\t\t\t$order->x_offset = $position;\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$order->y_offset = $position;\n\t\t\t}\n\t\t\t$order->save();\n\t\t\techo \"success\";\n\t\t\texit;\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\r\n\t\r\n\t\techo \"invalid input\";\r\n\t\texit;\r\n\t\r\n\t}", "title": "" }, { "docid": "45aa169d4791c543258c38c32b92e140", "score": "0.49868163", "text": "function moveWheels() {\n Car::$wheels = 10;\n }", "title": "" }, { "docid": "af1149bb63efc997a479e67472b716fa", "score": "0.49828115", "text": "public function newLocation()\n\t{\n\t\t$this->location = new Location;\n\t}", "title": "" }, { "docid": "9543094a32c09537b6b9f5e95d33ea90", "score": "0.49779367", "text": "public function getPosition();", "title": "" }, { "docid": "f49381c1f3fad11e668b54705e7a8487", "score": "0.49280947", "text": "public function setPosition(Vector2I $position): void;", "title": "" }, { "docid": "a2e4edec7e835d9672ba4b921f23b748", "score": "0.49195614", "text": "private function setPosition($x = 0, $y = 0, $direction = 'North') {\n $this->position = array($x, $y, $direction);\n }", "title": "" }, { "docid": "1acd5b7da36a802808db6c3a44bba61f", "score": "0.4919058", "text": "public function run()\n {\n //\n\t\t$position = new Position;\n\t\t\n\t\t$position->position_x =1;\n\t\t$position->position_y =1;\n\t\t$position->item_id =1;\n\t\t$position->catalog_id =1;\n\t\t\n $position->save();\n\n }", "title": "" }, { "docid": "6be16fff3bba52383c5bd52d73794caf", "score": "0.48713136", "text": "function _MoveTo($pos, $relative = SEEK_SET)\n\t{\n\t\tfseek($this->ArchHnd, $pos, $relative);\n\t}", "title": "" }, { "docid": "8fd0836a5005aa680fd23cbd3e5c8d87", "score": "0.48605216", "text": "public function addMovement($movement) {\n\t\tif (!isset($this->movements))\n\t\t\t$this->movements = array();\n\n\t\tarray_push($this->movements, $movement);\n\t}", "title": "" }, { "docid": "48e4f383d86d87e577fa208e24d639d4", "score": "0.48477843", "text": "public function getPosition()\n {\n }", "title": "" }, { "docid": "d00ccc80508335553e81c0d9049d98bf", "score": "0.48073202", "text": "public function randomPosition($id){\n \n //prendre deux valeurs aleatoire\n //regarde si ces valeurs sont des coordonnes d'un joueur\n //si oui, on refait la boucle\n //si non, on affecte ces coordonée au nouveua joueur \n do{\n $x=rand(0,14);\n $y=rand(0,9);\n $test=true;\n \n $query=$this->find('all');\n $allFighter=$query->toArray();\n foreach($allFighter as $list){\n if($list->coordinate_x==$x && $list->coordinate_y==$y){\n $test=false;\n }\n }\n \n }while($test==false);\n \n //si toutes les cases sont rempli nous sommes dans une boucle infini\n //on peut creer un compteur si dans le tableau on compte les joueurs et qu'il y en a 10*15\n //on pourra stopper la boucle\n \n $my=$this->get($id);\n $my->coordinate_x=$x;\n $my->coordinate_y=$y;\n \n $event= new EventsTable();\n \n $event->putInfo($my->name.\" enters in the arena\",$my->coordinate_x,$my->coordinate_y);\n \n $this->save($my);\n //cette methode est appelé dans putinfo\n }", "title": "" }, { "docid": "ded1d6edecd25aaa7fe7895269ed9d57", "score": "0.47893503", "text": "public function moveCursorCenter() {\n $variables = array(\"element\" => $this->element_id);\n $this->driver->execute(\"POST\", \"/session/:sessionId/moveto\", $variables);\n }", "title": "" }, { "docid": "e3f336725f0a2320e02f282d4936b3d0", "score": "0.47803155", "text": "function set_pos($x, $y, $z)\n {\n $this->primdrop_pos = \"<$x,$y,$z>\";\n }", "title": "" }, { "docid": "ae84faa621a7d42defc2fd4723415c28", "score": "0.47642657", "text": "public function moveToXY($x, $y) {\r\n $this->moveToX=$x;\r\n $this->moveToY=$y;\r\n }", "title": "" }, { "docid": "e3cb4a04db550db3afa58fe5f283eeab", "score": "0.47629744", "text": "function positionUpdate($gps_position = NULL, $gps_position2 = NULL)\n {\n // Message Time Stamp\n $now = gmdate(\"ymdHis\");\n $year = substr($now, 0, 2);\n $month = substr($now, 2, 2);\n $date = substr($now, 4, 2);\n $hour = substr($now, 6, 2);\n $minute = substr($now, 8, 2);\n $second = substr($now, 10, 2);\n\n if (!$gps_position)\n {\n $sessionVehicleIdentifier = $this->sessionVehicleIdentifier;\n if ($sessionVehicleIdentifier == 0)\n $sessionVehicleIdentifier = 1479;\n\n $msg = pack(\"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\",\n 0x01,\n 0x00,\n 0x00,\n ($this->messageCounter & 0xFF00) >> 8,\n $this->messageCounter & 0xFF,\n ($sessionVehicleIdentifier & 0xFF00) >> 8,\n $sessionVehicleIdentifier & 0xFF,\n 0x00,\n 0x00,\n 0x28,\n 0x0b,\n 0xb3,\n 0x85,\n 0xe7,\n 0xff,\n 0xac,\n 0x57,\n 0xc0,\n 0xa2,\n 0x08,\n 0x01,\n 0x0a,\n 0x00,\n 0xff,\n hexdec($year),\n hexdec($month),\n hexdec($date),\n hexdec($hour),\n hexdec($minute),\n hexdec($second));\n }\n else\n {\n $sessionVehicleIdentifier = $this->sessionVehicleIdentifier;\n if ($sessionVehicleIdentifier == 0)\n $sessionVehicleIdentifier = 1479;\n\n $pos = $gps_position;\n if ($gps_position2)\n $pos = $gps_position->getMidPoint($gps_position2);\n\n echo \"DAIPVehicleSimulator->positionUpdate() \"\n . \" lat \" . $pos->latitude_milliarcsecs\n . \" lng \" . $pos->longitude_milliarcsecs\n . \" str \" . $pos->plottableString . \"\\n\";\n\n $last_lng_byte = $pos->longitude_milliarcsecs & 0xFF;\n if ($pos->longitude_milliarcsecs < 0)\n $last_lng_byte--;\n $last_lat_byte = $pos->latitude_milliarcsecs & 0xFF;\n if ($pos->latitude_milliarcsecs < 0)\n $last_lat_byte--;\n\n $msg = pack(\"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\",\n 0x01, 0x00, // format version no.\n 0x00, // message flags\n ($this->messageCounter & 0xFF00) >> 8, $this->messageCounter & 0xFF,\n ($sessionVehicleIdentifier & 0xFF00) >> 8, $sessionVehicleIdentifier & 0xFF,\n 0x00, 0x00, // optional data fields\n 0x28, // message type\n ($pos->latitude_milliarcsecs & 0xFF000000) >> 24, // latitude in milliarcsecs\n ($pos->latitude_milliarcsecs & 0xFF0000) >> 16,\n ($pos->latitude_milliarcsecs & 0xFF00) >> 8,\n// ($pos->latitude_milliarcsecs & 0xFF),\n $last_lat_byte,\n ($pos->longitude_milliarcsecs & 0xFF000000) >> 24, // longitude in milliarcsecs\n ($pos->longitude_milliarcsecs & 0xFF0000) >> 16,\n ($pos->longitude_milliarcsecs & 0xFF00) >> 8,\n// ($pos->longitude_milliarcsecs & 0xFF),\n $last_lng_byte,\n 0xa2, // bearing\n 0x08, // number of satellites visible\n 0x01, // position quality\n 0x0a, // last stop index\n 0x00, 0xff, // distance travelled to stop\n hexdec($year), // message timestamp\n hexdec($month),\n hexdec($date),\n hexdec($hour),\n hexdec($minute),\n hexdec($second));\n }\n\n echo \"TX \" . bin2hex($msg) . \"\\n\";\n socket_sendto($this->socket, $msg, strlen($msg), 0, \"127.0.0.1\", 2065); \n $this->messageCounter++;\n }", "title": "" }, { "docid": "b8caaebd55e1f98329fba08172b03b04", "score": "0.47616708", "text": "public function getPosition(){parent::getPosition();}", "title": "" }, { "docid": "74caa6593af063bd199ed4882976a682", "score": "0.47588283", "text": "function openNewBoardPosition($user_id_to_edit)\n{\n $db = \\JFactory::getDBO();\n $new_board_title = getNewBoardTitle($user_id_to_edit);\n $columns = array('member_id','board_member_start_date','board_member_end_date',\n 'board_position', 'board_member_status');\n $values = array((int) $user_id_to_edit, 'CURDATE()', '\"0000-00-00\"', \n $db->quote($new_board_title),1);\n $query = $db->getQuery(true);\n $query->insert($db->quoteName('eu_board_members'))\n ->columns($db->quoteName($columns))\n ->values(implode(',', $values)); \n $db->setQuery($query);\n $db->execute();\n \n // add the new board member to the joomla EU Board of Directors group\n addToJoomlaGroup($user_id_to_edit, EU_BOARD_GROUP);\n\n return;\n}", "title": "" }, { "docid": "d83f1606fce15cff5dd1a8dc0a65d4c8", "score": "0.47574416", "text": "public function create() {\r\n if (!$_POST) {\r\n $robot = new Robot();\r\n $robots = $robot->getAll();\r\n $codeRobots = [];\r\n foreach ($robots as $robot){\r\n $codeRobots[] = $robot->getCode();\r\n }\r\n $statusRobot = new StatusRobot();\r\n $status = $statusRobot->getAll();\r\n View::to(\"admin.robot.create\", compact('status', 'codeRobots'));\r\n } else {\r\n $validator = new Gump();\r\n $inputs = array(\r\n 'robot_code' => $_POST[\"robot_code\"],\r\n 'robot_name' => $_POST[\"robot_name\"],\r\n 'robot_latitude' => $_POST[\"robot_latitude\"],\r\n 'robot_longitude' => $_POST[\"robot_longitude\"]\r\n );\r\n $rules = array(\r\n 'robot_code' => 'required|numeric|min_len,3',\r\n 'robot_name' => 'required|max_len,50|min_len,3',\r\n 'robot_latitude' => 'required',\r\n 'robot_longitude' => 'required'\r\n );\r\n $validated = $validator->validate($inputs, $rules);\r\n\r\n if ($validated === TRUE) {\r\n $admin = unserialize(Session::get(\"user\"));\r\n $admin->createRobot(new Robot(\r\n null, \r\n $_POST[\"robot_code\"], \r\n $_POST[\"robot_name\"], \r\n null, \r\n $_POST[\"robot_latitude\"], \r\n $_POST[\"robot_longitude\"], \r\n $_POST[\"robot_state\"],\r\n $_POST[\"robot_ip_cam\"]\r\n ));\r\n $msg = \"S'ha creat satisfactoriament.\";\r\n View::redirect(\"admin.robot\", compact(\"msg\"));\r\n } else {\r\n $error = $validator->get_readable_errors(false);\r\n View::redirect(\"admin.robot.create\", compact('error'));\r\n }\r\n }\r\n }", "title": "" }, { "docid": "6de59bcf660f7b594626d77d5aff7374", "score": "0.47531897", "text": "public function put(){\r\n\t\t//update\r\n\t\tcheckRoom($this->roomNumber);\r\n\t\t$this->conn->setData(\"UPDATE room SET roomMap=:map, description=:roomDesc, posX=:posX, posY=:posY WHERE roomNumber = :num\",array(\r\n\t\t\":map\"=>$this->roomMap, \r\n\t\t\":roomDesc\"=>$this->description,\r\n\t\t\":posX\"=>$this->posX,\r\n\t\t\":posY\"=>$this->posY,\r\n\t\t\":num\"=>$this->roomNumber\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "f7342d6bb887d5c0eaea8842d27e0386", "score": "0.47394723", "text": "private function doMove() {\n $position = $this->getPosition();\n\n if ($this->checkMoveIsValid()) {\n // print '<div class=\"alert alert-info\">Move permitted</div>';\n $direction = $position[2];\n $x = $position[0];\n $y = $position[1];\n\n switch($direction) {\n case 'NORTH':\n return $this->setPosition($x, ($y+1), 'NORTH');\n break;\n case 'EAST':\n return $this->setPosition(($x+1), $y, 'EAST');\n break;\n case 'SOUTH':\n return $this->setPosition($x, ($y-1), 'SOUTH');\n break;\n case 'WEST':\n return $this->setPosition(($x-1), $y, 'WEST');\n break;\n }\n } else {\n // print '<div class=\"alert alert-danger\">position invalid skipped</div>';\n }\n }", "title": "" }, { "docid": "2be9ba22327440a3932268e76e8e6d9c", "score": "0.47229692", "text": "public function moveFinger()\r\n {\r\n }", "title": "" }, { "docid": "2be9ba22327440a3932268e76e8e6d9c", "score": "0.47229692", "text": "public function moveFinger()\r\n {\r\n }", "title": "" }, { "docid": "0682a2b290dff871dfedd4e51e222706", "score": "0.4716931", "text": "function new_review_location($position, $id) {\r\n\t$position = 'bottom';\r\n\treturn $position;\r\n}", "title": "" }, { "docid": "8252fba22f7f81c6332b2c2f8e738431", "score": "0.4710728", "text": "public function moveTo($p) {\r\n $this->moveToXY($p->getX(), $p->getY());\r\n }", "title": "" }, { "docid": "e1ba7aeb62392b734a4be8ec73720e21", "score": "0.47066066", "text": "public function test_move() {\n $game = new Bummer\\Game();\n $minion_red = new Minion(\"red\", 1, $game);\n $minion_red->setPosition(3);\n $minion_red->move(7);\n $this->assertEquals(10, $minion_red->getPosition());\n $this->assertNotEquals(11, $minion_red->getPosition());\n }", "title": "" }, { "docid": "d28efa130a4b08cd0730ff2617778479", "score": "0.46985254", "text": "public function __construct($pos)\n {\n $this->CI =& get_instance();\n\t\t$this->CI->load->model('game_model');\n\t\t$this->CI->load->model('game_state_model'); \n\t\t\n\t\t$this->movePosition=$pos;\n\t}", "title": "" }, { "docid": "97a7674c88b4564b8243a81960a10ee7", "score": "0.4689294", "text": "public function moveFinger()\n {\n }", "title": "" }, { "docid": "499f0aeec7d32941bfcb760f414f1c78", "score": "0.46763885", "text": "public function addLine() {\n $this->drawLine($this->_leftMargin, $this->_yPosition, $this->_rightMargin, $this->_yPosition);\n //déplacement du curseur vers le bas de 15 pixels\n $this->_yPosition -= 15;\n }", "title": "" }, { "docid": "98714b7acc584bf0162029f477ff79c5", "score": "0.46721163", "text": "public function setNewpos(\\PB_Vec3 $value=null)\n {\n return $this->set(self::NEWPOS, $value);\n }", "title": "" }, { "docid": "d4c067bb3c9a2c8fff102182cf7b7822", "score": "0.46714458", "text": "function moveWheels() {\n echo \"Wheels move\";\n\n // We can use 'this' to refer to the Car class while 'inside' the Car class\n $this->wheels = 10;\n }", "title": "" }, { "docid": "3eb5a12e3ea3a765e1b9bb5eaf33dfe8", "score": "0.4668237", "text": "function addPositionController(){\n\t\t\t\n\t\t\t//loads user model\n\t\t\t$this->load->model('Admin_model');\n\t\t\t\n\t\t\t//get posted values\n\t\t\t$designation = $_POST[\"designation\"];\n\t\t\t$priority = $_POST[\"priority\"];\n\t\t\t\n\t\t\t//calls method addPositionModel method from the model\n\t\t\t$success = $this->Admin_model->addPositionModel($designation, $priority);\n\t\t\tif($success){\n\t\t\t\techo 'done';\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo 'error';\t\n\t\t\t}\n\t\t\t\t\t\t \n\t\t}", "title": "" }, { "docid": "7cd8f8377004b6b9a64893235b86a325", "score": "0.46467924", "text": "public function run()\n {\n $position = Position::create([\n 'name' => 'Unassigned',\n 'short_name' => 'UNAS',\n ]);\n $this->command->info('Create Location ' . $position->name);\n $position = Position::create([\n 'name' => 'CEO',\n 'short_name' => 'CEO',\n ]);\n $this->command->info('Create Location ' . $position->name);\n $position = Position::create([\n 'name' => 'CAD',\n 'short_name' => 'CAD',\n ]);\n $this->command->info('Create Location ' . $position->name);\n $position = Position::create([\n 'name' => 'CFO',\n 'short_name' => 'CFO',\n ]);\n $this->command->info('Create Location ' . $position->name);\n $position = Position::create([\n 'name' => 'CE',\n 'short_name' => 'CE',\n ]);\n $this->command->info('Create Location ' . $position->name);\n $position = Position::create([\n 'name' => 'Project Director',\n 'short_name' => 'PD',\n ]);\n $this->command->info('Create Location ' . $position->name);\n $position = Position::create([\n 'name' => 'IT Manager',\n 'short_name' => 'IT-MGR',\n ]);\n $this->command->info('Create Location ' . $position->name);\n $position = Position::create([\n 'name' => 'Assisant Manager',\n 'short_name' => 'AS-MGR',\n ]);\n $this->command->info('Create Location ' . $position->name);\n $position = Position::create([\n 'name' => 'IT Support',\n 'short_name' => 'IT-SPT',\n ]);\n $this->command->info('Create Location ' . $position->name);\n $position = Position::create([\n 'name' => 'Staff',\n 'short_name' => 'STAFF'\n ]);\n $this->command->info('Create Location ' . $position->name);\n }", "title": "" }, { "docid": "67787a995485fc7d701850ef0cedba6e", "score": "0.46465662", "text": "protected function setRobot($value=true) { $this->_is_robot = $value; }", "title": "" }, { "docid": "4af2deebafbc9a6d283ceefd46371a8a", "score": "0.46465367", "text": "public function store(PositionRequest $request)\n {\n $lastId = Position::all()->last()->id ?? 0;\n $request['code'] = 'CAR - ' . ($lastId + 1);\n return parent::storeBase($request, false);\n }", "title": "" }, { "docid": "0918b5456c5aebf23250ecd0df57757d", "score": "0.464241", "text": "public function setLocation($newX, $newY)\n {\n $this->x = $newX;\n $this->y = $newY;\n }", "title": "" }, { "docid": "c02100d06b90d9c62838f1b2d53f5df1", "score": "0.46399367", "text": "public function addType(Robot $robot): bool\n {\n if(!in_array($robot, $this->types)){\n $this->types[] = $robot;\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "d66255db354f3a52b013acca9f9b8acc", "score": "0.46397707", "text": "public function setPosition($position) {\n\t\t$this->position = $position;\n\t}", "title": "" }, { "docid": "66df15e83567096fbcdb556925188cee", "score": "0.4634105", "text": "public function testExecuteForInvalidPosition(array $robotPosition)\n {\n $this->robot->shouldReceive('getCurrentPositionX')->andReturn($robotPosition['x']);\n $this->robot->shouldReceive('getCurrentPositionY')->andReturn($robotPosition['y']);\n $this->robot->shouldReceive('getCurrentDirection')->andReturn($robotPosition['f']);\n $this->robot->shouldReceive('setCurrentPositionX')->andReturn();\n $this->robot->shouldReceive('setCurrentPositionY')->andReturn();\n\n $arguments = ['0', '0', 'TEST'];\n $this->moveCommand->execute($arguments);\n }", "title": "" }, { "docid": "031b3e700774dba2579e0e8f69520b72", "score": "0.4632351", "text": "public function run()\n {\n $positions = [\n array('name' => 'Dosen', 'description' => 'Dosen pengajar LPKIA'), \n array('name' => 'Staff', 'description' => 'Staff karyawan LPKIA'), \n array('name' => 'B.A.A', 'description' => ''), \n ];\n\n foreach ($positions as $position) {\n Position::create($position);\n }\n }", "title": "" }, { "docid": "25f901244c52e92b9cda8d3247eb6304", "score": "0.46304134", "text": "public function testUpdateLocation()\n {\n\n }", "title": "" }, { "docid": "4c3d770fd97a02d43f97a2f49ca207d6", "score": "0.46221069", "text": "public function randomPos(){\n\t\t$this->columna=rand(0,3); \n\t\t$this->fila=rand(0,3);\n}", "title": "" }, { "docid": "3aaa1d461bd517a65dab43be6b8b9675", "score": "0.46219686", "text": "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setId($value);\n break;\n case 1:\n $this->setUserId($value);\n break;\n case 2:\n $this->setName($value);\n break;\n case 3:\n $this->setCastleTypeId($value);\n break;\n case 4:\n $this->setCastleLocationId($value);\n break;\n case 5:\n $this->setCoordinates($value);\n break;\n case 6:\n $this->setX($value);\n break;\n case 7:\n $this->setY($value);\n break;\n case 8:\n $this->setSilver($value);\n break;\n case 9:\n $this->setCopper($value);\n break;\n case 10:\n $this->setCurrentSt($value);\n break;\n case 11:\n $this->setCurrentSk($value);\n break;\n case 12:\n $this->setCurrentBs($value);\n break;\n case 13:\n $this->setCurrentAs($value);\n break;\n case 14:\n $this->setCurrentPr($value);\n break;\n case 15:\n $this->setCurrentLr($value);\n break;\n case 16:\n $this->setCurrentHk($value);\n break;\n case 17:\n $this->setCurrentOk($value);\n break;\n case 18:\n $this->setMissionSt($value);\n break;\n case 19:\n $this->setMissionSk($value);\n break;\n case 20:\n $this->setMissionBs($value);\n break;\n case 21:\n $this->setMissionAs($value);\n break;\n case 22:\n $this->setMissionPr($value);\n break;\n case 23:\n $this->setMissionLr($value);\n break;\n case 24:\n $this->setUsageOff($value);\n break;\n case 25:\n $this->setUsageDef($value);\n break;\n case 26:\n $this->setMissionPriority($value);\n break;\n case 27:\n $this->setEnvironmentCard($value);\n break;\n case 28:\n $this->setAutodefCoordinates($value);\n break;\n case 29:\n $this->setAutodefX($value);\n break;\n case 30:\n $this->setAutodefY($value);\n break;\n case 31:\n $this->setPoints($value);\n break;\n case 32:\n $this->setFreePopulation($value);\n break;\n case 33:\n $this->setLastImport($value);\n break;\n case 34:\n $this->setCreatedAt($value);\n break;\n case 35:\n $this->setUpdatedAt($value);\n break;\n } // switch()\n }", "title": "" }, { "docid": "d4a49034d7adb12bafcb5492081e9d13", "score": "0.45931795", "text": "abstract public function position($position = null);", "title": "" }, { "docid": "bbde2fa1198b6c8230d82c087453cb9a", "score": "0.45920208", "text": "public function moveFinger() {\n\t}", "title": "" }, { "docid": "54abc10623cac482045724a72d762ac9", "score": "0.45911592", "text": "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setRPrestationId($value);\n break;\n case 1:\n $this->setRPLibelle($value);\n break;\n case 2:\n $this->setRPLibelleEn($value);\n break;\n case 3:\n $this->setRPControle($value);\n break;\n case 4:\n $this->setRPAxe1($value);\n break;\n case 5:\n $this->setRPAxe2($value);\n break;\n case 6:\n $this->setRPAxe3($value);\n break;\n case 7:\n $this->setRPAxe4($value);\n break;\n case 8:\n $this->setRPAxe5($value);\n break;\n case 9:\n $this->setRPCodeComptable($value);\n break;\n case 10:\n $this->setRPAdf($value);\n break;\n case 11:\n $this->setRPCommentaires($value);\n break;\n case 12:\n $this->setRPDescriptionFr($value);\n break;\n case 13:\n $this->setRPDescriptionEn($value);\n break;\n case 14:\n $this->setRPQuiValide($value);\n break;\n case 15:\n $this->setRPGroupeValidationId($value);\n break;\n case 16:\n $this->setRPCoutsEstimesModifiables($value);\n break;\n case 17:\n $this->setRPCoutInterne($value);\n break;\n case 18:\n $this->setRPCoutExterne($value);\n break;\n case 19:\n $this->setRPCoutTotal($value);\n break;\n case 20:\n $this->setRPValidationId($value);\n break;\n case 21:\n $this->setRPTauxMargeMin($value);\n break;\n case 22:\n $this->setRPPrixVente($value);\n break;\n case 23:\n $this->setRPTypeFraisId($value);\n break;\n case 24:\n $this->setActif($value);\n break;\n case 25:\n $this->setRPTvaId($value);\n break;\n case 26:\n $this->setRPRfa($value);\n break;\n case 27:\n $this->setValideDaf($value);\n break;\n case 28:\n $this->setRPIsMajFromCompiluo($value);\n break;\n case 29:\n $this->setDateCreate($value);\n break;\n case 30:\n $this->setUserCreate($value);\n break;\n case 31:\n $this->setDateModify($value);\n break;\n case 32:\n $this->setUserModify($value);\n break;\n case 33:\n $this->setRPIsMandatory($value);\n break;\n case 34:\n $this->setRPIsEligibleForPrime($value);\n break;\n } // switch()\n }", "title": "" }, { "docid": "f7ccf90c969309077708cfba80223ce4", "score": "0.4575944", "text": "public function store(Request $request, Position $position) {\n\t\trequest()->validate([\n\t\t\t'name' => ['required', 'min:5'],\n\t\t]);\n\t\t$position->create(request(['name']));\n\t\treturn redirect('position')->with('success', 'Position has been added');\n\t}", "title": "" }, { "docid": "787adaf03a83daa038646971937a3ec0", "score": "0.4574223", "text": "public function updatePosition($id, $newPosition = 1);", "title": "" }, { "docid": "7c859fc3c40faecd39ac04d2d237a048", "score": "0.45687243", "text": "public function set_position ($position) {\n $this->position = $position;\n }", "title": "" }, { "docid": "f8f3f8663a9ea7f64a5ac8924a25f126", "score": "0.456756", "text": "function set_position_info($view_name,$mod_name){\n\t\t$vid = $this->set_vid($mod_name);\n\t\t// IMPORTANT!: sequence has to be kept like this: view_name / mod_name / vid\n\t\t$token = array(\n\t\t\t\"view_name\" => $view_name,\n\t\t\t\"mod_name\" => $mod_name,\n\t\t\t\"vid\" => $vid\n\t\t);\n\n\t\tarray_push($this->__vid_coll,$vid);\n\t\t\t\n\t\t$do = '$this->__struct[\"'. implode('\"][\"',$this->__stack).'\"] = $token;';\n\t\teval($do);\t\t\t// there must be a better way\n\t\treturn $token;\t\t// why called token? strix 2012-02-20\n\t}", "title": "" }, { "docid": "7cfc83b8e1443bb8dad5ef89e1b7ee8b", "score": "0.45636916", "text": "public function setPosition($position) {\n $errors = $this->validatePosition($position);\n if (empty($errors)) {\n \n $position = $this->getPositionArray($position);\n $this->x = (int) $position[0];\n $this->y = (int) $position[1];\n $this->direction = $this->getNumericDirection($position[2]);\n }\n return $errors;\n }", "title": "" }, { "docid": "9f18218b80500784b8f43dce8511f1cd", "score": "0.454382", "text": "protected function setNewCoordinate($position, $direction) {\n\t\t$x = $position[0];\n\t\t$y = $position[1];\n\n\t\tswitch ($direction) {\n\t\t\tcase 'NORTH':\n\t\t\t\t$x1 = $x;\n\t\t\t\t$y1 = $y - 1;\n\t\t\t\tbreak;\n\t\t\tcase 'EAST':\n\t\t\t\t$x1 = $x + 1;\n\t\t\t\t$y1 = $y;\n\t\t\t\tbreak;\n\t\t\tcase 'SOUTH':\n\t\t\t\t$x1 = $x;\n\t\t\t\t$y1 = $y + 1;\n\t\t\t\tbreak;\n\t\t\tcase 'WEST':\n\t\t\t\t$x1 = $x - 1;\n\t\t\t\t$y1 = $y;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\techo \"\\nHey, there is no such direction!\\n\";\n\t\t\t\texit();\n\t\t}\n\n\t\treturn [$x1, $y1];\n\t}", "title": "" }, { "docid": "092391cb02867d5950aa1fadd27b6abc", "score": "0.45417374", "text": "protected function setUp() {\n\t\tforeach ($this->map as $i => $line) {\n\t\t\tforeach ($line as $j => $point) {\n\t\t\t\tif ($point == \".\" && ($j != 1 && $i != 4)) {\n\t\t\t\t\t$this->treasure_pos[] = [$j, $i];\n\t\t\t\t}\n\n\t\t\t\tif ($point == $this->player) {\n\t\t\t\t\t$this->start = [$j, $i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "30814e8f40e65c6e3c2abe352de8f934", "score": "0.45414954", "text": "public function addLocationItem()\n {\n $this->location[] = ['key' => '', 'value' => ''];\n }", "title": "" }, { "docid": "4e10acf613e55efc49a89e0e5e5889da", "score": "0.45386907", "text": "public function setPosition($x, $y)\n\t{\n\t\t$this->posX = $x;\n\t\t$this->posY = $y;\n\t}", "title": "" }, { "docid": "0810cce3cfc24f0cf0bde0083e2d1efb", "score": "0.4532522", "text": "public function addNewTetromino(Tetromino $t): void\n {\n $this->tetrominos[] = $t;\n end($this->tetrominos);\n $this->activeTetromino = key($this->tetrominos);\n reset($this->tetrominos);\n }", "title": "" }, { "docid": "73ad7521b6608b74c86d2576794b5f45", "score": "0.45267412", "text": "public function make( Robot $robotPrototype, $quantity ) {\n $robotPrototype->setQuantityRobot( $quantity );\n }", "title": "" }, { "docid": "4b9666672521998dfe7eacac9068d6a5", "score": "0.45248997", "text": "public function evalCommand($command) {\n\t\t$newPosition = new RoverPosition(\n\t\t\tnew Coordinate($this->_coordinates->getX(), $this->_coordinates->getY()), $this->getDirection()\n\t\t);\n\n\t\tif ($command == CommandSequence::TURN_LEFT || $command == CommandSequence::TURN_RIGHT) {\n\n\t\t\t$nextDirectionIndex = $this->_getCurrentDirectionIndex();\n\n\t\t\tif ($command == CommandSequence::TURN_RIGHT) {\n\t\t\t\tif ($nextDirectionIndex >= 3) {\n\t\t\t\t\t$nextDirectionIndex = 0;\n\t\t\t\t} else {\n\t\t\t\t\t$nextDirectionIndex++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($nextDirectionIndex <= 0) {\n\t\t\t\t\t$nextDirectionIndex = 3;\n\t\t\t\t} else {\n\t\t\t\t\t$nextDirectionIndex--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$newPosition->changeDirection($this->_getDirection($nextDirectionIndex));\n\n\t\t} else {\n\t\t\tif ($command == CommandSequence::MOVE_FORWARD) {\n\t\t\t\tif ($newPosition->getDirection() == self::DIRECTION_EAST) {\n\t\t\t\t\t$newPosition->getCoordinates()->moveAxis('x', 1);\n\t\t\t\t} else {\n\t\t\t\t\tif ($newPosition->getDirection() == self::DIRECTION_WEST) {\n\t\t\t\t\t\t$newPosition->getCoordinates()->moveAxis('x', -1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($newPosition->getDirection() == self::DIRECTION_SOUTH) {\n\t\t\t\t\t\t\t$newPosition->getCoordinates()->moveAxis('y', -1);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($newPosition->getDirection() == self::DIRECTION_NORTH) {\n\t\t\t\t\t\t\t\t$newPosition->getCoordinates()->moveAxis('y', 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $newPosition;\n\n\t}", "title": "" }, { "docid": "b8678c97fe076994a93bfdc91a70ca22", "score": "0.4524351", "text": "function createOrderPositions($ar){\n $p = new XParam($ar, array());\n $op = $p->get('positionsdata');\n foreach($op as $i=>&$o){\n $this->traceCallParms('create order position', $o);\n }\n $ret = $this->soapcall('editOrderPositions', array($op, $this->sessionid));\n return $ret; \n }", "title": "" }, { "docid": "b127cd5e13b8f1cbbd1225fffb1c4c32", "score": "0.45221767", "text": "function position_post()\n { \n $position = new Position();\n\n $position->date_created = date('Y-m-d H:i:s');\n $position->createdbypk = $this->get_user()->user_id;\n $position->date_modified = date('Y-m-d H:i:s');\n $position->modifiedbypk = $this->get_user()->user_id;\n\n $this->response($this->_position_save($position, 'post'));\n }", "title": "" }, { "docid": "018b049c01caeaad2afe5852a8b7b72b", "score": "0.45210847", "text": "public function setPositionAction() {\n $logger = $this->container->get('logger');\n $serializer = $this->container->get('jms_serializer');\n $apiResponse = new ApiResponse();\n $response = new Response();\n $response->headers->set('Content-Type', 'application/json');\n $em = $this->container->get('Doctrine')->getManager();\n\n if (!$this->container->get('request')->getMethod() == 'POST') {\n $apiResponse->setCode(404);\n $response->setContent($serializer->serialize($apiResponse, 'json'));\n return $response;\n }\n\n $content = json_decode($this->container->get('request')->getContent());\n\n /* @var $extData \\Tavros\\DomainBundle\\Entity\\ExternalData */\n\n $extData = $em->getRepository('TavrosDomainBundle:ExternalData')->findOneByExdaToken($content->_token);\n\n if (!$extData) {\n $apiResponse->setCode(110);\n $response->setContent($serializer->serialize($apiResponse, 'json'));\n return $response;\n }\n\n try {\n $coord_xy = $content->coordinate;\n\n $userCoord = $em->getRepository('TavrosDomainBundle:UserCoordinate')->findOneByUscoUser($extData->getExdaUser());\n\n if (!$userCoord) {\n $coord = new Coordinate();\n $userCoord = new UserCoordinate();\n } else {\n $coord = $userCoord->getUscoCoordinate();\n }\n\n /* @var $userCoord \\Tavros\\DomainBundle\\Entity\\UserCoordinate */\n $coord->setCoorCreatedDate(new \\DateTime(date('Y-m-d H:i:s')));\n $coord->setCoorX($coord_xy->x);\n $coord->setCoorY($coord_xy->y);\n\n $userCoord->setUscoCoordinate($coord);\n $userCoord->setUscoSkiMode(1);\n $user = $extData->getExdaUser();\n $userCoord->setUscoUser($user);\n $userCoord->setUscoUpdateDate(new \\DateTime(date('Y-m-d H:i:s')));\n\n $em->persist($userCoord);\n $em->flush();\n } catch (Exception $ex) {\n $logger->error('[TAVROS - ERROR]' . $ex);\n $apiResponse->setCode(120);\n $response->setContent($serializer->serialize($apiResponse, 'json'));\n return $response;\n }\n\n $apiResponse->setCode(200);\n $response->setContent($serializer->serialize($apiResponse, 'json'));\n return $response;\n }", "title": "" }, { "docid": "d89478da9a35bf84b77213d018ba9086", "score": "0.4509467", "text": "static function create_position()\n {\n $bestellung_id = $_POST['bestellung_id'];\n $gericht_id = $_POST['gericht_id'];\n $comment = $_POST['comment'];\n $platz_nr = $_POST['platz_nr'];\n $kategorie_id = $_POST['kategorie_id'];\n\n $data = array(\n 'bestellung_id' => $bestellung_id,\n 'gericht_id' => $gericht_id,\n 'comment' => $comment,\n 'platz_nr' => $platz_nr,\n );\n\n $db = new DatabaseController();\n $position_id = $db->create_position($bestellung_id, $gericht_id, $platz_nr, $comment);\n return json(array(\n 'id' => $position_id,\n 'gericht_id' => $gericht_id,\n 'kategorie_id' => $kategorie_id\n ));\n }", "title": "" }, { "docid": "48f726cb931b74bcf6a9f1589bf46586", "score": "0.45047453", "text": "public function setPosition($position)\n {\n $this->position = $position;\n }", "title": "" }, { "docid": "5051af409cb99dfadb963304dc60497d", "score": "0.45005032", "text": "public function run()\n {\n //\n $filas=file('positions.txt'); \n foreach($filas as $value){\n list($nombre) = explode(\",\", $value); \n Position::create([\n 'name' => $nombre,\n ]);\n }\n }", "title": "" }, { "docid": "5f2d95eb73071792fa2f5425a77a5021", "score": "0.4498096", "text": "function accesorio($tipo,$string) {\r\n\t$this->setxy(50,$this->desp_kitatx);\r\n $this->cell(30,8,$tipo);\r\n $this->setxy(86,$this->desp_kitatx);\t\t\t\t\t\t\r\n $this->cell(30,8,$string);\r\n $this->desp_kitatx+=4;\r\n}", "title": "" }, { "docid": "35e693cff8e434f49e0476ba7121a0bf", "score": "0.44703636", "text": "public function setPosition($newPosition) {\r\n\t\tif ($newPosition == $this->position)\r\n\t\t\treturn;\r\n\t\tif ($newPosition <= 0 || $newPosition > count ( $this->collection->anonces ) + 1)\r\n\t\t\treturn;\r\n\t\t\t/* @var $anonces O_Dao_Query */\r\n\t\t$anonces = $this->collection->anonces;\r\n\r\n\t\tif ($newPosition > $this->position) {\r\n\t\t\t$anonces->test ( \"position\", $this->position, \">\" )->test ( \"position\", $newPosition, \"<=\" )->field ( \"position\", \"position-1\", 1 )->update ();\r\n\t\t} else {\r\n\t\t\t$anonces->test ( \"position\", $this->position, \"<\" )->test ( \"position\", $newPosition, \">=\" )->field ( \"position\", \"position+1\", 1 )->update ();\r\n\t\t}\r\n\r\n\t\t$this->position = $newPosition;\r\n\t\tparent::save ();\r\n\t}", "title": "" }, { "docid": "e210818a095ec09dd14c2a544fdeadb6", "score": "0.4465486", "text": "public function setPosition(Position $position): void\n {\n $this->position = $position;\n }", "title": "" }, { "docid": "af35c76addb02ce38c9ab1eef9247723", "score": "0.44632322", "text": "function updatePos($nr, $pos) {\n\n\t$request = Slim::getInstance()->request();\n\t$body = $request->getBody();\n\t$player = json_decode($body);\n\t$sql = \"UPDATE players SET cur_x=:cur_x, cur_y=:cur_y WHERE nr=:nr\";\n\ttry {\n \t$db = getConnection();\n \t\t$stmt = $db->prepare($sql);\n\n \t$get_x_pos = get_coordPos('x', $pos);\n \t$get_y_pos = get_coordPos('y', $pos);\n\n \t$stmt->bindParam(\"cur_x\", $get_x_pos);\n \t$stmt->bindParam(\"cur_y\", $get_y_pos);\n \t$stmt->bindParam(\"nr\", $nr);\n \t$stmt->execute();\n \t$db = null;\n \techo json_encode($player);\n } catch(PDOException $e) {\n\t //error_log($e->getMessage(), 3, '/var/tmp/php.log');\n\t\techo '{\"error\":{\"text\":'. $e->getMessage() .'}}';\n\t}\n}", "title": "" }, { "docid": "ee3f9e0d0ea6a7bbde04ef1ce769b05a", "score": "0.44534424", "text": "public function getAdd() {\n return view('positions.add');\n }", "title": "" }, { "docid": "9b8b17536341ca43fcd5c93b65f68e2b", "score": "0.44526923", "text": "public function addLocation(string $location);", "title": "" }, { "docid": "aab9326a7b9eea0b397a816fcfee1bad", "score": "0.4446384", "text": "public function add_placement_entity($params) {\n $url = $_SESSION['BH']['restURL'] . '/entity/Placement?BhRestToken=' . $_SESSION['BH']['restToken'];\n $params['dateAdded'] = time();\n $params['dateBegin'] = time();\n $post_params = json_encode($params);\n $req_method = 'PUT';\n return $response = $this->BullhornCurl->curlFunction($url, $post_params, $req_method);\n }", "title": "" }, { "docid": "d2d1398e094514a54b7422894bcd2709", "score": "0.44443065", "text": "public function positionToStart(): static;", "title": "" }, { "docid": "e632ee1d79725d858f1bb8a7cfda4aef", "score": "0.44412506", "text": "public function setByPosition($pos, $value)\n\t{\n\t\tswitch($pos) {\n\t\t\tcase 0:\n\t\t\t\t$this->setIdAlpzaMiembroGeneral($value);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$this->setIdAlpzaMiembro($value);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->setNombreFormal($value);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->setSigla($value);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$this->setTipoInstitucion($value);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$this->setNumeroIdentificacion($value);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t$this->setAnoFundacion($value);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t$this->setAnoIngresoAlpza($value);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t$this->setDirectorNombre($value);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\t$this->setDirectorEmail($value);\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\t$this->setDelegadoNombre($value);\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\t$this->setDelegadoApellido($value);\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\t$this->setDelegadoCargo($value);\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\t$this->setDelegadoProfesion($value);\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\t$this->setDelegadoEmail($value);\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\t$this->setLogo($value);\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\t$this->setDireccion($value);\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\t$this->setCiudadCodigoPostal($value);\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\t$this->setPais($value);\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\t$this->setTelefonoCodPais($value);\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\t$this->setTelefonoCodCiudad($value);\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\t$this->setTelefono($value);\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\t$this->setFax($value);\n\t\t\t\tbreak;\n\t\t\tcase 23:\n\t\t\t\t$this->setCelular($value);\n\t\t\t\tbreak;\n\t\t\tcase 24:\n\t\t\t\t$this->setEmail($value);\n\t\t\t\tbreak;\n\t\t\tcase 25:\n\t\t\t\t$this->setSitioWeb($value);\n\t\t\t\tbreak;\n\t\t\tcase 26:\n\t\t\t\t$this->setDescripcion($value);\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\t$this->setMision($value);\n\t\t\t\tbreak;\n\t\t\tcase 28:\n\t\t\t\t$this->setVision($value);\n\t\t\t\tbreak;\n\t\t\tcase 29:\n\t\t\t\t$this->setObjetivo($value);\n\t\t\t\tbreak;\n\t\t\tcase 30:\n\t\t\t\t$this->setAsociacionNaturalezaJuridica($value);\n\t\t\t\tbreak;\n\t\t\tcase 31:\n\t\t\t\t$this->setProfesionalNombre($value);\n\t\t\t\tbreak;\n\t\t\tcase 32:\n\t\t\t\t$this->setProfesionalApellido($value);\n\t\t\t\tbreak;\n\t\t\tcase 33:\n\t\t\t\t$this->setProfesionalProfesion($value);\n\t\t\t\tbreak;\n\t\t\tcase 34:\n\t\t\t\t$this->setProfesionalTrabajo($value);\n\t\t\t\tbreak;\n\t\t\tcase 35:\n\t\t\t\t$this->setProfesionalCargo($value);\n\t\t\t\tbreak;\n\t\t\tcase 36:\n\t\t\t\t$this->setProfesionalOtraAsociacion($value);\n\t\t\t\tbreak;\n\t\t} // switch()\n\t}", "title": "" }, { "docid": "3850c3398ab565ad0bc63e1454698a18", "score": "0.44402823", "text": "public function add(){\r\n if( !$this->is_edit_mode_on() ){\r\n return;\r\n }\r\n \r\n //get initialized an empty player array\r\n $new_player = $this->roster->create();\r\n // create() set's id to '', so I need to set it to null so the insert\r\n // call will auto-increment the value;\r\n $new_player['id'] = null;\r\n \r\n $this->data = array_merge($this->data, $new_player);\r\n $this->data['form_open'] = form_open_multipart('player/save');\r\n $this->data['pagebody'] = 'PlayerEdit';\r\n \r\n \r\n $this->session->set_userData('player_data',$new_player);\r\n $this->render();\r\n }", "title": "" }, { "docid": "7102784a7c473d22c67ceaec9421f441", "score": "0.44400185", "text": "public function run()\n {\n $array_name = [\n 'Admin',\n 'Employee',\n 'Owner'\n ];\n foreach($array_name as $key => $name){\n \\App\\Position::create([\n \t'code'\t\t => $this->repository->generateCode('POSITION'),\n 'name' => $array_name[$key],\n 'description' => '',\n 'active' => true\n ]);\n }\n }", "title": "" }, { "docid": "0ed00b50aa67a6398e8a068a60e7e520", "score": "0.44397247", "text": "function set($position, $element): void;", "title": "" }, { "docid": "a7ef64632e5dd834d5324f48d31c8930", "score": "0.44393244", "text": "function move_to($place) {\n global $data;\n global $log_array;\n \n $_SESSION['location'] = $place;\n $log_array[] = $data[$place]['description'];\n}", "title": "" }, { "docid": "2fbd3c7c12304ebfc9baedb3f470cbb2", "score": "0.44363263", "text": "private function reloadPosition()\n {\n $this->setListifyPosition($this->getOriginal()[$this->positionColumn()]);\n }", "title": "" }, { "docid": "fd1914f9fc95f12a1fe941a4a8232b7d", "score": "0.44338635", "text": "public function on($pos);", "title": "" }, { "docid": "ded8ee03cbec9b104dd27c564e870728", "score": "0.44318765", "text": "private function teleportViewer() : void {\n\n $worldType = $this->worldData->getWorldType();\n\n $isSumo = $worldType === WorldReplayData::TYPE_SUMO;\n\n $this->spectator->setInSpectatorMode(true, true);\n\n MineceitCore::getItemHandler()->spawnReplayItems($this->spectator);\n\n if($this->spectator->getScoreboardType() !== Scoreboard::SCOREBOARD_NONE) {\n $this->spectator->setScoreboard(Scoreboard::SCOREBOARD_REPLAY);\n }\n\n $p1x = $isSumo ? 9 : 24;\n $p1z = $isSumo ? 5 : 40;\n\n $p2x = $isSumo ? 1 : $p1x;\n $p2z = $isSumo ? $p1z : 10;\n\n $y = 100;\n\n $this->centerPosition = new Position(intval((($p2x + $p1x) / 2)), $y, intval((($p2z + $p1z) / 2)), $this->level);\n\n $center = $this->centerPosition;\n\n $centerX = intval($this->centerPosition->x);\n $centerZ = intval($this->centerPosition->z);\n\n MineceitUtil::onChunkGenerated($this->level, $centerX >> 4, $centerZ >> 4, function () use($center) {\n $this->spectator->teleport($center);\n });\n\n if ($this->spectator->getLevel()->getName() !== $this->worldId)\n $this->spectator->teleport($center);\n }", "title": "" }, { "docid": "2325b4e78271ae1e065dd1898d8212e0", "score": "0.4430962", "text": "public function executeCreate(HttpRequest $request){\n \n $this->leftcolumn();\n $this->rightcolumn();\n \n $this->page->addVar('title','Ajouter une position');\n \n $dataArray = array();\n $edit = false;\n \n $manager = $this->managers->getManagerOf('Hook');\n \n //cas de l'édition\n if($request->getExists('id')){\n \n $edit =true;\n\n $dataObjt = $manager->findById(intval($request->getValue('id')));\n $dataArray = $dataObjt->tabAttrib;\n $this->page->addVar('title', 'Modifier une position');\n $this->page->addVar('idelt', $request->getData('id')); \n }else{\n $dataArray = $_POST;\n }\n $dataForm = HookForm::getForm($dataArray,$edit); \n if($request->getMethod('post')){ \n //test de la validation du post\n if ($dataForm->is_valid($_POST)) {\n if(!$request->getExists('id')){\n if($manager->add($request->getSendData($_POST))){ \n $this->page->addVar('infos', _RECCORD_SAVE_SUCCEFULL_); \n $this->app()->httpResponse()->redirect('position.html');\n }else{\n $this->errors = _RECCORD_SAVE_FILED_;\n }\n }else{ \n if($manager->update($request->getSendData($_POST),'id')){\n $this->page->addVar('infos', _RECCORD_UPDATE_SUCCEFULL_);\n $this->app()->httpResponse()->redirect('position.html');\n }else{\n $this->errors = _RECCORD_UPDATE_FILED_;\n }\n }\n }\n }\n $this->page->addVar('errors', $this->errors);\n $this->page->addVar('dataForm', $dataForm); \n }", "title": "" } ]
491da9e0853f53602cebb371dd843b78
make pagination of our results
[ { "docid": "50f2fb32c5a58fb4f293b05e6a21b160", "score": "0.0", "text": "function generate_page_links($cur_page, $num_pages) {\n\t\t$page_links = '';\n\n\t\t// If this page is not the first page, generate the \"previous\" link\n\t\tif ($cur_page > 1) {\n\t\t $page_links .= '<a href=\"' . $_SERVER['PHP_SELF'] . '?page=' . ($cur_page - 1) . '\"><</a> ';\n\t\t}\n\t\telse {\n\t\t $page_links .= '< ';\n\t\t}\n\n\t\t// Loop through the pages generating the page number links\n\t\tfor ($i = 1; $i <= $num_pages; $i++) {\n\t\t if ($cur_page == $i) {\n\t\t\t$page_links .= ' ' . $i;\n\t\t }\n\t\t else {\n\t\t\t$page_links .= ' <a href=\"' . $_SERVER['PHP_SELF'] . '?page=' . $i . '\"> ' . $i . '</a>';\n\t\t }\n\t\t}\n\n\t\t// If this page is not the last page, generate the \"next\" link\n\t\tif ($cur_page < $num_pages) {\n\t\t $page_links .= ' <a href=\"' . $_SERVER['PHP_SELF'] . '?page=' . ($cur_page + 1) . '\">></a>';\n\t\t}\n\t\telse {\n\t\t $page_links .= ' >';\n\t\t}\n\n\t\treturn $page_links;\n\t}", "title": "" } ]
[ { "docid": "3ccc3e2dcd09e2a49eab65599ddd4823", "score": "0.7911085", "text": "public function paginate();", "title": "" }, { "docid": "6bd904903b0713d65f80ab241a71380a", "score": "0.72641265", "text": "function prt_pagination($query, $page_from, $page_size, $page_cp, $list_count, $type, $suje) {\r\n\r\n\techo '\r\n\t\t\t <!-- Pagination -->\r\n\t\t\t <div class=\"row text-center\">\r\n\t\t\t\t\t<div class=\"col-lg-12\">\r\n\t\t\t\t\t\t<ul class=\"pager\">\r\n\t';\r\n\t// -- echo.\r\n\r\n\t// 이전보기 구현\r\n\tif ($page_from > 0) {\r\n\t\t$cur_from = $page_from - $page_size;\r\n\t\techo '\r\n\t\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t\t<a href=\"./search.php?q='.$query.'&from=0&size='.$page_size.'&cp='.$page_cp.'&type='.$type.'&suje='.$suje.'\"> 처음으로 </a>\r\n\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t\t<a href=\"./search.php?q='.$query.'&from='.$cur_from.'&size='.$page_size.'&cp='.$page_cp.'&type='.$type.'&suje='.$suje.'\"> 이전 </a>\r\n\t\t\t\t\t\t\t</li>\r\n\t\t';\r\n\t\t// -- echo.\r\n\t}\r\n\r\n\t// 더보기 구현\r\n\tif ($list_count == $page_size) {\r\n\t\t$next_from = $page_from + $page_size;\r\n\t\techo '\r\n\t\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t\t<a href=\"./search.php?q='.$query.'&from='.$next_from.'&size='.$page_size.'&cp='.$page_cp.'&type='.$type.'&suje='.$suje.'\"> 다음 </a>\r\n\t\t\t\t\t\t\t</li>\r\n\t\t';\r\n\t\t// -- echo.\r\n\t}\r\n\r\n\r\n\t// pagination 마무리.\r\n\techo '\r\n\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<!-- /.row -->\r\n\r\n\t\t\t\t<hr>\r\n\t';\r\n\t// -- echo.\r\n}", "title": "" }, { "docid": "ad59f51e00fe819ff81a974621cff468", "score": "0.71694785", "text": "public function per_page();", "title": "" }, { "docid": "7208f9a16b1acef6e04d5df27bf12ff6", "score": "0.71215653", "text": "protected function setPagination(){\n\n if ($this->per_page == -1) return ;\n\n $this->total_pages = ceil($this->total_count/$this->per_page);\n\n // if current page is greater than the total page\n // then set the current page equal to total page\n if( $this->page > $this->total_pages){\n $this->page = $this->total_pages;\n }\n\n // Calculate the offset of where\n // the retrieval index start at\n if( $this->page != 0 )\n $this->offset = (($this->page - 1) * $this->per_page);\n else{\n $this->page = 1;\n $this->offset = 0;\n }\n\n // set page goto to first\n $this->first = 1;\n $this->last = ($this->total_pages == $this->page)? false: $this->total_pages;\n $this->next_page = ($this->page >= $this->total_pages) ? false : $this->page + 1;\n $this->previous_page = ($this->page < 1 ) ? false : $this->page - 1;\n\n // calculate advance shortcut\n if ($this->support['advance_shortcut']){\n $goto_result_next = $this->page + $this->goto_shortcut_page;\n $goto_result_previous = $this->page - $this->goto_shortcut_page;\n $this->goto_next = $goto_result_next > $this->total_pages ? false: $goto_result_next;\n $this->goto_previous = $goto_result_previous < 1 ? false: $goto_result_previous;\n }\n }", "title": "" }, { "docid": "0afac47992b1a8a1368768e41995dabf", "score": "0.7118804", "text": "public function getAllPaginated()\n {\n }", "title": "" }, { "docid": "4c51c53779be2e014101d9b7fd4f9847", "score": "0.7094797", "text": "public function paginate(){\n\t\t$output=\"<table class='table table-striped'>\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr style='text-align:center;'> PAGINATION TEST </tr>\n\t\t\t\t\t</thead>\";\n\t\t$offset=(isset($_GET['offset'])) ? $_GET['offset'] : 0;\n\t\t$sql= \" SELECT * FROM \" . $this->databaseTableName. \" ORDER BY customerNumber ASC \" . \" LIMIT \" . $this->limitPerPage . \" OFFSET \". $offset ;\n\t\t$prepared=$this->db->prepare($sql);\n\t\t$prepared->execute();\n\t\t//loops through the prepared object. You can format the html to make it display however you deem fit\n\t\twhile ($valid= $prepared->fetchObject()){\n\t\t\t//You can choose to format it anyway you want to format it . Ensure the object properties are the same with the column names in your table\n\t\t\t$output .=\"\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td> $valid->contactFirstName </td>\n\t\t\t\t\t\t<td>$valid->contactLastName </td>\n\t\t\t\t\t</tr>\n\t\t\t\t\";\n\t\t}\n\t\t$output.=\"</table>\";\n\t\t$output .= $this->printNavBar();\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "c18cca65aa7898e941ee4af16a74816d", "score": "0.70363027", "text": "function doPagination ($total_rows,$per_page,$PAGES_PER_PAGE,$request_url=\"\"){\n\t#function ToHtml(total_rows){\n\t\t#$html = CDBList::ToHtml();\n\t\t$request_url=($request_url!=\"\") ? $request_url : $_SERVER['REQUEST_URI'] ;\n\t\t$paginationCode = '';\n\t\tif ($per_page) {\n\t\t\t$page = (!isset($_GET['page']))? 1 : $_GET['page'];\n\t\t\t$prev = ($page - 1);\n\t\t\t$next = ($page + 1);\n\t\t\t$max_records = $per_page;\n\t\t\t$from = ($page - 1) * $max_records;\n\t\t\t$total_result = $total_rows;\n\t\t\t$total_pages = ceil($total_result / $max_records);\n\t\t\t$ppp = $PAGES_PER_PAGE;\n\t\t\tif ($total_pages > 1 && $ppp && $ppp < $total_pages) {\n\t\t\t\tif ($page > $ppp) {\n\t\t\t\t\t$first_page = $page;\n\t\t\t\t} else {\n\t\t\t\t\t$first_page = 1;\n\t\t\t\t}\n\t\t\t\t$last_page = $ppp + $first_page;\n\t\t\t\tif ($last_page > $total_pages) {\n\t\t\t\t\t$last_page = $total_pages;\n\t\t\t\t\t$first_page = $last_page - $ppp;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$first_page = 1;\n\t\t\t\t$last_page = $total_pages;\n\t\t\t}\n\t\t\t$prev_shown = false;\n\t\t\t$next_shown = false;\n\t\t\t$generic_uri = addToGetString($request_url, \"page=PAGEREPLACE\");\n\t\t\t$extra_data = \"\";\n\t\t\tif ($pass_key) {\n\t\t\t\tforeach ($pass_key as $key => $value) {\n\t\t\t\t\tif (is_array($value)) {\n\t\t\t\t\t\tforeach ($value as $getValue) {\n\t\t\t\t\t\t\t$extra_data .= \"&\" . urlencode($key) . \"=\" . $getValue;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$generic_uri = addToGetString($generic_uri, \"$key=$value\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$generic_uri .= $extra_data;\n\t\t\t}\n\t\t\tif ($first_page > 1) {\n\t\t\t\t$prev_pages = $page - $ppp;\n\t\t\t\t$prev_shown = true;\n\t\t\t}\n\t\t\tif ($last_page != $total_pages) {\n\t\t\t\t$next_pages = $page + $ppp;\n\t\t\t\t$next_shown = true;\n\t\t\t}\n\t\t\tif(($total_pages > 1) && ($page > 1)) {\n\t\t\t\t$uri = str_replace('PAGEREPLACE', $prev, $generic_uri);\n\t\t\t\t$paginationCode .= '<a class=\"page-prev\" href=\"'.$uri.'\">&laquo; Previous</a>';\n\t\t\t}\n\t\t\tif ($total_pages > 1) {\n\t\t\t\tfor($i = $first_page; $i <= $last_page; $i++) {\n\t\t\t\t\tif(($page) == $i) {\n\t\t\t\t\t\t$paginationCode .= ' <span class=\"page-num\">'.$i.'</span> ';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$uri = str_replace('PAGEREPLACE', $i, $generic_uri);\n\t\t\t\t\t\t$paginationCode .= ' <a href=\"'.$uri.'\" class=\"page-link\">'.$i.'</a> ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(($total_pages > 1) && ($page < $total_pages)) {\n\t\t\t\t$uri = str_replace('PAGEREPLACE', $next, $generic_uri);\n\t\t\t\t$paginationCode .= '<a class=\"page-next\" href=\"';\n\t\t\t\t$paginationCode .= $uri . '\">Next &raquo;</a>';\n\t\t\t}\n\t\t\t$paginationCode .= \"<br /><br />\";\n\t\t\tif ($prev_shown) {\n\t\t\t\t$uri = str_replace('PAGEREPLACE', '1', $generic_uri);\n\t\t\t\t$paginationCode .= '<a class=\"page-first\" href=\"'.$uri.'\">First Page&nbsp;|&nbsp;</a>';\n\t\t\t\t$uri = str_replace('PAGEREPLACE', $prev_pages, $generic_uri);\n\t\t\t\t$paginationCode .= '<a class=\"page-prev\" href=\"'.$uri.'\">Previous. '.$ppp.' Pages</a>';\n\t\t\t}\n\t\t\tif ($next_shown) {\n\t\t\t\tif ($prev_shown) $paginationCode .= '&nbsp;|&nbsp;';\n\t\t\t\t$uri = str_replace('PAGEREPLACE', $next_pages, $generic_uri);\n\t\t\t\t$paginationCode .= '<a class=\"page-next\" href=\"'.$uri.'\">Next '.$ppp.' Pages&nbsp;|&nbsp;</a> ';\n\t\t\t\t$uri = str_replace('PAGEREPLACE', \"$total_pages\", $generic_uri);\n\t\t\t\t$paginationCode .= '<a class=\"page-last\" href=\"'.$uri.'\">Last Page</a>';\n\t\t\t}\n\t\t\tif ($prev_shown || $next_shown)\t$paginationCode .= \"<br><br>\";\n\t\t\t$min = ($page - 1) * $per_page + 1;\n\t\t\t$max = min($page * $per_page, $total_rows);\n\t\t\t$paginationCode .= \"<div class=\\\"page-showing\\\">Showing records $min-$max of {$total_rows} ($total_pages pages total).</div>\";\n\t\t}\n\t\t$html .= $paginationCode . \"<br />\";\n\t\treturn $html; \n\t}", "title": "" }, { "docid": "a5c7bd14f653cb08f831531452449c6d", "score": "0.70301783", "text": "abstract protected function getPaginationView();", "title": "" }, { "docid": "e91e8f49cdd83356872882b893230396", "score": "0.70256317", "text": "public function paginate()\n {\n $output = \"<table class='table'>\n <thead class='thead-dark'>\n <tr>\n <th scope='col'>Tâche</th>\n <th scope='col'>Auteur</th>\n </tr>\n </thead>\";\n \n\t\t$offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0;\n\t\t\n\t\t$sql = $this->_db->prepare(\"SELECT * FROM Logs ORDER BY idLogs ASC \".\" LIMIT \".$this->_limitPerPage.\" OFFSET \".$offset);\n\t\t$sql->execute();\n\n // Boucle qui permet d'afficher les élements dans la pagination\n while ($logs = $sql->fetchObject())\n {\n $output .=\"<tr>\n <td><a href='/logs/\".$logs->idLogs.\"'>$logs->title</a></td>\n <td>$logs->author</td></tr>\";\n }\n\n $output .= \"</table>\";\n $output .= $this->PaginationBar();\n \n\t\treturn $output;\n\t}", "title": "" }, { "docid": "680f591bcff30a1f5d75bfc875c460af", "score": "0.7018218", "text": "function paginar_resultados($sql,$items_page = 30) {\n\tglobal $mysqli;\n\t\n\t$result = $mysqli->query($sql) or die('Error: '.$mysqli->error);\n\tif ($result->num_rows > 0) :\n\t\trequire('class/paginator.class.php');\n\t\t$pages = new Paginator;\n\t\t$pages->items_per_page = $items_page;\n\t\t$pages->items_total = $result->num_rows;\n\t\t$pages->mid_range = 9;\n\t\t$pages->paginate();\n\t\techo '<div id=\"paginator\">';\n\t\techo '<div id=\"total_pages\">Página: '.$pages->current_page.' de '.$pages->num_pages.'</div>';\n\t\techo '<div id=\"pages\">'.$pages->display_pages().'</div>';\n\t\techo '</div>';\n\t\treturn $pages->limit;\n\tendif;\n}", "title": "" }, { "docid": "23d344e9e197065d8b3d0db988e9fb3c", "score": "0.7017883", "text": "public function paginate($noOfItem = 10);", "title": "" }, { "docid": "23d344e9e197065d8b3d0db988e9fb3c", "score": "0.7017883", "text": "public function paginate($noOfItem = 10);", "title": "" }, { "docid": "53f9948dc43c91b85654967470f19817", "score": "0.69553995", "text": "function paginate() {\r\n\t\tif(!$this->conn) {\r\n\t\t\tif($this->debug) echo \"MySQL connection not found <br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$all_rs = @mysql_query($this->sql);\r\n\t\tif(!$all_rs) {\r\n\t\t\tif($this->debug) echo \"Query failed to execute. Check your query <br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->total_rows = mysql_num_rows($all_rs);\r\n\t\t@mysql_close($all_rs);\r\n\t\t\r\n\t\t$this->max_pages = ceil($this->total_rows/$this->rows_per_page);\r\n\t\t// If someone clever, tries to show the page not in the 0 and last page, then set page to 1\r\n\t\tif($this->page > $this->max_pages || $this->page <= 0) {\r\n\t\t\t$this->page = 1;\r\n\t\t}\r\n\t\t\r\n\t\t//Calculate 0ffset\r\n\t\t$this->offset = $this->rows_per_page * ($this->page-1);\r\n\t\t\r\n\t\t//Fetch the required result set\r\n\t\t$rs = @mysql_query($this->sql.\" LIMIT {$this->offset}, {$this->rows_per_page}\");\r\n\t\tif(!$rs) {\r\n\t\t\tif($this->debug) echo \"Pagination failed. Please make sure query is ok.<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn $rs;\r\n\t}", "title": "" }, { "docid": "271e04f7bf6aaf44ff1aafcee3fb061a", "score": "0.69450206", "text": "protected function _build () {\n if ($this->_results < 1) {\n $this->_enabled = FALSE;\n return;\n }\n\n $this->_numPages = ceil($this->_results / $this->_resultsPerPage);\n\n switch ($this->_style) {\n case Paging_Style::classic:\n case Paging_Style::digg:\n case Paging_Style::punBB:\n throw new Exception('not supported yet');\n break;\n\n case Paging_Style::normal:\n default:\n // make sure this is an odd number\n if ($this->_pagesToShow % 2 == 0) {\n --$this->_pagesToShow;\n }\n\n $this->_pageOffset = $this->_page - floor($this->_pagesToShow / 2);\n\n // make sure we don't show pages that don't exist\n if ($this->_numPages < $this->_pagesToShow) {\n $this->_pagesToShow = $this->_numPages;\n }\n\n // make sure we don't show negative pages\n if ($this->_pageOffset < 1) {\n $this->_pageOffset = 1;\n }\n // make sure we don't show more pages than we should\n elseif ($this->page + floor($this->_pagesToShow / 2) >= $this->_numPages) {\n $this->_pageOffset = $this->_numPages - $this->_pagesToShow + 1;\n }\n\n // hide first and previous links\n if ($this->_page <= 1) {\n $this->_showJumpToFirstLink = FALSE;\n $this->_showJumpToPreviousLink = FALSE;\n }\n\n // hide next and last links\n if ($this->_page >= $this->_numPages) {\n $this->_showJumpToNextLink = FALSE;\n $this->_showJumpToLastLink = FALSE;\n }\n break;\n }\n }", "title": "" }, { "docid": "bb9778bf4be27de16d60eafd014fab46", "score": "0.6942451", "text": "function bbp_search_pagination_links()\n{\n}", "title": "" }, { "docid": "1e0df9a68a890d4b4dd18e274a310fc8", "score": "0.6910361", "text": "static function paginationUser( array $data, $results = 5 ) {\n\t\t$current = ( $data['current'] ) ? $data['current'] : 1;\n\t\tif( $current <= 0 )\n\t\t\t$current = 1;\n\n\t\t$total = $data['allpages'];\n\t\t$symetric = ( $results - 1 ) / 2;\n\n\t\t$sort = ( $_GET['sort'] ) ? \"&sort[n]={$_GET['sort']['n']}&sort[t]={$_GET['sort']['t']}\" : \"\";\n\n\t\t$next = ( $current == $total ) ? $total : $current + 1;\n\t\t$prev = ( $current == 1 ) ? 1 : $current - 1;\n\n\t\tif( $total == 1 )\n\t\t\treturn;\n\n\t\tif( $current <= 0 )\n\t\t\t$current = 1;\n\n\t\tif( $current >= $total )\n\t\t\t$current = $total;\n\n\t\t$uri = self::currentUri();\n\t\t$uriseparator = ( $_GET['op']['s']['t'] ) ? '&' : '?';\n\n\t\t$string = ( $_GET['s'] ) ? \"&s=\" . trim( htmlspecialchars( $_GET['s'] ) ) : \"\";\n\n\n\n\t\t$p .= \"<ul class='pagin'>\";\n\n\n\t\t\tif( $current >= 3 ) {\n\t\t\t\tif( $current == $total || $current + 2 > $total ) {\n\t\t\t\t\tif( $current == ( $total - 1 ) )\n\t\t\t\t\t\t$start = $current - 3;\n\t\t\t\t\telseif( $current == $total )\n\t\t\t\t\t\t$start = $current - 4;\n\t\t\t\t\telse\n\t\t\t\t\t\t$start = $current;\n\n\t\t\t\t\tif( $start <= 0 )\n\t\t\t\t\t\t$start = 1;\n\n\t\t\t\t\t$stop = $total;\n\t\t\t\t} else {\n\t\t\t\t\t$start = $current - 2;\n\t\t\t\t\t$stop = $current + 2;\n\t\t\t\t}\n\t\t\t\tif( $current - 2 > 1 && $start > 1 ) {\n\t\t\t\t\t$p .= \"<li><a href='\" . BASE . Routing::$routing['controller'] . \"?p=1'>1</a></li>\";\n\t\t\t\t\t$p .= \"<li><a href='#''>...</a></li>\";\n\t\t\t\t}\n\t\t\t\tfor( $i = $start; $i <= $stop; $i++ ) {\n\t\t\t\t\tif( $i == $current )\n\t\t\t\t\t\t$p .= \"<li class='active'><a href='\" . BASE . Routing::$routing['controller'] . \"?p={$i}'>{$i}</a></li>\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$p .= \"<li><a href='\" . BASE . Routing::$routing['controller'] . \"?p={$i}'>{$i}</a></li>\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$start = 1;\n\t\t\t\tif( $current == $total )\n\t\t\t\t\t$stop = $total;\n\t\t\t\telse\n\t\t\t\t\t$stop = ( $current == 1 ) ? $current + 4 : $current + 3;\n\t\t\t\tif( $stop >= $total )\n\t\t\t\t\t$stop = $total;\n\t\t\t\tfor( $i = $start; $i <= $stop; $i++ ) {\n\t\t\t\t\tif( $i == $current )\n\t\t\t\t\t\t$p .= \"<li class='active'><a href='\" . BASE . Routing::$routing['controller'] . \"?p={$i}'>{$i}</a></li>\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$p .= \"<li><a href='\" . BASE . Routing::$routing['controller'] . \"?p={$i}'>{$i}</a></li>\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( $current + 2 < $total && $stop < $total ) {\n\t\t\t\t$p .= \"<li><a href='#''>...</a></li>\";\n\t\t\t\t$p .= \"<li><a href='\" . BASE . Routing::$routing['controller'] . \"?p={$total}'>{$total}</a></li>\";\n\t\t\t}\n\t\t$p .= \"</ul>\";\n\n\n\t\treturn $p;\n\t}", "title": "" }, { "docid": "86829331643e6ddf3c977d227a851825", "score": "0.6906594", "text": "public function paginate(array $data);", "title": "" }, { "docid": "86829331643e6ddf3c977d227a851825", "score": "0.6906594", "text": "public function paginate(array $data);", "title": "" }, { "docid": "86829331643e6ddf3c977d227a851825", "score": "0.6906594", "text": "public function paginate(array $data);", "title": "" }, { "docid": "47824735f736c49c04645563ec906795", "score": "0.6893309", "text": "function showpages($table,$count) {\r\n global $limit_first,$per_page,$per_pagination;\r\n\r\n if($count<=$per_page) {\r\n return '';\r\n }\r\n\r\n $limit_first = (isset($_REQUEST['pagination'])) ? $_REQUEST['pagination']*$per_page : 0;\r\n $limit_last = min($limit_first + $per_page,$count);\r\n\r\n if($count==0) echo \"<p>No results.</p>\";\r\n else {\r\n echo \"<p>$count results.\";\r\n if($count > $per_page) echo \" Showing results $limit_first to $limit_last.\";\r\n echo \"</p>\";\r\n }\r\n\r\n if($count>$per_page) {\r\n // figure out the first and last button to display\r\n $last_page=ceil((float)$count/$per_page);\r\n $current_page=floor($limit_first/$per_page);\r\n $start=$current_page-$per_pagination/2;\r\n $end=$current_page+$per_pagination/2;\r\n if($start<0) {\r\n $start=0;\r\n $end=$start+$per_pagination;\r\n }\r\n if($end>$last_page) {\r\n $end=$last_page;\r\n $start=$end-$per_pagination;\r\n if($start<0) $start=0;\r\n }\r\n\r\n // find the next/prev buttons\r\n $next=min($current_page+1,$last_page-1);\r\n $prev=max($current_page-1,0);\r\n\r\n // build the URL to link to\r\n $url = parse_url($_SERVER['REQUEST_URI']);\r\n $q = (isset($url['query'])) ? explode('&',$url['query']) : array();\r\n foreach($q as $k=>$v) {\r\n if(strncasecmp($v, \"pagination\",10)==0) {\r\n unset($q[$k]);\r\n break;\r\n }\r\n }\r\n $link=$url['path'].'?'.implode('&',$q);\r\n\r\n // build the buttons\r\n $buttons='';\r\n for($i=$start;$i<$end;++$i) {\r\n $buttons.=\"<a class='btn page-$i' href='$link&pagination=$i'>$i</a>\";\r\n }\r\n $buttons=str_replace(\"page-$current_page'\",\"page-$current_page this-page'\",$buttons);\r\n\r\n echo \"<div class='btn-toolbar center'>\r\n <div class='btn-group'>\r\n <a class='btn' href='$link&pagination=0'>&lt;&lt;</a>\r\n <a class='btn' href='$link&pagination=$prev'>&lt;</a>\r\n </div>\r\n <div class='btn-group'>$buttons</div>\r\n <div class='btn-group'>\r\n <a class='btn' href='$link&pagination=$next'>&gt;</a>\r\n <a class='btn' href='$link&pagination=\".($last_page-1).\"'>&gt;&gt;</a>\r\n </div>\r\n </div>\";\r\n }\r\n\r\n return \"LIMIT $limit_first, $per_page\";\r\n}", "title": "" }, { "docid": "e782163107f40710a01a9d57946b4e2a", "score": "0.6866863", "text": "private function filter_results()\n {\n\n //find the length of the record array\n $this->_record_array_length = count($this->_record_array);\n\n //calculate the number of _total_pages\n $this->_total_pages = ceil($this->_record_array_length / $this->_ipp);\n\n //if the current page is greater than the total page count, force back to last page\n if ($this->_current_page > $this->_total_pages) {\n header('Location: '.LOCAL.'?p='.$this->_total_pages);\n die();\n }\n\n //calculate the starting point\n $this->_starting_point = ceil(($this->_current_page - 1) * $this->_ipp);\n\n //return the portion of results\n $result = array_slice($this->_record_array, $this->_starting_point, $this->_ipp);\n\n $this->_record_array = $result;\n }", "title": "" }, { "docid": "baa3d4cfd6b94c9703f9c4609f465fe8", "score": "0.6846854", "text": "public function searchTableRowsWithPagination();", "title": "" }, { "docid": "ee47a439a0a290bccbce6c83f54e990d", "score": "0.6829393", "text": "public function paginate()\n {\n $this->assert = Result::PAGINATE;\n return $this;\n }", "title": "" }, { "docid": "b9ff51860918fcc6fa0970b454a55663", "score": "0.6824939", "text": "function bbp_get_search_pagination_links()\n{\n}", "title": "" }, { "docid": "5ded25d87df1f27ded600271cd8cd5a0", "score": "0.68103266", "text": "function get_paginate($table, $where = 1, $page = 1, $ppage = 10, $lastpage = 1)\n{\n $html = '';\n \n if($lastpage > 1)\n {\n $nextpage= $page +1;\n $prevpage= $page -1;\n $html .= '\n\t <div class=\"text-center\">\n\t <ul class=\"pagination pagination-sm\">';\n\t//SI NO ES LA PRIMERA PÁGINA HABILITO EL BOTON DE FIRST, EL PREVIOUS Y MUESTRO EL RESTO DE PÁGINAS\n\tif ($page > 1)\n\t{\n\t $html .= '\n\t <li><a href=\"'.$_SERVER['PHP_SELF'].'?page=1\" title=\"Primera\"><span class=\"glyphicon glyphicon-fast-backward\"></span></a></li>\n\t <li><a href=\"'.$_SERVER['PHP_SELF'].'?page='.$prevpage.'\" title=\"Anterior\"><span class=\"glyphicon glyphicon-backward\"></span></a></li>';\n\t \n\t for($i= 1; $i<= $lastpage ; $i++)\n {\n\t $html .= '\n\t <li'.($page==$i?' class=\"active\"':'').'><a href=\"'.$_SERVER['PHP_SELF'].'?page='.$i.'\" title=\"P&aacute;gina '.$i.'\">'.$i.'</a></li>';\n\t }\n\t //Y SI LA ULTIMA PÁGINA ES MAYOR QUE LA ACTUAL MUESTRO EL BOTON NEXT Y EL LAST \n if($lastpage >$page )\n { \n $html .= '\n\t <li><a href=\"'.$_SERVER['PHP_SELF'].'?page='.$nextpage.'\" title=\"Pr&oacute;xima\"><span class=\"glyphicon glyphicon-forward\"></span></a></li>\n\t <li><a href=\"'.$_SERVER['PHP_SELF'].'?page='.$lastpage.'\" title=\"&Uacute;ltima\"><span class=\"glyphicon glyphicon-fast-forward\"></span></a></li>';\n }\n\t}\n\telse\n {\n\t //EN CAMBIO SI ESTAMOS EN LA PÁGINA UNO DESHABILITO EL BOTON DE FIRST, PREVIUS Y MUESTRO LAS DEMÁS\n\t for($i= 1; $i<= $lastpage ; $i++)\n\t {\n\t $html .= '\n\t <li'.($page==$i?' class=\"active\"':'').'><a href=\"'.$_SERVER['PHP_SELF'].'?page='.$i.'\" title=\"P&aacute;gina '.$i.'\">'.$i.'</a></li>';\n\t }\n\t //Y SI LA ULTIMA PÁGINA ES MAYOR QUE LA ACTUAL MUESTRO EL BOTON NEXT Y EL LAST \n if($lastpage >$page )\n { \n\t\t$html .= '\n\t <li><a href=\"'.$_SERVER['PHP_SELF'].'?page='.$nextpage.'\" title=\"Pr&oacute;xima\"><span class=\"glyphicon glyphicon-forward\"></span></a></li>\n\t <li><a href=\"'.$_SERVER['PHP_SELF'].'?page='.$lastpage.'\" title=\"&Uacute;ltima\"><span class=\"glyphicon glyphicon-fast-forward\"></span></a></li>';\n\t }\n\t}\n\t\n\t $html .= '\n\t </ul>\n\t </div>';\n }\n return $html;\n}", "title": "" }, { "docid": "fdb54b7ac3c08f0d414f338bb1aef4c8", "score": "0.6801363", "text": "public function pagedSearch($data,$page);", "title": "" }, { "docid": "250dd7e586138de13957690dc04bab5f", "score": "0.6788975", "text": "protected function paginate()\n {\n if (! is_null($this->request->get('start'))) {\n $this->query()\n ->skip($this->request->get('start'))\n ->take($this->request->get('length', $this->config->get('laratables.defaultLength')));\n }\n }", "title": "" }, { "docid": "d2acc162f5cad57e83e2082c56c48bc7", "score": "0.67884266", "text": "function panigation($totalRecord, $currentPage, $rowLimit, $keyword,$links)// nhieu ham qua thay hoi ham nao thi e tra loi ham day chu chu thich tren tung dong khong het dc\n\t\t{\n\t\t//can tinh dc totalPage\n\t\t\t$totalPage = ceil($totalRecord/$rowLimit);\n\t\t//echo $totalPage;die();\n\t\t\tif ($currentPage <= 0) {\n\t\t\t\t$currentPage =1;\n\t\t\t}elseif($currentPage > $totalPage)\n\t\t\t{\n\t\t\t\t$currentPage = $totalPage;\n\t\t\t}\n\n\t\t\t$start = ($currentPage -1) * $rowLimit;\n\n\t\t//tao template bootstrap phan trang.\n\t\t\t$html = '';\n\t\t\t$html .= \"<nav aria-label='Page navigation'>\";\n\t\t\t$html .= \"<ul class='pagination'>\";\n\t\t\t$html .= \"\";\n\t\t//xu ly cho nut preview pageWWx`\n\t\t\tif($currentPage > 1 && $currentPage <= $totalPage)\n\t\t\t{\n\t\t\t\t$html .= \"<li><a href='\".str_replace('{page}', ($currentPage-1), $links).\"' aria-label='Previous'><span aria-hidden='true'>&laquo;</span></a></li>\";\n\t // echo str_replace('{page}', ($currentPage-1), $links);die();\n\t\t\t}\n\t\t//het xu ly cho preview page\n\t // echo $totalPage;die();\n\t\t//xu ly cho cac trang con lai\n\t\t\tfor($i=1;$i<=$totalPage;$i++)\n\t\t\t{\n\t\t //kiem tra xem ng dung dang dung o trang hien tai hay ko neu dung active hieu ung cho ng dung bt\n\t\t\t\tif($i==$currentPage)\n\t\t\t\t{\n\t\t\t\t\t$html .= \"<li class='active'><a>\".$currentPage.\"<span class='sr-only'></span></a></li>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$html .= \"<li><a href='\".str_replace('{page}', $i, $links).\"'>\".$i.\"</a></li>\";\n\t\t\t\t}\n\t\t\t}\n\t\t//het xu ly cho cac trang con lai\n\t\t//xu ly cho nut nextpage\n\t\t\tif($currentPage < $totalPage && $currentPage >= 1){\n\t\t\t\t$html .= \"<li><a href='\".str_replace('{page}', ($currentPage+1), $links).\"' aria-label='Next'><span aria-hidden='true'>&raquo;</span></a></li>\";\n\t\t\t}\n\t\t//het xu ly cho nut next page \n\n\t\t\t$html .= \"</ul>\";\n\t\t\t$html .= \"</nav>\";\n\t\t\treturn array(\n\t\t\t\t'page' => $currentPage,\n\t\t\t\t'start' => $start,\n\t\t\t\t'limit' => $rowLimit,\n\t\t\t\t'panigationHtml' => $html,\n\t\t\t\t'keyword' => $keyword\n\t\t\t);\n\n\t\t}", "title": "" }, { "docid": "8b519b2aaab4b1d595ec3fdc29ef3a46", "score": "0.67828166", "text": "function arrayPagination($url, $count, $nb_per_page = 4, $pages=true, $show_numbers=true, $first_and_last=false, $queryString=true)\r\n{\r\n\treturn array('base_url' => $url,\r\n 'reuse_query_string' => true,\r\n\t\t 'total_rows' => $count,\r\n\t\t 'per_page' => $nb_per_page,\r\n\t\t 'use_page_numbers' => $pages,\r\n\t\t 'first_link' => $first_and_last,\r\n\t\t 'last_link' => $first_and_last,\r\n\t\t 'prev_tag_open' => '<li>',\r\n\t\t 'prev_tag_close' => '</li>',\r\n\t\t 'next_tag_open' => '<li>',\r\n\t\t 'next_tag_close' => '</li>',\r\n\t\t 'prev_link' => '<span class=\"glyphicon glyphicon glyphicon-chevron-left\" aria-hidden=\"true\"></span>',\r\n\t\t 'next_link' => '<span class=\"glyphicon glyphicon glyphicon-chevron-right\" aria-hidden=\"true\"></span>',\r\n\t\t 'display_pages' => $show_numbers,\r\n\t\t\t\t\t\t\t\t'num_tag_open' => '<li>',\r\n\t\t\t\t\t\t\t\t'num_tag_close' => '</li> ',\r\n\t\t 'full_tag_open' => '',\r\n\t\t 'full_tag_close' => '',\r\n\t\t 'cur_tag_open' => '<li><span class=\"btn active btn-lg\">',\r\n\t\t 'cur_tag_close' => '</span></li> ');\r\n}", "title": "" }, { "docid": "4a4a0aa4c6c490abcff390c902c8e7f2", "score": "0.67668176", "text": "function page_break($db_object,$return_content,$adjacents,$total_pages,$limit,$targetpage,$page) {\n if ($page == 0) $page = 1;\n $prev = $page - 1;\n $next = $page + 1;\n $lastpage = ceil($total_pages/$limit);\n $lpm1 = $lastpage - 1;\n $targetpage = $targetpage.\"page\";\n $pagination = \"\";\n if($lastpage > 1) {\n $pagination .= \"<div class=\\\"pagination\\\">\";\n if ($page > 1)\n $pagination.= \"<a href=\\\"$targetpage=$prev\\\">&laquo; previous</a>\";\n else\n $pagination.= \"<span class=\\\"disabled\\\">&laquo; previous</span>\";\n if ($lastpage < 7 + ($adjacents * 2)) {\n for ($counter = 1; $counter <= $lastpage; $counter++) {\n if ($counter == $page)\n $pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n else\n $pagination.= \"<a href=\\\"$targetpage=$counter\\\">$counter</a>\";\n }\n }\n elseif($lastpage > 5 + ($adjacents * 2)) {\n if($page < 1 + ($adjacents * 2)) {\n for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++) {\n if ($counter == $page)\n $pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n else\n $pagination.= \"<a href=\\\"$targetpage=$counter\\\">$counter</a>\";\n }\n $pagination.= \"...\";\n $pagination.= \"<a href=\\\"$targetpage=$lpm1\\\">$lpm1</a>\";\n $pagination.= \"<a href=\\\"$targetpage=$lastpage\\\">$lastpage</a>\";\n }\n elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2)) {\n $pagination.= \"<a href=\\\"$targetpage=1\\\">1</a>\";\n //$pagination.= \"<a href=\\\"$targetpage=2\\\">2</a>\";\n $pagination.= \"...\";\n for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++) {\n if ($counter == $page)\n $pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n else\n $pagination.= \"<a href=\\\"$targetpage=$counter\\\">$counter</a>\";\n }\n $pagination.= \"...\";\n $pagination.= \"<a href=\\\"$targetpage=$lpm1\\\">$lpm1</a>\";\n $pagination.= \"<a href=\\\"$targetpage=$lastpage\\\">$lastpage</a>\";\n }\n //close to end; only hide early pages\n else {\n $pagination.= \"<a href=\\\"$targetpage=1\\\">1</a>\";\n $pagination.= \"<a href=\\\"$targetpage=2\\\">2</a>\";\n $pagination.= \"...\";\n for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++) {\n if ($counter == $page)\n $pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n else\n $pagination.= \"<a href=\\\"$targetpage=$counter\\\">$counter</a>\";\n }\n }\n }\n if ($page < $counter - 1)\n $pagination.= \"<a href=\\\"$targetpage=$next\\\">next &raquo;</a>\";\n else\n $pagination.= \"<span class=\\\"disabled\\\">next &raquo;</span>\";\n $pagination.= \"</div>\\n\";\n }\n $return_content=str_replace ( \"<{pagination}>\", $pagination, $return_content);\n return $return_content;\n }", "title": "" }, { "docid": "d2b41757897941c58adcdbc0b684bb33", "score": "0.6757028", "text": "function Paginate($values,$per_page){\n $total_values = count($values);\n //get the current page\n if(isset($_GET['page'])){\n $current_page = $_GET['page'];\n }else{\n //pages start with number 1\n $current_page = 1;\n }\n //define the number of the content on each page\n $counts = ceil($total_values / $per_page);\n $param1 = ($current_page - 1) * $per_page;\n $this->data = array_slice($values,$param1,$per_page);\n\n //number of pages are ascending\n for($x=1; $x<= $counts; $x++){\n $numbers[] = $x;\n }\n return $numbers;\n }", "title": "" }, { "docid": "b00b4050e3b899cafb31ddc16ab0bd5e", "score": "0.6755835", "text": "public function getRecordsandShow()\r\n {\r\n $paginator = new Paginator();\r\n \r\n $paginator->total = $this->getTotalAreaRecords();\r\n $paginator->paginate();\r\n $records = mysql_query(\"SELECT * from table LIMIT ($paginator->currentPage-1)*$paginator->itemsPerPage, $paginator->itemsPerPage\") ;\r\n\r\n\r\n echo $paginator->pageNumbers();\r\n echo $paginator->itemsPerPage();\r\n }", "title": "" }, { "docid": "b00b4050e3b899cafb31ddc16ab0bd5e", "score": "0.6755835", "text": "public function getRecordsandShow()\r\n {\r\n $paginator = new Paginator();\r\n \r\n $paginator->total = $this->getTotalAreaRecords();\r\n $paginator->paginate();\r\n $records = mysql_query(\"SELECT * from table LIMIT ($paginator->currentPage-1)*$paginator->itemsPerPage, $paginator->itemsPerPage\") ;\r\n\r\n\r\n echo $paginator->pageNumbers();\r\n echo $paginator->itemsPerPage();\r\n }", "title": "" }, { "docid": "275af8e6d9359ebeae65b667e4daa60d", "score": "0.6753549", "text": "function Paginate($pagination) {\n $current_url = Controller::curr()->Link();\n\n foreach ($pagination as $page) {\n $current_page = $page->getField('page');\n }\n $last_page = $page->getField('pages');\n $this->TotalPhotos = $page->getField('total');\n\n $this->numPages = $page->getField('pages');\n\n if ($current_page > 1) {\n $destPage = $current_page - 1;\n $this->Pagelist = \"<a href='{$current_url}page/$destPage' class='prev'>&lt; \" . _t('FlickrService.PREVIOUS', 'Previous') . \"</a>\";\n }\n\n if ($current_page < 6) {\n $start = 0;\n } else {\n $start = $current_page - 5;\n }\n $end = $last_page < 10 ? $last_page : $start + 10;\n\n for ($i = $start; $i < $end; $i++) {\n if ($i >= ($last_page - 1))\n continue;\n $pagenum = $i + 1;\n if ($pagenum != $current_page) {\n $destPage = $pagenum;\n $page_item = \"<a href='{$current_url}page/$destPage'>$pagenum</a>\";\n }\n else\n $page_item = \"<span class='currentPage'>$pagenum</span>\";\n\n $this->Pagelist .= $page_item;\n }\n\n if ($current_page < $last_page) {\n $destPage = $current_page + 1;\n $this->Pagelist .= \"<a href='{$current_url}page/$destPage' class='next'>\" . _t('FlickrService.NEXT', 'Next') . \" &gt;</a>\";\n }\n\n //return $pages;\n }", "title": "" }, { "docid": "f06b291ae8e283a408659dfc649d964a", "score": "0.67509145", "text": "public function index()\n {\n $models = $this->model->paginate(25);\n $transformer = $this->transformer;\n return $this->response->paginator($models, $transformer);\n }", "title": "" }, { "docid": "e4ab54b9e2f154615f867a98241fe546", "score": "0.6746825", "text": "function pagination($where){\n if( !$this->args['paginate'] ) return;\n \n parent::pagination($where);\n }", "title": "" }, { "docid": "5a60d0916ada2a7ac3656cf2f4d1ea16", "score": "0.67457885", "text": "private function fetchPaginatedResults()\n {\n $select = new Select($this->tableGateway->getTable());\n\n // Create a new result set based on the Album entity:\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Comment());\n\n // Create a new pagination adapter object:\n $paginatorAdapter = new DbSelect(\n // our configured select object:\n $select,\n // the adapter to run it against:\n $this->tableGateway->getAdapter(),\n // the result set to hydrate:\n $resultSetPrototype\n );\n\n $paginator = new Paginator($paginatorAdapter);\n return $paginator;\n }", "title": "" }, { "docid": "34a5dbd9165585d4b83a582687400af8", "score": "0.6724961", "text": "function commentPagination ($total_rows,$per_page,$PAGES_PER_PAGE,$request_url=\"\"){\n\t#function ToHtml(total_rows){\n\t\tglobal $page;\n\t\t$request_url=($request_url!=\"\") ? $request_url : $_SERVER['REQUEST_URI'] ;\n\t\t$paginationCode = '';\n\t\tif ($per_page) {\n\t\t\t#$page = (!isset($_GET['page']))? 1 : $_GET['page'];\t\t\t\n\t\t\t$prev = ($page - 1);\n\t\t\t$next = ($page + 1);\n\t\t\t$max_records = $per_page;\n\t\t\t$from = ($page - 1) * $max_records;\n\t\t\t$total_result = $total_rows;\n\t\t\t$total_pages = ceil($total_result / $max_records);\n\t\t\t$ppp = $PAGES_PER_PAGE;\n\t\t\tif ($total_pages > 1 && $ppp && $ppp < $total_pages) {\n\t\t\t\tif ($page > $ppp) {\n\t\t\t\t\t$first_page = $page;\n\t\t\t\t} else {\n\t\t\t\t\t$first_page = 1;\n\t\t\t\t}\n\t\t\t\t$last_page = $ppp + $first_page;\n\t\t\t\tif ($last_page > $total_pages) {\n\t\t\t\t\t$last_page = $total_pages;\n\t\t\t\t\t$first_page = $last_page - $ppp;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$first_page = 1;\n\t\t\t\t$last_page = $total_pages;\n\t\t\t}\n\t\t\t$prev_shown = false;\n\t\t\t$next_shown = false;\n\t\t\t$generic_uri = addToGetString($request_url, \"page=PAGEREPLACE\");\n\t\t\t$extra_data = \"\";\n\t\t\tif ($pass_key) {\n\t\t\t\tforeach ($pass_key as $key => $value) {\n\t\t\t\t\tif (is_array($value)) {\n\t\t\t\t\t\tforeach ($value as $getValue) {\n\t\t\t\t\t\t\t$extra_data .= \"&\" . urlencode($key) . \"=\" . $getValue;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$generic_uri = addToGetString($generic_uri, \"$key=$value\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$generic_uri .= $extra_data;\n\t\t\t}\n\t\t\tif ($first_page > 1) {\n\t\t\t\t$prev_pages = $page - $ppp;\n\t\t\t\t$prev_shown = true;\n\t\t\t}\n\t\t\tif ($last_page != $total_pages) {\n\t\t\t\t$next_pages = $page + $ppp;\n\t\t\t\t$next_shown = true;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$min = ($page - 1) * $per_page + 1;\n\t\t\t$max = min($page * $per_page, $total_rows);\n\t\t\t$paginationCode .= \"<div class=\\\"page-showing\\\">Showing comments $min to $max of {$total_rows} ($total_pages pages total).</div>\";\n\t\t\t\n\t\t\t$paginationJson['showing']['min']=\t\t\t$min;\n\t\t\t$paginationJson['showing']['max']=\t\t\t$max;\n\t\t\t$paginationJson['showing']['totalRows']=\t$total_rows;\n\t\t\t$paginationJson['showing']['totalPages']=\t$total_pages;\n\t\t\t\n\t\t\tif(($total_pages > 1) && ($page > 1)) {\n\t\t\t\t$uri = str_replace('PAGEREPLACE', $prev, $generic_uri);\n\t\t\t\t$paginationCode .= '<a class=\"page-prev\" href=\"'.$uri.'\">&laquo; Previous&nbsp;</a>';\n\t\t\t\t$paginationJson['pages']['prev']=\t\t\t\t$uri;\n\t\t\t}\n\t\t\tif ($total_pages > 1) {\n\t\t\t\tfor($i = $first_page; $i <= $last_page; $i++) {\n\t\t\t\t\tif(($page) == $i) {\n\t\t\t\t\t\t$paginationCode .= ' <span class=\"page-num\">&nbsp;'.$i.'&nbsp;</span> ';\n\t\t\t\t\t\t$paginationJson['pages'][$i]=$i;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$uri = str_replace('PAGEREPLACE', $i, $generic_uri);\n\t\t\t\t\t\t$paginationCode .= ' <a href=\"'.$uri.'\">'.$i.'</a> ';\n\t\t\t\t\t\t$paginationJson['pages'][$i]=$uri;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(($total_pages > 1) && ($page < $total_pages)) {\n\t\t\t\t$uri = str_replace('PAGEREPLACE', $next, $generic_uri);\n\t\t\t\t$paginationCode .= '<a class=\"page-next\" href=\"';\n\t\t\t\t$paginationCode .= $uri . '\">Next &raquo;</a>';\n\t\t\t\t$paginationJson['pages']['next']=$uri;\n\t\t\t}\n//\t\t\t$paginationCode .= \"<br /><br />\";\n\t\t\tif ($prev_shown) {\n\t\t\t\t$uri = str_replace('PAGEREPLACE', '1', $generic_uri);\n\t\t\t\t$paginationCode .= '<a class=\"page-first\" href=\"'.$uri.'\">First Page</a>';\n\t\t\t\t$paginationJson['pages']['firstpage']=$uri;\n\t\t\t\t$uri = str_replace('PAGEREPLACE', $prev_pages, $generic_uri);\n\t\t\t\t$paginationCode .= '<a class=\"page-prev\" href=\"'.$uri.'\">Previous. '.$ppp.' Pages</a>';\n\t\t\t\t$paginationJson['pages']['previouspages']['uri']=$uri;\n\t\t\t\t$paginationJson['pages']['previouspages']['pages']=$ppp;\n\t\t\t}\n\t\t\tif ($next_shown) {\n\t\t\t\tif ($prev_shown) $paginationCode .= '&nbsp;|&nbsp;';\n\t\t\t\t$uri = str_replace('PAGEREPLACE', $next_pages, $generic_uri);\n\t\t\t\t$paginationCode .= '<a class=\"page-next\" href=\"'.$uri.'\">Next '.$ppp.' &raquo;</a> ';\n\t\t\t\t$paginationJson['pages']['nextpages']['uri']=$uri;\n\t\t\t\t$paginationJson['pages']['nextpages']['pages']=$ppp;\t\t\t\t\n\t\t\t\t$uri = str_replace('PAGEREPLACE', \"$total_pages\", $generic_uri);\n\t\t\t\t$paginationCode .= '<a class=\"page-last\" href=\"'.$uri.'\">Last Page</a>';\n\t\t\t\t$paginationJson['pages']['lastpage']=$uri;\n\t\t\t}\n//\t\t\tif ($prev_shown || $next_shown)\t$paginationCode .= \"<br><br>\";\n\t\t}\n\t\t$html .= $paginationCode;\n\t\t$json=new Services_JSON;\n\t\t$pgJson=$json->encode($paginationJson);\n\t\tglobal $pgJson;\n\t\t\n\t\treturn $html; \n\t}", "title": "" }, { "docid": "3aeb5a8de27223cfe9ad1ea4cb0589a1", "score": "0.6724156", "text": "public function showPageResults() {\n $fullResults = $this->buildResults();\n foreach($fullResults as $item) {\n echo $item->displayTeaser() . \"\\n\";\n }\n echo \"{$this->getCount()} records of {$this->totalRows}. \\n\";\n }", "title": "" }, { "docid": "3143034f09575a4355b96f1db52a6fe6", "score": "0.6715571", "text": "function customPagination($res){\n\t$response=new StdClass();\n\t$response->rows=$res;\n\t$response->pages=$this->getPagination();\n\t//debug($response->pages); \n\treturn $response;\n}", "title": "" }, { "docid": "d3f0a4fda0fa0217ae07425ba80f2379", "score": "0.66965127", "text": "function pagination($cn,$count)\r\n{\r\n \t$prev=1;\r\n\t$next=1;\r\n \t\r\n\tif($cn==1)\r\n\t$prev=$cn;\r\n\telse\r\n\t$prev=$cn-1;\r\n\t\r\n\tif($cn==$count)\r\n\t$next=$cn;\r\n\telse\r\n\t$next=$cn+1;\r\n\t\r\n\t \r\n\t \r\n\t\t $output='\r\n\t \r\n\t \r\n \r\n <tr >\r\n <td colspan=\"2\">\r\n <div class=\"pagenation\">\r\n <ul>\r\n <li><a href=\"viewarticals.php?&page='.$prev.'\">Prev</a></li> \r\n\t';\r\n\t\r\n\t\t if($count>0)\r\n\t\t {\r\n\t\t\tfor($i=1;$i<=$count;$i++)\r\n\t\t\t$output.='\r\n\t\t\t <li><a href=\"viewarticals.php?&page='.$i.'\">'.$i.'</a></li>\r\n\t\t\t \r\n\t\t\t ';\r\n\t\t }//count if\r\n \r\n\r\n \r\n\t $output.='\r\n\t \r\n\t \r\n\t <li><a href=\"viewarticals.php?&page='.$next.'\">Next</a></li>\r\n\t \r\n\t </ul>\r\n </div>\r\n\t\r\n\t</td>\r\n\t \r\n\t</tr>\r\n ';\r\n\t \r\n\t \r\n\t \r\n\treturn $output; \r\n\t\r\n}", "title": "" }, { "docid": "c10cd5afa81b9d0397e62effcce81c42", "score": "0.66963536", "text": "public function pagination()\n {\n $count_messages = Book::messagesCount();\n $count_show_pages = MessagesPerPage;\n $count_pages = ceil($count_messages/$count_show_pages);\n $active = (!empty($_GET['page']))?$_GET['page']:1;\n $request = '';\n if (!empty($_GET['sortby'])) {\n $request .= 'sortby='.$_GET['sortby'];\n }\n if (!empty($_GET['sort'])) {\n $request .= 'sort='.$_GET['sort'];\n }\n $url = URL.((!empty($request))?'?'.$request:'');\n $url_page = '?'.$request.((!empty($request))?'&':'').'page=';\n\n if ($count_pages > 1) {\n ob_start();\n ?>\n <ul class=\"pagination\">\n <?php for ($i = 1; $i <= $count_show_pages; $i++){ ?>\n <li class=\"<?php echo ($i == $active)?'active':'';?>\"><a href=\"<?php echo ($i === 1)?$url: $url_page.$i ;?>\"><?php echo $i; ;?></a></li>\n <?php } ?>\n </ul>\n <?php }\n return ob_get_clean();\n\n }", "title": "" }, { "docid": "cb2e970ef2de9a3ca50ae4e0b9c8d615", "score": "0.6694659", "text": "public function handlesOrderedPaging();", "title": "" }, { "docid": "cb2e970ef2de9a3ca50ae4e0b9c8d615", "score": "0.6694659", "text": "public function handlesOrderedPaging();", "title": "" }, { "docid": "c92f75beb309807ba0cb3d331ccc89f3", "score": "0.66841626", "text": "public function getPageList($limit, $offset);", "title": "" }, { "docid": "81d11eba0a41fe33d4e5d007edad22c4", "score": "0.6624178", "text": "public function getMascotas_paged($startIndex, $numItems) {\n\t\t\n\t\t$stmt = mysqli_prepare($this->connection, \"SELECT * FROM $this->tablename LIMIT ?, ?\");\n\t\t$this->throwExceptionOnError();\n\t\t\n\t\tmysqli_stmt_bind_param($stmt, 'ii', $startIndex, $numItems);\n\t\tmysqli_stmt_execute($stmt);\n\t\t$this->throwExceptionOnError();\n\t\t\n\t\t$rows = array();\n\t\t\n\t\tmysqli_stmt_bind_result($stmt, $row->Id, $row->Documento, $row->Propietario, $row->Nombre_Mascota, $row->Id_Chif, $row->Id_Especie, $row->Especie, $row->Id_Raza, $row->Raza, $row->Pelaje, $row->Color, $row->Tamano, $row->Genero, $row->Peso, $row->Estado_Reproductivo, $row->Temperamento, $row->Edad_Dias, $row->Edad_Meses, $row->Edad_Anos, $row->Tipo_Alimentacion, $row->Descripcion_Marca, $row->Descripcion_Referencia, $row->Senales_Particulares, $row->Observaciones, $row->Fecha, $row->Usuario);\n\t\t\n\t while (mysqli_stmt_fetch($stmt)) {\n\t $row->Fecha = new DateTime($row->Fecha);\n\t $rows[] = $row;\n\t $row = new stdClass();\n\t mysqli_stmt_bind_result($stmt, $row->Id, $row->Documento, $row->Propietario, $row->Nombre_Mascota, $row->Id_Chif, $row->Id_Especie, $row->Especie, $row->Id_Raza, $row->Raza, $row->Pelaje, $row->Color, $row->Tamano, $row->Genero, $row->Peso, $row->Estado_Reproductivo, $row->Temperamento, $row->Edad_Dias, $row->Edad_Meses, $row->Edad_Anos, $row->Tipo_Alimentacion, $row->Descripcion_Marca, $row->Descripcion_Referencia, $row->Senales_Particulares, $row->Observaciones, $row->Fecha, $row->Usuario);\n\t }\n\t\t\n\t\tmysqli_stmt_free_result($stmt);\t\t\n\t\tmysqli_close($this->connection);\n\t\t\n\t\treturn $rows;\n\t}", "title": "" }, { "docid": "3e6ed33ce43e9564b54d7b6575e0b6db", "score": "0.6616643", "text": "function kloe_qodef_pagination($pages = '', $range = 4, $paged = 1){\n\n\t\t$showitems = $range+1;\n\n\t\tif($pages == ''){\n\t\t\tglobal $wp_query;\n\t\t\t$pages = $wp_query->max_num_pages;\n\t\t\tif(!$pages){\n\t\t\t\t$pages = 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$show_load_more = kloe_qodef_enable_load_more();\n\t\t$masonry_template = kloe_qodef_is_masonry_template();\n\t\t\n\t\t$search_template = 'no';\n\t\tif(is_search()){\n\t\t\t$search_template = 'yes';\n\t\t}\n\t\t\n\t\t\n\t\tif($pages != 1){\n\t\t\tif($show_load_more == 'yes' && $search_template !== 'yes' && !$masonry_template){\n\t\t\t\t$params = array(\n\t\t\t\t\t'text' => esc_html__('Load More', 'kloe')\n\t\t\t\t);\n\t\t\t\techo '<div class=\"qodef-load-more-ajax-pagination\">';\t\t\t\t\n\t\t\t\techo kloe_qodef_get_button_html($params);\n\t\t\t\techo '</div>';\n\t\t\t}else{\n\t\t\t\techo '<div class=\"qodef-pagination\">';\n\t\t\t\techo '<ul>';\n\t\t\t\t\tif($paged > 2 && $paged > $range+1 && $showitems < $pages){\n\t\t\t\t\t\techo '<li class=\"qodef-pagination-first-page\"><a href=\"'.esc_url(get_pagenum_link(1)).'\"><span class=\"arrow_carrot-2left\"></span></a></li>';\n\t\t\t\t\t}\n\t\t\t\t\techo \"<li class='qodef-pagination-prev\";\n\t\t\t\t\tif($paged > 2 && $paged > $range+1 && $showitems < $pages) {\n\t\t\t\t\t\techo \" qodef-pagination prev-first\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"'><a href='\".esc_url(get_pagenum_link($paged - 1)).\"'><span class='arrow_carrot-left'></span></a></li>\";\n\n\t\t\t\t\tfor ($i=1; $i <= $pages; $i++){\n\t\t\t\t\t\tif (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )){\n\t\t\t\t\t\t\techo ($paged == $i)? \"<li class='active'><span>\".$i.\"</span></li>\":\"<li><a href='\".get_pagenum_link($i).\"' class='inactive'>\".$i.\"</a></li>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\techo '<li class=\"qodef-pagination-next';\n\t\t\t\t\tif ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages){\n\t\t\t\t\t\techo ' qodef-pagination-next-last';\n\t\t\t\t\t}\n\t\t\t\t\techo '\"><a href=\"';\n\t\t\t\t\tif($pages > $paged){\n\t\t\t\t\t\techo esc_url(get_pagenum_link($paged + 1));\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo esc_url(get_pagenum_link($paged));\n\t\t\t\t\t}\n\t\t\t\t\techo '\"><span class=\"arrow_carrot-right\"></span></a></li>';\n\t\t\t\t\tif ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages){\n\t\t\t\t\t\techo '<li class=\"qodef-pagination-last-page\"><a href=\"'.esc_url(get_pagenum_link($pages)).'\"><span class=\"arrow_carrot-2right\"></span></a></li>';\n\t\t\t\t\t}\n\t\t\t\techo '</ul>';\n\t\t\t\techo \"</div>\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a2280355d2274d76e415af416c12df34", "score": "0.66111803", "text": "private function fetchPaginatedResults()\n {\n $select = new Select($this->tableGateway->getTable());\n\n // Create a new result set based on the Cours entity:\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Cours());\n\n // Create a new pagination adapter object:\n $paginatorAdapter = new DbSelect(\n // our configured select object:\n $select,\n // the adapter to run it against:\n $this->tableGateway->getAdapter(),\n // the result set to hydrate:\n $resultSetPrototype\n );\n\n $paginator = new Paginator($paginatorAdapter);\n\n return $paginator;\n }", "title": "" }, { "docid": "c2763f956c258fbcbeef05417ea95e39", "score": "0.65956926", "text": "function set_pagination_parameteres ($table_name, $elements_per_page = 3, $visible = 0) {\n global $current_page, $max_page;\n //Amount of all or available elements (visible true or false)\n $amount_elements = count_records ($table_name, $visible);\n //Last page\n $max_page = ceil((int)$amount_elements / $elements_per_page);\n //If GET-parameter transferred\n if (isset($_GET['page'])) {\n //Minimum page 1\n if ($_GET['page'] < 1) {\n $current_page = 1;\n //Maximum page - the last\n } elseif ($_GET['page'] > $max_page) {\n $current_page = $max_page;\n } else {\n $current_page = $_GET['page'];\n }\n //If GET-parameter not transferred (*.php) current page 1\n } else {\n $current_page = 1;\n }\n //First element in table\n $start = ($current_page - 1) * $elements_per_page;\n //Amount received elements\n $amount = $elements_per_page;\n //Collection elements for current page\n if ($table_name == 'article_page') {\n $collection = get_article_records ($table_name, $start, $amount);\n } else if ($table_name == 'review_page') {\n $collection = get_review_records ($table_name, $start, $amount, $visible);\n } else if ($table_name == 'gallery_page') {\n $collection = get_gallery_records ($table_name, $start, $amount);\n }\n return $collection;\n }", "title": "" }, { "docid": "eb065c237e5a42e0c623571072417c8d", "score": "0.6594517", "text": "function nextPrevious ($begin, $numrows, $totalresults) {\n $thispage = $_SERVER['REQUEST_URI'];\n /** rebuilding the request **/\n\n /* remove begin parameter from url */\n $thispage = preg_replace('/\\??(&?begin=\\d+)/', '', $thispage);\n \n $base = round($begin / 500) * 500;\n\n print \"<div class='paginations'>\";\n if ($base > 499) {\n $base = $base - 250;\n\n // link to get back to first page\n print paginationElement($thispage,\n 0,\n $current_begin,\n $totalresults);\n print \" ... \";\n }\n\n $last_end = 0;\n for ($it = 0; $it <= 14; $it++) {\n $start = $it * 50 + $base;\n\n print paginationElement($thispage,\n $start, \n $begin,\n $totalresults);\n if ($start >= $totalresults - 50) {\n break;\n }\n print \" \";\n }\n\n if (($totalresults - $start) > 50) {\n print \" ... \";\n print paginationElement($thispage,\n floor($totalresults / 50) * 50,\n $begin,\n $totalresults);\n }\n print \"</div>\";\n}", "title": "" }, { "docid": "107aa761b6e6698769fa60659dc2b0cc", "score": "0.6589913", "text": "public function getPerPage();", "title": "" }, { "docid": "107aa761b6e6698769fa60659dc2b0cc", "score": "0.6589913", "text": "public function getPerPage();", "title": "" }, { "docid": "d1998d14be404d1934c88d6a984dfa0f", "score": "0.65887326", "text": "public function getPaginate(){ }", "title": "" }, { "docid": "5f9e5dd4d46c5c81ea517ef0fc8bd0c7", "score": "0.65854985", "text": "public function paginate($perPage = 5);", "title": "" }, { "docid": "1c1e7493c03f5da200159ba6bd9d22e6", "score": "0.65823334", "text": "function pag_rs($sql,$cfilas,$offset){\r\n //--- Ejecuci�n de la consulta ---\r\n/* if ($this->db->motor=='mssql'){\r\n $rs = $this->db->leer(\"SELECT @@version as sql_version\");\r\n $rs = $this->db->fetch_array($rs);\r\n if (strpos($rs[\"sql_version\"],\"6.50\")===false){\r\n $sql = \"SELECT top $cfilas \".substr($sql,6,strlen($sql));\r\n }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$rs = $this->db->leer($sql);\r\n mssql_data_seek($rs,$offset);\r\n }*/\r\n //if ($this->db->motor=='mysql'){\r\n $sql = \"$sql LIMIT $offset,$cfilas\";\r\n //die(printr($sql)); \r\n $rs = $this->db->leer($sql);\r\n\r\n //}\r\n /* if ($this->db->motor=='pg'){\r\n $sql = \"$sql LIMIT $cfilas OFFSET $offset\";\r\n $rs = $this->db->leer($sql);\r\n }*/\r\n //print $sql;\r\n return $rs;\r\n }", "title": "" }, { "docid": "baad813d4cde648ccd5fe0806f1df3b7", "score": "0.6578103", "text": "public function paginate($perPage);", "title": "" }, { "docid": "4f05dbebb7a7390595c754d466976712", "score": "0.6577114", "text": "function RenderPaging($in_totRecord,$in_recPerPage, $in_currPage = 1)\n {\n global $pagingMax;\n $selisih = 3;\n\n \n if ($in_currPage == 1) $strPaging .= \" First Prev \";\n else {\n $strPaging .= \"<A HREF=\\\"\".$this->_page.\"?currentPage=\".\"1\".\"&recPerPage=\".$in_recPerPage.$this->_newQString.\"\\\">First</A>\\n\";\n $strPaging .= \"<A HREF=\\\"\".$this->_page.\"?currentPage=\".($in_currPage - 1).\"&recPerPage=\".$in_recPerPage.$this->_newQString.\"\\\">Prev</A>\\n\";\n }\n $strPaging .= \" | \\n\";\n \n if (strtoupper($in_recPerPage) != \"ALL\") $pagingNum = ceil($in_totRecord/$in_recPerPage);\n else $pagingNum = 1;\n\n if($pagingNum <= $pagingMax) $atas = 1;\n else{\n $sisa = $in_currPage + $selisih; \n $sisa2 = $sisa - $pagingMax;\n if($sisa2 <= 0) $atas = 1;\n elseif($sisa<=$pagingNum) $atas = $sisa2 + 1; \n else $atas = $pagingNum - $pagingMax + 1;\n }\n\n if($pagingNum <= $pagingMax) $bawah = $pagingNum;\n else $bawah=($atas+$pagingMax-1);\n \n for ($i=$atas; $i<=$bawah; $i++) {\n if ($i == $in_currPage) $strPaging .= $i.\" \\n\"; \n else $strPaging .= \"<A HREF=\\\"\".$this->_page.\"?currentPage=\".$i.\"&recPerPage=\".$in_recPerPage.$this->_newQString.\"\\\">$i</A> \\n\" ;\n }\n $strPaging .= \" | \\n\";\n \n if ($in_currPage == $pagingNum || $in_totRecord == 0) $strPaging .= \"Next Last\\n\"; \n else {\n $strPaging .= \"<A HREF=\\\"\".$this->_page.\"?currentPage=\".($in_currPage + 1).\"&recPerPage=\".$in_recPerPage.$this->_newQString.\"\\\">Next</A>\\n\";\n $strPaging .= \"<A HREF=\\\"\".$this->_page.\"?currentPage=\".$pagingNum.\"&recPerPage=\".$in_recPerPage.$this->_newQString.\"\\\">Last</A>\\n\";\n }\n\n return $strPaging;\n }", "title": "" }, { "docid": "9968f5fae7a54368bf41be793450d024", "score": "0.6572342", "text": "protected function buildPagination()\n\t{\n\t\t\n\t\t$sidePageCount = intval($this->configuration['maximumVisiblePages']) >> 1;\n\n\t\t$firstPage = max($this->currentPage - $sidePageCount, 1);\n\t\t$lastPage = min($firstPage + $sidePageCount * 2, $this->numberOfPages);\n\t\t$firstPage = max($lastPage - $sidePageCount * 2, 1);\n\n\t\t$pages = array();\n\t\tforeach (range($firstPage, $lastPage) as $index) {\n\t\t\t$pages[] = array(\n\t\t\t\t'number' => $index,\n\t\t\t\t'isCurrent' => ($index === $this->currentPage)\n\t\t\t);\n\t\t}\n\n\t\t$pagination = array(\n\t\t\t'pages' => $pages,\n\t\t\t'current' => $this->currentPage,\n\t\t\t'numberOfPages' => $this->numberOfPages,\n\t\t\t'itemsPerPage' => $this->itemsPerPage,\n\t\t\t'firstPage' => 1,\n\t\t\t'lastPage' => $this->numberOfPages,\n\t\t\t'isFirstPage' => ($this->currentPage == 1),\n\t\t\t'isLastPage' => ($this->currentPage == $this->numberOfPages),\n\t\t\t'hasLessPages' => $firstPage > 2,\n\t\t\t'hasMorePages' => $lastPage + 1 < $this->numberOfPages\n\t\t);\n\n\t\treturn $this->addPreviousAndNextPage($pagination);\n\t}", "title": "" }, { "docid": "183558579823c3c87dabff32477c9762", "score": "0.65698904", "text": "public static function buildPagination($objectCollection = array(), $ormClassName, $filter = array(), $currentPage = 1, $perPage = 10) {\n\t \t$result = new Parameter();\n\n\t \t// Get total entity\n\t \t$query = self::ormFactory($ormClassName);\n\n\t \t// @codeCoverageIgnoreStart\n\t \tif ( ! empty($filter)) {\n\t \t\tforeach ($filter as $where) {\n\t\t\t\tif ( ! $where instanceof Parameter) {\n\t\t\t\t\t$where = new Parameter($where);\n\t\t\t\t}\n\n\t\t \t\t$query = self::filterQuery($query, $where);\n\t\t\t}\n\t \t}\n\n\t \t$totalCount = $query->count();\n\t \t$currentCount = count($objectCollection);\n\n\t \t$totalPage = (int) ceil($totalCount/$perPage);\n\t \t$previousPage = ($currentPage == 1) ? $currentPage : $currentPage-1;\n\t \t$nextPage = ($currentPage == $totalPage) ? $currentPage : $currentPage+1;\n\n\t \t// Building Page collection\n\t \t$pages = array();\n\t \t$maxPage = ($totalPage > 11) ? 11 : $totalPage;\n\t \t$medianPage = (($totalPage/2) > 6) ? 6 : 0;\n\n\t \tfor ($i=1; $i < ($maxPage+1); $i++) { \n\t \t\tif ($i == $medianPage) {\n\t\t \t\t$page = new Parameter(array(\n\t\t \t\t\t'number' => '...',\n\t\t \t\t\t'class' => ' ',\n\t\t \t\t));\n\t \t\t} elseif ($i > $medianPage && $maxPage < $totalPage) {\n\t \t\t\t$iRevert = ($totalPage+$i)-($totalPage/2);\n\t \t\t\t$page = new Parameter(array(\n\t\t \t\t\t'number' => $iRevert,\n\t\t \t\t\t'class' => ($iRevert == $currentPage) ? 'disabled' : ' ',\n\t\t \t\t));\n\t \t\t}else {\n\t \t\t\t$page = new Parameter(array(\n\t\t \t\t\t'number' => $i,\n\t\t \t\t\t'class' => ($i == $currentPage) ? 'disabled' : ' ',\n\t\t \t\t));\n\t \t\t}\n\n\t \t\t$pages[] = $page;\n\t \t}\n\t \t// @codeCoverageIgnoreEnd\n\n\t \t$result->set('data', $objectCollection);\n\t \t$result->set('pages', $pages);\n\t \t$result->set('currentPage', $currentPage);\n\t \t$result->set('previousPage', $previousPage);\n\t \t$result->set('nextPage', $nextPage);\n\t \t$result->set('totalPage', $totalPage);\n\t \t$result->set('currentCount', $currentCount);\n\t \t$result->set('totalCount', $totalCount);\n\t \t$result->set('totalText', ' '.$totalCount.' ');\n\n\t \treturn $result;\n\t }", "title": "" }, { "docid": "c512a5ba47557a6ad9a917cfcc28c0e0", "score": "0.65661514", "text": "function bbp_get_search_pagination_base()\n{\n}", "title": "" }, { "docid": "3d8bf78f6003c7ff214a6795e415a5f5", "score": "0.6554573", "text": "function findAllPaginated($perPage = 20);", "title": "" }, { "docid": "8217d01c002e46c945777a8c1e5a0793", "score": "0.65519005", "text": "function get_all_paginate() {\n\n $page = (isset($_REQUEST['page'])) ? $_REQUEST['page'] : '';\n $limit = (isset($_REQUEST['item_por_page'])) ? $_REQUEST['item_por_page'] : 50;\n $select_column = (isset($_REQUEST['select_column'])) ? $_REQUEST['select_column'] : '1';\n $order_column = (isset($_REQUEST['order_column'])) ? $_REQUEST['order_column'] : 'desc';\n $search = (isset($_REQUEST['search_column'])) ? $_REQUEST['search_column'] : '';\n $data = array(\n 'page' => $page,\n 'item_por_page' => $limit,\n 'select_column' => $select_column,\n 'order_column' => $order_column,\n 'search_column' => $search\n );\n\n $data = $this->app_roles_model->get_all_paginate($data);\n\n echo json_encode($data);\n }", "title": "" }, { "docid": "c7a7c4bfda8a497dca3055b042617986", "score": "0.6546182", "text": "protected function getPagination( )\n\t\t{\n\t\t\t$tr = new \\System\\XML\\DomObject( 'tr' );\n\n\t\t\t$td = new \\System\\XML\\DomObject( 'td' );\n\t\t\t$inc = 0;\n\t\t\tif( $this->valueField && $this->showList ) {\n\t\t\t\t$inc++;\n\t\t\t}\n\n\t\t\t$td->setAttribute( 'colspan', sizeof( $this->columns ) + $inc );\n\n\t\t\t$span = new \\System\\XML\\DomObject( 'span' );\n\t\t\t$span->setAttribute( 'class', 'pagination' );\n\n\t\t\t// prev\n\t\t\t$a = new \\System\\XML\\DomObject( 'a' );\n\t\t\t$a->nodeValue .= 'prev';\n\t\t\tif( $this->page > 1 )\n\t\t\t{\n\t\t\t\t$a->setAttribute( 'href', $this->getQueryString($this->getHTMLControlId().'__page='.($this->page-1).'&'.$this->getHTMLControlId().'__sort_by='.$this->sortBy.'&'.$this->getHTMLControlId().'__sort_order='.$this->sortOrder));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$a->setAttribute('class', 'disabled');\n\t\t\t}\n\t\t\t$span->addChild( $a );\n\t\t\t$span->addChild( new \\System\\XML\\TextNode(' '));\n\n\t\t\t// page jump\n\t\t\t$count = count($this->dataSource);\n\t\t\tfor( $page=1; $this->pageSize && (( $page * $this->pageSize ) - $this->pageSize ) < $count; $page++ )\n\t\t\t{\n\t\t\t\t$start = ((( $page * $this->pageSize ) - $this->pageSize ) + 1 );\n\n\t\t\t\tif( $page * $this->pageSize < $count )\n\t\t\t\t{\n\t\t\t\t\t$end = ( $page * $this->pageSize );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$end = $count;\n\t\t\t\t}\n\n\t\t\t\t// page select\n\t\t\t\tif( $this->page <> $page )\n\t\t\t\t{\n\t\t\t\t\t$a = new \\System\\XML\\DomObject( 'a' );\n\t\t\t\t\t$a->setAttribute( 'href', $this->getQueryString($this->getHTMLControlId().'__page='.$page.'&'.$this->getHTMLControlId().'__sort_by='.$this->sortBy.'&'.$this->getHTMLControlId().'__sort_order='.$this->sortOrder));\n\t\t\t\t\t$a->nodeValue .= $page;\n\t\t\t\t\t$span->addChild( $a );\n\t\t\t\t\t$span->addChild( new \\System\\XML\\TextNode(' '));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$a = new \\System\\XML\\DomObject( 'a' );\n\t\t\t\t\t$a->setAttribute( 'class', 'disabled' );\n\t\t\t\t\t$a->nodeValue .= $page;\n\t\t\t\t\t$span->addChild( $a );\n\t\t\t\t\t$span->addChild( new \\System\\XML\\TextNode(' '));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// next\n\t\t\t$a = new \\System\\XML\\DomObject( 'a' );\n\t\t\t$a->nodeValue .= 'next';\n\t\t\tif(( $this->page * $this->pageSize ) < $count && $this->pageSize )\n\t\t\t{\n\t\t\t\t$a->setAttribute( 'href', $this->getQueryString($this->getHTMLControlId().'__page='.($this->page+1).'&'.$this->getHTMLControlId().'__sort_by='.$this->sortBy.'&'.$this->getHTMLControlId().'__sort_order='.$this->sortOrder));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$a->setAttribute('class', 'disabled');\n\t\t\t}\n\t\t\t$span->addChild( $a );\n\t\t\t$span->addChild( new \\System\\XML\\TextNode(' '));\n\n\t\t\t$td->addChild( $span );\n\n\t\t\t// get page info\n\t\t\t$start = ((( $this->page * $this->pageSize ) - $this->pageSize ) + 1 );\n\t\t\tif( !$count ) $start = 0;\n\n\t\t\t$end = 0;\n\t\t\tif( $this->page * $this->pageSize < $count )\n\t\t\t{\n\t\t\t\t$end = ( $this->page * $this->pageSize );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$end = $count;\n\t\t\t}\n\n\t\t\t$span = new \\System\\XML\\DomObject( 'span' );\n\t\t\t$span->setAttribute('class', 'summary');\n\t\t\t$span->nodeValue .= \"showing {$start} to {$end} of \" . $count;\n\n\t\t\t$td->addChild( $span );\n\t\t\t$tr->addChild( $td );\n\n\t\t\treturn $tr;\n\t\t}", "title": "" }, { "docid": "1ec7172742595566de8197e597db08f9", "score": "0.654173", "text": "public function controlPagedResult($pageSize = 1000, $isCritical = false, $cookie = '');", "title": "" }, { "docid": "58dd4aee4124c42e11077ef1b9cc2edf", "score": "0.65416056", "text": "function ldap_control_paged_result($link, $pagesize, $iscritical = false, $cookie = '')\n{\n}", "title": "" }, { "docid": "f66ad1c183705958b27ce5082c64a996", "score": "0.65275943", "text": "function pagination(){\n\t$max_visible_links = 11;\n\t//Get number of buttons left and right of the active button\n\t//Round the fraction number to bottom\n\t$left_right_visible_buttons = floor($max_visible_links/2);\n\t//Get page number from URL Ex: /index.php?page=1\n\t//If page variable iss set and hold any value return the int value of page variable value else return 1 the default value\n\t$page_number = (isset($_GET['page']) && !empty($_GET['page'])) ? (int) $_GET['page'] : 1;\n\t//The number of records visible in each page\n\t$number_of_records_to_show = 10;\n\t//Total number of records available in the database table\n\t$total_number_of_records = 115;\n\t//Define the last page number: total number of records devided by number of record to show.\n\t$total_number_of_pages = ceil($total_number_of_records/$number_of_records_to_show);\n\t//Round up to top value to avoid fraction\n\t$last_page_number = $total_number_of_pages;\n\t//Set page number value minimum and maximum\n\t//if the page number is less than one: means 0 , -1 etc\n\tif ($page_number < 1) {\n\t\t//reset the page number value to 1\n\t\t$page_number = 1;\n\t} elseif ($page_number > $total_number_of_pages) {\n\t\t//reset the page number value to the total number of pages\n\t\t$page_number = $total_number_of_pages;\n\t}\n\t// SHowing the current page number out of total n umber of pages\n\techo \"Showing {$page_number} page / out of {$total_number_of_pages }<br>\";\n\t//To build the pagination links on the bottom\n\t$create_links = '';\n\t//The bootstrap html concatenated together\n\t$create_links .= '<nav aria-label=\"...\"><ul class=\"pagination\">';\n\t//Set the active links\n\t//If the following conditions satisfies\n\t//if the page number is always less than maximum visible links AND\n\t//if last page number is greater than equal to maximum visible links\n\techo $page_number. '<' . $max_visible_links.'<br>';\n\techo $total_number_of_pages. '=' . $max_visible_links.'<br>';\n\techo $total_number_of_pages. '>' . $max_visible_links.'<br>';\n\n\techo '----------------------------------ELSE----------------<br>';\n\techo $page_number. '>=' . $max_visible_links.'<br>';\n\techo $last_page_number. '>' . $max_visible_links.'<br>';\n\n\tif ($page_number < $max_visible_links AND ($total_number_of_pages == $max_visible_links OR $total_number_of_pages > $max_visible_links)) {\n\t\techo 'Kadannu'.'<br>';\n\t\t//Loop through the pages and create links\n\t\tfor ($i=1; $i<=$max_visible_links; $i++) {\n\t\t\tif ($i == $page_number) {\n\t\t\t\t$create_links .= '<li class=\"page-item active\">';\n \t$create_links .= '<a class=\"page-link\" href=\"index.php?page='.$page_number.'\">'.$page_number.'</a></li>';\n\t\t\t} else {\n\t\t\t\t$create_links .= '<li class=\"page-item\"><a class=\"page-link\" href=\"index.php?page='.$i.'\">'.$i.'</a></li>';\n\t\t\t}\n\t\t}\n\t\t//Visible next button if the total number is greater than maximum visible links\n\t\tif ($total_number_of_pages > $max_visible_links) {\n\t\t\t//The next page number\n\t\t\t$next_page_number = $max_visible_links+1;\n\t\t\t$create_links .= '<li class=\"page-item\"><a class=\"page-link\" href=\"index.php?page='.$next_page_number.'\">&raquo</a></li>';\n\t\t}\n\n\t}\n\telse if ($page_number >= $max_visible_links AND $last_page_number > $max_visible_links) {\n\t\techo 'Elsil Kadannu'.'<Br>';\n\t\tif ($page_number+$left_right_visible_buttons >= $last_page_number) {\n\t\t\t$previous_page_number = $max_visible_links-1;\n\t\t\t$create_links .= '<li class=\"page-item\"><a class=\"page-link\" href=\"index.php?page='.$previous_page_number.'\">&laquo</a></li>';\n\t\t\tfor ($i=($max_visible_links - $left_right_visible_buttons); $i<=$page_number + $left_right_visible_buttons; $i++) {\n\t\t\t\tif ($i == $page_number) {\n\t\t\t\t\t$create_links .= '<li class=\"page-item active\">';\n\t \t$create_links .= '<a class=\"page-link\" href=\"index.php?page='.$page_number.'\">'.$page_number.'</a></li>';\n\t\t\t\t} else {\n\t\t\t\t\t$create_links .= '<li class=\"page-item\"><a class=\"page-link\" href=\"index.php?page='.$i.'\">'.$i.'</a></li>';\n\t\t\t\t}\n\t\t\t}\n\t\t} else if($page_number+$left_right_visible_buttons < $last_page_number) {\n\t\t\t$create_links .= '<li class=\"page-item\"><a class=\"page-link\" href=\"index.php?page='.(($page_number - $left_right_visible_buttons) - 1).'\">&laquo</a></li>';\n\t\t}\n\n\t}\n\t$create_links .= '<nav><ul>';\n\techo $create_links;\n\n}", "title": "" }, { "docid": "2389a2ff8f23d1b227a870366d4fb8b1", "score": "0.65252423", "text": "function paging($count_data=false,$item_per_page=5){\n\t\n if (!$count_data) return false;\n // untuk memberikan nilai pada $page berdasarkan hasil GET pada variable page \n $page = isset($_GET['page']) ? $_GET['page'] : 1 ;\n \n // melakukan kondisi jika nilai $page kosong maka akan diberikan nilai 1 \n if( ( $page < 1) && (empty( $page ) ) ){\n $page=1;\n }\n // menghitung jumlah halaman yang akan dibuat \n $jumlah_hal = ceil($count_data/$item_per_page );\n \n // untuk membatasi agar nilai page tidak lebih besar dari jumlah halaman\n if( $page>$jumlah_hal ){\n $page=$jumlah_hal;\n } \n \n // menghitung nilai batas awal yang digunakan saat query nanti\n $batas = ($page - 1) * $item_per_page;\n \n // menyimpan semua dalam bentuk array kedalam $paging\n $paging['item_per_page']=$item_per_page;\n $paging['batas']=$batas;\n $paging['jumlah_hal']=$jumlah_hal;\n $paging['page']=$page;\n return $paging;\n}", "title": "" }, { "docid": "a27dce303142e9db7c797c1dbf88be79", "score": "0.65218693", "text": "function paginar($tipo,$qForPage,$indice){\n include(\"bd/conexion.php\");//inicia conexion\n \n mysqli_set_charset($conexion,'utf8');\n $contarPaginas=0;\n\n $query = \"select * \n from edicion e INNER JOIN publicacion p ON e.id_publicacion=p.id_publicacion\n where p.cod_estado=2 and p.tipo_publicacion='$tipo'\";\n\n $respuesta=mysqli_query($conexion,$query);\n $tuplasHalladas=mysqli_num_rows($respuesta);\n //inicio paginado\n $cantidadDePaginas = $tuplasHalladas/$qForPage;\n /*\n if(($tuplasHalladas%$qForPage)!=0){\n $cantidadDePaginas+=1;\n }\n */\n echo\"<div class='row'><div class='col-xs-12'><ul class='pagination pagination-sm'>\";\n\n if($indice>1)\n echo\"<li><a href='index.php?indice=\".($contarPaginas+1).\"&tipo=$tipo'><span aria-hidden='true'>&laquo;</span></a></li>\";\n\n while($contarPaginas<=($cantidadDePaginas)){\n if($contarPaginas==($indice-1)){\n echo\"<li class='active'><a href='index.php?indice=\".($contarPaginas+1).\"&tipo=$tipo'>\".($contarPaginas+1).\"</a></li>\";\n }\n else{\n echo\"<li><a href='index.php?indice=\".($contarPaginas+1).\"&tipo=$tipo'>\".($contarPaginas+1).\"</a></li>\";\n }\n $contarPaginas+=1; \n }\n if($cantidadDePaginas<($indice-1))\n echo\"<li><a href='index.php?indice=\".($contarPaginas+1).\"&tipo=$tipo'><span aria-hidden='true'>&raquo;</span></a></li>\";\n\n echo\"</ul></div></div>\";\n mysqli_close($conexion);\n //finaliza el paginado\n }", "title": "" }, { "docid": "9cc14e5acc0994eb96a45afc8683ef8c", "score": "0.65214765", "text": "function pagination($sqlPagination, $data_per_halaman, $pagination, $url) {\n\n\t\t$total_data \t\t\t=\tmysqli_num_rows($sqlPagination);\n\t\t$total_halaman \t\t\t=\tceil($total_data / $data_per_halaman);\n\t\t$batas_nomor \t\t\t=\t2;\n\t\t$batas_maksimal_nomor\t=\t5;\n\t\t$mulai_nomor \t\t\t=\t1;\n\t\t$batas_akhir_nomor \t\t=\t$total_halaman;\n\n\t\techo \t\"<div class='pagination'>\";\n\n\t\tif ($pagination > 1) {\n\n\t\t\t$sebelumnya =\t$pagination - 1;\n\n\t\t\techo \t\"\n\t\t\t\t\t\t<a href='\".base_url.\"$url&pagination=$sebelumnya'>Sebelumnya</a>\n\t\t\t\t\t\";\n\n\t\t} # if ($pagination > 1)\n\n\t\tif ($total_halaman >= $batas_maksimal_nomor) {\n\n\t\t\tif ($pagination > $batas_nomor) {\n\n\t\t\t\t$mulai_nomor\t=\t$pagination - ($batas_nomor - 1);\n\n\t\t\t} # if ($pagination > $batas_nomor)\n\n\t\t\t$batas_akhir_nomor\t=\t($mulai_nomor - 1) + $batas_maksimal_nomor;\n\n\t\t\tif ($batas_akhir_nomor > $total_halaman) {\n\n\t\t\t\t$batas_akhir_nomor\t=\t$total_halaman;\n\n\t\t\t} # if ($batas_akhir_nomor > $total_halaman)\n\n\t\t} # if ($total_halaman >= $batas_maksimal_nomor)\n\n\t\tfor ($i=$mulai_nomor; $i<=$batas_akhir_nomor; $i++) { \n\n\t\t\tif ($pagination==$i) {\n\n\t\t\t\techo \t\"\n\t\t\t\t\t\t\t<a class='active'>\n\t\t\t\t\t\t\t\t$i\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\";\n\n\t\t\t} # if ($pagination==$i)\n\n\t\t\telse {\n\n\t\t\t\techo \t\"\n\t\t\t\t\t\t\t<a href='\".base_url.\"$url&pagination=$i'>\n\t\t\t\t\t\t\t\t$i\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\";\n\n\t\t\t} # else ($pagination==$i)\n\n\t\t} # for ($i=$mulai_nomor; $i<=$batas_akhir_nomor; $i++)\n\n\t\tif ($pagination < $total_halaman) {\n\n\t\t\t$selanjutnya\t=\t$pagination + 1;\n\n\t\t\techo \t\"\n\t\t\t\t\t\t<a href='\".base_url.\"$url&pagination=$selanjutnya'>Selanjutnya</a>\n\t\t\t\t\t\";\n\n\t\t} # if ($pagination < $total_halaman)\n\n\t\techo \t\"</div>\";\n\n\t}", "title": "" }, { "docid": "1cc6890e07e400f595e99b4082ae9cfe", "score": "0.65210956", "text": "function prt_search_result_type1($hits, $query, $page_size) {\r\n\r\n\t$result_count = 0;\r\n\r\n\tforeach ($hits['hits'] as $list) {\r\n\t\t$print_price = '';\r\n\t\t$item = $list['_source'];\r\n\t\t$title = $item['title'];\r\n\t\t$link = $item['link'];\r\n\t\t$brand = $item['brand'];\r\n\t\t$thumb = $item['thumb'];\r\n\t\t$cp_name = $item['cp'];\r\n\t\t$price_sale = $item['price_sale'];\r\n\t\t$price_org = $item['price_org'];\r\n\t\t$cmt = $item['cmt'];\r\n\r\n\t\t// 검색결과 몇건을 받았는지 count.\r\n\t\t$result_count++;\r\n\r\n\t\t// cp name\r\n\t\t$t_cpname = get_cpname($cp_name);\r\n\r\n\t\t// remove special char brand.\r\n\t\t$t_brand = rm_str($brand);\r\n\r\n\t\t// price.\r\n if (intval($price_sale) != 0 AND intval($price_org) != 0) {\r\n $print_price = '<h4><del><small>' . $price_org . '</small></del> -> <strong class=\"text-danger\">' . $price_sale . '</strong></h4>';\r\n } else if (intval($price_sale) == 0 AND intval($price_org) != 0) {\r\n $print_price = ' <h4><strong class=\"text-danger\">' .$price_org. '</strong></h4>';\r\n } else if (intval($price_sale) != 0 AND intval($price_org) == 0) {\r\n $print_price = ' <h4><strong class=\"text-danger\">' . $price_sale . '</strong></h4>';\r\n } else {\r\n $print_price = \"확인필요\";\r\n }\r\n\r\n\t\techo '\r\n\t\t\t<!-- Project One -->\r\n\t\t\t<div class=\"row\">\r\n\t\t\t\t<div class=\"col-md-7\">\r\n\t\t\t\t<!-- <a href=\"'.$link.'\" target=\"_new\"> -->\r\n\t\t\t\t\t<img class=\"img-responsive\" src=\"'.$thumb.'\" alt=\"'.$title.'\">\r\n\t\t\t\t\t<!-- </a> -->\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div class=\"col-md-4\">\r\n\t\t\t\t\t<h4>'.$title.'</h4>\r\n\t\t\t\t\t<a href=\"./search.php?q='.$query.' '. $t_brand.'&from=0&size='.$page_size.'&cp='.$cp_name.'\"> \r\n\t\t\t\t\t\t<span class=\"label label-default\">'.$brand.'</span>\r\n\t\t\t\t\t</a>\r\n\t\t\t\t\t<a href=\"./search.php?q='.$query.'&from=0&size='.$page_size.'&cp='.$cp_name.'\"> \r\n\t\t\t\t\t\t<span class=\"label label-warning\">'.$t_cpname.'</span>\r\n\t\t\t\t\t</a>\r\n\t\t\t';\r\n\t\t// -- echo\r\n\r\n\t\techo $print_price;\r\n\r\n\t\techo '\r\n\t\t\t<a class=\"btn btn-primary\" href=\"'.$link.'\" target=\"_new\"> 상품 보러 가기 <span class=\"glyphicon glyphicon-chevron-right\"></span></a>\r\n\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<!-- /.row -->\r\n\r\n\t\t\t<hr>\r\n\t\t\t';\r\n\t\t// -- echo.\r\n\t}\r\n\t// -- forearch.\r\n\r\n\treturn $result_count;\r\n}", "title": "" }, { "docid": "cec01386065efb8360d2ecb2617d548b", "score": "0.6517089", "text": "function __construct() {\n $this->results = [];\n $this->currentPage = 0;\n }", "title": "" }, { "docid": "5dae47959dadd8767cab1b207f6847f5", "score": "0.65151113", "text": "public function pages()\n {\n if (empty($this->currentPage)) {\n return array();\n }\n\n $pagination = array();\n\n // if the found rows is less than the required amount, it only contain one page\n if ($this->totalCount < $this->limit) {\n $pagination[] = new Page(true, 1, '1');\n return $pagination;\n }\n\n // find out total pages\n $totalPages = ceil($this->totalCount / $this->limit);\n\n // if not on page 1, don't show back links\n if ($this->currentPage > 1) {\n // show << link to go back to page 1\n $pagination[] = new Page(false, 1, '<<');\n // get previous page num\n $previousPage = $this->currentPage - 1;\n // show < link to go back to 1 page\n $pagination[] = new Page(false, $previousPage, '<');\n }\n\n // loop to show links to range of pages around current page\n for ($pageNumber = ($this->currentPage - $this->visiblePaginationRange);\n $pageNumber < (($this->currentPage + $this->visiblePaginationRange) + 1);\n $pageNumber++\n ) {\n if (($pageNumber > 0) && ($pageNumber <= $totalPages)) {\n if ($pageNumber == $this->currentPage) {\n $pagination[] = new Page(true, $pageNumber, $pageNumber);\n } else {\n $pagination[] = new Page(false, $pageNumber, $pageNumber);\n }\n }\n }\n\n // if not on last page, show forward and last page links\n if ($this->currentPage != $totalPages) {\n $nextPage = $this->currentPage + 1;\n $pagination[] = new Page(false, $nextPage, '>');\n $pagination[] = new Page(false, $totalPages, '>>');\n }\n\n return $pagination;\n }", "title": "" }, { "docid": "ab4ffcf3c4ae31b9c926de6d7dfe527e", "score": "0.6509963", "text": "function advancedResults() {\r\n\t\t\r\n\t\t$this->validate();\r\n\t\t$this->setupTemplate(true);\r\n\t\t\t\t\r\n\t\t$query = Request::getUserVar('query');\r\n\t\t\r\n\t\t$fromDate = Request::getUserVar('dateFrom');\r\n\t\tif(!$fromDate) $fromDate = Request::getUserDateVar('dateFrom', 1, 1);\r\n\r\n\t\t$toDate = Request::getUserVar('dateTo');\t\t\r\n if(!$toDate) $toDate = Request::getUserDateVar('dateTo', 1, 12, null, 23, 59, 59);\r\n\r\n $country = Request::getUserVar('proposalCountry');\r\n\r\n\t\t$status = Request::getUserVar('status');\r\n\r\n $trialSite = Request::getUserVar('trialSite');\r\n\t\t\r\n\t\t$rangeInfo =& Handler::getRangeInfo('search');\r\n\t\t\r\n\t\t$sort = Request::getUserVar('sort');\r\n\t\t$sort = isset($sort) ? $sort : 'title';\r\n\t\t\r\n\t\t$sortDirection = Request::getUserVar('sortDirection');\r\n\t\t$sortDirection = (isset($sortDirection) && ($sortDirection == SORT_DIRECTION_ASC || $sortDirection == SORT_DIRECTION_DESC)) ? $sortDirection : SORT_DIRECTION_ASC;\r\n\r\n\t\t$templateMgr =& TemplateManager::getManager();\r\n\t\t\r\n\t\t$templateMgr->assign('dateFrom', $fromDate);\r\n\t\t$templateMgr->assign('dateTo', $toDate);\r\n \r\n if ($fromDate == '--') $fromDate = null;\r\n if ($toDate == '--') $toDate = null; \r\n if ($fromDate !== null) $fromDate = date('Y-m-d H:i:s', $fromDate);\r\n\t\tif ($toDate !== null) $toDate = date('Y-m-d H:i:s', $toDate);\r\n \r\n\t\t$articleDao =& DAORegistry::getDAO('ArticleDAO');\r\n $extraFieldDao =& DAORegistry::getDAO('ExtraFieldDAO');\r\n $articleDetailsDao =& DAORegistry::getDAO('ArticleDetailsDAO');\r\n\t\t$trialSiteDao =& DAORegistry::getDAO('TrialSiteDAO');\r\n\t\t$results =& $articleDao->searchProposalsPublic($query, $fromDate, $toDate, $country, $status, $trialSite, $rangeInfo, $sort, $sortDirection);\r\n\r\n\t\t$templateMgr->assign('formattedDateFrom', $fromDate);\r\n\t\t$templateMgr->assign('formattedDateTo', $toDate);\r\n $templateMgr->assign('recruitmentStatusMap', $articleDetailsDao->getRecruitmentStatusMap());\r\n\t\t$templateMgr->assign('statusFilter', $status);\r\n\t\t$templateMgr->assign('trialSite', $trialSite); \r\n\t\t$templateMgr->assign_by_ref('results', $results);\r\n\t\t$templateMgr->assign('query', $query);\r\n\t\t$templateMgr->assign('region', $country);\r\n $extraField =& $extraFieldDao->getExtraField($country);\r\n\t\t$templateMgr->assign('country', (isset($extraField) ? $extraField->getLocalizedExtraFieldName() : null));\r\n\t\t$templateMgr->assign('countryCode', $country);\r\n $templateMgr->assign('proposalCountries', $extraFieldDao->getExtraFieldsList(EXTRA_FIELD_GEO_AREA));\t\r\n $templateMgr->assign('sitesList', $trialSiteDao->getTrialSitesList());\t\r\n\t\t$templateMgr->assign('sort', $sort);\r\n\t\t$templateMgr->assign('sortDirection', $sortDirection);\r\n\r\n\t\t$templateMgr->assign('count', $results->getCount());\t\t\r\n\t\t\r\n\t\t$templateMgr->assign('dateFrom', $fromDate);\r\n\t\t$templateMgr->assign('dateTo', $toDate);\r\n \r\n \r\n\t\t$templateMgr->display('search/searchResults.tpl');\r\n\t}", "title": "" }, { "docid": "0c1b1eb77c8d1e584c3f82800b960549", "score": "0.650933", "text": "function get_pagination($tblname,$whereqry,$passurl,$limit,$targetpage)\n{\n\tglobal $db;\n/* \n\t First get total number of rows in data table. \n\t If you have a WHERE clause in your query, make sure you mirror it here.\n\t*/\n\t$query = \"SELECT COUNT(*) as num FROM $tblname WHERE $whereqry\";\n\t\n\t $total_pages = @mysql_fetch_array(mysql_query($query));\n $total_pages = $total_pages[num];\n\t\n\t\n\t// $total_pages \t\t = $db->select_data($total_pages);\n\t// $tour_title \t = $total_pages[0]['tour_title']; \n\t// $tour_image \t = $total_pages[0]['image'];\n\t// $all_img \t = explode(\",\", $tour_image);\n\t// $tot_img \t = count($all_img);\n\t// $first_img \t = $all_img[0]; \n// \t\n\t// $adult_price \t = $total_pages[0]['adult_price'];\n\t// $child_price \t = $total_pages[0]['child_price'];\n// \t\n// if($lang_code=='en')\n // {\t\n\t// $tour_duration \t = $total_pages[0]['duration'];\n\t// $tour_date \t = $total_pages[0]['tour_date']; \n \t// $info \t = $total_pages[0]['info'];\n\t// $tour_highlight = $total_pages[0]['tour_highlight']; \n\t// $inclusions \t = $total_pages[0]['inclusions'];\n\t// $exclusions \t = $total_pages[0]['exclusions'];\n\t// $notes \t = $total_pages[0]['notes'];\n\t// $redem_ins \t = $total_pages[0]['redmptn_instrn'];\n\t// $departure_pt \t = $total_pages[0]['departure_point'];\n // }\n// \t\n // else if($lang_code=='spn')\n // {\n// \t\n\t// $tour_duration \t = $total_pages[0]['spn_duration'];\n\t// $tour_date \t = $total_pages[0]['spn_tour_date']; \n \t// $info \t = $total_pages[0]['spn_info'];\n\t// $tour_highlight = $total_pages[0]['spn_tour_highlight'];\n \t// $inclusions \t = $total_pages[0]['spn_inclusions'];\n\t// $exclusions \t = $total_pages[0]['spn_exclusions'];\n\t// $notes \t = $total_pages[0]['spn_notes'];\n\t// $redem_ins \t = $total_pages[0]['spn_redmptn_instrn'];\n\t// $departure_pt \t = $total_pages[0]['spn_departure_point'];\n // }\n// \t \n\t/* Setup vars for query. */\n\t//$targetpage = \"tour.php\"; \t//your file name (the name of this file)\n\t//$limit =2; \t\t\t\t\t\t\t\t//how many items to show per page\n\t$page1 = $_GET['page'];\n\tif($page1) \n\t\t$start = ($page1 - 1) * $limit; \t\t\t//first item to display on this page\n\telse\n\t\t$start = 0;\t\t\t\t\t\t\t\t//if no page var is given, set start to 0\n\t\n\n $sql = \"SELECT * FROM $tblname WHERE $whereqry LIMIT $start, $limit\";\n\n\t$result3 =$db->select_data($sql);\n\t/* Setup page vars for display. */\n\tif($page1 == 0) $page1 = 1;\t\t\t\t\t//if no page var is given, default to 1.\n\t$prev = $page1 - 1;\t\t\t\t\t\t\t//previous page is page - 1\n\t$next = $page1 + 1;\t\t\t\t\t\t\t//next page is page + 1\n $lastpage = ceil($total_pages/$limit);\t\t//lastpage is = total pages / items per page, rounded up.\n\t$lpm1 = $lastpage - 1;\t\t\t\t\t\t//last page minus 1\n\t\n\t/* \n\t\tNow we apply our rules and draw the pagination object. \n\t\tWe're actually saving the code to a variable in case we want to draw it more than once.\n\t*/\n $pagination = \"\";\n\tif($lastpage > 1)\n\t{\t\n\t\t$pagination .= \"<div class=\\\"pagination\\\">\";\n\t\t//previous button\n\t\tif ($page1 > 1) \n\t\t\tif($show==\"\")\n\t\t\t{\n\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$prev$passurl\\\">previous</a>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?show=$show&page=$prev$passurl\\\">previous </a>\";\n\t\t\t}\n\t\telse\n\t\t\t$pagination.= \"<span class=\\\"disabled\\\">previous </span>\";\t\n\t\t\n\t\t//pages\t\n\t\tif ($lastpage < 7 + ($adjacents * 2))\t//not enough pages to bother breaking it up\n\t\t{\t\n\t\t\tfor ($counter = 1; $counter <= $lastpage; $counter++)\n\t\t\t{\n\t\t\t\tif ($counter == $page1)\n\t\t\t\t\t$pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n\t\t\t\telse\n\t\t\t\t\tif($show==\"\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$counter$passurl\\\">$counter</a>\";\n\t\t\t\t\t}\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?show=$show&page=$counter$passurl\\\">$counter</a>\";\n\t\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telseif($lastpage > 5 + ($adjacents * 2))\t//enough pages to hide some\n\t\t{\n\t\t\t//close to beginning; only hide later pages\n\t\t\tif($page1 < 1 + ($adjacents * 2))\t\t\n\t\t\t{\n\t\t\t\tfor ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif ($counter == $page1)\n\t\t\t\t\t\t$pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n\t\t\t\t\telse\n\t\t\t\t\t\tif($show==\"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$counter$passurl\\\">$counter</a>\";\n\t\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$pagination.= \"<a href=\\\"$targetpage?show=$show&page=$counter$passurl\\\">$counter</a>\";\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$pagination.= \"...\";\n\t\t\t\tif($show==\"\")\n\t\t\t\t{\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$lpm1$passurl\\\">$lpm1</a>\";\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$lastpage$passurl\\\">$lastpage</a>\";\n\t\t\t\t}\t\t\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?show=$show&page=$lpm1$passurl\\\">$lpm1</a>\";\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?show=$show&page=$lastpage$passurl\\\">$lastpage</a>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t//in middle; hide some front and some back\n\t\t\telseif($lastpage - ($adjacents * 2) > $page1 && $page1 > ($adjacents * 2))\n\t\t\t{\n\t\t\t\tif($show==\"\")\n\t\t\t\t{\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=1$passurl\\\">1</a>\";\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=2$passurl\\\">2</a>\";\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?show=$show&page=1$passurl\\\">1</a>\";\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?show=$show&page=2$passurl\\\">2</a>\";\n\t\t\t\t}\n\t\t\t\t$pagination.= \"...\";\n\t\t\t\tfor ($counter = $page1 - $adjacents; $counter <= $page1 + $adjacents; $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page1)\n\t\t\t\t\t\t$pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n\t\t\t\t\telse\n\t\t\t\t\t\tif($show==\"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$counter$passurl\\\">$counter</a>\";\n\t\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$pagination.= \"<a href=\\\"$targetpage?show=$show&page=$counter$passurl\\\">$counter</a>\";\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$pagination.= \"...\";\n\t\t\t\tif($show==\"\")\n\t\t\t\t{\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$lpm1$passurl\\\">$lpm1</a>\";\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$lastpage$passurl\\\">$lastpage</a>\";\n\t\t\t\t}\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?show=$show&page=$lpm1$passurl\\\">$lpm1</a>\";\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?show=$show&page=$lastpage$passurl\\\">$lastpage</a>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t//close to end; only hide early pages\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($show==\"\")\n\t\t\t\t{\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=1$passurl\\\">1</a>\";\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=2$passurl\\\">2</a>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?show=$show&page=1$passurl\\\">1</a>\";\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?show=$show&page=2$passurl\\\">2</a>\";\n\t\t\t\t}\n\t\t\t\t$pagination.= \"...\";\n\t\t\t\tfor ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page1)\n\t\t\t\t\t\t$pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n\t\t\t\t\telse\n\t\t\t\t\t\tif($show==\"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$counter$passurl\\\">$counter</a>\";\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$pagination.= \"<a href=\\\"$targetpage?show=$show&page=$counter$passurl\\\">$counter</a>\";\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//next button\n\t\tif ($page1 < $counter - 1) \n\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$next$passurl\\\">next</a>\";\n\t\telse\n\t\t\t$pagination.= \"<span class=\\\"disabled\\\">next</span>\";\n\t\t $pagination.= \"</div>\\n\";\t\t\n\t\n\t}\n\n/**** End ****/\t \n return array($pagination,$result3);\t\n}", "title": "" }, { "docid": "10bcee80d7f409bd89a871e21845b644", "score": "0.6495945", "text": "public function getPaginator();", "title": "" }, { "docid": "083c679dcace6e34ceff14f6bd1cacfb", "score": "0.64880604", "text": "function get_page_result() {\n\t\t$start = $this->set_page() * $this->rows_on_page;\n\t\t$diff = $this->get_total_rows() - $start;\n\t\t$end = ($diff < $this->rows_on_page) ? $diff : $this->rows_on_page;\n\t\t$page_sql = sprintf(\"%s LIMIT %s, %s\", $this->sql, $start, $end);\n\t\t$this->result = mysql_query($page_sql);\n\t\treturn $this->result;\n\t}", "title": "" }, { "docid": "9f02ffcecdc787998adbc3c65df03193", "score": "0.64847845", "text": "public function paginateIf($records, $per_page = 0);", "title": "" }, { "docid": "264c881f3080957f6db0860444575b4c", "score": "0.6484511", "text": "private function pagination() {\n\t\t$this->line(\"Page: <fg=green>\" . $this->page['current'] . \" of \" . $this->page['total'] . \"</>\");\n\t\t$this->line(\"Page size: <fg=green>\" . $this->page['size'] . \"</>\");\n\t}", "title": "" }, { "docid": "18fb6b164a22736ad87d311980eb4b0f", "score": "0.64823556", "text": "function doPagination(Database $db, $sql, $numResults, &$pagActual, &$numPags, &$totalRes=null) {\n //saco el numero de resultados total\n $totalRes = count($db->loadObjectList($sql));\n $numPags = ceil($totalRes / $numResults);\n if ($pagActual >= $numPags)\n $pagActual = $numPags;\n $lmin = ($pagActual - 1) * $numResults;\n $lmin=($lmin<0?0:$lmin);\n $lmax = $numResults;\n //saco los resultados de la paginacion\n $res= $db->loadObjectList($sql . \" limit \" . $lmin . \",\" . $lmax);\n echo $db->getErrorMsg();\n return $res;\n }", "title": "" }, { "docid": "d0f43b817b968bbcaf43d2445ecd0c2a", "score": "0.6478943", "text": "function pager($range = PAGINATION_RANGE, $pages = 'total', $prevnext = TRUE, $prevnext_always = FALSE, $firstlast = TRUE, $firstlast_always = FALSE) {\n extract( $this->kernel->params );\n $result_array = array();\n\n $total_items = $result_array[\"total_items\"] = $this->filter[\"total_items\"];\n $per_page = $this->filter[\"per_page\"];\n $start = $this->filter[\"start\"];\n\n // First, check on a few parameters to see if they're ok, we don't want negatives\n $total_items = ($total_items < 0) ? 0 : $total_items;\n $per_page = ($per_page < 1) ? 1 : $per_page;\n $range = ($range < 1) ? 1 : $range;\n $sel_page = 1;\n\n $float_val = $total_items / $per_page;\n $int_val = (int) $float_val;\n $reminder = $float_val - $int_val;\n $last_page_calc = round( $per_page * $reminder);\n $total_pages = $int_val + ($last_page_calc >= 1 ? 1 : 0);\n\n // Are there more than one pages to show? If not, this section will be skipped,\n // and only the pages_text will be shown\n if ($total_pages > 1) {\n // The page we are on\n $sel_page = round($start / $per_page) + 1;\n\n // The ranges indicate how many pages should be displayed before and after\n // the selected one. Here, it will check if the range is an even number,\n // and adjust the ranges appropriately. It will behave best on non-even numbers\n $range_min = ($range % 2 == 0) ? ($range / 2) - 1 : ($range - 1) / 2;\n $range_max = ($range % 2 == 0) ? $range_min + 1 : $range_min;\n $page_min = $sel_page - $range_min;\n\n $page_max = $sel_page + $range_max;\n\n // This parts checks whether the ranges are 'out of bounds'. If we're at or near\n // the 'edge' of the pagination, we will start or end there, not at the range\n $page_min = ($page_min < 1) ? 1 : $page_min;\n $page_max = ($page_max < ($page_min + $range - 1)) ? $page_min + $range - 1 : $page_max;\n if ($page_max > $total_pages) {\n $page_min = ($page_min > 1) ? $total_pages - $range + 1 : 1;\n $page_min = ($page_min < 1) ? 1 : $page_min;\n $page_max = $total_pages;\n }\n\n // Build the links\n for ($i = $page_min;$i <= $page_max;$i++)\n $result_array[\"pages\"][] = array( (($i - 1) * $per_page), $i );\n\n // Do we got previous and next links to display?\n if (($prevnext) || (($prevnext) && ($prevnext_always))) {\n // Aye we do, set what they will look like\n $prev_num = (($prevnext === 'num') || ($prevnext === 'nump')) ? $sel_page - 1 : '';\n $next_num = (($prevnext === 'num') || ($prevnext === 'numn')) ? $sel_page + 1 : '';\n\n // Display previous link?\n if (($sel_page > 1) || ($prevnext_always)) {\n $start_at = ($sel_page - 2) * $per_page;\n $start_at = ($start_at < 0) ? 0 : $start_at;\n $result_array[\"prev_page\"] = $start_at;\n }\n // Next link?\n if (($sel_page < $total_pages) || ($prevnext_always)) {\n $start_at = $sel_page * $per_page;\n $start_at = ($start_at >= $total_items) ? $total_items - $per_page : $start_at;\n $result_array[\"next_page\"] = $start_at;\n }\n }\n\n // This part is just about identical to the prevnext links, just a few minor\n // value differences\n if (($firstlast) || (($firstlast) && ($firstlast_always))) {\n $first_num = (($firstlast === 'num') || ($firstlast === 'numf')) ? 1 : '';\n $last_num = (($firstlast === 'num') || ($firstlast === 'numl')) ? $total_pages : '';\n\n $first_txt = sprintf($first_txt, $first_num);\n $last_txt = sprintf($last_txt, $last_num);\n\n if ((($sel_page > ($range - $range_min)) && ($total_pages > $range)) || ($firstlast_always))\n $result_array[\"first_page\"] = 0;\n\n if ((($sel_page < ($total_pages - $range_max)) && ($total_pages > $range)) || ($firstlast_always))\n $result_array[\"last_page\"] = ($total_pages - 1) * $per_page;\n\n }\n }\n\n // Display pages text?\n if ($pages) {\n $result_array[\"total_pages\"] = $total_pages;\n $result_array[\"selected_page\"] = $sel_page;\n }\n\n return $result_array;\n\n }", "title": "" }, { "docid": "f41502b8cfa23c9acff2fc3989e76053", "score": "0.6471309", "text": "public function pagination($count,$page,$page_offset)\n { \n $total_page = ceil($count/$page_offset);\n $response = Array();\n \n if ($total_page <= 10) { //On gère les cas où il y a maximum 10 pages de programmes\n for ($i = 1;$i <= $total_page; $i++) {\n $response[$i]= true;\n }\n } else { // On gère les cas où il y a au moins 11 pages de programmes\n $dizaine_inf = floor($page/10)*10;\n $dizaine_inf_tot = floor($total_page/10)*10;\n \n for ($i = 1; $i <= $total_page; $i++) {\n if ($page == 1 || $page%10 == 0) {\n if ($i == 1 || $i == $page) {\n $response[$i] = true;\n } else if ($i > $dizaine_inf &&\n $i == $dizaine_inf + 11 &&\n $i == $dizaine_inf_tot+1 &&\n $dizaine_inf_tot+1 != $page) {\n $response[$i] = null;\n } else if ($i%10 == 0 && $i > $dizaine_inf) {\n if ($page == 1) {\n $response[$i] = true;\n } else {\n $response[$i] = false;\n }\n } else if ($i > $dizaine_inf && $i <= $dizaine_inf + 9) {\n $response[$i] = true;\n } \n } else {\n if ($i%10 == 0 || $i == 1) {\n $response[$i] = true;\n } else if ($i > $dizaine_inf && $i == $dizaine_inf + 11 && $i == $dizaine_inf_tot+1 && $dizaine_inf_tot+1 != $page) {\n $response[$i] = null;\n } else if ($i > $dizaine_inf && $i <= $dizaine_inf + 9) {\n $response[$i] = false;\n }\n }\n } \n }\n\t\t\treturn $response;\n }", "title": "" }, { "docid": "7b0bdde5fb835f91be698ff1b5dff666", "score": "0.64542663", "text": "function pagination($per_page = 10, $page = 1, $url = '', $total)\n\t\t{ \n\t\t \n\t\t\t$adjacents = \"2\";\n\t\t\n\t\t\t$page = ($page == 0 ? 1 : $page);\n\t\t\t$start = ($page - 1) * $per_page; \n\t\t\t\n\t\t\t$prev = $page - 1; \n\t\t\t$next = $page + 1;\n\t\t\t$lastpage = ceil($total/$per_page);\n\t\t\t$lpm1 = $lastpage - 1;\n\t\t\t$nextlink='';\n\t\t\t$pagination = '<div class=\"clr\"></div><div class=\"pagination_block\">';\n\t\t\t$prevpage='';\n\t\t\t//echo $page;\n\t\t\tif ($page>1){\n\t\t\t\t$prevpage= \"<li><a href='{$url}$prev'>Previous</a></li>\";\n\t\t\t // $pagination.= \"<li><a href='{$url}$lastpage'>Last</a></li>\";\n\t\t\t}\n\t\t\tif($lastpage > 1)\n\t\t\t{ \t\n\t\t\t\t$pagination .='<div class=\"pagination\"><ul>';\n\t\t\t\t$pagination .= $prevpage;\t\t\n\t\t\t\tif ($lastpage < 7 + ($adjacents * 2))\n\t\t\t\t{ \n\t\t\t\t\tfor ($counter = 1; $counter <= $lastpage; $counter++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t\t$pagination.= \"<li><span class='active'>$counter</span></li>\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}$counter'>$counter</a></li>\"; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif($lastpage > 5 + ($adjacents * 2))\n\t\t\t\t{\n\t\t\t\t\tif($page < 1 + ($adjacents * 2)) \n\t\t\t\t\t{\n\t\t\t\t\t\tfor ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t\t\t$pagination.= \"<li><span class='active'>$counter</span></li>\";\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}$counter'>$counter</a></li>\"; \n\t\t\t\t\t\t}\n\t\t\t\t\t\t$pagination.= \"<li><span>...</span></li>\";\n\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}$lpm1'>$lpm1</a></li>\";\n\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}$lastpage'>$lastpage</a></li>\"; \n\t\t\t\t\t}\n\t\t\t\t\telseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2))\n\t\t\t\t\t{\n\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}1'>1</a></li>\";\n\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}2'>2</a></li>\";\n\t\t\t\t\t\t$pagination.= \"<li><span>...</span><li>\";\n\t\t\t\t\t\tfor ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t\t\t$pagination.= \"<li><span class='active'>$counter</span></li>\";\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}$counter'>$counter</a></li>\"; \n\t\t\t\t\t\t}\n\t\t\t\t\t\t$pagination.= \"<li><span>...</span></li>\";\n\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}$lpm1'>$lpm1</a></li>\";\n\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}$lastpage'>$lastpage</a></li>\"; \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$pagination.= \"<li><a href='{$url}1'>1</a></li>\";\n\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}2'>2</a></li>\";\n\t\t\t\t\t\t$pagination.= \"<li><span>...</span><li>\";\n\t\t\t\t\t\tfor ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t\t\t$pagination.= \"<li><span class='active'>$counter</span></li>\";\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}$counter'>$counter</a></li>\"; \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($page < $counter - 1){\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}$next'>Next</a></li>\";\n\t\t\t\t\t//$pagination.= \"<li><a href='{$url}$lastpage'>Last</a></li>\";\n\t\t\t\t}else{\n\t\t\t\t\t//$pagination.= \"<li><a class='current'>Next</a></li>\";\n\t\t\t\t\t//$pagination.= \"<li><a class='current'>Last</a></li>\";\n\t\t\t\t}\n\t\t\t\t$pagination .='</ul></div>';\n\t\t\t} \n\t\t\t\t \n\t\t\t$pagination .= '</div>'; $pagination.='</div>';\n\t\t\treturn $pagination;\n\t\t}", "title": "" }, { "docid": "c4c09d9812a6717fbdd85823d27b2bdb", "score": "0.64535475", "text": "protected function enablePagenator($results) {\n $paginater = Zend_Paginator::factory(\n $results\n );\n $paginater->setCurrentPageNumber($this->_request->getParam('go', 0));\n $paginater->setItemCountPerPage(Zend_Registry::get('config')->mobile->paginator->limit);\n return $paginater;\n }", "title": "" }, { "docid": "c2374d4c50a0e3a813381406675bdae8", "score": "0.6441009", "text": "function page_links ($pagedata) {\n\t\tglobal $this_page;\n\n\t\t// $pagedata has...\n\t\t$total_results \t\t= $pagedata['total_results'];\n\t\t$results_per_page \t= $pagedata['results_per_page'];\n\t\t$page \t\t\t\t= $pagedata['page'];\n\n\n\t\tif ($total_results > $results_per_page) {\n\n\t\t\t$numpages = ceil($total_results / $results_per_page);\n\n\t\t\t$pagelinks = array();\n\n\t\t\t// How many links are we going to display on the page - don't want to\n\t\t\t// display all of them if we have 100s...\n\t\t\tif ($page < 10) {\n\t\t\t\t$firstpage = 1;\n\t\t\t\t$lastpage = 10;\n\t\t\t} else {\n\t\t\t\t$firstpage = $page - 10;\n\t\t\t\t$lastpage = $page + 9;\n\t\t\t}\n\n\t\t\tif ($firstpage < 1) {\n\t\t\t\t$firstpage = 1;\n\t\t\t}\n\t\t\tif ($lastpage > $numpages) {\n\t\t\t\t$lastpage = $numpages;\n\t\t\t}\n\n\t\t\t// Generate all the page links.\n\t\t\t$URL = new URL($this_page);\n\t\t\t$URL->insert(array('wtt'=>get_http_var('wtt')));\n\t\t\tfor ($n = $firstpage; $n <= $lastpage; $n++) {\n\n\t\t\t\tif ($n > 1) {\n\t\t\t\t\t$URL->insert(array('p'=>$n));\n\t\t\t\t} else {\n\t\t\t\t\t// No page number for the first page.\n\t\t\t\t\t$URL->remove(array('p'));\n\t\t\t\t}\n\t\t\t\tif (isset($pagedata['pid'])) {\n\t\t\t\t\t$URL->insert(array('pid'=>$pagedata['pid']));\n\t\t\t\t}\n\n\t\t\t\tif ($n != $page) {\n\t\t\t\t\t$pagelinks[] = '<a href=\"' . $URL->generate() . '\">' . $n . '</a>';\n\t\t\t\t} else {\n\t\t\t\t\t$pagelinks[] = \"<strong>$n</strong>\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Display everything.\n\n\t\t\t?>\n\t\t\t\t<div class=\"pagelinks\">\n\t\t\t\t\tResult page:\n<?php\n\n\t\t\tif ($page != 1) {\n\t\t\t\t$prevpage = $page - 1;\n\t\t\t\t$URL->insert(array('p'=>$prevpage));\n\t\t\t\t?>\n\t\t\t\t\t<big><strong><a href=\"<?php echo $URL->generate(); ?>\"><big>&laquo;</big> Previous</a></strong></big>\n<?php\n\t\t\t}\n\n\t\t\techo \"\\t\\t\\t\\t\" . implode(' ', $pagelinks);\n\n\t\t\tif ($page != $numpages) {\n\t\t\t\t$nextpage = $page + 1;\n\t\t\t\t$URL->insert(array('p'=>$nextpage));\n\t\t\t\t?>\n\n\t\t\t\t\t<big><strong><a href=\"<?php echo $URL->generate(); ?>\">Next <big>&raquo;</big></a></strong></big> <?php\n\t\t\t}\n\n\t\t\t?>\n\n\t\t\t\t</div>\n<?php\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "ced310ea7c8b1d15331215c89d5b7d3a", "score": "0.6440439", "text": "function bbp_get_paged()\n{\n}", "title": "" }, { "docid": "4e4f010bdc29da183ccf85ef42752e71", "score": "0.64241755", "text": "function _mollom_manage_paginate($current_page = 1, $count = 0, $per_page = 15) {\r\n\tif ($count == 0) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// calculate total amount of pages\r\n\tif ($count < $per_page) {\r\n\t\treturn false;\r\n\t} else {\r\n\t\t$total_pages = (int)($count/$per_page);\r\n\t}\r\n\t\r\n\tif (($count%$per_page) > 0) {\r\n\t\t$total_pages += 1;\r\n\t}\r\n\r\n\t// calculate pagination context\r\n\t$buffer = 1;\r\n\tfor ($i = 1; $i <= $total_pages; $i++) {\r\n\t\t// break if the last page is reached\r\n\t\tif ($current_page == $total_pages) {\r\n\t\t\tif ($total_pages > 1) {\r\n\t\t\t\t$start_offset = $total_pages - 1;\r\n\t\t\t} else {\r\n\t\t\t\t$start_offset = 1;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t// calculate offset depending on which page we are\r\n\t\tif ((($i % 2) == 0)) {\r\n\t\t\tif ($i > $current_page) {\r\n\t\t\t\t$start_offset = $buffer;\r\n\t\t\t\tbreak;\r\n\t\t\t} elseif ($i == $current_page) {\r\n\t\t\t\t$start_offset = $buffer + 1;\r\n\t\t\t\tbreak;\r\n\t\t\t} else {\r\n\t\t\t\t$buffer = $i;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t// previous/next buttons\r\n\t$prev_page = false;\r\n\tif ($current_page > 1) {\r\n\t\t$prev_page = $current_page - 1;\r\n\t}\r\n\t\r\n\t$next_page = false;\r\n\tif ($current_page < $total_pages) {\r\n\t\t$next_page = $current_page + 1;\r\n\t}\r\n\t\r\n\t$pages = '';\r\n\t\r\n\t// start generating links and such\r\n\tif ($prev_page) {\r\n\t\t$pages = \"<a href='edit-comments.php?page=mollommanage&amp;apage=$prev_page'>\" . __('&laquo;', MOLLOM_I8N) . \"</a>\";\r\n\t}\r\n\r\n\t$context = 3;\r\n\t$context = (($context < $total_pages) ? $context : ($total_pages + 1));\r\n\tfor ($i = 0; $i < $context; $i++) {\r\n\t\t$page = $start_offset + $i;\r\n\t\tif (($page * $per_page) <= $count) {\r\n\t\t\tif($page != $current_page) {\r\n\t\t\t\t$pages .= \" <a href='edit-comments.php?page=mollommanage&amp;apage=$page' class='page-numbers'>\" . $page . \"</a>\";\r\n\t\t\t} else {\r\n\t\t\t\t$pages .= \" <span class='page-numbers current'>\" . $page . \"</span> \";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//we're approaching the last page now\r\n\tif ($start_offset < ($total_pages - 2)) {\r\n\t\tif ($start_offset < ($total_pages - $context)) {\r\n\t\t\t$pages .= \" ... \";\t\r\n\t\t}\r\n\t\t$pages .= \"<a href='edit-comments.php?page=mollommanage&amp;apage=$total_pages' class='page-numbers'>\" . $total_pages . \"</a>\";\r\n\t} \r\n\t\r\n\tif ($next_page) {\r\n\t\t$pages .= \" <a href='edit-comments.php?page=mollommanage&amp;apage=$next_page'>\" . __('&raquo;', MOLLOM_I8N) . \"</a>\";\r\n\t}\r\n\r\n\treturn $pages;\r\n}", "title": "" }, { "docid": "40ac8e303e0533c30227996ad89769d0", "score": "0.64151293", "text": "public function render() {\r\n\t\r\n\t\t$stages = 3;\r\n\t\t$page = Database::getInstance()->orm->driver->escape($_GET[$this->variable]);\r\n\r\n\t\t// Initial page num setup\r\n\t\tif ($page == 0){$page = 1;}\r\n\t\t$prev = $page - 1;\t\r\n\t\t$next = $page + 1;\t\t\t\t\t\t\t\r\n\t\t$lastpage = ceil($this->total_pages/$this->limit);\t\t\r\n\t\t$LastPagem1 = $lastpage - 1;\t\t\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t$paginate = '';\r\n\t\tif($lastpage > 1) {\t\r\n\t\r\n\t\t\t$paginate .= \"<div class='\".$this->class.\"'>\";\r\n\t\t\t// Previous\r\n\t\t\tif ($page > 1){\r\n\t\t\t\t$paginate.= \"<a href='\".$this->page.\"?\".$this->variable.\"=\".$prev.\"'>\".$this->previous.\"</a>\";\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$paginate.= \"<span class='\".$this->classDisabled.\"'>\".$this->previous.\"</span>\";\t}\r\n\t\t\t\r\n\r\n\t\t\r\n\t\t// Pages\t\r\n\t\tif ($lastpage < 7 + ($stages * 2))\t// Not enough pages to breaking it up\r\n\t\t{\t\r\n\t\t\tfor ($counter = 1; $counter <= $lastpage; $counter++)\r\n\t\t\t{\r\n\t\t\t\tif ($counter == $page){\r\n\t\t\t\t\t$paginate.= \"<span class='\".$this->classCurrent.\"'>$counter</span>\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$paginate.= \"<a href='\".$this->page.\"?\".$this->variable.\"=$counter'>$counter</a>\";}\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\telseif($lastpage > 5 + ($stages * 2))\t// Enough pages to hide a few?\r\n\t\t{\r\n\t\t\t// Beginning only hide later pages\r\n\t\t\tif($page < 1 + ($stages * 2))\t\t\r\n\t\t\t{\r\n\t\t\t\tfor ($counter = 1; $counter < 4 + ($stages * 2); $counter++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($counter == $page){\r\n\t\t\t\t\t\t$paginate.= \"<span class='\".$this->classCurrent.\"'>$counter</span>\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$paginate.= \"<a href='\".$this->page.\"?\".$this->variable.\"=$counter'>$counter</a>\";}\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t$paginate.= \"...\";\r\n\t\t\t\t$paginate.= \"<a href='\".$this->page.\"?\".$this->variable.\"=$LastPagem1'>$LastPagem1</a>\";\r\n\t\t\t\t$paginate.= \"<a href='\".$this->page.\"?\".$this->variable.\"=$lastpage'>$lastpage</a>\";\t\t\r\n\t\t\t}\r\n\t\t\t// Middle hide some front and some back\r\n\t\t\telseif($lastpage - ($stages * 2) > $page && $page > ($stages * 2))\r\n\t\t\t{\r\n\t\t\t\t$paginate.= \"<a href='\".$this->page.\"?\".$this->variable.\"=1'>1</a>\";\r\n\t\t\t\t$paginate.= \"<a href='\".$this->page.\"?\".$this->variable.\"=2'>2</a>\";\r\n\t\t\t\t$paginate.= \"...\";\r\n\t\t\t\tfor ($counter = $page - $stages; $counter <= $page + $stages; $counter++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($counter == $page){\r\n\t\t\t\t\t\t$paginate.= \"<span class='\".$this->classCurrent.\"'>$counter</span>\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$paginate.= \"<a href='\".$this->page.\"?\".$this->variable.\"=$counter'>$counter</a>\";}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t$paginate.= \"...\";\r\n\t\t\t\t$paginate.= \"<a href='\".$this->page.\"?\".$this->variable.\"=$LastPagem1'>$LastPagem1</a>\";\r\n\t\t\t\t$paginate.= \"<a href='\".$this->page.\"?\".$this->variable.\"=$lastpage'>$lastpage</a>\";\t\t\r\n\t\t\t}\r\n\t\t\t// End only hide early pages\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$paginate.= \"<a href='\".$this->page.\"?\".$this->variable.\"=1'>1</a>\";\r\n\t\t\t\t$paginate.= \"<a href='\".$this->page.\"?\".$this->variable.\"=2'>2</a>\";\r\n\t\t\t\t$paginate.= \"...\";\r\n\t\t\t\tfor ($counter = $lastpage - (2 + ($stages * 2)); $counter <= $lastpage; $counter++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($counter == $page){\r\n\t\t\t\t\t\t$paginate.= \"<span class='\".$this->classCurrent.\"'>$counter</span>\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$paginate.= \"<a href='\".$this->page.\"?\".$this->variable.\"=$counter'>$counter</a>\";}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t// Next\r\n\t\tif ($page < $counter - 1){ \r\n\t\t\t$paginate.= \"<a href='\".$this->page.\"?\".$this->variable.\"=$next'>\".$this->next.\"</a>\";\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$paginate.= \"<span class='\".$this->classDisabled.\"'>\".$this->next.\"</span>\";\r\n\t\t}\r\n\t\t$paginate.= \"</div>\";\t\t\r\n\t\t\r\n\t\techo $paginate;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f90264eeab3526f7913761e252614593", "score": "0.6408445", "text": "function advancedResults() {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\n\t\t$query = Request::getUserVar('query');\n\t\t$fromDate = Request::getUserDateVar('dateFrom', 1, 1);\n\t\tif ($fromDate !== null) $fromDate = date('Y-m-d H:i:s', $fromDate);\n\t\t$toDate = Request::getUserDateVar('dateTo', 32, 12, null, 23, 59, 59);\n\t\tif ($toDate !== null) $toDate = date('Y-m-d H:i:s', $toDate);\n\t\t$articleDao =& DAORegistry::getDAO('ArticleDAO');\n\n\t\t$results =& $articleDao->searchProposalsPublic($query, $fromDate, $toDate);\n\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->assign_by_ref('results', $results);\n\t\t$templateMgr->assign('query', Request::getUserVar('query'));\n\t\t\n\t\t$templateMgr->assign('dateFrom', $fromDate);\n\t\t$templateMgr->assign('dateTo', $toDate);\n\t\t$templateMgr->assign('count', count($results));\n\n\t\t$templateMgr->display('search/searchResults.tpl');\n\t}", "title": "" }, { "docid": "694721d4c5480a52acd4151854680101", "score": "0.64047253", "text": "function prt_search_result_type2($hits, $query, $page_size) {\r\n\r\n\t$result_count = 0;\r\n\r\n\techo '<div class=\"row\">';\r\n\r\n\tforeach ($hits['hits'] as $list) {\r\n\t\t$print_price = '';\r\n\t\t$item = $list['_source'];\r\n\t\t$title = $item['title'];\r\n\t\t$link = $item['link'];\r\n\t\t$brand = $item['brand'];\r\n\t\t$thumb = $item['thumb'];\r\n\t\t$cp_name = $item['cp'];\r\n\t\t$price_sale = $item['price_sale'];\r\n\t\t$price_org = $item['price_org'];\r\n\t\t$cmt = $item['cmt'];\r\n\r\n\t\tif (intval($price_sale) != 0 AND intval($price_org) != 0) {\r\n\t\t\t$print_price = '<del><small>' . $price_org . '</small></del> -> ' . $price_sale;\r\n\t\t} else if (intval($price_sale) == 0 AND intval($price_org) != 0) {\r\n\t\t\t$print_price = $price_org;\r\n\t\t} else if (intval($price_sale) != 0 AND intval($price_org) == 0) {\r\n\t\t\t$print_price = $price_sale;\r\n\t\t} else {\r\n\t\t\t$print_price = \"확인필요\";\r\n\t\t}\r\n\r\n\t\t// 검색결과 몇건을 받았는지 count.\r\n\t\t$result_count++;\r\n\r\n\t\t// cp name\r\n\t\t$t_cpname = get_cpname($cp_name);\r\n\r\n\t\t// remove special char brand.\r\n\t\t$t_brand = rm_str($brand);\r\n\r\n\t\techo '\r\n\t\t\t<div class=\"col-lg-3 col-md-4 col-xs-6 thumb\">\r\n\t\t\t\t<div class=\"thumbnail right-caption span4\">\r\n\t\t\t\t\t<a class=\"thumbnail\" href=\"'.$link.'\" target=\"_new\">\r\n\t\t\t\t\t\t<img class=\"img-responsive\" src=\"'.$thumb.'\" alt=\"'.$title.'\">\r\n\t\t\t\t\t\t<div class=\"caption\">\r\n\t\t\t\t\t\t'.$print_price.'<small> <br> ['.$t_cpname.']</small>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</a>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t';\r\n\t\t// -- echo.\r\n\t}\r\n\t// -- forearch.\r\n\r\n\techo '</div>';\r\n\r\n\treturn $result_count;\r\n}", "title": "" }, { "docid": "b652323f78e6624643aab1ae6579a4b9", "score": "0.6403094", "text": "function NewshowPaging()\n\t\t{\n\t\t\tglobal $PAGE_TOTAL_ROWS;\n\t\t\tglobal $PAGE_LIMIT;\n\t\t\tglobal $PAGE_URL;\n\t\t\tglobal $DISPLAY_PAGES;\n\t\t\t\n\t\t\t@$numofpages = ceil($PAGE_TOTAL_ROWS / $PAGE_LIMIT);\n\t\t\t$pages = ((empty($_GET['pages']))?1:$_GET['pages']);\n\t\t\t$page = ((empty($_GET['page']))?1:$_GET['page']);\n\t\t\t$filename = $PAGE_URL;\n\t\t\t$displayPages = (($DISPLAY_PAGES < 1)?10:$DISPLAY_PAGES);\n\n\t\t\tif(strlen(trim($filename)) > 0)\n\t\t\t{\t//echo \"filename : \".$filename;\t\t\n\t\t\t\t$file = split(\"-\",$filename);\n\t\t\t\t//echo \"filename : \".print_r($file);\n\t\t\t\tif(sizeof($file) == 1)\n\t\t\t\t{\n\t\t\t\t\t$_file = $file[0].\"?\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor($m=1;$m<sizeof($file);$m++)\t{\t$fn.= $file[$m].\"&\";\t}\n\t\t\t\t\t$_file = $file[0].\"?\".$fn;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\tif($pages > 1)\n\t\t\t{\n\t\t\t\t$pageprev = $pages-$displayPages;\n\t\t\t\t$working_data = \"<a href=\".$_file.\"pages=\".$pageprev.\" class=\\\"nopage\\\" style=\\\"color:#000000\\\">PREV</a>&nbsp;\";\n\t\t\t}\n\t\t\t\t\t\n\t\t\t for($i = 1; $i <=$numofpages; $i++)\n\t\t\t {\n\t\t\t\tif($i == $page) \n\t\t\t\t{\n\t\t\t\t\t$selectedPage = (($page == $i)?\"style='font-weight:normal;'\":\"\");\n\t\t\t\t\t$working_data.= \"<a href=\".$_file.\"pages=\".$pages.\"&page=\".$i.\" class=\\\"selectedpage\\\"><strong>\".$i.\"</strong></a>&nbsp;\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t $working_data.= \"<a href=\".$_file.\"pages=\".$pages.\"&page=\".$i.\" class=\\\"nopage\\\">\".$i.\"</a>&nbsp;\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t }\n\t\t\t\n\t\t\tif($pages + $displayPages <= $numofpages)\n\t\t\t{\n\t\t\t\t$pagenext = ($pages + $displayPages);\n\t\t\t\t$working_data.= \"<a href=\".$_file.\"pages=\".$pagenext.\" class=\\\"grey-txt\\\">NEXT</a>\";\n\t\t\t}\n\t\t\t\n\t\t\treturn \"<span class=\\\"text\\\">Page: </span>\".((empty($working_data))?0:$working_data);\n\t\t}", "title": "" }, { "docid": "e4cfbb545b937d7c882b242467f0335c", "score": "0.6393474", "text": "function pagination( $which ) {\r\n if ( empty( $this->_pagination_args ) ) {\r\n return;\r\n }\r\n\r\n $total_items = $this->_pagination_args['total_items'];\r\n $total_pages = $this->_pagination_args['total_pages'];\r\n $infinite_scroll = false;\r\n if ( isset( $this->_pagination_args['infinite_scroll'] ) ) {\r\n $infinite_scroll = $this->_pagination_args['infinite_scroll'];\r\n }\r\n\r\n if ( 'top' === $which && $total_pages > 1 ) {\r\n $this->screen->render_screen_reader_content( 'heading_pagination' );\r\n }\r\n\r\n $output = '<span class=\"displaying-num\">' . sprintf( _n( '%s item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>';\r\n\r\n $current = $this->get_pagenum();\r\n $removable_query_args = wp_removable_query_args();\r\n\r\n $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );\r\n\r\n $current_url = remove_query_arg( $removable_query_args, $current_url );\r\n \r\n //====== ADD QUERY PARAMETERS TO PAGINATION LINK URLS ======\r\n if($_POST['s']) {\r\n $current_url = esc_url_raw(add_query_arg('s', $_POST['s'], $current_url));\r\n }\r\n if($_POST['locationfilter']) {\r\n $current_url = esc_url_raw(add_query_arg('locationfilter', $_POST['locationfilter'], $current_url));\r\n }\r\n if($_POST['startdate']) {\r\n $current_url = esc_url_raw(add_query_arg('startdate', $_POST['startdate'], $current_url));\r\n }\r\n if($_POST['enddate']) {\r\n $current_url = esc_url_raw(add_query_arg('enddate', $_POST['enddate'], $current_url));\r\n }\r\n \r\n $page_links = array();\r\n\r\n $total_pages_before = '<span class=\"paging-input\">';\r\n $total_pages_after = '</span></span>';\r\n\r\n $disable_first = $disable_last = $disable_prev = $disable_next = false;\r\n\r\n if ( $current == 1 ) {\r\n $disable_first = true;\r\n $disable_prev = true;\r\n }\r\n if ( $current == 2 ) {\r\n $disable_first = true;\r\n }\r\n if ( $current == $total_pages ) {\r\n $disable_last = true;\r\n $disable_next = true;\r\n }\r\n if ( $current == $total_pages - 1 ) {\r\n $disable_last = true;\r\n }\r\n\r\n if ( $disable_first ) {\r\n $page_links[] = '<span class=\"tablenav-pages-navspan\" aria-hidden=\"true\">&laquo;</span>';\r\n } else {\r\n $page_links[] = sprintf( \"<a class='first-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>\",\r\n esc_url( remove_query_arg( 'paged', $current_url ) ),\r\n __( 'First page' ),\r\n '&laquo;'\r\n );\r\n }\r\n\r\n if ( $disable_prev ) {\r\n $page_links[] = '<span class=\"tablenav-pages-navspan\" aria-hidden=\"true\">&lsaquo;</span>';\r\n } else {\r\n $page_links[] = sprintf( \"<a class='prev-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>\",\r\n esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),\r\n __( 'Previous page' ),\r\n '&lsaquo;'\r\n );\r\n }\r\n\r\n if ( 'bottom' === $which ) {\r\n $html_current_page = $current;\r\n $total_pages_before = '<span class=\"screen-reader-text\">' . __( 'Current Page' ) . '</span><span id=\"table-paging\" class=\"paging-input\"><span class=\"tablenav-paging-text\">';\r\n } else {\r\n $html_current_page = sprintf( \"%s<input class='current-page' id='current-page-selector' type='text' name='paged' value='%s' size='%d' aria-describedby='table-paging' /><span class='tablenav-paging-text'>\",\r\n '<label for=\"current-page-selector\" class=\"screen-reader-text\">' . __( 'Current Page' ) . '</label>',\r\n $current,\r\n strlen( $total_pages )\r\n );\r\n }\r\n $html_total_pages = sprintf( \"<span class='total-pages'>%s</span>\", number_format_i18n( $total_pages ) );\r\n $page_links[] = $total_pages_before . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . $total_pages_after;\r\n\r\n if ( $disable_next ) {\r\n $page_links[] = '<span class=\"tablenav-pages-navspan\" aria-hidden=\"true\">&rsaquo;</span>';\r\n } else {\r\n $page_links[] = sprintf( \"<a class='next-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>\",\r\n esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),\r\n __( 'Next page' ),\r\n '&rsaquo;'\r\n );\r\n }\r\n\r\n if ( $disable_last ) {\r\n $page_links[] = '<span class=\"tablenav-pages-navspan\" aria-hidden=\"true\">&raquo;</span>';\r\n } else {\r\n $page_links[] = sprintf( \"<a class='last-page' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>\",\r\n esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),\r\n __( 'Last page' ),\r\n '&raquo;'\r\n );\r\n }\r\n\r\n $pagination_links_class = 'pagination-links';\r\n if ( ! empty( $infinite_scroll ) ) {\r\n $pagination_links_class .= ' hide-if-js';\r\n }\r\n $output .= \"\\n<span class='$pagination_links_class'>\" . join( \"\\n\", $page_links ) . '</span>';\r\n\r\n if ( $total_pages ) {\r\n $page_class = $total_pages < 2 ? ' one-page' : '';\r\n } else {\r\n $page_class = ' no-pages';\r\n }\r\n $this->_pagination = \"<div class='tablenav-pages{$page_class}'>$output</div>\";\r\n\r\n echo $this->_pagination;\r\n }", "title": "" }, { "docid": "6f5a4e8e2fa67c9b082eaa92b8bc7de3", "score": "0.6393278", "text": "public function queryPagination(){\r\n\t\t\t$listFieldTable = $this->db->field_data($this->tableName);\r\n\t\t\t$selectString = '';\r\n\t\t\tif(!empty($listFieldTable)){\r\n\t\t\t\tforeach( $listFieldTable as $field ){\r\n\t\t\t\t\t$selectString .= $this->tableName.'.'.$field->name.' as \"'.$this->tableName.'.'.$field->name.'\",';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->db->select($selectString);\r\n\t\t\t$this->db->from($this->tableName);\r\n\t\t\tif( !empty($this->tableJoin) ){\r\n\t\t\t\tforeach ($this->tableJoin as $key => $item) {\r\n\t\t\t\t\t$listFieldTable = $this->db->field_data($key);\r\n\t\t\t\t\t$selectString = '';\r\n\t\t\t\t\tif(!empty($listFieldTable)){\r\n\t\t\t\t\t\tforeach( $listFieldTable as $field ){\r\n\t\t\t\t\t\t\t$selectString .= $key.'.'.$field->name.' as \"'.$key.'.'.$field->name.'\",';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->db->select($selectString);\r\n\t\t\t\t\t$this->db->join($key, $this->tableName.'.'.$item[0] .'='. $key.'.'.$item[1], 'left' );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif( !empty($this->fields) && $this->keyword != '' ){\r\n\t\t\t\t$OrLikeArray = array();\r\n\t\t\t\tforeach( $this->fields as $f ){\r\n\t\t\t\t\t$OrLikeArray[$f]\t=\turldecode($this->keyword);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$this->db->or_like($OrLikeArray);\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "f35e85dc053c0a82c0b2abcffa685fd9", "score": "0.6387729", "text": "public function getPaginationHtml();", "title": "" }, { "docid": "a1349d6b2afa844fc47503ce3e433f69", "score": "0.6384367", "text": "function index($start=0){\n\t\t$limit = 10;\n $data['proxy'] = $this->Proxy_model->get_limit_proxy($limit,$start);\n\t\t//pagination\n\t\t$config['base_url'] = site_url('admin/proxy/index');\n\t\t$config['total_rows'] = $this->Proxy_model->get_count_proxy();\n\t\t$config['per_page'] = 10;\n\t\t//Bootstrap 4 Pagination fix\n\t\t$config['full_tag_open'] = '<div class=\"pagging text-center\"><nav><ul class=\"pagination\">';\n\t\t$config['full_tag_close'] = '</ul></nav></div>';\n\t\t$config['num_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n\t\t$config['num_tag_close'] = '</span></li>';\n\t\t$config['cur_tag_open'] = '<li class=\"page-item active\"><span class=\"page-link\">';\n\t\t$config['cur_tag_close'] = '<span class=\"sr-only\">(current)</span></span></li>';\n\t\t$config['next_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n\t\t$config['next_tag_close'] = '<span aria-hidden=\"true\"></span></span></li>';\n\t\t$config['next_tag_close'] = '<span aria-hidden=\"true\">&raquo;</span></span></li>';\n\t\t$config['prev_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n\t\t$config['prev_tag_close'] = '</span></li>';\n\t\t$config['first_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n\t\t$config['first_tag_close'] = '</span></li>';\n\t\t$config['last_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n\t\t$config['last_tag_close'] = '</span></li>';\t\t\n\t\t$this->pagination->initialize($config);\n $data['link'] =$this->pagination->create_links();\n\t\t\n $data['_view'] = 'admin/proxy/index';\n $this->load->view('layouts/admin/body',$data);\n }", "title": "" }, { "docid": "268a105215636f1850b9067a2a4fd09b", "score": "0.63792557", "text": "public function pagination()\r\n {\r\n \r\n return $this;\r\n }", "title": "" }, { "docid": "72bb077b038dc08fce79e805af4f3c2c", "score": "0.6372555", "text": "public function paginglink($query,$records_per_page)\r\n\t{\r\n\t\t$self = $_SERVER['PHP_SELF'];\r\n\t\t//Preapre this database for the following execution:\r\n\t\t$stmt = $this->db->prepare($query);\r\n //Execute the stmt:\r\n\t\t$stmt->execute();\r\n\t\t//Set the total number of records equal to the stmts execute row count:\r\n\t\t$total_no_of_records = $stmt->rowCount();\r\n\t\t//If this is true do the following:\r\n\t\tif($total_no_of_records > 0)\r\n\t\t{\r\n\t\t\t?><ul class=\"pagination\"><?php\r\n //Ceiling is used to break up the total number of records by the amount you want per page:\r\n\t\t\t$total_no_of_pages=ceil($total_no_of_records/$records_per_page);\r\n //The first page is well the first page:\r\n\t\t\t$current_page=1;\r\n //Lets get the page number that we are on currently:\r\n\t\t\tif(isset($_GET[\"page_no\"]))\r\n\t\t\t{\r\n //Ans store it as the current page:\r\n\t\t\t\t$current_page=$_GET[\"page_no\"];\r\n\t\t\t}\r\n //Now lets see if the current page is 1 or not:\r\n\t\t\tif($current_page!=1)\r\n\t\t\t{\r\n //If it is not 1 allow fot the previous button to be appicable:\r\n\t\t\t\t$previous =$current_page-1;\r\n //Display a button link to return to the first page:\r\n\t\t\t\techo \"<li><a href='\".$self.\"?page_no=1'>First</a></li>\";\r\n //Display a button link to return to the previous page:\r\n\t\t\t\techo \"<li><a href='\".$self.\"?page_no=\".$previous.\"'>Previous</a></li>\";\r\n\t\t\t}\r\n //As long as the pages are less than or equal to the total number of all the pages do all of the following:\r\n\t\t\tfor($i=1;$i<=$total_no_of_pages;$i++)\r\n\t\t\t{\r\n //See what page we are on:\r\n\t\t\t\tif($i==$current_page)\r\n\t\t\t\t{\r\n\t\t\t\t\techo \"<li><a href='\".$self.\"?page_no=\".$i.\"' style='color:red;'>\".$i.\"</a></li>\";\r\n\t\t\t\t}\r\n //See what page we are onL\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\techo \"<li><a href='\".$self.\"?page_no=\".$i.\"'>\".$i.\"</a></li>\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n //As long as the current page is not the last page:\r\n\t\t\tif($current_page!=$total_no_of_pages)\r\n\t\t\t{\r\n //Increment the current page by 1 everytime you go to the next page:\r\n\t\t\t\t$next=$current_page+1;\r\n //Display a button to go to the next page:\r\n\t\t\t\techo \"<li><a href='\".$self.\"?page_no=\".$next.\"'>Next</a></li>\";\r\n //Display a button to go to the last page:\r\n\t\t\t\techo \"<li><a href='\".$self.\"?page_no=\".$total_no_of_pages.\"'>Last</a></li>\";\r\n\t\t\t}\r\n\t\t\t?></ul><?php\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ae76a0b9d2bac45bfe794dcb9efcba46", "score": "0.6371169", "text": "function Pagination($connection, $sql, $rows_per_page = 10, $links_per_page = 5) {\r\n\t\t$this->conn = $connection;\r\n\t\t$this->sql = $sql;\r\n\t\t$this->rows_per_page = $rows_per_page;\r\n\t\t$this->links_per_page = $links_per_page;\r\n\t\t$this->php_self = htmlspecialchars($_SERVER['PHP_SELF']);\r\n\t\t\r\n\t\tif(isset($_GET['page'])) {\r\n\t\t\t$this->page = intval($_GET['page']);\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "0e4287859baefe38ff467490c271f6d5", "score": "0.6370402", "text": "function output_pagination($start, $count, $extra = '', $is_end = false)\n{\n $next_start_num = $start + $count;\n $last_start_num = $start - $count;\n if ($last_start_num < 0) {\n $last_start_num = 0;\n }\n echo '<p>';\n if ($start > 0) {\n echo \"<a href='?start=$last_start_num&count=$count$extra'><- Last</a> |\";\n } else {\n echo '<- Last |';\n }\n if ($is_end === true) {\n echo(\" Next ->\");\n } else {\n echo \" <a href='?start=$next_start_num&count=$count$extra'>Next -></a>\";\n }\n echo '</p>';\n}", "title": "" }, { "docid": "3ef6b2fb7dc4dbd588fa1ab7a5e48d2c", "score": "0.6354499", "text": "public function paginator($params) {\t\n\t\t$request_url = \"{$this->url}&api_action=campaign_paginator&api_output={$this->output}&{$params}\";\n\t\t$response = parent::curl($request_url);\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "d2e70774536965619d4e4bb43f2971d6", "score": "0.635425", "text": "function owly_pagination( $query = false, $load_more = false ){\n\tglobal $wp_query;\n\t$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : ( ( get_query_var( 'page' ) ) ? get_query_var( 'page' ) : 1 );\n\n\t// default $wp_query\n\tif( $query ) {\n\t\t$custom_query = $query;\n\t} else {\n\t\t$custom_query = $wp_query;\n\t}\n\n\t$custom_query->query_vars['paged'] > 1 ? $current = $custom_query->query_vars['paged'] : $current = 1;\n\n\tif( empty( $paged ) ) $paged = 1;\n\t$prev = $paged - 1;\n\t$next = $paged + 1;\n\n\t$end_size = 1;\n\t$mid_size = 2;\n\t$show_all = cs_get_option( 'showall-pagination' );\n\t$dots = false;\n\n\tif( ! $total = $custom_query->max_num_pages ) $total = 1;\n\n\t$output = '';\n\tif( $total > 1 )\n\t{\n\t\tif( $load_more ){\n\t\t\t// ajax load more -------------------------------------------------\n\t\t\tif( $paged < $total ){\n\t\t\t\t$output .= '<div class=\"column one pager_wrapper pager_lm\">';\n\t\t\t\t\t$output .= '<a class=\"pager_load_more button button_js\" href=\"'. get_pagenum_link( $next ) .'\">';\n\t\t\t\t\t\t$output .= '<span class=\"button_icon\"><i class=\"icon-layout\"></i></span>';\n\t\t\t\t\t\t$output .= '<span class=\"button_label\">'. esc_html__('Load more', 'owly') .'</span>';\n\t\t\t\t\t$output .= '</a>';\n\t\t\t\t$output .= '</div>';\n\t\t\t}\n\n\t\t} else {\n\t\t\t// default --------------------------------------------------------\t\n\t\t\t$output .= '<div class=\"column one pager_wrapper\">';\n\n\t\t\t\t$big = 999999999; // need an unlikely integer\n\t\t\t\t$args = array(\n\t\t\t\t\t'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),\n\t\t\t\t\t'total' => $custom_query->max_num_pages,\n\t\t\t\t\t'current' => max( 1, get_query_var('paged') ),\n\t\t\t\t\t'show_all' => $show_all,\n\t\t\t\t\t'end_size' => $end_size,\n\t\t\t\t\t'mid_size' => $mid_size,\n\t\t\t\t\t'prev_next' => true,\n\t\t\t\t\t'prev_text' => '<i class=\"fas fa-angle-double-left\"></i>'.esc_html__('Prev', 'owly'),\n\t\t\t\t\t'next_text' => esc_html__('Next', 'owly').'<i class=\"fas fa-angle-double-right\"></i>',\n\t\t\t\t\t'type' => 'list'\n\t\t\t\t);\n\t\t\t\t$output .= paginate_links( $args );\n\n\t\t\t$output .= '</div>'.\"\\n\";\n\t\t}\n\t}\n\twp_reset_postdata();\n\treturn $output;\n}", "title": "" }, { "docid": "010396777d4fdb7450badf683a17bb63", "score": "0.6351572", "text": "public static function paginator(): WpQueryPaginatorInterface;", "title": "" } ]
12be5fd3b5c42424ec1bffe8f4c21ebf
Returns the primary attorney for the given primary attorney id
[ { "docid": "9861307bf3091d882bc47b4c7eb74f1e", "score": "0.7449368", "text": "public function getPrimaryAttorney(\n $lpaId,\n $primaryAttorneyId\n )\n {\n $helper = new ApplicationResourceService($lpaId, 'primary-attorneys', $this);\n return $helper->getEntityResource('\\Opg\\Lpa\\DataModel\\Lpa\\Document\\Attorneys\\AbstractAttorney', $primaryAttorneyId);\n }", "title": "" } ]
[ { "docid": "3474069c2a85cea516a3f1402547c061", "score": "0.6223999", "text": "public function addPrimaryAttorney(\n $lpaId,\n AbstractAttorney $primaryAttorney\n )\n {\n $helper = new ApplicationResourceService($lpaId, 'primary-attorneys', $this);\n return $helper->addResource($primaryAttorney->toJson());\n }", "title": "" }, { "docid": "91fec435b59d6579f0663db13b0a0d31", "score": "0.61788666", "text": "public function setPrimaryAttorney(\n $lpaId,\n AbstractAttorney $primaryAttorney,\n $primaryAttorneyId\n )\n {\n $helper = new ApplicationResourceService($lpaId, 'primary-attorneys', $this);\n return $helper->setResource($primaryAttorney->toJson(), $primaryAttorneyId);\n }", "title": "" }, { "docid": "3a93611909183dbe75790844e9e1b79a", "score": "0.6175083", "text": "public function getPrimaryAttorneys($lpaId)\n {\n $helper = new ApplicationResourceService($lpaId, 'primary-attorneys', $this);\n return $helper->getResourceList('\\Opg\\Lpa\\DataModel\\Lpa\\Document\\Attorneys\\AbstractAttorney');\n }", "title": "" }, { "docid": "84d0a9535c548395c00fa90400d0a100", "score": "0.6161187", "text": "public function get_primary()\n {\n return $this->primary;\n }", "title": "" }, { "docid": "21f8977405ffe44ab83100175b1a1221", "score": "0.5956782", "text": "public function get_Primary_ID() {\n return $this->primary;\n }", "title": "" }, { "docid": "56b6728a335c67041040c3c3877b0961", "score": "0.5937017", "text": "public function attorney(){\n return $this->belongsTo('App\\Attorney','attorney_id');\n }", "title": "" }, { "docid": "e0547ae30c4b9b02e4afcad977752653", "score": "0.5904772", "text": "public function getPrimaryAttribute() {\n\t\treturn \"id\";\n\t}", "title": "" }, { "docid": "e0547ae30c4b9b02e4afcad977752653", "score": "0.5904772", "text": "public function getPrimaryAttribute() {\n\t\treturn \"id\";\n\t}", "title": "" }, { "docid": "e0547ae30c4b9b02e4afcad977752653", "score": "0.5904772", "text": "public function getPrimaryAttribute() {\n\t\treturn \"id\";\n\t}", "title": "" }, { "docid": "fee7c155fc896ff6e89985728c575a0b", "score": "0.5891467", "text": "public function getPrimarySpeakerAttribute()\n {\n return $this->program\n ->primary_speakers\n ->filter(function($speaker){\n return $speaker->brand_id == $this->brand->id\n AND $speaker->is_primary;\n })\n ->first();\n }", "title": "" }, { "docid": "126db8c2e9adb2b24c08f9d9a73a6d64", "score": "0.5856875", "text": "function getFirstAppointmentId($referralId){\n\t $data = $this->find('first',\n \t array(\n \t 'contain' => array(),\n \t 'conditions' => array(\n \t 'referral_id' => $referralId,\n\t 'NOT' => array(\n\t 'state' => array(static::STATE_DELETED, static::STATE_REJECTED)\n ),\n \t ),\n \t 'order' => 'created ASC',\n \t 'fields' => $this->primaryKey,\n \t )\n\t );\n\n\t if (!$data) {\n\t return false;\n\t }\n\n\t return $data[$this->alias][$this->primaryKey];\n\t}", "title": "" }, { "docid": "8782a08f436988534206f97489636118", "score": "0.5822183", "text": "public function getPrimary()\n {\n return $this[0];\n }", "title": "" }, { "docid": "b2d642597c4e56bce6ceaa1b88d79c42", "score": "0.5813105", "text": "protected function getPk() {\n\t\treturn $this->assessmentID;\n\t}", "title": "" }, { "docid": "b12c2595df6b287a90b7f5b63e0ac2d2", "score": "0.58078563", "text": "public function getIdPatient() {\r\n return $this->Id;\r\n }", "title": "" }, { "docid": "8fa8236d94bc5c2659eeb0a6715eeaae", "score": "0.5760481", "text": "public function getPrimary() {\n\t\tif (is_array ( $this->_primary )) {\n\t\t\treturn $this->_primary [1];\n\t\t}\n\t\treturn $this->_primary;\n\t}", "title": "" }, { "docid": "8fa8236d94bc5c2659eeb0a6715eeaae", "score": "0.5760481", "text": "public function getPrimary() {\n\t\tif (is_array ( $this->_primary )) {\n\t\t\treturn $this->_primary [1];\n\t\t}\n\t\treturn $this->_primary;\n\t}", "title": "" }, { "docid": "6c3199674863aaa8c3d1570a6606b622", "score": "0.57398415", "text": "public function getPrimaryDoctor()\n {\n return $this->hasOne(Staff::className(), ['staff_id' => 'primary_doctor_id']);\n }", "title": "" }, { "docid": "8070786292308d56174e41fc85bf87d9", "score": "0.5730274", "text": "public function getReplacementAttorney(\n $lpaId,\n $replacementAttorneyId\n )\n {\n $helper = new ApplicationResourceService($lpaId, 'replacement-attorneys', $this);\n return $helper->getEntityResource('\\Opg\\Lpa\\DataModel\\Lpa\\Document\\Attorneys\\AbstractAttorney', $replacementAttorneyId);\n }", "title": "" }, { "docid": "1ccbf920377f61b7c1137175794b163a", "score": "0.57285804", "text": "public function getPrimary()\n\t{\n\t\tif(is_array($this->_primary) && count($this->_primary) == 1)\n\t\t{\n\t\t\t$this->_primary = array_shift($this->_primary);\n\t\t}\n\t\t\n\t\treturn $this->_primary;\n\t}", "title": "" }, { "docid": "40eecfc0f831f0035f715137c0784c4e", "score": "0.5725281", "text": "public function deletePrimaryAttorney(\n $lpaId,\n $primaryAttorneyId\n )\n {\n $helper = new ApplicationResourceService($lpaId, 'primary-attorneys', $this);\n return $helper->deleteResource($primaryAttorneyId);\n }", "title": "" }, { "docid": "06aac71246690c82027289c84388a87f", "score": "0.5703577", "text": "public function getPrimary()\n\t{\n\t\tif(is_array($this->_primary) && count($this->_primary) == 1)\n\t\t{\n\t\t\t$this->_primary = array_shift($this->_primary);\n\t\t}\n\n\t\treturn $this->_primary;\n\t}", "title": "" }, { "docid": "3f0fa4eb533509c1a153ff1613fd7dc6", "score": "0.568982", "text": "public function getPrimary()\n {\n return $this->primary;\n }", "title": "" }, { "docid": "3f0fa4eb533509c1a153ff1613fd7dc6", "score": "0.568982", "text": "public function getPrimary()\n {\n return $this->primary;\n }", "title": "" }, { "docid": "72763df65cd49454a0d0ab40f7047cf0", "score": "0.5688536", "text": "function getAssocId() {\n\t\treturn $this->getData('assocId');\n\t}", "title": "" }, { "docid": "050b44a47048f881d32782293e442a68", "score": "0.5680231", "text": "public function getPrimary() {\n foreach ($this->_fields as $key => $field) {\n if ($field->primary == true) {\n $this->_primary = $key;\n break;\n }\n }\n }", "title": "" }, { "docid": "705e098e578dc50784af761347302af0", "score": "0.5671078", "text": "public function getAssignedIdenty($id){\r\n return $this->Model->getAssignedIdenty($id);\r\n }", "title": "" }, { "docid": "8286e44d67ecc4f39a1071c073ad1639", "score": "0.56438535", "text": "protected abstract static function getPrimaryKey();", "title": "" }, { "docid": "405888f93c1480d35b1859061594b09d", "score": "0.56267935", "text": "public function get_primary_key(){ \r\n return $this->primarykey;\r\n }", "title": "" }, { "docid": "f0a885cd5358b3ecb06fa333af2956ae", "score": "0.5610172", "text": "function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_item' => $this->iid_item);\n }\n return $this->aPrimary_key;\n }", "title": "" }, { "docid": "0d92545e2d195026ba600ed4cdc37f39", "score": "0.56054187", "text": "public function getId() {\n return @$this->attributes['id'];\n }", "title": "" }, { "docid": "aa83dbd41b6ce5d01d0168bd6d8b7d19", "score": "0.5595037", "text": "public function getPrimaryUser($id)\n {\n\n $primaryUser = User::findorfail($id); //display 404 nice page means handle fails \n \n // $primaryUser= new User();\n // $primaryUser->name= 'Mr Bean';\n // $primaryUser->handle='@canada';\n // $primaryUser->description=\"Lorem ipsum, dolor sit amet consectetur adipisicing elit.\n // accusantium esse explicabo eveniet \";\n // $primaryUser->link='canada.com';\n // $primaryUser->joinedDate='Oct,2014';\n // $primaryUser->tweets=3434;\n // $primaryUser->following=787; \n // $primaryUser->followers='1.6K';\n // $primaryUser->likes=879;\n // $primaryUser->moments=10; \n // $primaryUser->image='https://pbs.twimg.com/profile_images/521655203011899392/pxOndDc7_bigger.png' ;\n return $primaryUser;\n }", "title": "" }, { "docid": "acdad76842d9f2bde45bf4bb4ac4233b", "score": "0.5532899", "text": "function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_repeticion' => $this->iid_repeticion);\n }\n return $this->aPrimary_key;\n }", "title": "" }, { "docid": "43fa8b738945c90025c5697a39dc9534", "score": "0.552365", "text": "function get_attribute_primary_class($class)\n\t{\n\t\t$primary_name = $class;\n\t\t$found = false;\n\t\tforeach($this->attribute_schema as $schema_entry)\n\t\t{\n\t\t\tif(!$found && $schema_entry[\"name\"] == $class)\n\t\t\t{\n\t\t\t\t$primary_name = $schema_entry[\"name\"];\n\t\t\t\t$found = true;\n\t\t\t}\n\n\t\t\tif(!$found && isset($schema_entry[\"alias_names\"]))\n\t\t\t{\n\t\t\t\t$alias_names = explode(\",\",$schema_entry[\"alias_names\"]);\n\t\t\t\tforeach($alias_names as $alias)\n\t\t\t\t{\n\t\t\t\t\tif(!$found && $alias == $class)\n\t\t\t\t\t{\n\t\t\t\t\t\t$primary_name = $alias;\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $primary_name;\n\t}", "title": "" }, { "docid": "034df788eb011f92e948d5275943e80b", "score": "0.5515444", "text": "public function get_appointment($appointment_id) {\n\t\t\n\t\t$res = DB::query(\"select * from appointments where appointment_id=? limit 0, 1\", array($appointment_id));\n\t\twhile($row = $res->fetch_assoc()) {\n\t\t\t\n\t\t\treturn $row;\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "9ebf5b6f5746aae89dc5e4e790a8fc7a", "score": "0.55036634", "text": "function getQualificationById($id) {\n \n \n $select = \"SELECT * FROM qualifications WHERE id=?\";\n try {\n $select = $this->pdo->prepare($select);\n $select->execute(array($id));\n $row = $select->fetch(PDO::FETCH_ASSOC);\n //return $row['qualification'];\n return $row;\n } catch (PDOException $e) {\n $this->setError($e->getMessage());\n return false;\n }\n }", "title": "" }, { "docid": "3cc9d83608a0e1d337d7a29c123412a4", "score": "0.5487827", "text": "public function primary() {\n\t\treturn $this->bestForUse('primary');\n\t}", "title": "" }, { "docid": "0311116f08e80dc2fa493b75d9557b5b", "score": "0.5474629", "text": "public function aid($aid = null)\n {\n if(null === $aid)\n {\n return $this->property('aid');\n }\n return $this->property('aid', trim($aid));\n }", "title": "" }, { "docid": "e86ca8b31c6802860a126f9896b5535c", "score": "0.5464155", "text": "function getprimarykey() {\n\t\treturn $this->primarykey;\n\t}", "title": "" }, { "docid": "7ddcba3f3fe9e24293d2b3bd38b41c22", "score": "0.5448996", "text": "function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_mod' => $this->iid_mod);\n }\n return $this->aPrimary_key;\n }", "title": "" }, { "docid": "6aecfb0f9ee43b262ffbd78ab63c5beb", "score": "0.54458725", "text": "public function appointmentPatient()\r\n {\r\n if (!isset($this->appointmentPatient)) {\r\n $this->appointmentPatient = User::find($this->patient);\r\n }\r\n\r\n return $this->appointmentPatient;\r\n }", "title": "" }, { "docid": "d5f91587a439ba52535839159337f200", "score": "0.5431819", "text": "public function primary(): Attributes\n\t{\n\t\treturn $this->instance($this->element->name);\n\t}", "title": "" }, { "docid": "0ab6d32e3d65f13304217248d5ea82df", "score": "0.54218775", "text": "static function retrieveByPK($id) {\n\t\treturn static::retrieveByPKs($id);\n\t}", "title": "" }, { "docid": "0ab6d32e3d65f13304217248d5ea82df", "score": "0.54218775", "text": "static function retrieveByPK($id) {\n\t\treturn static::retrieveByPKs($id);\n\t}", "title": "" }, { "docid": "61fc3db6016c7aa024209e9302ac1698", "score": "0.54058284", "text": "public function getAdditionalId();", "title": "" }, { "docid": "e1ebd50c00b080bc8b8d09fa55c45917", "score": "0.53937095", "text": "public function getPatient()\r\n {\r\n //return $this->hasOne(Patient::className(), ['id_Patient' => 'patient_id']);\r\n\t\treturn $this->hasOne($this->module->modelMap['Patient'], ['id_Patient' => 'patient_id']);\r\n }", "title": "" }, { "docid": "8e9d66bd238c771951faeb8547a98c2c", "score": "0.53835726", "text": "public function getcertfibyid($id){\n // or this code \n $data=model::db()->row(\"select * from certfieds where id=?\",$id);\n // var_dump($data);die;\n return $data;\n }", "title": "" }, { "docid": "d8a78893c791fc22fd506115e5dcb2b8", "score": "0.53800666", "text": "function getid($empid)\n\t{\n\t$this->db->select(\"aid\");\n\t$this->db->from(\"tbl_student\");\n $this->db->where(\"Stdid\",$empid);\n\t$result=$this->db->get();\n\t$res=$result->result_array();\n return $res[0]['aid'];\t\n\t}", "title": "" }, { "docid": "9649a2c73ff1ca676f3dd9b57cf52fcc", "score": "0.5376882", "text": "public function get_by_id($id)\n {\n return DB::table($this->table)->where('u_id', $id)->first();\n }", "title": "" }, { "docid": "ebeeb947d1b062975badc8272b5b0c69", "score": "0.5371057", "text": "public function getId() {return $this->attrib('id');}", "title": "" }, { "docid": "1118e78c4f57a3ab45b4ef82837847b0", "score": "0.5361135", "text": "public function getPk() {\n\t\treturn $this->studentID;\n\t}", "title": "" }, { "docid": "d67cbc24fd8f70f07d7d6077ca5d2c77", "score": "0.53607076", "text": "public function getPatient()\n {\n return $this->hasOne(Patient::className(), ['patient_id' => 'patient_id']);\n }", "title": "" }, { "docid": "d67cbc24fd8f70f07d7d6077ca5d2c77", "score": "0.53607076", "text": "public function getPatient()\n {\n return $this->hasOne(Patient::className(), ['patient_id' => 'patient_id']);\n }", "title": "" }, { "docid": "18377bcf8d750e9d1ea76f187c14beb1", "score": "0.53592825", "text": "public function primary_key();", "title": "" }, { "docid": "9e09ba2ea675c9cf626b2a76b364afcb", "score": "0.53544563", "text": "function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_activ' => $this->iid_activ, 'id_nom' => $this->iid_nom);\n }\n return $this->aPrimary_key;\n }", "title": "" }, { "docid": "06e20c0050641e516aaba27ba0e2b809", "score": "0.53493637", "text": "public function get_single($id);", "title": "" }, { "docid": "048f4ffcc08dc9095d9e8a08e0e1e1e3", "score": "0.5345462", "text": "public function retrieveById($identifier){\n return $this->model::where(\"id\", $identifier)->first();\n }", "title": "" }, { "docid": "6f67d1087aabe822c66ce999030cb0ea", "score": "0.53401655", "text": "public function find($primary);", "title": "" }, { "docid": "bc7f66ef5507882a3f65d1239756b978", "score": "0.53400487", "text": "protected function getPrimaryData()\n {\n return $this->toResourceLinkage();\n }", "title": "" }, { "docid": "69df0c0816df7e7779e5577f85d6016a", "score": "0.53358877", "text": "public function getId() {\n\n return $this->a_id;\n\n }", "title": "" }, { "docid": "a2da472e5307a860ecdc022a3205fc1d", "score": "0.5333109", "text": "public function getId()\n\t{\n\t\t$name = $this->getIdName();\n return $this->attributes[$name];\n\t}", "title": "" }, { "docid": "752d6e47395119ab07703274c0cf71cf", "score": "0.5326428", "text": "function get_event_attendance( $id )\n {\n $this->db->select('cadetEvent.pt, cadetEvent.llab, cadet.lastName, cadetEvent.name, attendance.excused_absence, attendance.time');\n $this->db->from('attendance');\n $this->db->join('cadet', 'cadet.rin = attendance.rin');\n $this->db->join('cadetEvent', 'cadetEvent.eventID = attendance.eventid');\n $this->db->where('attendance.eventid', $id);\n \n $query = $this->db->get();\n return $query->result_array();\n }", "title": "" }, { "docid": "1c1cabde1a029ca52de7df64813669fe", "score": "0.53235084", "text": "function getOneRecordFromTablePatients($patientID)\n{\n\t//require connection\n\trequire('includes/conn.inc.php');\n\n\t//sql query and select the one you want to get\n\t$sql = \"SELECT * FROM patients WHERE patientID = $patientID\";\n\n\t//prepare query and run\n\t$stmt = $pdo->prepare($sql);\n\n\tif($stmt->execute()){\n\t\techo \"<div class='alert alert-success'>Got one record from table.</div>\";\n\t}else{\n\t\techo \"<div class='alert alert-danger'>Unable to get one record.</div>\";\n\t}\n\n\t//store retrieved row from db to variable\n\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\treturn $row;\n}", "title": "" }, { "docid": "0ecaa5e4c16c104097806d1cfad8d9e6", "score": "0.53232926", "text": "function get_attendance($at_id)\n {\n return $this->db->get_where('Attendance',array('at_id'=>$at_id))->row_array();\n }", "title": "" }, { "docid": "6e0d1079956dc43c7874bf6e3adc5c90", "score": "0.5317558", "text": "public function byIdentification($identifier)\n {\n try {\n return $this->model->where('identification', $identifier)\n ->first();\n } catch (\\PDOException $e) {\n Log::error('There was a problem: '.$e->getMessage());\n }\n }", "title": "" }, { "docid": "6cc9f00ae7c5fed468c992bcc065fd00", "score": "0.5317134", "text": "public function id () { return $this->attr['id']; }", "title": "" }, { "docid": "97c9420b29e20a3d04116320a97f7ca8", "score": "0.53135824", "text": "public function show($id)\n {\n \n $primary = education_csa_primaryschoolenrollmentbyclasssexandsubcounty_model::findOrfail($id);\n \n \n echo json_encode($primary);\n }", "title": "" }, { "docid": "aa6af87f00813ef9b525323cb03d205a", "score": "0.53121424", "text": "public function getOne($id){\n $result = $this->alias('diary')\n ->join('user','user.id = diary.uid')\n ->join('book','book.uid = user.id')\n ->where('diary.id','=',$id)\n ->field('user.name username,user.photo photo,user.user_code,diary.content,diary.create_time,book.id book_id,book.book_name')\n ->order('diary.create_time','desc')\n ->find();\n return $result;\n }", "title": "" }, { "docid": "d0c5bbfa5ed54636cc34f6858a73e64d", "score": "0.53096855", "text": "public function get_attraction($id);", "title": "" }, { "docid": "f4f6a6dd7c3f625f766b69ccddef0a6d", "score": "0.5304406", "text": "public function getPrimaryKey() { \n return $this->fields[$this->primary]; \n }", "title": "" }, { "docid": "a7b1c669fdaa98b028926fce05359b7c", "score": "0.5300493", "text": "public function get($primary_Key)\n {\n \n if(isset($this->allObjects[$primary_Key]))\n {\n return $this->allObjects[$primary_Key]; \n } \n }", "title": "" }, { "docid": "3e5fb77ab0e3b5bddb569b01c5ef0b32", "score": "0.52996683", "text": "public static function primary_key_field() {\n\t\treturn static::$db_fields[0];\n\t}", "title": "" }, { "docid": "3710182ce41b422feb6590f22333097a", "score": "0.5298583", "text": "public function getOne($id);", "title": "" }, { "docid": "5183370f5f7568574f36200352d38be2", "score": "0.529353", "text": "public function getStudentByID($id) {\n return Student::where('id', '=', $id)->first();\n }", "title": "" }, { "docid": "8176b50dc0d7244577044df5b312eac4", "score": "0.5290784", "text": "public function showPatientById($id)\n {\n $dbh = $this->connectDatabase();\n $fetch = $dbh->query(\"select * from patients where id ={$id};\")->fetch(PDO::FETCH_ASSOC);\n return $fetch;\n }", "title": "" }, { "docid": "3e65b09fe2cb7a7e93841f0ca1ea0dde", "score": "0.5275432", "text": "public function getPrimaryKey(): string;", "title": "" }, { "docid": "5446fbbb8cbbde469b3e11fadeae9bd0", "score": "0.5274103", "text": "public function find_by_id( $id ) {\n\t\treturn $this->find_one( array( 'p' => $id ) );\n\n\t}", "title": "" }, { "docid": "465833ff44f8e3eeb3d140eb02a9c2b7", "score": "0.52724177", "text": "public function attendane()\n {\n return $this->hasOne('App\\Models\\Attendance');\n }", "title": "" }, { "docid": "307aaa6b67ef10e35aa922ffb9b3ab6e", "score": "0.52680653", "text": "public function getPatient()\n {\n return $this\n ->hasOne(User::className(), ['id' => 'patient_id']);\n }", "title": "" }, { "docid": "ff1555866e5dd95260c18c29a54cd411", "score": "0.5263268", "text": "public function getOne($id){\n $builder = $this->db->table('tbl_users');\n $builder->where('uniid', $id);\n $result = $builder->get();\n return $result->getRow();\n }", "title": "" }, { "docid": "7862c01cc5190c04d6b093d007fc850a", "score": "0.5255478", "text": "public function president()\n {\n return $this->hasOne(User::class, 'id', 'president_id');\n }", "title": "" }, { "docid": "48ba0120e3c21acba7c6b2f104b76951", "score": "0.5252644", "text": "public function getPrimaryId()\n\t{\n\t\t$calendar = $this->getCalendarById('primary');\n\t\treturn !empty($calendar) ? $calendar['id'] : '';\n\t}", "title": "" }, { "docid": "5cd36f57defe403fa1161e488237edad", "score": "0.5247803", "text": "public function getAttributesId(){\n\t\treturn $this->attributes_id;\n\t}", "title": "" }, { "docid": "aed7a12934a1afdf563443418005318a", "score": "0.5242383", "text": "public function getId()\n {\n return $this->attributes['id'];\n }", "title": "" }, { "docid": "1f5341bb5f2923d1485d76f203589b4f", "score": "0.52393526", "text": "public function getSecondaryIdentifier();", "title": "" }, { "docid": "79b643afae27417c1a6db475494fe998", "score": "0.52368665", "text": "public function propietario($id)\r\n\t{\r\n \r\n\t\treturn $id;\r\n }", "title": "" }, { "docid": "c71f79990bf4ef94123f21d6f1168bb2", "score": "0.5224643", "text": "public function findFirst($id)\n {\n return $this->find($id)->first();\n }", "title": "" }, { "docid": "2ff3a02ecf95edc609ffdef8077584ef", "score": "0.522396", "text": "public function get_single_student(){\n $sql_query=\"SELECT * from \".$this->table_name.\" WHERE id = ?\";\n\n // prepare stataement\n $obj=$this->conn->prepare($sql_query); //prepare statement;\n $obj->bind_param(\"i\", $this->id); //bind parameters with te hprepared stsatement\n $obj->execute();\n $data=$obj->get_result();\n return $data->fetch_assoc();\n \n }", "title": "" }, { "docid": "273714c0d94aa692ac70c9d3a805f01d", "score": "0.5212346", "text": "public function get_by_id($id)\n {\n $this->db->join('psr_users','psr_users.ID=psr_documents.doc_author');\n $this->db->where($this->primary_key,$id);\n $query = $this->db->get($this->table);\n return $query->row();\n }", "title": "" }, { "docid": "18cab99dff94d43d4317846bcd358ba1", "score": "0.5203563", "text": "public function primarykey()\n {\n return $this->primaryKey;\n }", "title": "" }, { "docid": "ae98756e3a91ba4c4822d54e29c3737a", "score": "0.520045", "text": "public function getAttributeID()\n {\n return $this->attributeID;\n }", "title": "" }, { "docid": "ae98756e3a91ba4c4822d54e29c3737a", "score": "0.520045", "text": "public function getAttributeID()\n {\n return $this->attributeID;\n }", "title": "" }, { "docid": "ca7fc7d5071ec507df66ada55d71a58a", "score": "0.5198793", "text": "public function getPrimary(): string;", "title": "" }, { "docid": "3efe6add9b1e3ec00c4144d5e5a7af7a", "score": "0.51981974", "text": "function get_attendance($id, $kwds) {\n $id = mysqli_real_escape_string($this->connection, $id); \n $kwds = mysqli_real_escape_string($this->connection, $kwds); \n $return = $this->query(\"SELECT user_id, arrival, departure, kwds_id FROM attendance WHERE user_id=$id AND kwds_id=$kwds\");\n if ($return) return $return[0];\n else return array();\n }", "title": "" }, { "docid": "9b71c9f1ff670a57cde856016d7bedb7", "score": "0.5196694", "text": "static function retrieveByPK($id) {\n\t\treturn User::retrieveByPKs($id);\n\t}", "title": "" }, { "docid": "6f62eb530380c07f302e47be02e6a3eb", "score": "0.5184951", "text": "public function getId_annonce()\n {\n return $this->id_annonce;\n }", "title": "" }, { "docid": "6f62eb530380c07f302e47be02e6a3eb", "score": "0.5184951", "text": "public function getId_annonce()\n {\n return $this->id_annonce;\n }", "title": "" }, { "docid": "5b4cc87f5910a2c2f6f70eb52201869f", "score": "0.51826054", "text": "function recupererAnnonceID($id) : Annonce {\r\n $int_id = (int) $id;\r\n $res = $this->db->query(\"SELECT * FROM Annonce WHERE id='$id'\");\r\n $annonce = $res->fetchAll(PDO::FETCH_CLASS|PDO::FETCH_PROPS_LATE,'Annonce');\r\n return $annonce[0];\r\n }", "title": "" }, { "docid": "1e39ba90e9c82ed2858197320e99008f", "score": "0.5181359", "text": "function getLastPrimaryKey($conn,$table,$primary='*'){\n $query = \"SELECT $primary FROM $table\";\n $result = getResult($conn,$query);\n while (($row=mysqli_fetch_array($result,MYSQLI_ASSOC)) != false)\n $last = $row;\n //If we are not looking for a specific attribute,\n if($primary==='*' && isset($last)){\n //Get the values into an indexed array (non-associative)\n $vals=array_values($last);\n //Return the first element\n return isset($vals)? $vals[0] : 0;\n }\n else\n return isset($last)? $last[$primary] : 0;\n }", "title": "" }, { "docid": "b3e5436e22a37ab74ea76b910f8fe1cf", "score": "0.5179635", "text": "public function getByID($id)\n {\n return $this->where(['is_active' => 1, 'id' => $id])->get()->first();\n }", "title": "" }, { "docid": "3b59af41d9a4f1871f97885d227f5e78", "score": "0.5178218", "text": "public function getKey($id) {\n\t try {\n\t return $this->getKeyData(self::$db->find('*', array('id'=>$id)));\n\t } catch(Exception $e) {\n\t throw $e;\n\t }\n\t}", "title": "" } ]
0f592929692a03e0c5119af8f6fb6763
Returns SQL WHERE query for previous fiscal quarter filter in regard to fiscal start date and current date
[ { "docid": "5c07aefd247b4abde4b5b0b9c83366e3", "score": "0.70320284", "text": "public function queryFiltertp_previous_fiscal_quarter($layout_def)\n {\n return $this->getFiscalYearFilter($layout_def, '-3 month', '');\n }", "title": "" } ]
[ { "docid": "0c03746dcbd4a0e94c4f943cbb5177b3", "score": "0.6573585", "text": "public function queryFiltertp_current_fiscal_quarter($layout_def)\n {\n return $this->getFiscalYearFilter($layout_def, '', '+3 month');\n }", "title": "" }, { "docid": "c867184741640d5e8318b01fb39e0e1b", "score": "0.6330906", "text": "public function queryFiltertp_next_fiscal_quarter($layout_def)\n {\n return $this->getFiscalYearFilter($layout_def, '+3 month', '+6 month');\n }", "title": "" }, { "docid": "4903ef7dd40575f3a6a89e77b1ad3408", "score": "0.62235427", "text": "public function queryFilterTP_next_quarter($layout_def)\n {\n return $this->getQuarterFilter($layout_def, '+3 month');\n }", "title": "" }, { "docid": "61f16a8b42f9670a13615d3081ec13db", "score": "0.59914464", "text": "public function queryFilterTP_last_quarter($layout_def)\n {\n return $this->getQuarterFilter($layout_def, '-3 month');\n }", "title": "" }, { "docid": "8be7e64d8762b9125e46cb082ca0a8ef", "score": "0.5826302", "text": "public function queryFiltertp_previous_fiscal_year($layout_def)\n {\n return $this->getFiscalYearFilter($layout_def, '-1 year', '');\n }", "title": "" }, { "docid": "bb156d5ada87421fe0406673a1601c0d", "score": "0.57817215", "text": "public function queryFilterTP_this_quarter($layout_def)\n {\n return $this->getQuarterFilter($layout_def, '');\n }", "title": "" }, { "docid": "6bbf4c6159ccc3e738983e69f8e73474", "score": "0.57791924", "text": "private function get_dates_of_quarter($quarter = 'current', $year = null, $format = null)\n\t{\n\t\tif ( !is_int($year) ) { \n\t\t\t$year = (new DateTime)->format('Y');\n\t\t}\n\t\t$current_quarter = ceil((new DateTime)->format('n') / 3);\n\t\tswitch ( strtolower($quarter) ) {\n\t\t\tcase 'this':\n\t\t\tcase 'current':\n\t\t\t$quarter = ceil((new DateTime)->format('n') / 3);\n\t\t\tbreak;\n\n\t\t\tcase 'previous':\n\t\t\t$year = (new DateTime)->format('Y');\n\t\t\tif ($current_quarter == 1) {\n\t\t\t\t$quarter = 4;\n\t\t\t\t$year--;\n\t\t\t} else {\n\t\t\t\t$quarter = $current_quarter - 1;\n\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase 'first':\n\t\t\t$quarter = 1;\n\t\t\tbreak;\n\n\t\t\tcase 'last':\n\t\t\t$quarter = 4;\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t$quarter = (!is_int($quarter) || $quarter < 1 || $quarter > 4) ? $current_quarter : $quarter;\n\t\t\tbreak;\n\t\t}\n\t\tif ( $quarter === 'this' ) {\n\t\t\t$quarter = ceil((new DateTime)->format('n') / 3);\n\t\t}\n\t\t$start = new DateTime($year.'-'.(3*$quarter-2).'-1 00:00:00');\n\t\t$end = new DateTime($year.'-'.(3*$quarter).'-'.($quarter == 1 || $quarter == 4 ? 31 : 30) .' 23:59:59');\n\n\t\treturn array(\n\t\t\t'start' => $format ? $start->format($format) : $start,\n\t\t\t'end' => $format ? $end->format($format) : $end,\n\t\t);\n\t}", "title": "" }, { "docid": "bf75087ea4ea3b72613aa6a39097c634", "score": "0.57720125", "text": "private function getYearAndQuaterQuery($form, $data) { \n $timelimiting = '';\n $year = $data['year']; \n $quater = $data['quater'] + 1;\n\n $startmonth = (($quater * 3) - 2);\n if ( iconv_strlen($startmonth+\"\")==1 ) { \n $startmonth = '0'. $startmonth; \n }\n\n $stopmonth = ($quater * 3);\n if ( iconv_strlen($stopmonth+\"\")==1 ) { \n $stopmonth = '0'. $stopmonth; \n }\n\n $startday = '01';\n $stopday = cal_days_in_month(CAL_GREGORIAN, $stopmonth, $year); \n\n // correct stop day to be used in date needs format 04 for fourth day\n if ( iconv_strlen($stopday+\"\")==1 ) { \n $stopday = '0' . $stopday; \n } \n $startdate = $year . \"-\" . $startmonth . \"-\" . $startday;\n $stopdate = $year . \"-\" . $stopmonth . \"-\" . $stopday;\n // create query\n $timelimiting = \" and tr.timestart > '\" . $startdate . \" 00:00:00'\";\n $timelimiting .= \" and tr.timestop < '\" . $stopdate . \" 00:00:00' \";\n\n // set selected in form\n $form->get('year')->setValue($year);\n $form->get('quater')->setValue(($quater-1));\n return $timelimiting; \n }", "title": "" }, { "docid": "535e522f7e0967464d2da6011ed3c629", "score": "0.569726", "text": "private function getQueryStringDate() {\n\t\tif($this->date) {\n\t\t\treturn $this->date . '['.$this->qType.']';\n\t\t}\n\t\t$startDate = (new DateTime('-14 days'))->format('Ymd');\n\t\t$endDate = (new DateTime('tomorrow'))->format('Ymd');\n\t\t$qDate = '`'.$this->qType.' > '.$startDate.' < '.$endDate;\n\t\treturn $qDate;\n\t}", "title": "" }, { "docid": "5561e08e04812268bc039a09f336243e", "score": "0.55791813", "text": "public function quarterly(): self;", "title": "" }, { "docid": "fe86d7b8e2b972550254ba04ce168fc0", "score": "0.54773676", "text": "public function querySelectfiscalQuarter($layout_def)\n {\n return $this->queryGroupByFiscalQuarter($layout_def) . \" \" . $this->_get_column_alias($layout_def) . \"\\n\";\n }", "title": "" }, { "docid": "f99579ecab9b52517caa6a3ad5b453e0", "score": "0.5471116", "text": "public function filterCurrentYear($df) {\n if (!($df instanceof DibiFluent))\n throw new Exception('Argument #1 has to be type of DibiFluent');\n\n if (date('n') >= 8)\n return $df->where('year >= YEAR(CURDATE()) AND year <= YEAR(CURDATE())+1');\n else\n return $df->where('year >= YEAR(CURDATE())-1 AND year <= YEAR(CURDATE())');\n }", "title": "" }, { "docid": "2fbeb401cae2e8bf24287f98b66f1ba9", "score": "0.5470805", "text": "function filter_future( $where = '' )\n\t\t\t\t{\n\t\t\t\t\t$future_date = date('Y-m-d', strtotime(get_the_date( 'Y-m-d' ).\" +1 day\"));\n\t\t\t\t\t// posts in the last x days\n\t\t\t\t\t$where .= \" AND post_date >= '\" . $future_date . \"'\";\n\t\t\t\t\treturn $where;\n\t\t\t\t}", "title": "" }, { "docid": "f6e42a31737a6820a5a7600f29d6ce37", "score": "0.5406047", "text": "protected function getQuarterFilter($layout_def, $modifyFilter, $date = '')\n {\n $timedate = TimeDate::getInstance();\n\n $convert = $this->isDateTimeField($layout_def['type']);\n\n // See if date is set, if not, use current date\n if (empty($date)) {\n $begin = $timedate->getNow($convert);\n } else {\n $begin = $timedate->fromString($date);\n }\n\n $begin->setDate(\n $begin->year,\n floor(($begin->month - 1) / 3) * 3 + 1, // Find starting month of quarter\n 1\n )->setTime(0, 0);\n\n $end = $begin->get(\"+3 month\");\n\n // Modify begin/end if filter is set\n if (!empty($modifyFilter)) {\n $begin->modify($modifyFilter);\n $end->modify($modifyFilter);\n }\n\n $end = $end->get(\"-1 day\")->setTime(23, 59, 59);\n\n return $this->get_start_end_date_filter($layout_def, $begin, $end);\n }", "title": "" }, { "docid": "33fa06b4f1a188965ac613b1d43424b9", "score": "0.5367792", "text": "function updateFinanceQuarters(){\n $vendors = $this->Vendors->find('all')\n ->hydrate(false)\n ->contain(['Financialquarters'])\n ->where(['Vendors.status' => 'Y']);\n foreach($vendors as $vendor){\n if(isset($vendor['financialquarters']) && !empty($vendor['financialquarters'])){\n \n /*\n * If current date is inside a quarter no need to have a new entry\n */\n $qrter = $this->Financialquarters->find('all')\n ->where(['Financialquarters.vendor_id'=>$vendor['id'],'Financialquarters.enddate > '=>time()])\n ->order(['Financialquarters.enddate '=> 'ASC']);\n $skipflag = 0;\n foreach($qrter as $qt){\n $skipflag ++;\n \n }\n //echo $last_qrtr_number;exit;\n $i=4 - $skipflag;\n \n if($i > 0){\n\t \n $this->__createquarters($vendor['financial_quarter_start_month'],$i,$vendor['id']);\n }\n\n\t } else{\n\t\t\t\techo \"IN\";\n $this->__createquarters($vendor['financial_quarter_start_month'],4,$vendor['id']);\n\t \n\t }\n }\n \n return true;\n\n }", "title": "" }, { "docid": "075b867b3c6c665d733d330d8451a8d7", "score": "0.52867657", "text": "public function check_quarterly_earnings($date_quarter, $registered_brgy_id)\n\t{\n\t\t$query = \"\n\t\tSELECT ((SUM(amount_paid) - SUM(monthly_loan_repayment) + SUM(penalty_paid)) - SUM(rebate)) AS loan_earnings, TIMESTAMPDIFF(DAY,CURDATE(),'$date_quarter') AS end_quarter\n\t\tFROM borrower_monthly_repayments\n\t\tWHERE amount_paid > monthly_loan_repayment\n\t\tAND is_commission_counted = 0\n\t\tAND registered_brgy_id = $registered_brgy_id\n\t\tAND TIMESTAMPDIFF(DAY,CURDATE(),'$date_quarter') < 1\";\n\t\t$result = $this->db->query($query);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "b928136b7cf61d866c6c6a6444aa2628", "score": "0.52607566", "text": "private function get_filter_by_stock_status_query()\n {\n }", "title": "" }, { "docid": "b928136b7cf61d866c6c6a6444aa2628", "score": "0.52607566", "text": "private function get_filter_by_stock_status_query()\n {\n }", "title": "" }, { "docid": "28d9928ae03d7c9597c70119d28569e7", "score": "0.5231538", "text": "function Quarter($qDate=\"\",$dateTime=\"\")\r\n\t{\r\n\t\tif ($dateTime) $this->SetDate($dateTime);\t\t\r\n\t\tswitch($this->Month())\r\n\t\t{\r\n\t\tcase 1: case 2: case 3: return 1;break;\r\n\t\tcase 4: case 5: case 6: return 2; break;\r\n\t\tcase 7: case 8: case 9: return 3; break;\r\n\t\tcase 10: case 11: case 12: return 4;break;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9217fc747c268dafc31d82861798d6df", "score": "0.51328295", "text": "function __createquarters($strtmonth=null,$i=4,$vid=0){\n $current_month = date('m');\n $qrter = $this->Financialquarters->find('all')\n ->where(['vendor_id'=>$vid,'enddate > '=>time()])\n ->order(['enddate '=> 'DESC'])\n ->limit(1);\n if($qrter->count()>0){\n // This vendor should have some entry in the table, so we can get the start date from the last quarted end date...\n foreach($qrter as $prqtr){\n $new_qtr_start_date = date(\"Y-m-d H:i:s\", strtotime(date(\"Y-m-d H:i:s\", strtotime($prqtr->enddate))));\n $new_qtr_end_date = date(\"Y-m-d H:i:s\", strtotime(date(\"Y-m-d H:i:s\", strtotime($new_qtr_start_date)) . \" + 3 MONTHS\"));\n }\n }else{\n $new_qtr_start_date = $this->findcurrentquarterstartdate($strtmonth);\n $new_qtr_end_date = date(\"Y-m-d H:i:s\", strtotime(date(\"Y-m-d H:i:s\", strtotime($new_qtr_start_date)) . \" + 3 MONTHS\"));\n }\n\n $qrter_all = $this->Financialquarters->find('all')\n ->where(['vendor_id'=>$vid])\n ->order(['enddate '=> 'DESC'])\n ->limit(1);\n\n if($qrter_all->count()>0) {\n $qrtr = $qrter_all->first();\n $qrtr_title = $qrtr->quartertitle;\n\n preg_match('|([A-Za-z]+?)(\\s?)([0-9])(\\s?)\\(([0-9]+?)\\)|i', $qrtr_title, $q);\n\n $i_qtr_num = ( $q[3] == '4' ? 0 : $q[3] );\n $i_qtr_yr = ( $q[3] == '4' ? $q[5] + 1 : $q[5] );\n }\n else\n {\n $i_qtr_num = 0;\n $i_qtr_yr = date('Y',strtotime($new_qtr_end_date));\n }\n\n $qtr_yr = $i_qtr_yr;\n $qtr_num = $i_qtr_num;\n for($j=0;$j<$i;$j++){\n $qtr_num++;\n $qtr[$j]['startdate'] = $new_qtr_start_date;\n $qtr[$j]['enddate'] = date(\"Y-m-d H:i:s\", strtotime($new_qtr_end_date . ' - 1 DAY'));\n $qtr[$j]['vendor_id'] = $vid;\n $qtr[$j]['quartertitle'] = __('Q'.$qtr_num.' ('.$qtr_yr.')');//__('Financial quarter ').date('M',strtotime($new_qtr_start_date)).' '.date('Y',strtotime($new_qtr_start_date)).' - '.date('M',strtotime($new_qtr_end_date)).' '.date('Y',strtotime($new_qtr_end_date));\n $new_qtr_start_date = $new_qtr_end_date;\n $new_qtr_end_date = date(\"Y-m-d H:i:s\", strtotime(date(\"Y-m-d H:i:s\", strtotime($new_qtr_start_date)) . \" + 3 months\"));\n\n if($qtr_num == '4') {\n $qtr_num = 0;\n $qtr_yr = $qtr_yr + 1;\n }\n } \n foreach ($qtr as $qt){\n $fqc = $this->Financialquarters->newEntity($qt);\n $fqc_result = $this->Financialquarters->save($fqc); \n }\n return true;\n }", "title": "" }, { "docid": "49757e94fa8662ae73006eec895ec9a9", "score": "0.5123594", "text": "public function queryFiltertp_current_fiscal_year($layout_def)\n {\n return $this->getFiscalYearFilter($layout_def, '', '+1 year');\n }", "title": "" }, { "docid": "b6c07d1e7ec693ac25afdd19cca27c25", "score": "0.51065356", "text": "function _calcQuarters()\r\n\t{\r\n\t\tif ($this->_spandir==1) // start is before stop (positive span)\r\n\t\t{\r\n\t\t\t$dtStart = new DateClass($this->StartDate);\r\n\t\t\t$dtStart = $dtStart->BOQ();\r\n\t\t\t$dtStop = $this->StopDate;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$dtStart = new DateClass($this->StopDate);\r\n\t\t\t$dtStart = $dtStart->BOQ();\r\n\t\t\t$dtStop = $this->StartDate;\r\n\t\t}\r\n\t\t\r\n\t\t//--------------------------------------------------\r\n\t\t//\tcount times crossing period boundries\r\n\t\t//--------------------------------------------------\r\n\t\t$counter =0;\r\n\t\twhile ($dtStart->TimeStamp() < $dtStop->TimeStamp())\r\n\t\t{\r\n\t\t\t$counter++;\t\t\t\r\n\t\t\t$dtStart->Add(\"month\",3);\r\n\t\t}\r\n\t\t$this->_quarters = ($counter-1*$this->_spandir);\r\n\t\t\r\n\t\treturn $this->_quarters;\r\n\r\n\t}", "title": "" }, { "docid": "bcb443e823d0ff4881080aea164a51ee", "score": "0.5103743", "text": "function get_occurs_within_where_clause($table_name, $rel_table, $start_ts_obj, $end_ts_obj, $field_name='date_start', $view){\n\t\tglobal $timedate;\n\t\n\t\t$start = clone $start_ts_obj;\n\t\t$end = clone $end_ts_obj;\n\n\t\t$field_date = $table_name.'.'.$field_name;\n\t\t$start_day = $GLOBALS['db']->convert(\"'{$start->asDb()}'\",'datetime');\n\t\t$end_day = $GLOBALS['db']->convert(\"'{$end->asDb()}'\",'datetime');\n\n\t\t$where = \"($field_date >= $start_day AND $field_date < $end_day\";\n\t\tif($rel_table != ''){\n\t\t\t$where .= \" AND $rel_table.accept_status != 'decline'\";\n\t\t}\n\n\t\t$where .= \")\";\n\t\treturn $where;\n\t}", "title": "" }, { "docid": "95acd1624e4f811c0a33757d33f01f17", "score": "0.5020781", "text": "protected function getSportAndYearDependenceForQuery() {\r\n\t\t$Query = '';\r\n\r\n\t\tif ($this->sportid > 0)\r\n\t\t\t$Query .= ' AND `sportid`='.(int)$this->sportid;\r\n\r\n\t\tif ($this->year > 0)\r\n\t\t\t$Query .= ' AND YEAR(FROM_UNIXTIME(`time`))='.(int)$this->year;\r\n\r\n\t\treturn $Query;\r\n\t}", "title": "" }, { "docid": "e40b08bbfebf7f63a0246a3803f4dd56", "score": "0.50132805", "text": "public function queryFiltertp_next_fiscal_year($layout_def)\n {\n return $this->getFiscalYearFilter($layout_def, '+1 year', '+2 year');\n }", "title": "" }, { "docid": "ac07df4532a055e7c6d59da7d2d2ad05", "score": "0.49995977", "text": "protected function getYearDependenceForQuery($addTableName = false) {\n\t\t$Query = '';\n\t\t$time = $addTableName ? '`'.PREFIX.'training`.`time`' : '`time`';\n\n\t\tif ($this->showsLast6Months()) {\n\t\t\t$Query .= ' AND '.$time.' > '.LocalTime::fromString('first day of -5 months 00:00')->getTimestamp();\n\t\t} elseif ($this->showsLast12Months()) {\n\t\t\t$Query .= ' AND '.$time.' > '.LocalTime::fromString('first day of -11 months 00:00')->getTimestamp();\n\t\t} elseif (!$this->showsAllYears()) {\n\t\t\t$Query .= ' AND '.$time.' BETWEEN UNIX_TIMESTAMP(\\''.(int)$this->year.'-01-01\\') AND UNIX_TIMESTAMP(\\''.((int)$this->year+1).'-01-01\\')-1 ';\n\t\t}\n\n\t\treturn $Query;\n\t}", "title": "" }, { "docid": "bba8b40f5b9be4382178325c3e65df02", "score": "0.49696487", "text": "protected function _buildQueryAddWhere(& $dbQ) {\n if (!empty($this->dbWhere)) {\n $dbQ .= 'WHERE ';\n for ($i = 0; $i < count($this->dbWhere); $i++) {\n $cArr = $this->dbWhere[$i];\n if ($i > 0) {\n $dbQ .= $cArr['operator'] . ' ';\n }\n $dbQ .= $cArr['key'] . ' ' . $cArr['cond'] . ' :' . $cArr['key'] . $i . ' ';\n }\n }\n }", "title": "" }, { "docid": "24b209d03d6bbeea770a5a0d2fdfdddf", "score": "0.49612147", "text": "public function queryGroupByFiscalQuarter($layout_def)\n {\n if (!empty($layout_def['timeperiods_count'])) {\n $tp = \"tp\" . $layout_def['timeperiods_count'] . \".name\";\n $query = $this->reporter->db->convert(\n $this->reporter->db->convert(\n $tp,\n \"substr\",\n array(1, 4)\n ),\n 'CONCAT',\n array(\"'-'\",\n $this->reporter->db->convert(\n $tp,\n \"substr\",\n array(7, 1)\n ),\n )\n );\n\n return $query;\n }\n\n return \"\";\n }", "title": "" }, { "docid": "6b168dbf1917f1be6eea93aa2428d68e", "score": "0.4954726", "text": "function untilQuery($until) \n{\n\tglobal $SQL;\n\n\treturn ' AND '.$SQL['datestamp'].\" <= '$until'\";\n}", "title": "" }, { "docid": "684fd52598e86eec4749b148b9368faa", "score": "0.49053028", "text": "public function getQuarter()\n {\n if ($this->quarter === null) {\n $this->quarter = RegionReportingDate::ensure($this->center->region, $this->reportingDate)->getQuarter();\n }\n\n return $this->quarter;\n }", "title": "" }, { "docid": "2c2c47e64335d39b5c8e5d64ad58e8f5", "score": "0.4883708", "text": "protected function get_where_clause()\n {\n }", "title": "" }, { "docid": "c53e2a5e81b3849697575508902e0233", "score": "0.48806962", "text": "public static function get_main_date_query() {\n $date_query = isset( self::$movie_query->date_query, self::$movie_query->date_query->queries ) ? self::$movie_query->date_query->queries : array();\n\n return $date_query;\n }", "title": "" }, { "docid": "f8c6b432e829de31d9209f8dc55b1420", "score": "0.4880682", "text": "public function getROIs($data) {\n\t\ttry {\n\t\t\t$previousMonth = date(\"Y-m-01\",mktime(0,0,0,date('m')-1,date('d'),date('Y')));\n\t\t\t$financialYear = date(\"Y-m-d\",mktime(0,0,0,date('m')-12,date('d'),date('Y')));\n\t\t\t\n\t\t\t$where \t\t = 1;\n\t\t\t$filterparam = '';\n\t\t\tif ($_SESSION['AdminLevelID'] != 1) {\n\t\t\t\t$this->getHeadquarters($_SESSION['AdminLoginID']);\n\t\t\t\t$where = 'DT.headquater_id IN ('.implode(',',array_unique($this->_headquarters)).')';\n\t\t\t}\n\t\t\t\n\t\t\t//Filter With ZBM Data\n\t\t\tif(!empty($data['token6'])){\n\t\t\t\t$where = '1';$this->_headquarters = array();\n\t\t\t\t$this->getHeadquarters(Class_Encryption::decode($data['token6']));\n\t\t\t\t$filterparam .= ' AND DT.headquater_id IN ('.implode(',',array_unique($this->_headquarters)).')';\n\t\t\t}\n\t\t\t//Filter With RBM Data\n\t\t\tif(!empty($data['token5'])){\n\t\t\t\t$where = '1';$this->_headquarters = array();\n\t\t\t\t$this->getHeadquarters(Class_Encryption::decode($data['token5']));\n\t\t\t\t$filterparam .= ' AND DT.headquater_id IN ('.implode(',',array_unique($this->_headquarters)).')';\n\t\t\t}\n\t\t\t//Filter With ABM Data\n\t\t\tif(!empty($data['token4'])){\n\t\t\t\t$where = '1';$this->_headquarters = array();\n\t\t\t\t$this->getHeadquarters(Class_Encryption::decode($data['token4']));\n\t\t\t\t$filterparam .= ' AND DT.headquater_id IN ('.implode(',',array_unique($this->_headquarters)).')';\n\t\t\t}\n\t\t\t//Filter With BE Data\n\t\t\tif(!empty($data['token3'])){\n\t\t\t\t$where = '1';$this->_headquarters = array();\n\t\t\t\t$this->getHeadquarters(Class_Encryption::decode($data['token3']));\n\t\t\t\t$filterparam .= ' AND DT.headquater_id IN ('.implode(',',array_unique($this->_headquarters)).')';\n\t\t\t}\n\t\t\t//Filter With Headquarter Data\n\t\t\tif(!empty($data['token2'])){\n\t\t\t\t$where = '1';\n\t\t\t\t$filterparam .= \" AND DT.headquater_id='\".Class_Encryption::decode($data['token2']).\"'\";\n\t\t\t}\n\t\t\t//Filter With Doctor Data\n\t\t\tif(!empty($data['token1'])){\n\t\t\t\t$filterparam .= \" AND AT.doctor_id='\".Class_Encryption::decode($data['token1']).\"'\";\n\t\t\t}\n\t\t\t//Filter With CRM Activity (Expense) Type\n\t\t\tif(!empty($data['activitytoken'])){\n\t\t\t\t$filterparam .= \" AND AT.expense_type='\".Class_Encryption::decode($data['activitytoken']).\"'\";\n\t\t\t}\n\t\t\t//Filter With Date Range\n\t\t\tif(!empty($data['from_date']) && !empty($data['to_date'])){\n\t\t\t\t$filterparam .= \" AND DATE(AT.created_date) BETWEEN '\".$data['from_date'].\"' AND '\".$data['to_date'].\"'\";\n\t\t\t}\n\t\t\t\n\t\t\t//Order\n\t\t\t$orderlimit = CommonFunction::OdrderByAndLimit($data,'AT.created_date');\n\t\t\t\n\t\t\t$countQuery = $this->_db->select()\n\t\t\t\t\t\t\t->from(array('AT'=>'crm_appointments'),array('COUNT(1) AS CNT'))\n\t\t\t\t\t\t\t->joininner(array('DT'=>'crm_doctors'),\"DT.doctor_id=AT.doctor_id\",array())\n\t\t\t\t\t\t\t->where($where.$filterparam)\n\t\t\t\t\t\t\t->where(\"AT.business_audit_status='1'\")\n\t\t\t\t\t\t\t->where(\"AT.isActive='1'\")\n\t\t\t\t\t\t\t->where(\"AT.isDelete='0'\")\n\t\t\t\t\t\t\t->group('AT.doctor_id')\n\t\t\t\t\t\t\t->group('AT.doctor_id')\n\t\t\t\t\t\t\t->order($orderlimit['OrderBy'].' '.$orderlimit['OrderType']); //print_r($countQuery->__toString());die;\n\t\t\t$total = $this->getAdapter()->fetchAll($countQuery);\n\t\t\t\t\n\t\t\t$query = $this->_db->select()\n\t\t\t\t\t ->from(array('AT'=>'crm_appointments'),array('AT.doctor_id','AT.abm_id','AT.rbm_id','AT.zbm_id','expenseCost'=>'SUM(AT.expense_cost)','crmAmount'=>'SUM(AT.total_value)','roiAmount'=>'getRoiAmount(AT.doctor_id)'))\n\t\t\t\t\t ->joininner(array('DT'=>'crm_doctors'),\"DT.doctor_id=AT.doctor_id\",array('DT.doctor_name'))\n\t\t\t\t\t ->where($where.$filterparam)\n\t\t\t\t\t ->where(\"AT.business_audit_status='1'\")\n\t\t\t\t\t ->where(\"AT.isActive='1'\")\n\t\t\t\t\t ->where(\"AT.isDelete='0'\")\n\t\t\t\t\t ->group('AT.doctor_id')\n\t\t\t\t\t ->order($orderlimit['OrderBy'].' '.$orderlimit['OrderType'])\n\t\t\t\t\t ->limit($orderlimit['Toshow'],$orderlimit['Offset']); //echo $query->__toString();die;\n\t\t\t$result = $this->getAdapter()->fetchAll($query);\n\t\t\treturn array('Total'=>$total[0]['CNT'],'Records'=>$result,'Toshow'=>$orderlimit['Toshow'],'Offset'=>$orderlimit['Offset']);\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\t$_SESSION[ERROR_MSG] = 'There is some error, please try again !!'; \n\t\t}\n\t}", "title": "" }, { "docid": "2ab43cf98c47f2dd35795252cd77b286", "score": "0.48794994", "text": "public function getPreviousCustomerQuery($where_clause) {\n\n\t\t$query = 'SELECT\n\t\t\t\tap.application_id AS application_id,\n\t\t\t\tap.date_application_status_set AS date_application_status_set,\n\t\t\t\tap.date_created AS date_created,\n\t\t\t\tcp.name_short AS company,\n\t\t\t\tap.application_status_id AS application_status_id,\n\t\t\t\tast.application_status_name AS application_status,\n\t\t\t\tap.olp_process AS olp_process,\n\t\t\t\tap.bank_aba AS bank_aba,\n\t\t\t\tap.bank_account AS bank_account,\n\t\t\t\tap.name_first AS name_first,\n\t\t\t\tap.name_last AS name_last,\n\t\t\t\tap.ssn AS ssn,\n\t\t\t\tap.date_first_payment AS date_first_payment,\n\t\t\t\tap.dob AS date_of_birth,\n\t\t\t\tap.email AS email,\n\t\t\t\tsubstr(ap.ssn,7,4) AS ssn_last4\n\t\t\tFROM application AS ap\n\t\t\t\tJOIN company AS cp USING (company_id)\n\t\t\t\tJOIN application_status AS ast USING (application_status_id) ';\n\t\t\t\t\n\t\t$query .= $where_clause.\" ORDER BY ap.application_id ASC\";\n\t\t$result = $this->db->query($query);\n\t\treturn($result->fetchAll(DB_IStatement_1::FETCH_OBJ));\n\t}", "title": "" }, { "docid": "6bede27b0d26d455f3eb9ce9d9136c04", "score": "0.4877814", "text": "public function scopeInFuture($query){\n return $query->where('end','>=', date('Y-m-d H:i:s'));\n }", "title": "" }, { "docid": "44113459cf1238b19c14d32508255fb5", "score": "0.48559946", "text": "public function scopePreviousMonth($query)\n {\n return $query\n ->whereDate('issue_date', '>=', now()->subMonth()->firstOfMonth())\n ->whereDate('issue_date', '<', now()->firstOfMonth());\n }", "title": "" }, { "docid": "9207d8226f5b013879e806f22b228bb5", "score": "0.48267168", "text": "public function getFiscalDQtr() {\n return $this->fiscalDQtr;\n }", "title": "" }, { "docid": "520acb0a36484f47a47e1469b53a619d", "score": "0.4825151", "text": "public function queryOrderByQuarter($layout_def)\n {\n $column = $this->_get_column_select($layout_def);\n $orderBy = $this->reporter->db->convert(\n $this->reporter->db->convert($column, \"date_format\", array('%Y')),\n 'CONCAT',\n array(\"'-'\", $this->reporter->db->convert($column, \"quarter\"))\n );\n\n\n if (empty($layout_def['sort_dir']) || $layout_def['sort_dir'] == 'a')\n {\n return $orderBy . \" ASC\\n\";\n }\n else\n {\n return $orderBy . \" DESC\\n\";\n }\n }", "title": "" }, { "docid": "86be8cc2471202abbf2f0c963321a094", "score": "0.47990164", "text": "function getPreviousDate($trade_date) {\n\t#$query .= \"(select trade_date_id - 1 from price_history where symbol = 'AAPL' and trade_date = '\".$trade_date.\"') \";\n\n\t$query = \"select max(trade_date) as trade_date from quotes_memory where symbol = 'AAPL' and trade_date < '\".$trade_date.\"' \";\n\n\n\t$query= stripslashes($query);\n\t$result = queryMysql($query);\n\n\twhile ($tmp_data = mysql_fetch_row($result)) {\n\t\t$previous_date = $tmp_data[0];\n\t}\n\n\treturn $previous_date;\n}", "title": "" }, { "docid": "fa0996eafaef491e44e318ed84c44f82", "score": "0.47942635", "text": "protected function _buildWhere(&$query)\r\n {\r\n\r\n\r\n \t//if($this->_checkin!=null)\r\n \t//{\r\n \t//\t$query->where('ltap.ltap_qdatu = \"'.$this->_confdate.'\"');\r\n \t//}\r\n return $query;\r\n }", "title": "" }, { "docid": "3bc3a35699bdaafccd5715c126c5aead", "score": "0.47919315", "text": "function slq()\n{\n $queries = DB::getQueryLog();\n $last_query = end($queries);\n\n sd($last_query);\n}", "title": "" }, { "docid": "3bcf45727384a96849d2784c175b67d8", "score": "0.47823253", "text": "public function fullQuarter()\n {\n return \"ត្រីមាសទី\".$this->quarter();\n }", "title": "" }, { "docid": "c85158a06447d0706c8791120c3d2518", "score": "0.47604972", "text": "public static function get_main_date_query() {\n $date_query = isset( self::$video_query->date_query, self::$video_query->date_query->queries ) ? self::$video_query->date_query->queries : array();\n\n return $date_query;\n }", "title": "" }, { "docid": "117644ea35f54f3a55799b2f562e8350", "score": "0.47534627", "text": "private function getYearAndWeekQuery($form, $data) { \n $timelimiting = '';\n $year = $data['year']; \n $week = $data['week'];\n\n // calculate new to- and fromdate by week\n $correctedfromweek = $week;\n $correctedtoweek = ($week+1);\n // correct week to be used in strtotime need format 04 for fourth week\n if (iconv_strlen($correctedfromweek+\"\")==1) {\n $correctedfromweek = '0' . $correctedfromweek;\n } \n if (iconv_strlen($correctedtoweek+\"\")==1) {\n $correctedtoweek = '0' . $correctedtoweek;\n } \n\n $startdate = date('Y-m-d',strtotime($year . 'W' . $correctedfromweek ));\n $stopdate = date('Y-m-d',strtotime($year . 'W' . $correctedtoweek ));\n\n // create query\n $timelimiting = \" and tr.timestart > '\" . $startdate . \" 00:00:00'\";\n $timelimiting .= \" and tr.timestop < '\" . $stopdate . \" 00:00:00' \";\n\n // set selected in form\n $form->get('year')->setValue($year);\n $form->get('week')->setValue($week);\n \n return $timelimiting; \n }", "title": "" }, { "docid": "3ab0431b63010377d7597baa377066d0", "score": "0.4736092", "text": "function previousQuestions() {\n\t\t$arrValidTypes = array(1,2,3,4,5,7,10,11,12,13,14,15,23);\n\t\t$arrCurRecord = BackendUtility::getRecord($this->arrWizardParameters[\"table\"], $this->arrWizardParameters[\"uid\"]);\n\t\tif (!in_array(intval($arrCurRecord['sys_language_uid']),array(-1,0))) {\n\t\t\t$this->blnLocalization = TRUE;\n\t\t}\n \t$strWhereConf = '1=1';\n \t$strWhereConf .= ' AND pid='. $this->arrWizardParameters[\"pid\"];\n\t\t$strWhereConf .= ' AND ' . $this->strItemsTable . '.sys_language_uid IN (0,-1)';\n\t\t$strWhereConf .= ' AND sorting<' . $arrCurRecord[\"sorting\"];\n\t\t$strWhereConf .= BackendUtility::BEenableFields($this->strItemsTable);\n\t\t$strWhereConf .= BackendUtility::deleteClause($this->strItemsTable);\n\t\t$strOrderByConf = 'sorting ASC';\n\t\t$dbRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*',$this->arrWizardParameters[\"table\"],$strWhereConf,'',$strOrderByConf);\n while($arrDbRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbRes)) {\n \tif ($this->blnLocalization) {\n \t\t$arrDbRow = $this->getRecordOverlay($this->strItemsTable, $arrDbRow, $arrCurRecord['sys_language_uid']);\n\t\t\t}\n if (!isset($intPage)) {\n if ($arrDbRow['question_type']==22) {\n $intPage = 0;\n } else {\n $intPage = 1;\n }\n }\n if ($arrDbRow['question_type']<>22) {\n if (in_array($arrDbRow['question_type'],$arrValidTypes)) {\n $arrDbRow['page'] = $intPage;\n $this->arrPrevQuestions[$arrDbRow['uid']] = $arrDbRow;\n }\n } else {\n $intPage++;\n }\n\t\t}\n }", "title": "" }, { "docid": "5d8a895f812431f9339ada786ec7e67c", "score": "0.47243774", "text": "public static function solvedRFI($region_id,$startOfWeek,$day){\n \t//date_default_timezone_set(TIME_ZONE);\n \t$date = date('Y-m-d',strtotime($startOfWeek.' +'.$day.' days'));\n \tif($date<=date('Y-m-d')){\n\t \t/*$query = Indexing::leftJoin('process_queue','process_queue.indexing_id','=','indexing.id');\n\t \t$query->leftJoin('audit_queue','audit_queue.process_queue_id','=','process_queue.id');*/\n\t \t$query = RFIQueue::join('indexing','indexing.id','=','rfi_queue.indexing_id');\n $query->leftJoin('process_queue','process_queue.id','=','rfi_queue.process_queue_id');\n $query->leftJoin('audit_queue','audit_queue.id','=','rfi_queue.audit_queue_id');\n\t \t$query->leftJoin('mst_status as pq_status','pq_status.id','=','process_queue.status_id');\n\t \t$query->leftJoin('mst_status as aq_status','aq_status.id','=','audit_queue.audit_status_id');\n\t \t$query->where('indexing.region_id',$region_id);\n\t \t//$query->whereRaw(\"DATE(process_queue.rfi_start_date) = '$date'\");\n\t \t/*$query->where(function ($query) {\n\t $query->where('aq_status.status_name','pending out');\n\t $query->orWhere('pq_status.status_name','pending out');\n\t });*/\n\t $query->whereRaw(\"DATE(rfi_queue.rfi_end_date) = '$date'\");\n\t /*$query->where(function ($query) use ($date) {\n\t $query->whereRaw(\"DATE(audit_queue.audit_rfi_end_date) = '$date'\");\n\t $query->orWhereRaw(\"DATE(process_queue.rfi_end_date) = '$date'\");\n\t });*/\n\t return $query->count();\n\t }\n return 0;\n }", "title": "" }, { "docid": "1c1688ae728b566fabec0cba1615e9d8", "score": "0.47211832", "text": "public function lastOfQuarter($dayOfWeek = null)\n {\n return $this->setDate($this->year, $this->quarter * static::MONTHS_PER_QUARTER, 1)->lastOfMonth($dayOfWeek);\n }", "title": "" }, { "docid": "07d335696842e64e77bd4ab936e253f9", "score": "0.4701235", "text": "public function getQuarter(): string\n {\n return $this->toLocalizedString('Q');\n }", "title": "" }, { "docid": "4d038dd1487bd1014371bbfa66ae8dd6", "score": "0.4683519", "text": "protected function get_definite_query_clause(){\n $function_query_clause = \"function=\" . $this->function_type . \"&\";\n //Create symbol definition clause\n $symbol_query_clause = \"symbol=\" . $this->stock_symbol . \"&\";\n $definite_query_clause = query_url_param . $function_query_clause . $symbol_query_clause;\n return $definite_query_clause;\n }", "title": "" }, { "docid": "8d6269a6fc97b4825b891148d44b0c43", "score": "0.46801808", "text": "public static function newRFI($region_id,$startOfWeek,$day){\n \t//date_default_timezone_set(TIME_ZONE);\n \t$date = date('Y-m-d',strtotime($startOfWeek.' +'.$day.' days'));\n \tif($date<=date('Y-m-d')){\n\t \t/*$query = Indexing::leftJoin('process_queue','process_queue.indexing_id','=','indexing.id');\n\t \t$query->leftJoin('audit_queue','audit_queue.process_queue_id','=','process_queue.id');*/\n\t \t$query = RFIQueue::join('indexing','indexing.id','=','rfi_queue.indexing_id');\n $query->leftJoin('process_queue','process_queue.id','=','rfi_queue.process_queue_id');\n $query->leftJoin('audit_queue','audit_queue.id','=','rfi_queue.audit_queue_id');\n\t \t$query->leftJoin('mst_status as pq_status','pq_status.id','=','process_queue.status_id');\n\t \t$query->leftJoin('mst_status as aq_status','aq_status.id','=','audit_queue.audit_status_id');\n\t \t$query->where('indexing.region_id',$region_id);\n\t \t//$query->whereRaw(\"DATE(process_queue.rfi_start_date) = '$date'\");\n\t \t/*$query->where(function ($query) {\n\t $query->where('aq_status.status_name','pending in');\n\t $query->orWhere('pq_status.status_name','pending in');\n\t });*/\n\t $query->whereRaw(\"DATE(rfi_queue.rfi_start_date) = '$date'\");\n\t //$query->whereRaw(\"audit_queue.audit_rfi_end_date = '0000-00-00 00:00:00'\");\n\t /*$query->where(function ($query) use ($date) {\n\t $query->whereRaw(\"DATE(audit_queue.audit_rfi_start_date) = '$date'\");\n\t $query->orWhereRaw(\"DATE(process_queue.rfi_start_date) = '$date'\");\n\t });\n\t $query->where(function ($query) {\n\t $query->whereRaw(\"audit_queue.audit_rfi_end_date = '0000-00-00 00:00:00'\");\n\t $query->orWhereRaw(\"process_queue.rfi_end_date = '0000-00-00 00:00:00'\");\n\t });*/\n\t return $query->count();\n\t }\n return 0;\n }", "title": "" }, { "docid": "3efea85360924957e1c442126b75ae10", "score": "0.465978", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t\t$r = Security()->CurrentUserLevelID();\n\t\tif($r==4)\n\t\t{\n\t\t\tew_AddFilter($filter, \"TGLREG >= (CURDATE() - interval 6 day)\");\n\t\t}\n\t}", "title": "" }, { "docid": "2c6a1d377d19098c183890226b1c1349", "score": "0.46529216", "text": "public function scopeFuture($query)\n {\n return $query->where('start', '>=', Carbon::now());\n }", "title": "" }, { "docid": "57c689d86d16ade82a47e152183df74b", "score": "0.4641028", "text": "function borcal_filter_where($where = '') {\n global $borcal_startDate, $borcal_endDate;\n //posts in the last 30 days\n //$where .= \" AND post_date > '\" . date('Y-m-d', strtotime('-30 days')) . \"'\";\n //posts 30 to 60 days old\n //$where .= \" AND post_date >= '\" . date('Y-m-d', strtotime('-60 days')) . \"'\" . \" AND post_date <= '\" . date('Y-m-d', strtotime('-30 days')) . \"'\";\n //posts for March 1 to March 15, 2009\n $where .= \" AND post_date >= '\" . $borcal_startDate . \"' AND post_date < '\" . $borcal_endDate . \"'\";\n return $where;\n}", "title": "" }, { "docid": "b734474cc5bbff22ac75badff18387e7", "score": "0.46374425", "text": "function wpfc_temp_filter_where( $where = '' ) {\n\t \t$where .= \" AND post_date >= '\".date(\"Y-m-d\", $_REQUEST['start']).\"' AND post_date < '\".date(\"Y-m-d\", $_REQUEST['end']).\"'\";\n\t \treturn $where;\n\t }", "title": "" }, { "docid": "bd824ee9d3d8d8c912e066a67dc09dbc", "score": "0.46331543", "text": "public function getCurrentQuery();", "title": "" }, { "docid": "02d5e531a235100c11c1b054534d172a", "score": "0.46216613", "text": "public function quarter()\n {\n $month = date('m', $this->dateTime);\n return $this->config->numbers(ceil($month / 3));\n }", "title": "" }, { "docid": "d930a4b9ed2c01f9a7e972116a966af1", "score": "0.46153367", "text": "protected function getWhereClause() {}", "title": "" }, { "docid": "5d80caa67e3420a7342cd6ec0290867d", "score": "0.45837197", "text": "public function getQuarter() {\n // $address = $this->getOnepage()->getQuote()->getShippingAddress();\n $session = Mage::getSingleton('checkout/session');\n $cityId = (int) $this->_request->getParam('cityid');\n $quarterName = $this->_request->getParam('term');\n //$quarterName = Mage::helper('speedyshippingmodule/transliterate')->transliterate($quarterName);\n $lang = Mage::helper('speedyshippingmodule/transliterate')->getLanguage($quarterName);\n $currentSpeedyAddress = $session->getSpeedyAddress();\n //$city = strtoupper($address->getCity());\n try {\n $quarters = $this->_speedyEPS->listQuarters($quarterName, $cityId, $lang);\n } catch (ServerException $se) {\n Mage::log($se->getMessage(),null,'speedyLog.log');\n }\n if ($quarters) {\n $tpl = array();\n\n foreach ($quarters as $quarter) {\n $label = '';\n if ($quarter->getType()) {\n $label .= $quarter->getType() . ' ';\n }\n if ($quarter->getName()) {\n $label .= $quarter->getName();\n }\n\n $tpl[] = array('value' => $quarter->getId(), 'label' => $label);\n }\n\n $jsonData = json_encode($tpl);\n return $jsonData;\n } else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "71d4b1d76f52e64eec80c56e4261998b", "score": "0.45834833", "text": "public function getOrderBookQuarterChartData()\r\n {\r\n $year = date( 'Y' );\r\n for ( $i = $year; $i >= $year - 3; $i-- )\r\n {\r\n $from_date = mktime( 0, 0, 0, 4, 1, $i );\r\n $to_date = mktime( 23, 59, 59, 3, 31, $i + 1 );\r\n\r\n $sql\r\n = 'SELECT\r\n MONTH(p.contracted) mth,\r\n YEAR(p.contracted) yr,\r\n SUM(Sy.ppu * Sy.quantity * Sp.quantity) price,\r\n QUARTER(p.contracted) qtr\r\n FROM Project p\r\n JOIN `Client` c\r\n ON c.`client_id` = p.`client_id`\r\n JOIN `Space` Sp\r\n ON Sp.project_id = p.project_id\r\n JOIN `System`\tSy\r\n ON Sy.space_id = Sp.space_id\r\n WHERE\r\n p.contracted IS NOT NULL AND\r\n p.test = 0 AND\r\n p.exclude_from_reporting = 0 AND\r\n (p.project_status_id BETWEEN 40 AND 45) AND\r\n (p.contracted BETWEEN \\'' . date( 'Y-m-d H:i:s', $from_date ) . '\\' AND \\'' . date( 'Y-m-d H:i:s', $to_date ) . '\\')\r\n GROUP BY yr, qtr\r\n ORDER BY yr, mth';\r\n\r\n $stmt = $this->_em->getConnection()->prepare( $sql );\r\n $stmt->execute();\r\n $result = $stmt->fetchAll();\r\n\r\n $data[$i] = Array( 0, 0, 0, 0);\r\n\r\n if ( !empty($result) )\r\n {\r\n foreach ( $result as $r )\r\n {\r\n\r\n if ( $r['qtr'] == 2 )\r\n {\r\n $data[$i][0] = $r['price'];\r\n }\r\n if ( $r['qtr'] == 3 )\r\n {\r\n $data[$i][1] = $r['price'];\r\n }\r\n if ( $r['qtr'] == 4 )\r\n {\r\n $data[$i][2] = $r['price'];\r\n }\r\n if ( $r['qtr'] == 1 )\r\n {\r\n $data[$i][3] = $r['price'];\r\n }\r\n }\r\n }\r\n }\r\n\r\n $i = 0;\r\n foreach ( $data as $key => $value )\r\n {\r\n\r\n $data[$i]['name'] = '\"' . $key . '-' . ($key + 1) . '\"';\r\n $data[$i]['data'] = json_encode( $value );\r\n $i++;\r\n\r\n }\r\n\r\n return $data;\r\n }", "title": "" }, { "docid": "06ad80f748bbf92ef4cb832b54206e1b", "score": "0.45831293", "text": "public function displayListfiscalQuarter($layout_def)\n {\n $match = array();\n if (preg_match('/(\\d{4})-(\\d)/', $this->displayListPlain($layout_def), $match)) {\n\n return 'Q' . $match[2] .' ' . $match[1];\n }\n return '';\n }", "title": "" }, { "docid": "4a2dcaa812dd9266cb1500504ee2326a", "score": "0.45773822", "text": "protected function user_where_clause() {}", "title": "" }, { "docid": "36fbba54a465cb781b184c0fe7eb16e0", "score": "0.45614642", "text": "private function sql_whereAnd_sysLanguage()\n {\n if ( !isset( $this->sql_filterFields[ $this->curr_tableField ][ 'languageField' ] ) )\n {\n return;\n }\n\n $languageField = $this->sql_filterFields[ $this->curr_tableField ][ 'languageField' ];\n $languageId = $GLOBALS[ 'TSFE' ]->sys_language_content;\n\n // DRS :TODO:\n if ( $this->pObj->b_drs_devTodo )\n {\n $prompt = '$this->int_localisation_mode PI1_SELECTED_OR_DEFAULT_LANGUAGE: for each language a query!';\n t3lib_div::devlog( '[INFO/TODO] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS :TODO:\n\n switch ( $this->int_localisation_mode )\n {\n case( PI1_DEFAULT_LANGUAGE ):\n $andWhere = \" AND \" . $languageField . \" <= 0 \";\n break;\n case( PI1_SELECTED_OR_DEFAULT_LANGUAGE ):\n $andWhere = \" AND ( \" .\n $languageField . \" <= 0 OR \" .\n $languageField . \" = \" . intval( $languageId ) .\n \" ) \";\n break;\n case( PI1_SELECTED_LANGUAGE_ONLY ):\n $andWhere = \" AND \" . $languageField . \" = \" . intval( $languageId ) . \" \";\n break;\n default:\n $andWhere = null;\n break;\n }\n\n // RETURN AND WHERE statement\n return $andWhere;\n }", "title": "" }, { "docid": "691ce9febfbd194d9ddb020932bcafa9", "score": "0.45585567", "text": "public function ExportHistory($data){\n\t \ttry{\n\t\t\t$previousMonth = date(\"Y-m-01\",mktime(0,0,0,date('m')-1,date('d'),date('Y')));\n\t\t\t$financialYear = date(\"Y-m-d\",mktime(0,0,0,date('m')-12,date('d'),date('Y')));\n\t\t\t\n\t\t\t$where \t\t = 1;\n\t\t\t$filterparam = '';\n\t\t\tif ($_SESSION['AdminLevelID'] != 1) {\n\t\t\t\t$this->getHeadquarters($_SESSION['AdminLoginID']);\n\t\t\t\t$where = 'DT.headquater_id IN ('.implode(',',array_unique($this->_headquarters)).')';\n\t\t\t}\t\n\t\t\t\t\t\n\t\t\t//Filter With ZBM Data\n\t\t\tif(!empty($data['token6'])){\n\t\t\t\t$where = '1';$this->_headquarters = array();\n\t\t\t\t$this->getHeadquarters(Class_Encryption::decode($data['token6']));\n\t\t\t\t$filterparam .= ' AND DT.headquater_id IN ('.implode(',',array_unique($this->_headquarters)).')';\n\t\t\t}\t\t\t\n\t\t\t//Filter With RBM Data\n\t\t\tif(!empty($data['token5'])){\n\t\t\t\t$where = '1';$this->_headquarters = array();\n\t\t\t\t$this->getHeadquarters(Class_Encryption::decode($data['token5']));\n\t\t\t\t$filterparam .= ' AND DT.headquater_id IN ('.implode(',',array_unique($this->_headquarters)).')';\n\t\t\t}\t\t\t\n\t\t\t//Filter With ABM Data\n\t\t\tif(!empty($data['token4'])){\n\t\t\t\t$where = '1';$this->_headquarters = array();\n\t\t\t\t$this->getHeadquarters(Class_Encryption::decode($data['token4']));\n\t\t\t\t$filterparam .= ' AND DT.headquater_id IN ('.implode(',',array_unique($this->_headquarters)).')';\n\t\t\t}\t\t\t\n\t\t\t//Filter With BE Data\n\t\t\tif(!empty($data['token3'])){\n\t\t\t\t$where = '1';$this->_headquarters = array();\n\t\t\t\t$this->getHeadquarters(Class_Encryption::decode($data['token3']));\n\t\t\t\t$filterparam .= ' AND DT.headquater_id IN ('.implode(',',array_unique($this->_headquarters)).')';\n\t\t\t}\t\t\t\n\t\t\t//Filter With Headquarter Data\n\t\t\tif(!empty($data['token2'])){\n\t\t\t\t$where = '1';\n\t\t\t\t$filterparam .= \" AND DT.headquater_id='\".Class_Encryption::decode($data['token2']).\"'\";\n\t\t\t}\t\t\t\n\t\t\t//Filter With Doctor Data\n\t\t\tif(!empty($data['token1'])){\n\t\t\t\t$filterparam .= \" AND DT.doctor_id='\".Class_Encryption::decode($data['token1']).\"'\";\n\t\t\t}\n\t\t\t//Filter With CRM Activity (Expense) Type\n\t\t\tif(!empty($data['activitytoken'])){\n\t\t\t\t$filterparam .= \" AND AT.expense_type='\".Class_Encryption::decode($data['activitytoken']).\"'\";\n\t\t\t}\n\t\t\t//Filter With Date Range\n\t\t\tif(!empty($data['from_date']) && !empty($data['to_date'])){\n\t\t\t\t$filterparam .= \" AND DATE(RT.roi_month) BETWEEN '\".$data['from_date'].\"' AND '\".$data['to_date'].\"'\";\n\t\t\t}\n\t\t\t\n\t\t\t$query = \"SELECT \n\t\t\t\t\t\t Zone,Region,HQ,Doctor,\n\t\t\t\t\t\t sums.May, sums.June, sums.July,\n\t\t\t\t\t\t sums.May + sums.June + sums.July AS ROISum\n\t\t\t\t\t\tFROM ( \n\t\t\t\t\t\t\t SELECT \n\t\t\t\t\t\t\t\tZT.zone_name AS Zone,RG.region_name AS Region,HT.headquater_name AS HQ,DT.doctor_name AS Doctor,\n\t\t\t\t\t\t\t\tSUM(IF(RT.roi_month='2014-05-01',RT.roi_total_amount,0)) AS 'May', \n\t\t\t\t\t\t\t\tSUM(IF(RT.roi_month='2014-06-01',RT.roi_total_amount,0)) AS 'June',\n\t\t\t\t\t\t\t\tSUM(IF(RT.roi_month='2014-07-01',RT.roi_total_amount,0)) AS 'July'\n\t\t\t\t\t\t\t FROM crm_roi AS RT\n\t\t\t\t\t\t\t INNER JOIN crm_appointments AS AT ON AT.doctor_id=RT.doctor_id\n\t\t\t\t\t\t\t INNER JOIN crm_doctors AS DT ON DT.doctor_id=RT.doctor_id\n\t\t\t\t\t\t\t INNER JOIN headquater AS HT ON HT.headquater_id=DT.headquater_id\n\t\t\t\t\t\t\t INNER JOIN region AS RG ON RG.region_id=DT.region_id\n\t\t\t\t\t\t\t INNER JOIN zone AS ZT ON ZT.zone_id=DT.zone_id\n\t\t\t\t\t\t\t WHERE \".$where.$filterparam.\"\n\t\t\t\t\t\t\t GROUP BY RT.doctor_id WITH ROLLUP \n\t\t\t\t\t\t\t ) AS sums\"; //echo $query;die;\n\t\t\t\t\t\t\n\t \t\t$exportData = $this->getAdapter()->fetchAll($query); //print_r($exportData[0]);die;\n\t \t\t$totalRowData = count($exportData);\n\t\t\tif($totalRowData>0) {\n\t\t\t\tini_set(\"memory_limit\",\"512M\");\n\t\t\t\tini_set(\"max_execution_time\",180);\n\t\t\t\tob_end_clean();\n\t\t\t\t$objPHPExcel = new PHPExcel(); //print_r($objPHPExcel);die;\n\t\t\t\t\n\t\t\t\t$objPHPExcel->setActiveSheetIndex(0);\n\t\t\t\t\n\t\t\t\t// Report Sheet Header\n\t\t\t\t$reportHeader = array();\n\t\t\t\tforeach($exportData[0] as $headerKey=>$rowHeader)\n\t\t\t\t{\n\t\t\t\t\t$reportHeader[] = $headerKey;\n\t\t\t\t}//print_r($reportHeader);die;\t\t\t\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->fromArray($reportHeader, NULL, 'A1');\n\t\t\t\t\n\t\t\t\t// Report Sheet Row Data\n\t\t\t\t$reportData = array();\n\t\t\t\t$zoneArray = array();\n\t\t\t\t$regionArray = array();\n\t\t\t\t$hqArray = array();\n\t\t\t\tforeach($exportData as $index=>$rowData)\n\t\t\t\t{\n\t\t\t\t\t$j=0;\n\t\t\t\t\t$reportData[$index] = array();\n\t\t\t\t\tforeach($rowData as $key=>$rowValue)\n\t\t\t\t\t{\n\t\t\t\t\t\t$columnData = ($j>3) ? number_format($rowValue,2) : utf8_decode($rowValue);\n\t\t\t\t\t\t$columnData = ($key=='Zone') ? (!in_array($rowValue,array_filter($zoneArray)) ? $columnData : '') : $columnData;\n\t\t\t\t\t\t$columnData = ($key=='Region') ? (!in_array($rowValue,array_filter($regionArray)) ? $columnData : '') : $columnData;\n\t\t\t\t\t\t$columnData = ($key=='HQ') ? (!in_array($rowValue,array_filter($hqArray)) ? $columnData : '') : $columnData;\n\t\t\t\t\t\t$columnData = ($totalRowData==($index+1)) ? ($j>3 ? $columnData : '') : $columnData;\n\t\t\t\t\t\t$columnData = ($totalRowData==($index+1)) ? ($j==0 ? 'Grand Total' : $columnData) : $columnData;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$reportData[$index][] = $columnData;\n\t\t\t\t\t\t$j++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$zoneArray[] = (!in_array($rowData['Zone'],$zoneArray)) ? $rowData['Zone'] : '';\n\t\t\t\t\t$regionArray[] = (!in_array($rowData['Region'],$regionArray)) ? $rowData['Region'] : '';\n\t\t\t\t\t$hqArray[] = (!in_array($rowData['HQ'],$hqArray)) ? $rowData['HQ'] : '';\t\t\t\t\t\n\t\t\t\t} //echo \"<pre>\";print_r($reportData);echo \"</pre>\";die;\n\t\t\t\t\n\t\t\t\t$objPHPExcel->getActiveSheet()->fromArray($reportData, NULL, 'A2');\n\t\t\t\t\n\t\t\t\t// Set autofilter\n\t\t\t\t// Always include the complete filter range!\n\t\t\t\t// Excel does support setting only the caption\n\t\t\t\t// row, but that's not a best practise...\n\t\t\t\t$objPHPExcel->getActiveSheet()->setAutoFilter($objPHPExcel->getActiveSheet()->calculateWorksheetDimension()); // Filter on All Column\n\t\t\t\t\n\t\t\t\t// Rename sheet\n\t\t\t\t$objPHPExcel->getActiveSheet()->setTitle(\"ROI Report\");\n\t\t\t\t\n\t\t\t\t// Redirect output to a client’s web browser (Excel5)\n\t\t\t\theader('Content-Type: application/vnd.ms-excel');\n\t\t\t\theader('Content-Disposition: attachment;filename=\"name_of_file.xls\"');\n\t\t\t\theader('Cache-Control: max-age=0');\n\t\t\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t\t\tob_end_clean();\n\t\t\t\t$objWriter->save('php://output'); // $objWriter->save('-'); //THIS DOES NOT WORK WHY?\n\t\t\t\t//$objWriter->save('test.xlsx'); //THIS WORKS\n\t\t\t\t$objPHPExcel->disconnectWorksheets();\n\t\t\t\tunset($objPHPExcel);die;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$Header .= \t\"\\\" No Data Found!! \\\"\".$_nxtcol;\n\t\t\t}\n\t \t}\n\t\tcatch(Exception $e){\n\t\t $_SESSION[ERROR_MSG] = 'There is Some Error Please try again'; \n\t \t}\t\t \n\t}", "title": "" }, { "docid": "1e6df79e32db9da57ee8887aa0bc50bc", "score": "0.45526755", "text": "function _get_where_clause()\n\t{\n\t\t$where = '';\n\t\t$where_clauses = $this->searchForm->generateSearchWhere(true, $this->seed->module_dir);\n\n\t\t// Bug 43452 - FG - Changed the way generated Where array is imploded into the string.\n\t\t// Now it's imploding in the same way view.list.php do.\n\t\tif (count($where_clauses) > 0 ) {\n\t\t $where = '( ' . implode(' and ', $where_clauses) . ' )';\n }\n\n // Need to include the default whereStatement\n\t\tif(!empty($this->_popupMeta['whereStatement'])){\n if(!empty($where))$where .= ' AND ';\n $where .= $this->_popupMeta['whereStatement'];\n\t\t}\n\n\t\treturn $where;\n\t}", "title": "" }, { "docid": "b963ec94e525ebf059142d85ece3015c", "score": "0.45417812", "text": "private function get_queries_by_applied_filters()\n {\n }", "title": "" }, { "docid": "b963ec94e525ebf059142d85ece3015c", "score": "0.45417812", "text": "private function get_queries_by_applied_filters()\n {\n }", "title": "" }, { "docid": "dc7d6d711b705901109ae88489a1f052", "score": "0.4537111", "text": "private function getQuaternames() {\n return array(\"1st Quarter\", \"2nd Quarter\", \"3rd Quarter\", \"4th Quarter\");\n }", "title": "" }, { "docid": "c6448f55f4593432d1211e5060cec322", "score": "0.45367816", "text": "function get_scholarshipraisedates($filter_params = array(), $page, $perpage) {\r\n global $DB;\r\n $params = array();\r\n $select = '';\r\n $sort = '';\r\n $startdate = '';\r\n $enddate = '';\r\n $date_filter = '';\r\n $limit = $page * $perpage;\r\n if (is_array($filter_params) && count($filter_params) > 0) {\r\n $select_params = array();\r\n foreach ($filter_params as $field => $value) {\r\n if ($field == 'date_from') {\r\n $startdate = $value;\r\n } else if ($field == 'date_to') {\r\n $enddate = $value;\r\n } else {\r\n $select_params[] = $field . '=:' . $field;\r\n $params[$field] = $value;\r\n }\r\n }\r\n $select .= \"AND \" . implode(\" AND \", $select_params);\r\n }\r\n if (!empty($startdate) && !empty($enddate)) {\r\n $date_filter = 'AND (raise_date >= ' . \"'\" . strtotime($startdate) . \"' AND raise_date <= \" . \"'\" . strtotime($enddate) . \"'\" . \")\";\r\n } else if (!empty($startdate) && empty($enddate)) {\r\n $date_filter = 'AND (raise_date >=' . \"'\" . strtotime($startdate) . \"' AND raise_date <= \" . \"'\" . time() . \"'\" . \")\";\r\n } else if (empty($startdate) && !empty($enddate)) {\r\n $date_filter = 'AND raise_date <= ' . strtotime($enddate);\r\n }\r\n $scholarship_raisedates = $DB->get_records_sql(\"SELECT * FROM {scholarship_raisedates} \r\n WHERE 1 $select $date_filter\r\n $sort order by id desc\", $params, $limit, $perpage);\r\n return $scholarship_raisedates;\r\n}", "title": "" }, { "docid": "e64810df89eb451ae1152336d65b6483", "score": "0.453508", "text": "protected function getQueryConditions() {\n\t\t$conds = array();\n\t\tif ( $this->title ) {\n\t\t\t$conds[ 'rev_page' ] = $this->title->getArticleID();\n\t\t} else if ( $this->offset ) {\n\t\t\t\t$conds[] = 'rev_timestamp <= ' . $dbr->addQuotes( $this->offset );\n\t\t}\n\t\treturn $conds;\n\t}", "title": "" }, { "docid": "649c4720ba41fe12830c82114a444992", "score": "0.45289385", "text": "function filter_where( $where = '' ) {\r\n\t$where .= \" AND post_date > '\" . date('Y-m-d', strtotime('-99930 days')) . \"'\";\r\n\treturn $where;\r\n}", "title": "" }, { "docid": "e83546a52bc1a50e314fc34ce915580c", "score": "0.4526685", "text": "public function firstOfQuarter($dayOfWeek = null)\n {\n return $this->setDate($this->year, $this->quarter * static::MONTHS_PER_QUARTER - 2, 1)->firstOfMonth($dayOfWeek);\n }", "title": "" }, { "docid": "7f8e43eee11ee407f25ece1e5ee46969", "score": "0.45207077", "text": "protected function getGeneralWhereClause() {}", "title": "" }, { "docid": "1318c0abc141c299d8ea156b29c4e888", "score": "0.45180157", "text": "function last_quarter_month($t) {\n $mon = $t['tm_mon'];\n if ($mon <= 3) \n {\n return 3;\n }\n elseif ($mon <= 6) \n {\n return 6;\n }\n elseif ($mon <= 9) \n {\n return 9;\n }\n elseif ($mon <= 12) \n {\n return 12;\n }\n\n // ?\n return 99;\n}", "title": "" }, { "docid": "3a8107e6c2c216646419fa67e1ce8d70", "score": "0.45164785", "text": "function fromQuery($from)\n{\n\tglobal $SQL;\n\n\treturn ' AND '.$SQL['datestamp'].\" >= '$from'\";\n}", "title": "" }, { "docid": "7bfc17481224095be425b16752da182f", "score": "0.45118162", "text": "public function scopeFutureEventsOnly($query)\n {\n return $query->where('date_start', '>', Carbon::now());\n }", "title": "" }, { "docid": "1c0d272e23e61cabbfb7e93c8f32f701", "score": "0.45032546", "text": "function BOQ($quarter=0,$dateTime=\"\")\r\n\t{\r\n\t\tif ($dateTime) $this->SetDate($DateTime);\r\n\t\tif (!$quarter) $quarter = $this->Quarter();\r\n\t\tswitch($quarter)\r\n\t\t{\r\n\t\t\tcase 1: $month = 1;break;\r\n\t\t\tcase 2: $month = 4; break;\r\n\t\t\tcase 3: $month = 7; break;\r\n\t\t\tcase 4: $month = 10;break;\r\n\t\t}\t\t\r\n\t\t$dt = new DateClass(mktime($this->Hours(),$this->Minutes(),$this->Seconds(),$month,1,$this->Year()));\r\n\t\treturn $dt;\r\n\t}", "title": "" }, { "docid": "1004756694d29777508a0c8821d17a2f", "score": "0.4501879", "text": "public function scopeQ(Builder $query, $q = '')\n {\n if (empty($q)) {\n return $query;\n }\n $columns = Schema::getColumnListing($this->getTable());\n return $query->where(function (Builder $query) use ($q, $columns) {\n foreach ($columns as $column) {\n if (in_array(DB::getSchemaBuilder()->getColumnType($this->getTable(), $column), ['date', 'datetime'])) {\n try {\n $q = Carbon::parse($q)->format('Y-m-d');\n } catch (InvalidFormatException $e) {\n }\n }\n $query->orWhere($column, 'LIKE', '%' . trim($q) . '%');\n }\n $query->orWhereHas('roles', function (Builder $query) use ($q) {\n $query->where('role', 'LIKE', '%' . $q . '%');\n });\n });\n }", "title": "" }, { "docid": "243390d57c5ef939fe0cda685462e699", "score": "0.44847304", "text": "function getPrevSeason() {\n\t$this_season = getSeason();\n\treturn sqlSelect(\"*\", SEASONS_TABLE, \"start_date <= '\" . $this_season['start_date'] . \"'\", \"start_date desc\", (0))[0];\n}", "title": "" }, { "docid": "6c236353a93c9d0bcaacc46cf2912efd", "score": "0.44812757", "text": "private function getYearQuery($form, $data) { \n $timelimiting = '';\n $year = $data['year'];\n if (isset($year)) {\n $timelimiting = \" and tr.timestart > '\" . $year . \"-01-01 00:00:00'\" ;\n $timelimiting .= \" and tr.timestop < '\" . ($year+1) . \"-01-01 00:00:00' \";\n // set selected in form\n $form->get('year')->setValue($year);\n } \n return $timelimiting;\n }", "title": "" }, { "docid": "2e755eedd8a0e2904cccf586d0cba5ac", "score": "0.44812658", "text": "public function query() {\n\t\treturn SalesHistoryQuery::create();\n\t}", "title": "" }, { "docid": "a1928b73385c99c41acc97e9e3f1c4ee", "score": "0.4468658", "text": "public function scopeCurrent($query) {\n\n $now = Carbon::now()->format('Y-m-d H:i:s');\n\n return $query->where([\n ['started_at', '<=', $now],\n ['finished_at', '>=', $now],\n ]);\n\n }", "title": "" }, { "docid": "5dae3fafa158cec6b9abfcc503b15ba6", "score": "0.4464674", "text": "public function lteq(): WhereCondition\n {\n\n $this->_op = self::OP_TYPE_GL_EQ;\n\n return $this;\n\n }", "title": "" }, { "docid": "5f816af35ac756ead4027e7cbc96177a", "score": "0.4458455", "text": "function buildWhere($whereQ='') {\n\t\tforeach ($this->_where as $struct) {\n\t\t\t$v = $struct['v'];\n\t\t\t$s = $struct['s'];\n\t\t\t$k = $struct['k'];\n\t\t\t$andor = $struct['andor'];\n\t\t\tif (strlen($whereQ) ) {$whereQ .= ' '.$andor.' ';}\n\n\t\t\tif (isset($struct['subclauses'])) {\n\t\t\t\t$whereQ .= '(';\n\t\t\t}\n\n\t\t\t$atom = $this->_whereAtomToString($struct);\n\n\t\t\tif (isset($struct['subclauses'])) {\n\t\t\t\tforeach ($struct['subclauses'] as $cl) {\n\t\t\t\t\t$atom = $this->_whereAtomToString($cl, $atom);\n\t\t\t\t}\n\t\t\t\t$whereQ .= $atom;\n\t\t\t\t$whereQ .= ')';\n\t\t\t} else {\n\t\t\t\t$whereQ .= $atom;\n\t\t\t}\n\n\t\t}\n\t\tif (strlen($whereQ) ) {$whereQ = ' where '.$whereQ;}\n\t\treturn $whereQ;\n\t}", "title": "" }, { "docid": "e9f45e67efc3563cc45d803d8cd011da", "score": "0.44561452", "text": "public function getQ()\n\t{\n\t\treturn $this->cq;\n\t}", "title": "" }, { "docid": "11c8561688407e71f21bf459ae3fd114", "score": "0.44536465", "text": "public function statistics_ref_quiz_where( $where ) {\n\t\t\tglobal $wpdb;\n\n\t\t\t$quiz_id = $this->request->get_param( 'quiz' );\n\t\t\tif ( $quiz_id ) {\n\t\t\t\t$quiz_pro_id = get_post_meta( $quiz_id, 'quiz_pro_id', true );\n\t\t\t\t$quiz_pro_id = absint( $quiz_pro_id );\n\t\t\t\tif ( ! empty( $quiz_pro_id ) ) {\n\t\t\t\t\t$where .= $wpdb->prepare( \" AND statref.quiz_id=%d \", (int) $quiz_pro_id ); //phpcs:ignore\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $where;\n\t\t}", "title": "" }, { "docid": "dbef91e48ff46deee160244f8cf85124", "score": "0.44516495", "text": "private function getOutstandingFallDueQueryBuilder()\n {\n $qb = $this->createQueryBuilder('o');\n $ex = $qb->expr();\n\n $qb\n ->join('o.paymentTerm', 't')\n ->where($ex->andX(\n $ex->eq('o.sample', ':not_sample'), // Not sample\n $ex->lt('o.paidTotal', 'o.grandTotal'), // Paid total lower than grand total\n $ex->notIn('o.invoiceState', ':canceled_or_refunded'), // Not canceled/refunded\n $qb->expr()->gt('o.outstandingDate', ':today'), // Payment limit date greater than today\n $this->getDueClauses() // Terms triggered\n ))\n ->addOrderBy('o.outstandingDate', 'ASC')\n ->setParameter('not_sample', false)\n ->setParameter('today', (new \\DateTime())->setTime(23, 59, 59, 999999), Types::DATETIME_MUTABLE)\n ->setParameter('canceled_or_refunded', [InvoiceStates::STATE_CANCELED, InvoiceStates::STATE_CREDITED]);\n\n $this->setDueParameters($qb);\n\n return $qb;\n }", "title": "" }, { "docid": "42fe7a8993360ac833c1f098e86ab77e", "score": "0.44397596", "text": "function addConditionalsToQuery($query, $filledFormFields) {\n\t// Testing if we have to fill the conditional of our SQL statement\n\tif(count($filledFormFields) > 0) {\n\t\t$query .= \" WHERE \";\n\n\n\t\t// Adding the conditionals to the query\n\t\t$i = 0;\n\t\tforeach($filledFormFields as $fieldKey => $fieldValue) {\n\t\t\t// Appending the new conditional\n\t\t\t$queryAppendage = $fieldKey . \" LIKE :\" . $fieldKey . \" \";\n\n\t\t\t$query .= $queryAppendage;\n\t\t\t\n\t\t\t// If there's more conditionals after this, append an \"AND\" as well.\n\t\t\tif($i < count($filledFormFields) - 1) \n\t\t\t\t$query .= \" AND \";\n\n\t\t\t$i++;\n\t\t}\n\t}\n\n\treturn $query;\n}", "title": "" }, { "docid": "2bd167772cba818f5cb80fd8b9871b2d", "score": "0.4438294", "text": "public function addExtintorFiscalizacaoQuery(Doctrine_Query $q = null, $fiscalizacao_id)\n {\n if (is_null($q))\n {\n $q = Doctrine_Query::create()\n ->from('fiscalizacao_extintor f');\n }\n\n $alias = $q->getRootAlias();\n $q->andWhere($alias.'.fiscalizacao_id = ?', $fiscalizacao_id);\n\n return $q;\n }", "title": "" }, { "docid": "6e9293530afdcf297f21137dc102cf90", "score": "0.44305566", "text": "public static function openRFI($region_id,$startOfWeek,$day){\n \t//date_default_timezone_set(TIME_ZONE);\n \t$date = date('Y-m-d',strtotime($startOfWeek.' +'.$day.' days'));\n \t/*$d = date('D',strtotime($startOfWeek.' +'.$day.' days'));\n \tif($d=='Mon'){\n $date = date('Y-m-d',strtotime($date.' -3 days')); //get date of friday\n }else{\n $date = date('Y-m-d',strtotime($date.' -1 days'));\n }*/\n\n $previous_week = strtotime(\"-1 week +1 day\");\n\t\t$start_week = strtotime(\"last sunday midnight +1 day\",$previous_week);\n\t\t$end_week = strtotime(\"next saturday -1 day\",$start_week);\n\t\t$start_week = date(\"Y-m-d\",$start_week);\n\t\t$end_week = date(\"Y-m-d\",$end_week);\n\n \tif($date<=date('Y-m-d')){\n\t \t/*$query = Indexing::leftJoin('process_queue','process_queue.indexing_id','=','indexing.id');\n\t \t$query->leftJoin('audit_queue','audit_queue.process_queue_id','=','process_queue.id');*/\n\t \t$query = RFIQueue::join('indexing','indexing.id','=','rfi_queue.indexing_id');\n $query->leftJoin('process_queue','process_queue.id','=','rfi_queue.process_queue_id');\n $query->leftJoin('audit_queue','audit_queue.id','=','rfi_queue.audit_queue_id');\n\t \t$query->leftJoin('mst_status as pq_status','pq_status.id','=','process_queue.status_id');\n\t \t$query->leftJoin('mst_status as aq_status','aq_status.id','=','audit_queue.audit_status_id');\n\t \t$query->where('indexing.region_id',$region_id);\n\t \t//$query->whereRaw(\"DATE(process_queue.rfi_start_date) = '$date'\");\n\t \t/*$query->where(function ($query) {\n\t $query->where('aq_status.status_name','pending in');\n\t $query->orWhere('pq_status.status_name','pending in');\n\t });*/\n\t //$query->whereRaw(\"DATE(indexing.created_at) >= '$start_week'\");\n\t \t//$query->whereRaw(\"DATE(indexing.created_at) <= '$end_week'\");\n\t /*$query->where(function ($query) use ($date) {\n\t $query->whereRaw(\"DATE(audit_queue.audit_rfi_start_date) > '0000-00-00' AND DATE(audit_queue.audit_rfi_start_date) = '$date'\");\n\t $query->orWhereRaw(\"DATE(process_queue.rfi_start_date) > '0000-00-00' AND DATE(process_queue.rfi_start_date) = '$date'\");\n\t });*/\n\t /*$query->where(function ($query) use ($start_week,$end_week) {\n\t $query->whereRaw(\"DATE(audit_queue.audit_rfi_start_date) > '0000-00-00' AND DATE(audit_queue.audit_rfi_start_date) >= '$start_week' AND DATE(audit_queue.audit_rfi_start_date) <= '$end_week'\");\n\t $query->orWhereRaw(\"DATE(process_queue.rfi_start_date) > '0000-00-00' AND DATE(process_queue.rfi_start_date) >= '$start_week' AND DATE(process_queue.rfi_start_date) <= '$end_week'\");\n\t });\n\t $query->where(function ($query) {\n\t $query->whereRaw(\"DATE(audit_queue.audit_rfi_end_date) = '0000-00-00'\");\n\t $query->orWhereRaw(\"DATE(process_queue.rfi_end_date) = '0000-00-00'\");\n\t });*/\n\t //$query->whereRaw(\"DATE(rfi_queue.rfi_start_date) > '0000-00-00' AND DATE(rfi_queue.rfi_start_date) >= '$start_week' AND DATE(rfi_queue.rfi_start_date) <= '$end_week'\");\n\t $query->whereRaw(\"DATE(rfi_queue.rfi_start_date) > '0000-00-00' AND DATE(rfi_queue.rfi_start_date) <= '$end_week'\");\n\t $query->whereRaw(\"DATE(rfi_queue.rfi_end_date) = '0000-00-00'\");\n\t return $query->count();\n\t \n\t }\n return 0;\n }", "title": "" }, { "docid": "e0e258d9c6b41a9e303c709cd7a81e6b", "score": "0.44292814", "text": "function pre_query() { \r\n // Unset invalid date values before the query runs.\r\n if (!empty($this->view->args) && count($this->view->args) > $this->position) {\r\n $argument = $this->view->args[$this->position];\r\n $parts = $this->date_handler->arg_parts($argument);\r\n if (empty($parts[0]['date']) && empty($parts[0]['period'])) {\r\n unset($this->view->args[$this->position]); \r\n }\r\n }\r\n \r\n $this->get_query_fields();\r\n if (!empty($this->query_fields)) {\r\n foreach ($this->query_fields as $query_field) {\r\n $field = $query_field['field'];\r\n // Explicitly add this table using add_table so Views does not\r\n // remove it if it is a duplicate, since that will break the query.\r\n $this->query->add_table($field['table_name'], NULL, NULL, $field['table_name']);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "2cb507365e4124958586fec22f4ec4de", "score": "0.44073796", "text": "public function getFqsen()\n {\n return $this->fqsen;\n }", "title": "" }, { "docid": "a9fbb2515b46cfb27dbf15780897b1be", "score": "0.44059548", "text": "private function sql_whereAnd_fromTS()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Get TS value\n $andWhere = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'sql.' ][ 'andWhere' ];\n\n if ( !empty( $andWhere ) )\n {\n $andWhere = \" AND \" . $andWhere;\n }\n\n // RETURN AND WHERE statement\n return $andWhere;\n }", "title": "" }, { "docid": "4a360397261c84d1bba5009cb37dde67", "score": "0.43942142", "text": "function return_date_filter($db, $field, $filter, $filter_date='', $filter_date2=''){\n global $timedate;\n\n //if set, change the dates to be from user display format to db ready format\n if(!empty($filter_date)){\n $filter_date = $timedate->to_db_date($filter_date,false);\n }\n\n if(!empty($filter_date2)){\n $filter_date2 = $timedate->to_db_date($filter_date2,false);\n }\n\n if (!empty($filter)){\n $field ='kbdocuments.'.$field;\n if ($filter == 'on' && !empty($filter_date) ){\n return \"$field =\" .$db->convert($db->quoted($filter_date), 'date') . \" \";\n }elseif($filter == 'isnull'){\n return \"($field IS NULL OR \".$db->convert($field, \"length\").'=0) ';\n }elseif($filter == 'before' && !empty($filter_date)){\n return \"$field <\" .$db->convert($db->quoted($filter_date), 'date') . \" \";\n }elseif($filter == 'after' && !empty($filter_date)){\n return \"$field >\" .$db->convert($db->quoted($filter_date), 'date') . \" \";\n }elseif($filter == 'between_dates' && !empty($filter_date) && !empty($filter_date2)){\n return \"($field >=\" .$db->convert($db->quoted($filter_date), 'date') .\n \t\" AND $field <= \" . $db->convert($db->quoted($filter_date2), 'date') .\") \";\n }else {\n $range = TimeDate::getInstance()->parseDateRange($filter);\n if($range) {\n return \"($field >=\" . $db->convert($db->quoted($range[0]->asDb()), 'datetime') .\n \" AND $field <= \" . $db->convert($db->quoted($range[1]->asDb()), 'datetime') . \") \";\n }\n }\n }\n return '';\n}", "title": "" }, { "docid": "c11597885877abd2dc99a1d581d7b9d4", "score": "0.43916985", "text": "protected function getFiscalYearFilter($layout_def, $modifyStart, $modifyEnd, $date = '')\n {\n $timedate = TimeDate::getInstance();\n\n // Get Fiscal Start Date\n $fiscalDate = $this->getFiscalStartDate();\n\n $convert = $this->isDateTimeField($layout_def['type']);\n\n // We need to make changes to fiscal date, depending on current date\n // See if date is set, if not, use current date\n if (empty($date)) {\n $date = $timedate->getNow($convert);\n } else {\n $date = $timedate->fromString($date);\n }\n\n // Use Year from the date we're checking\n $fiscalDate->setDate($date->year, $fiscalDate->month, $fiscalDate->day);\n\n // If we're dealing with year filter, we need to set the year\n if (strpos($layout_def['qualifier_name'], 'year') !== false) {\n // Set year for the fiscal period, depending on current date\n if ($fiscalDate > $date) {\n $fiscalDate->modify(\"-1 year\");\n }\n } elseif (strpos($layout_def['qualifier_name'], 'quarter') !== false) {\n // If we're dealing with quarter filter, we need to set the month\n\n $currentMonth = $date->format(\"m\");\n $tempFiscalMonth = $fiscalDate->format(\"m\");\n\n // Find the quarter in regard to the fiscal month\n $monthDiff = $currentMonth - $tempFiscalMonth;\n $monthDiff = 3 * floor($monthDiff / 3);\n\n // Update the month\n if ($monthDiff != 0) {\n $fiscalDate->modify($monthDiff . \" month\");\n }\n }\n\n // Modify the start date\n $start = clone $fiscalDate;\n if (!empty($modifyStart)) {\n $start->modify($modifyStart);\n }\n\n // Modify the end date\n $end = clone $fiscalDate;\n if (!empty($modifyEnd)) {\n $end->modify($modifyEnd);\n }\n $end->modify('-1 seconds');\n\n $query = $this->get_start_end_date_filter($layout_def, $start, $end);\n\n return $query;\n }", "title": "" }, { "docid": "05deb9a9d37d94dec5c7a83e4d3433ee", "score": "0.4387579", "text": "private function createWhereClause(&$sql, &$params, $date_field, $user_field = null)\n {\n if ($this->report_type == 'recent') {\n $sql .= \"$date_field >= DATE_SUB(?, INTERVAL ? {$this->unit})\";\n $params[] = Date_Helper::getCurrentDateGMT();\n $params[] = $this->amount;\n } else {\n $sql .= \"$date_field BETWEEN ? AND ?\";\n $params[] = $this->start_date;\n $params[] = $this->end_date;\n }\n if ($user_field && $this->developer) {\n $sql .= \" AND $user_field = ?\";\n $params[] = $this->developer;\n }\n\n $sql .= \" ORDER BY $date_field {$this->sort_order}\";\n }", "title": "" }, { "docid": "e3693221c038fb037810ddd050eee751", "score": "0.43750247", "text": "function channel_entries_sql_where($sql, &$channel)\n\t{\n\n\t\tif ( is_string( $this->EE->extensions->last_call ) === TRUE )\n\t\t{\n\t\t\t$sql\t= $this->EE->extensions->last_call;\n\t\t}\n\n\t\t/** ----------------------------------------\n\t\t/**\tShould we proceed?\n\t\t/** ----------------------------------------*/\n\n\t\tif ( $this->EE->TMPL->fetch_param('date_field') === FALSE OR $this->EE->TMPL->fetch_param('date_field') == '' )\n\t\t{\n\t\t\treturn $sql;\n\t\t}\n\n\t\tif ( ( $this->EE->TMPL->fetch_param('date_field_start') === FALSE OR $this->EE->TMPL->fetch_param('date_field_start') == '' ) AND ( $this->EE->TMPL->fetch_param('date_field_stop') === FALSE OR $this->EE->TMPL->fetch_param('date_field_stop') == '' ) )\n\t\t{\n\t\t\treturn $sql;\n\t\t}\n\n\t\tif ( empty( $this->EE->TMPL->site_ids ) )\n\t\t{\n\t\t\treturn $sql;\n\t\t}\n\n\t\t/** ----------------------------------------\n\t\t/**\tLoop for site ids and add DB queries\n\t\t/** ----------------------------------------*/\n\n\t\t$sql_a\t= array();\n\n\t\tforeach ( $this->EE->TMPL->site_ids as $site_id )\n\t\t{\n\t\t\tif ( ! empty( $channel->dfields[$site_id][ $this->EE->TMPL->fetch_param('date_field') ] ) )\n\t\t\t{\n\t\t\t\t$field_id\t= $channel->dfields[$site_id][ $this->EE->TMPL->fetch_param('date_field') ];\n\n\t\t\t\t$sql_b\t= array();\n\n\t\t\t\tif ( $this->EE->TMPL->fetch_param('date_field_start') != '' )\n\t\t\t\t{\n\t\t\t\t\t$sql_b[]\t= \" ( wd.field_id_{$field_id} >= '\".$this->EE->localize->string_to_timestamp( $this->EE->db->escape_str( $this->EE->TMPL->fetch_param('date_field_start') ) ).\"' AND wd.site_id = \" . $this->EE->db->escape_str( $site_id ) . \" )\";\n\n\t\t\t\t}\n\n\t\t\t\tif ( $this->EE->TMPL->fetch_param('date_field_stop') != '' )\n\t\t\t\t{\n\t\t\t\t\t$sql_b[]\t= \" ( wd.field_id_{$field_id} < '\".$this->EE->localize->string_to_timestamp( $this->EE->db->escape_str( $this->EE->TMPL->fetch_param('date_field_stop') ) ).\"' AND wd.site_id = \" . $this->EE->db->escape_str( $site_id ) . \" )\";\n\t\t\t\t}\n\n\t\t\t\t$sql_a[]\t= implode( ' AND ', $sql_b );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty( $sql_a ) )\n\t\t{\n\t\t\t/** ----------------------------------------\n\t\t\t/**\tPrepare the necessary DB join\n\t\t\t/** ----------------------------------------*/\n\n\t\t\tif ( strpos($sql, 'LEFT JOIN exp_channel_data') === FALSE )\n\t\t\t{\n\t\t\t\t$sql = str_replace( 'LEFT JOIN exp_members', 'LEFT JOIN exp_channel_data AS wd ON wd.entry_id = t.entry_id LEFT JOIN exp_members', $sql );\n\t\t\t}\n\n\t\t\t/** ----------------------------------------\n\t\t\t/**\tAdd our new conditions\n\t\t\t/** ----------------------------------------*/\n\n\t\t\t$sql\t.= \" AND ( \" . implode( ' OR ', $sql_a ) . \" )\";\n\t\t}\n\n\t\t/*\n\t\tif ( $SESS->userdata('group_id') == '1' )\n\t\t{\n\t\t\techo \"Visible only to Super Admins<br /><br />\";\n\t\t\tprint_r( $sql );\n\t\t\techo \"<br /><br />Visible only to Super Admins\";\n\t\t}\n\t\t*/\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "f735ef3afabdb7a6c940d736c138e70d", "score": "0.4369238", "text": "function fmt_dateclause_c($dbhandle, $col){\n\tglobal $Period, $frommonth, $fromstatsmonth, $fromday, $fromstatsday_sday, $fromstatsmonth_sday,$fromstatsmonth_sday, $fromstatsmonth_shour, $fromstatsmonth_smin;\n\t\n\t$date_clause = \"\";\n\tif ($Period == \"Month\"){\n\t\tif ($frommonth && isset($fromstatsmonth))\n\t\t\t$date_clause =\"$col < timestamptz \" .\n\t\t\t\t$dbhandle->Quote($fromstatsmonth.\"-01\");\n\t}elseif ($Period == \"Day\") {\n\t\tif ($fromday && isset($fromstatsday_sday) && isset($fromstatsmonth_sday) && isset($fromstatsmonth_shour) && isset($fromstatsmonth_smin) ) \n\t\t\t$date_clause = \"$col < timestamptz \" .\n\t\t\t\t$dbhandle->Quote( $fromstatsmonth_sday. \"-\".$fromstatsday_sday. \" \" . $fromstatsmonth_shour.\":\". $fromstatsmonth_smin);\n\t}\n\t\t// if other period, no date_clause!\n\t\n\treturn $date_clause;\n\n}", "title": "" }, { "docid": "b680cbc71249b2f543f90cae89ddd197", "score": "0.43670052", "text": "public function ctotalSalesByQuarter($category_id, $year = 'now',$quarter = 0)\n {\n $query = \"SELECT SUM(sales_price) AS total FROM sales WHERE \";\n if ($year == 'now'){\n $query .= \"YEAR(date)=YEAR(CURDATE())\";\n }\n else{\n $query .= \"YEAR(date)=\".$year;\n }\n \n $query .= \"And QUARTER(date) = QUARTER(CURDATE() - \".$quarter.\")\";\n \n \n $query .= \"And product_category_id =\".$category_id;\n \n \n $row = $this ->getAdapter()-> query($query);\n $total = $row -> fetch();\n return $total['total'];\n }", "title": "" }, { "docid": "87d93a1b87e5a45ba25ed814ebe07aa4", "score": "0.43657884", "text": "public function fiscalYearAndQuarterFromTitle($quarterHtml, $output = 'year')\n {\n\n $quarterIndex = [\n 'January to March' => 4,\n 'April to June' => 1,\n 'July to September' => 2,\n 'October to December' => 3,\n ];\n\n $fiscalYear = Parsers::xpathRegexComboSearch($quarterHtml, \"//h1[@id='wb-cont']\", '/([0-9]{4})/');\n $fiscalQuarter = '';\n\n\n// \\w\n $title = Parsers::xpathRegexComboSearch($quarterHtml, \"//h1[@id='wb-cont']\", '/(.*)/');\n\n // Try to find one of the text labels in the title element, and match the Q1, Q2, etc. value:\n foreach ($quarterIndex as $quarterLabel => $quarterKey) {\n if (strpos($title, $quarterLabel) !== false) {\n $fiscalQuarter = $quarterKey;\n break;\n }\n }\n\n if ($output == 'year') {\n return $fiscalYear;\n } else {\n return $fiscalQuarter;\n }\n }", "title": "" }, { "docid": "0b3d354d7d0c4dc3cb88e3cd50ff447a", "score": "0.43593118", "text": "public static function getLastQuarter($date)\n {\n $q = static::getQuarter($date);\n $q[0]->sub(new \\DateInterval('PT1S'));\n\n return static::getQuarter($q[0]);\n }", "title": "" } ]
061e28e90b2a484763796d9b9849c5a0
Validates the provided query update struct.
[ { "docid": "b05136444081cb9ed9633de6bebce56a", "score": "0.7734915", "text": "public function validateQueryUpdateStruct(Query $query, QueryUpdateStruct $queryUpdateStruct): void\n {\n $this->validate(\n $queryUpdateStruct,\n [\n new QueryUpdateStructConstraint(\n [\n 'payload' => $query,\n ]\n ),\n ]\n );\n }", "title": "" } ]
[ { "docid": "7f386d3c37bd1456adbda5c3ce7984ff", "score": "0.6219264", "text": "public function validateRuleUpdateStruct(RuleUpdateStruct $ruleUpdateStruct): void\n {\n if ($ruleUpdateStruct->layoutId !== null) {\n $this->validate(\n $ruleUpdateStruct->layoutId,\n [\n new Constraints\\NotBlank(),\n new Constraints\\Type(['type' => 'scalar']),\n ],\n 'layoutId'\n );\n }\n\n if ($ruleUpdateStruct->comment !== null) {\n $this->validate(\n $ruleUpdateStruct->comment,\n [\n new Constraints\\Type(['type' => 'string']),\n ],\n 'comment'\n );\n }\n }", "title": "" }, { "docid": "0f79434eaab16e8865d76478d3db1df7", "score": "0.61423475", "text": "private function validateRequestForUpdate(){\n return request()->validate([\n 'name' => 'required|string|max:180',\n 'description' => 'required|string|max:180',\n 'price' => 'required|integer|max:9223372036854775807',\n 'image_url'=>'required|string|max:180',\n 'building_id'=>'required|integer|max:9223372036854775807|exists:buildings,id',\n 'category_id'=>'required|integer|max:9223372036854775807|exists:categories,id',\n ]);\n\n }", "title": "" }, { "docid": "76dc4bc311aedb86fbf594640360fde6", "score": "0.6138457", "text": "public function checkIsValidForUpdate() {\n\t\t$errors = array();\n\n\t\tif (!isset($this->pollId)) {\n\t\t\t$errors[\"pollId\"] = \"pollId is mandatory\";\n\t\t}\n\n\t\ttry{\n\t\t\t$this->checkIsValidForCreate();\n }\n catch(ValidationException $ex) {\n\n\t\t\tforeach ($ex->getErrors() as $key=>$error) {\n\n\t\t\t\t$errors[$key] = $error;\n\t\t\t}\n }\n \n\t\tif (sizeof($errors) > 0) {\n\t\t\tthrow new ValidationException($errors, \"post is not valid\");\n\t\t}\n\t}", "title": "" }, { "docid": "a6887a7f9b4631c224aa1b6ddc30db81", "score": "0.60473585", "text": "public function validateCollectionUpdateStruct(Collection $collection, CollectionUpdateStruct $collectionUpdateStruct): void\n {\n if ($collectionUpdateStruct->offset !== null) {\n $offsetConstraints = [\n new Constraints\\NotBlank(),\n new Constraints\\Type(['type' => 'int']),\n ];\n\n $offsetConstraints[] = $collection->hasQuery() ?\n new Constraints\\GreaterThanOrEqual(['value' => 0]) :\n new Constraints\\EqualTo(['value' => 0]);\n\n $this->validate(\n $collectionUpdateStruct->offset,\n $offsetConstraints,\n 'offset'\n );\n }\n\n if ($collectionUpdateStruct->limit !== null) {\n $this->validate(\n $collectionUpdateStruct->limit,\n [\n new Constraints\\NotBlank(),\n new Constraints\\Type(['type' => 'int']),\n new Constraints\\GreaterThanOrEqual(['value' => 0]),\n ],\n 'limit'\n );\n }\n }", "title": "" }, { "docid": "a62de9aab193a7a6004d06b6bedcf36e", "score": "0.59943455", "text": "public function validateUpdate(array $data): ValidationContext\n {\n $validationContext = new ValidationContext();\n $fail = false;\n\n if (array_key_exists('title', $data)) {\n $this->validateTitle((string)$data['title'], $validationContext);\n }\n if (array_key_exists('description', $data)) {\n $this->validateDescription((string)$data['description'], $validationContext);\n }\n if (array_key_exists('start', $data)) {\n $fail = $this->validateStart((int)$data['start'], $validationContext);\n }\n if (array_key_exists('end', $data) && !$fail) {\n $fail = $this->validateEnd((int)$data['start'], (int)$data['end'], $validationContext);\n }\n if (array_key_exists('start_leaders', $data) && !$fail) {\n $fail = $this->validateStartLeaders((int)$data['start_leaders'], (int)$data['start'], $validationContext);\n }\n if (array_key_exists('end_leaders', $data) && !$fail) {\n $this->validateEndLeaders((int)$data['end_leaders'], (int)$data['end'], $validationContext);\n }\n if (array_key_exists('price', $data)) {\n $this->validatePrice((float)$data['price'], $validationContext);\n }\n if (array_key_exists('public', $data)) {\n $this->validatePublication((bool)$data['public'], (int)$data['publicize_at'], (int)$data['start'], $validationContext);\n }\n\n return $validationContext;\n }", "title": "" }, { "docid": "7172e57991568870a7acd48763a5f2cc", "score": "0.5955856", "text": "public function check_update( $_, $assoc_args ) {\n }", "title": "" }, { "docid": "1350d6f33ff8f13e0d60ea79d94d68f5", "score": "0.5887879", "text": "abstract protected function isSchemaUpdateRequired($newVal, $oldVal);", "title": "" }, { "docid": "ea166232a81524db16824c6c111c3b94", "score": "0.5877715", "text": "public function validateConditionUpdateStruct(Condition $condition, ConditionUpdateStruct $conditionUpdateStruct): void\n {\n $conditionType = $condition->getConditionType();\n\n $this->validate(\n $conditionUpdateStruct->value,\n $conditionType->getConstraints(),\n 'value'\n );\n }", "title": "" }, { "docid": "649bcc46d85fa97b3ef97d9e6fcd5266", "score": "0.5860044", "text": "public function validateTargetUpdateStruct(Target $target, TargetUpdateStruct $targetUpdateStruct): void\n {\n $targetType = $target->getTargetType();\n\n $this->validate(\n $targetUpdateStruct->value,\n $targetType->getConstraints(),\n 'value'\n );\n }", "title": "" }, { "docid": "03b1aa0db0d6a7ff134270d68406e309", "score": "0.5786075", "text": "public function validateRuleMetadataUpdateStruct(RuleMetadataUpdateStruct $ruleUpdateStruct): void\n {\n if ($ruleUpdateStruct->priority !== null) {\n $this->validate(\n $ruleUpdateStruct->priority,\n [\n new Constraints\\NotBlank(),\n new Constraints\\Type(['type' => 'int']),\n ],\n 'priority'\n );\n }\n }", "title": "" }, { "docid": "a711af037b9dbd6e14087a6943dbda91", "score": "0.5777352", "text": "public static function validateUpdate($data) {\n\t\t$v = parent::getValidationObject($data);\n\n\t\t//Set rules\n\t\t$v->rule('optional', 'name')\n\t\t ->rule('lengthMin', 'name', 1)->message(__('Name cannot be empty!'))\n\t\t ->rule('relationData', 'user', 'int')->message(__('Incorrect data format for collection users!'));\n\n\t\t//Validate\n\t\treturn parent::validate($v, self::$__validationErrors);\n\t}", "title": "" }, { "docid": "3d440c544197f0d1f0961f6794edd410", "score": "0.5761194", "text": "protected function validator_update(array $data){}", "title": "" }, { "docid": "d64a426478583bbe5986109c3d64af88", "score": "0.5760274", "text": "public function checkIsValidForUpdate() {\n $errors = array();\n \n if (!isset($this->idactivity)) { \n $errors[\"idactivity\"] = \"idactivity is mandatory\";\n }\n \n try{\n $this->checkIsValidForCreate();\n }catch(ValidationException $ex) {\n foreach ($ex->getErrors() as $key=>$error) {\n\t$errors[$key] = $error;\n }\n } \n if (sizeof($errors) > 0) {\n throw new ValidationException($errors, \"activity is not valid\");\n }\n }", "title": "" }, { "docid": "b67cfbac45951a095f5f4975b93e2812", "score": "0.57192254", "text": "function buildUpdateQuery($parsed){\n $result = false;\n $args = array('table' => null, 'row' => array(), 'expr' => true);\n foreach ($parsed as $key => $val) {\n switch ($key) {\n case 'update':\n $tablename = $this->assignNames($val);\n if ($this->getMeta($tablename)) {\n $this->tableName = $this->encodeKey($tablename);\n }\n $args['table'] = $tablename;\n break;\n case 'where':\n $args['expr'] = $this->validExpr($val);\n break;\n case 'set':\n $args['row'] = $this->parseUpdateSet($val);\n $this->_execExpr = true;\n break;\n default:\n $this->pushError('Not supported SQL syntax(%s)', $key);\n break;\n }\n }\n if (!$this->hasError()) {\n $result = $this->update($args['table'], $args['row'], $args['expr']);\n }\n $this->_execExpr = false;\n return $result;\n }", "title": "" }, { "docid": "01c710f74e198ece78d26b3c8e9b4cf5", "score": "0.5649143", "text": "public function validateQueryCreateStruct(QueryCreateStruct $queryCreateStruct): void\n {\n $this->validate(\n $queryCreateStruct,\n [\n new ParameterStruct(\n [\n 'parameterDefinitions' => $queryCreateStruct->getQueryType(),\n ]\n ),\n ],\n 'parameterValues'\n );\n }", "title": "" }, { "docid": "1002ade592d27f6faa82727d35e471ea", "score": "0.5630418", "text": "public function forUpdate($sqlQuery){ }", "title": "" }, { "docid": "8149c92c5fb27c371242a91cb6b0c8d1", "score": "0.5597964", "text": "private static function validateUpdate(Request $r) {\n\n\t\tValidators::isNumber($r[\"clarification_id\"], \"clarificaion_id\");\n\t\tValidators::isStringNonEmpty($r[\"answer\"], \"answer\", false /* not required */);\n\t\tValidators::isInEnum($r[\"public\"], \"public\", array('0', '1'), false /* not required */);\n\t\tValidators::isStringNonEmpty($r[\"message\"], \"message\", false /* not required */);\n\n\t\t// Check that clarification exists\n\t\ttry {\n\t\t\t$r[\"clarification\"] = ClarificationsDAO::getByPK($r[\"clarification_id\"]);\n\t\t} catch (Exception $e) {\n\t\t\tthrow new InvalidDatabaseOperationException($e);\n\t\t}\n\n\t\tif (!Authorization::CanEditClarification($r[\"current_user_id\"], $r[\"clarification\"])) {\n\t\t\tthrow new ForbiddenAccessException();\n\t\t}\n\t}", "title": "" }, { "docid": "046de44829b0838fb7796551e1e13534", "score": "0.55686605", "text": "public function validateItemUpdateStruct(Item $item, ItemUpdateStruct $itemUpdateStruct): void\n {\n $this->validate(\n $itemUpdateStruct,\n new ConfigAwareStructConstraint(\n [\n 'payload' => $item->getDefinition(),\n 'allowMissingFields' => true,\n ]\n )\n );\n }", "title": "" }, { "docid": "fac4f54bf6a0be5457c3fc5ddf5d63a9", "score": "0.5561461", "text": "public function updating()\n\t{\n\t\t$this->validate();\n\t}", "title": "" }, { "docid": "9581127902472d56cc6616f796ab0a0c", "score": "0.5559287", "text": "private function input_valid($body = NULL)\n {\n $inser_update_count = count($this->table_update_fields);\n $body_count = 0;\n if (is_null($body))\n $body = $this->web_service->body;\n foreach ($body as $key => $value)\n if (in_array($key, $this->table_update_fields))\n $body_count++;\n retupdate == $body_count;\n }", "title": "" }, { "docid": "50274d9d3f06bd4a80710954e998373b", "score": "0.55165875", "text": "private function areUpdateParametersValid(\n $table = null, $params = null, $value = null, $field = null\n ) {\n return (!empty($table) && !empty($params) &&\n !Helper::isEmpty($value) && !empty($field));\n }", "title": "" }, { "docid": "937ce90a7ad452cbe8798e216e87ad5a", "score": "0.55100954", "text": "public function testKeyErrorByNotEmptyOnUpdate() {\n\t\t$field = 'key';\n\t\t$message = __d('net_commons', 'Invalid request.');\n\n\t\t//データ生成\n\t\t$data = Hash::merge($this->__defaultData, array(\n\t\t\t'FaqQuestion' => array(\n\t\t\t\t//'id' => null,\n\t\t\t\t'status' => WorkflowComponent::STATUS_IN_DRAFT\n\t\t\t)\n\t\t));\n\n\t\t//期待値\n\t\t$expected = array(\n\t\t\t$field => array($message)\n\t\t);\n\n\t\t//テスト実施(カラムなし)\n\t\tunset($data['FaqQuestion'][$field]);\n\t\t$this->__assertValidationError($field, $data, $expected);\n\n\t\t//テスト実施\n\t\tforeach ($this->validateNotEmpty as $check) {\n\t\t\t$data['FaqQuestion'][$field] = $check;\n\t\t\t$this->__assertValidationError($field, $data, $expected);\n\t\t}\n\t}", "title": "" }, { "docid": "c0d783cf84c54cdf8039f0efc72b3b96", "score": "0.5463535", "text": "public function isNotValidForUpdate()\n {\n return (\n empty(self::getEmail()) ||\n empty(self::getFirstName()) ||\n empty(self::getLastName()) ||\n empty(self::getBirthday())\n );\n }", "title": "" }, { "docid": "f2c3322fd11fb52e2590428e498740aa", "score": "0.5461365", "text": "private function validateAndSetGETData($queryBuilder) {\n\t\tfor($i=0 ; $i<sizeof($this->_CurrentVarsList) ; $i++) {\n\t\t\tif($this->_CurrentVarsList[$i] == \"sensor_name\") {\n\t\t\t\t$isOk = DataParser::checkSensorName($this->_CurrentValuesList[$this->_CurrentVarsList[$i]]);\n\t\t\t\tif(!$isOk) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$queryBuilder->setSensorName($this->_CurrentValuesList[$this->_CurrentVarsList[$i]]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($this->_CurrentVarsList[$i] == \"aggregate\") {\n\t\t\t\tif($this->_CurrentValuesList[$this->_CurrentVarsList[$i]] != \"true\" &&\n\t\t\t\t\t$this->_CurrentValuesList[$this->_CurrentVarsList[$i]] != \"false\"){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$queryBuilder->setAggregate($this->_CurrentValuesList[$this->_CurrentVarsList[$i]]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($this->_CurrentVarsList[$i] == \"dateto\" || $this->_CurrentVarsList[$i] == \"datefrom\") {\n\t\t\t\t$isOk = strtotime($this->_CurrentValuesList[$this->_CurrentVarsList[$i]]);\n\t\t\t\tif($isOk == false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif($this->_CurrentVarsList[$i] == \"dateto\") {\n\t\t\t\t\t\t$queryBuilder->setDateTo($this->_CurrentValuesList[$this->_CurrentVarsList[$i]]);\n\t\t\t\t\t} else if($this->_CurrentVarsList[$i] == \"datefrom\"){\n\t\t\t\t\t\t$queryBuilder->setDateFrom($this->_CurrentValuesList[$this->_CurrentVarsList[$i]]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // Location cannot be validated at the moment (its just any string)...\n\t\t\telse if($this->_CurrentVarsList[$i] == \"location\") {\n\t\t\t\t$queryBuilder->setLocation($this->_CurrentValuesList[$this->_CurrentVarsList[$i]]);\n\t\t\t}\n\t\t}\n\t\treturn $queryBuilder;\n\t}", "title": "" }, { "docid": "97de9b79147f47ce51421d90b060b35b", "score": "0.54548305", "text": "public function compileUpdate(Update $query) : CompiledQuery;", "title": "" }, { "docid": "6767d4f582fb74430329672382f4f9da", "score": "0.5443757", "text": "private function update() {\n\t\t\t$tableFields = array();\n\t\t\tforeach ($this->_fields as $field => $req) {\n\t\t\t\t$tableFields[] = $field;\n\t\t\t}\n\t\t\t$updateFields = array();\n\t\t\t$updateValues = array();\n\t\t\t$rawFields = array();\n\t\t\t$updates = array();\n\t\t\tforeach ($this->_fields as $field => $req) {\n\t\t\t\tif ((string) $this->$field !== (string) $this->_meta[$field]['value']) {\n\t\t\t\t\t$updates[$field] = $field;\n\t\t\t\t\tif ($this->_meta[$field]['raw']) {\n\t\t\t\t\t\t$rawFields[$field] = \"`\".$field.\"` = \".$this->$field;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$updateFields[$field] = \"`\".$field.\"` = ?\";\n\t\t\t\t\t\t$updateValues[$field] = $this->$field;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($updateFields) || !empty($rawFields)) {\n\t\t\t\tif ($this->isDuplicate()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$sql = \"UPDATE `\".$this->_table.\"`\n\t\t\t\t\tSET \".implode(', ', array_merge($updateFields, $rawFields)).\"\n\t\t\t\t\tWHERE `\".$this->_id.\"` = ?\";\n\t\t\t\t$updateValues[] = $this->{$this->_id};\n\t\t\t\t$result = query($sql, $updateValues);\n\t\t\t\tif ($result->count > 0 || empty($result->error)) {\n\t\t\t\t\tif ($this->load($this->{$this->_id})) {\n\t\t\t\t\t\t$comment = 'Fields updated: '.implode(', ', array_keys($updates));\n\t\t\t\t\t\t$this->logHistory('UPDATE', $comment);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttrigger_error('Model Error: Update fail for '.$this->_table.' [Query] '.$sql.' [Params] '.htmlentities(print_r($updateValues, true)).' [Error] '.$result->error, E_USER_ERROR);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "7ddef0d75661d4dc0ba33afa7bd1a69d", "score": "0.53772175", "text": "public function validate()\n {\n //can not apply CONTAINS on int(Invalid query)\n if ($this->conditionOperator !== null\n && $this->conditionOperator->getType() === Token::TOKEN_CONTAINS\n && $this->conditionRight->getType() !== Token::TOKEN_STRING\n ) {\n throw new InvalidQueryException('Can not use CONTAINS with number literal');\n }\n\n if ($this->fromElement === '') {\n $this->isFromElementEmpty = true;\n }\n }", "title": "" }, { "docid": "4107c647f9660c92567e5be90f69b9d6", "score": "0.53688145", "text": "public function validateUpdate($entity, $fields = array() , $keyName = null )\n {\n\n $fields = $fields ?: $this->fields;\n $keyName = $keyName ?: $this->keyName;\n\n $orm = $this->getOrm();\n $request = $this->getRequest();\n\n $filter = $request->checkFormInput\n (\n $orm->getValidationData( $this->entityName, $fields ),\n $orm->getErrorMessages( $this->entityName ),\n $keyName\n );\n\n $entity->addData($filter->getData());\n\n return $entity;\n\n }", "title": "" }, { "docid": "aacc3e94f7f0b4a32de7f0bc0a45c815", "score": "0.53536516", "text": "public function update(\\Yana\\Db\\Queries\\Update $updateQuery);", "title": "" }, { "docid": "a5b045991221cc3c62303f10360bd556", "score": "0.5317056", "text": "function validate_query($query_array){\n global $error_msg;\n \n if(intval($query_array['from_year']) > intval($query_array['to_year'])\n && $query_array['from_year'] != \"default\" \n && $query_array['to_year'] != \"default\"){\n $error_msg = \"The from year must be less than or equal to the to year.\";\n } elseif(intval($query_array['min_stock']) <= 0 && $query_array['min_stock'] != \"\"){\n $error_msg = \"Minimum stock must be a positive integer.\";\n } elseif(intval($query_array['min_ordered']) <= 0 && $query_array['min_ordered'] != \"\"){\n $error_msg = \"Minimum ordered must be a positive integer.\";\n } elseif(intval($query_array['min_cost']) <= 0 && $query_array['min_cost'] != \"\"){\n $error_msg = \"Minimum cost must be a positive integer.\";\n } elseif((intval($query_array['min_cost']) > intval($query_array['max_cost'])\n || intval($query_array['max_cost']) <= 0)\n && $query_array['max_cost'] != \"\"){\n $error_msg = \"Maximum cost must be an integer greater \" .\n \"than or equal to minimum cost. If minimum cost\" .\n \" isn't specified, maximum cost must be greater than zero.\";\n }\n return $error_msg == \"\";\n }", "title": "" }, { "docid": "76cf4ab30f3b5a7d283a0f51116cd140", "score": "0.53140473", "text": "function update($query=array()){\n\t\tif(empty($query['data']) OR empty($query['table'])){\n\t\t\tdie(\"Enter a valid parameter\");\n\t\t}\n\t\t\n\t\t$ci = &get_instance();\n\t\t\n\t\tif(!empty($query['where'])){\n\t\t\t$ci->db->where($query['where']);\n\t\t}\n\t\t\n\t\treturn $ci->db->update($query['table'] , $query['data']);\n\t\t\n\t}", "title": "" }, { "docid": "f20ce78bfdde2198d690002a8567a8fb", "score": "0.53136307", "text": "protected function executeUpdate() {\n\t\t$table = $this->engine->table($this->request->update);\n\t\t$this->rowCount = 0;\n\t\twhile($table->valid()) {\n\t\t\t$row = $table->current();\n\t\t\tif ($this->evaluate($this->request->where, $row) === true) {\n\t\t\t\tforeach($this->request->set as $field => $value) {\n\t\t\t\t\tif ($this->isExpression($value)) {\n\t\t\t\t\t\t$row->{$field} = $this->evaluate($value, $row);\n\t\t\t\t\t} elseif ($this->isBuiltin($value)) {\n\t\t\t\t\t\t$row->{$field} = $this->builtins[strtoupper($value)];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$row->{$field} = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->engine->replace($this->request->update, $table->key(), $row);\n\t\t\t\t$this->rowCount++;\n\t\t\t}\n\t\t\t$table->next();\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d8278e13622c62bc3fe5e16bef8f7624", "score": "0.5289424", "text": "protected function pre_update(&$query) {\n\t}", "title": "" }, { "docid": "0b7515cc7251a2dedb28563b74c30abe", "score": "0.52795124", "text": "public function update()\n {\n if (func_num_args() > 0) {\n throw new InvalidArgumentException('update() does not accept any arguments');\n }\n\n $fields = array();\n $db = $this->getDb();\n\n foreach ($this->_data as $key => $value) {\n $valueHasChanged =\n (!array_key_exists($key, $this->_originalData)) ||\n ($this->_originalData[$key] != $value) ||\n (is_null($this->_originalData[$key]) !== is_null($value));\n\n if ($valueHasChanged && (\n (!is_array($this->_primaryKey) && $key != $this->_primaryKey) ||\n (is_array($this->_primaryKey) && !in_array($key, $this->_primaryKey)))\n ) {\n $fields[$key] = $value;\n }\n }\n\n if (count($fields) == 0) {\n // Don't do anything, if no fields were changed since last find() or update()\n return false;\n }\n\n if ($this->_timestampEnabled) {\n $now = $this->getDateTimeInstance();\n $fields[$this->_timestampUpdatedCol] = $now->format(Format::DATETIME);\n }\n\n $db->update(\n $this->_tableName,\n $this->quoteKeys($fields),\n $this->getWhereAsArray()\n );\n\n // Update original data\n $this->_originalData = $this->_data;\n\n return true;\n }", "title": "" }, { "docid": "f638c30105501111051fb8992c8b3494", "score": "0.5277322", "text": "protected function _update()\n {\n $query = $this->_queryClass;\n $bindKey = PdoBindHelper::generateBindKey();\n $result = DbProxy::getDb()->update((new $query())->getTableName(), $this->_truncateToStructure(true), $this->_pkWhere($bindKey), [$bindKey => $this->getInitialStateValue('id')]);\n //utrwalanie bieżącego stanu\n $this->clearModified();\n return ($result >= 0);\n }", "title": "" }, { "docid": "cee2d440bcd1a33b2ae0985858c8d6fb", "score": "0.5239028", "text": "public function run()\n\t{\n\t\tif (!$this->query) $this->build();\n\n\t\t$sth = $this->connection->prepare($this->query);\n\n\t\tif (!$sth->execute($this->variables)) {\n\t\t\tthrow new QueryException('Unable to execute update query');\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e0ced8fc37e5805360fc4b03c3d35a86", "score": "0.5226258", "text": "function update( $table, $data, $where, $format = null, $where_format = null )\r\n\t{\r\n\t\tif ( !is_array( $where ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$formats = $format = (array) $format;\r\n\t\t$bits = $wheres = array();\r\n\t\tforeach ( (array) array_keys( $data ) as $field ) {\r\n\t\t\tif ( !empty( $format ) ) {\r\n\t\t\t\t$form = ( $form = array_shift( $formats ) ) ? $form : $format[0];\r\n\t\t\t} elseif ( isset( $this->field_types[$field] ) ) {\r\n\t\t\t\t$form = $this->field_types[$field];\r\n\t\t\t} elseif ( is_null( $data[$field] ) ) {\r\n\t\t\t\t$form = 'NULL';\r\n\t\t\t\tunset( $data[$field] );\r\n\t\t\t} else {\r\n\t\t\t\t$form = '%s';\r\n\t\t\t}\r\n\t\t\t$bits[] = \"`$field` = {$form}\";\r\n\t\t}\r\n\r\n\t\t$where_formats = $where_format = (array) $where_format;\r\n\t\tforeach ( (array) array_keys( $where ) as $field ) {\r\n\t\t\tif ( !empty( $where_format ) ) {\r\n\t\t\t\t$form = ( $form = array_shift( $where_formats ) ) ? $form : $where_format[0];\r\n\t\t\t} elseif ( isset( $this->field_types[$field] ) ) {\r\n\t\t\t\t$form = $this->field_types[$field];\r\n\t\t\t} elseif ( is_null( $where[$field] ) ) {\r\n\t\t\t\tunset( $where[$field] );\r\n\t\t\t\t$wheres[] = \"`$field` IS NULL\";\r\n\t\t\t\tcontinue;\r\n\t\t\t} else {\r\n\t\t\t\t$form = '%s';\r\n\t\t\t}\r\n\t\t\t$wheres[] = \"`$field` = {$form}\";\r\n\t\t}\r\n\r\n\t\t$sql = \"UPDATE `$table` SET \" . implode( ', ', $bits ) . ' WHERE ' . implode( ' AND ', $wheres );\r\n\t\treturn $this->query( $this->prepare( $sql, array_merge( array_values( $data ), array_values( $where ) ) ) );\r\n\t}", "title": "" }, { "docid": "ba3c93cbb431b7e8443cc6770b8b25d3", "score": "0.52258825", "text": "public function checkQueryParameters($query)\n {\n $this->assertArrayHasKey('time', $query, 'Query should have time set.');\n $this->assertGreaterThan(0.0, $query['time'], 'Time should be greater than 0');\n\n $this->assertArrayHasKey('curlRequest', $query, 'Query should have curlRequest set.');\n $this->assertNotEmpty($query['curlRequest'], 'curlRequest should not be empty');\n\n $this->assertArrayHasKey('senseRequest', $query, 'Query should have senseRequest set.');\n $this->assertNotEmpty($query['senseRequest'], 'senseRequest should not be empty.');\n\n $this->assertArrayHasKey('backtrace', $query, 'Query should have backtrace set.');\n\n $this->assertArrayHasKey('scheme', $query, 'Query should have scheme set.');\n $this->assertNotEmpty($query['scheme'], 'scheme should not be empty.');\n\n $this->assertArrayHasKey('host', $query, 'Query should have host set.');\n $this->assertNotEmpty($query['host'], 'Host should not be empty');\n\n $this->assertArrayHasKey('port', $query, 'Query should have port set.');\n $this->assertNotEmpty($query['port'], 'port should not be empty.');\n\n $this->assertArrayHasKey('path', $query, 'Query should have host path set.');\n $this->assertNotEmpty($query['path'], 'Path should not be empty.');\n }", "title": "" }, { "docid": "47cf68a448886abbcb229d3fa6889022", "score": "0.51969796", "text": "public function valid_query($query)\n {\n // Checking if the query is a valid SELECT query\n if(preg_match(\"#(SELECT\\s[\\w\\*\\`\\')\\(\\,\\s]+\\sFROM\\s[\\w`\\']+)| (UPDATE\\s[\\w`\\']+\\sSET\\s[\\w\\,\\'\\=\\`\\']++\\sWHERE\\s[\\w`\\']+)| (INSERT\\sINTO\\s[\\d\\w\\'\\`]+[\\s\\w\\d\\`\\')\\(\\,]*\\sVALUES\\s\\([\\d\\w\\'\\,\\)\\'\\`]+)| (DELETE\\sFROM\\s[\\d\\w\\'\\=\\'\\`]+)#i\", $query))\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "7efc403abe99bf58052fc2591bde90cc", "score": "0.51901865", "text": "function update(array $data) {\n if ($data) {\n $this->run_hooks('pre_update', $data);\n // Validate\n if (! $this->validate($data, 'update')) {\n $this->messages[] = $this->styledText($this->validation_text . $this->validation_error, '#f80');\n return False;\n }\n if ($this->clause) $data = array_merge($data, $this->clause); // clause\n // create SQL template string\n $sql = \"UPDATE $this->table SET\\n\";\n foreach($data as $key => $value) {\n if (! (is_scalar($value) or is_null($value))) {\n $data[$key] = json_encode($value);\n trigger_error(\"->update(): json_encoded value for field '$key' (was an array). It's better to handle this in a get_data() hook.\", E_USER_NOTICE);\n }\n $sql .= \"`$key` = :$key, \";\n }\n $sql = substr($sql, 0, -2) .\" WHERE id = :id\";\n $data['id'] = $this->id; // 'bind' the last param, to make it ALL PDO\n // prepare,\n $stmt = $this->db->prepare($sql);\n if ($this->debug) echo $this->styledText($sql.\"<br>\\n\", '#C60', 'p');\n // ..run:\n if ($stmt->execute($data)) {\n if ($this->record_updated) $this->messages[] = $this->record_updated;\n $data = $this->select();\n $this->run_hooks('post_update', $data);\n return true;\n }else{\n trigger_error(\"Update error: \". $stmt->errorInfo()[2], E_USER_WARNING);\n return false;\n }\n }else{\n $this->messages[] = $this->styledText(\"->update: No data\", 'red');\n return false;\n }\n }", "title": "" }, { "docid": "470d8cf347325e17c8fa4085be0f88a9", "score": "0.5185382", "text": "public function update($query) {\n $this->voidQuery($query);\n }", "title": "" }, { "docid": "1f866184a2273e53711c067539b5a0df", "score": "0.51759994", "text": "public function update(Update $query, $value);", "title": "" }, { "docid": "b8109227a3c0929101634136c31bf1f3", "score": "0.51567614", "text": "protected function validateMatchUnitsNew()\n\t{\n\t\t//\n\t\t// Init criteria.\n\t\t//\n\t\tif( ! $this->offsetExists( kAPI_PARAM_CRITERIA ) )\n\t\t\t$this->offsetSet( kAPI_PARAM_CRITERIA, Array() );\n\t\t\n\t\t//\n\t\t// Get criteria.\n\t\t//\n\t\t$criteria = $this->offsetGet( kAPI_PARAM_CRITERIA );\n\t\t\n\t\t//\n\t\t// Validate domain selection.\n\t\t//\n\t\tif( $this->offsetExists( kAPI_PARAM_DOMAIN ) )\n\t\t\t$this->validateMatchUnitsDomain( $criteria );\n\t\t\n\t\t//\n\t\t// Validate group selection.\n\t\t//\n\t\telse\n\t\t\t$this->validateMatchUnitsGroup( $criteria );\n\t\t\n\t\t//\n\t\t// Validate shape offset.\n\t\t//\n\t\t$this->validateShapeOffset( $criteria );\n\t\t\n\t\t//\n\t\t// Validate shape parameter.\n\t\t//\n\t\t$this->validateShapeParameter( $criteria );\n\t\t\n\t\t//\n\t\t// Update criteria.\n\t\t//\n\t\t$this->offsetSet( kAPI_PARAM_CRITERIA, $criteria );\n\t\t\n\t}", "title": "" }, { "docid": "377f7f648fdd1e53329f0cc4bf683c83", "score": "0.5155631", "text": "function validateQuery($query) {\n // explicitly forbidden statements\n if (preg_match('/(alter|create|drop|rename|truncate|insert|update|delete|grant|modify|set|commit|rollback|call|do|handler|load|replace|start|stop|lock|savepoint|release|xa|purge|reset|change|prepare|execute|deallocate|begin|declare|revoke|analyze|check|checksum|optimize|repair|install|uninstall|binlog|cache|flush|kill|shutdown|use|help)\\s/i', $query)) {\n return false;\n } elseif (strpos($query, ';') !== false) { // avoid multi-statements\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "ebbdb1e48ee76301bdd26463fbd7fdaf", "score": "0.5149789", "text": "public function validate()\n {\n $this->prepare();\n parent::validate();\n }", "title": "" }, { "docid": "4a7f8963c6a67222c58d2c1fcc85b0fe", "score": "0.51487887", "text": "abstract public function prepareUpdate();", "title": "" }, { "docid": "1bcc79ce1d4f5219ff695ded0ba4efc7", "score": "0.51458836", "text": "public function update_by()\n {\n $args = func_get_args();\n $data = array_pop($args);\n\n $data = $this->trigger('before_update', $data);\n\n if ($this->validate($data) !== FALSE)\n {\n $this->_set_where($args);\n $result = $this->_database->set($data)\n ->update($this->_table);\n $this->trigger('after_update', array($data, $result));\n\n return $result;\n }\n else\n {\n return FALSE;\n }\n }", "title": "" }, { "docid": "05ad05e94f5d8198723d943c6f505439", "score": "0.51393855", "text": "public function validate(array $parameters, bool $updateMode);", "title": "" }, { "docid": "b25a72be961cebacddf8174ec3265daa", "score": "0.51227605", "text": "public function update()\n {\n assert(!isset($result), 'Cannot redeclare var $result');\n $result = false;\n assert(!isset($form), 'Cannot redeclare var $form');\n $form = $this->getForm();\n if ($form) {\n $updatedEntries = $form->getUpdateValues();\n $tableName = $form->getBaseForm()->getTable();\n\n if (empty($updatedEntries)) {\n $message = 'No data has been provided.';\n $level = \\Yana\\Log\\TypeEnumeration::WARNING;\n throw new \\Yana\\Core\\Exceptions\\Forms\\MissingInputException($message, $level);\n }\n assert(!isset($database), 'Cannot redeclare var $database');\n $database = $this->getDatabase();\n $beforeHooks = array_merge(\n self::getDefaultCallbacks()->getBeforeUpdate()->toArray(), $this->_getCallbacks()->getBeforeUpdate()->toArray()\n );\n $afterHooks = array_merge(\n self::getDefaultCallbacks()->getAfterUpdate()->toArray(), $this->_getCallbacks()->getAfterUpdate()->toArray()\n );\n\n foreach ($updatedEntries as $id => $entry)\n {\n $id = mb_strtolower($id);\n\n /* before doing anything, check if entry exists */\n if (!$database->exists(\"{$tableName}.{$id}\")) {\n $message = 'Entry not found';\n $level = \\Yana\\Log\\TypeEnumeration::WARNING;\n throw new \\Yana\\Core\\Exceptions\\NotFoundException($message, $level);\n }\n\n // execute hooks\n foreach ($beforeHooks as $callback)\n {\n $callback($id, $entry); // may throw exception\n }\n\n try {\n $query = new \\Yana\\Db\\Queries\\Update($database);\n $query->setTable($tableName)->setRow($id)->setValues($entry)->sendQuery(); // update the row\n } catch (\\Yana\\Core\\Exceptions\\NotWriteableException $e) {\n return false; // error - unable to perform update - possibly readonly\n }\n\n // execute hooks\n foreach ($afterHooks as $callback)\n {\n $callback($id, $entry); // may throw exception\n }\n } // end for\n $database->commit(); // may throw exception\n $result = true;\n }\n return $result;\n }", "title": "" }, { "docid": "a16f6c5b7213617b112446c97a9cc354", "score": "0.51059216", "text": "protected function validateUpdate($data)\n {\n $errors = array();\n\n if(strlen(trim($data['name'])) < 3 || strlen(trim($data['name'])) > 255) {\n $errors['name'] = 'Invalid category name length';\n }\n if(strlen(trim($data['description'])) < 3 || strlen(trim($data['description'])) > 500) {\n $errors['description'] = 'Invalid category description length';\n }\n\n return $errors;\n }", "title": "" }, { "docid": "ad9af31d810df8629d02f4a967ed7122", "score": "0.51020193", "text": "public function test_Update() {\n\t\t\t$res = User::update(['username'=>'something'], [ ]);\n\t\t\t$res_exp = new TMResult(TMResult::InvalidConditions, null, null);\n\t\t\t$this->wrapAssert(assertEquals, [$res, $res_exp], 'Update: checks conditions - fails if none');\n\n\t\t\t// Updates that fail due to bad conditions do not alter DB state\n\t\t\t$res = User::update(['username' => 'benben'], new Condition('userid', 'muffins'));\n\t\t\t$this->wrapAssert(assertEquals, [$res->status, TMResult::InvalidConditions], 'Update: fails on bad conditions');\n\t\t\t$res = User::fetch(new Condition('userid', 0, Condition::GreaterThan));\n\t\t\t$this->wrapAssert(assertEquals, [$res->result, $this->expected_fetched_data['User']], 'Update: bad conditions do not alter DB');\n\n\t\t\t// Updates that fail due to bad values do not alter DB state\n\t\t\t$res = User::update(['username' => 'ben_nonalpanumeric'], new Condition('userid', 1));\n\t\t\t$this->wrapAssert(assertEquals, [$res->status, TMResult::InvalidData], 'Update: fails on bad values');\n\t\t\t$res = User::fetch(new Condition('userid', 0, Condition::GreaterThan));\n\t\t\t$this->wrapAssert(assertEquals, [$res->result, $this->expected_fetched_data['User']], 'Update: bad values do not alter DB');\n\n\t\t\t// Test updates that return success take effect in the DB\n\t\t\t$res = User::update(['username' => 'bhallstein'], new Condition('userid', 2));\n\t\t\t$this->wrapAssert(assertEquals, [$res->status, TMResult::Success], 'Update: succeeds when parameters OK');\n\t\t\t$res = User::fetch(new Condition('userid', 2));\n\t\t\t$this->wrapAssert(assertEquals, [$res->result[0]->username, 'bhallstein'], 'Update: successful updates applied as expected');\n\t\t}", "title": "" }, { "docid": "db93d7350d61448267dbae4fab09d75f", "score": "0.5098767", "text": "static function update() {\n $params = func_get_args();\n $table = array_shift($params);\n $dict = array_shift($params);\n $where = (count($params) > 0)? array_shift($params) : '';\n \n if (count($dict) == 0) return false;\n \n $requete = \"UPDATE `$table` SET `\" . implode(\"` = '%s', `\", array_keys($dict)) . \"` = '%s' \" . $where;\n $params = array_merge(array_values($dict), $params);\n return Mysql::query($requete, $params);\n }", "title": "" }, { "docid": "7d5287439896aab6036944053561e7d2", "score": "0.5087879", "text": "public function validateUpdate($id, $attributes) {\n\t\t$this -> update_rules \t= [\n\t\t\t'name' \t=> 'required|unique:product_brand,name, ' . $id,\n\t\t\t'order' => 'numeric'\n\t\t];\n\n\t\treturn Validator::make($attributes, $this -> update_rules);\n\t}", "title": "" }, { "docid": "a335a390e4266234748a72e3d4969afb", "score": "0.5085975", "text": "private function validateData(): void\n {\n if (is_null($this->userId) || is_null($this->apiKey) || is_null($this->startDate) || is_null($this->endDate)) {\n throw new InvalidArgumentException(\"All object variables must have a value\");\n }\n }", "title": "" }, { "docid": "116aa7ca451abb116014a95f3c867863", "score": "0.5058079", "text": "function update($query, $newValues = array(), $whereValues = array())\n\t{\n\t\t$this->numRows = 0;\n $this->errors = array();\n\t\tif(!is_array($newValues))\n\t\t{\n\t\t\t$newValues = (array)$newValues;\n\t\t}\n\t\tif(!is_array($whereValues))\n\t\t{\n\t\t\t$whereValues = (array)$whereValues;\n\t\t}\n\t\t$newValues = $this->clean($newValues);\n\t\t$whereValues = $this->clean($whereValues);\n\t\ttry{\n\t\t\t//echo \"preparing update<br>\";\n\t\t\tif (($stmt = $this->conn->prepare($query)) === false)\n\t\t\t{\n\t\t\t\t$this->errors[] = \"Error preparing update query: \".$query.PHP_EOL.\"Values: \".print_r($newValues, true).print_r($whereValues, true);\n\t\t\t\t$messageArray = $stmt->errorInfo();\n\t\t\t\t$this->errors[] = $messageArray[2];\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$count = 1;\n\t\t\tif (count($newValues)>0)\n\t\t\t{//echo \"new values count > 0. <br>\";\n\t\t\t\tforeach($newValues as $key=>&$value)\n\t\t\t\t{\n\t\t\t\t\t//echo \"binding value: $value<br>\";\n\t\t\t\t\tif(($stmt->bindParam($count, $value)) === false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->errors[] = \"Error binding 'new' parameters for update statement: \".$query.PHP_EOL.\"Values: \".print_r($newValues, true).print_r($whereValues, true);\n\t\t\t\t\t\t$messageArray = $stmt->errorInfo();\n\t\t\t\t\t\t$this->errors[] = $messageArray[2];\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (count($whereValues)>0)\n\t\t\t{//echo \"where values count > 0.<br>\";\n\t\t\t\tforeach($whereValues as $key=>&$value)\n\t\t\t\t{//echo \"binding value: $value<br>\";\n\t\t\t\t\tif(($stmt->bindParam($count, $value)) === false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->errors[] = \"Error binding 'where' parameters for update statement: \".$query.PHP_EOL.\"Values: \".print_r($newValues, true).print_r($whereValues, true);\n\t\t\t\t\t\t$messageArray = $stmt->errorInfo();\n\t\t\t\t\t\t$this->errors[] = $messageArray[2];\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (($stmt->execute()) === false)\n\t\t\t{\n\t\t\t\t$this->errors[] = \"Error executing update statement: \".$query.PHP_EOL.\"Values: \".print_r($newValues, true).print_r($whereValues, true);\n\t\t\t\t$messageArray = $stmt->errorInfo();\n\t\t\t\t$this->errors[] = $messageArray[2];\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t//echo \"statement executed<br>\";\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\t$this->errors[] = $e->getMessage();\n\t\t\treturn false;\n\t\t}\n\t\t$this->numRows = $stmt->rowCount();\n\t\t//echo \"update statement should have been successful<br>\";\n\t\treturn true;\n\t}", "title": "" }, { "docid": "3a315d7d8dfe594b811d89d312da412c", "score": "0.5049469", "text": "protected function prepare_update(&$table_name)\n {\n if(!parent::prepare_update($table_name))\n {\n log_message(parent::ERROR_LEVEL, \"Missing input parameters--prepare_update--\" . get_class($this));\n return false;\n }\n\n if(empty($this->id))\n return FALSE;\n if(empty($this->updatetime))\n $this->updatetime = time();\n $table_name = self::TABLE_NAME;\n\n return true;\n }", "title": "" }, { "docid": "2b4a99732fa190c84ad7ce111ff31c1f", "score": "0.50325364", "text": "public function update() {\n global $db;\n $table = $this->table();\n\n if (empty($table)) { error_log('[WARN] Table name is not defined on object'); return false; }\n if (empty($this->_fields)) { error_log('[WARN] Fields are not defined on object'); return false; }\n\n //let's only update if updateAttributes actually updated any attributes... \n if (empty($this->_changedFields)) { error_log('[WARN] No fields were changed'); return $this; }\n\n $params = array();\n foreach($this->_changedFields as $key => $values) {\n $tableKey = underscore(str_replace('ID','Id',$key));\n $params[$tableKey] = $this->$key;\n if (is_a($params[$tableKey],'Date')) { $params[$tableKey] = $params[$tableKey]->mysqlDateTime('UTC'); }\n }\n\n unset($params['id']);\n //unset($params['created_at']);\n\n $sql = 'UPDATE '.$table.' SET '.join(' = ?, ',array_keys($params)).' = ? ';\n if (in_array('updatedAt',$this->_fields) && !array_key_exists('updated_at',$params))\n $sql.= ', updated_at = UTC_TIMESTAMP() ';\n $sql.= 'WHERE id = '.$this->id.' LIMIT 1';\n\n $query = $db->query($sql,$params);\n $this->__construct($this->id);\n return true;\n }", "title": "" }, { "docid": "2c079a8f47ef2a906742ba4d29f7ca11", "score": "0.5029705", "text": "function queryUpdate($query,$debug=false){\r\n $queryUpdate = $this->databaseType.'QueryUpdate';\r\n return $this->$queryUpdate($query,$debug);\r\n }", "title": "" }, { "docid": "194e6215c25d8d721784a0bc815297cf", "score": "0.5029572", "text": "function sql_column_need_update($specified, $current) {\n $lengthy_pattern = '#(\\w+)\\s*\\((\\d+)\\)#';\n $specified = \\preg_replace('#\\s+#', '', $specified);\n $current = \\preg_replace('#\\s+#', '', $current);\n $specified_is_lengthy = (1 == \\preg_match($lengthy_pattern, $specified, $lengthy_specified));\n $current_is_lengthy = (1 == \\preg_match($lengthy_pattern, $current, $lengthy_current));\n if (!$current_is_lengthy && !$specified_is_lengthy) {\n // Needs update if they differ.\n return \\strcasecmp($specified, $current) !== 0;\n } else if ($current_is_lengthy && !$specified_is_lengthy) {\n // Needs update if type differ.\n return \\strcasecmp($lengthy_current[1], $specified) !== 0;\n } else if (!$current_is_lengthy && $specified_is_lengthy) {\n // Needs update (specified has length).\n return true;\n } else {\n // Needs update if length differs.\n $current_length = \\intval($lengthy_current[2]);\n $specified_length = \\intval($lengthy_specified[2]);\n if ($current_length !== $specified_length)\n return true;\n // Needs update if type differs.\n return \\strcasecmp($lengthy_current[1], $lengthy_specified[1]) !== 0;\n }\n}", "title": "" }, { "docid": "d5869dfafc4f3e586f391452326f1572", "score": "0.50286406", "text": "function _updateQuery(&$obj)\r\n {\r\n foreach ($obj->cleanVars as $k => $v) {\r\n ${$k} = $v;\r\n }\r\n\r\n $sql = sprintf(\"UPDATE %s SET mime_ext = %s, mime_types = %s, mime_name = %s, mime_admin = %u, mime_user = %u WHERE\r\n mime_id = %u\", $this->_db->prefix($this->_dbtable), $this->_db->quoteString($mime_ext),\r\n $this->_db->quoteString($mime_types), $this->_db->quoteString($mime_name), $mime_admin, $mime_user, $mime_id);\r\n return $sql;\r\n }", "title": "" }, { "docid": "698afddf7099f072fcbdeced7adbaeaf", "score": "0.50259495", "text": "public function validate()\n\t{\n\t\t$tmpRgxp = $this->arrConfiguration['rgxp'];\n\t\t$tmpMandatory = $this->arrConfiguration['mandatory'];\n\t\t$tmpLabel = $this->strLabel;\n\t\t$arrInput = deserialize($this->getPost($this->strName));\n\t\tif (!is_array($arrInput)) $arrInput = array();\n\n\t\tforeach ($arrInput as $row => $rowdata)\n\t\t{\n\t\t\tforeach ($rowdata as $col => $value)\n\t\t\t{\n\t\t\t\tif ($this->arrColumns[$col]['unique'] && count(array_unique($allvalues[$col])) != count($allvalues[$col]))\n\t\t\t\t{\n\t\t\t\t\t$this->addError(sprintf($GLOBALS['TL_LANG']['ERR']['notunique'], $this->strLabel));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (count($this->arrQueryErrors))\n\t\t{\n\t\t\t$this->class = 'error';\n\t\t\t$this->arrErrors[] = '';\n\t\t}\n\n\t\t$this->strLabel = $tmpLabel;\n\t\t$this->varValue = $arrInput;\n\t}", "title": "" }, { "docid": "d88832976b4cb4c9eb05f4083ea747c8", "score": "0.502119", "text": "public function testUpdateEndpoint_withInvalidData_expectValidationErrors()\n {\n $this->putJson(route('events.update', 2))\n ->assertNotFound();\n\n $event = Event::factory()->create();\n\n $this->putJson(route('events.update', $event), [])\n ->assertJsonValidationErrors(['eventName', 'location', 'date']);\n\n $this->putJson(route('events.update', $event), [\n 'eventName' => null,\n 'location' => 'Panglao, Bohol',\n 'date' => '2020-08-08',\n ])\n ->assertJsonValidationErrors(['eventName']);\n }", "title": "" }, { "docid": "585b2e2e999648b7d32ff58d079d32b4", "score": "0.50131816", "text": "protected function validateOrThrow() {\n if (!isset($this->name)) {\n throw new InvalidObjectStateException(WhColumnError::UNA);\n }\n \n if (!isset($this->length)) {\n throw new InvalidObjectStateException(WhColumnError::ULN);\n }\n\n if (!isset($this->isUnique)) {\n throw new InvalidObjectStateException(WhColumnError::UIU);\n }\n\n if (!isset($this->isForeignKey)) {\n throw new InvalidObjectStateException(WhColumnError::UIF);\n }\n\n if (!isset($this->allowsNull)) {\n throw new InvalidObjectStateException(WhColumnError::UTI);\n }\n\n if (!isset($this->dtId)) {\n throw new InvalidObjectStateException(WhColumnError::UDI);\n }\n\n // Check for invalid fields\n $table = WhTable::fetchById($this->tableId);\n if (!isset($table)) {\n throw new InvalidObjectStateException(WhColumnError::ITI);\n }\n\n $data_type = DbDataType::fetchById($this->dtId);\n if (!isset($data_type)) {\n throw new InvalidObjectStateException(WhColumnError::IDI);\n }\n\n // Check duplicate column name\n $table_columns = static::fetchColumnsForTable($this->tableId);\n foreach ($table_columns as $col) {\n if ($col->getName() == $this->name && $col->getId() != $this->getId()) {\n throw new InvalidObjectStateException(WhColumnError::DNA);\n }\n }\n\n // Unset and invalid foreign key\n if ($this->isForeignKey) {\n if (!isset($this->foreignTableId)) {\n throw new InvalidObjectStateException(WhColumnError::UFT);\n }\n $foreign_table = WhTable::fetchById($this->foreignTableId);\n if (!isset($foreign_table)) {\n throw new InvalidObjectStateException(WhColumnError::IFT);\n }\n }\n }", "title": "" }, { "docid": "b8fbd0f3af73ca52d542f10dc2d4b802", "score": "0.5013064", "text": "function validationCheck($changeArray, $colName)\r\n{\r\n if ($changeArray[$colName][\"change_status\"]) {\r\n\r\n // check if value is empty, if its empty it failed the validation check\r\n // heck if it succesfully updated the database\r\n if (!empty($changeArray[$colName][\"value\"] && $changeArray[$colName][\"updated_status\"])) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n return NULL;\r\n}", "title": "" }, { "docid": "f7f6525854b5d02d5b2e90770c1bc663", "score": "0.5010514", "text": "public function validateUpdate($extra_rules = null, $extra_errors = null) {\n\t\t\n\t\t// Add extra rules and error messages\n\t\t$rules = array_merge_recursive(array(\n\t\t\t'name' => 'unique:'.$this->table.',name,'.$this->id.',id,account_id,'.$this->account_id,\n\t\t), (array) $extra_rules);\n\n\t\t// Execute validation\n\t\treturn parent::validateUpdate($rules, $extra_errors);\n\t}", "title": "" }, { "docid": "415345c2b073ae5151d20380af724667", "score": "0.50077164", "text": "public function update(){\n $data = new Validation();\n $sql = \"UPDATE {$this->table} SET `tel` = '$data->phone',`name` = '$data->fullname',`email` = '$data->email',`description` = '$data->description',`update_date` = '$data->xdate',`updated_by` = '$this->guid' WHERE {$this->id} = '$this->guid'\";\n // echo $sql;exit;\n if(Parent::$conn->query($sql)){\n return $this->permission->updatePermission();\n };\n }", "title": "" }, { "docid": "d92a30bdbf009ca68f6f6392f7ce6159", "score": "0.5006856", "text": "public function extract_data_for_update( $input )\n\t{\n\t\t$input = $this->force_into_array( $input );\n\t\t$primary_key = $this->get_primary_key();\n\t\t\n\t\tif (is_array( $input ))\n\t\t{\n\t\t\tforeach( $this->fields as $name => $one_field )\n\t\t\t{\n\t\t\t\tif (($name == $primary_key) && isset( $input[$name] ))\n\t\t\t\t{\n\t\t\t\t\t$this->primary_key_clause = \"$name = '${input[$name]}'\";\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!array_key_exists( $name, $input ))\n\t\t\t\t{\n\t\t\t\t\t$input[$name] = $one_field->get_default_value();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tswitch( $one_field->get_type() )\n\t\t\t\t{\n\t\t\t\t\tcase ModelSchemaField::_ARRAY:\n\t\t\t\t\t\t$class_name = ucfirst( $name );\n\t\t\t\t\t\t$new_array = array();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (class_exists( $class_name, TRUE ))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach( $input[$name] as $key => $row )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$sub_object = new $class_name();\n\t\t\t\t\t\t\t\t$sub_object->extract_data_for_update( $row );\n\t\t\t\t\t\t\t\t$new_array[$key] = $sub_object->get_data();\n\n\t\t\t\t\t\t\t\tunset( $sub_object );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->$name = ModelSchemaField::prepare_array( $new_array );\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase ModelSchemaField::_OBJECT:\n\t\t\t\t\t\t$class_name = ucfirst( $name );\n\n\t\t\t\t\t\tif (class_exists( $class_name, TRUE ))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sub_object = new $class_name();\n\t\t\t\t\t\t\t$sub_object->extract_data_for_update( $input[$name] );\n\t\t\t\t\t\t\t$this->$name = $sub_object->get_data();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tunset( $sub_object );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase ModelSchemaField::_LIST:\n\t\t\t\t\t\t$this->$name = $one_field->prepare_list( $input[$name], ModelSchemaField::TEXT );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase ModelSchemaField::_NUMBER_LIST:\n\t\t\t\t\t\t$this->$name = $one_field->prepare_list( $input[$name], ModelSchemaField::NUMBER );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase ModelSchemaField::NUMBER:\n\t\t\t\t\t\t$this->$name = $one_field->prepare_number( $input[$name] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase ModelSchemaField::BOOLEAN:\n\t\t\t\t\t\t$this->$name = $one_field->prepare_boolean( $input[$name] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase ModelSchemaField::PASSWORD:\n\t\t\t\t\t\t$this->$name = $one_field->prepare_password( $input[$name] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase ModelSchemaField::TIMESTAMP:\n\t\t\t\t\t\t$this->$name = $one_field->prepare_timestamp( $input[$name] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$this->$name = $one_field->prepare_string( $input[$name] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f606fcfa1d75789589dcc1a6702c4eeb", "score": "0.49871334", "text": "public function update(string $query, array $args = [], array $options = []): Result;", "title": "" }, { "docid": "fb37bbb926cf51a36a00be38b3c6cbdf", "score": "0.49851623", "text": "protected function validate(){\n $this->validateRequiredFields();\n $this->validateNumericFields();\n $this->validateNameFields();\n $this->validateFieldLengths();\n $this->validateStrictPosInts();\n $this->validateFieldBoundaries();\n }", "title": "" }, { "docid": "42e15e49fb63e22be5c283af70619504", "score": "0.4985159", "text": "public function crud_update($table_name,$data,$field_name,$id)\n{\nif (count($data) > 0 && !empty($table_name) && !empty($field_name) && !empty($id))\n{\n$this->db->where($field_name, $id);\n$this->db->update($table_name, $data);\nreturn true;\n} else {\nthrow new Exception(\"THE TABLE NAME OR VALUE OR FILD NAME OR ID MISSING\");\n}\n}", "title": "" }, { "docid": "495bacf140239bf07fcb218fd69137c5", "score": "0.4982057", "text": "public static function update($input){\n // update parameter\n /*\n \"action\":\"update\",\n \"db\":\"mysql\",\n \"table\":\"posts\",\n \"data\" :{\n \"title\" : \"sample title4\",\n \"body\" : \"sample body5\",\n \"views\" : \"1\"\n },\n \"where\" :{\n \"id\" : \"5\"\n }\n */\n DB::enableQueryLog();\n\n $data = $input['data'];\n $connect = DB::connection($input[\"db\"])->table($input[\"table\"]);\n \n\n // where parameter\n /* \n \"where\": {\n \"field\" : \"value\"\n }\n */\n if(!empty($input[\"where\"])) {\n $connect->where($input[\"where\"]);\n }\n\n // where in parameter (able more than one where in paramaeters)\n /*\n \"wherein\": [ \n [\"field\", [\"value\",\"value\"]],\n [\"other field\",[\"value\",\"value\",\"value\"]] \n ]\n */\n if(!empty($input[\"wherein\"][0])) {\n $arrWhere = $input[\"wherein\"];\n if(is_array($arrWhere[0])){\n foreach($arrWhere as $in){ \n $connect->whereIn(strtoupper($in[0]), $in[1]);\n }\n }else{ \n $connect->whereIn(strtoupper($arrWhere[0]), $arrWhere[1]);\n }\n }\n\n // where not in parameter (able more than one where not in paramaeters)\n /*\n \"wherenotin\": [ \n [\"field\", [\"value\",\"value\"]],\n [\"other field\",[\"value\",\"value\",\"value\"]] \n ]\n */\n if(!empty($input[\"wherenotin\"][0])) {\n $arrWhere = $input[\"wherenotin\"];\n if(is_array($arrWhere[0])){\n foreach($arrWhere as $in){ \n $connect->whereNotIn(strtoupper($in[0]), $in[1]);\n }\n }else{ \n $connect->whereNotIn(strtoupper($arrWhere[0]), $arrWhere[1]);\n }\n }\n \n // dd('sini');\n $connect->update($data);\n $data = $connect->get();\n\n //to show query generate\n // dd(DB::getQueryLog());\n \n return [\"msg\"=>\"Success\", \"result\"=>$data];\n }", "title": "" }, { "docid": "c5f2f7864cd5748911a047d80c317627", "score": "0.49750572", "text": "public function is_update_field( $key ){\n\t\treturn in_array( $key, $this->get_update_fields() );\t\n\t}", "title": "" }, { "docid": "172e7a1a0564b22e212d192977e35a05", "score": "0.49725524", "text": "protected function _adjust_query ($query)\n {\n parent::_adjust_query ($query);\n \n $branch_info = $this->_entry->main_branch_info ();\n $branch = $branch_info->branch ();\n $release = $branch_info->release ();\n\n $query->restrict_by_op('entry.main_branch_id', $branch->id);\n \n if (isset ($release))\n {\n $query->restrict_by_op('entry.release_id', $release->id);\n }\n }", "title": "" }, { "docid": "d5761328ab6f9687df4069b9e7ca2364", "score": "0.4964467", "text": "public function __validate();", "title": "" }, { "docid": "675035501e4e261ac8d01e7922cff3e7", "score": "0.49544913", "text": "protected function ValidateInputs(){\n // Tolerate \"limit\" param not given\n if ((isset($this->input_format['limit'])) and (!array_key_exists('limit', $this->input_data)) ) $this->input_data['limit'] = 100;\n // Add default input format keys for paged mode\n if ($this->paged) {\n if (!isset($this->input_format['page_offset'])) $this->input_format['page_offset']= \"optional:number\";\n if (!isset($this->input_format['page_count']) ) $this->input_format['page_count'] = \"optional:number\";\n }\n // Validate each parameter\n foreach ($this->input_format as $key => $val){\n // Check if parameter is optional\n if (strpos(strtoupper($val),'OPTIONAL:')===false) {\n //Not Optional => check this one\n if (!array_key_exists($key, $this->input_data)) {\n $this->EQ(\"Paramètre manquant. On s'attend a avoir le paramètre suivant : \" . $key);\n }\n }\n }\n }", "title": "" }, { "docid": "59e1de4e7e26628695d0e420e8e2b456", "score": "0.49412996", "text": "public static function checkFieldsForUpdate(array $fields)\n\t{\n\t\treturn static::checkFields($fields, ['MODE' => 'update']);\n\t}", "title": "" }, { "docid": "82171a09e624506df438a3644805bb92", "score": "0.49394974", "text": "abstract protected function createResultUpdate(): Query;", "title": "" }, { "docid": "5d458fce1b89d8f01d3d61c82dc5490e", "score": "0.49262077", "text": "protected abstract function _validate();", "title": "" }, { "docid": "951fd6b29f0e0a3ceeb6ff3d69de2638", "score": "0.49251956", "text": "public function update() {\n global $database;\n $params = get_object_vars($this);\n $sql = \"UPDATE \" . self::$table_name . \" SET \";\n foreach ($params AS $key => $value) {\n // skip id parameter\n if ($key == \"id\" || $key == \"user_id\") {\n continue;\n } else {\n $sql .= $key . \"=\" . sql_quotes($database->escape_string_query($this->$key)) . \", \";\n }\n }\n $sql = remove_trailing_comma($sql);\n $sql .= \"WHERE id=\" . $database->escape_string_query($this->id);\n \n if ($database->query($sql)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "a770e96f0147fc4b5b662106bf5435e9", "score": "0.49189347", "text": "protected function saveUpdate()\n {\n $data = $this->getAttributesChanged();\n if (empty($data)) {\n return false;\n }\n\n $values = array();\n foreach ($data as $k => $v) {\n $values [] = str_ireplace(\"'NOW()'\", \"NOW()\", \"`\" . $k . \"` = '\" . addslashes($v) . \"'\"); // 这边对数字和字符串,会不会有影响\n }\n $sqlStr = \"UPDATE `{$this->getTableName()}` SET \" . implode(\",\", $values);\n\n $updateConditionArr = $this->getUpdateRecordCondition();\n if (count($updateConditionArr['updateCondition']) < 1 && empty($updateConditionArr['updateConditionStr'])) {\n throw new Exception('update Table <' . $this->getTableName() . '> need update condition');\n }\n\n $conditionStr = \"\";\n if (count($updateConditionArr['updateCondition']) > 0) {\n $conditionArr = [];\n foreach ($updateConditionArr['updateCondition'] as $UpItem) {\n if (in_array($UpItem, array_keys($data))) {\n throw new \\Exception(__CLASS__ . \" can not change <\" . $UpItem . \">\", CodeException::MySQLUpdateError);\n }\n $conditionArr[] = \"`\" . $UpItem . \"` = '\" . $this->$UpItem . \"'\";\n }\n $conditionStr = implode(\" AND \", $conditionArr);\n }\n\n if (!empty($updateConditionArr['updateConditionStr'])) {\n if (empty($conditionStr)) {\n $conditionStr = $updateConditionArr['updateConditionStr'];\n } else {\n $conditionStr = $conditionStr . \" AND \" . $updateConditionArr['updateConditionStr'];\n }\n }\n $sqlStr = $sqlStr . \" WHERE \" . $conditionStr;\n\n Log::info($sqlStr);\n $db = MySQLLocal::fetch('write');\n $db->query($sqlStr);\n $res = $db->recv();\n if (!$res) {\n throw new \\Exception($db->error, CodeException::MySQLUpdateError);\n }\n $affectedRows = $db->affected_rows;\n MySQLLocal::recycle($db);\n return $affectedRows;\n }", "title": "" }, { "docid": "697056fef1ce13d664d9ae1f88973fe9", "score": "0.4909249", "text": "public function Update( $query = null )\n\t{\n\t\t$d = $this->data;\n\t\tif (count( $this->dirty ) == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (!$query) {\n\t\t\t$ai = $this->def->autoindex;\n\t\t\tif ($ai && isset( $d[ $ai ] )) {\n\t\t\t\t$query = $d[ $ai ];\n\t\t\t} else {\n\t\t\t\t$query = [];\n\t\t\t\tforeach ($this->data as $k => $v) {\n\t\t\t\t\tif (empty( $this->dirty[ $k ] )) {\n\t\t\t\t\t\t$query[ $k ] = $v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$query = is_object( $query ) ? (array) $query : $query;\n\t\t\tif (!is_array( $query )) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t$cq = $this->CompileQuery( $query, $args, \"u\" );\n\t\t$sql = \"UPDATE \" . $cq['table'] . \" SET \";\n\n\t\t$stitch = \"\";\n\t\tforeach ($d as $col => $v) {\n\t\t\tif (empty( $this->dirty[ $col ] )) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$qcol = $this->db->QuoteName( $col );\n\t\t\t$args[ $col ] = $v;\n\t\t\t$sql .= \"$stitch$qcol=:$col\";\n\t\t\t$stitch = \",\";\n\t\t}\n\n\t\t$sql .= $cq['where'] . \" \" . $cq['paging'];\n\t\t$got = $this->db->exec( $sql, $args );\n\t\tif ($got !== false) {\n\t\t\t$this->dirty = [];\n\t\t}\n\t\treturn $got;\n\t}", "title": "" }, { "docid": "ab165ca84ee8da9d5351a929c2c082ea", "score": "0.49049717", "text": "public function validate($entry);", "title": "" }, { "docid": "27be4e9f333ff979cf9a67244b921ce0", "score": "0.49041447", "text": "private function mysqlQueryUpdate($query,$debug=false){\r\n $outcome = $this->mysqlQuery($query,'Update');\r\n if($debug){\r\n echo '<b>Query:</b>',$query,'<br /><b>Error:</b>',$this->lastError,'<br />';\r\n }\r\n return $outcome;\r\n }", "title": "" }, { "docid": "570496fc5d6b2a61cc190db568791419", "score": "0.49038684", "text": "protected function validate_query_vars( $query_vars ) {}", "title": "" }, { "docid": "90e554a331d2d3df4ce71dd5d069227f", "score": "0.49027222", "text": "function queryUpdate($query)\n\t{\n\n global $is_admin;\n\t\t// REMOVED ADMIN TRACKING\n\t\tif ($is_admin) {\n// $this->log($query);\n }\n\t\t$retval = 0;\n\t\t// check connection first\n\t if ($this->_connection){\n\t \t// free the previous result (if any) first\n\t \tif ($this->_qresult) @mysql_free_result($this->_qresult);\n\t \t//\n\t \t// run new query\n\t\t\t$this->_qresult = mysql_query($query, $this->_connection);\n\t\t\t$this->errorno = mysql_errno();\n\t\t\tif ($this->_qresult && $this->errorno==0){\n\t\t\t $retval = mysql_affected_rows();\n\t\t\t} else {\n\t\t\t\t$this->errormsg = mysql_error();\n\t\t\t\t$retval = -1;\n\t\t\t}\n\t }\n\t return $retval;\n\t}", "title": "" }, { "docid": "7b15c1e6a5210a1f38687662027d404d", "score": "0.49014184", "text": "protected function _validate_data() {\n\t\t$required = array(\n\t\t\t'id',\n\t\t\t'title',\n\t\t\t'output'\n\t\t);\n\n\t\tforeach ( $this->_data as $i => $column ) :\n\t\t\t$is_valid = true;\n\n\t\t\tif ( ! $column['id'] ) :\n\t\t\t\ttrigger_error( 'A column must have an ID', E_USER_WARNING );\n\t\t\t\t$is_valid = false;\n\t\t\telse :\n\t\t\t\tforeach ( $required as $key ) :\n\t\t\t\t\tif ( ! $column[$key] ) :\n\t\t\t\t\t\ttrigger_error( sprintf( 'Column \"%s\" is missing key \"%s\"', $column['id'], $key ), E_USER_WARNING );\n\t\t\t\t\t\t$is_valid = false;\n\t\t\t\t\telseif ( 'output' == $key && ! is_callable( $column[$key] ) ) :\n\t\t\t\t\t\ttrigger_error( sprintf( '\"output\" in column \"%s\" must be a callable function', $column['id'] ), E_USER_WARNING );\n\t\t\t\t\t\t$is_valid = false;\n\t\t\t\t\tendif;\n\t\t\t\tendforeach;\n\t\t\tendif;\n\n\t\t\t$this->_data[$i]['is_valid'] = $is_valid;\n\t\tendforeach;\n\t}", "title": "" }, { "docid": "4dc6d2f8ecf007d6ca6dd6890cdb9263", "score": "0.48997596", "text": "public function updateOptionWhere()\n {\n if (func_num_args() > 0) {\n $data = func_get_arg(0);\n $where = func_get_arg(1);\n try {\n $result = DB::table($this->table)\n ->whereRaw($where['rawQuery'], isset($where['bindParams']) ? $where['bindParams'] : array())\n ->update($data);\n return $result;\n } catch (\\Exception $e) {\n return $e->getMessage();\n }\n } else {\n throw new Exception('Argument Not Passed');\n }\n }", "title": "" }, { "docid": "1f8fa21214aa8dac6a57bf41e54dd667", "score": "0.48934576", "text": "public function validate( $input ) {\n\n if ( !empty( $input ) && is_array( $input ) ) {\n\n $_has_updates = false;\n foreach( $input as $_field => $_value ) {\n if ( update_option( \"sm_{$_field}\", $_value ) ) {\n $_has_updates = true;\n }\n }\n\n if ( $_has_updates ) {\n /* Reset all plugin's transients. */\n ud_get_stateless_media()->flush_transients();\n }\n\n }\n\n return $input;\n }", "title": "" }, { "docid": "8292e39b06ad4c3d753f532475170a50", "score": "0.48889115", "text": "public function validateUpdate($data)\n {\n $rules = $this->validationRules;\n $rules['email'] .= ',email,' . $this->id;\n $rules['password'] = '';\n\n return parent::validate($data, $rules);\n }", "title": "" }, { "docid": "7e2b84c2bed0393ec4b3e3740d10eccd", "score": "0.48795134", "text": "public function update()\n {\n $type = get_object_vars($this->model);\n\n foreach ($type as $key => $value) {\n if (in_array($key, $this->_validColumns)) {\n $data[$key] = $value;\n }\n }\n\n $this->db->update(\n self::TABLE_NAME,\n $data,\n array('id = ?' => $this->model->getId())\n );\n }", "title": "" }, { "docid": "caf15b13c13f57fd80f846c3970d93ea", "score": "0.48702005", "text": "protected function checkQuery($query)\n {\n if (!is_string($query)) {\n throw new \\InvalidArgumentException('Invalid Query');\n }\n return true;\n }", "title": "" }, { "docid": "250fb373165aa33ac4e6ed33116a65d9", "score": "0.48688227", "text": "protected function update() \n {\n return is_int(\n $this->getConnection()->query(\n 'UPDATE %n',\n $this->tableName(),\n ' SET %a ',\n $this->getArrayCopy(),\n ' WHERE %n = %i',\n $this->primaryKeyName(),\n $this->{$this->primaryKeyName()}\n )\n );\n }", "title": "" }, { "docid": "dfe5669a7464f88b2eb318b46e0258f9", "score": "0.48644042", "text": "public function update(Event $event, array $input)\n {\n \tif ($event->update($input))\n return true;\n\n throw new GeneralException(trans('exceptions.backend.events.update_error'));\n }", "title": "" }, { "docid": "4ede3e6a31d28a08fc6352f135050554", "score": "0.4864379", "text": "protected function _prepareUpdate()\n {\n $ast = $this->_ast;\n if (isset($ast['update']) === false ||\n isset($ast['update']['tables']) === false ||\n isset($ast['update']['values']) === false) {\n throw new Exception('Corrupted UPDATE AST');\n }\n\n $update = $ast['update'];\n\n //We use these arrays to store info related to models, alias and its sources. With\n //them we can rename columns later\n $models = array();\n $modelsInstances = array();\n $sqlTables = array();\n $sqlModels = array();\n $sqlAliases = array();\n $sqlAliasesModelsInstances = array();\n\n if (isset($update['tables'][0]) === false) {\n $updateTables = array($update['tables']);\n } else {\n $updateTables = $update['tables'];\n }\n\n foreach ($updateTables as $table) {\n $modelName = $table['qualifiedName']['name'];\n\n //Check if the table has a namespace alias\n if (isset($table['qualifiedName']['ns-alias']) === true) {\n $realModelName = $this->_manager->getNamespaceAlias($table['qualifiedName']['ns-alias']).'\\\\'.$modelName;\n } else {\n $realModelName = $modelName;\n }\n\n //Load a model instance from the models manager\n $model = $this->_manager->load($realModelName);\n $source = $model->getSource();\n $schema = $model->getSchema();\n\n //Create a full source representation including schema\n if ($schema == true) {\n $completeSource = array($source, $schema);\n } else {\n $completeSource = array($source, null);\n }\n\n //Check if table is aliased\n if (isset($table['alias']) === true) {\n $alias = $table['alias'];\n $sqlAliases[$alias] = $alias;\n $completeSource[] = $alias;\n $sqlTables[] = $completeSource;\n $sqlAliasesModelsInstances[$alias] = $model;\n $models[$alias] = $modelName;\n } else {\n $sqlAliases[$modelName] = $source;\n $sqlAliasesModelsInstances[$modelName] = $model;\n $sqlTables[] = $source;\n $models[$modelName] = $source;\n }\n\n $sqlModels[] = $modelName;\n $modelsInstances[$modelName] = $model;\n }\n\n //Update the models/aliases/sources in the object\n $this->_models = $models;\n $this->_modelsInstances = $modelsInstances;\n $this->_sqlAliases = $sqlAliases;\n $this->_sqlAliasesModelsInstances = $sqlAliasesModelsInstances;\n\n $sqlFields = array();\n $sqlValues = array();\n $updateValues = (isset($update['values'][0]) === false ? array($update['values']) : $update['values']);\n\n foreach ($updateValues as $updateValue) {\n $sqlFields[] = $this->_getExpression($updateValue['column'], false);\n $value = array('type' => $updateValue['type'], 'value' => $this->_getExpression($updateValue['expr'], false));\n }\n\n $sqlUpdate = array('tables' => $sqlTables, 'models' => $sqlModels, 'fields' => $sqlFields, 'values' => $sqlValues);\n\n if (isset($ast['where']) === true) {\n $sqlUpdate['where'] = $this->_getExpression($ast['where'], false);\n }\n\n if (isset($ast['limit']) === true) {\n $sqlUpdate['limit'] = $ast['limit'];\n }\n\n return $sqlUpdate;\n }", "title": "" }, { "docid": "b30bfd34cbf4369bcf58025341948f68", "score": "0.4863595", "text": "public function validateData($data, $rules = null, $justUpdateSomeFields = false)\n {\n if (!$rules) {\n $rules = $this->rules;\n }\n\n $result = Validator::make($data, $rules);\n if ($result->fails()) {\n $this->errors = $result->messages()->toArray();\n if ($justUpdateSomeFields == true) {\n $messages = [];\n foreach ($data as $key => $row) {\n if (array_key_exists($key, $this->errors)) {\n $messages[$key] = $this->errors[$key];\n }\n }\n $this->errors = $messages;\n if (sizeof($this->errors) > 0) {\n return false;\n }\n\n return true;\n }\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "925f8b0c736eb25b43c2898f55a7d9a0", "score": "0.48460755", "text": "function update($updatekv, $condkv) {\n\t\t$updatefields = array_keys($updatekv);\n\t\t$condfields = array_keys($condkv);\n\t\t$values = [];\n\t\t$fieldtypes = [];\n\t\t$seter = [];\n\t\t$cond = [];\n\n\t\tforeach ($updatefields as $updatefield) {\n\t\t\t$seter[] = \"$updatefield = ?\";\n\t\t\t$fieldtypes[] = $this->fields[$updatefield] ?? 's';\n\t\t\t$values[] = $updatekv[$updatefield];\n\t\t}\n\n\t\tforeach ($condfields as $condfield) {\n\t\t\t$cond[] = \"$condfield = ?\";\n\t\t\t$fieldtypes[] = $this->fields[$condfield] ?? 's';\n\t\t\t$values[] = $condkv[$condfield];\n\t\t}\n\n\t\t$seter = implode(', ', $seter);\n\t\t$cond = implode(' AND ', $cond);\n\t\t$fieldtypes = implode('', $fieldtypes);\n\n\t\t$stmt = $this->connection->prepare(\"UPDATE $this->tablename SET $seter WHERE $cond\");\n\n\t\tif(!$stmt){\n\t\t\tprintf(\"Query Prep Failed: %s\\n\", $this->connection->error);\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$stmt->bind_param($fieldtypes, ...$values);\n\t\t$stmt->execute();\n\t\t$stmt->close();\n\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "871290a81d958defa448a5da2b44df7f", "score": "0.48433995", "text": "private function updateValidator(array $data)\n {\n return Validator::make($data, [\n 'employee_id' => 'required',\n 'availability' => 'required'\n ]);\n }", "title": "" }, { "docid": "0e312438cda0fc07c2f5f778fce2a97d", "score": "0.48365223", "text": "public function __construct($tableName, $filter, $update, array $options = [])\n {\n if (!is_array($update)&&!is_object($update)) {\n throw InvalidArgumentException::invalidType('$update', $update, 'array or object');\n }\n\n if (!Functions::isFirstKeyOperator($update)) {\n throw new InvalidArgumentException('First key in $update argument is not an update operator');\n }\n\n $this->update=new Update($tableName, $filter, $update, ['multi'=>false]+$options);\n }", "title": "" }, { "docid": "733b531bff2429d280f86380091c334a", "score": "0.48287466", "text": "public function getValidationRuleForUpdateMember(): array\n {\n return [\n 'email_address' => 'required|email',\n 'status' => 'required|string'\n ];\n }", "title": "" }, { "docid": "e3f5a55c976f30d2bb8281be24fbcacb", "score": "0.48240864", "text": "function db_update($table, $input, $where){\n\t$query = '';\n\t$total = count($input);\n\t$i = 1;\n\tforeach ($input as $key => $val){\n\t\t$query .= $key . ' = ?';\n\t\tif ($val != NULL){\n\t\t\t$data[] = $val;\n\t\t}else{\n\t\t\t$data[] = NULL;\n\t\t}\n\t\tif ($total != $i){\n\t\t\t$query .= \", \";\n\t\t}\n\t\t$i++;\n\t}\t\n\t$wd = $GLOBALS['app']->db_where_placeholders($where);\n\tforeach ($wd['data'] as $dw){\n\t\t$data[] = $dw;\n\t}\n\ttry {\n\t\t$a = $GLOBALS['database']->prepare(\"UPDATE $table SET $query WHERE \" . $wd['where']);\n\t\t$a->execute($data);\n\t}\n\tcatch(PDOException $e) {\n\t echo $e->getMessage();\n\t}\n\treturn true;\n}", "title": "" } ]
2346d76a6afbfad90b2437e6d4095fe1
Gets the URL of a layout theme asset. $Arr_Parameters:Assets parameters as an array($Str_AssetFile, $Str_Theme='', $Str_ExternalUrl) Return:Theme asset file location as a URL
[ { "docid": "6537b72bf2892de8ffb5bb3fec8e8f54", "score": "0.82352227", "text": "public function get_asset_url($Arr_Parameters)\n\t{\n\t\t$Str_Location = '';\n\t\tglobal $CMD;\n\n\t\t//If there is a documet paramter then get the parcel named.\n\t\tif (isset($Arr_Parameters[0]) && $Arr_Parameters[0])\n\t\t{\n\t\t\t//If there is an external url get the location\n\t\t\t//*!* I need to think about setting up CDN plugin and look for some values in that for external locations.\n\t\t\t//if (isset($Arr_Parameters[2]) && $Arr_Parameters[2])\n\n\t\t\t//Get the theme for the asset\n\t\t\t//*!*Will probably come back here at a later point in time to add the default value if theme cannot be found.\n\t\t\t$Str_Theme = (isset($Arr_Parameters[1]) && $Arr_Parameters[1])? $Arr_Parameters[1]: $CMD->config('theme');\n\t\t\t$Str_Location = MW_CONST_STR_URL_DOMAIN.'/themes/'.$Str_Theme.'/'.$Arr_Parameters[0];\n\t\t}\n\n\t\treturn $Str_Location;\n\t}", "title": "" } ]
[ { "docid": "852e26960ee37bc5b9096ca4152f3936", "score": "0.6814876", "text": "public function asset($Str_Asset, $Str_Theme=false)\n\t{\n\t\t$Arr_Paramaters = array($Str_Asset);\n\n\t\tif ($Str_Theme)\n\t\t{\n\t\t\t$Arr_Paramaters[] = $Str_Theme;\n\t\t}\n\n\t\treturn $this->get_asset_url($Arr_Paramaters);\n\t}", "title": "" }, { "docid": "cab27edd813aba8f19506ada10c69054", "score": "0.6195408", "text": "function theme_asset_public($theme_name, $path_file = null) {\n $backend_folder = '';\n if (Str::startsWith($theme_name, 'frontend::')) {\n $backend_folder = \"frontend/\";\n $theme_name = str_replace(\"frontend::\", \"\", $theme_name);\n }\n\n return url(Str::finish(\"themes/{$backend_folder}\" . ltrim($theme_name, '/'), '/') . ltrim($path_file, '/'));\n}", "title": "" }, { "docid": "cea0723a946badcac4158f17db88816a", "score": "0.61089164", "text": "public function getThemeAssetsUri()\n {\n return $this->paths['theme_assets_uri'];\n }", "title": "" }, { "docid": "23073fb58c1b5b10ea7fe0c3b50c8365", "score": "0.60504425", "text": "function caldera_theme_assets_uri( $local = false ){\n\n if( $local ){\n $uri = get_template_directory_uri() . '/assets';\n }else{\n if ( defined( 'LOCAL_DEV' ) && LOCAL_DEV ) {\n $uri = 's3.amazonaws.com/caldera-theme';\n\n } else {\n $uri = 'd1dy2qw4671tuy.cloudfront.net';\n }\n $uri = caldera_theme_add_protocol( $uri );\n }\n\n\n return apply_filters( 'caldera_theme_assets_uri', $uri );\n}", "title": "" }, { "docid": "276443b9208ccfe8cf07ddc20414d5d3", "score": "0.59485406", "text": "public static function themeUrl()\n\t{\n\t\tif (! isset(static::$_themeUrl))\n\t\t{\n\t\t\t$themeFolderUrl = defined('URL_THIRD_THEMES') ? URL_THIRD_THEMES : ee()->config->slash_item('theme_folder_url').'third_party/';\n\t\t\tstatic::$_themeUrl = $themeFolderUrl.'wygwam/';\n\t\t}\n\n\t\treturn static::$_themeUrl;\n\t}", "title": "" }, { "docid": "96e86248b90557acf31733bff4187036", "score": "0.58098185", "text": "function fGetThemeAsset($sAssetMainFolder = '', $sAssetSRC = '') {\n return get_template_directory_uri() . $sAssetMainFolder . trim($sAssetSRC, '/');\n}", "title": "" }, { "docid": "14aae455c3a50f9064547869d49ff4b4", "score": "0.5787065", "text": "public function add_styles($Arr_Parameters)\n\t{\n\t\tglobal $CMD;\n\n\t\t//If the asset exists within the theme hierarchy add it.\n\t\t$Str_Theme = (isset($Arr_Parameters[2]))? $Arr_Parameters[2]: '';\n\t\tif ($Str_Theme = $this->has_asset($Arr_Parameters[1].'.css', $Str_Theme))\n\t\t{\n\t\t\t$Arr_Styles = $CMD->get_interface_data('styles');\n\t\t\t$Arr_Styles = $this->add_asset($Arr_Styles, $Str_Theme.'/'.$Arr_Parameters[1], $Arr_Parameters[0]);\n\t\t\t$CMD->set_interface_data('styles', $Arr_Styles);\n\t\t}\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "fd32709c464a26194df45398f238ab9b", "score": "0.568206", "text": "public function add_scripts($Arr_Parameters)\n\t{\n\t\tglobal $CMD;\n\n\t\t//If the asset exists within the theme hierarchy add it.\n\t\t$Str_Theme = (isset($Arr_Parameters[2]))? $Arr_Parameters[2]: '';\n\t\tif ($Str_Theme = $this->has_asset($Arr_Parameters[1].'.js', $Str_Theme))\n\t\t{\n\t\t\t$Arr_Scripts = $CMD->get_interface_data('scripts');\n\t\t\t$Arr_Scripts = $this->add_asset($Arr_Scripts, $Str_Theme.'/'.$Arr_Parameters[1], $Arr_Parameters[0]);\n\t\t\t$CMD->set_interface_data('scripts', $Arr_Scripts);\n\t\t}\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "adc174dc696e85c34c4ddb64763aa2ad", "score": "0.5612329", "text": "private function assets_url() {\n if(!file_exists(TL_CONTAO_ASSETS_MANIFEST))\n return 'http://' . TL_CONTAO_ASSETS_RAILS_HOST . ':' . TL_CONTAO_ASSETS_RAILS_PORT . $this->assets_path();\n else\n return $this->assets_path();\n }", "title": "" }, { "docid": "6d89ad3e45aa6d6c1a7a94504c9e199b", "score": "0.5599608", "text": "public function has_asset($Str_Asset, $Str_Theme='')\n\t{\n\t\tglobal $CMD;\n\n\t\tif ($Str_Theme)\n\t\t{\n\t\t\tif (!file_exists(MW_CONST_STR_DIR_DOMAIN.'themes/'.$Str_Theme.'/'.$Str_Asset))\n\t\t\t{\n\t\t\t\tif (file_exists(MW_CONST_STR_DIR_DOMAIN.'themes/'.$CMD->get_interface_data('theme').'/'.$Str_Asset))\n\t\t\t\t{\n\t\t\t\t\t$Str_Theme = $CMD->get_interface_data('theme');\n\t\t\t\t}\n\t\t\t\telseif (file_exists(MW_CONST_STR_DIR_DOMAIN.'themes/'.$CMD->config('theme').'/'.$Str_Asset))\n\t\t\t\t{\n\t\t\t\t\t$Str_Theme = $CMD->config('theme');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif (file_exists(MW_CONST_STR_DIR_DOMAIN.'themes/default/'.$Str_Asset))\n\t\t{\n\t\t\t$Str_Theme = 'default';\n\t\t}\n\n\t\tif (!$Str_Theme)\n\t\t{\n\t\t\t$CMD->handle_exception('Page asset '.$Str_Asset. ' does not exist', 'MW:101');\n\t\t\t$Str_Theme = false;\n\t\t}\n\n\t\treturn $Str_Theme;\n\t}", "title": "" }, { "docid": "165fd6894bdd97b15fbed7f592ebf79c", "score": "0.5583685", "text": "function u_get_assets_uri( string $filename = '' ) {\n\n\t$assets_path = get_theme_file_uri() . '/assets/' . $filename;\n\n\treturn $assets_path;\n\n}", "title": "" }, { "docid": "55bb8d87aa065e184d68c5e7e2b78aec", "score": "0.5534059", "text": "function assets($relativeUri)\n {\n if (Str::startsWith($relativeUri, 'styles') || Str::startsWith($relativeUri, 'scripts')) {\n return Url::shopUrl(\"resources/assets/dist/$relativeUri\") . \"?v=\" . config('app.version');\n } elseif (Str::startsWith($relativeUri, 'lang')) {\n return Url::shopUrl(\"resources/$relativeUri\");\n } else {\n return Url::shopUrl(\"resources/assets/$relativeUri\");\n }\n }", "title": "" }, { "docid": "ed0d2cd0ebdfee70923d961c971645f4", "score": "0.5529001", "text": "protected function getAssetsUri($rel)\n\t{\n\t\treturn sprintf(\n\t\t\t'%s%s%s',\n\t\t\ttrailingslashit(get_stylesheet_directory_uri()),\n\t\t\t'assets/',\n\t\t\t$rel\n\t\t);\n\t}", "title": "" }, { "docid": "7e27060adfececff0aaf20b7c266e51f", "score": "0.550146", "text": "function fThemeAsset($sAssetMainFolder = '', $sAssetSRC = '') {\n echo fGetThemeAsset($sAssetMainFolder, $sAssetSRC);\n}", "title": "" }, { "docid": "106cc1a7b53dec46071d1b9706b9dde7", "score": "0.54774654", "text": "public function getSkinUrl($file = null, array $params = array())\n {\n Varien_Profiler::start(__METHOD__);\n if (empty($params['_type'])) {\n $params['_type'] = 'skin';\n }\n if (empty($params['_default'])) {\n $params['_default'] = false;\n }\n $this->updateParamDefaults($params);\n if (!empty($file)) {\n $result = $this->_fallback($file, $params, array(\n array(),\n array('_theme' => $this->getFallbackTheme()),\n array('_theme' => self::DEFAULT_THEME),\n array('_theme' => self::DEFAULT_THEME, '_package' => 'kl'),\n array('_theme' => self::DEFAULT_THEME, '_package' => 'enterprise'),\n array('_theme' => self::DEFAULT_THEME, '_package' => 'default'),\n ));\n }\n $result = $this->getSkinBaseUrl($params) . (empty($file) ? '' : $file);\n Varien_Profiler::stop(__METHOD__);\n \n return $result;\n }", "title": "" }, { "docid": "c210c6b5206297112d99709766a1f4b5", "score": "0.54407525", "text": "function asset($filePath){\n if(strpos($filePath,'/') === 0){\n $filePath = substr($filePath,1);\n }\n $siteUrl = env('SITE_URL','/');\n if(string_tail($siteUrl) !== '/'){\n $siteUrl .= '/';\n }\n\n // Check if the theme folder is exist\n $themePath = null;\n if(file_exists(env('ROOT_PATH').DIRECTORY_SEPARATOR.'public_html'.DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.$themePath)){\n $themePath = env('THEME_NAME','theme_default').DIRECTORY_SEPARATOR;\n }\n return $siteUrl.'assets'.DIRECTORY_SEPARATOR.$themePath.$filePath;\n }", "title": "" }, { "docid": "17eab13907f7ca6fe170c411a4482443", "score": "0.5431877", "text": "private function getAssetsURL()\n\t{\n\t\t$assetsPath=Yii::getPathOfAlias('image.assets');\n\n\t\t// Republish the assets if debug mode is enabled.\n\t\tif(YII_DEBUG)\n\t\t\treturn Yii::app()->assetManager->publish($assetsPath,false,-1,true);\n\t\telse\n\t\t\treturn Yii::app()->assetManager->publish($assetsPath);\n\t}", "title": "" }, { "docid": "11ea08e34495d4fc965506663b467d48", "score": "0.54266214", "text": "public function layout($Str_Name, $Str_Theme='')\n\t{\n\t\t$Str_Layout = '';\n\t\tglobal $CMD;\n\n\t\tif (($Str_Theme = $this->has_asset('layouts/'.$Str_Name.'.html', $Str_Theme)) !== false)\n\t\t{\n\t\t\t$Str_Layout = $CMD->helper('file')->get_file_as_string(MW_CONST_STR_DIR_DOMAIN.'themes/'.$Str_Theme.'/layouts/'.$Str_Name.'.html');\n\t\t}\n\n\t\treturn $Str_Layout;\n\t}", "title": "" }, { "docid": "bd07d7072b17710b57f0448cb7fe53aa", "score": "0.54065436", "text": "function _getURLTheme($theme) \r\n {\r\n \treturn MIGUELBASE_THEME_URLDIR.$theme.'/';\r\n }", "title": "" }, { "docid": "91576dd706980f56c3bda84936e20633", "score": "0.5389649", "text": "public function getUri($asset);", "title": "" }, { "docid": "685cc3e892aa0f16904e4caa749495d6", "score": "0.53752434", "text": "public function asset($url = '')\n {\n return \"/{$this->relativeUrl}/{$this->theme}/{$url}\";\n }", "title": "" }, { "docid": "d6f90c7547a1b9a808f82e43cffd79a1", "score": "0.5360496", "text": "public function getUrl(){\n return BASE_URL . '?asset=' . $this->id;\n }", "title": "" }, { "docid": "bc3a8054bbe845858d8df2e1f8f19915", "score": "0.53156275", "text": "abstract protected function getApiAssetsUrlTemplate();", "title": "" }, { "docid": "d330515c79b38b65e4f6281791c1e5ea", "score": "0.53117526", "text": "public function get_styles_string($Arr_Parameters)\n\t{\n\t\t$Str_Styles = '';\n\n\t\tglobal $CMD;\n\t\t$Arr_Styles = $CMD->get_interface_data('styles');\n\n\t\tif (isset($Arr_Styles[$Arr_Parameters[0]]))\n\t\t{\n\t\t\tforeach ($Arr_Styles[$Arr_Parameters[0]] as $Str_Style)\n\t\t\t{\n\t\t\t\t$Str_Styles .= '<link rel=\"stylesheet\" href=\"'.$CMD->config('root_url').'/themes/'.$Str_Style.'.css\" type=\"text/css\" media=\"screen, projection, print\" />\n';\n\t\t\t}\n\t\t}\n\n\t\treturn $Str_Styles;\n\n\t}", "title": "" }, { "docid": "4c2fccd31ac6028d75add6df4bbe481f", "score": "0.5310899", "text": "function asset_url()\n {\n $obj =& get_instance();\n $base_url = $obj->config->item('base_url');\n $asset_root = 'assets/';\n $asset_location = $base_url . $asset_root;\n return $asset_location;\n }", "title": "" }, { "docid": "da4808e46bed4f6ba8952365de0bf9ac", "score": "0.5296116", "text": "protected function get_assets_base_url() {\n\t\treturn \\ElementorPlugin::get_url();\n\t}", "title": "" }, { "docid": "c57e88c5652784fb773ddb316dea9d03", "score": "0.52859646", "text": "function theme_url() {\r\n\t\t$CI = & get_instance();\r\n\t\t$theme = $CI->config->item('theme');\r\n\t\tif (!$theme) {\r\n\t\t\t$theme = 'default';\r\n\t\t}\r\n\t\treturn base_url() . \"themes/\" . $theme;\r\n\t}", "title": "" }, { "docid": "9da39f0eb3a5e544046793855da9842c", "score": "0.5277342", "text": "public function getLayoutPath()\n {\n if (is_null($this->_config)) {\n throw new Gene_Application_Setting_Exception('Invalid config.');\n }\n\n if (!isset($this->_config['layouts'])) {\n return null;\n }\n\n $config = $this->_config['layouts'];\n $path = null;\n foreach ($config as $key => $val) {\n $path[$key] = $val;\n }\n\n return $path;\n }", "title": "" }, { "docid": "09adc6e9988f3291f1840ffb73aa3210", "score": "0.5276847", "text": "public function getUrl($layout = null)\n {\n $layout = $layout ? '?layout=' . $layout : '';\n\n return url($this->slug) . $layout;\n }", "title": "" }, { "docid": "8db809c2144fc1056ebe024ab239ce57", "score": "0.5267534", "text": "public static function assetsUrl()\n\t{\n\t\tif(! static::$assetsUrl) throw new Exception(\"Not initialized.\");\n\n\t\treturn static::$assetsUrl;\n\t}", "title": "" }, { "docid": "b01c885fe83fee691d24c453d499db07", "score": "0.5257119", "text": "function get_asset($asset, string $return_variant = null)\n{\n $manifest = __DIR__ . '/../dist/manifest.json';\n if (file_exists($manifest)) {\n $manifest = file_get_contents($manifest);\n $json = json_decode($manifest, true);\n\n if (isset($json[$asset])) {\n $file = $json[$asset];\n\n switch ($return_variant) {\n case 'path':\n return get_stylesheet_directory() . '/dist/' . $file;\n break;\n case 'contents':\n return file_get_contents(get_stylesheet_directory() . '/dist/' . $file, true);\n break;\n default:\n return get_stylesheet_directory_uri() . '/dist/' . $file;\n break;\n }\n } else {\n return sprintf(__('File %s not found.', 'BasePlate'), $asset);\n }\n } else {\n frontend_error(__('Did you run Webpack for the first time?', 'BasePlate'), 'Manifest file not found');\n }\n}", "title": "" }, { "docid": "101ec451b851767cbe5305bc847d3d86", "score": "0.52435595", "text": "public function get_scripts_string($Arr_Parameters)\n\t{\n\t\t$Str_Scripts = '';\n\n\t\tglobal $CMD;\n\t\t$Arr_Scripts = $CMD->get_interface_data('scripts');\n\n\t\tif (isset($Arr_Scripts[$Arr_Parameters[0]]))\n\t\t{\n\t\t\tforeach ($Arr_Scripts[$Arr_Parameters[0]] as $Str_Script)\n\t\t\t{\n\t\t\t\t$Str_Scripts .= '<script src=\"'.$CMD->config('root_url').'/themes/'.$Str_Script.'.js\" type=\"text/javascript\"></script>\n';\n\t\t\t}\n\t\t}\n\n\t\treturn $Str_Scripts;\n\t}", "title": "" }, { "docid": "afc22025b2d552bc9b8043ea6be8acb8", "score": "0.52387595", "text": "function addon_assets_url( $path, $file, $scheme = null, $is_network = false )\n {\n // Preparation\n $route = preg_replace( '/\\\\\\\\/', '/', $file );\n $url = apply_filters(\n 'asset_base_url',\n rtrim( $is_network ? network_home_url( '/', $scheme ) : home_url( '/', $scheme ), '/' )\n );\n // Clean base path\n $route = preg_replace( '/.+?(?=wp-content)/', '', $route );\n // Clean project relative path\n $route = preg_replace( '/\\/addon[\\/\\\\\\\\A-Za-z0-9\\.\\-]+/', '', $route );\n $route = preg_replace( '/\\/assets[\\/\\\\\\\\A-Za-z0-9\\.\\-]+/', '', $route );\n $route = apply_filters( 'app_route', $route );\n return $url . '/' . apply_filters( 'app_route_addon', $route ) . '/assets/' . $path;\n }", "title": "" }, { "docid": "29f8bcf01b36d818600d566f17e02855", "score": "0.5229796", "text": "public function getModuleThemeUrl($module, $theme);", "title": "" }, { "docid": "7ab83b1b0f54fc85aafd5aae38708f6e", "score": "0.52286226", "text": "public function urlThemes()\n {\n return $this->url() . '/themes/';\n }", "title": "" }, { "docid": "2405751c43e76e1727a818de9a4bf61c", "score": "0.52242", "text": "function bimber_dynamic_style_get_file_url() {\n\t$query_var = apply_filters( 'bimber_dynamic_styles_query_var', 'bimber-dynamic-style' );\n\n\t// By default it's a php script (not cached).\n\t$url = home_url( '?'. $query_var .'=1' );\n\n\tif ( bimber_dynamic_style_is_cache_enabled() ) {\n\t\t// Reload cache.\n\t\tbimber_dynamic_style_rebuild_cache();\n\t\t$cached_file_url = bimber_dynamic_style_get_cached_file_url();\n\n\t\tif ( $cached_file_url ) {\n\t\t\t$url = $cached_file_url;\n\t\t}\n\t}\n\n\treturn $url;\n}", "title": "" }, { "docid": "3d27a0d9d6b4c332b04e03cdfcdfc52b", "score": "0.52150786", "text": "public function getAssetsUrl()\n {\n if ($this->_assetsUrl !== null) {\n return $this->_assetsUrl;\n }\n return $this->_assetsUrl = Yii::app()->assetManager->publish(dirname(__FILE__) . '/assets', false, -1, MW_DEBUG);\n }", "title": "" }, { "docid": "e363ae41d5a7dd57fefc2c78bff995ad", "score": "0.5213924", "text": "function theme_url () {\n\treturn get_template_directory_uri();\n}", "title": "" }, { "docid": "88470e3e062303bfda8a9af1f99178d0", "score": "0.5208705", "text": "public function getAssetsUrl()\n {\n return Yii::app()->getAssetManager()->publish($this->getAssetsPath());\n }", "title": "" }, { "docid": "6cb6734b1fdfc4f65a481ae6da02b1a0", "score": "0.51870066", "text": "protected function getAssetsUrl() {\n\t\tif (isset($this->_assetsUrl)) {\n\t\t\treturn $this->_assetsUrl;\n\t\t}\n\t\t$assetsPath = Yii::getPathOfAlias('common.assets');\n\t\t$assetsUrl = Yii::app()->assetManager->publish($assetsPath, false, -1, YII_DEBUG);\n\t\treturn $this->_assetsUrl = $assetsUrl;\n\t}", "title": "" }, { "docid": "04bd536b2273e9f2028af22c6e03c616", "score": "0.5165566", "text": "function getURLTheme ($theme = '') \r\n {\r\n \tif(!Theme::existTheme($theme)){\r\n \t\t$ret_val = Theme::_getURLNormalTheme();\r\n \t} else {\r\n \t\t$ret_val = Theme::_getURLTheme($theme);\r\n \t}\r\n\t\t\r\n \treturn $ret_val;\r\n }", "title": "" }, { "docid": "6c4b2fa037bb80c74373785be13be90d", "score": "0.514347", "text": "public static function getThemeAsset( $extraPath = '' ){\n\t\treturn get_template_directory_uri() . $extraPath;\n\t}", "title": "" }, { "docid": "8cde615aba7ebdda19349f59b50f8ee1", "score": "0.5126457", "text": "public function getSkinUrl($file = null, array $params = array())\n\t{\n\t\t$type = Mage::getSingleton('smushit/image_type_skin');\n\n\t\treturn $type->getSmushedImageFromUrl(\n\t\t\tparent::getSkinUrl($file, $params)\n\t\t);\n\t}", "title": "" }, { "docid": "1470ea0965791c12e33194a960d7a691", "score": "0.51121944", "text": "public function getUrlAttribute()\n\t{\n\t\tif ($this->image_url != null) {\n\t\t\treturn env('AWS_CLOUDFRONT_URL') . $this->image_url;\n\t\t}\n\t\treturn env('AWS_CLOUDFRONT_URL') . 'static' . $this->layoutName . '.jpg';\n\t}", "title": "" }, { "docid": "81a20eaf37ac152506835baef8399525", "score": "0.5104413", "text": "function icon_theme_assets(string $location = 'header'): string\n{\n return icon_theme()->assets($location);\n}", "title": "" }, { "docid": "b0afc343f8112a8a32dda9c6894cc76d", "score": "0.50968516", "text": "public function baseThemeUrl($file = null){\n \n // Set front\n $front = Zend_Controller_Front::getInstance();\n \n // Set theme Options\n $themeOptions = $front->getParam('bootstrap')\n ->getPluginResource(\"theme\")\n ->getOptions();\n \n $baseUrl = BASE_URL;\n if (substr($baseUrl,-1) != \"/\") {\n $baseUrl .= \"/\";\n }\n $baseUrl .= \"themes/\" . $themeOptions[\"name\"] . \"/\";\n \n // Remove trailing slashes\n if (null !== $file) {\n $baseUrl .= ltrim($file, '/\\\\');\n }\n \n return $baseUrl;\n \n\t}", "title": "" }, { "docid": "ff05c4f589de7e396f439536fbe0fecc", "score": "0.5072789", "text": "private function _theme_url()\n\t{\n\t\tif (!isset($this->ee->session->cache['taggable']['theme_url']))\n\t\t{\n\t\t\t$theme_folder_url = $this->ee->config->item('theme_folder_url');\n\t\t\tif (substr($theme_folder_url, -1) != '/') $theme_folder_url .= '/';\n\t\t\t$this->ee->session->cache['taggable']['theme_url'] = $theme_folder_url.'third_party/taggable/';\n\t\t}\n\n\t\treturn $this->ee->session->cache['taggable']['theme_url'];\n\t}", "title": "" }, { "docid": "40cd4406e9739624cc2cb164f9d9da88", "score": "0.5065592", "text": "public function getThemeAssetsDir()\n {\n return $this->paths['theme_assets_dir'];\n }", "title": "" }, { "docid": "4ef1ef3b71ed8051d75ba4a147a7b3ae", "score": "0.5065357", "text": "function theme_url( $path = '' ) {\n\n\t// Get the active theme.\n\t$theme = active_theme();\n\n\t// Does the theme exist?\n\tif ( ! $theme ) {\n\n\t\treturn false;\n\n\t}\n\n\t// Do we have a custom path?\n\tif ( '' != $path ) {\n\n\t\treturn $theme->theme_url() . trim( $path, '/' );\n\n\t}\n\n\treturn $theme->theme_url();\n\n}", "title": "" }, { "docid": "516731a2c19335d8ec3e957cc869fcdf", "score": "0.5047258", "text": "function asset_url() {\n\treturn base_url() . 'assets/';\n}", "title": "" }, { "docid": "15d6120fc5f1d9296d8435f2b5b3b746", "score": "0.5038842", "text": "private function getUriTheme($themeDirectoryName) {\n return $this->website->getUriThemes() . $themeDirectoryName . \"/\";\n }", "title": "" }, { "docid": "29af267b75061f63365768dd0dc36b62", "score": "0.5033926", "text": "function custom_theme_get_asset_path(string $filename): string\n{\n static $manifest = null;\n\n if (null === $manifest) {\n $manifest_path = get_stylesheet_directory() . \"/dist/manifest.json\";\n $manifest = file_exists($manifest_path)\n ? json_decode(file_get_contents($manifest_path), true)\n : [];\n }\n\n if (array_key_exists($filename, $manifest)) {\n return $manifest[$filename];\n }\n\n return $filename;\n}", "title": "" }, { "docid": "57d8483bd37ff3ac04766eb036325bf6", "score": "0.50238836", "text": "public function getAssetsUrl()\n\t{\n\t\tif( $this->_assetsUrl===null )\n\t\t{\n\t\t\t$assetsPath = Yii::getPathOfAlias('reporting.assets');\n\n\t\t\t// We need to republish the assets if debug mode is enabled.\n\t\t\tif( $this->debug===true )\n\t\t\t\t$this->_assetsUrl = Yii::app()->getAssetManager()->publish($assetsPath, false, -1, true);\n\t\t\telse\n\t\t\t\t$this->_assetsUrl = Yii::app()->getAssetManager()->publish($assetsPath);\n\t\t}\n\n\t\treturn $this->_assetsUrl;\n\t}", "title": "" }, { "docid": "82e234d6599e951581d828fd8f56e0dc", "score": "0.50176096", "text": "function pf_get_template_assets($assets)\n{\n return get_stylesheet_directory_uri() . '/' . ltrim($assets, '/');\n}", "title": "" }, { "docid": "fa0824b6656922fbee1205a31e206c0e", "score": "0.50173515", "text": "function asset($assetPath)\n{\n $protocol = isset($_SERVER['HTTPS']) ? \"https://\" : \"http://\";\n return $protocol.$_SERVER['HTTP_HOST'].'/public'.$assetPath;\n}", "title": "" }, { "docid": "df9278b1e2ddd04fa7f2e8a5f3d100fc", "score": "0.5016394", "text": "static public function GetAssetUrl($absUrlPath, $mtime=true, $type=1) {\r\n\t\treturn MI_Asset::getUrl($absUrlPath, $mtime, $type);\r\n\t}", "title": "" }, { "docid": "8faaf7d9a9390f2c843d7001fa7bd7e2", "score": "0.50042254", "text": "public static function theme_assets() {\r\n\t\t\t\r\n\t\t\tif( 'masonry' == bstone_options( 'blog-style' ) ) {\r\n\r\n\t\t\t\t$default_assets = array(\r\n\r\n\t\t\t\t\t// handle => location ( in /assets/js/ ) ( without .js ext).\r\n\t\t\t\t\t'js' => array(\r\n\t\t\t\t\t\t'bstone-flexibility' => 'flexibility',\r\n\t\t\t\t\t\t'bstone-masonry-js' => 'masonry.pkgd',\r\n\t\t\t\t\t\t'bstone-theme-js' => 'bstone',\r\n\t\t\t\t\t\t'bstone-navigation' => 'navigation',\r\n\t\t\t\t\t\t'bstone-skip-link-focus-fix' => 'skip-link-focus-fix',\r\n\t\t\t\t\t),\r\n\r\n\t\t\t\t\t// handle => location ( in /assets/css/ ) ( without .css ext).\r\n\t\t\t\t\t'css' => array(\r\n\t\t\t\t\t\t'bstone-theme-style' => 'style',\r\n\t\t\t\t\t),\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t$default_assets = array(\r\n\r\n\t\t\t\t\t// handle => location ( in /assets/js/ ) ( without .js ext).\r\n\t\t\t\t\t'js' => array(\r\n\t\t\t\t\t\t'bstone-theme-js' \t => 'bstone',\r\n\t\t\t\t\t\t'bstone-flexibility' => 'flexibility',\r\n\t\t\t\t\t\t'bstone-navigation' => 'navigation',\r\n\t\t\t\t\t\t'bstone-skip-link-focus-fix' => 'skip-link-focus-fix',\r\n\t\t\t\t\t),\r\n\r\n\t\t\t\t\t// handle => location ( in /assets/css/ ) ( without .css ext).\r\n\t\t\t\t\t'css' => array(\r\n\t\t\t\t\t\t'bstone-theme-style' => 'style',\r\n\t\t\t\t\t),\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\tif( true == bstone_options( 'bstone-font-awesome-icons' ) ) {\r\n\t\t\t\t$default_assets['css']['font-awesome-style'] = 'font-awesome';\r\n\t\t\t}\r\n\r\n\t\t\tif( true == bstone_options( 'bp-banner-enable' ) ) {\r\n\t\t\t\t$default_assets['js']['bstone-owl-js'] \t = 'owl.carousel';\r\n\t\t\t\t$default_assets['css']['bstone-owl-style'] \t = 'owl.carousel';\r\n\t\t\t\t$default_assets['css']['bstone-owl-theme'] \t = 'owl.theme.default';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn apply_filters( 'bstone_theme_assets', $default_assets );\r\n\t\t}", "title": "" }, { "docid": "9b5123021d2bf1f458e756c8b4b8bf4e", "score": "0.5001053", "text": "public static function get_asset( $ref )\n {\n $ret = plugin_dir_url( __FILE__ ) . 'assets/' . $ref;\n\n return ( $ret );\n }", "title": "" }, { "docid": "c811e82f176672cdcd7e2d7ddc9e0f3e", "score": "0.49816176", "text": "function asset_url($path)\n{\n\treturn config_item('base_url') . ('assets/' . $path);\n}", "title": "" }, { "docid": "994e72200e364c5496ced9e57665d226", "score": "0.49630862", "text": "public function static_assets_url( string $_file_path ) : string {\n\t\treturn ( $this->use_production ? $this->_base_url : $this->_development_url_base ) \n\t\t\t\t. $this->_configuration->static_path() \n\t\t\t\t. $_file_path;\n\t}", "title": "" }, { "docid": "89b56843e202d3aa1fba673fc5293060", "score": "0.4942288", "text": "protected function url($attachment, $styleName = '')\n\t{\n\t\treturn $this->interpolate($attachment->url, $attachment, $styleName);\n\t}", "title": "" }, { "docid": "8aad9ed76fcd005e3fe99fe3ee43858e", "score": "0.49395958", "text": "public function assetUrl($file = null, $forced_extension = false) {\n\t\tif (is_null($file)) {\n\t\t\treturn $this;\n\t\t}\n\n\t\t$ini = Zend_Registry::get('config');\n\t\t// If only basename is given, we assume \"modern\" approach.\n\t\t// AssetUrl will:\n\t\t// - prepend assets.<extension>.root to the file\n\t\t// - add the current semver to the path\n\t\tif (strpos($file, '/') === false) {\n\t\t\t$file = $this->getVersionedBuildPath($file);\n\n\t\t// Else we will use the old (but actually more \"modern\") approach.\n\t\t// AssetUrl will:\n\t\t// - append semver as query string (main.js?v0.0.1)\n\t\t} else if (!empty($file) && substr($file, -1) !== '/') {\n\t\t\t$file = $this->getVersionedQuery($file);\n\t\t}\n\n\t\t// For backwards compatibility: deprecated param assetType\n\t\tif ($ini->cdn->assetType) {\n\t\t\treturn $this->_getUrl($file, $ini->cdn->assetType, $ini->cdn->domain);\n\t\t}\n\n\t\t$extension = $forced_extension ? $forced_extension : $this->_getExtension($file);\n\t\tif (!empty($ini->cdn->{$extension}->location)) {\n\t\t\treturn $this->_getUrl($file, $ini->cdn->{$extension}->location, $ini->cdn->domain);\n\t\t}\n\n\t\treturn $this->_getUrl($file, $ini->cdn->type, $ini->cdn->domain);\n\t}", "title": "" }, { "docid": "88dfdc3b9f70b4b7ac9a54b573c10f1a", "score": "0.4934841", "text": "protected function getAssetsUrl()\r\n {\r\n if (isset($this->_assetsUrl)) {\r\n return $this->_assetsUrl;\r\n } else {\r\n $assetsPath = Yii::getPathOfAlias('fontawesome.assets');\r\n $assetsUrl = Yii::app()->assetManager->publish($assetsPath, false, -1, $this->forceCopyAssets);\r\n return $this->_assetsUrl = $assetsUrl;\r\n }\r\n }", "title": "" }, { "docid": "e3720e97202792579227a25553f5e9fd", "score": "0.49252805", "text": "function smarty_function_get_path($params, &$smarty){\r\n if (!isset($params['asset']) and !isset($params['file']) and !isset($params['url'])) {\r\n $smarty->trigger_error('Please, provide asset or path!');\r\n return;\r\n }\r\n if (isset($params['asset']) and isset($params['file'])) {\r\n $smarty->trigger_error('Please, provide only asset or file path!');\r\n return;\r\n }\r\n \r\n if (isset($params['asset']) and gettype($params['asset']) != 'string') {\r\n $smarty->trigger_error('Asset have to be string!');\r\n return;\r\n }\r\n if (isset($params['file']) and gettype($params['file']) != 'string') {\r\n $smarty->trigger_error('File have to be string!');\r\n return;\r\n }\r\n \r\n /* main function */\r\n if (isset($params['asset'])) {\r\n return rtrim(MAIN_DIR, '/') . DIRECTORY_SEPARATOR . preg_replace('/[^\\da-z]/i', '', $smarty->getTemplateDir()[0]) . DIRECTORY_SEPARATOR . $smarty->current_theme . DIRECTORY_SEPARATOR . $params['asset'];\r\n }\r\n if (isset($params['file'])) {\r\n return MAIN_DIR . UPLOADS_DIR . $params['file'];\r\n }\r\n if (isset($params['url'])) {\r\n if ($params['url'] == '' or $params['url'] == '/' or $params['url'] == 'mainDir') {\r\n return MAIN_DIR;\r\n }\r\n return MAIN_DIR . $params['url'];\r\n }\r\n \r\n}", "title": "" }, { "docid": "4b8fbd5eb92e62bbee6f05b66eaebaa8", "score": "0.4921343", "text": "function relativeAssetUrl($input)\n{\n if (is_admin()) {\n return $input;\n }\n\n if ($input === null) {\n return $input;\n }\n\n // Remove the home_url if set\n $result = (string) s($input)->removeLeft(untrailingslashit(home_url()));\n\n return $result;\n}", "title": "" }, { "docid": "d1e32eeab090778e765f827dd649f128", "score": "0.49178427", "text": "public function uri()\n {\n return $this->fetchPath($this->config->get('asset::file'), $this->uri);\n }", "title": "" }, { "docid": "7549bdcf4213b6b9c5c55ea9ed3dd181", "score": "0.488692", "text": "function get_style_uri() {\n\t\t$suffix = $this->get_asset_suffix();\n\t\t$style_dir = get_template_directory();\n\t\t$suffix_css = $suffix;\n\t\t$css_file = false;\n\t\tif ( is_rtl() ) {\n\t\t\t$suffix_css = '-rtl' . $suffix;\n\t\t}\n\n\t\t$min_file = $style_dir . '/style' . $suffix_css . '.css';\n\t\tif ( file_exists( $min_file ) ) {\n\t\t\t$css_file = esc_url( get_template_directory_uri() ) . '/style' . $suffix_css . '.css';\n\t\t}\n\n\t\tif ( ! $css_file ) {\n\t\t\t$css_file = get_stylesheet_uri();\n\t\t}\n\n\t\treturn $css_file;\n\t}", "title": "" }, { "docid": "57d52286f982dcd5e948d57a36294ba7", "score": "0.4886574", "text": "public function getContentFromLayout($pathLayout = null, $var = null) {\n \n if (!$this->checkFilesExists($pathLayout)) {\n return null;\n }\n \n $this->setPathLayout($pathLayout);\n \n ob_start();\n require $pathLayout;\n $this->setContentLayout(ob_get_contents());\n ob_end_clean();\n \n return $this->getContentLayout();\n }", "title": "" }, { "docid": "3c6256f2c501824c30df1634f66fefa9", "score": "0.48811567", "text": "public function layoutPath(): string;", "title": "" }, { "docid": "5ed03a89921760fce977694d8de9748e", "score": "0.4872334", "text": "function bimber_dynamic_style_get_cached_file_url() {\n\t$option_base = bimber_get_theme_id();\n\t$use_dynamic_style_option_name = $option_base . '_use_dynamic_style_cache';\n\t$use_dynamic_style = (bool) get_option( $use_dynamic_style_option_name );\n\n\tif ( $use_dynamic_style ) {\n\t\t$upload_dir = wp_upload_dir();\n\n\t\treturn trailingslashit( $upload_dir['baseurl'] ) . 'dynamic-style.css';\n\t} else {\n\t\treturn null;\n\t}\n}", "title": "" }, { "docid": "2d6b9a978f78412e33875b434ad2a5bc", "score": "0.48716593", "text": "public function assets(string $location = 'header'): string;", "title": "" }, { "docid": "d0c643e92d8340ebd102c993f5b75ba2", "score": "0.4846946", "text": "public function getAssetsUrl(){\r\n\t\t// check if we need to generate the sprite\r\n\t\t// if the asset folder exists we will assume we do not \r\n\t\t// want to regenerate the sprite\r\n\t\tif(!file_exists($this->getPublishedAssetsPath().'/sprite.png')){\r\n\t\t\t$this->generate();\r\n\t\t}\r\n\t\treturn Yii::app()->getAssetManager()->publish($this->getAssetFolder());\r\n\t}", "title": "" }, { "docid": "1deb51895fc26655bada692d93e3e950", "score": "0.48426747", "text": "function adminCssAssetURL($file) {\n return adminAssetPath($file, \"css\");\n}", "title": "" }, { "docid": "fec82906a3b6285fd785c365374f0a15", "score": "0.48348302", "text": "function adminImageAssetURL($file) {\n return adminAssetPath($file, \"image\");\n}", "title": "" }, { "docid": "dbb5c1785446066cde08686dde975354", "score": "0.48259804", "text": "function snax_get_assets_url() {\n\treturn snax()->assets_url;\n}", "title": "" }, { "docid": "5fd9ef3837386c27ce5a2b6c87569215", "score": "0.4825819", "text": "public function getProvidedMaterialsUri() {\n return Yii::app()->s3->assetsPath . 'projects/' . $this->id . '/materials';\n }", "title": "" }, { "docid": "842c1418535843e8883ea27c9be70bb7", "score": "0.47971922", "text": "function faithmade_asset_url( $file ){\n\n return plugins_url( $file, FAITHMADE_PLUGIN_URL );\n\n}", "title": "" }, { "docid": "88af2fcf48c108a666c845034bb97541", "score": "0.47743744", "text": "function theme_asset_tag($path = null)\n\t{\n\t\t$path = theme_asset($path);\n\t\t$ext = pathinfo($path, PATHINFO_EXTENSION);\n\n\t\tif ($ext == 'js') return '<script src=\"'.$path.'\"></script>'.PHP_EOL;\n\t\telseif ($ext == 'css') return '<link rel=\"stylesheet\" href=\"'.$path.'\">'.PHP_EOL;\n\t\telseif ($ext == 'jpg') return '<img src=\"'.$path.'\">'.PHP_EOL;\n\t\telse return $path.PHP_EOL;\n\t}", "title": "" }, { "docid": "89524b910599adc451fb48bcde015f34", "score": "0.47736117", "text": "abstract protected function getAssetUrl(AssetInterface $asset, $options = array());", "title": "" }, { "docid": "111239320be829c4e9027d5427efe501", "score": "0.47671142", "text": "abstract function assetPath();", "title": "" }, { "docid": "12a8c6c608b84736edee76614dcbb199", "score": "0.47669002", "text": "public function getBaseAssetsUri()\n {\n return $this->paths['base_assets_uri'];\n }", "title": "" }, { "docid": "8cde084fc41a4c9272efb13008ffdb2a", "score": "0.47640237", "text": "function asset_url()\n {\n $CI =& get_instance();\n //return the full asset path\n return base_url() . $CI->config->item('asset_path');\n }", "title": "" }, { "docid": "530f082e3a62748714b02b082c7bed40", "score": "0.4762403", "text": "public function get_theme_css_links(){\n\t\t\t$host_app_header = @file_get_contents(dirname(__FILE__) . '/../../header.php');\n\t\t\tif(!$host_app_header){\n\t\t\t\t/* try to guess the theme and assume no 3D effect */\n\t\t\t\treturn '<link rel=\"stylesheet\" href=\"../../resources/initializr/css/bootstrap.css\">';\n\t\t\t}\n\t\t\t\n\t\t\t$regex = '/<link\\s+rel=\"stylesheet\".*?resources\\/initializr\\/css\\/(.*?)\\.css\"/i';\n\t\t\t$mat = array();\n\t\t\tif(!preg_match_all($regex, $host_app_header, $mat)){\n\t\t\t\t/* error or no matches */\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\t\n\t\t\t$links = '';\n\t\t\tforeach($mat[1] as $m){\n\t\t\t\tif($m == 'bootstrap-theme'){\n\t\t\t\t\t$links .= \"<!--[if gt IE 8]><!-->\\n\";\n\t\t\t\t\t$links .= '<link rel=\"stylesheet\" href=\"../../resources/initializr/css/bootstrap-theme.css\">' . \"\\n\";\n\t\t\t\t\t$links .= '<!--<![endif]-->' . \"\\n\";\n\t\t\t\t}else{\n\t\t\t\t\t$links .= '<link rel=\"stylesheet\" href=\"../../resources/initializr/css/' . $m . '.css\">' . \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $links;\n\t\t}", "title": "" }, { "docid": "390a4707477bd8a30e8604297e9a1f64", "score": "0.47617", "text": "public function getUrl()\n {\n return trailingslashit($this->rootUrl) . ltrim($this->applyMixManifest($this->src), '/\\\\');\n }", "title": "" }, { "docid": "b2fb8e42ec775bb5dfc1bd3c71e2b67c", "score": "0.47605935", "text": "function get_plugin_url($asset) {\n $is_debug = defined('WP_DEBUG') && WP_DEBUG === true;\n return ($is_debug)\n ? 'http://localhost:9000/' . $asset\n : plugins_url( '../build/' . $asset, dirname(__FILE__));\n}", "title": "" }, { "docid": "5adcb509361dfd51ac3645d729915311", "score": "0.4758076", "text": "function theme_path($file = '', $theme = null)\n {\n return Theme::path($file, $theme);\n }", "title": "" }, { "docid": "7ab09bf8ff3b8490882239e7e2506eab", "score": "0.47552344", "text": "public function getThemeRootUri()\n {\n return $this->paths['theme_root_uri'];\n }", "title": "" }, { "docid": "162b68a448f15ed88d272f688879962b", "score": "0.47539586", "text": "function asset_url(){\n return base_url().'assets/';\n}", "title": "" }, { "docid": "89372ca28a127575fd7abd5310f02897", "score": "0.4753534", "text": "public function assetUrl($name)\n {\n $this->loadManifest();\n list($key, $type) = explode('.', $name);\n if (empty($this->webpack_manifest->$key->$type)) return;\n return $this->webpack_manifest->$key->$type;\n }", "title": "" }, { "docid": "5befec8c76fa6fe22335735e8349c23d", "score": "0.4753382", "text": "function get_asset_path( $filename ) {\n\n // Cache the decoded manifest so that we only read it in once.\n static $manifest = null;\n\n if ( null === $manifest ) {\n $active_theme_slug = get_template();\n $manifest_path = ABSPATH . 'wp-content/themes/' . $active_theme_slug . '/assets/rev-manifest.json';\n $manifest = file_exists( $manifest_path )\n ? json_decode( file_get_contents( $manifest_path ), FILE_USE_INCLUDE_PATH )\n : [];\n }\n\n // If the manifest contains the requested file, return the hashed name.\n if ( array_key_exists( $filename, $manifest ) ) {\n return '/assets/' . $manifest[ $filename ];\n }\n\n // Assume the file has not been hashed or it was not found within the\n // manifest.\n return '/assets/' . $filename;\n}", "title": "" }, { "docid": "d428761c7cf12caa2671dba78b4b55c3", "score": "0.47436076", "text": "function captcha_layout_stylesheet_url()\n {\n return Router::url('/', true) . 'captcha-handler?get=bdc-layout-stylesheet.css';\n }", "title": "" }, { "docid": "f10f0ea646627c363f53e530c011600e", "score": "0.47301942", "text": "function adminAssetPath($file = null, $type = \"path\", $url = true) {\n\n // Get Assets Folder\n $assets_folder = app(\"laravel-admin\")->getConfig(\"assets_folder\");\n if($assets_folder) $assets_folder .= \"/\";\n\n // Path\n $path = null;\n\n // Find Paths\n switch(strtolower($type)) {\n case 'css':\n $path = ($url ? cssUrl($assets_folder . $file) : cssPath($assets_folder . $file));\n break;\n case 'js':\n $path = ($url ? jsUrl($assets_folder . $file) : jsPath($assets_folder . $file));\n break;\n case 'image':\n $path = ($url ? imageUrl($assets_folder . $file) : imagePath($assets_folder . $file));\n break;\n case 'path':\n $path = ($url ? assetsPath($assets_folder) : assetsPath($assets_folder));\n break;\n }\n\n // Return\n return $path;\n}", "title": "" }, { "docid": "e337a84133afb64689785ba28f35e8a6", "score": "0.47280917", "text": "public function getLayout()\n {\n return $this->path.$this->layout;\n }", "title": "" }, { "docid": "0cff8a2e91c9bd8e8f4e1305c2ddf5bf", "score": "0.4723096", "text": "public function AssetUrl ($path = '') {\n\t\treturn \\MvcCore::GetInstance()->Url('Controller:Asset', array('path' => $path));\n\t}", "title": "" }, { "docid": "0cff8a2e91c9bd8e8f4e1305c2ddf5bf", "score": "0.4723096", "text": "public function AssetUrl ($path = '') {\n\t\treturn \\MvcCore::GetInstance()->Url('Controller:Asset', array('path' => $path));\n\t}", "title": "" }, { "docid": "86f1f55d01b7fdfa99c4f7a82df089db", "score": "0.47221085", "text": "public function getSkinUrl($secure = false)\n {\n return $this->getBaseUrl($secure) . 'skin/' . $this->getLayout();\n }", "title": "" }, { "docid": "c70af98a16cdcf6dd222f56dc213cf70", "score": "0.47116712", "text": "public function theme_layout_scripts($tag=NULL,$type='javascript')\n\t{\n\t\t// Use config values if nothing is passed to the function\n\t\tif (is_null($tag))\n\t\t{\n\t\t\t$tag =\t$this->config->item('theme_layout_scripts', 'styles');\n\t\t}\n\n\t\t$this->comment('<!-- BEGIN THEME LAYOUT SCRIPTS -->');\n\t\t$this->get_link_tags($tag,$type);\n\t\t$this->comment('<!-- END THEME LAYOUT SCRIPTS -->');\n\n\t}", "title": "" }, { "docid": "1c70d7b22dba48fd8895fa018533f6b4", "score": "0.4702368", "text": "function adminJsAssetURL($file) {\n return adminAssetPath($file, \"js\");\n}", "title": "" }, { "docid": "e838e1603c34e502599bf91379975d8c", "score": "0.46892887", "text": "function asset($asset)\n{\t\n\t$asset = str_replace(getWebroot().'/', '', $asset);\n\t\n\treturn url($asset);\n}", "title": "" }, { "docid": "5dd3e93f73a6329624640588bb2f0143", "score": "0.4684624", "text": "protected function url($manager, $styleName = '')\n\t{\n\t\treturn $this->interpolate($manager->url, $manager, $styleName);\n\t}", "title": "" } ]
b59c31c8e00e59074c83f572509f52ed
Generate $mapping for $entityClass
[ { "docid": "ff431b852c81c278df3458df0e656283", "score": "0.78464586", "text": "private function generateMapping(EntityClass $entityClass) \r\n {\r\n $mapping = array(); \r\n\r\n foreach ($entityClass->getProperties() as $property) { \r\n\r\n $fieldMapping = array(\r\n 'fieldName' => $property->getTechnicalName(), \r\n 'versioned' => true,\r\n );\r\n\r\n switch ($property->getFieldType()->getFormType()) {\r\n case 'entity':\r\n\r\n $fieldMapping['targetEntity'] = $this->getEntityNamespace($property->getTargetEntityClass()->getTechnicalName());\r\n\r\n if($property->isMultiple()){\r\n $fieldMapping['mappingType'] = 'manyToMany';\r\n }\r\n else{\r\n $fieldMapping['mappingType'] = 'manyToOne';\r\n }\r\n\r\n break;\r\n case 'file':\r\n $fieldMapping['targetEntity'] = 'SL\\CoreBundle\\Entity\\Document';\r\n $fieldMapping['mappingType'] = 'oneToOne';\r\n $fieldMapping['cascade'] = array('persist','remove');\r\n\r\n break;\r\n default:\r\n $fieldMapping['mappingType'] = null;\r\n $fieldMapping['type'] = ($property->isMultiple())?'array':$property->getFieldType()->getDataType();\r\n $fieldMapping['length'] = ($property->isMultiple())?null:$property->getFieldType()->getLength();\r\n $fieldMapping['nullable'] = !$property->isRequired();\r\n\r\n break;\r\n }\r\n $mapping[] = $fieldMapping;\r\n }\r\n\r\n return $mapping; \r\n }", "title": "" } ]
[ { "docid": "218cb99363ef4cd43d4d7a241d17a9e1", "score": "0.6752339", "text": "protected abstract function build_mapping();", "title": "" }, { "docid": "ddf7886dd7612193555e1ac4eabfd2ab", "score": "0.64707315", "text": "public function objectClassModelMap();", "title": "" }, { "docid": "963ce8067ed67605710e2dbec6d43a76", "score": "0.64619046", "text": "protected function build_mapping()\n {\n }", "title": "" }, { "docid": "963ce8067ed67605710e2dbec6d43a76", "score": "0.64619046", "text": "protected function build_mapping()\n {\n }", "title": "" }, { "docid": "963ce8067ed67605710e2dbec6d43a76", "score": "0.64619046", "text": "protected function build_mapping()\n {\n }", "title": "" }, { "docid": "963ce8067ed67605710e2dbec6d43a76", "score": "0.64619046", "text": "protected function build_mapping()\n {\n }", "title": "" }, { "docid": "963ce8067ed67605710e2dbec6d43a76", "score": "0.6460566", "text": "protected function build_mapping()\n {\n }", "title": "" }, { "docid": "7d24ba2ca375067aa9e98cfcf8957c6b", "score": "0.6193905", "text": "private function initClassMetadataInfo(EntityClass $entityClass) {\r\n\r\n $entityNamespace = $this->getEntityNamespace($entityClass->getTechnicalName());\r\n $mapping = $this->generateMapping($entityClass);\r\n\r\n $class = new ClassMetadataInfo($entityNamespace);\r\n $class->customRepositoryClassName = 'SL\\CoreBundle\\Entity\\Repository\\SharedEntityRepository';\r\n\r\n if($entityClass->getParent() === null){\r\n $class->setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_JOINED);\r\n $class->setDiscriminatorColumn(array(\r\n 'name' => 'discr',\r\n 'type' => 'string',\r\n 'length' => 0,\r\n )\r\n ); \r\n }\r\n\r\n //Mapped other fields\r\n foreach ($mapping as $fieldMapping) {\r\n\r\n if($fieldMapping['mappingType'] == 'manyToOne'){\r\n $class->mapManyToOne($fieldMapping);\r\n }\r\n else if($fieldMapping['mappingType'] == 'manyToMany'){\r\n $class->mapManyToMany($fieldMapping);\r\n }\r\n else if($fieldMapping['mappingType'] == 'oneToOne'){\r\n $class->mapOneToOne($fieldMapping);\r\n }\r\n else {\r\n $class->mapField($fieldMapping);\r\n }\r\n }\r\n\r\n return $class; \r\n }", "title": "" }, { "docid": "1624ecf8a755e21d601eb8537b527246", "score": "0.58133245", "text": "public function getMapping();", "title": "" }, { "docid": "1624ecf8a755e21d601eb8537b527246", "score": "0.58133245", "text": "public function getMapping();", "title": "" }, { "docid": "c047c93960bb171850f8a529537ce07b", "score": "0.5812685", "text": "public function getMapping($entity)\r\n\t{\r\n\t\treturn $this->metadataMapping->loadMappings($entity);\r\n\t}", "title": "" }, { "docid": "04248607d8c26263c41115bccb75f22d", "score": "0.58099526", "text": "public function generateEntityClass(Mapper $mapper): string\n {\n $this->mapperInfo = $mapper->info();\n $className = $this->mapperInfo->className();\n\n $file = new PhpFile();\n\n $nsSeparatorPos = strrpos($className, '\\\\');\n\n $namespace = $file->addNamespace($nsSeparatorPos !== false ? substr($className, 0, $nsSeparatorPos) : '');\n $class = $namespace->addClass(substr($className, $nsSeparatorPos + 1));\n\n $generator = new EntityClassGenerator($class, $namespace);\n\n $this->generateEntityClassDeclaration($class);\n $this->generateEntityUse($generator);\n $this->generateEntityBody($generator);\n\n return (new ConfigurableEntityPrinter($this))\n ->printFile($file);\n }", "title": "" }, { "docid": "59fd236546bc55dc8b099d740ecc52fc", "score": "0.5706631", "text": "public function map(Entity $entity, $update = false, $class = null)\n {\n $class = $class ?: get_class($entity);\n $key = static::buildChecksum($entity->getPrimaryKey());\n\n if ($update || !isset($this->map[$class][$key])) {\n $this->map[$class][$key] = $entity;\n }\n\n return $this->map[$class][$key];\n }", "title": "" }, { "docid": "4ed39eaf1443eb37c259b5c4d55b791b", "score": "0.5587575", "text": "public function getEntityMap(): array\n {\n $map = [];\n $resolver = $this->mapperFactory->getNameResolver();\n\n foreach ($this->discriminatorMap as $key => $mapperClass) {\n $map[$key] = $resolver->reverse($mapperClass);\n }\n\n return $map;\n }", "title": "" }, { "docid": "47a1d5e51f26afbed5586c359fae63df", "score": "0.5533442", "text": "public static function getMap()\n {\n return array(\n new Entity\\IntegerField('ID', array(\n 'primary' => true,\n 'autocomplete' => true\n )),\n new Entity\\StringField('NAME', array(\n 'required' => true\n )),\n new Entity\\IntegerField('BRAND_ID'),\n (new Reference(\n 'BRAND',\n BrandTable::class,\n Join::on('this.BRAND_ID', 'ref.ID')\n ))\n ->configureJoinType('inner')\n\t\t);\n }", "title": "" }, { "docid": "b157ee8f4a9f51afe1190cf1e7b1f7c5", "score": "0.55326384", "text": "public function createClassMap()\n {\n // Set the key as the model's class name, and the value as a collection\n // of indices. You can use this map to look up which indices need\n // to be updated when a model is updated.\n return $this->indices->reduce(function ($classMap, $index) {\n $className = get_class($index->getModel());\n\n // create the key for that class, or push it onto the\n // existing key.\n if ($classMap->has($className)) {\n $classMap[$className]->push($index);\n } else {\n $classMap[$className] = collect([$index]);\n }\n\n return $classMap;\n }, collect());\n }", "title": "" }, { "docid": "845fde7c9a268035b8814b95ad379958", "score": "0.55127704", "text": "public function enhance_mapping($mapping = [])\n {\n }", "title": "" }, { "docid": "fc4cda0fa0a75ebe3564446e416b3982", "score": "0.54837275", "text": "abstract protected function getTypeMapping();", "title": "" }, { "docid": "f7889cf2ee23d776c40e9f7f5cc82e3f", "score": "0.5439547", "text": "public function getClassMap() {\n if ($this->classMap === array()) {\n foreach ($this->drupal->entityGetInfo() as $type => $definition) {\n if (isset($definition['entity xliff translatable classes'])) {\n $this->classMap[$type] = $definition['entity xliff translatable classes'];\n }\n }\n }\n return $this->classMap;\n }", "title": "" }, { "docid": "4a807ecf1a41be2f2dd6b473c827571d", "score": "0.54394484", "text": "public function generate_map_name_to_backend() {\n\t\t$this->init_function('map_name_to_backend', array('name', 'prefix'), array('static'), array('prefix' => false));\n\t\t$this->write('if($prefix === false) {');\n\t\t$this->write('$prefix = %s;', $this->structure['table'].'.');\n\t\t$this->write('}');\n\t\tforeach($this->structure['structure'] as $field => $type ) {\n\t\t\t$ormtype = ORMTypeFactory::factory($field, $type, $this->structure['structure']);\n\t\t\t$backend_field = $field;\n\t\t\tif(isset($this->structure['rename']) && isset($this->structure['rename'][$field])) {\n\t\t\t\t$backend_field = $this->structure['rename'][$field];\n\t\t\t}\n\t\t\tif(is_a($ormtype, 'ORMTypeLSrelation')) {\n\t\t\t\t$subobjpool_class = $type[0].'Pool'.self::$model_suffix;\n\t\t\t\t$this->write('if(substr($name,0,%s) == %s) {', strlen($field)+1, $field.'.');\n\t\t\t\t$this->write('return '.$subobjpool_class.'::map_name_to_backend(substr($name,%d),%s);', strlen($field)+1, $type[1]);\n\t\t\t\t$this->write('}');\n\t\t\t} else {\n\t\t\t\t$this->write('if($name == %s) {', $field);\n\t\t\t\t$this->write('return $prefix.%s;',$backend_field);\n\t\t\t\t$this->write('}');\n\t\t\t}\n\t\t}\n\t\t$this->write('return false;');\n\t\t$this->write('}');\n\t}", "title": "" }, { "docid": "3756db1dff291817968d558c101ee839", "score": "0.54290074", "text": "public function mapRowFromEntity(Domain_Entity_Abstract $entity)\n {\n $row = array();\n foreach(array_flip($this->_map) as $entityFieldName => $rowFieldName) {\n $mapperMethod = '_get_' . $entityFieldName;\n\n if (method_exists($this, $mapperMethod)) {\n $row[$rowFieldName] = $this->$mapperMethod($entity->$entityFieldName);\n } else {\n $row[$rowFieldName] = $entity->$entityFieldName;\n }\n }\n return $row;\n }", "title": "" }, { "docid": "fc1f0ffd71b2cc415b1cadd7ee8d24c2", "score": "0.5425162", "text": "public function createEntityMetadataByClass($className)\n {\n $classMetadata = $this->doctrineHelper->getMetadataFor($className);\n\n $result = $this->metadataFactory->createEntityMetadata(array(), (array) $classMetadata);\n\n $this->addDoctrineFields($result, $classMetadata);\n $this->addDoctrineAssociations($result, $classMetadata);\n $this->addDoctrineInverseAssociations($result, $classMetadata, $className);\n\n $this->eventDispatcher->dispatch(\n MergeEvents::BUILD_METADATA,\n new EntityMetadataEvent($result)\n );\n\n return $result;\n }", "title": "" }, { "docid": "e56c66071cfb7e6ada9cbdb093383347", "score": "0.5419132", "text": "public function generateAssociationMappings(array $entities, array $relations);", "title": "" }, { "docid": "bcd4454f7e3e95dade4916bc01552aee", "score": "0.5392559", "text": "private function init_mapping() {\n global $CFG, $DB;\n\n require_once($CFG->dirroot.'/blocks/rlip/importplugins/version1elis/lib.php');\n\n foreach ($this->mapping as $standardfieldname => $customfieldname) {\n $mapping = new stdClass;\n $mapping->entitytype = 'user';\n $mapping->standardfieldname = $standardfieldname;\n $mapping->customfieldname = $customfieldname;\n\n $DB->insert_record(RLIPIMPORT_VERSION1ELIS_MAPPING_TABLE, $mapping);\n }\n }", "title": "" }, { "docid": "3eaa5ec867b52616e0294a4e44342e34", "score": "0.5392059", "text": "public function generateFieldsMappings(array $fields);", "title": "" }, { "docid": "34333492af1f7e1865d46de3af17efdb", "score": "0.53747994", "text": "public function getEntityMappings(): array\n {\n return ['Users' => __DIR__ . '/..'];\n }", "title": "" }, { "docid": "0b5527a6d5d52d2a66d4a2bdad5685e6", "score": "0.5364595", "text": "protected function mapFromEntity($entity) {\n\t\t$data = array();\n\t\tforeach ($this->getFields() as $prop => $fieldName) {\n\t\t\t$method = \"get\" . ucfirst($prop);\n\t\t\tif (method_exists($entity, $method)) {\n\t\t\t\t$data[$fieldName] = $entity->$method();\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "f875a11b3f103a91ff746e085ef72079", "score": "0.53470653", "text": "public function getMappings() : array\n {\n $map = parent::getMappings();\n\n $map['articleCategoryRepository'] = fn (CI $c) =>\n new ArticleCategoryRepository(\n $c->repositoryContext,\n new ObjectProxy(\n fn () =>\n new ArticleCategoryHydrator(\n )\n )\n );\n\n $map['articleRepository'] = fn (CI $c) =>\n new ArticleRepository(\n $c->repositoryContext,\n $c->articleCategoryRepository,\n $c->tagRepository,\n new ObjectProxy(\n fn () =>\n new ArticleHydrator(\n $c->articleCategoryRepository,\n $c->articleRepository,\n $c->gameRepository,\n $c->userRepository,\n $c->cutParser,\n $c->linker,\n $c->parser\n )\n )\n );\n\n $map['comicIssueRepository'] = fn (CI $c) =>\n new ComicIssueRepository(\n $c->repositoryContext,\n $c->tagRepository,\n new ObjectProxy(\n fn () =>\n new ComicIssueHydrator(\n $c->comicIssuePageRepository,\n $c->comicSeriesRepository,\n $c->linker,\n $c->parser\n )\n )\n );\n\n $map['comicIssuePageRepository'] = fn (CI $c) =>\n new ComicIssuePageRepository(\n $c->repositoryContext,\n new ObjectProxy(\n fn () =>\n new ComicIssuePageHydrator(\n $c->comicIssueRepository,\n $c->linker\n )\n )\n );\n\n $map['comicPublisherRepository'] = fn (CI $c) =>\n new ComicPublisherRepository(\n $c->repositoryContext\n );\n\n $map['comicSeriesRepository'] = fn (CI $c) =>\n new ComicSeriesRepository(\n $c->repositoryContext,\n $c->tagRepository,\n new ObjectProxy(\n fn () =>\n new ComicSeriesHydrator(\n $c->comicIssueRepository,\n $c->comicPublisherRepository,\n $c->gameRepository,\n $c->linker,\n $c->parser\n )\n )\n );\n\n $map['comicStandaloneRepository'] = fn (CI $c) =>\n new ComicStandaloneRepository(\n $c->repositoryContext,\n $c->tagRepository,\n new ObjectProxy(\n fn () =>\n new ComicStandaloneHydrator(\n $c->comicPublisherRepository,\n $c->comicStandalonePageRepository,\n $c->gameRepository,\n $c->linker,\n $c->parser\n )\n )\n );\n\n $map['comicStandalonePageRepository'] = fn (CI $c) =>\n new ComicStandalonePageRepository(\n $c->repositoryContext,\n new ObjectProxy(\n fn () =>\n new ComicStandalonePageHydrator(\n $c->comicStandaloneRepository,\n $c->linker\n )\n )\n );\n\n $map['eventRepository'] = fn (CI $c) =>\n new EventRepository(\n $c->repositoryContext,\n $c->tagRepository,\n new ObjectProxy(\n fn () =>\n new EventHydrator(\n $c->eventTypeRepository,\n $c->gameRepository,\n $c->regionRepository,\n $c->userRepository,\n $c->cutParser,\n $c->linker,\n $c->parser\n )\n )\n );\n\n $map['eventTypeRepository'] = fn (CI $c) =>\n new EventTypeRepository(\n $c->repositoryContext\n );\n\n $map['forumMemberRepository'] = fn (CI $c) =>\n new ForumMemberRepository(\n $c->repositoryContext,\n new ObjectProxy(\n fn () =>\n new ForumMemberHydrator(\n $c->linker\n )\n )\n );\n\n $map['forumPostRepository'] = fn (CI $c) =>\n new ForumPostRepository(\n $c->repositoryContext\n );\n\n $map['forumRepository'] = fn (CI $c) =>\n new ForumRepository(\n $c->repositoryContext,\n new ObjectProxy(\n fn () =>\n new ForumHydrator(\n $c->forumRepository,\n $c->gameRepository,\n $c->forumService\n )\n )\n );\n\n $map['forumTagRepository'] = fn (CI $c) =>\n new ForumTagRepository(\n $c->repositoryContext\n );\n\n $map['forumTopicRepository'] = fn (CI $c) =>\n new ForumTopicRepository(\n $c->repositoryContext,\n $c->forumTagRepository,\n $c->gameRepository,\n new ObjectProxy(\n fn () =>\n new ForumTopicHydrator(\n $c->forumMemberRepository,\n $c->forumPostRepository,\n $c->forumRepository,\n $c->forumTagRepository,\n $c->gameRepository,\n $c->cutParser,\n $c->forumParser,\n $c->linker,\n $c->newsParser\n )\n )\n );\n\n $map['galleryAuthorCategoryRepository'] = fn (CI $c) =>\n new GalleryAuthorCategoryRepository(\n $c->repositoryContext,\n new ObjectProxy(\n fn () =>\n new GalleryAuthorCategoryHydrator(\n $c->galleryAuthorRepository\n )\n )\n );\n\n $map['galleryAuthorRepository'] = fn (CI $c) =>\n new GalleryAuthorRepository(\n $c->repositoryContext,\n new ObjectProxy(\n fn () =>\n new GalleryAuthorHydrator(\n $c->forumMemberRepository,\n $c->galleryAuthorCategoryRepository,\n $c->galleryPictureRepository,\n $c->linker,\n $c->parser\n )\n )\n );\n\n $map['galleryPictureRepository'] = fn (CI $c) =>\n new GalleryPictureRepository(\n $c->repositoryContext,\n $c->tagRepository,\n $c->linker,\n new ObjectProxy(\n fn () =>\n new GalleryPictureHydrator(\n $c->galleryAuthorRepository,\n $c->galleryPictureRepository,\n $c->gameRepository,\n $c->linker,\n $c->parser\n )\n )\n );\n\n $map['gameRepository'] = fn (CI $c) =>\n new GameRepository(\n $c->repositoryContext,\n $c->config,\n new ObjectProxy(\n fn () =>\n new GameHydrator(\n $c->forumRepository,\n $c->gameRepository,\n $c->linker,\n $c->gameService\n )\n )\n );\n\n $map['itemRepository'] = fn (CI $c) =>\n new ItemRepository(\n $c->repositoryContext,\n new ObjectProxy(\n fn () =>\n new ItemHydrator(\n $c->recipeRepository,\n $c->linker\n )\n )\n );\n\n $map['locationRepository'] = fn (CI $c) =>\n new LocationRepository(\n $c->repositoryContext\n );\n\n $map['menuItemRepository'] = fn (CI $c) =>\n new MenuItemRepository(\n $c->repositoryContext,\n new MenuItemHydrator(\n $c->linker\n )\n );\n\n $map['menuRepository'] = fn (CI $c) =>\n new MenuRepository(\n $c->repositoryContext,\n new ObjectProxy(\n fn () =>\n new MenuHydrator(\n $c->gameRepository,\n $c->menuItemRepository,\n $c->linker\n )\n )\n );\n\n $map['newsRepository'] = fn (CI $c) =>\n new NewsRepository(\n $c->repositoryContext,\n $c->tagRepository,\n new ObjectProxy(\n fn () =>\n new NewsHydrator(\n $c->gameRepository,\n $c->userRepository,\n $c->cutParser,\n $c->linker,\n $c->parser\n )\n )\n );\n\n $map['recipeRepository'] = fn (CI $c) =>\n new RecipeRepository(\n $c->repositoryContext,\n new ObjectProxy(\n fn () =>\n new RecipeHydrator(\n $c->recipeSourceRepository,\n $c->skillRepository,\n $c->linker\n )\n )\n );\n\n $map['recipeSourceRepository'] = fn (CI $c) =>\n new RecipeSourceRepository(\n $c->repositoryContext\n );\n\n $map['regionRepository'] = fn (CI $c) =>\n new RegionRepository(\n $c->repositoryContext,\n new ObjectProxy(\n fn () =>\n new RegionHydrator(\n $c->regionRepository\n )\n )\n );\n\n $map['skillRepository'] = fn (CI $c) =>\n new SkillRepository(\n $c->repositoryContext,\n new ObjectProxy(\n fn () =>\n new SkillHydrator(\n $c->linker,\n $c->config\n )\n )\n );\n\n $map['streamRepository'] = fn (CI $c) =>\n new StreamRepository(\n $c->repositoryContext,\n $c->tagRepository,\n new ObjectProxy(\n fn () =>\n new StreamHydrator(\n $c->gameRepository,\n $c->userRepository,\n $c->gameService,\n $c->streamService,\n $c->linker,\n $c->parser\n )\n )\n );\n\n $map['streamStatRepository'] = fn (CI $c) =>\n new StreamStatRepository(\n $c->repositoryContext\n );\n\n $map['userRepository'] = fn (CI $c) =>\n new UserRepository(\n $c->repositoryContext,\n new ObjectProxy(\n fn () =>\n new UserHydrator(\n $c->forumMemberRepository,\n $c->roleRepository,\n $c->linker,\n $c->gravatar\n )\n )\n );\n\n $map['videoRepository'] = fn (CI $c) =>\n new VideoRepository(\n $c->repositoryContext,\n $c->tagRepository,\n new ObjectProxy(\n fn () =>\n new VideoHydrator(\n $c->gameRepository,\n $c->userRepository,\n $c->cutParser,\n $c->linker,\n $c->parser\n )\n )\n );\n\n $map['appContext'] = fn (CI $c) =>\n new AppContext(\n $c->settingsProvider,\n $c->translator,\n $c->validator,\n $c->view,\n $c->logger,\n $c->menuRepository\n );\n\n $map['gallery'] = function (CI $c) {\n $thumbHeight = $this->settings['gallery']['thumb_height'];\n $thumbStrategy = new UniformThumbStrategy($thumbHeight);\n\n $gallerySettings = [\n 'base_dir' => $this->dir,\n 'fields' => [\n 'picture_type' => 'picture_type',\n 'thumb_type' => 'picture_type',\n ],\n 'folders' => [\n 'picture' => [\n 'storage' => 'gallery_pictures',\n 'public' => 'gallery_pictures_public',\n ],\n 'thumb' => [\n 'storage' => 'gallery_thumbs',\n 'public' => 'gallery_thumbs_public',\n ],\n ],\n ];\n\n return new Gallery(\n $c->settingsProvider,\n $thumbStrategy,\n $gallerySettings\n );\n };\n\n $map['comics'] = function (CI $c) {\n $thumbHeight = $this->settings['comics']['thumb_height'];\n $thumbStrategy = new UniformThumbStrategy($thumbHeight);\n\n $comicsSettings = [\n 'base_dir' => $this->dir,\n 'fields' => [\n 'picture_type' => 'pic_type',\n 'thumb_type' => 'pic_type',\n ],\n 'folders' => [\n 'picture' => [\n 'storage' => 'comics_pages',\n 'public' => 'comics_pages_public',\n ],\n 'thumb' => [\n 'storage' => 'comics_thumbs',\n 'public' => 'comics_thumbs_public',\n ],\n ],\n ];\n\n return new Gallery(\n $c->settingsProvider,\n $thumbStrategy,\n $comicsSettings\n );\n };\n\n $map['config'] = fn (CI $c) =>\n new Config(\n $c->settingsProvider\n );\n\n $map['captchaConfig'] = fn (CI $c) =>\n new CaptchaConfig();\n\n $map['localizationConfig'] = fn (CI $c) =>\n new LocalizationConfig();\n\n $map['tagsConfig'] = fn (CI $c) =>\n new TagsConfig(\n [\n Article::class => 'articles',\n News::class => 'news',\n ForumTopic::class => 'news',\n Event::class => 'events',\n GalleryPicture::class => 'gallery',\n ComicSeries::class => 'comics',\n Comic::class => 'comics',\n ComicStandalone::class => 'comics',\n Video::class => 'videos',\n Stream::class => 'streams',\n ]\n );\n\n $map['renderer'] = fn (CI $c) =>\n new Renderer(\n $c->view\n );\n\n $map['linker'] = fn (CI $c) =>\n new Linker(\n $c->settingsProvider,\n $c->router,\n $c->gallery,\n $c->tagsConfig\n );\n\n $map['bbContainerConfig'] = fn (CI $c) =>\n new BBContainerConfig();\n\n $map['tagLinkMapper'] = fn (CI $c) =>\n new TagLinkMapper(\n $c->renderer,\n $c->linker\n );\n\n $map['articleLinkMapper'] = fn (CI $c) =>\n new ArticleLinkMapper(\n $c->articleRepository,\n $c->tagRepository,\n $c->renderer,\n $c->linker,\n $c->tagLinkMapper\n );\n\n $map['eventLinkMapper'] = fn (CI $c) =>\n new EventLinkMapper(\n $c->renderer,\n $c->linker\n );\n\n $map['streamLinkMapper'] = fn (CI $c) =>\n new StreamLinkMapper(\n $c->renderer,\n $c->linker\n );\n\n $map['videoLinkMapper'] = fn (CI $c) =>\n new VideoLinkMapper(\n $c->renderer,\n $c->linker\n );\n\n $map['hsCardLinkMapper'] = fn (CI $c) =>\n new HsCardLinkMapper(\n $c->renderer,\n $c->linker\n );\n\n $map['coordsLinkMapper'] = fn (CI $c) =>\n new CoordsLinkMapper(\n $c->locationRepository,\n $c->renderer,\n $c->linker\n );\n\n $map['galleryLinkMapper'] = fn (CI $c) =>\n new GalleryLinkMapper(\n $c->settingsProvider,\n $c->galleryPictureRepository,\n $c->renderer,\n $c->linker\n );\n\n $map['itemLinkMapper'] = fn (CI $c) =>\n new ItemLinkMapper(\n $c->recipeRepository,\n $c->renderer,\n $c->linker\n );\n\n $map['spellLinkMapper'] = fn (CI $c) =>\n new SpellLinkMapper(\n $c->recipeRepository,\n $c->renderer,\n $c->linker\n );\n\n $map['genericLinkMapper'] = fn (CI $c) =>\n new GenericLinkMapper(\n $c->renderer,\n $c->linker\n );\n\n $map['newsLinkMapper'] = fn (CI $c) =>\n new NewsLinkMapper(\n $c->renderer,\n $c->linker\n );\n\n $map['doubleBracketsConfig'] = function (CI $c) {\n $config = new LinkMapperSource();\n\n $config->setDefaultMapper($c->articleLinkMapper);\n \n $config->registerTaggedMappers(\n [\n $c->newsLinkMapper,\n $c->eventLinkMapper,\n $c->streamLinkMapper,\n $c->videoLinkMapper,\n $c->hsCardLinkMapper,\n $c->coordsLinkMapper,\n $c->galleryLinkMapper,\n $c->itemLinkMapper,\n $c->spellLinkMapper,\n $c->tagLinkMapper,\n ]\n );\n\n $config->setGenericMapper($c->genericLinkMapper);\n\n return $config;\n };\n\n $map['newsParser'] = fn (CI $c) =>\n new NewsParser(\n $c->settingsProvider,\n $c->renderer,\n $c->linker\n );\n\n $map['forumParser'] = fn (CI $c) =>\n new ForumParser();\n\n // services\n\n $map['comicService'] = fn (CI $c) =>\n new ComicService(\n $c->comicIssueRepository,\n $c->comicSeriesRepository,\n $c->comicStandaloneRepository\n );\n\n $map['forumService'] = fn (CI $c) =>\n new ForumService(\n $c->gameRepository\n );\n\n $map['galleryPictureService'] = fn (CI $c) =>\n new GalleryPictureService(\n $c->gallery\n );\n\n $map['galleryService'] = function (CI $c) {\n return new GalleryService(\n $c->galleryAuthorRepository,\n $c->galleryPictureRepository,\n $c->config\n );\n };\n\n $map['gameService'] = fn (CI $c) =>\n new GameService(\n $c->gameRepository,\n $c->config\n );\n\n $map['itemService'] = fn (CI $c) =>\n new ItemService(\n $c->itemRepository,\n $c->linker,\n $c->logger\n );\n\n $map['newsAggregatorService'] = function (CI $c) {\n $service = new NewsAggregatorService(\n $c->linker\n );\n\n $service->registerStrictSource($c->newsRepository);\n $service->registerStrictSource($c->forumTopicRepository);\n\n $service->registerSource($c->articleRepository);\n $service->registerSource($c->eventRepository);\n $service->registerSource($c->videoRepository);\n\n return $service;\n };\n\n $map['recipeService'] = fn (CI $c) =>\n new RecipeService(\n $c->config,\n $c->linker\n );\n\n $map['searchService'] = fn (CI $c) =>\n new SearchService(\n $c->articleRepository,\n $c->eventRepository,\n $c->newsRepository,\n $c->tagRepository,\n $c->linker\n );\n\n $map['sidebarPartsProviderService'] = fn (CI $c) =>\n new SidebarPartsProviderService(\n $c->settingsProvider,\n $c->articleRepository,\n $c->eventRepository,\n $c->galleryPictureRepository,\n $c->newsAggregatorService,\n $c->streamService\n );\n\n $map['streamService'] = fn (CI $c) =>\n new StreamService(\n $c->streamRepository,\n $c->config,\n $c->cases\n );\n\n $map['streamStatService'] = fn (CI $c) =>\n new StreamStatService(\n $c->gameRepository,\n $c->streamStatRepository,\n $c->gameService,\n $c->config\n );\n\n $map['tagPartsProviderService'] = fn (CI $c) =>\n new TagPartsProviderService(\n $c->articleRepository,\n $c->eventRepository,\n $c->galleryPictureRepository,\n $c->videoRepository,\n $c->comicService,\n $c->newsAggregatorService,\n $c->streamService\n );\n\n $map['twitterService'] = fn (CI $c) =>\n new TwitterService(\n $c->linker\n );\n\n $map['updateStreamsJobFactory'] = fn (CI $c) =>\n new UpdateStreamsJobFactory(\n $c->settingsProvider,\n $c->cache,\n $c->linker,\n $c->twitch,\n $c->telegram,\n $c->logger,\n $c->streamRepository,\n $c->streamStatRepository,\n $c->streamStatService\n );\n\n // handlers\n\n $map['notFoundHandler'] = fn (CI $c) =>\n new NotFoundHandler(\n $c\n );\n\n return $map;\n }", "title": "" }, { "docid": "6735f444f15c9c04f9051c598e641263", "score": "0.53455764", "text": "public static function updateMapping()\n\t{\n\t\t$db = static::getDb();\n\t\t$command = $db->createCommand();\n\t\t$command->setMapping(static::index(), static::type(), static::mapping());\n\t}", "title": "" }, { "docid": "a36322439ef227ac796b3f59e3059b31", "score": "0.5339746", "text": "public function generateEntityFile(EntityClass $entityClass)\r\n {\r\n $entityPath = $this->getEntityFilePath($entityClass->getTechnicalName());\r\n\r\n //Create entity code\r\n $entityGenerator = $this->initEntityGenerator($entityClass);\r\n $class = $this->initClassMetadataInfo($entityClass);\r\n $entityCode = $entityGenerator->generateEntityClass($class);\r\n \r\n //Create entity file\r\n $this->filesystem->mkdir(dirname($entityPath));\r\n file_put_contents($entityPath, $entityCode);\r\n }", "title": "" }, { "docid": "5a07eeb50b66365b1e6899515eeab7a7", "score": "0.5293305", "text": "protected function translateEntity($entityMap) {\n // Bundle is required, we add field_name in for field collections. Entities\n // that don't need this field will ignore it.\n $entity = $this->createEntity($entityMap['entity'], $entityMap['bundle']);\n\n // Explicitly set the uid if it is defined.\n if (!$entity->uid) {\n if (!empty($entityMap['uid'])) {\n $entity->uid = $entityMap['uid'];\n }\n else {\n $entity->uid = 1;\n }\n }\n\n foreach ($entityMap['values'] as $key => $info) {\n // This is for properties like status, sticky, published etc.\n if (!is_array($info)) {\n $entity->{$key} = $info;\n continue;\n }\n\n switch ($info['type']) {\n case 'entity':\n $field_entity = $this->translateEntity($info);\n $field_entity->setHostEntity($entityMap['entity'], $entity);\n $field_entity->save();\n break;\n case 'file':\n $file = $this->uploadFileField($info['value']);\n $file['alt'] = isset($info['alt']) ? $info['alt'] : NULL;\n $file['title'] = isset($info['title']) ? $info['title'] : NULL;\n $entity->{$key}[LANGUAGE_NONE][] = $file;\n break;\n case 'link':\n foreach ($info['value'] as $item) {\n $entity->{$key}[LANGUAGE_NONE][] = $item;\n }\n break;\n case 'date':\n $field = field_info_field($key);\n $timezone = date_get_timezone($field['settings']['tz_handling'], $timezone);\n $timezone_db = date_get_timezone_db($field['settings']['tz_handling']);\n foreach ($info['value'] as $item) {\n $entity->{$key}[LANGUAGE_NONE][] = array(\n 'value' => strtotime($item),\n 'timezone' => $timezone,\n 'timezone_db' => $timezone_db,\n 'date_type' => 'datestamp',\n );\n }\n break;\n case 'tag':\n foreach ($info['value'] as $item) {\n $this->addTag($entity, $key, $item);\n }\n break;\n case 'entity_reference':\n foreach ($info['value'] as $item) {\n $this->addEntityReference($entity, $key, $item);\n }\n break;\n case 'term':\n foreach ($info['value'] as $item) {\n $this->addTermAssoc($entity, $key, $item);\n }\n break;\n case 'metatag':\n foreach ($info['value'] as $name => $item) {\n $entity->{$key}[LANGUAGE_NONE][$name]['value'] = $item;\n }\n break;\n case 'address':\n foreach ($info['value'] as $name => $item) {\n $entity->{$key}[LANGUAGE_NONE][0][$name] = $item;\n }\n break;\n case 'attribute':\n $entity->{$key} = $info['value'];\n case 'path':\n $entity->path = array(\n 'pathauto' => 0,\n 'alias' => $info['value'],\n 'language' => LANGUAGE_NONE,\n );\n break;\n case 'commerce_price':\n if (gettype($info['value']) != 'array') {\n $info['value'] = array($info['value']);\n }\n foreach ($info['value'] as $value) {\n $entity->{$key}[LANGUAGE_NONE][] = array(\n 'amount' => $value * 100,\n 'currency_code' => 'USD',\n );\n }\n break;\n case 'interval':\n foreach ($info['value'] as $name => $item) {\n $entity->{$key}[LANGUAGE_NONE][0][$name] = $item;\n }\n break;\n case 'youtube':\n $entity->{$key}[LANGUAGE_NONE][] = array(\n 'input' => 'https://www.youtube.com/watch?v=' . $info['value'],\n 'video_id' => $info['value'],\n );\n break;\n default:\n if (gettype($info['value']) != 'array') {\n $info['value'] = array($info['value']);\n }\n\n // If a field has a default value set $entity->{$key} will already be\n // set and have a value, so doing [] will actually put your imported\n // value as the second value on the field. Since we are importing\n // this specific field it's safe to just blow away the default.\n $entity->{$key}[LANGUAGE_NONE] = array();\n\n $text_format = isset($info['format']) ? $info['format'] : NULL;\n foreach ($info['value'] as $value) {\n $field_info = array();\n $field_info['value'] = $value;\n if (!is_null($text_format)) {\n $field_info['format'] = $text_format;\n }\n // If this is a body field make sure we capture the summary.\n if (isset($info['summary'])) {\n $field_info['summary'] = $info['summary'];\n }\n $entity->{$key}[LANGUAGE_NONE][] = $field_info;\n }\n }\n }\n\n // Add support for path handling.\n if ($entityMap['entity'] == 'node' && isset($entityMap['path'])) {\n $entity->path['pathauto'] = FALSE;\n }\n // Allow version specific alterations\n if (function_exists('tag_entitybuild_alter')) {\n tag_entitybuild_alter($entity);\n }\n return $entity;\n }", "title": "" }, { "docid": "90bcf0c69a75e2b0eac03ae4cee6985e", "score": "0.5281799", "text": "public function mapFor()\n {\n return Empleado::class;\n }", "title": "" }, { "docid": "4d95ead260a3e8de29a560dfa25c979c", "score": "0.52817863", "text": "public function generateEntryClass(ModelTable $modelTable, CodeGenerator $generator, CodeClass $class) {\n\n }", "title": "" }, { "docid": "00e223caaaaac3d0f3408f7a2af71af4", "score": "0.52590454", "text": "public function getEntityMap()\n {\n return $this->entityMap;\n }", "title": "" }, { "docid": "d06c687d65c617c80d2bae6bc7a78c18", "score": "0.525237", "text": "public function classMap(?string $classname);", "title": "" }, { "docid": "222d181a81c134ecfbce29acf3fc0020", "score": "0.52452755", "text": "public function getMapping()\n {\n return $this->mapping;\n }", "title": "" }, { "docid": "222d181a81c134ecfbce29acf3fc0020", "score": "0.52452755", "text": "public function getMapping()\n {\n return $this->mapping;\n }", "title": "" }, { "docid": "222d181a81c134ecfbce29acf3fc0020", "score": "0.52452755", "text": "public function getMapping()\n {\n return $this->mapping;\n }", "title": "" }, { "docid": "3f3a864b98e07d628f5888279febaeb6", "score": "0.52398837", "text": "public function getMappingAlias();", "title": "" }, { "docid": "b240a6f3194429fd0f16a83d9c87f0f0", "score": "0.5230123", "text": "protected function buildMap(\\ReflectionClass $reflection)\n {\n $map = array();\n $class = $reflection->getName();\n\n $map[$class] = array();\n if ($this->filter) {\n $properties = $reflection->getProperties($this->filter);\n } else {\n $properties = $reflection->getProperties();\n }\n\n foreach ($properties as $property) {\n $map[$class][] = $property->getName();\n }\n\n return $map;\n }", "title": "" }, { "docid": "609df9a787ec7a0fc0c1a23496ac364a", "score": "0.5221644", "text": "abstract protected static function entityCls();", "title": "" }, { "docid": "394fea99084b5c62e0d8b055a069b65a", "score": "0.52167565", "text": "public static function addEntityByClass($entityClass){\n\t\t$sourceName = Utils::uncamelize($entityClass);\n\t\tself::_initializeModel($entityClass, $sourceName);\n\t}", "title": "" }, { "docid": "abd8a8b9d06d5ddbd87243438923377b", "score": "0.52132744", "text": "protected abstract function setMapping(): void;", "title": "" }, { "docid": "a888a4ad0d687c7287c63e11987e7f5b", "score": "0.52127326", "text": "private function setUpGeneratedHydrators(string... $entityClasses): void\n {\n $r = new \\ReflectionProperty(Mapper::class, 'hydrator');\n $r->setAccessible(true);\n\n foreach ($entityClasses as $entityClass) {\n $hydrator = $this->createGeneratedHydrator($entityClass);\n $r->setValue(Prime::service()->repository($entityClass)->mapper(), $hydrator);\n }\n }", "title": "" }, { "docid": "a96058e74460d33c6804cb458df4c8b2", "score": "0.5203612", "text": "protected function generateEntityClassDeclaration(ClassType $class): void\n {\n $class->addComment($class->getName());\n\n if ($this->classToExtend) {\n $class->setExtends($this->classToExtend);\n }\n\n foreach ($this->interfaces as $interface) {\n $class->addImplement($interface);\n }\n\n $class->setTraits($this->traits);\n }", "title": "" }, { "docid": "1d282cf50bb22511610a0cb450b97d24", "score": "0.5197182", "text": "private function init_mapping() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/blocks/rlip/importplugins/version1elis/lib.php');\n\n foreach ($this->mapping as $standardfieldname => $customfieldname) {\n $mapping = new stdClass;\n $mapping->entitytype = 'course';\n $mapping->standardfieldname = $standardfieldname;\n $mapping->customfieldname = $customfieldname;\n\n $DB->insert_record(RLIPIMPORT_VERSION1ELIS_MAPPING_TABLE, $mapping);\n }\n }", "title": "" }, { "docid": "c58acdcd94c8eb291a04bb493b3f9463", "score": "0.51845986", "text": "final private function getDataMapperByEnityClass(string $entityClass)\n {\n $entityInterfaces = class_implements($entity);\n if ($entityInterfaces) {\n $continue = true;\n $dataMapperPosition = null;\n for ($i = 0; $i < count($dataMappers) && $continue; $i++) {\n if (in_array($dataMappers[$i]->getEntityInterface(), $entityInterfaces)) {\n $continue = false;\n $dataMapperPosition = $i;\n }\n }\n if ($dataMapperPosition) {\n return $dataMappers[$dataMapperPosition];\n }\n throw new \\InvalidArgumentException(sprintf('No Data Mapper Found For Entity `%s`', get_class($entity)));\n } else {\n throw new \\InvalidArgumentException(sprintf('No Entity Interface Found For Data Mapper To Work Properly `%s`', get_class($entity)));\n }\n }", "title": "" }, { "docid": "a63aeb9cb6c9419c38e097b92b00e39c", "score": "0.51819694", "text": "public function initializeFieldMappings()\n {\n }", "title": "" }, { "docid": "d75690f3ebe46a5cc0173d9634a3e092", "score": "0.5178353", "text": "abstract protected function getMapper();", "title": "" }, { "docid": "45979bdbeb5918c76cebc9bf24dc813f", "score": "0.5171645", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Entity\\IntegerField('ID', array(\n\t\t\t\t'title' => 'ID',\n\t\t\t\t'primary' => true\n\t\t\t)),\n\t\t\t'ENTITY_ID' => new Entity\\IntegerField('ENTITY_ID', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_RIGHT_ENTITY_ID'),\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'ENTITY_TYPE' => new Entity\\StringField('ENTITY_TYPE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_RIGHT_ENTITY_TYPE'),\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'TASK_ID' => new Entity\\IntegerField('TASK_ID', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_RIGHT_TASK_ID'),\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'ACCESS_CODE' => new Entity\\StringField('ACCESS_CODE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_RIGHT_ACCESS_CODE'),\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateAccessCode')\n\t\t\t)),\n\t\t\t'ROLE_ID' => new Entity\\IntegerField('ROLE_ID', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_TABLE_FIELD_BY_ROLE_ID'),\n\t\t\t\t'default_value' => 0\n\t\t\t)),\n\t\t\t'ROLE' => new Entity\\ReferenceField(\n\t\t\t\t'ROLE',\n\t\t\t\t'\\Bitrix\\Landing\\Internals\\RoleTable',\n\t\t\t\tarray('=this.ROLE_ID' => 'ref.ID')\n\t\t\t),\n\t\t\t'USER_ACCESS' => new Entity\\ReferenceField(\n\t\t\t\t'USER_ACCESS',\n\t\t\t\t'\\Bitrix\\Main\\UserAccessTable',\n\t\t\t\tarray('=this.ACCESS_CODE' => 'ref.ACCESS_CODE')\n\t\t\t),\n\t\t\t'TASK_OPERATION' => new Entity\\ReferenceField(\n\t\t\t\t'TASK_OPERATION',\n\t\t\t\t'\\Bitrix\\Main\\TaskOperationTable',\n\t\t\t\tarray('=this.TASK_ID' => 'ref.TASK_ID')\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "b5b9442dab6f357683db52981c70d1b2", "score": "0.51594204", "text": "final public static function classMap()\n {\n return array (\n// 'Content' => 'Postup_StructContent',\n// 'CustomField' => 'Postup_StructCustomField',\n// 'DetailedMailingReport' => 'Postup_StructDetailedMailingReport',\n// 'EmailContent' => 'Postup_StructEmailContent',\n// 'FTPLocation' => 'Postup_StructFTPLocation',\n// 'FacebookContent' => 'Postup_StructFacebookContent',\n// 'HTTPLocation' => 'Postup_StructHTTPLocation',\n// 'IdAndTitle' => 'Postup_StructIdAndTitle',\n// 'ImportTemplate' => 'Postup_StructImportTemplate',\n// 'ImportTemplateOptions' => 'Postup_StructImportTemplateOptions',\n// 'LinkReport' => 'Postup_StructLinkReport',\n 'List' => 'Demand\\Postup\\Struct\\ListStruct',\n// 'ListSubscription' => 'Postup_StructListSubscription',\n// 'Mailing' => 'Postup_StructMailing',\n// 'MailingPartReport' => 'Postup_StructMailingPartReport',\n// 'MailingReport' => 'Postup_StructMailingReport',\n// 'RecipField' => 'Postup_StructRecipField',\n 'Recipient' => 'Demand\\Postup\\Struct\\Recipient',\n// 'RecipientData' => 'Postup_StructRecipientData',\n// 'SMSContent' => 'Postup_StructSMSContent',\n// 'SendTemplateBean' => 'Postup_StructSendTemplateBean',\n// 'SubscriptionInfo' => 'Postup_StructSubscriptionInfo',\n// 'SummaryCampaignReport' => 'Postup_StructSummaryCampaignReport',\n// 'SummaryMailingReport' => 'Postup_StructSummaryMailingReport',\n// 'authentication' => 'Postup_StructAuthentication',\n );\n }", "title": "" }, { "docid": "d6ee4da6de38ec0f5f439c44e41b0044", "score": "0.51541317", "text": "public function generateEntityClass(ClassMetadataInfo $metadata)\n {\n $placeHolders = array(\n '<namespace>',\n '<entityAnnotation>',\n '<entityClassName>',\n '<entityBody>'\n );\n\n $replacements = array(\n $this->generateEntityNamespace($metadata),\n $this->generateEntityDocBlock($metadata),\n $this->generateEntityClassName($metadata),\n $this->generateEntityBody($metadata)\n );\n\n $code = str_replace($placeHolders, $replacements, static::$classTemplate);\n\n return str_replace('<spaces>', $this->spaces, $code);\n }", "title": "" }, { "docid": "ce3536361d24a207939da1bdbed5ee6c", "score": "0.5146506", "text": "public function put_mapping() {\n\t\t$mapping = array(\n\t\t\t'settings' => array(\n\t\t\t\t'index' => array(\n\t\t\t\t\t'number_of_shards' => (int) apply_filters( 'ep_default_index_number_of_shards', 5 ), // Default within Elasticsearch\n\t\t\t\t\t'number_of_replicas' => (int) apply_filters( 'ep_default_index_number_of_replicas', 1 ), // Default within Elasticsearch\n\t\t\t\t),\n\t\t\t\t'analysis' => array(\n\t\t\t\t\t'analyzer' => array(\n\t\t\t\t\t\t'default' => array(\n\t\t\t\t\t\t\t'tokenizer' => 'standard',\n\t\t\t\t\t\t\t'filter' => array( 'standard', 'ewp_word_delimiter', 'lowercase', 'stop', 'ewp_snowball' ),\n\t\t\t\t\t\t\t'language' => 'English'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'shingle_analyzer' => array(\n\t\t\t\t\t\t\t'type' => 'custom',\n\t\t\t\t\t\t\t'tokenizer' => 'standard',\n\t\t\t\t\t\t\t'filter' => array( 'lowercase', 'shingle_filter' )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'filter' => array(\n\t\t\t\t\t\t'shingle_filter' => array(\n\t\t\t\t\t\t\t'type' => 'shingle',\n\t\t\t\t\t\t\t'min_shingle_size' => 2,\n\t\t\t\t\t\t\t'max_shingle_size' => 5\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'ewp_word_delimiter' => array(\n\t\t\t\t\t\t\t'type' => 'word_delimiter',\n\t\t\t\t\t\t\t'preserve_original' => true\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'ewp_snowball' => array(\n\t\t\t\t\t\t\t'type' => 'snowball',\n\t\t\t\t\t\t\t'language' => 'English'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'edge_ngram' => array(\n\t\t\t\t\t\t\t'side' => 'front',\n\t\t\t\t\t\t\t'max_gram' => 10,\n\t\t\t\t\t\t\t'min_gram' => 3,\n\t\t\t\t\t\t\t'type' => 'edgeNGram'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\t'mappings' => array(\n\t\t\t\t'post' => array(\n\t\t\t\t\t\"date_detection\" => false,\n\t\t\t\t\t\"dynamic_templates\" => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"template_meta\" => array(\n\t\t\t\t\t\t\t\t\"path_match\" => \"post_meta.*\",\n\t\t\t\t\t\t\t\t\"mapping\" => array(\n\t\t\t\t\t\t\t\t\t\"type\" => \"multi_field\",\n\t\t\t\t\t\t\t\t\t\"path\" => \"full\",\n\t\t\t\t\t\t\t\t\t\"fields\" => array(\n\t\t\t\t\t\t\t\t\t\t\"{name}\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\"type\" => \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\"index\" => \"analyzed\"\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\"raw\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\"type\" => \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\"index\" => \"not_analyzed\",\n\t\t\t\t\t\t\t\t\t\t\t'include_in_all' => false\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"template_terms\" => array(\n\t\t\t\t\t\t\t\t\"path_match\" => \"terms.*\",\n\t\t\t\t\t\t\t\t\"mapping\" => array(\n\t\t\t\t\t\t\t\t\t\"type\" => \"object\",\n\t\t\t\t\t\t\t\t\t\"path\" => \"full\",\n\t\t\t\t\t\t\t\t\t\"properties\" => array(\n\t\t\t\t\t\t\t\t\t\t\"name\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\"type\" => \"string\"\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\"term_id\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\"type\" => \"long\"\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\"parent\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\"type\" => \"long\"\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\"slug\" => array(\n\t\t\t\t\t\t\t\t\t\t\t\"type\" => \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\"index\" => \"not_analyzed\"\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\"term_suggest\" => array(\n\t\t\t\t\t\t\t\t\"path_match\" => \"term_suggest_*\",\n\t\t\t\t\t\t\t\t\"mapping\" => array(\n\t\t\t\t\t\t\t\t\t\"type\" => \"completion\",\n\t\t\t\t\t\t\t\t\t\"analyzer\" => \"default\",\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\"_all\" => array(\n\t\t\t\t\t\t\"analyzer\" => \"simple\"\n\t\t\t\t\t),\n\t\t\t\t\t'properties' => array(\n\t\t\t\t\t\t'post_id' => array(\n\t\t\t\t\t\t\t'type' => 'long',\n\t\t\t\t\t\t\t'index' => 'not_analyzed',\n\t\t\t\t\t\t\t'include_in_all' => false\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'post_author' => array(\n\t\t\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t\t\t'path' => 'full',\n\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t'display_name' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t\t'analyzer' => 'standard',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'login' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t\t'analyzer' => 'standard',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'long',\n\t\t\t\t\t\t\t\t\t'index' => 'not_analyzed'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'raw' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t\t'index' => 'not_analyzed',\n\t\t\t\t\t\t\t\t\t'include_in_all' => false\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'post_date' => array(\n\t\t\t\t\t\t\t'type' => 'date',\n\t\t\t\t\t\t\t'format' => 'YYYY-MM-dd HH:mm:ss',\n\t\t\t\t\t\t\t'include_in_all' => false\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'post_date_gmt' => array(\n\t\t\t\t\t\t\t'type' => 'date',\n\t\t\t\t\t\t\t'format' => 'YYYY-MM-dd HH:mm:ss',\n\t\t\t\t\t\t\t'include_in_all' => false\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'post_title' => array(\n\t\t\t\t\t\t\t'type' => 'multi_field',\n\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t'post_title' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t\t'analyzer' => 'standard',\n\t\t\t\t\t\t\t\t\t'store' => 'yes'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'raw' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t\t'index' => 'not_analyzed',\n\t\t\t\t\t\t\t\t\t'include_in_all' => false\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'post_excerpt' => array(\n\t\t\t\t\t\t\t'type' => 'string'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'post_content' => array(\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'analyzer' => 'default'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'post_status' => array(\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'index' => 'no'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'post_name' => array(\n\t\t\t\t\t\t\t'type' => 'multi_field',\n\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t'post_name' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'string'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'raw' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t\t'index' => 'not_analyzed',\n\t\t\t\t\t\t\t\t\t'include_in_all' => false\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'post_modified' => array(\n\t\t\t\t\t\t\t'type' => 'date',\n\t\t\t\t\t\t\t'format' => 'YYYY-MM-dd HH:mm:ss',\n\t\t\t\t\t\t\t'include_in_all' => false\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'post_modified_gmt' => array(\n\t\t\t\t\t\t\t'type' => 'date',\n\t\t\t\t\t\t\t'format' => 'YYYY-MM-dd HH:mm:ss',\n\t\t\t\t\t\t\t'include_in_all' => false\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'post_parent' => array(\n\t\t\t\t\t\t\t'type' => 'long',\n\t\t\t\t\t\t\t'index' => 'not_analyzed',\n\t\t\t\t\t\t\t'include_in_all' => false\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'post_type' => array(\n\t\t\t\t\t\t\t'type' => 'multi_field',\n\t\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t\t'post_type' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'string'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'raw' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t\t'index' => 'not_analyzed',\n\t\t\t\t\t\t\t\t\t'include_in_all' => false\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'post_mime_type' => array(\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t'index' => 'not_analyzed',\n\t\t\t\t\t\t\t'include_in_all' => false\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'permalink' => array(\n\t\t\t\t\t\t\t'type' => 'string'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'terms' => array(\n\t\t\t\t\t\t\t\"type\" => \"object\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'post_meta' => array(\n\t\t\t\t\t\t\t'type' => 'object'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t$mapping = apply_filters( 'ep_config_mapping', $mapping );\n\n\t\t$index_url = ep_get_index_url();\n\n\t\t$request = wp_remote_request( $index_url, array( 'body' => json_encode( $mapping ), 'method' => 'PUT' ) );\n\n\t\tif ( ! is_wp_error( $request ) && 200 === wp_remote_retrieve_response_code( $request ) ) {\n\t\t\t$response_body = wp_remote_retrieve_body( $request );\n\n\t\t\treturn json_decode( $response_body );\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "c689cd1569ce6515ff7af2085f552990", "score": "0.51338196", "text": "public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew Main\\Entity\\IntegerField('ID', [\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\IntegerField('TEMPLATE_ID'),\n\t\t\tnew Main\\Entity\\StringField('TITLE'),\n\t\t\tnew Main\\Entity\\StringField('PLACEHOLDER', [\n\t\t\t\t'required' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\StringField('PROVIDER', [\n\t\t\t\t'validation' => function()\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\tfunction($value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(DataProviderManager::checkProviderName($value) || empty($value))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn 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{\n\t\t\t\t\t\t\t\treturn Loc::getMessage('DOCUMENTGENERATOR_MODEL_FIELD_CLASS_VALIDATION', ['#CLASSNAME#' => $value, '#PARENT#' => DataProvider::class]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t]),\n\t\t\tnew Main\\Entity\\StringField('PROVIDER_NAME'),\n\t\t\tnew Main\\Entity\\StringField('VALUE'),\n\t\t\tnew Main\\Entity\\BooleanField('REQUIRED', [\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'default_value' => 'N',\n\t\t\t]),\n\t\t\tnew Main\\Entity\\BooleanField('HIDE_ROW', [\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'default_value' => 'N',\n\t\t\t]),\n\t\t\tnew Main\\Entity\\StringField('TYPE'),\n\t\t\tnew Main\\Entity\\DatetimeField('CREATE_TIME', [\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => function(){return new Main\\Type\\DateTime();},\n\t\t\t]),\n\t\t\tnew Main\\Entity\\DatetimeField('UPDATE_TIME'),\n\t\t\tnew Main\\Entity\\IntegerField('CREATED_BY'),\n\t\t\tnew Main\\Entity\\IntegerField('UPDATED_BY'),\n\t\t];\n\t}", "title": "" }, { "docid": "62e65f4d8c9a015457933dcaed783b3a", "score": "0.5132085", "text": "public static function getMap()\n {\n return array(\n new Entity\\IntegerField('ID', array(\n 'primary' => true,\n 'autocomplete' => true,\n )),\n new Entity\\TextField('NAME'),\n new Entity\\TextField('TABLE_NAME'),\n );\n }", "title": "" }, { "docid": "b064846272a2fb49f6a3ab1dba341866", "score": "0.51215905", "text": "public abstract function getMapper();", "title": "" }, { "docid": "5d9db1ab7485d39d9f81fb409c2fc647", "score": "0.51123977", "text": "protected function initDefaultFieldMapping()\n {\n $table = $this->eqlQuery->getTableMapping();\n foreach ($table->getColumns() as $column) {\n $fieldName = $column->getEntityFieldName();\n $this->mapField($fieldName, '{' . $fieldName . '}', $this->getParamType($column->getDataType()));\n }\n }", "title": "" }, { "docid": "dc1ffc656c98a8e1e20d7433c6f3d87f", "score": "0.51075137", "text": "public function addCustomFieldMapping() {\n }", "title": "" }, { "docid": "f980bf7e4238b79ce7ea634580dcf78e", "score": "0.51047784", "text": "public function getMapping()\n\t{\n\t\treturn $this->mapping;\n\t}", "title": "" }, { "docid": "6bdaf288e5ea129e462ccec0d4391da5", "score": "0.509633", "text": "public function generateUpdatedEntityClass(Mapper $mapper, string $filename): string\n {\n $this->mapperInfo = $mapper->info();\n\n $currentCode = file_get_contents($filename);\n $file = PhpFile::fromCode($currentCode);\n\n $namespace = null;\n $class = null;\n\n foreach ($file->getNamespaces() as $foundNs) {\n foreach ($foundNs->getClasses() as $foundClass) {\n if ($this->mapperInfo->className() === $foundNs->getName() . '\\\\' . $foundClass->getName()) {\n $namespace = $foundNs;\n $class = $foundClass;\n break;\n }\n }\n }\n\n if (!$namespace || !$class) {\n throw new \\InvalidArgumentException('The file do not contains class definition of ' . $this->mapperInfo->className());\n }\n\n $this->generateEntityBody(new EntityClassGenerator($class, $namespace));\n\n return (new ConfigurableEntityPrinter($this))\n ->printFile($file);\n }", "title": "" }, { "docid": "b8caf9aa30f3ebcfe32d95cfb49124a5", "score": "0.50925916", "text": "public function test_mapping_applied_during_class_create() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/course/lib.php');\n require_once($CFG->dirroot.'/elis/core/lib/data/customfield.class.php');\n require_once($CFG->dirroot.'/elis/program/accesslib.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/classmoodlecourse.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/curriculum.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/track.class.php');\n\n $this->init_mapping();\n\n $customfieldid = $this->create_custom_field(CONTEXT_ELIS_CLASS);\n\n $pmcourse = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => ''\n ));\n $pmcourse->save();\n\n $program = new curriculum(array('idnumber' => 'testprogramidnumber'));\n $program->save();\n\n $track = new track(array('curid' => $program->id, 'idnumber' => 'testtrackidnumber'));\n $track->save();\n\n $category = new stdClass;\n $category->name = 'testcategoryname';\n $category->id = $DB->insert_record('course_categories', $category);\n\n $course = new stdClass;\n $course->category = $category->id;\n $course->shortname = 'testcourseshortname';\n $course->fullname = 'testcoursefullname';\n $course = create_course($course);\n\n // Run the class create action.\n $record = new stdClass;\n $record->customaction = 'create';\n $record->customcontext = 'class';\n $record->customidnumber = 'testclassidnumber';\n $record->customstartdate = 'Jan/01/2012';\n $record->customenddate = 'Jan/01/2012';\n $record->customstarttimehour = '1';\n $record->customstarttimeminute = '5';\n $record->customendtimehour = '1';\n $record->customendtimeminute = '5';\n $record->custommaxstudents = '1';\n $record->customenrol_from_waitlist = '1';\n $record->customassignment = 'testcourseidnumber';\n $record->customtrack = 'testtrackidnumber';\n $record->customautoenrol = '1';\n $record->customlink = 'testcourseshortname';\n $record->customtestfieldshortname = '1';\n\n $class = new pmclass();\n $class->reset_custom_field_list();\n\n $this->run_pmentity_import((array)$record);\n\n // Validation.\n $data = array(\n 'courseid' => $pmcourse->id,\n 'idnumber' => 'testclassidnumber',\n 'startdate' => rlip_timestamp(0, 0, 0, 1, 1, 2012),\n 'enddate' => rlip_timestamp(0, 0, 0, 1, 1, 2012),\n 'starttimehour' => 1,\n 'starttimeminute' => 5,\n 'endtimehour' => 1,\n 'endtimeminute' => 5,\n 'maxstudents' => 1,\n 'enrol_from_waitlist' => 1\n );\n $this->assertTrue($DB->record_exists(pmclass::TABLE, $data));\n\n $record = $DB->get_record(pmclass::TABLE, array('idnumber' => 'testclassidnumber'));\n $this->assertTrue($DB->record_exists(trackassignment::TABLE, array(\n 'classid' => $record->id,\n 'trackid' => $track->id,\n 'autoenrol' => 1\n )));\n $this->assertTrue($DB->record_exists(classmoodlecourse::TABLE, array(\n 'classid' => $record->id,\n 'moodlecourseid' => $course->id\n )));\n\n $instance = context_elis_class::instance(1);\n\n $this->assertTrue($DB->record_exists(field_data_int::TABLE, array(\n 'fieldid' => $customfieldid,\n 'contextid' => $instance->id,\n 'data' => 1\n )));\n }", "title": "" }, { "docid": "94a76ee0047b6fb5c5c8f2f90dda6324", "score": "0.5083453", "text": "protected function customMapToEntity($result, $entity) {\n\t\treturn $entity;\n\t}", "title": "" }, { "docid": "b5a2d9575bb29e638591d52e34ebc3bc", "score": "0.506731", "text": "public static function getMap()\n\t{\n\t\t$id = new Fields\\IntegerField('ID');\n\t\t$id->configurePrimary(true);\n\t\t$id->configureAutocomplete(true);\n\n\t\t$entityId = new Fields\\IntegerField('ENTITY_ID');\n\n\t\t$typeId = new Fields\\IntegerField('TYPE_ID');\n\n\t\t$epicId = new Fields\\IntegerField('EPIC_ID');\n\n\t\t$active = new Fields\\StringField('ACTIVE');\n\t\t$active->addValidator(new Validators\\LengthValidator(1, 1));\n\t\t$active->configureDefaultValue('Y');\n\n\t\t$name = new Fields\\StringField('NAME');\n\t\t$name->addValidator(new Validators\\LengthValidator(null, 255));\n\n\t\t$description = new Fields\\TextField('DESCRIPTION');\n\n\t\t$sort = new Fields\\IntegerField('SORT');\n\t\t$sort->configureDefaultValue(0);\n\n\t\t$createdBy = new Fields\\IntegerField('CREATED_BY');\n\n\t\t$modifiedBy = new Fields\\IntegerField('MODIFIED_BY');\n\n\t\t$storyPoints = new Fields\\StringField('STORY_POINTS');\n\n\t\t$sourceId = new Fields\\IntegerField('SOURCE_ID');\n\n\t\t$info = new Fields\\ObjectField('INFO');\n\t\t$info->configureRequired(false);\n\t\t$info->configureObjectClass(ItemInfo::class);\n\t\t$info->configureSerializeCallback(function (?ItemInfo $itemInfo)\n\t\t{\n\t\t\treturn $itemInfo ? Json::encode($itemInfo->getInfoData()) : [];\n\t\t});\n\t\t$info->configureUnserializeCallback(function ($value)\n\t\t{\n\t\t\t$data = (is_string($value) && !empty($value) ? Json::decode($value) : []);\n\n\t\t\t$itemInfo = new ItemInfo();\n\t\t\t$itemInfo->setInfoData($data);\n\n\t\t\treturn $itemInfo;\n\t\t});\n\n\t\t$entity = new Reference('ENTITY', EntityTable::class, Join::on('this.ENTITY_ID', 'ref.ID'));\n\t\t$entity->configureJoinType(Join::TYPE_LEFT);\n\n\t\t$type = new Reference('TYPE', TypeTable::class, Join::on('this.TYPE_ID', 'ref.ID'));\n\t\t$type->configureJoinType(Join::TYPE_LEFT);\n\n\t\t$epic = new Reference('EPIC', EpicTable::class, Join::on('this.EPIC_ID', 'ref.ID'));\n\t\t$epic->configureJoinType(Join::TYPE_LEFT);\n\n\t\treturn [\n\t\t\t$id,\n\t\t\t$entityId,\n\t\t\t$typeId,\n\t\t\t$epicId,\n\t\t\t$active,\n\t\t\t$name,\n\t\t\t$description,\n\t\t\t$sort,\n\t\t\t$createdBy,\n\t\t\t$modifiedBy,\n\t\t\t$storyPoints,\n\t\t\t$sourceId,\n\t\t\t$info,\n\t\t\t$entity,\n\t\t\t$type,\n\t\t\t$epic,\n\t\t];\n\t}", "title": "" }, { "docid": "da4d5bcfa9c910170c182bb6e538d8be", "score": "0.5061823", "text": "public function setMapClass( $class )\n {\n $this->class = $class;\n\n return $this;\n }", "title": "" }, { "docid": "19df5c620de04a796ca174c8d8699479", "score": "0.50543857", "text": "abstract protected function getEntityClass();", "title": "" }, { "docid": "2f0e0cc21af5631420b84227a70dc44c", "score": "0.5047731", "text": "private function getDocumentReflectionMapping(\\ReflectionClass $reflectionClass)\n {\n return $this->parser->parse($reflectionClass);\n }", "title": "" }, { "docid": "33a88a3e75f7237d270d01569d220f37", "score": "0.5032047", "text": "abstract protected function getFieldMappings();", "title": "" }, { "docid": "6bc08a01dcd6f4aed0952a1b86adf698", "score": "0.50291914", "text": "public function testDenormalizeWithGivenMapping(): void\n {\n $entity = new stdClass();\n\n $registry = $this->createMock(ManagerRegistry::class);\n\n $denormalizer = new DoctrineDenormalizer(\n $this->createEntityFinder($entity),\n $registry,\n [\n 'EntityClass' => ['code' => 'code', 'skip' => 'skip']\n ]\n );\n\n $result = $denormalizer->denormalize(['code' => 'ABCDEFG'], 'EntityClass');\n\n self::assertSame($entity, $result);\n }", "title": "" }, { "docid": "d9705ca418c3c9f493ce5dca1a30ca45", "score": "0.5017075", "text": "private function __construct() {\n $this->mappings = array();\n }", "title": "" }, { "docid": "e003f695a7ce440cf91285a56ccb2fd5", "score": "0.50150263", "text": "public function getMappingTargets() {\n $targets = array(\n 'biblio_number' => array(\n 'name' => t('Biblio - Number'),\n ),\n 'biblio_other_number' => array(\n 'name' => t('Biblio - Other number'),\n ),\n 'biblio_sort_title' => array(\n 'name' => t('Biblio - Sort title'),\n 'description' => 'A normalized version of the title, used for sorting on titles. (only first 64 characters saved)',\n ),\n 'biblio_secondary_title' => array(\n 'name' => t('Biblio - Secondary title'),\n ),\n 'biblio_tertiary_title' => array(\n 'name' => t('Biblio - Tertiary title'),\n ),\n 'biblio_edition' => array(\n 'name' => t('Biblio - Edition'),\n ),\n 'biblio_publisher' => array(\n 'name' => t('Biblio - Publisher'),\n ),\n 'biblio_place_published' => array(\n 'name' => t('Biblio - Place published'),\n ),\n 'biblio_year' => array(\n 'name' => 'Biblio - Year',\n ),\n 'biblio_volume' => array(\n 'name' => t('Biblio - Volume'),\n ),\n 'biblio_pages' => array(\n 'name' => t('Biblio - Pages'),\n ),\n 'biblio_date' => array(\n 'name' => t('Biblio - Date'),\n ),\n 'biblio_isbn' => array(\n 'name' => t('Biblio - ISBN'),\n ),\n 'biblio_lang' => array(\n 'name' => t('Biblio - Language'),\n ),\n 'biblio_abst_e' => array(\n 'name' => t('Biblio - Abstract E'),\n ),\n 'biblio_abst_f' => array(\n 'name' => t('Biblio - Abstract F'),\n ),\n 'biblio_url' => array(\n 'name' => t('Biblio - Url'),\n ),\n 'biblio_issue' => array(\n 'name' => t('Biblio - Issue'),\n ),\n 'biblio_type_of_work' => array(\n 'name' => t('Biblio - Type of work'),\n ),\n 'biblio_accession_number' => array(\n 'name' => t('Biblio - Accession number'),\n ),\n 'biblio_call_number' => array(\n 'name' => t('Biblio - Call number'),\n ),\n 'biblio_notes' => array(\n 'name' => t('Biblio - Notes'),\n ),\n 'biblio_custom1' => array(\n 'name' => t('Biblio - Custom 1'),\n ),\n 'biblio_custom2' => array(\n 'name' => t('Biblio - Custom 2'),\n ),\n 'biblio_custom3' => array(\n 'name' => t('Biblio - Custom 3'),\n ),\n 'biblio_custom4' => array(\n 'name' => t('Biblio - Custom 4'),\n ),\n 'biblio_custom5' => array(\n 'name' => t('Biblio - Custom 5'),\n ),\n 'biblio_custom6' => array(\n 'name' => t('Biblio - Custom 6'),\n ),\n 'biblio_custom7' => array(\n 'name' => t('Biblio - Custom 7'),\n ),\n 'biblio_research_notes' => array(\n 'name' => t('Biblio - Research notes'),\n ),\n 'biblio_number_of_volumes' => array(\n 'name' => t('Biblio - Number of volumes'),\n ),\n 'biblio_short_title' => array(\n 'name' => t('Biblio - Short title'),\n ),\n 'biblio_alternate_title' => array(\n 'name' => t('Biblio - Alternate title'),\n ),\n 'biblio_original_publication' => array(\n 'name' => t('Biblio - Original publication'),\n ),\n 'biblio_reprint_edition' => array(\n 'name' => t('Biblio - Reprint edition'),\n ),\n 'biblio_translated_title' => array(\n 'name' => t('Biblio - Translated title'),\n ),\n 'biblio_section' => array(\n 'name' => t('Biblio - Section'),\n ),\n 'biblio_citekey' => array(\n 'name' => t('Biblio - Citekey'),\n ),\n 'biblio_coins' => array(\n 'name' => t('Biblio - COinS'),\n ),\n 'biblio_doi' => array(\n 'name' => t('Biblio - DOI'),\n ),\n 'biblio_issn' => array(\n 'name' => t('Biblio - Issn'),\n ),\n 'biblio_auth_address' => array(\n 'name' => t('Biblio - Author address'),\n ),\n 'biblio_remote_db_name' => array(\n 'name' => t('Biblio - Remote db name'),\n ),\n 'biblio_remote_db_provider' => array(\n 'name' => t('Biblio - Remote db provider'),\n ),\n 'biblio_label' => array(\n 'name' => t('Biblio - Label'),\n ),\n 'biblio_access_date' => array(\n 'name' => t('Biblio - Access date'),\n ),\n 'biblio_refereed' => array(\n 'name' => t('Biblio - Refereed'),\n ),\n 'biblio_formats' => array(\n 'name' => t('Biblio - Formats'),\n ),\n ) + parent::getMappingTargets();\n\n // Allow other modules to modify targets.\n if (method_exists($this, 'getHookTargets')) {\n $this->getHookTargets($targets);\n }\n\n return $targets;\n }", "title": "" }, { "docid": "65c24b716174b9664fdd1720968e5acd", "score": "0.5013042", "text": "public function mapEntity($entity, array $params, array $allowedFields)\r\n {\r\n $entityMethods = get_class_methods($entity);\r\n $metadata = $this->em->getClassMetadata(get_class($entity));\r\n\r\n foreach ($metadata->getFieldNames() as $fieldName) {\r\n if (!in_array($fieldName, $allowedFields) || 'id' == $fieldName) { // ID is always generated dynamically\r\n continue;\r\n }\r\n\r\n if (isset($params[$fieldName])) {\r\n $value = $params[$fieldName];\r\n $mapping = $metadata->getFieldMapping($fieldName);\r\n\r\n $isNumber = in_array($mapping['type'], array('integer', 'smallint', 'bigint', 'decimal', 'float'));\r\n\r\n // if a field is number and at the same time its value was not provided,\r\n // then we are not touching it at all, if the model has specified\r\n // a default value for it - fine, everything's gonna be fine, otherwise\r\n // Doctrine will look if this field isNullable etc ... and throw\r\n // an exception if needed\r\n if (!($isNumber && '' === $value)) {\r\n try {\r\n $setterMethodName = $this->fm->formatSetterName($fieldName);\r\n\r\n $methodParams = array();\r\n if (in_array($setterMethodName, $entityMethods)) {\r\n $methodParams = $this->paramsProvider->getParameters(\r\n get_class($entity), $this->fm->formatSetterName($fieldName)\r\n );\r\n }\r\n\r\n $convertedValue = null;\r\n if (is_object($value) || is_array($value)) {\r\n foreach ($this->complexFieldValueConvertersProvider->getItems() as $converter) {\r\n /* @var ComplexFieldValueConverterInterface $converter */\r\n if ($converter->isResponsible($value, $fieldName, $metadata)) {\r\n $convertedValue = $converter->convert($value, $fieldName, $metadata);\r\n }\r\n }\r\n } else {\r\n $convertedValue = $this->convertValue($value, $mapping['type']);\r\n }\r\n\r\n $this->setFieldValue($entity, $fieldName, array_merge(array($convertedValue), $methodParams));\r\n } catch (\\Exception $e) {\r\n throw new \\RuntimeException(\r\n \"Something went wrong during mapping of a scalar field '$fieldName' - \".$e->getMessage(), null, $e\r\n );\r\n }\r\n }\r\n }\r\n }\r\n\r\n foreach ($metadata->getAssociationMappings() as $mapping) {\r\n $fieldName = $mapping['fieldName'];\r\n\r\n if (!in_array($fieldName, $allowedFields)) {\r\n continue;\r\n }\r\n\r\n if (isset($params[$fieldName])) {\r\n $rawValue = $params[$fieldName];\r\n\r\n $setterMethodName = $this->fm->formatSetterName($fieldName);\r\n $isSetterExist = in_array($setterMethodName, $entityMethods);\r\n $resetRequired = '-' == $rawValue;\r\n\r\n $thisSideRelation = new Relation($entity, $fieldName, $this->em);\r\n\r\n if ($thisSideRelation->isToOne()) {\r\n if ($isSetterExist) {\r\n $methodParams = $this->paramsProvider->getParameters(\r\n get_class($entity), $this->fm->formatSetterName($fieldName)\r\n );\r\n\r\n if ($resetRequired) {\r\n $methodParams = array_merge(array(null), $methodParams);\r\n }\r\n\r\n $this->fm->set($entity, $fieldName, $methodParams);\r\n } else {\r\n if ($thisSideRelation->isBidirectional()) {\r\n $otherSideRelation = $thisSideRelation->getAssociatedFieldRelation();\r\n $otherSideRelationValue = $thisSideRelation->getValue($entity);\r\n\r\n if ($resetRequired) {\r\n // only if entity exists then\r\n if ($otherSideRelationValue) {\r\n if ($thisSideRelation->isOneToOne()) {\r\n // nulling the other side of relation\r\n $otherSideRelation->setValue($otherSideRelationValue, null);\r\n } else { // many_to_one\r\n $otherSideRelationValue = $thisSideRelation->getValue($entity);\r\n\r\n /* @var Collection $thisSideCollection */\r\n $thisSideCollection = $otherSideRelation->getValue($otherSideRelationValue);\r\n $thisSideCollection->removeElement($entity);\r\n }\r\n }\r\n\r\n $thisSideRelation->setValue($entity, null);\r\n } else {\r\n $referencedEntity = $thisSideRelation->findTargetEntity($rawValue, $this->em);\r\n\r\n if ($thisSideRelation->isOneToOne()) {\r\n $otherSideRelation->setValue($referencedEntity, $entity);\r\n } else { // many_to_one\r\n $otherSideRelationValue = $thisSideRelation->getValue($entity);\r\n\r\n // removing from old collection:\r\n /* @var Collection $oldCollection */\r\n $oldCollection = $otherSideRelation->getValue($otherSideRelationValue);\r\n $oldCollection->removeElement($entity);\r\n\r\n // and adding to a new one:\r\n /* @var Collection $newCollection */\r\n $newCollection = $otherSideRelation->getValue($referencedEntity);\r\n $newCollection->add($entity);\r\n }\r\n\r\n $thisSideRelation->setValue($entity, $referencedEntity);\r\n }\r\n } else {\r\n $newValue = $resetRequired ? null : $thisSideRelation->findTargetEntity($rawValue, $this->em);\r\n\r\n $thisSideRelation->setValue($entity, $newValue);\r\n }\r\n }\r\n } else { // one_to_many, many_to_many\r\n $thisSideCollection = $metadata->getFieldValue($entity, $fieldName);\r\n\r\n // if it is a new entity (you should remember, the entity's constructor is not invoked)\r\n // it will have no collection initialized, because this usually happens in the constructor\r\n if (!$thisSideCollection) {\r\n $thisSideCollection = new ArrayCollection();\r\n\r\n $metadata->setFieldValue($entity, $fieldName, $thisSideCollection);\r\n }\r\n\r\n $oldIds = Toolkit::extractIds($thisSideCollection);\r\n $newIds = is_array($rawValue) ? $rawValue : explode(', ', $rawValue);\r\n $idsToDelete = array_diff($oldIds, $newIds);\r\n $idsToAdd = array_diff($newIds, $oldIds);\r\n\r\n $entitiesToDelete = $this->getEntitiesByIds($idsToDelete, $mapping['targetEntity']);\r\n $entitiesToAdd = $this->getEntitiesByIds($idsToAdd, $mapping['targetEntity']);\r\n\r\n $thisSideRelation = new Relation($entity, $fieldName, $this->em);\r\n\r\n /*\r\n * At first it will be checked if removeXXX/addXXX methods exist, if they\r\n * do, then they will be used, otherwise we will try to manage\r\n * relation manually\r\n */\r\n $removeMethod = 'remove' . ucfirst(Inflector::singularize($fieldName));\r\n if (in_array($removeMethod, $entityMethods) && count($idsToDelete) > 0) {\r\n foreach ($entitiesToDelete as $refEntity) {\r\n $methodParams = array_merge(\r\n array($refEntity),\r\n $this->paramsProvider->getParameters(get_class($entity), $removeMethod)\r\n );\r\n call_user_func_array(array($entity, $removeMethod), $methodParams);\r\n }\r\n } else {\r\n foreach ($entitiesToDelete as $refEntity) {\r\n if ($thisSideCollection->contains($refEntity)) {\r\n $thisSideCollection->removeElement($refEntity);\r\n\r\n if (CMI::MANY_TO_MANY == $mapping['type']) {\r\n $otherSideCollection = $thisSideRelation->getAssociatedFieldRelation()->getValue($refEntity);\r\n $otherSideCollection->removeElement($entity);\r\n } else { // ONE_TO_MANY\r\n // nulling the OTHER SIDE of relation\r\n $this->setFieldValue($refEntity, $mapping['mappedBy'], array(null));\r\n }\r\n }\r\n }\r\n }\r\n\r\n $addMethod = 'add' . ucfirst(Inflector::singularize($fieldName));\r\n if (in_array($addMethod, $entityMethods) && count($idsToAdd) > 0) {\r\n foreach ($entitiesToAdd as $refEntity) {\r\n $methodParams = array_merge(\r\n array($refEntity),\r\n $this->paramsProvider->getParameters(get_class($entity), $addMethod)\r\n );\r\n call_user_func_array(array($entity, $addMethod), $methodParams);\r\n }\r\n } else {\r\n foreach ($entitiesToAdd as $refEntity) {\r\n if (!$thisSideCollection->contains($refEntity)) {\r\n $thisSideCollection->add($refEntity);\r\n\r\n if (CMI::MANY_TO_MANY == $mapping['type']) {\r\n $otherSideCollection = $thisSideRelation->getAssociatedFieldRelation()->getValue($refEntity);\r\n $otherSideCollection->add($entity);\r\n } else {\r\n $this->setFieldValue($refEntity, $mapping['mappedBy'], array($entity));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "21c8e12f461925e54bcda5e2638a9fb4", "score": "0.49957424", "text": "protected function initializeDoctrineTypeMappings()\n {\n parent::initializeDoctrineTypeMappings();\n\n $this->doctrineTypeMapping['tinyblob'] = 'blob';\n $this->doctrineTypeMapping['blob'] = 'blob';\n $this->doctrineTypeMapping['mediumblob'] = 'blob';\n $this->doctrineTypeMapping['longblob'] = 'blob';\n }", "title": "" }, { "docid": "d33e072025816f81cf3585a7c0a313cf", "score": "0.4990529", "text": "protected function getEntityGenerator()\n {\n $entityGenerator = new EntityGenerator();\n $entityGenerator->setGenerateAnnotations(false);\n $entityGenerator->setGenerateStubMethods(true);\n $entityGenerator->setRegenerateEntityIfExists(false);\n $entityGenerator->setUpdateEntityIfExists(true);\n $entityGenerator->setNumSpaces(4);\n $entityGenerator->setAnnotationPrefix('ORM\\\\');\n\n return $entityGenerator;\n }", "title": "" }, { "docid": "06b25cc44180fdd0a8d53a29b9cd0a5b", "score": "0.49548456", "text": "public abstract function getEntityClass();", "title": "" }, { "docid": "ecbaddb9ab5ad7312551a74c0c81e8ef", "score": "0.4933972", "text": "function entityimport_import_map_settings_ex1() {\n return array(\n 'single' => TRUE,\n 'header' => FALSE,\n 'map' => '{\n \"title\": \"0|||1-1\"\n}',\n 'to' => array('shop', 'shop|shop'),\n );\n}", "title": "" }, { "docid": "3757d41ee7e08694526934630aee1e59", "score": "0.49270102", "text": "public function getEntityClass();", "title": "" }, { "docid": "3757d41ee7e08694526934630aee1e59", "score": "0.49270102", "text": "public function getEntityClass();", "title": "" }, { "docid": "558f0370c0cec49d8ff98cc37ee21604", "score": "0.49252927", "text": "public function getDoctrineMapperType();", "title": "" }, { "docid": "26e2488a169ded9f10165fcb01a2f943", "score": "0.49230668", "text": "protected function generateAlias($class) {\n \n // auto genarete a unique alias\n $alias = '_'.$this->alias_id ++;\n \n // put alias into relation alias table for later use\n $this->aliases[$alias] = $this->uq($class);\n \n return $alias;\n }", "title": "" }, { "docid": "05705cebbcad98c74441d7d93418117f", "score": "0.49213734", "text": "public function getMappings() : array;", "title": "" }, { "docid": "a36f4e3989e5e4473807cbb1a8eb6a3f", "score": "0.4915336", "text": "protected function define(MapperDefinition $map)\n {\n $map->type(EntityWithAccessor::class);\n $map->toTable('entities');\n\n $map->idToPrimaryKey('id');\n\n $map->accessor(\n function (EntityWithAccessor $entity) {\n return $entity->getValue();\n },\n function (EntityWithAccessor $entity, $value) {\n $entity->setValue($value);\n }\n )->to('value')->asVarchar(255);\n }", "title": "" }, { "docid": "2ac905ad783a0fd527747f5e423a983f", "score": "0.49037418", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Main\\Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_ID_FIELD')\n\t\t\t)),\n\t\t\t'NAME' => new Main\\Entity\\StringField('NAME', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateName'),\n\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_NAME_FIELD')\n\t\t\t)),\n\t\t\t'PERCENTAGE' => new Main\\Entity\\FloatField('PERCENTAGE', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_PERCENTAGE_FIELD'),\n\t\t\t))\n\t\t);\n\t}", "title": "" }, { "docid": "d9e6328dcc69027d468cdd6c45b56a1b", "score": "0.490352", "text": "public function getMappings(): stdClass;", "title": "" }, { "docid": "f5c80751642fdae5ad98663763958174", "score": "0.49019808", "text": "public static function getMapFor($class)\n {\n $class_name = $class.'Map';\n\n return new $class_name();\n }", "title": "" }, { "docid": "61fbb9e4ae59c0f6b62a661243f0b499", "score": "0.48953298", "text": "protected function _getMapping($className)\n {\n // try loading mapping from original driver first\n $mapping = null;\n if (null !== $this->_originalDriver) {\n if ($this->_originalDriver instanceof FileDriver) {\n $mapping = $this->_originalDriver->getElement($className);\n }\n }\n\n // if no mapping found try to load mapping file again\n if (null === $mapping) {\n $yaml = $this->_loadMappingFile($this->locator->findMappingFile($className));\n $mapping = $yaml[$className];\n }\n\n return $mapping;\n }", "title": "" }, { "docid": "ddc2f219483eca46d5500c13d91b819b", "score": "0.4876707", "text": "public function test_mapping_applied_during_class_update() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/course/lib.php');\n require_once($CFG->dirroot.'/elis/core/lib/data/customfield.class.php');\n require_once($CFG->dirroot.'/elis/program/accesslib.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/classmoodlecourse.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/curriculum.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/track.class.php');\n\n $this->init_mapping();\n\n $customfieldid = $this->create_custom_field(CONTEXT_ELIS_CLASS);\n\n $pmcourse = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => ''\n ));\n $pmcourse->save();\n\n $program = new curriculum(array('idnumber' => 'testprogramidnumber'));\n $program->save();\n\n $track = new track(array('curid' => $program->id, 'idnumber' => 'testtrackidnumber'));\n $track->save();\n\n $category = new stdClass;\n $category->name = 'testcategoryname';\n $category->id = $DB->insert_record('course_categories', $category);\n\n $course = new stdClass;\n $course->category = $category->id;\n $course->shortname = 'testcourseshortname';\n $course->fullname = 'testcoursefullname';\n $course = create_course($course);\n\n $pmclass = new pmclass(array('courseid' => $pmcourse->id, 'idnumber' => 'testclassidnumber'));\n $pmclass->save();\n\n // Run the class create update.\n $record = new stdClass;\n $record->customaction = 'update';\n $record->customcontext = 'class';\n $record->customidnumber = 'testclassidnumber';\n $record->customstartdate = 'Jan/02/2012';\n $record->customenddate = 'Jan/02/2012';\n $record->customstarttimehour = '2';\n $record->customstarttimeminute = '10';\n $record->customendtimehour = '2';\n $record->customendtimeminute = '10';\n $record->custommaxstudents = '2';\n $record->customenrol_from_waitlist = '1';\n $record->customassignment = 'testcourseidnumber';\n $record->customtrack = 'testtrackidnumber';\n $record->customautoenrol = '1';\n $record->customlink = 'testcourseshortname';\n $record->customtestfieldshortname = '1';\n\n $this->run_pmentity_import((array)$record);\n\n // Validation.\n $data = array(\n 'courseid' => $pmcourse->id,\n 'idnumber' => 'testclassidnumber',\n 'startdate' => rlip_timestamp(0, 0, 0, 1, 2, 2012),\n 'enddate' => rlip_timestamp(0, 0, 0, 1, 2, 2012),\n 'starttimehour' => 2,\n 'starttimeminute' => 10,\n 'endtimehour' => 2,\n 'endtimeminute' => 10,\n 'maxstudents' => 2,\n 'enrol_from_waitlist' => 1\n );\n $this->assertTrue($DB->record_exists(pmclass::TABLE, $data));\n\n $this->assertTrue($DB->record_exists(trackassignment::TABLE, array(\n 'classid' => $pmclass->id,\n 'trackid' => $track->id,\n 'autoenrol' => 1\n )));\n $this->assertTrue($DB->record_exists(classmoodlecourse::TABLE, array(\n 'classid' => $pmclass->id,\n 'moodlecourseid' => $course->id\n )));\n\n $instance = context_elis_class::instance(1);\n\n $this->assertTrue($DB->record_exists(field_data_int::TABLE, array(\n 'fieldid' => $customfieldid,\n 'contextid' => $instance->id,\n 'data' => 1\n )));\n }", "title": "" }, { "docid": "f1ccbd02aa19f28d649d4f398889f8b4", "score": "0.4867379", "text": "public static function getMap()\n {\n return array(\n 'ID' => new Entity\\IntegerField(\n 'ID', array(\n 'title' => 'ID',\n 'primary' => true\n )\n ),\n 'ENTITY_ID' => new Entity\\IntegerField(\n 'ENTITY_ID', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_LOCK_ENTITY_ID'),\n 'required' => true\n )\n ),\n 'ENTITY_TYPE' => new Entity\\StringField(\n 'ENTITY_TYPE', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_LOCK_ENTITY_TYPE'),\n 'required' => true\n )\n ),\n 'LOCK_TYPE' => new Entity\\StringField(\n 'LOCK_TYPE', array(\n 'title' => Loc::getMessage('LANDING_TABLE_FIELD_LOCK_TYPE'),\n 'required' => true\n )\n )\n );\n }", "title": "" }, { "docid": "1371e4ee782002ac4ff8feb48dd8e9bd", "score": "0.48569426", "text": "abstract protected function getEntityClassName();", "title": "" }, { "docid": "ffe65ef506d0389447733977e20b49c5", "score": "0.48558185", "text": "public function __construct(array $mappings = array())\n {\n\n // merge the entity type codes with the passed ones\n $mergedMappings = array_merge(\n array(\n CommandNames::IMPORT_PRODUCTS => EntityTypeCodes::CATALOG_PRODUCT,\n CommandNames::IMPORT_PRODUCTS_URL => EntityTypeCodes::CATALOG_PRODUCT_URL,\n CommandNames::IMPORT_PRODUCTS_PRICE => EntityTypeCodes::CATALOG_PRODUCT_PRICE,\n CommandNames::IMPORT_PRODUCTS_TIER_PRICE => EntityTypeCodes::CATALOG_PRODUCT_TIER_PRICE,\n CommandNames::IMPORT_PRODUCTS_INVENTORY => EntityTypeCodes::CATALOG_PRODUCT_INVENTORY,\n CommandNames::IMPORT_PRODUCTS_INVENTORY_MSI => EntityTypeCodes::CATALOG_PRODUCT_INVENTORY_MSI,\n CommandNames::IMPORT_CATEGORIES => EntityTypeCodes::CATALOG_CATEGORY,\n CommandNames::IMPORT_ATTRIBUTES => EntityTypeCodes::EAV_ATTRIBUTE,\n CommandNames::IMPORT_ATTRIBUTES_SET => EntityTypeCodes::EAV_ATTRIBUTE_SET,\n CommandNames::IMPORT_CUSTOMERS => EntityTypeCodes::CUSTOMER,\n CommandNames::IMPORT_CUSTOMERS_ADDRESS => EntityTypeCodes::CUSTOMER_ADDRESS,\n CommandNames::IMPORT_CLEAR_PID_FILE => EntityTypeCodes::NONE,\n CommandNames::IMPORT_CREATE_OK_FILE => EntityTypeCodes::NONE,\n CommandNames::IMPORT_CREATE_CONFIGURATION_FILE => EntityTypeCodes::NONE,\n CommandNames::IMPORT_EXECUTE => EntityTypeCodes::NONE,\n CommandNames::IMPORT_CONVERT_VALUE => EntityTypeCodes::NONE,\n CommandNames::IMPORT_DEBUG => EntityTypeCodes::DEBUG,\n CommandNames::IMPORT_CONFIG_DIFF => EntityTypeCodes::DEBUG,\n CommandNames::IMPORT_CREATE_CONFIG => EntityTypeCodes::DEBUG\n ),\n $mappings\n );\n\n // initialize the parent class with the merged entity type codes\n parent::__construct($mergedMappings);\n }", "title": "" }, { "docid": "083ffd1e43f950be0e8ef2af53878097", "score": "0.48552254", "text": "public function getExportMappingConfigForEntity(string $entityClass, int $channelId): array\n {\n $cacheKey = $this->getCacheKey(sprintf('export_%s_%s', $entityClass, $channelId));\n return $this->cache->get($cacheKey, function () use ($entityClass, $channelId) {\n return $this->getMappingRepository()->getMappingConfigForEntity($entityClass, $channelId);\n });\n }", "title": "" }, { "docid": "756744ba1362e6321742ce5b29ae3563", "score": "0.48534927", "text": "public static function getMap()\n\t{\n\t\t/*\n\t\t\tboolean (наследует ScalarField)\n\t\t\tdate (наследует ScalarField)\n\t\t\tdatetime (наследует DateField)\n\t\t\tenum (наследует ScalarField)\n\t\t\tfloat (наследует ScalarField)\n\t\t\tinteger (наследует ScalarField)\n\t\t\tstring (наследует ScalarField)\n\t\t\ttext (наследует StringField)\n\t\t */\n\t\treturn array(\n\t\t\t new Main\\Entity\\IntegerField('ID', array(\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('ID'),\n\t\t\t )),\n\t\t\t new Main\\Entity\\DatetimeField('DATE_INSERT', array(\n\t\t\t\t\t'default_value' => new Type\\DateTime(),\n\t\t\t\t\t'title' => Loc::getMessage('DATE_INSERT'),\n\t\t\t\t\t'required' => true,\n\t\t\t )),\n\t\t\t new Main\\Entity\\StringField('EMAIL', array(\n\t\t\t\t\t'title' => Loc::getMessage('EMAIL'),\n\t\t\t\t\t'required' => true,\n\t\t\t )),\n\t\t\t new Main\\Entity\\IntegerField('USER_ID', array(\n\t\t\t\t\t'format' => '/^[0-9]{1,18}$/',\n\t\t\t\t\t'title' => Loc::getMessage('USER_ID'),\n\t\t\t )),\n\t\t\t new Main\\Entity\\IntegerField('IBLOCK_ID', array(\n\t\t\t\t\t'format' => '/^[0-9]{1,18}$/',\n\t\t\t\t\t'title' => Loc::getMessage('IBLOCK_ID'),\n\t\t\t )),\n\t\t\t new Main\\Entity\\IntegerField('SECTION_ID', array(\n\t\t\t\t\t'format' => '/^[0-9]{1,18}$/',\n\t\t\t\t\t'title' => Loc::getMessage('SECTION_ID'),\n\t\t\t )),\n\t\t\t new Main\\Entity\\IntegerField('ELEMENT_ID', array(\n\t\t\t\t\t'format' => '/^[0-9]{1,18}$/',\n\t\t\t\t\t'title' => Loc::getMessage('ELEMENT_ID'),\n\t\t\t )),\n\t\t\t new Main\\Entity\\StringField('URL', array(\n\t\t\t\t\t'title' => Loc::getMessage('URL'),\n\t\t\t )),\n\t\t\t new Main\\Entity\\StringField('SITE_ID', array(\n\t\t\t\t 'validation' => array(__CLASS__, 'validateSiteId'),\n\t\t\t\t 'title' => Loc::getMessage('SITE_ID'),\n\t\t\t\t 'required' => true,\n\t\t\t )),\n\t\t);\n\t}", "title": "" }, { "docid": "b323c8fbbe86bfa28e2e186bb317253d", "score": "0.48529863", "text": "public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => new Fields\\IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('MEMBERSHIP_HANDLER_QUERY_ENTITY_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'ENTITY_TYPE' => new Fields\\StringField(\n\t\t\t\t'ENTITY_TYPE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'validation' => [__CLASS__, 'validateEntityType'],\n\t\t\t\t\t'title' => Loc::getMessage('MEMBERSHIP_HANDLER_QUERY_ENTITY_ENTITY_TYPE_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'ENTITY_ID' => new Fields\\IntegerField(\n\t\t\t\t'ENTITY_ID',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('MEMBERSHIP_HANDLER_QUERY_ENTITY_ENTITY_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'CREATION_TIMESTAMP_UTC' => new Fields\\IntegerField(\n\t\t\t\t'CREATION_TIMESTAMP_UTC',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('MEMBERSHIP_HANDLER_QUERY_ENTITY_CREATION_TIMESTAMP_UTC_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'LAST_UPDATED_EVENT_ID' => new Fields\\IntegerField(\n\t\t\t\t'LAST_UPDATED_EVENT_ID',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('MEMBERSHIP_HANDLER_QUERY_ENTITY_LAST_UPDATED_EVENT_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t];\n\t}", "title": "" }, { "docid": "ae07599f900b239215762837c5ce8286", "score": "0.48511553", "text": "public function getClassMetadataForEntity($entity);", "title": "" }, { "docid": "16709ab65535ff96d1b743434704591d", "score": "0.48501614", "text": "public function getSourceToDestinationColumnMapping();", "title": "" }, { "docid": "6a634225ba2aaa4dd4e4cd4e0bad23c9", "score": "0.48417217", "text": "public function generate(MapperGeneratorMetadataInterface $mapperGeneratorMetadata): Stmt\\Class_\n {\n $propertiesMapping = $mapperGeneratorMetadata->getPropertiesMapping();\n\n $uniqueVariableScope = new UniqueVariableScope();\n $sourceInput = new Expr\\Variable($uniqueVariableScope->getUniqueName('value'));\n $result = new Expr\\Variable($uniqueVariableScope->getUniqueName('result'));\n $hashVariable = new Expr\\Variable($uniqueVariableScope->getUniqueName('sourceHash'));\n $contextVariable = new Expr\\Variable($uniqueVariableScope->getUniqueName('context'));\n $constructStatements = [];\n $addedDependencies = [];\n $canHaveCircularDependency = $mapperGeneratorMetadata->canHaveCircularReference() && 'array' !== $mapperGeneratorMetadata->getSource();\n\n $statements = [\n new Stmt\\If_(new Expr\\BinaryOp\\Identical(new Expr\\ConstFetch(new Name('null')), $sourceInput), [\n 'stmts' => [new Stmt\\Return_($sourceInput)],\n ]),\n ];\n\n if ($canHaveCircularDependency) {\n $statements[] = new Stmt\\Expression(new Expr\\Assign($hashVariable, new Expr\\BinaryOp\\Concat(new Expr\\FuncCall(new Name('spl_object_hash'), [\n new Arg($sourceInput),\n ]),\n new Scalar\\String_($mapperGeneratorMetadata->getTarget())\n )));\n $statements[] = new Stmt\\If_(new Expr\\StaticCall(new Name\\FullyQualified(MapperContext::class), new Name('shouldHandleCircularReference'), [\n new Arg($contextVariable),\n new Arg($hashVariable),\n new Arg(new Expr\\PropertyFetch(new Expr\\Variable('this'), 'circularReferenceLimit')),\n ]), [\n 'stmts' => [\n new Stmt\\Return_(new Expr\\StaticCall(new Name\\FullyQualified(MapperContext::class), 'handleCircularReference', [\n new Arg($contextVariable),\n new Arg($hashVariable),\n new Arg($sourceInput),\n new Arg(new Expr\\PropertyFetch(new Expr\\Variable('this'), 'circularReferenceLimit')),\n new Arg(new Expr\\PropertyFetch(new Expr\\Variable('this'), 'circularReferenceHandler')),\n ])),\n ],\n ]);\n }\n\n [$createObjectStmts, $inConstructor, $constructStatementsForCreateObjects, $injectMapperStatements] = $this->getCreateObjectStatements($mapperGeneratorMetadata, $result, $contextVariable, $sourceInput, $uniqueVariableScope);\n $constructStatements = array_merge($constructStatements, $constructStatementsForCreateObjects);\n\n $targetToPopulate = new Expr\\ArrayDimFetch($contextVariable, new Scalar\\String_(MapperContext::TARGET_TO_POPULATE));\n $statements[] = new Stmt\\Expression(new Expr\\Assign($result, new Expr\\BinaryOp\\Coalesce(\n $targetToPopulate,\n new Expr\\ConstFetch(new Name('null'))\n )));\n if (!$this->allowReadOnlyTargetToPopulate && $mapperGeneratorMetadata->isTargetReadOnlyClass()) {\n $statements[] = new Stmt\\If_(\n new Expr\\BinaryOp\\BooleanAnd(\n new Expr\\BooleanNot(new Expr\\BinaryOp\\Coalesce(new Expr\\ArrayDimFetch($contextVariable, new Scalar\\String_(MapperContext::ALLOW_READONLY_TARGET_TO_POPULATE)), new Expr\\ConstFetch(new Name('false')))),\n new Expr\\FuncCall(new Name('is_object'), [new Arg(new Expr\\BinaryOp\\Coalesce($targetToPopulate, new Expr\\ConstFetch(new Name('null'))))])\n ), [\n 'stmts' => [new Stmt\\Expression(new Expr\\Throw_(new Expr\\New_(new Name(ReadOnlyTargetException::class))))],\n ]);\n }\n\n $statements[] = new Stmt\\If_(new Expr\\BinaryOp\\Identical(new Expr\\ConstFetch(new Name('null')), $result), [\n 'stmts' => $createObjectStmts,\n ]);\n\n foreach ($propertiesMapping as $propertyMapping) {\n if (!$propertyMapping->getTransformer() instanceof DependentTransformerInterface) {\n continue;\n }\n\n foreach ($propertyMapping->getTransformer()->getDependencies() as $dependency) {\n if (isset($addedDependencies[$dependency->getName()])) {\n continue;\n }\n\n $injectMapperStatements[] = new Stmt\\Expression(new Expr\\Assign(\n new Expr\\ArrayDimFetch(new Expr\\PropertyFetch(new Expr\\Variable('this'), 'mappers'), new Scalar\\String_($dependency->getName())),\n new Expr\\MethodCall(new Expr\\Variable('autoMapperRegistry'), 'getMapper', [\n new Arg(new Scalar\\String_($dependency->getSource())),\n new Arg(new Scalar\\String_($dependency->getTarget())),\n ])\n ));\n $addedDependencies[$dependency->getName()] = true;\n }\n }\n\n $addedDependenciesStatements = [];\n if ($addedDependencies) {\n if ($canHaveCircularDependency) {\n $addedDependenciesStatements[] = new Stmt\\Expression(new Expr\\Assign(\n $contextVariable,\n new Expr\\StaticCall(new Name\\FullyQualified(MapperContext::class), 'withReference', [\n new Arg($contextVariable),\n new Arg($hashVariable),\n new Arg($result),\n ])\n ));\n }\n\n $addedDependenciesStatements[] = new Stmt\\Expression(new Expr\\Assign(\n $contextVariable,\n new Expr\\StaticCall(new Name\\FullyQualified(MapperContext::class), 'withIncrementedDepth', [\n new Arg($contextVariable),\n ])\n ));\n }\n\n $duplicatedStatements = [];\n $setterStatements = [];\n foreach ($propertiesMapping as $propertyMapping) {\n if ($propertyMapping->shouldIgnoreProperty()) {\n continue;\n }\n\n $transformer = $propertyMapping->getTransformer();\n\n $fieldValueVariable = new Expr\\Variable($uniqueVariableScope->getUniqueName('fieldValue'));\n $sourcePropertyAccessor = new Expr\\Assign($fieldValueVariable, $propertyMapping->getReadAccessor()->getExpression($sourceInput));\n\n [$output, $propStatements] = $transformer->transform($fieldValueVariable, $result, $propertyMapping, $uniqueVariableScope);\n\n $extractCallback = $propertyMapping->getReadAccessor()->getExtractCallback($mapperGeneratorMetadata->getSource());\n\n if (null !== $extractCallback) {\n $constructStatements[] = new Stmt\\Expression(new Expr\\Assign(\n new Expr\\ArrayDimFetch(new Expr\\PropertyFetch(new Expr\\Variable('this'), 'extractCallbacks'), new Scalar\\String_($propertyMapping->getProperty())),\n $extractCallback\n ));\n }\n\n if (null === $propertyMapping->getWriteMutator()) {\n continue;\n }\n\n if ($propertyMapping->getWriteMutator()->getType() !== WriteMutator::TYPE_ADDER_AND_REMOVER) {\n $writeExpression = $propertyMapping->getWriteMutator()->getExpression($result, $output, $transformer instanceof AssignedByReferenceTransformerInterface ? $transformer->assignByRef() : false);\n if (null === $writeExpression) {\n continue;\n }\n\n $propStatements[] = new Stmt\\Expression($writeExpression);\n }\n\n $hydrateCallback = $propertyMapping->getWriteMutator()->getHydrateCallback($mapperGeneratorMetadata->getTarget());\n\n if (null !== $hydrateCallback) {\n $constructStatements[] = new Stmt\\Expression(new Expr\\Assign(\n new Expr\\ArrayDimFetch(new Expr\\PropertyFetch(new Expr\\Variable('this'), 'hydrateCallbacks'), new Scalar\\String_($propertyMapping->getProperty())),\n $hydrateCallback\n ));\n }\n\n $conditions = [];\n\n if ($propertyMapping->checkExists()) {\n if (\\stdClass::class === $mapperGeneratorMetadata->getSource()) {\n $conditions[] = new Expr\\FuncCall(new Name('property_exists'), [\n new Arg($sourceInput),\n new Arg(new Scalar\\String_($propertyMapping->getProperty())),\n ]);\n }\n\n if ('array' === $mapperGeneratorMetadata->getSource()) {\n $conditions[] = new Expr\\FuncCall(new Name('array_key_exists'), [\n new Arg(new Scalar\\String_($propertyMapping->getProperty())),\n new Arg($sourceInput),\n ]);\n }\n }\n\n if ($mapperGeneratorMetadata->shouldCheckAttributes()) {\n $conditions[] = new Expr\\StaticCall(new Name\\FullyQualified(MapperContext::class), 'isAllowedAttribute', [\n new Arg($contextVariable),\n new Arg(new Scalar\\String_($propertyMapping->getProperty())),\n new Arg($sourcePropertyAccessor),\n ]);\n }\n\n if (null !== $propertyMapping->getSourceGroups()) {\n $conditions[] = new Expr\\BinaryOp\\BooleanAnd(\n new Expr\\BinaryOp\\NotIdentical(\n new Expr\\ConstFetch(new Name('null')),\n new Expr\\BinaryOp\\Coalesce(\n new Expr\\ArrayDimFetch($contextVariable, new Scalar\\String_(MapperContext::GROUPS)),\n new Expr\\Array_()\n )\n ),\n new Expr\\FuncCall(new Name('array_intersect'), [\n new Arg(new Expr\\BinaryOp\\Coalesce(\n new Expr\\ArrayDimFetch($contextVariable, new Scalar\\String_(MapperContext::GROUPS)),\n new Expr\\Array_()\n )),\n new Arg(new Expr\\Array_(array_map(function (string $group) {\n return new Expr\\ArrayItem(new Scalar\\String_($group));\n }, $propertyMapping->getSourceGroups()))),\n ])\n );\n }\n\n if (null !== $propertyMapping->getTargetGroups()) {\n $conditions[] = new Expr\\BinaryOp\\BooleanAnd(\n new Expr\\BinaryOp\\NotIdentical(\n new Expr\\ConstFetch(new Name('null')),\n new Expr\\BinaryOp\\Coalesce(\n new Expr\\ArrayDimFetch($contextVariable, new Scalar\\String_(MapperContext::GROUPS)),\n new Expr\\Array_()\n )\n ),\n new Expr\\FuncCall(new Name('array_intersect'), [\n new Arg(new Expr\\BinaryOp\\Coalesce(\n new Expr\\ArrayDimFetch($contextVariable, new Scalar\\String_(MapperContext::GROUPS)),\n new Expr\\Array_()\n )),\n new Arg(new Expr\\Array_(array_map(function (string $group) {\n return new Expr\\ArrayItem(new Scalar\\String_($group));\n }, $propertyMapping->getTargetGroups()))),\n ])\n );\n }\n\n if (null !== $propertyMapping->getMaxDepth()) {\n $conditions[] = new Expr\\BinaryOp\\SmallerOrEqual(\n new Expr\\BinaryOp\\Coalesce(\n new Expr\\ArrayDimFetch($contextVariable, new Scalar\\String_(MapperContext::DEPTH)),\n new Expr\\ConstFetch(new Name('0'))\n ),\n new Scalar\\LNumber($propertyMapping->getMaxDepth())\n );\n }\n\n if ($conditions) {\n $condition = array_shift($conditions);\n\n while ($conditions) {\n $condition = new Expr\\BinaryOp\\BooleanAnd($condition, array_shift($conditions));\n }\n\n $propStatements = [new Stmt\\If_($condition, [\n 'stmts' => $propStatements,\n ])];\n }\n\n $propInConstructor = \\in_array($propertyMapping->getProperty(), $inConstructor, true);\n foreach ($propStatements as $propStatement) {\n if ($propInConstructor) {\n $duplicatedStatements[] = $propStatement;\n } else {\n $setterStatements[] = $propStatement;\n }\n }\n }\n\n if (\\count($duplicatedStatements) > 0 && \\count($inConstructor)) {\n $statements[] = new Stmt\\Else_(array_merge($addedDependenciesStatements, $duplicatedStatements));\n } else {\n foreach ($addedDependenciesStatements as $statement) {\n $statements[] = $statement;\n }\n }\n\n foreach ($setterStatements as $propStatement) {\n $statements[] = $propStatement;\n }\n\n $statements[] = new Stmt\\Return_($result);\n\n $mapMethod = new Stmt\\ClassMethod('map', [\n 'flags' => Stmt\\Class_::MODIFIER_PUBLIC,\n 'params' => [\n new Param(new Expr\\Variable($sourceInput->name)),\n new Param(new Expr\\Variable('context'), new Expr\\Array_(), 'array'),\n ],\n 'byRef' => true,\n 'stmts' => $statements,\n 'returnType' => \\PHP_VERSION_ID >= 80000 ? 'mixed' : null,\n ]);\n\n $constructMethod = new Stmt\\ClassMethod('__construct', [\n 'flags' => Stmt\\Class_::MODIFIER_PUBLIC,\n 'stmts' => $constructStatements,\n ]);\n\n $classStmts = [$constructMethod, $mapMethod];\n\n if (\\count($injectMapperStatements) > 0) {\n $classStmts[] = new Stmt\\ClassMethod('injectMappers', [\n 'flags' => Stmt\\Class_::MODIFIER_PUBLIC,\n 'params' => [\n new Param(new Expr\\Variable('autoMapperRegistry'), null, new Name\\FullyQualified(AutoMapperRegistryInterface::class)),\n ],\n 'returnType' => 'void',\n 'stmts' => $injectMapperStatements,\n ]);\n }\n\n return new Stmt\\Class_(new Name($mapperGeneratorMetadata->getMapperClassName()), [\n 'flags' => Stmt\\Class_::MODIFIER_FINAL,\n 'extends' => new Name\\FullyQualified(GeneratedMapper::class),\n 'stmts' => $classStmts,\n ]);\n }", "title": "" }, { "docid": "aa23bd3147581c22b74d06c598aea830", "score": "0.48405424", "text": "public function mapFromXML(SimpleXMLElement $xmlMap) {\r\n\t\t//Setting up non-relationship fields\r\n\t\tforeach($xmlMap->class->attribute as $indexAttribute => $xmlAttribute) {\r\n\t\t\tswitch($xmlAttribute->attributes()->type) {\r\n\t\t\t\t//Defines a column\r\n\t\t\t\tcase 'column':\r\n\t\t\t\t\t$options = array();\r\n\t\t\t\t\t$options['notnull'] = (string)$xmlAttribute->attributes()->notnull;\r\n\t\t\t\t\t$options['autoincrement'] = (string)$xmlAttribute->attributes()->autoincrement;\r\n\t\t\t\t\t$options['primary'] = (string)$xmlAttribute->attributes()->primary;\r\n\t\t\t\t\t$options['defaultvalue'] = (string)$xmlAttribute->attributes()->defaultvalue;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->addField((string)$xmlAttribute->attributes()->name,(string)$xmlAttribute->attributes()->column,(string)$xmlAttribute->attributes()->datatype,(string)$xmlAttribute->attributes()->lenght,$options);\r\n\t\t\t\tbreak;\r\n\t\t\t\t//Setup a relationship\r\n\t\t\t\tcase 'relationship':\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* Setup relationShip type */\r\n\t\t\t\t\t/* FIXME Create a way to call a Model constant */\r\n\t\t\t\t\tswitch((string)$xmlAttribute->relationship[0]->attributes()->type) {\r\n\t\t\t\t\t\tcase 'ONE_TO_ONE':\r\n\t\t\t\t\t\t\t$relType = self::ONE_TO_ONE;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'ONE_TO_MANY':\r\n\t\t\t\t\t\t\t$relType = self::ONE_TO_MANY;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'MANY_TO_MANY':\r\n\t\t\t\t\t\t\t$relType = self::ONE_TO_MANY;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$relType = !is_numeric($relType) ? 1 : $relType;\r\n\t\t\t\t\t/* /Setup relationShip type */\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Setup relationShip informations\r\n\t\t\t\t\t$relName = (string)$xmlAttribute->attributes()->name;\r\n\t\t\t\t\t$foreignClass = (string)$xmlAttribute->relationship[0]->attributes()->class;\r\n\t\t\t\t\t$thisKey = (string)$xmlAttribute->relationship[0]->attributes()->thisKey;\r\n\t\t\t\t\t$relKey = (string)$xmlAttribute->relationship[0]->attributes()->relKey;\r\n\t\t\t\t\t$outKey = (string)$xmlAttribute->relationship[0]->attributes()->outKey;\r\n\t\t\t\t\t$relOutKey = (string)$xmlAttribute->relationship[0]->attributes()->relOutKey;\r\n\t\t\t\t\t$relTable = (string)$xmlAttribute->relationship[0]->attributes()->relTable;\r\n\t\t\t\t\t$lazy = (string)$xmlAttribute->relationship[0]->attributes()->lazy;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Creating the relationship\r\n\t\t\t\t\t$this->addRelationship($relName,$relType,$foreignClass,$thisKey,$relKey,$outKey,$relOutKey,$relTable,$lazy);\r\n\t\t\t\tbreak;\r\n\t\t\t\t/**\r\n\t\t\t\t * Setup a child relationship\r\n\t\t\t\t * \r\n\t\t\t\t * A child relationship is when you want your child class to \"know\" about its parent class relationship\r\n\t\t\t\t */\r\n\t\t\t\tcase 'child':\r\n\t\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0f35a8607e07bb73e596567c6e597dcf", "score": "0.48290578", "text": "protected function map_postings() { return new Test_DB_ORM_Blog_PostingsMapper($this->session);}", "title": "" }, { "docid": "cd0ff61eb6722c32c4ccffb81a0de54e", "score": "0.4820077", "text": "public function mapFor()\n {\n return Room::class;\n }", "title": "" }, { "docid": "e6febee87819c1bac36f5a5cb338555a", "score": "0.48194808", "text": "public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => [\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t],\n\t\t\t'DATE_CREATE' => [\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'default_value' => new DateTime(),\n\t\t\t],\n\t\t\t'SOURCE_ID' => [\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'default_value' => 0\n\t\t\t],\n\t\t\t'GUEST_ID' => [\n\t\t\t\t'data_type' => 'integer',\n\t\t\t],\n\n\t\t\t(new ORM\\Fields\\ArrayField('TAGS_RAW'))->configureSerializationPhp(),\n\n\t\t\t(new ORM\\Fields\\ArrayField('PAGES_RAW'))->configureSerializationPhp(),\n\n\t\t\t'IS_MOBILE' => [\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'default_value' => 'N',\n\t\t\t\t'values' => ['N', 'Y']\n\t\t\t],\n\t\t\t'HAS_CHILD' => [\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'default_value' => 'N',\n\t\t\t\t'values' => ['N', 'Y']\n\t\t\t],\n\t\t\t'SOURCE' => [\n\t\t\t\t'data_type' => SourceTable::class,\n\t\t\t\t'reference' => ['=this.SOURCE_ID' => 'ref.ID'],\n\t\t\t],\n\t\t\t'CHANNEL' => array(\n\t\t\t\t'data_type' => TraceChannelTable::class,\n\t\t\t\t'reference' => array('=this.ID' => 'ref.TRACE_ID'),\n\t\t\t),\n\t\t\t'ENTITY' => array(\n\t\t\t\t'data_type' => TraceEntityTable::class,\n\t\t\t\t'reference' => array('=this.ID' => 'ref.TRACE_ID'),\n\t\t\t),\n\t\t\t'TRACE_SOURCE' => array(\n\t\t\t\t'data_type' => TraceSourceTable::class,\n\t\t\t\t'reference' => array('=this.ID' => 'ref.TRACE_ID'),\n\t\t\t),\n\t\t];\n\t}", "title": "" }, { "docid": "41ea15dc39805764a35392ac87c07f89", "score": "0.48177412", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\tnew Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\tnew Entity\\IntegerField('PROFILE_ID', array(\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\tnew Entity\\IntegerField('ELEMENT_ID', array(\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\tnew Entity\\StringField('TYPE', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'size' => 1\n\t\t\t))\n\t\t);\n\t}", "title": "" } ]
84e68bb04a13bd352833df697d89b177
Add double quotation marks in string.
[ { "docid": "5431304454d444d92275b744a58afc0a", "score": "0.7180898", "text": "public static function doubleQuotes($string = null)\n {\n return '\"' . $string . '\"';\n }", "title": "" } ]
[ { "docid": "55db764da38ddffa13d963925cdd59aa", "score": "0.76454526", "text": "function add_quotes($str) { return '\"'.$str.'\"'; }", "title": "" }, { "docid": "293822c437dab3c2d4fc94980b6ba94a", "score": "0.7372062", "text": "private function addDoubleQuotes($string)\r\n {\r\n $len = strlen($string);\r\n\r\n $outputStr = '';\r\n $numWeirdChars = 0;\r\n $weirdCharsStart = 0;\r\n $subStrStart = 0;\r\n\r\n for ($i = 0; $i < $len; $i++) {\r\n if (($string[$i] == ' ') ||\r\n ($string[$i] == ';') ||\r\n ($string[$i] == ',') ||\r\n ($string[$i] == '&') ||\r\n ($string[$i] == '^') ||\r\n ($string[$i] == '(') ||\r\n ($string[$i] == ')')\r\n ) {\r\n if ($numWeirdChars == 0) {\r\n $outputStr .= substr($string, $subStrStart, ($i - $subStrStart));\r\n $weirdCharsStart = $i;\r\n }\r\n $numWeirdChars += 1;\r\n } else {\r\n if ($numWeirdChars > 0) {\r\n $outputStr .= chr(34) . substr($string, $weirdCharsStart, $numWeirdChars) . chr(34);\r\n\r\n $subStrStart = $i;\r\n $numWeirdChars = 0;\r\n }\r\n }\r\n }\r\n $outputStr .= substr($string, $subStrStart, ($i - $subStrStart));\r\n\r\n return $outputStr;\r\n }", "title": "" }, { "docid": "2179b410d4ae02a8c6761685b9541ca5", "score": "0.70132667", "text": "function __formatString($string) {\n\t\t$quote = substr($string, 0, 1);\n\t\t$string = substr($string, 1, -1);\n\t\tif ($quote == '\"') {\n\t\t\t$string = stripcslashes($string);\n\t\t} else {\n\t\t\t$string = strtr($string, array(\"\\\\'\" => \"'\", \"\\\\\\\\\" => \"\\\\\"));\n\t\t}\n\t\t$string = str_replace(\"\\r\\n\", \"\\n\", $string);\n\t\treturn addcslashes($string, \"\\0..\\37\\\\\\\"\");\n\t}", "title": "" }, { "docid": "565fcb1cdd9724b7cbbf34a47a579751", "score": "0.690296", "text": "function enquote_string($string)\n {\n return \"'\" . $this->escape_string($string) . \"'\";\n }", "title": "" }, { "docid": "f68fd4c6a741ef79a1b0c79cdd388e44", "score": "0.68772036", "text": "private function escapeQuotes($string) {\r\n if(is_string($string))\r\n return str_replace('\"', '\"\"', $string);\r\n else\r\n return $string;\r\n }", "title": "" }, { "docid": "a845f678f17607084e95b11335b617bc", "score": "0.68691003", "text": "static public function add_quotes($value){\n\t\treturn \"'\".addslashes($value).\"'\";\n\t}", "title": "" }, { "docid": "1fddc7f6058c7af8ef3704cc24e1e6a1", "score": "0.67638665", "text": "public function add_magic_quotes(&$var);", "title": "" }, { "docid": "921a99c8a92635d5e0b4f835f6c0ad35", "score": "0.672967", "text": "static public function quote(string $string): string\n {\n return \"'{$string}'\";\n }", "title": "" }, { "docid": "78382a446ee6133874bbf1507cac7fb4", "score": "0.6702165", "text": "public static function quote( $str ) {\n return '\\''.str_replace( '\\'', '\\'\\'', $str ).'\\'';\n }", "title": "" }, { "docid": "64a7035f46ec8d1b265d93b58337754b", "score": "0.66883063", "text": "function cutDQuotation($string){\n\t\tif(substr($string, strlen($string)-1) == '\"'){\n\t\t\t$replace = str_replace('\"', '', $string);\n\t\t\treturn $replace;\n\t\t}\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "9a0486e2d89c592af6df9625d7c78ee1", "score": "0.6657557", "text": "function escapeQuotes( $string ) {\n\t\n\t$strUnescaped = $string;\n\t\n\t$strEscaped = str_replace('\"', '\\\"', $strUnescaped);\n\t$strEscaped = str_replace(\"'\", \"\\'\", $strEscaped);\n\n\treturn $strEscaped;\n}", "title": "" }, { "docid": "8aaa777a934fcd434f792905c4a0477d", "score": "0.6637637", "text": "static public function replaceQuotes(string $string): string\n {\n return str_replace('\"', \"'\", $string);\n }", "title": "" }, { "docid": "57a8bec29077b40349abf139e6881146", "score": "0.6616319", "text": "function quote($string) {\n\n\t\treturn '\\'' . $this->unquote($string) . '\\'';\n\t}", "title": "" }, { "docid": "3cf01f5f678bb263dba3f940f20edd9c", "score": "0.65674853", "text": "function single_quote(string $string): string\n{\n\treturn \"'\" . escape_quotes($string, QUOTE_STYLE_SINGLE) . \"'\";\n}", "title": "" }, { "docid": "ea3e3867025612f74fe9d55634f400c4", "score": "0.6558204", "text": "private function _getQuotedString()\n {\n return '\"(?>[ !#-\\[\\]-~]|\\\\\\[ -~])*\"';\n }", "title": "" }, { "docid": "93fa0ba408bc637c594f61ed7492d1fb", "score": "0.6543603", "text": "function superfood_elated_addslashes($str) {\n\t\t//is magic quotes turned off in php.ini?\n\t\tif(!get_magic_quotes_gpc()) {\n\t\t\t//apply addslashes\n\t\t\t$str = addslashes($str);\n\t\t}\n\n\t\t//return escaped string\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "c08673ec0bd56b4e7be6b0a4ce3463a0", "score": "0.6511546", "text": "function my_addslashes($string)\n{\n return str_replace(\"'\", \"\\'\", $string);\n}", "title": "" }, { "docid": "a87adef74d69912d3aa9ccc5210abe45", "score": "0.650939", "text": "public function cutDQuotation($string){\n\t\tif(substr($string, strlen($string)-1) == '\"'){\n\t\t\t$replace = str_replace('\"', '', $string);\n\t\t\treturn $replace;\n\t\t}\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "1b6b1fc88bc4e83d2f714749306cd7c5", "score": "0.6476559", "text": "protected function fixToSafeQuotes()\n {\n $this->description = preg_replace_callback('/&quot;/', function ($matches) {\n return '\\'';\n }, $this->description);\n }", "title": "" }, { "docid": "5f73da27cd1c0d20fb5d3f2e400ee58a", "score": "0.6466143", "text": "public function addQuotationMarks($row)\n {\n return sprintf('\"%s\"', $row);\n }", "title": "" }, { "docid": "3481c993d102a59240ec840371994864", "score": "0.64338017", "text": "function escape_string($string,$quotestyle='both'){\n\t\t$string = mysqli_real_escape_string($this->conn,$string);\n\t\tswitch(strtolower($quotestyle)){\n\t\t\tcase 'double':\n\t\t\tcase 'd':\n\t\t\tcase '\"':\n\t\t\t\t$string = str_replace(\"\\'\",\"'\",$string);\n\t\t\tcase 'single':\n\t\t\tcase 's':\n\t\t\tcase \"'\":\n\t\t\t\t$string = str_replace(\"\\\"\",'\"',$string);\n\t\t\t\tbreak;\n\t\t\tcase 'both':\n\t\t\tcase 'b':\n\t\t\tcase '\"\\'':\n\t\t\tcase '\\'\"':\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "a82a75a86dd44fd2095a037190569498", "score": "0.64329606", "text": "protected function enquote($str, $quote = '\"')\n {\n return $quote . $str . $quote;\n }", "title": "" }, { "docid": "945bf9e1e9478e5aa3109ce2f49683de", "score": "0.64323705", "text": "function changeQuote($str)\n{\n return ereg_replace(\"'\", \"`\", $str);\n}", "title": "" }, { "docid": "3afc5d5f94418940b86266c9c74767fa", "score": "0.6357578", "text": "public static function quote($string, $quoteChar = \"'\") {\n $result = str_replace(\n array('\\\\', \"\\r\", \"\\n\", $quoteChar, '--'),\n array('\\\\\\\\', \"\\\\r\", \"\\\\n\", '\\\\'.$quoteChar, '-'.$quoteChar.' + '.$quoteChar.'-'),\n $string\n );\n return $quoteChar.$result.$quoteChar;\n }", "title": "" }, { "docid": "e08a1a3490e99df9b7efb18fd0c1ed69", "score": "0.6349581", "text": "public function sanitize_quote($str){$str=addslashes($str);return $str;}", "title": "" }, { "docid": "80b232170b7248821c3320f7641d8c06", "score": "0.6336705", "text": "function qode_addslashes($str) {\n\t\t\n\t\t$str = addslashes($str);\n\t\t\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "a558bfc269cfd029305a3a8db162b36d", "score": "0.632896", "text": "public function str($string)\n {\n return \"'\".strtr($string,array(\"'\"=>'\\\\\\'','\\\\'=>'\\\\\\\\')).\"'\";\n }", "title": "" }, { "docid": "f10e3f6909383b20ae18dfcd4915e7cf", "score": "0.63266224", "text": "function escJsStr($str)\r\n {\r\n return addcslashes($str, '\\'');\r\n }", "title": "" }, { "docid": "f8c304e714063fbd901d3211a898c09a", "score": "0.62872857", "text": "function nice_addslashes($string)\n{\n // if magic quotes is on the string is already quoted, just return it\n if(MAGIC_QUOTES)\n return $string;\n else\n return addslashes($string);\n}", "title": "" }, { "docid": "6ff8edf9119bec8f878a45c35ab74f0d", "score": "0.627084", "text": "public static function quotes($string = null)\n {\n return \"'\" . $string . \"'\";\n }", "title": "" }, { "docid": "f03023314b8dddfa96081b39093b7a01", "score": "0.6267446", "text": "private static function xpathQuote( string $s ): string {\n\t\t$parts = explode( \"'\", $s );\n\t\t$parts = array_map( static function ( string $ss ) {\n\t\t\treturn \"'$ss'\";\n\t\t}, $parts );\n\t\tif ( count( $parts ) === 1 ) {\n\t\t\treturn $parts[0];\n\t\t} else {\n\t\t\treturn 'concat(' . implode( ',\"\\'\",', $parts ) . ')';\n\t\t}\n\t}", "title": "" }, { "docid": "304624cce625e64c49ee6296fa93d61b", "score": "0.6257489", "text": "function quote($str) {\n\treturn (MAGIC_QUOTES ? $str : addslashes($str));\n}", "title": "" }, { "docid": "9da2db354cd441a155d325c3a2ebe0c9", "score": "0.62568635", "text": "public function quoteForString ( $sString )\r\n {\r\n $sString = str_replace( array( '\"', \"\\r\", \"\\n\" ), array( \"'\", '', '' ), $sString );\r\n $sString = strip_tags( $sString );\r\n return $sString;\r\n }", "title": "" }, { "docid": "b4af5049fd1c5bc22e54fd9a148b59cf", "score": "0.6224297", "text": "function my_quotes($value)\n{\n return str_replace('\"', '&quot;', $value);\n}", "title": "" }, { "docid": "7595435d4b05dbc8cebdbb02a72e49fb", "score": "0.6221372", "text": "protected function styleQuotes(string $html): string\n {\n // use &quot;, not \", because of the possibility that the tag exists inside of an attribute-value an could end\n // the attribute-value by \" - HTML elements' attrbutes are removed above, this is no longer an argument.\n // thus simply use `\"` instead of `&quot;`\n $html = preg_replace('/' . $this->getTagPattern(['blockquote', 'q'], false) . '\\s*/i', '$0\"', $html);\n\n // again &quot;, not \". see line above - no longer relevant\n $html = preg_replace('/\\s*' . $this->getTagPattern(['blockquote', 'q'], true) . '/i', '\"$0', $html);\n\n return $html;\n }", "title": "" }, { "docid": "d2ef4369b3f521d98c69fb894fbee3cf", "score": "0.62140507", "text": "function daddslashes1($string, $force = 0) {\n\t!defined('MAGIC_QUOTES_GPC') && define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());\n\tif(!MAGIC_QUOTES_GPC || $force) {\n\t\tif(is_array($string)) {\n\t\t\tforeach($string as $key => $val) {\n\t\t\t\t$string[$key] = daddslashes($val, $force);\n\t\t\t}\n\t\t} else {\n\t\t\t$string = addslashes($string);\n\t\t}\n\t}\n\treturn $string;\n}", "title": "" }, { "docid": "b03182eee24f5e44058035c761559e25", "score": "0.6209034", "text": "function pilau_undo_magic_quotes( $string ) {\n\t\tif ( is_string( $string ) ) {\n\t\t\t$string = str_replace( array( \"\\'\", '\\\"' ), array( \"'\", '\"' ), $string );\n\t\t}\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "66651969c9c5b6dfd918d5d1e55ca44b", "score": "0.6175208", "text": "function convert_smart_quotes($string){ \n return str_replace( \n array(\"\\xe2\\x80\\x98\", \"\\xe2\\x80\\x99\", \"\\xe2\\x80\\x9c\", \"\\xe2\\x80\\x9d\", \"\\xe2\\x80\\x93\", \"\\xe2\\x80\\x94\", \"\\xe2\\x80\\xa6\",chr(145), chr(146), chr(147), chr(148), chr(150), chr(151), chr(133)),\n array(\"'\", \"'\", '\"', '\"', '-', '--', '...',\"'\", \"'\", '\"', '\"', '-', '--', '...'), \n $string); \n}", "title": "" }, { "docid": "f5480f001fe26f996bf9c8aa9eb35301", "score": "0.6149881", "text": "static public function escapeValue(string $string): string\n {\n return addslashes($string);\n }", "title": "" }, { "docid": "1de7062f544dac77c3eaa6867492bf56", "score": "0.6121483", "text": "function singlequote($text) {\n return str_replace(\"'\", '&apos;', $text);\n }", "title": "" }, { "docid": "375258f391a4bcf0b1dce1b36816cdee", "score": "0.6115033", "text": "function magicquotes(&$string)\r\n\t{\r\n\t\tif ( get_magic_quotes_gpc() )\r\n\t\t\treturn stripslashes($string);\r\n\t\telse\r\n\t\t\treturn $string;\r\n\t}", "title": "" }, { "docid": "f7c39f9abef7dfbc0c8b861ed81244e1", "score": "0.6111797", "text": "function quote($string, $quote = \"'\") {\n assertType($string, \"string\");\n return $quote.$string.$quote;\n}", "title": "" }, { "docid": "d85aa01e7b6cee2c325e8320fddc988f", "score": "0.61067915", "text": "function escape_quotes(string $string, string $quote_style)\n{\n\t$f = __FUNCTION__;\n\t$print = false;\n\tif (is_int($string) || is_float($string) || is_double($string)) {\n\t\treturn $string;\n\t} elseif (! isset($quote_style)) {\n\t\tDebug::error(\"{$f} received null quote style\");\n\t} elseif (is_object($string) && $string instanceof StringifiableInterface) {\n\t\t$string = $string->__toString();\n\t} elseif (! is_string($string)) {\n\t\t$gottype = gettype($string);\n\t\tDebug::error(\"{$f} received a {$gottype}\");\n\t}\n\t$replaced = str_replace($quote_style, \"\\\\{$quote_style}\", $string);\n\tif ($print && $string !== $replaced) {\n\t\tDebug::print(\"{$f} transformed string \\\"{$string}\\\" into \\\"{$replaced}\\\"\");\n\t}\n\treturn $replaced;\n}", "title": "" }, { "docid": "3199fe44803047376fcf7052ebc6d6d8", "score": "0.610503", "text": "function addslashesPacking( $this_quote_type, $value )\n{\n if ( $this_quote_type == 's' ) {\n return str_replace( \"'\", \"\\'\", $value );\n } else {\n return str_replace( '\"', '\\\"', $value );\n }\n}", "title": "" }, { "docid": "844321a4d96f7912eaf10b6879f502ba", "score": "0.61049956", "text": "function replaceText ($text) {\r\n\t\t$text = str_replace('\\\"','', $text);\r\n\t\treturn $text;\r\n\t}", "title": "" }, { "docid": "74e39d13d08df7c170f2cbc18157b7cc", "score": "0.6087613", "text": "public function replaceSingleQuote($text)\n { \n return str_replace(\"'\", \"&#39;\", $text);\n }", "title": "" }, { "docid": "e7027dc98aef7dd7e9f8bb72f2a95051", "score": "0.60866475", "text": "private function _getHtmlQuote()\n {\n if ($this->_isJson) {\n return '\\\"';\n } else {\n return '\"';\n }\n }", "title": "" }, { "docid": "96670e146dbf8f4d5703a615729b787d", "score": "0.6080892", "text": "function remove_quotes($string)\n{\n\tlog_message('debug', 'common_functions_helper/remove_quotes');\n\treturn str_replace('\"', '', str_replace(\"'\", '', $string));\n}", "title": "" }, { "docid": "e55bbf9c487a80cbdc38dcf62779bc4f", "score": "0.6073459", "text": "function AddQuotes($cval){\r\n\t\tif($cval==\"string\" || strchr($cval,\"blob\") || strchr($cval,\"text\") || $cval==\"enum\" || $cval==\"set\" || strchr($cval,\"date\") || $cval==\"time\"){\r\n\t\t\treturn \"'\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c4adb5444ea03f170aca81437ea0910f", "score": "0.6070704", "text": "protected function _addQuotes(&$value, $key)\n {\n $value = \"'\" . $value . \"'\";\n }", "title": "" }, { "docid": "fbcc522640769fbdc9a8d503dc0f7a4e", "score": "0.6069984", "text": "protected function _quote($value)\n {\n \t$value = str_replace('\"', \"'\", $value);\n \treturn $value;\n }", "title": "" }, { "docid": "82b7046166f9376019a1e3841e36e195", "score": "0.60632974", "text": "public function escape($string) {\n\t\treturn preg_replace('/(^[\\'\"]|[\\'\"]$)/', '', $this->store->quote($string));\n\t}", "title": "" }, { "docid": "fddb3182ba8c874211907c3f5f551678", "score": "0.604532", "text": "function removeQuote($string)\n{\n $string = trim($string);\n $string = str_replace(\"\\'\", \"'\", $string);\n //$string = str_replace(\"'\", \"''\", $string);\n return $string;\n}", "title": "" }, { "docid": "2ec615b34fda4d9baf5fe816393559a4", "score": "0.6032754", "text": "private function csvEscape($str)\n {\n //\n // \"If double-quotes are used to enclose fields, then a double-quote\n // appearing inside a field must be escaped by preceding it with\n // another double quote.\"\n return sprintf('\"%s\"',preg_replace('/\"/u','\"\"',$str));\n }", "title": "" }, { "docid": "066f5314d6cce01e3b7946ac0847a1c7", "score": "0.60271144", "text": "public function escapeString($string)\r\n\t{\r\n\t\tif (!get_magic_quotes_gpc())\r\n\t\t{\r\n\t\t\t$string = addslashes($string);\r\n\t\t}\r\n\t\treturn $string;\r\n\t}", "title": "" }, { "docid": "9728d4ca43d2c33b43f859e5a107a803", "score": "0.60126215", "text": "public function quoteString($string)\n {\n $string = $this->quoteSmart($string);\n if ($string{0} == \"'\") {\n return substr($string, 1, -1);\n }\n return $string;\n }", "title": "" }, { "docid": "daa0395938e4265f04da7f1a630f0996", "score": "0.60095567", "text": "public static function quote($str) {\n return self::getInstance()->quote($str);\n //return addslashes($str); // unsafe 0xbf5c\n }", "title": "" }, { "docid": "af586db20f2848b7212d5f0bbb43a138", "score": "0.59798926", "text": "protected function _escape($str) {\n\t\t$enclosed = false;\n\t\t// first, check for embedded double quotes\n\t\tif (strpos($str, '\"') !== false) {\n\t\t\t$str = str_replace('\"', '\"\"', $str);\n\t\t\t$str = '\"'.$str.'\"';\n\t\t\t$enclosed = true;\n\t\t}\n\t\t// second, check all other conditions that require enclosing in double quotes\n\t\tif ((\n\t\t\tstrpos($str, ',') !== false ||\t// embedded commas\n\t\t\tstrpos($str, \"\\n\") !== false ||\t// embedded line-breaks\n\t\t\tstrpos($str, \"\\r\") !== false || // \t\"\t\t\t\"\n\t\t\tpreg_match('~^\\s|\\s$~', $str)\t// starting or ending with whitespace character\n\t\t) && !$enclosed) {\n\t\t\t$str = '\"'.$str.'\"';\n\t\t}\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "0b7f2c43299b8a3eccebf8cdf51d24e9", "score": "0.5956578", "text": "function domesticate($input)\r\n{\r\n\t$input = stripslashes($input);\r\n\t$input = str_replace(\"'\", \"''\", $input);\r\n\t$input = str_replace('\"', \"''\", $input);\r\n\treturn ($input);\r\n}", "title": "" }, { "docid": "8d09d32f43d1836e09513e0d8fdacb9e", "score": "0.5931181", "text": "private function addSlashes(string $sStr): string\n {\n return addslashes($sStr);\n }", "title": "" }, { "docid": "be7a7348dd5e0fb16e2468e9f8f21d1a", "score": "0.5917787", "text": "function addslashes_js($text, $quotetype = \"'\")\n{\n\tif ($quotetype == \"'\")\n\t{\n\t\t// single quotes\n\t\treturn str_replace(array('\\\\', '\\'', \"\\n\", \"\\r\"), array('\\\\\\\\', \"\\\\'\",\"\\\\n\", \"\\\\r\"), $text);\n\t}\n\telse\n\t{\n\t\t// double quotes\n\t\treturn str_replace(array('\\\\', '\"', \"\\n\", \"\\r\"), array('\\\\\\\\', \"\\\\\\\"\",\"\\\\n\", \"\\\\r\"), $text);\n\t}\n}", "title": "" }, { "docid": "748fc3ad04602d5f5ec1edaef0d1b124", "score": "0.58915114", "text": "public function quoteStringLiteral(string $str): string\n {\n return \"'\" . str_replace(\"'\", \"''\", $str) . \"'\";\n }", "title": "" }, { "docid": "881b517984e7b4ceccc7d7b325cda5b4", "score": "0.5887039", "text": "public function quoteStringLiteral(string $str): string\n {\n $str = str_replace('\\\\', '\\\\\\\\', $str);\n\n return parent::quoteStringLiteral($str);\n }", "title": "" }, { "docid": "ed31a3338970a50e8d9ade27c1c33689", "score": "0.58732015", "text": "function escapeQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"'\",\"||\",$var);\n\t\t\t$string = str_replace('\"','||||',$string);\n\t\t}\n\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "ed31a3338970a50e8d9ade27c1c33689", "score": "0.58732015", "text": "function escapeQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"'\",\"||\",$var);\n\t\t\t$string = str_replace('\"','||||',$string);\n\t\t}\n\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "dbe66bd2ffc12df93643cfbe9e09f6d8", "score": "0.5863409", "text": "function export_escape($str){\n // returns: csv quoted and escaped string\n \n return '\"' . str_replace('\"', '\\\"', $str) . '\",'; \n\n }", "title": "" }, { "docid": "9662ce9ffbea851e3742aae1fce8a42e", "score": "0.58430535", "text": "function unQuote($value) {\n\n //Replacing the single and double quotes\n $value = str_replace(array(\"'\", \"\\\"\"), '', $value);\n return $value;\n}", "title": "" }, { "docid": "ffcd9a641e850af906cd4c2b1b8ec4a9", "score": "0.5830954", "text": "function quote($s) {\n return \"'\" . addslashes(canonicalize_whitespace($s)) . \"'\";\n}", "title": "" }, { "docid": "ffcd9a641e850af906cd4c2b1b8ec4a9", "score": "0.5830954", "text": "function quote($s) {\n return \"'\" . addslashes(canonicalize_whitespace($s)) . \"'\";\n}", "title": "" }, { "docid": "eac0fe3bcf50170180b82f11f8200ddb", "score": "0.5819562", "text": "function escapeString($string) \n{\n\t//$string = str_replace('/', \"\\\\/\", $string);\n\t//$string = str_replace('\"', \"\\\\\".'\"', $string);\n\t$string = str_replace(\"\\b\", \"\\\\b\", $string);\n\t$string = str_replace(\"\\t\", \"\\\\t\", $string);\n\t$string = str_replace(\"\\n\", \"\\\\n\", $string);\n\t$string = str_replace(\"\\f\", \"\\\\f\", $string);\n\t$string = str_replace(\"\\r\", \"\\\\r\", $string);\n\t$string = str_replace(\"\\u\", \"\\\\u\", $string);\n\t//return '\"'.$string.'\"';\n\treturn $string;\n}", "title": "" }, { "docid": "35c0f3d8f91f2f1c9e5cd49203a93838", "score": "0.58138937", "text": "private function PrepareFormatedText($string)\n\t{\n\t\t$search\t= array('\"', \"'\");\n\t\t$replace = array(\"&#34;\", \"&#39;\");\n\t\treturn str_replace($search, $replace, $string);\n\t}", "title": "" }, { "docid": "46ebf297837b01920bc1123f45129566", "score": "0.58090097", "text": "function doublequoteclosing() {\n\t\t$this->cdata(\"”\");\n }", "title": "" }, { "docid": "09c1b1c05b0152f71b7c9cfe11f7329b", "score": "0.57997274", "text": "function fieldQuote($value)\n\t{\n\t\treturn ('`'.$value.'`');\n\t}", "title": "" }, { "docid": "30def5aace5bff4b927ce812bd1d1069", "score": "0.5799447", "text": "function quote($cadena)\n\t{\n\t\treturn addslashes($cadena);\n\t}", "title": "" }, { "docid": "e0be7d046ff270f4d33407ed06fb296b", "score": "0.57907295", "text": "function fullQuoteStr($str, $table) {\r\n return '\\'' . mysql_real_escape_string($str, $this->resource_connection) . '\\'';\r\n }", "title": "" }, { "docid": "3012fefeaf95f22207003e3e9cb1a1f0", "score": "0.57622564", "text": "function medigroup_mikado_addslashes($str)\n\t{\n\t\t//is magic quotes turned off in php.ini?\n\t\tif (!get_magic_quotes_gpc()) {\n\t\t\t//apply addslashes\n\t\t\t$str = addslashes($str);\n\t\t}\n\n\t\t//return escaped string\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "d6a17fe093df0975ae598f7298828ff3", "score": "0.5760928", "text": "function xml_escape_string($str) \n\t{\n\t\treturn str_replace(\"&#039;\", \"&apos;\", htmlspecialchars($str, ENT_QUOTES));\n\t}", "title": "" }, { "docid": "bdeb3800e4c9014aa1e9796c191b8688", "score": "0.5757214", "text": "function add_slash ($string){\n\t\tglobal $config;\n\t\t\n\t\tif($config['add_slash'])\n\t\t\t$string=addslashes($string);\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "9959b41cf4a62ffa713612cdddf29e59", "score": "0.57405454", "text": "function _jsescape( $string ) {\r\n\r\n $trans = Array(\r\n '\"' => '\\\"',\r\n \"'\" => \"\\'\",\r\n '\\\\' => '\\\\\\\\',\r\n );\r\n\r\n return strtr( strip_tags( $string ), $trans );\r\n\r\n }", "title": "" }, { "docid": "a7be5c56085e4d29e2c3697faceed2de", "score": "0.57265025", "text": "function dbString($string)\n{\n\t$string=trim($string);\n\tif (get_magic_quotes_gpc())\n\t{\n\t\treturn $string;\n\t}\n\telse\n\t{\n\t\treturn addslashes($string);\n\t}\n}", "title": "" }, { "docid": "e0d34ddcd20eb9397c554dbee69771e4", "score": "0.5720103", "text": "protected function quote($input) {\n \treturn \"'\".$input.\"'\";\n }", "title": "" }, { "docid": "b4a548f45a3a1d145a5e25939cb47498", "score": "0.57172555", "text": "public static function wrapStringWithQuotes($string)\n {\n $returnString = null;\n\n $regex = '/^(((`[^`]*($|`))+)|((\\[[^\\]]*($|\\]))(\\][^\\]]*($|\\]))*)|'.\n '((\"[^\"\\\\\\\\]*(?:\\\\\\\\.[^\"\\\\\\\\]*)*(\"|$))+)|((\\'[^\\'\\\\\\\\]*(?:\\\\\\\\.[^\\'\\\\\\\\]*)*(\\'|$))+))/s';\n\n if (1 == \\preg_match($regex, $string, $matches)) {\n $returnString = $matches[1];\n }\n\n return $returnString;\n }", "title": "" }, { "docid": "3b8e4de82fc824a5a0c4ac4b8a936f9a", "score": "0.5714076", "text": "private function _string_escape($str) \n\t{ \n\t $len=strlen($str); \n\t $escapeCount=0; \n\t $targetString=''; \n\t for($offset=0;$offset<$len;$offset++) { \n\t switch($c=$str{$offset}) { \n\t case \"'\": \n\t if($escapeCount % 2 == 0) $targetString.=\"\\\\\"; \n\t $escapeCount=0; \n\t $targetString.=$c; \n\t break; \n\t case '\"': \n\t if($escapeCount % 2 == 0) $targetString.=\"\\\\\"; \n\t $escapeCount=0; \n\t $targetString.=$c; \n\t break; \n\t case '\\\\': \n\t $escapeCount++; \n\t $targetString.=$c; \n\t break; \n\t default: \n\t $escapeCount=0; \n\t $targetString.=$c; \n\t } \n\t } \n\t return $targetString; \n\t}", "title": "" }, { "docid": "bb6b8577952566e3cded422582367006", "score": "0.5702021", "text": "function saddslashes($string) {\n\tif(is_array($string)) {\n\t\tforeach($string as $key => $val) {\n\t\t\t$string[$key] = saddslashes($val);\n\t\t}\n\t} else {\n\t\t$string = addslashes($string);\n\t}\n\treturn $string;\n}", "title": "" }, { "docid": "19fce34d0167c5ea781229141a91a8ab", "score": "0.5693565", "text": "function daddslashes($string) {\n\tif(is_array($string)) {\n\t\tforeach($string as $key => $val) {\n\t\t\t$string[$key] = daddslashes($val);\n\t\t}\n\t} else {\n\t\t$string = addslashes($string);\n\t\t\n\t}\n\treturn $string;\n}", "title": "" }, { "docid": "f05feb7afe0260a50968737be4a1b163", "score": "0.5689303", "text": "public function Quote( $text, $escaped = true ) {\n\t\treturn '\\''.($escaped ? $this->getEscaped( $text ) : $text).'\\'';\n\t}", "title": "" }, { "docid": "4e3637d45d526d65ebee1f212eb4e4db", "score": "0.5676739", "text": "function _esc($str) {\n\t\tif(function_exists('mysql_real_escape_string'))\n\t\t\treturn(mysql_real_escape_string($str, self::$conn));\n\t\telse if(function_exists('mysql_escape_string'))\n\t\t\treturn(mysql_escape_string($str));\n\t\telse\n\t\t\treturn(addslashes($str));\n\t}", "title": "" }, { "docid": "380cc44112ec33722e5799df1ea8ad27", "score": "0.5663073", "text": "function sql_addslashes( $a_string = '', $is_like = false ) {\n\t\tif ( $is_like ) $a_string = str_replace( '\\\\', '\\\\\\\\\\\\\\\\', $a_string );\n\t\telse $a_string = str_replace( '\\\\', '\\\\\\\\', $a_string );\n\t\treturn str_replace( '\\'', '\\\\\\'', $a_string );\n\t}", "title": "" }, { "docid": "55fbe61b309f389df9a29618d134f32b", "score": "0.5652468", "text": "function remplazaCharSpecial($arg){\n\t\t$arg = str_replace(\"'\", \"\", $arg);\n\t\t$arg = str_replace('\"', \"\", $arg);\n\treturn $arg;\n\t}", "title": "" }, { "docid": "855c497a30fd4d88ec86ca227f36d138", "score": "0.565208", "text": "function add_concat($source_string) {\nif ((strpos($source_string,\"'\")!==false) and (strpos($source_string,\"\\\"\")!==false))\n{echo \"ERROR - \" . current_line() . \" inconsistent quotes in \" . $source_string . \"\\n\";}\nelse if (strpos($source_string,\"'\")!==false) $quote_type = \"'\"; // derive quote type used\nelse if (strpos($source_string,\"\\\"\")!==false) $quote_type = \"\\\"\"; else $quote_type = \"none\";\n$within_quote = false; $source_string = trim($source_string); // trim for future proof\nfor ($srcpos=0; $srcpos<strlen($source_string); $srcpos++) {\nif ($source_string[$srcpos] == $quote_type) $within_quote = !$within_quote; \nif (($within_quote == false) and ($source_string[$srcpos]==\" \")) $source_string[$srcpos] = \"+\";}\n$source_string = str_replace(\"+++++\",\"+\",$source_string); $source_string = str_replace(\"++++\",\"+\",$source_string);\n$source_string = str_replace(\"+++\",\"+\",$source_string); $source_string = str_replace(\"++\",\"+\",$source_string);\nreturn $source_string;}", "title": "" }, { "docid": "4cd114e10460e516c71faeab4daa27d8", "score": "0.5650495", "text": "protected function centralfeed_escape_csv_value($string = '')\n {\n $string = str_replace('\"', '\"\"', $string);\n $string = wp_specialchars_decode($string);\n $string = str_replace(PHP_EOL, \"\\r\\n\", $string);\n\n\n if (strpos($string, '\"') !== false or strpos($string, ',') !== false or strpos($string, \"\\r\") !== false or strpos($string, \"\\n\") !== false)\n $string = '\"' . $string . '\"';\n\n return $string;\n\n }", "title": "" }, { "docid": "8e46b51e93bd12bc4af47300c459b103", "score": "0.5641282", "text": "function drush_wrap_with_quotes($arg) {\n $has_double = strpos($arg, '\"') !== FALSE;\n $has_single = strpos($arg, \"'\") !== FALSE;\n if ($has_double && $has_single) {\n return drush_escapeshellarg($arg);\n }\n elseif ($has_double) {\n return \"'\" . $arg . \"'\";\n }\n else {\n return '\"' . $arg . '\"';\n }\n}", "title": "" }, { "docid": "e5d7ad40b37929c3ca8e0f939e998b29", "score": "0.56275576", "text": "private function formatValue($str) {\n return addcslashes($str, \",\\\\;\");\n }", "title": "" }, { "docid": "9bf8f25a61e21ca0d99a83a3e070064f", "score": "0.56271636", "text": "function quoteHTML($str)\n{\n\treturn str_replace(\"\\\"\", \"&quot;\", $str);\n}", "title": "" }, { "docid": "2d7a3490124b067ddccc8da7729b67fe", "score": "0.5626839", "text": "public static function escapeSingleQuoteEntity($s)\n {\n return str_replace(\"'\", '&apos;', $s);\n }", "title": "" }, { "docid": "fdada89ede3a56c3dfc9b57285da1735", "score": "0.5619386", "text": "function rquote(&$str, $key = null)\n\t{\n\t\t$str = '`' . $str . '`';\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "874ebea63eb36945552b88e6f78c8d05", "score": "0.56141496", "text": "function addslashes($text) {\r\r\n if (get_magic_quotes_gpc()) return $text;\r\r\n else return addslashes($text);\r\r\n }", "title": "" }, { "docid": "547a8b89366bd70a4542556de3681515", "score": "0.5608886", "text": "function quote(&$str, $key = 0)\n\t{\n\t\t$str = $this->_db->Quote($str);\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "789c85cc683f7129ed1100dd8168c541", "score": "0.5606397", "text": "function escapeString($string) {\n\t\treturn preg_replace('/([\\,;])/','\\\\\\$1', $string);\n\t}", "title": "" }, { "docid": "9942d17bf126761eb1f7ad05b4f67073", "score": "0.5596879", "text": "public static function exportString($string){\n\t\tif(strpos($string,\"'\")===false) return \"'\".$string.\"'\";\n\t\tif(strpos($string,'\"')===false) return '\"'.$string.'\"';\n\t\t\n\t\tif(strpos($string,\"\\n\")!==false || strpos($string,\"\\r\")!==false || strpos($string,\"\\t\")!==false\n\t\t\t\t || strpos($string,\"\\v\")!==false || strpos($string,\"\\f\")!==false)\n\t\t\treturn '\"'.str_replace(array('\\\\',\"\\n\",\"\\r\",\"\\t\",\"\\v\",\"\\f\",'$'),array('\\\\\\\\','\\n','\\r','\\t','\\v','\\f','\\$'),$string).'\"';\n\t\t\n\t\t$count1=substr_count($string,\"'\")+substr_count($string,\"\\\\'\"); $count2=substr_count($string,'\"')+substr_count($string,'$')+substr_count($string,'\\\\');\n\t\tif($count2 < $count1) return '\"'.str_replace(array('\\\\','$','\"'),array('\\\\\\\\','\\$','\\\"'),$string).'\"';\n\t\telse return \"'\".str_replace(array('\\\\\\'','\\''),array('\\\\\\\\\\'','\\\\\\''),$string).\"'\";\n\t}", "title": "" } ]
1e775b6bc7ccef252ee56a0f2b0f59fc
Check if the property is public
[ { "docid": "502b6da5b068f0e9316088ed3674c344", "score": "0.0", "text": "public function __set($fieldName, $value)\n {\n try {\n $R = new \\ReflectionClass($this);\n $property = $R->getProperty($fieldName);\n } catch(\\ReflectionException $e) {\n // Property doesn't exist, call the stupid parent\n return parent::__set($fieldName, $value);\n }\n if ($property->isPublic()) {\n // Again, call your parents\n return parent::__set($fieldName, $value);\n } else {\n // Property exists, and it's private / protected\n try {\n // Maybe there is a setter for this one?\n $nameArr = explode('_',$fieldName);\n $methodName = 'set';\n foreach ($nameArr as $vv) {\n $methodName.=ucwords($vv);\n }\n $method = $R->getMethod($methodName);\n // Okay, no exception, let's call it\n return $this->$methodName($value);\n } catch(\\ReflectionException $up) {\n // Just let it go through\n throw $up;\n }\n }\n }", "title": "" } ]
[ { "docid": "cb3f9dca817a352e207d571e88d434e1", "score": "0.7971091", "text": "public function isPublic(): bool\n {\n return $this->{self::ATTR_PUBLIC} === true;\n }", "title": "" }, { "docid": "3c563e691723141d476994e593dcdfdf", "score": "0.78432", "text": "public function isPublic()\n\t{\n\t\treturn ! $this->isPrivate();\n\t}", "title": "" }, { "docid": "ca2e510d3bddb04f1069675584f3bff5", "score": "0.7840695", "text": "public function isPublic()\n {\n return $this->flagsHas(self::IS_PUBLIC);\n }", "title": "" }, { "docid": "09472f0c16afda7532fad99644f18ce0", "score": "0.7838527", "text": "public function isPublic() {}", "title": "" }, { "docid": "0bba89ee84014690d1705808f0d82843", "score": "0.7828764", "text": "public function isPublic()\n {\n return $this->public;\n }", "title": "" }, { "docid": "75ea1bc384cbfd71e6914d40903a3eaa", "score": "0.7827284", "text": "public function is_public()\n {\n return $this->is_public;\n }", "title": "" }, { "docid": "747c6018ea5dbc827012b556d4eb073b", "score": "0.7792845", "text": "public function isPublic()\n\t{\n\t\treturn $this->public;\n\t}", "title": "" }, { "docid": "32e9c74963a4d23d77710a4cb729df68", "score": "0.7784841", "text": "public function isPublic()\n {\n return $this->isPublic;\n }", "title": "" }, { "docid": "ebf8f88f4809ea43d3ec38b040567b76", "score": "0.7779858", "text": "public function isPublic(): bool\n {\n return self::ACCESSOR_PUBLIC === $this->accessor;\n }", "title": "" }, { "docid": "2ea5a053ba0d06de254eabbf900b8b59", "score": "0.77311695", "text": "public function isPublic(): bool\n {\n return ($this->modifiers & CoreReflectionMethod::IS_PUBLIC) === CoreReflectionMethod::IS_PUBLIC;\n }", "title": "" }, { "docid": "7f0ccddcb5f11a9c684d07c0885646b2", "score": "0.76992667", "text": "public function isPublic()\n {\n return $this->source->public;\n }", "title": "" }, { "docid": "d91d4e5e08b446e35b341a7c64a7ce15", "score": "0.76810884", "text": "public function is_public();", "title": "" }, { "docid": "2db321c7ec3f265fd2f002cf4652aa7f", "score": "0.7627659", "text": "public function isPublic();", "title": "" }, { "docid": "2db321c7ec3f265fd2f002cf4652aa7f", "score": "0.7627659", "text": "public function isPublic();", "title": "" }, { "docid": "2db321c7ec3f265fd2f002cf4652aa7f", "score": "0.7627659", "text": "public function isPublic();", "title": "" }, { "docid": "566f2aec4adbe975412533cb9021604d", "score": "0.75837266", "text": "public function isPublic()\n {\n return false;\n }", "title": "" }, { "docid": "6c0352e171e51391a72f9e6519350679", "score": "0.75049263", "text": "public function isPublic()\r\n {\r\n return ($this->getct_is_public() == 1) ? true : false;\r\n }", "title": "" }, { "docid": "441dc806a1958bbc59c40325635cbff5", "score": "0.7421526", "text": "public function isPublic()\n {\n if (array_key_exists('is_public', $this->attributes)) {\n return $this->attributes['is_public'];\n }\n\n if (isset($this->is_public)) {\n return $this->is_public;\n }\n\n return true;\n }", "title": "" }, { "docid": "8543513817a68a9ee56386ceb1829e17", "score": "0.7393547", "text": "public function has_public_access(): bool {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "9d8cbbcdbc5d7e8c01ce0c46acc66154", "score": "0.73804855", "text": "public function isPublic() {\n\t\t$mgr = $this->getPermissionManager();\n\t\treturn $mgr->getPermissions() ? false : true;\n\t}", "title": "" }, { "docid": "24504766cede2615e20f6ce43c8385af", "score": "0.73649687", "text": "public function isPublic()\n {\n return (is_null($this->nestedIn)) ? true : false;\n }", "title": "" }, { "docid": "84f941e266b54245043bbf70ca47a192", "score": "0.7198876", "text": "public function isPubliclyAccessible(): bool\n {\n return $this->getUrlGenerator()->isPubliclyAccessible();\n }", "title": "" }, { "docid": "d9f3a3026a3cdf1a37d5746117bb8234", "score": "0.7162613", "text": "public function isPublicUse();", "title": "" }, { "docid": "f2c694493de1de148642bbd719d7314f", "score": "0.7142555", "text": "abstract public function isPublic(): bool;", "title": "" }, { "docid": "961f980b4d995663d3f29e3f47318dba", "score": "0.70621276", "text": "private function isAccessibleProperty(string $property): bool\n {\n if (!property_exists($this, $property)) {\n return false;\n }\n if (static::class === self::class) {\n return true;\n }\n $reflectionProperty = new ReflectionProperty($this, $property);\n return !$reflectionProperty->isPrivate();\n }", "title": "" }, { "docid": "351bfbe9e251226d3e89def4cc90b256", "score": "0.7022237", "text": "function visible($obj,$key) {\n\t\tif (property_exists($obj,$key)) {\n\t\t\t$ref=new ReflectionProperty(get_class($obj),$key);\n\t\t\t$out=$ref->ispublic();\n\t\t\tunset($ref);\n\t\t\treturn $out;\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "d196781a5d96f743bc9ae4b8cfe6b0d5", "score": "0.7005423", "text": "public function isPublic()\n {\n $this->type = 'public';\n return $this;\n }", "title": "" }, { "docid": "00d20c85060f16140219d4ea1b3d55aa", "score": "0.6971612", "text": "final protected function shouldHavePublicProperty ($objectOrClass, $property) {\n\t\t$arguments = func_get_args();\n\t\tarray_shift($arguments);\n\n\t\t// Test all given properties\n\t\tforeach ($arguments as $argument) {\n\t\t\tif (!property_exists($objectOrClass, $argument)) {\n\t\t\t\treturn $this->fail();\n\t\t\t} else if ($this->_propertyVisibility($objectOrClass, $argument) !== 'public') {\n\t\t\t\treturn $this->fail();\n\t\t\t}\n\t\t}\n\n\t\treturn $this->pass();\n\t}", "title": "" }, { "docid": "7a7dc9b43eb3c64f01000ca1bafe8efe", "score": "0.6954236", "text": "protected function checkWritablePublic()\r\n {\r\n $path = rtrim($this->app->make('path.public'), '/') . '/';\r\n return $this->isWritable($path);\r\n }", "title": "" }, { "docid": "0876bba4c7719c3e92561011853ea78c", "score": "0.6811241", "text": "public function isPrivate() {\n return $this->private;\n }", "title": "" }, { "docid": "e543a8cc37fdf450eae37a36b2afd76b", "score": "0.6765078", "text": "public function isPublic()\n {\n return $this->visibility == self::OPEN_WORLD;\n }", "title": "" }, { "docid": "9c291e2cf51591bce751a2a13c4f8233", "score": "0.675165", "text": "public function getPublic()\r\n {\r\n return $this->public;\r\n }", "title": "" }, { "docid": "7474337ad62fcb2ec7cdadc4c72f5d5a", "score": "0.67193323", "text": "public function isPrivate()\n {\n return $this->private;\n }", "title": "" }, { "docid": "1e89a2bb7ee0e6d39c919fe82ca5cb20", "score": "0.6710907", "text": "public function isPrivate();", "title": "" }, { "docid": "1e89a2bb7ee0e6d39c919fe82ca5cb20", "score": "0.6710907", "text": "public function isPrivate();", "title": "" }, { "docid": "1e89a2bb7ee0e6d39c919fe82ca5cb20", "score": "0.6710907", "text": "public function isPrivate();", "title": "" }, { "docid": "6622e58060a29626ea33944389dc9c40", "score": "0.67012244", "text": "public function getPublic()\n {\n return $this->public;\n }", "title": "" }, { "docid": "59854c2617a397cbea0f6f1e4fa8e135", "score": "0.6661386", "text": "public function getPublic() {\n return $this->public;\n }", "title": "" }, { "docid": "24c3789380794a872e1bc782200e72cc", "score": "0.6660657", "text": "public function isPropertyExposable(\\ReflectionProperty $property)\n {\n return true;\n }", "title": "" }, { "docid": "c7c2922d854dac2219a33ccb4dc351d4", "score": "0.6646371", "text": "public function getPrivate(): bool\n {\n return $this->private;\n }", "title": "" }, { "docid": "48f71d65b5393a433130d6c621775189", "score": "0.66328424", "text": "public function isPublic(): bool\n {\n $acl = Result::parse(\n $this->s3->getObjectAcl([\n \"Bucket\" => $this->space_name,\n \"Key\" => $this->_filename,\n ])\n );\n\n return (\n isset($acl['Grants'][0]['Grantee']['URI']) &&\n $acl['Grants'][0]['Grantee']['URI'] == \"http://acs.amazonaws.com/groups/global/AllUsers\" &&\n $acl['Grants'][0]['Permission'] == \"READ\"\n );\n }", "title": "" }, { "docid": "cd14393a04ce23761f4371b881345cdf", "score": "0.66103214", "text": "public function isPrivate()\n {\n return $this->flagsHas(self::IS_PRIVATE);\n }", "title": "" }, { "docid": "3bd02ca16e6cddd0bc2b112757238117", "score": "0.6605508", "text": "function isPrivate() {\n\t\treturn $this->_Private == 1;\n\t}", "title": "" }, { "docid": "2ec49f29e9ff8fe678275b6cb302bcd4", "score": "0.6605364", "text": "public function getPrivate() : bool\n {\n return $this->private;\n }", "title": "" }, { "docid": "4b67409efbe04062ab4de5f6cfdd5677", "score": "0.6604143", "text": "public function isPrivate() {\n if ($this->private == 1) {\n return True;\n } else {\n return False;\n }\n }", "title": "" }, { "docid": "568ff27a2ea66dad8eb7894d592e99fc", "score": "0.65852165", "text": "protected function isImplicitlyPublicProperty(array $tokens, Node\\Stmt\\Property $prop): bool\n {\n $i = $prop->getAttribute('startTokenPos');\n return (isset($tokens[$i]) && $tokens[$i][0] == T_VAR);\n }", "title": "" }, { "docid": "b5eac5e7ab885c6fa4c0f871ffab4ad9", "score": "0.6545523", "text": "protected function __propertyTraitHasProperty($propertyName)\n {\n // Check if getter or setter method exists\n if (method_exists($this, 'get'.$propertyName) || method_exists($this, 'set'.$propertyName)) {\n return true;\n }\n // Check if property is public\n try\n {\n $classReflection = new \\ReflectionProperty(get_class($this), $propertyName);\n return $classReflection->isPublic();\n } catch (\\ReflectionException $ex) {\n return false;\n }\n }", "title": "" }, { "docid": "b5a2dc2ca75393a50604d8c32055932d", "score": "0.65199435", "text": "public function isPrivate()\n {\n return $this->isPrivate;\n }", "title": "" }, { "docid": "86368798e554ebfda9c286638d1c5930", "score": "0.64953715", "text": "public function isPrivate(): bool\n {\n return self::ACCESSOR_PRIVATE == $this->accessor;\n }", "title": "" }, { "docid": "9c2366d926af989dc78bd740633889eb", "score": "0.6457671", "text": "function canBeMarkedAsPrivate() {\n return !$this->isDefault() && !$this->hasUsers();\n }", "title": "" }, { "docid": "791ae9a6a6e8ceda463f7f273448f80e", "score": "0.6430662", "text": "public function getIsPrivate()\n\t{\n\t\treturn $this->is_private;\n\t}", "title": "" }, { "docid": "77b941481cc764c9dbec5f40bdace1ed", "score": "0.640835", "text": "public function hasProperty(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "77b941481cc764c9dbec5f40bdace1ed", "score": "0.640835", "text": "public function hasProperty(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "77b941481cc764c9dbec5f40bdace1ed", "score": "0.640835", "text": "public function hasProperty(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "77b941481cc764c9dbec5f40bdace1ed", "score": "0.640835", "text": "public function hasProperty(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "77b941481cc764c9dbec5f40bdace1ed", "score": "0.640835", "text": "public function hasProperty(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "19f65cf6adfda14829877a5a5b918663", "score": "0.6394879", "text": "protected function is_private() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "0df35cfa9ba3c7d0e53e26dc2c4f0d55", "score": "0.637138", "text": "public function hasPublicUrl(): bool;", "title": "" }, { "docid": "bc0f778f1978d18fc4a572fd9be5065b", "score": "0.6361252", "text": "public function getAnnotationPublic()\n\t{\n\t\treturn $this->annotationPublic;\n\t}", "title": "" }, { "docid": "e747745a5afb70792c9353acbe5034c5", "score": "0.63465613", "text": "public function get_is_private() {\n//\t\tif ( is_null( $this->is_private ) ) {\n\t\t\t$doc_id = $this->get_doc_id();\n\t\t\t$doc_settings = bp_docs_get_doc_settings( $doc_id );\n\t\t\t$this->is_private = isset( $doc_settings['read'] ) && 'anyone' !== $doc_settings['read'];\n//\t\t}\n\n\t\treturn $this->is_private;\n\t}", "title": "" }, { "docid": "d925227e727537b95930b3e1995caccf", "score": "0.63308644", "text": "protected function propertiesFilter()\n {\n return ReflectionProperty::IS_PUBLIC | ReflectionProperty::IS_PROTECTED | ReflectionProperty::IS_PRIVATE;\n }", "title": "" }, { "docid": "83d96fba49d30af727fa8bedb420c05b", "score": "0.63011074", "text": "public function testWillNotModifyRetrievedPublicProperties(): void\n {\n $proxy = (new LazyLoadingValueHolderFactory())->createProxy(\n ClassWithPublicProperties::class,\n $this->createInitializer(ClassWithPublicProperties::class, new ClassWithPublicProperties())\n );\n $variable = $proxy->property0;\n\n self::assertByRefVariableValueSame('property0', $variable);\n\n $variable = 'foo';\n\n self::assertSame('property0', $proxy->property0);\n self::assertByRefVariableValueSame('foo', $variable);\n }", "title": "" }, { "docid": "b4676e5780be529ccee7427f38f41d32", "score": "0.630049", "text": "public function is_private(): bool\n {\n if (empty($this->Dec)) {\n return false;\n }\n \n return isset($this->Dec['info']['private']) && 1 == Int64::get($this->Dec['info']['private']);\n }", "title": "" }, { "docid": "954a11a6ab6e20d05e6dea1d3e7f2a7d", "score": "0.6293238", "text": "public function isPrivate(): bool\n {\n return ($this->modifiers & CoreReflectionMethod::IS_PRIVATE) === CoreReflectionMethod::IS_PRIVATE;\n }", "title": "" }, { "docid": "f0efe5afe5f8358cdef3b0775035d905", "score": "0.62722564", "text": "public function isPrivateUse();", "title": "" }, { "docid": "9c7da7b03eda72423d35e3c07bbab7dc", "score": "0.6265683", "text": "public function isAllowedPublicProfile()\n {\n return $this->configService->getParameter('c975LUser.publicProfile');\n }", "title": "" }, { "docid": "d865779f4326b7667498f40b6e357cfa", "score": "0.62550807", "text": "public function isPublic($article){\r\n if(!isset($article->access)){\r\n return FALSE;\r\n }\r\n if(StileroBPPJVersionHelper::jVersion() == StileroBPPJVersionHelper::JOOMLA_VERSION_15){\r\n $isPublic = $article->access=='0' ? TRUE : FALSE;\r\n }else{\r\n $isPublic = $article->access=='1' ? TRUE : FALSE;\r\n }\r\n return $isPublic;\r\n }", "title": "" }, { "docid": "6f51105c485683b66e81e4ed1e0e7bf1", "score": "0.6249276", "text": "public function hasProperties();", "title": "" }, { "docid": "ea51e2340149aa582eba946d18aa95c8", "score": "0.61961347", "text": "public function getPublicEndpointEnabled()\n {\n return $this->public_endpoint_enabled;\n }", "title": "" }, { "docid": "60b74319c2a23063606b278840c261f6", "score": "0.6194577", "text": "private function isAccessible()\n {\n return !Route::isBlocked($this->url) &&\n ($this->function instanceof \\Closure ||\n Controller::hasMethod($this->controller, $this->method) ||\n Controller::exists($this->url));\n }", "title": "" }, { "docid": "9ee355cbf481ae6af0a737f75af3ac1e", "score": "0.6183766", "text": "public function onlyPublic(): self\n {\n return $this->addStringQualifier('is', 'public');\n }", "title": "" }, { "docid": "fb2d9d507dcd4fa1eefa10cd2682c6e8", "score": "0.6173603", "text": "private static function is_post_public( WP_Post $post ) {\n\t\t// If post status isn't 'publish', the post is not public.\n\t\tif ( 'publish' !== get_post_status( $post ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the post type overall is not publicly viewable, the post is not public.\n\t\tif ( ! is_post_type_viewable( $post->post_type ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Otherwise, the post is public.\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a4dc1584f3312b997581bdeb3797b916", "score": "0.6173047", "text": "function isProfilePublic() {\n return true;\n}", "title": "" }, { "docid": "cc77c8918e1f1f29f0fe55af6082ea9a", "score": "0.6172028", "text": "function is_public( $id, $obj = null, $group = true ) {\n\t\t$obj = $this->null_obj( $id, $obj, $group );\n\n\t\treturn $obj->display( 'visibility' );\n\n\t}", "title": "" }, { "docid": "fc110ebdada75346f2ab5d5f8c8cc588", "score": "0.61553144", "text": "public static function isPublic($privacy)\n {\n if($privacy == 1)\n {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "0a56e7c594d07b836f1875aedb8e67c8", "score": "0.61463135", "text": "public function isPublicAvailable()\n {\n return $this->isVisible()\n && $this->availableInDate()\n && !$this->isOutOfStock();\n }", "title": "" }, { "docid": "bc9458cc9244aa15d19665b5fb76c813", "score": "0.61438954", "text": "public function setPublic( bool $public ) {\n\t\t$this->arguments['public'] = $public;\n\t}", "title": "" }, { "docid": "da22b1508ace010b098e02538408f504", "score": "0.6131238", "text": "public function isPrivate(string $name): bool;", "title": "" }, { "docid": "5034ce34355e0230b4c5269e65a54e0f", "score": "0.6120713", "text": "protected function checkWritablePublicPackages()\r\n {\r\n $path = rtrim($this->app->make('path.public'), '/') . '/packages';\r\n return $this->isWritable($path);\r\n }", "title": "" }, { "docid": "c08bafaaa72f8b43d7f420be58c222f8", "score": "0.6113632", "text": "public function isPrivate()\n {\n return (!is_null($this->nestedIn)) ? true : false;\n }", "title": "" }, { "docid": "e048adf60214ee647d8a07caa8908921", "score": "0.6109646", "text": "public function allowProperties() {}", "title": "" }, { "docid": "fe88e60b7839585612f44081310f7bda", "score": "0.61066717", "text": "public function hasProperties(){\n return $this->_has(9);\n }", "title": "" }, { "docid": "6054c1ceecb0d4294a8eda894f354a10", "score": "0.6106122", "text": "final private function _propertyVisibility ($classOrObject, $propertyName) {\n\t\tif (property_exists($classOrObject, $propertyName)) {\n\t\t\t$ref = new ReflectionProperty($classOrObject, $propertyName);\n\t\t\tif ($ref->isPrivate()) {\n\t\t\t\treturn 'private';\n\t\t\t} else if ($ref->isProtected()) {\n\t\t\t\treturn 'protected';\n\t\t\t}\n\t\t\treturn 'public';\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "fd4792e5d2aa9b77a81638f7397e9783", "score": "0.6105131", "text": "public function isVisibleToPublic()\n {\n return ImageLicense::CLOSED !== $this->license;\n }", "title": "" }, { "docid": "b0b210254f8c6a6b5cbc3b031bbde0c4", "score": "0.61036164", "text": "public function isSecret()\n {\n return !$this->isPublic();\n }", "title": "" }, { "docid": "703b3b55573a8ba8dd3c625fbb504e28", "score": "0.6091719", "text": "public function isViewable() {\n\t\treturn $this->publicly_queryable || ($this->public && $this->isBuiltin());\n\t}", "title": "" }, { "docid": "be99fa93b016e9c2aed3789983b5b9d5", "score": "0.6081237", "text": "public function isPublished()\n {\n return $this->access !== LibBaseDomainBehaviorPrivatable::ADMIN;\n }", "title": "" }, { "docid": "ae2f2625589fb887e12ffc3aaee8e054", "score": "0.60543805", "text": "public function canGetProperty($name)\n\t{\n\t\treturn method_exists($this,'get'.$name);\n\t}", "title": "" }, { "docid": "5e279ca6e87d11e200a589ebc08f40dc", "score": "0.60447294", "text": "public function checkPropertiesAccess($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "title": "" }, { "docid": "7adee1fcd7ba6b1f549a091df3ac7f7a", "score": "0.60369754", "text": "public function isInternal(): bool;", "title": "" }, { "docid": "7adee1fcd7ba6b1f549a091df3ac7f7a", "score": "0.60369754", "text": "public function isInternal(): bool;", "title": "" }, { "docid": "16b489b7f5c5293431b3943581f2cc57", "score": "0.5988976", "text": "public function checkPropertyAccess($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "title": "" }, { "docid": "4f77f04dc0311197861f8e6a305af10b", "score": "0.59797734", "text": "function __isset($name)\n {\n $is_defined = property_exists($this, $name);\n $is_readable = property_exists(get_called_class(), 'readable')\n && in_array($name, static::$readable);\n $is_accessible = property_exists(get_called_class(), 'accessible')\n && in_array($name, static::$accessible);\n\n return $is_defined && ($is_readable || $is_accessible);\n }", "title": "" }, { "docid": "bda83ca7899b1da35553459c75c9cc29", "score": "0.59774673", "text": "public function hasAccess() {\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "4a02e5e9e79eb55e16f7fffdd9511ad5", "score": "0.597526", "text": "protected function validProperty($offset)\n {\n if (\"_\" == substr($offset, 0, 1)) {\n throw new \\InvalidArgumentException(sprintf(\"No access to protected property '%s' in class '%s'\",\n $offset, get_called_class()));\n }\n if (!property_exists($this, $offset)) {\n throw new \\InvalidArgumentException(sprintf(\"No property with name '%s' exists in class '%s'\",\n $offset, get_called_class()));\n }\n return true;\n }", "title": "" }, { "docid": "776b0c2275575b905060f7fb54fb67e4", "score": "0.59641993", "text": "public function shouldAllowPublicPolicySetting() {\n return false;\n }", "title": "" }, { "docid": "dd21c0b73c75251eef6a6b68cbe364e7", "score": "0.5961432", "text": "public function isPublic(ReadBlockInterface $block)\n {\n return true;\n }", "title": "" }, { "docid": "ec6063cb7c08c4f2cc2e25413bb095cd", "score": "0.59594095", "text": "public function isPublic($path = '');", "title": "" }, { "docid": "d56573f5c9bf9a8712de968ce7ad050a", "score": "0.59570277", "text": "public function hasPublicCredentials()\n {\n return\n ($this->getConfig()->getApiTokenJSUsername(Mage::app()->getStore())\n && $this->getConfig()->getApiTokenJSPublickey(Mage::app()->getStore()))\n || ($this->getConfig()->getApiTokenJSUsernameTest(Mage::app()->getStore())\n && $this->getConfig()->getApiTokenJSPublickeyTest(Mage::app()->getStore()));\n }", "title": "" }, { "docid": "8cb44c70097d901696f57712d9f2a467", "score": "0.59551525", "text": "function is_post_public( $post ) {\n\t\tif ( !is_array( $post ) ) {\n\t\t\t$post = (array) $post;\n\t\t}\n\n\t\tif ( 0 < strlen( $post['post_password'] ) )\n\t\t\treturn false;\n\t\tif ( ! in_array( $post['post_type'], get_post_types( array( 'public' => true ) ) ) )\n\t\t\treturn false;\n\t\t$post_status = get_post_status( $post['ID'] ); // Inherited status is resolved here.\n\t\tif ( ! in_array( $post_status, get_post_stati( array( 'public' => true ) ) ) )\n\t\t\treturn false;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "415ef7008056185e5d523d69ad2cbafa", "score": "0.5953808", "text": "public function hasProperty($name) {\n return FALSE;\n }", "title": "" } ]
ad67117a7ada4f4b84559e59943766b9
Internal wrapper method, mainly for testing.
[ { "docid": "3c172b426da48c75d45992a3eaffa85a", "score": "0.0", "text": "protected function streamMeta($stream)\n {\n return stream_get_meta_data($stream);\n }", "title": "" } ]
[ { "docid": "5e11d8f4aa696e617df80126bd039def", "score": "0.68520164", "text": "protected function _hacks()\n\t{\n\t}", "title": "" }, { "docid": "be468c3d0b518df701b9d07ae76bdad8", "score": "0.6510743", "text": "protected function helperFunction()\n {\n }", "title": "" }, { "docid": "35f8ff218e4c2a5ffd6533829018fd5f", "score": "0.61190504", "text": "abstract protected function _get();", "title": "" }, { "docid": "95ea0155da839f496eefd8bbd4200e5d", "score": "0.6012337", "text": "private function privf() {}", "title": "" }, { "docid": "95ea0155da839f496eefd8bbd4200e5d", "score": "0.6012337", "text": "private function privf() {}", "title": "" }, { "docid": "bcb09217713566ccc874f49d16697fb0", "score": "0.6012209", "text": "private function Method7(){}", "title": "" }, { "docid": "b4e425e88b336f2040e816b9d78c807f", "score": "0.58827597", "text": "protected function __init__() { }", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.582978", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.582978", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.582978", "text": "final private function __construct() {}", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.5793078", "text": "private function __() {\n }", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.57095337", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.57095337", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.57095337", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.57095337", "text": "protected function init() {}", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.5676293", "text": "final private function __construct() { }", "title": "" }, { "docid": "4d3ec4d120da4f4ba73783b84248d6ac", "score": "0.56319654", "text": "private final function __construct() {}", "title": "" }, { "docid": "5643165a242545737514517fe3a9304d", "score": "0.5609772", "text": "abstract protected function _prepare();", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.560547", "text": "private function __construct() {}", "title": "" }, { "docid": "33125bc45e8a2a70721125927bbfb171", "score": "0.5604855", "text": "private static function _mutate()\n {\n // TODO: Implement this method.\n\n return;\n }", "title": "" }, { "docid": "9d23b793c460954ad744bba6a9ed0333", "score": "0.5596729", "text": "protected function before() {}", "title": "" }, { "docid": "9d23b793c460954ad744bba6a9ed0333", "score": "0.5596729", "text": "protected function before() {}", "title": "" }, { "docid": "bf14095236a1885b30a3e95e0632dde9", "score": "0.55735755", "text": "protected function _init() {}", "title": "" }, { "docid": "bf14095236a1885b30a3e95e0632dde9", "score": "0.55735755", "text": "protected function _init() {}", "title": "" }, { "docid": "24c9479319bcffba2b42cb66eb5fb81b", "score": "0.55678785", "text": "abstract protected function handle();", "title": "" }, { "docid": "24c9479319bcffba2b42cb66eb5fb81b", "score": "0.55678785", "text": "abstract protected function handle();", "title": "" }, { "docid": "0e59379112512b1f4fc1b3ae6ccaa830", "score": "0.55543834", "text": "private function __construct () {}", "title": "" }, { "docid": "e0cf128627bcbeb14cef8c5dbe48444e", "score": "0.55248654", "text": "private final function __construct() { }", "title": "" }, { "docid": "52a7e404cbe0085c69ecbcece4742afd", "score": "0.55010283", "text": "private function foobar(){\n\t \n\t}", "title": "" }, { "docid": "652d5981eab561798aa70b4e58b0ffe8", "score": "0.54879826", "text": "public function niceStuffforV57(){\n }", "title": "" }, { "docid": "b570ab75e201c1ef1678c09c3629f2e8", "score": "0.5469224", "text": "protected function _pre() {}", "title": "" }, { "docid": "e2d21a71a67a3215e6811f4c6862763a", "score": "0.54658824", "text": "final private function __construct() {\n\n\t}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.54592615", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.54592615", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.54592615", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.54592615", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.54592615", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.54592615", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.54592615", "text": "protected function __construct() {}", "title": "" }, { "docid": "4bac709370cd41d834bba81d98972f1e", "score": "0.5424684", "text": "public function __invoke()\n {\n return null;\n }", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.5423021", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.5423021", "text": "public function __invoke()\n {\n }", "title": "" } ]
1cf6cbfdd5d79b98e1541519ff8dc29f
Returns the Query String Parameters (QSPs) as an array of KEYVALUE pairs. If a QSP appears twice it will have two entries in this array
[ { "docid": "62572e4475de7dde4386d0e9a57d2905", "score": "0.7277624", "text": "public function getQueryParameters()\n {\n $data = [];\n if (is_array($this->request)) {\n foreach ($this->request as $key => $value) {\n $data[] = [$key => $value];\n }\n }\n return $data;\n }", "title": "" } ]
[ { "docid": "5d18f63e2e0ebc855ef0b6ea8d061214", "score": "0.7403669", "text": "function getQueryArray() {\n\t\t$_this =& PKPRequest::_checkThis();\n\n\t\t$queryString = $_this->getQueryString();\n\t\t$queryArray = array();\n\n\t\tif (isset($queryString)) {\n\t\t\tparse_str($queryString, $queryArray);\n\t\t}\n\n\t\treturn $queryArray;\n\t}", "title": "" }, { "docid": "88bbff3ca5cb26c9e27646bfc6139faa", "score": "0.71157897", "text": "public function getQuery()\n {\n $params = array();\n foreach(explode('&', $this->raw_request['QUERY_STRING']) as $part) {\n list($parts['key'], $parts['value']) = explode('=', $part);\n $params[urldecode($parts['key'])] = urldecode($parts['value']);\n }\n\n return $params;\n }", "title": "" }, { "docid": "2169d76bac1506e70a709a7cef8f8d2a", "score": "0.69509387", "text": "public function getQueryString(): array\n {\n return $this->query_string;\n }", "title": "" }, { "docid": "dda6d79c9553895975a1bf8d6b446cfa", "score": "0.69186085", "text": "public function getQueryArray()\n {\n $qs = $this->getQueryString();\n\n return '' === $qs ? array() : parse_str($qs, $qs);;\n }", "title": "" }, { "docid": "ad25c4c8cd9726840a7bfca9c78f8f7a", "score": "0.69154674", "text": "protected function parseQuery(){\n $args = array();\n $queries = explode('&', $_SERVER['QUERY_STRING']);\n foreach ($queries as $query)\n {\n $query = explode('=', $query);\n (count($query) > 1) ? $args[$query[0]] = $query[1] : $args[] = $query[0];\n }\n return $args;\n }", "title": "" }, { "docid": "f19185f2c4175fa34c45aefd2793f63f", "score": "0.6915255", "text": "public function getQueryStringParams() {\n return $this->params;\n }", "title": "" }, { "docid": "6b9ece75c9d8755719cd41007939c71d", "score": "0.68128574", "text": "protected function getParams() {\n\t\t$url = $_SERVER['REQUEST_URI'];\n\t\t$querystring = substr($url, strpos($url, \"?\") + 1, strlen($url) - strpos($url, \"?\"));\n\n\t\t$params = array();\n\t\tforeach(explode('&', $querystring) as $part) {\n\t\t $part = explode('=', $part);\n\t\t if($key = array_shift($part)) {\n\t\t $params[ urldecode($key) ] = urldecode(implode('', $part));\n\t }\n\t }\n\t \n\t return $params;\n\t}", "title": "" }, { "docid": "0ab387598d6abe4c8bee90f6efb8ea34", "score": "0.67523235", "text": "static function getParams(){\n\t\t\tif (count(self::$query)>0){\n\t\t\t\t//comprovar si és parell\n\t\t\t\tif((count(self::$query)%2)==0){\n\t\t\t\t\tfor($i=0;$i<count(self::$query);$i++){\n\t\t\t\t\t\tif(($i%2)==0){\n\t\t\t\t\t\t\t$key[]=self::$query[$i];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$pos=strpos(self::$query[$i],\"?\");\n\t\t\t\t\t\t\tif ($pos===false){\n\t\t\t\t\t\t\t\t$value[]=self::$query[$i];\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$value[]=substr(self::$query[$i],0,$pos);\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$result=array_combine($key, $value);\n\t\t\t\t\treturn $result;\n\t\t\t\t}else{\n\t\t\t\t\techo 'ERROR in params array';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "acb765fdb7cf68af0aba19467ee8b79c", "score": "0.6739596", "text": "public function queryParameters() {\n\t\tif(!$this->configured || $this->via != self::QUERY_PARAMETER)\n\t\t\treturn array();\n\n\t\treturn array($this->description->query_parameter => $this->token);\n\t}", "title": "" }, { "docid": "78366c461686aa7564284db0430be5b5", "score": "0.66923946", "text": "function jr_mt_query_array() {\n\t/*\tRemove array entry indicators (\"[]\") as we properly handle duplicate keywords,\n\t\tand covert to lower-case for comparison purposes.\n\t*/\n\t$queries = array();\n\tif ( !empty( $_SERVER['QUERY_STRING'] ) ) {\n\t\t$query = explode( '&', jr_mt_strtolower( str_replace( '[]', '', $_SERVER['QUERY_STRING'] ) ) );\n\t\tforeach ( $query as $kwval ) {\n\t\t\t$query_entry = explode( '=', $kwval );\n\t\t\tif ( !isset( $query_entry[1] ) ) {\n\t\t\t\t$query_entry[1] = '';\n\t\t\t}\n\t\t\t$queries[ $query_entry[0] ][] = $query_entry[1];\n\t\t}\n\t}\n\treturn $queries;\n}", "title": "" }, { "docid": "a120ba03769f165402a4e44690ad0069", "score": "0.6654187", "text": "public static function getQueryParams () {\n\t\treturn (array)$_GET;\n\t}", "title": "" }, { "docid": "7565604c5aee436526917282d2359a14", "score": "0.6650718", "text": "public function getQueryParameters(): array;", "title": "" }, { "docid": "c3b61682960e62e78abe604e0c5ada32", "score": "0.6632467", "text": "public function getQsParams() {\n return $this->qsParams;\n }", "title": "" }, { "docid": "a6a993efa29708257bb85ee9ef3d7671", "score": "0.66243184", "text": "static function getParams() {\n if (count(self::$query) > 0) {\n //comprovar si és parell\n if ((count(self::$query) % 2) == 0) {\n for ($i = 0; $i < count(self::$query); $i++) {\n if (($i % 2) == 0) {\n $key[] = self::$query[$i];\n } else {\n $value[] = self::$query[$i];\n }\n }\n $result = array_combine($key, $value);\n\n return $result;\n } else {\n echo 'ERROR in params array';\n }\n }\n }", "title": "" }, { "docid": "9abcf0f1c0b5c54b60000d56c1b7a408", "score": "0.6608961", "text": "public function getParams()\n {\n foreach ($_REQUEST as $key=>$value) {\n return [$key => $value];\n }\n }", "title": "" }, { "docid": "13df0bba41fc98406f52be6462c23642", "score": "0.65625834", "text": "public static function getArrayQuery()\n {\n if (isset($_SERVER['QUERY_STRING'])) {\n return parse_query($_SERVER['QUERY_STRING']);\n } else {\n return [];\n }\n }", "title": "" }, { "docid": "241173ec5ea05212229add9118985d2e", "score": "0.65444684", "text": "function get_qs() {\n $qs = \"\";\n\n foreach($_POST as $key=>$value) {\n $qs .= $key . \"=\" . $value . \"&\";\n }\n\n return $qs;\n }", "title": "" }, { "docid": "fe723669a920fda94fed025234907d17", "score": "0.6508121", "text": "public function getQueryParameters();", "title": "" }, { "docid": "8700d36b8c651dbb03fdf0be5138fbbc", "score": "0.6505312", "text": "public static function queryToArray($qs)\n {\n $query = explode('&', $qs);\n $data = array();\n\n foreach ($query as $q) {\n $q = explode('=', $q);\n\n if (isset($data[$q[0]]) && is_array($data[$q[0]])) {\n $data[$q[0]][] = urldecode($q[1]);\n } elseif (isset($data[$q[0]]) && !is_array($data[$q[0]])) {\n $data[$q[0]] = array($data[$q[0]]);\n $data[$q[0]][] = urldecode($q[1]);\n } else {\n $data[urldecode($q[0])] = urldecode($q[1]);\n }\n }\n return $data;\n }", "title": "" }, { "docid": "1f2f4830138caf4fc52b425543030ab3", "score": "0.64851665", "text": "public function getHttpQuery(): array\n {\n if (0 === count($this->parts)) {\n return [];\n }\n\n return [\n 'filter' => implode('|', $this->parts),\n 'filtertype' => $this->type,\n ];\n }", "title": "" }, { "docid": "b3e52b0cf1f5288777d0f1ce3042ae9d", "score": "0.6452084", "text": "#[Pure] public function getQueryParams(): array;", "title": "" }, { "docid": "52e14d450df226e2cc0074d413558f4c", "score": "0.64483625", "text": "private function _getParameters()\n {\n $getKeys = array_keys($_GET);\n $params = null;\n // read parameters \"param:name=value\"\n foreach ($getKeys as $key)\n {\n if (substr($key, 0, 6) == \"param:\")\n {\n $paramName = substr($key, 6);\n $paramValue = $_GET[$key];\n $params[$paramName] = $paramValue;\n }\n }\n return $params;\n }", "title": "" }, { "docid": "dff1a4ffb43c15c78c67db4b1c55b281", "score": "0.64421844", "text": "function queryToArray(string $stringQuery): array\n{\n return array_reduce(explode('&', $stringQuery), function ($carry, $item) {\n $values = explode('=', $item);\n $carry[$values[0]] = $values[1];\n return $carry;\n }, []);\n}", "title": "" }, { "docid": "bd47ece2cfaa8bc8df99e31ff63e97d8", "score": "0.6431626", "text": "function getParameters() {\n $resource = $_SERVER['REQUEST_URI'];\n $param_string = \"\";\n $param_array = array();\n if (strstr($resource, '?')) {\n # URI has parameters\n $param_string = substr($resource, strpos($resource, '?')+1);\n $parameters = explode('&', $param_string); \n foreach ($parameters as $single_parameter) {\n $param_name = substr($single_parameter, 0, strpos($single_parameter, '='));\n $param_value = substr($single_parameter, strpos($single_parameter, '=')+1);\n $param_array[$param_name] = $param_value;\n }\n }\n return $param_array;\n }", "title": "" }, { "docid": "c444f28e780c75a5afaf96e2e3f81b4b", "score": "0.64266855", "text": "public function getQueryParams(): array\n {\n $this->setUp();\n return $this->queryParameters;\n }", "title": "" }, { "docid": "1065f53529a457dd32f796bdaed2a858", "score": "0.6368381", "text": "protected function prepareGet(): array\n {\n parse_str($_SERVER['QUERY_STRING'], $get);\n\n return $get;\n }", "title": "" }, { "docid": "2acc52642a3a65c174165648a338ea1e", "score": "0.6364451", "text": "private function getQueryParams(): array\n {\n return $this->get ?? [];\n }", "title": "" }, { "docid": "8b4c5028478aea2e31129cf2de1579c3", "score": "0.63489485", "text": "public function getQueryParams()\n {\n if (is_array($this->queryParams)) {\n return $this->queryParams;\n }\n\n if ($this->uri === null) {\n return [];\n }\n\n parse_str($this->uri->getQuery(), $this->queryParams); // <-- URL decodes data\n\n return $this->queryParams;\n }", "title": "" }, { "docid": "8b4c5028478aea2e31129cf2de1579c3", "score": "0.63489485", "text": "public function getQueryParams()\n {\n if (is_array($this->queryParams)) {\n return $this->queryParams;\n }\n\n if ($this->uri === null) {\n return [];\n }\n\n parse_str($this->uri->getQuery(), $this->queryParams); // <-- URL decodes data\n\n return $this->queryParams;\n }", "title": "" }, { "docid": "b13d81f8b19f6b89eaf6468d59cffda1", "score": "0.6335858", "text": "public function queryParams(): array;", "title": "" }, { "docid": "56c3de778170c29b2fe35af3dc0dc5ff", "score": "0.63250166", "text": "public function getQueryParams()\n\t{\n\t\treturn $this->query_params;\n\t}", "title": "" }, { "docid": "ade32fecd494ca4d7559998711c8981f", "score": "0.63214993", "text": "public function getQueryParams();", "title": "" }, { "docid": "b8df97b4b7bf84acaaf730851fadbe45", "score": "0.6308969", "text": "public function getQueryString() {\r\n return $this->queryArray;\r\n }", "title": "" }, { "docid": "6627b39ec4d6f5bc6c1e2e2742a811c8", "score": "0.63080806", "text": "public function getParams()\n {\n return [\n 'query' => $this->query,\n 'order_by' => $this->orderBy,\n 'page' => $this->page,\n ];\n }", "title": "" }, { "docid": "072f49723a4f2d66ea0b4713386a0516", "score": "0.6306605", "text": "private function getQueryParams()\n {\n $params = array();\n\n // Read the query-parameters\n foreach (array_keys($_REQUEST) as $paramname) {\n if (!in_array($paramname, $this->reservedParams) && substr($paramname, 0, 1) != '_') {\n // Try/catch is needed to prevent global parameters to be overwritten by api users\n try {\n // If param is NOT present, an error is thrown\n $this->db->param($paramname);\n } catch (\\Exception $e) {\n $params[ $paramname ] = self::getRequestVar($paramname);\n }\n }\n }\n\n if (count($params) > 0) {\n return array( $params );\n }\n\n // If no params are found check if the body is a json blob\n if ($json = self::getJsonBody()) {\n // Ensure the output is an array of assoc arrays\n if (Arrays::isAssoc($json)) {\n return array( $json );\n }\n\n if (is_array($json)) {\n return $json;\n }\n }\n\n return array(array());\n }", "title": "" }, { "docid": "213904e12434800736aa92efe8051a80", "score": "0.629986", "text": "public function getQueryParameters()\n {\n return $this->getFieldValue(self::FIELD_QUERY_PARAMETERS);\n }", "title": "" }, { "docid": "0efafde0ed351e5c81fceefafc1629ab", "score": "0.6286622", "text": "public function getHttpQuery(): array\n {\n if (0 === count($this->parts)) {\n return [];\n }\n\n return [\n 'sort' => implode('|', $this->parts),\n ];\n }", "title": "" }, { "docid": "943f012a495e1d8cb66a993634aa4bbc", "score": "0.62779987", "text": "public function getQueryParameters()\n {\n return $this->queryParameters;\n }", "title": "" }, { "docid": "943f012a495e1d8cb66a993634aa4bbc", "score": "0.62779987", "text": "public function getQueryParameters()\n {\n return $this->queryParameters;\n }", "title": "" }, { "docid": "7d7dfb44295d30f224ddff02e6a2c8f6", "score": "0.6272331", "text": "public function queryProvider()\n {\n return [\n ['query=string'],\n ['query=string&other=value']\n ];\n }", "title": "" }, { "docid": "43f4b42f3cc091965fec8e2a3d0a8e37", "score": "0.6262472", "text": "private function getParams()\n {\n $params = [];\n $params['q'] = $this->query;\n $params['maxResults'] = $this->limit ?: 40;\n\n return $params;\n }", "title": "" }, { "docid": "fee40d9ee1f588f99ecf5e2eff0eb548", "score": "0.6258047", "text": "protected function queryString()\n {\n return http_build_query(\n collect($this->event['multiValueQueryStringParameters'] ?? [])\n ->mapWithKeys(function ($values, $key) {\n return count($values) === 1 ? [$key => $values[0]] : [$key => $values];\n })->all()\n );\n }", "title": "" }, { "docid": "0b5daf321b40995585d900317856d993", "score": "0.6240222", "text": "public function getQueryParams() : array {\n return $this->_queryParams;\n }", "title": "" }, { "docid": "386d413d62e0ae7740023bcf6a5f3401", "score": "0.622001", "text": "public static function getUriParams(){\n $uriParamsWithKey = array_combine(self::$urlKeys, self::$urlValues);\n return $uriParamsWithKey;\n }", "title": "" }, { "docid": "406da3edc4e24f2e88b14a43b7f50784", "score": "0.6214397", "text": "public function getQueryParts() : array {}", "title": "" }, { "docid": "4f8e4af7db87f08e8daa3fbccea6f81a", "score": "0.6190462", "text": "public static function get_query_vars()\n {\n return self::$_query_vars;\n }", "title": "" }, { "docid": "b4dca2b4b80a8949f616ea8edfde6855", "score": "0.6185085", "text": "protected function getParams(): array\n {\n $rawParams = [];\n if (isset($_SERVER['argv'])) {\n $rawParams = $_SERVER['argv'];\n array_shift($rawParams);\n }\n\n $params = [];\n foreach ($rawParams as $param) {\n if (preg_match('/^-([\\w-]*\\w)(=(.*))?$/', $param, $matches)) {\n $name = $matches[1];\n $params[$name] = isset($matches[3]) ? $matches[3] : true;\n } else {\n $params[] = $param;\n }\n }\n return $params;\n }", "title": "" }, { "docid": "581a893b9e35e1504148e06e94af374e", "score": "0.61827844", "text": "public function getQueryParams()\n {\n return $this->query_params;\n }", "title": "" }, { "docid": "581a893b9e35e1504148e06e94af374e", "score": "0.61827844", "text": "public function getQueryParams()\n {\n return $this->query_params;\n }", "title": "" }, { "docid": "cf6b02336ab432740da09f1c8f669a25", "score": "0.617625", "text": "public function getParams()\n\t{\n\t\t$sessionParams = array();\n\t\t\n\t\tforeach ($_SESSION as $key => $value)\n\t\t\t$sessionParams[$key] = $value;\n\t\t\t\n\t\treturn $sessionParams;\n\t}", "title": "" }, { "docid": "c02e39494c4b89aa819ffd5c31f412ba", "score": "0.61732554", "text": "public static function queryStringToArray(string $queryString): array {\n\n\t\tif (empty($queryString))\n\t\t\treturn [];\n\n\t\t// foo=value1&bar=value2&foo=value3\n\n\t\t// ['foo=value1', 'bar=value2', 'foo=value3']\n\t\t$tmpQueryString = explode('&', $queryString);\n\n\t\tforeach ($tmpQueryString as &$paramValue) {\n\n\t\t\t// First portion = 'foo'=value1\n\t\t\t// Second portion = foo='value1'\n\t\t\t// We use the 3rd parameter (limit) to have maximum 2 chunks (in case there is an '=' in the value)\n\t\t\t[$param, $value] = explode('=', $paramValue, 2);\n\n\t\t\t// We passed $paramValue by reference, so we can modify it\n\t\t\t$paramValue = [\n\t\t\t\t'param' => $param,\n\t\t\t\t'value' => $value\n\t\t\t];\n\t\t}\n\t\t// Break the reference\n\t\tunset($paramValue);\n\n\t\t$queryString = [];\n\n\t\t// [['param' => 'foo', 'value' => 'value1'], etc.];\n\t\tforeach ($tmpQueryString as $paramValue) {\n\n\t\t\t// If parameter already in list (duplicate)\n\t\t\tif (isset($queryString[$paramValue['param']])) {\n\n\t\t\t\t// If the index is already an array (so 3rd+ occurrence of param)\n\t\t\t\tif (is_array($queryString[$paramValue['param']])) {\n\n\t\t\t\t\t// Append to array\n\t\t\t\t\t$queryString[$paramValue['param']][] = $paramValue['value'];\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// Replace value by array containing it\n\t\t\t\t\t$queryString[$paramValue['param']] = [$queryString[$paramValue['param']]];\n\t\t\t\t\t$queryString[$paramValue['param']][] = $paramValue['value'];\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t$queryString[$paramValue['param']] = $paramValue['value'];\n\t\t\t}\n\t\t}\n\n\t\treturn $queryString;\n\t}", "title": "" }, { "docid": "7eb211beff84b6ac3a4e3e298fb78c29", "score": "0.61732495", "text": "protected function buildQueryString(): array\n {\n return [\n 'x-algolia-application-id' => $this->applicationId,\n 'x-algolia-api-key' => $this->apiKey,\n ];\n }", "title": "" }, { "docid": "aa9a0af792cbe16d047adc5c85db77ed", "score": "0.6173223", "text": "public function getQueryParams(): array\n {\n return $this->queryParams;\n }", "title": "" }, { "docid": "aa9a0af792cbe16d047adc5c85db77ed", "score": "0.6173223", "text": "public function getQueryParams(): array\n {\n return $this->queryParams;\n }", "title": "" }, { "docid": "5d38ddbd90476c6b0ad90a68320a7e1b", "score": "0.61282426", "text": "private function getQueryParameters() {\n $dbParameters = array();\n if (count($this->queryParameters) > 0) {\n foreach ($this->queryParameters as $key => $value) {\n if (is_array($value)) {\n $lookUpValue = $this->_tableInstance->getLookUpValue($value['generatorName'], $this->_iteration);\n $bdParameters[$key] = $lookUpValue;\n //If the parameters depends on generator values, the query must be executed for each iteration\n $this->newQueryForEachIteration = true;\n } else {\n $bdParameters[$key] = $value;\n }\n }\n }\n\n return $dbParameters;\n }", "title": "" }, { "docid": "8873ecc8896fee5f758b86d4f8fca4c2", "score": "0.6107716", "text": "protected function query_vars() {\n $vars = array();\n foreach ( $this->routes as $route ) {\n $vars = array_merge($vars, $route->get_query_vars());\n }\n $vars[] = self::QUERY_VAR;\n return $vars;\n }", "title": "" }, { "docid": "efa020feedf145cfcce2b14a7234020b", "score": "0.6102875", "text": "public static function query_to_array ($querystring)\n {\n $out = array();\n $parts = explode ('&', $querystring);\n\n foreach ($parts as $part) {\n list ($k, $v) = explode ('=', $part);\n $out[$k] = $v;\n }\n\n return $out;\n }", "title": "" }, { "docid": "c6a09a6f6602e99898848174705a5c84", "score": "0.6094142", "text": "public function getQueryParams()\n {\n if (!empty($this->queryParams)) {\n return $this->queryParams;\n }\n\n parse_str($this->uri->getQuery(), $this->queryParams);\n return $this->queryParams;\n }", "title": "" }, { "docid": "7b488e048a1fa1be1395d8c50aa5ab77", "score": "0.6092456", "text": "protected function getParameterArray()\n {\n $params = array(\n 'run' => '',\n 'wts' => '',\n 'symbol' => '',\n 'sort' => 'wt',\n 'run1' => '',\n 'run2' => '',\n 'source' => $this->container->getParameter('clamidity_profiler.file_extension'),\n 'all' => 100,\n );\n\n return $params;\n }", "title": "" }, { "docid": "3f4332953fed02f6ddb9cb16526b73ba", "score": "0.60734105", "text": "public static function parseQueryString($query){\n $params = explode('&', $query);\n $aparams = array();\n foreach($params as $val){\n $t = explode('=', $val);\n $aparams[urldecode($t[0])] = urldecode($t[1]);\n }\n return $aparams;\n \n }", "title": "" }, { "docid": "c9d91cc41b1ec7ebbf6ca96d74b02f89", "score": "0.6064155", "text": "function getParams() {\n\t\t$params = array();\n\t\tforeach ($this->params['url'] as $key => $val)\n\t\tif ($key != 'url') {\n\t\t\t$params[] = urlencode($key) . '=' . urlencode($val);\n\t\t}\n\t\treturn ((count($params)>0) ? '?' . join('&',$params) : '');\n\t}", "title": "" }, { "docid": "7ac1d39694387f666b6f3cfc85dd5224", "score": "0.6061668", "text": "protected function getQuery(): array\n {\n return [$this->queryName ?? $this->tokenKey => $this->getToken()[$this->tokenKey]];\n }", "title": "" }, { "docid": "7ac1d39694387f666b6f3cfc85dd5224", "score": "0.6061668", "text": "protected function getQuery(): array\n {\n return [$this->queryName ?? $this->tokenKey => $this->getToken()[$this->tokenKey]];\n }", "title": "" }, { "docid": "c307a5ab557794df6abb7b3924b2a5d4", "score": "0.60615474", "text": "public function getAllOrderedQueryParameters()\n {\n $queryParameters = $this->queryParameters;\n $queryParameters[\"AWSAccessKeyId\"] = $this->accessKeyId;\n $queryParameters[\"Timestamp\"] = $this->getTimestamp();\n $queryParameters[\"Operation\"] = $this->operation;\n\n ksort($queryParameters);\n\n return $queryParameters;\n }", "title": "" }, { "docid": "26c9e5d6fe444bfca22d96a329bcab74", "score": "0.60593253", "text": "public function getQueryParams() {}", "title": "" }, { "docid": "992c6b2cebd6e133cc7ce496a6b02761", "score": "0.6059098", "text": "abstract protected function _buildQueryParamsArray();", "title": "" }, { "docid": "d520c4d6c5a91743de1f8238664413c2", "score": "0.6055059", "text": "public function getParams()\n {\n $params = $this->getQueryParams();\n $postParams = $this->getParsedBody();\n if ($postParams) {\n $params = array_merge($params, (array)$postParams);\n }\n\n return $params;\n }", "title": "" }, { "docid": "2247292f814cb08c8945412aa847b814", "score": "0.6048726", "text": "public function getQueryParameters()\n {\n return $this->getParameters;\n }", "title": "" }, { "docid": "2661c4029b636c78141364c39fb07aa5", "score": "0.6038924", "text": "function getQueryString() {\n $path_segs = explode(\"?\", $_SERVER['REQUEST_URI']);\n $uri = array_shift($path_segs);\n $qs = array_shift($path_segs);\n $args = array();\n parse_str($qs, $args);\n return $args;\n}", "title": "" }, { "docid": "253b58827f7a948d1ddbfaf40ef2d548", "score": "0.60272264", "text": "public function qs()\n\t{\n\t\treturn $this->request->getUri()->getQuery();\n\t}", "title": "" }, { "docid": "cd107cb1dd4af71976f93bf06b353751", "score": "0.6024526", "text": "public function getParams(): array\n {\n $params = [];\n\n if ($this->categoryIds) {\n $params[\"categories\"] = implode(\",\", $this->categoryIds);\n }\n\n if ($this->conditionIds) {\n $params[\"conditions\"] = implode(\",\", $this->conditionIds);\n }\n\n if ($this->deliveryTypeIds) {\n $params[\"deliveryTypes\"] = implode(\",\", $this->deliveryTypeIds);\n }\n\n return $params;\n }", "title": "" }, { "docid": "9644774e692a3000348bc5a80f098c27", "score": "0.6020814", "text": "private function getParams()\n {\n return $this->method === 'GET' ? [] : $this->params;\n }", "title": "" }, { "docid": "8db92833460157c5686d33e757224828", "score": "0.6020554", "text": "public function getParams(): string\n {\n $params = [];\n\n foreach ($this->params as $param => $value) {\n if (null !== $value && '' !== $value) {\n $params[$param] = $value;\n }\n }\n\n return [] === $params ? '' : '?' . http_build_query($params, '', '&', PHP_QUERY_RFC3986);\n }", "title": "" }, { "docid": "023011b0c346068803de8a0b82600509", "score": "0.6013492", "text": "public function getRequestParams()\n {\n return array('sl_offers' => [1, 2, 3, 5, 7]);\n }", "title": "" }, { "docid": "d1d885fb005576b79f7127e58911bb2f", "score": "0.60086113", "text": "protected function queryParameters()\n {\n return [\n 'base' => $this->defaultCurrency,\n 'currencies' => collect($this->currencies())->implode(','),\n ];\n }", "title": "" }, { "docid": "c5483d6f645b6eb6e47276f348fb2c10", "score": "0.60052437", "text": "protected function getUrlParamsArray() {\r\n\t\treturn LBoxFront::getUrlParamsArray();\r\n\t}", "title": "" }, { "docid": "579ce7b43960cc507aa8644c77cbf735", "score": "0.6005154", "text": "function query_params( $query_params = [] ) {\n return collect( $query_params )\n ->map( function ( $val = '', $key = '' ) {\n return trim( $key . '=' . $val, \" \\t\\n\\r\\0\\x0B=\" );\n } )\n ->flatten()\n ->join( '&' );\n}", "title": "" }, { "docid": "956d2be66da589a9ba1b6787590b12d5", "score": "0.60016316", "text": "public function getQueryParameters()\n {\n return [\n self::QUERY_PARAM => $this->entity->id\n ];\n }", "title": "" }, { "docid": "18b42ac911c0bca23b14000c2f253307", "score": "0.59986854", "text": "function rebuild_qsp() {\n\t\t$qsp='';\n\t\tif(count($_POST) != 0){\n\t\t\t$cles=array_keys($_POST);\n\t\t\t$qsp=array();\n \t\t\tforeach ($cles as $val) {\n\t\t\t\tif ($_POST[$val] != \"\"){\n\t\t\t\tarray_push($qsp, $val.\"=\".$_POST[$val]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$qsp = \"&\".implode(\"&\", $qsp);\n\t\t\t}\n\t\t\t$qsp = ($qsp == \"&\") ? \"\" : $qsp;\n\t return $qsp;\t\n\t}", "title": "" }, { "docid": "873847e8dbd9b0b9ea9328a4aa911d55", "score": "0.59980714", "text": "static public function getQueryStringArgs($args)\n {\n global $context;\n $logger = $context->getLogger();\n \n if (array_key_exists('QUERY_STRING', $_SERVER)) {\n if ($logger->isHandling(Logger::DEBUG))\n $logger->debug('Query string: ' . $_SERVER['QUERY_STRING']);\n } else\n Utils::httpBadRequest(\"HTTP error, no query string provided.\");\n \n $result = array();\n foreach ($args as $name) {\n \n if (array_key_exists($name, $_REQUEST)) {\n if ($name != \"query\")\n // Escape special chars\n $argValue = strip_tags($_REQUEST[$name]);\n else\n // Dp NOT escape special chars in case of the 'query' parameter that contains the SPARQL query\n $argValue = $_REQUEST[$name];\n $result[$name] = $argValue;\n } else\n self::httpBadRequest(\"Query argument '\" . $name . \"' undefined.\");\n }\n \n return $result;\n }", "title": "" }, { "docid": "e9a54251ee3313f462b19d81295d036a", "score": "0.59886056", "text": "public function getQueryString()\n\t{\n\t $param = array();\n\t foreach($this->param as $key => $value)\n\t {\n\t $param[] = \"$key=$value\"; \n\t }\n\t \n\t return implode(\"&\", $param);\n\t}", "title": "" }, { "docid": "3fc04640a23322c4f1c0522bfe7a8e3b", "score": "0.5982316", "text": "public static function params()\n {\n return isset($_REQUEST) ? $_REQUEST : array();\n }", "title": "" }, { "docid": "bae6608ca795a2d54d41c2a91435a8b8", "score": "0.59795773", "text": "public function parseQueryString($query){\n $params = explode('&', $query);\n $aparams = array();\n foreach($params as $val){\n $t = explode('=', $val);\n $aparams[urldecode($t[0])] = urldecode($t[1]);\n }\n return $aparams;\n }", "title": "" }, { "docid": "5d08f36e2b2d1c666d5bd579f88a4a8c", "score": "0.59576964", "text": "public function get_query_vars()\n {\n }", "title": "" }, { "docid": "f0593c072e12a9e664b262254cb4cf0d", "score": "0.5951377", "text": "public static function getParams()\n {\n $params = array();\n foreach(self::ALL_PARAMS as $commands => $param)\n {\n if(isset($param['r']))\n {\n foreach($param['r'] as $required)\n {\n $items = explode(':', $required);\n $params = array_merge($params, array_values($items));\n }\n }\n if(isset($param['o']))\n {\n $params = array_merge($params, $param['o']);\n }\n }\n $params = array_unique($params);\n $result = array();\n foreach($params as $item)\n {\n array_push($result, $item.\":\");\n }\n\n return $result;\n }", "title": "" }, { "docid": "66691a7c049d46a88587ca8acc399eba", "score": "0.5942519", "text": "function getPairs($query, $sFieldKey, $sFieldValue)\n {\n if(!$query)\n return array();\n\n $res = $this->res ($query);\n $arr_res = array();\n if($res) {\n while($row = mysql_fetch_array($res, MYSQL_ASSOC)) {\n $arr_res[$row[$sFieldKey]] = $row[$sFieldValue];\n }\n mysql_free_result($res);\n }\n return $arr_res;\n }", "title": "" }, { "docid": "5850cfc982d14d3a6288e92dfc1df39c", "score": "0.59405154", "text": "public function getQueryParams()\n {\n if ($this->_queryParams === null) {\n return $_GET;\n }\n\n return $this->_queryParams;\n }", "title": "" }, { "docid": "1fd30653d618c37df684658041286192", "score": "0.59354454", "text": "public static function getParams($sUrl)\n {\n $aUrl = self::explode($sUrl);\n\n return $aUrl['query_params'];\n }", "title": "" }, { "docid": "ea7a4f6705915040580c751f3e362f36", "score": "0.5923561", "text": "public function getParamArray() {\n\t\t$data = array();\n\t\t\n\t\t// For every parameter in the map\n\t\tforeach ( $this->_param_map as $param => $info ) \n\t\t{\n\t\t\t// We make sure that the value is set ( in case all they did was add an override\n\t\t\t// or they set it to the default value )\n\t\t\tif( isset($info['value']) ) {\n\t\t\t\tswitch ( $info['type'] ) \n\t\t\t\t{\n\t\t\t\tcase self::CSV_PARAM:\n\t\t\t\t\t// If it is a CSV param, implode it using commas as glue\n\t\t\t\t\t$data[$param] = implode(',', $info['value']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::BOOLEAN_PARAM:\n\t\t\t\t\t// If it is boolean, convert to the english words\n\t\t\t\t\t$data[$param] = ( $info['value'] === true ? \"true\" : \"false\" );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// Otherwise just add it.\n\t\t\t\t\t$data[$param] = $info['value'];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// If this is an overrideable parameter\n\t\t\tif ( isset($info[self::OVERRIDE_KEY]) )\n\t\t\t{\n\t\t\t\t// For each of the overrides\n\t\t\t\tforeach ( $info[self::OVERRIDE_KEY] as $field => $value )\n\t\t\t\t{\n\t\t\t\t\t// Add it to the parameters as f.<field name>.<parameter name> as\n\t\t\t\t\t// described on http://wiki.apache.org/solr/SimpleFacetParameters#Parameters\n\t\t\t\t\t// and http://wiki.apache.org/solr/HighlightingParameters#HowToOverride\n\t\t\t\t\t$data[\"f.$field.$param\"] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Return the array.\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "cbdcdc7759baec1f5d09e6786ed29856", "score": "0.59233856", "text": "public function toQueryVariables(): array\n {\n $args = $this->queryVars;\n\n return array_reduce(\n array_keys($args),\n function ($accumulator, $key) use ($args) {\n $input = $args[$key];\n $accumulator[$key] = $input instanceof AbstractInputType ? $input->toArray() : $input;\n\n return $accumulator;\n },\n []\n );\n }", "title": "" }, { "docid": "3b8cc4e55c294696949817f927b9f0de", "score": "0.59227663", "text": "public function getRequestQuery()\n {\n $params = [\n \"Search\" => trim($this->search),\n \"Take\" => max(0, min(24, $this->take)),\n \"Skip\" => max(0, $this->skip),\n ];\n\n // If we've not provided a search term, then just remove it from the params.\n if (empty($params[\"Search\"])) {\n unset($params[\"Search\"]);\n }\n\n return $params;\n }", "title": "" }, { "docid": "7cbc663bbd621409beabb2da5a0d6edf", "score": "0.5915375", "text": "function getParams()\r\n {\r\n $params = array();\r\n foreach($this->request->params['url'] as $key => $val) if ($key != 'url') $params[] = urlencode($key) . '=' . urlencode($val);\r\n return (count($params) > 0 ? '?' . join('&', $params) : '');\r\n }", "title": "" }, { "docid": "b5b192fb707653adc07d0112bb111bf9", "score": "0.59141475", "text": "public function getQuery()\n {\n return [\n 'service' => $this->serviceName,\n 'pushservicetype' => 'apns',\n 'cert' => $this->cert,\n 'key' => $this->key,\n ];\n }", "title": "" }, { "docid": "a2eb574e57ba3c79de091dd67116c829", "score": "0.59076625", "text": "public static function getParameterList()\n {\n\t\t$parameters[] = \"CLIENT_TXT_CLIENT_ID\";\n\t\t$parameters[] = \"CLIENT_TXT_LG_ID\";\n\t\t$parameters[] = \"CLIENT_TXT_NAME\";\n\t\t$parameters[] = \"CLIENT_TXT_DESCR\";\n\t\t$parameters[] = \"CLIENT_TXT_CB\";\n\t\t$parameters[] = \"CLIENT_TXT_DC\";\n\t\t$parameters[] = \"CLIENT_TXT_MB\";\n\t\t$parameters[] = \"CLIENT_TXT_DM\";\n\t\t$parameters[] = \"CLIENT_TXT_TS\";\n\n return $parameters;\n }", "title": "" }, { "docid": "3d07babe20aea186f9739e1b72365daa", "score": "0.5907017", "text": "public function get_query_params() {\n\t\treturn $this->collect_additional_shortlink_data();\n\t}", "title": "" }, { "docid": "e2227ae3c92c6b218ca90d681f9a76a9", "score": "0.5880221", "text": "public function getAllParameters() {\n return array_merge($_GET, $_POST);\n }", "title": "" }, { "docid": "9a7ea1ca3c71f31d72a91c85416a69c3", "score": "0.5869833", "text": "protected function queryParameters()\n {\n return $this->request->only('per_page', 'page');\n }", "title": "" }, { "docid": "3cd079420d2dc50d8abe7f90be09826d", "score": "0.5868552", "text": "public function getQueryParts()\n {\n $result = [\n 'type' => $this->getQueryType(),\n 'fields' => $this->fields,\n 'table' => $this->getTable()\n ];\n\n if (!empty($this->values)) {\n $result['values'] = $this->values;\n }\n\n if (!empty($this->set)) {\n $result['set'] = $this->set;\n }\n\n if (!empty($this->index)) {\n $result['index'] = $this->index;\n }\n\n if (!empty($this->joins)) {\n $result['join'] = $this->joins;\n }\n\n if (!empty($this->wheres)) {\n $result['where'] = $this->wheres;\n }\n\n if (!empty($this->group)) {\n $result['group'] = $this->group;\n }\n\n if (!empty($this->order)) {\n $result['order'] = $this->order;\n }\n\n if (!empty($this->limit)) {\n $result['limit'] = $this->limit;\n }\n\n return $result;\n }", "title": "" }, { "docid": "5cb02a95e6ad32923d32721d7bc6a232", "score": "0.586386", "text": "public function getQueryParamsToBind($tableData)\n {\n if (isset($tableData['?'])) {\n return array_values($tableData['?']);\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "dbee0ed1c515960119ebf281ae3465db", "score": "0.58564246", "text": "public static function getQueryParams($request = null): array\n {\n if (is_object($request) && method_exists($request, 'getQueryParams')) {\n return $request->getQueryParams();\n }\n // for everyone else\n $server = static::getServerParams($request);\n $query = [];\n if (!empty($server['QUERY_STRING'])) {\n parse_str($server['QUERY_STRING'], $query);\n }\n return $query;\n }", "title": "" } ]
282ca51f0ed928671d187726597a15c4
Declares the validation rules. The rules state that username and password are required, and password needs to be authenticated.
[ { "docid": "dde32e0732367bd447aa5fb1b3f7679d", "score": "0.0", "text": "public function rules()\n {\n return array(\n array('verifyCode', 'captcha', 'allowEmpty' => !extension_loaded('gd'), 'captchaAction' => 'user/captcha'),\n array('username, email, password, firstname, lastname, verifyPassword, plan, organization', 'required'),\n array('verifyPassword', 'compare', 'compareAttribute' => 'password'),\n array('verifyPassword', 'match', 'pattern' => '/^[0-9a-zA-Z_!#.,-@$%*\\(\\)\\+=\\&]+$/'),\n array('username, email, password, activationKey, createtime, firstname, lastname, status, plan, organization__id, verifyCode, verifyPassword, organization', 'safe'),\n );\n }", "title": "" } ]
[ { "docid": "3424aa6d9c322d8c48fcfe137bea23e4", "score": "0.79371965", "text": "public function rules()\n\t{\n\t\treturn array(\n\t\t\tarray('username, password', 'required'),\n\t\t\tarray('username', 'email'),\n\t\t\tarray('password', 'authenticate'),\n\t\t);\n\t}", "title": "" }, { "docid": "74c7822692516356235065530bd1d00e", "score": "0.7669198", "text": "public function rules()\n\t{\n\t\treturn array(\n\t\t\t// username and password are required\n\t\t\tarray('username, password', 'required'),\n\t\t\t// rememberMe needs to be a boolean\n\t\t\tarray('rememberMe', 'boolean'),\n\t\t\t// password needs to be authenticated\n\t\t\tarray('password', 'authenticate'),\n\t\t);\n\t}", "title": "" }, { "docid": "7214c700d203c6a1b62467a478b3dbab", "score": "0.75244826", "text": "public function rules() {\n return array(\n // username and password are required\n array('username, password', 'required'),\n // rememberMe needs to be a boolean\n array('rememberMe', 'boolean'),\n // password needs to be authenticated\n array('password', 'authenticate'),\n );\n }", "title": "" }, { "docid": "81f7450ad87a5e6f24c455cccbf360fb", "score": "0.7488249", "text": "public function rules()\n {\n return [\n 'username' => 'required',\n 'password' => 'required',\n ];\n }", "title": "" }, { "docid": "fb2162dc2357276c8bddc01d557d5cb3", "score": "0.746153", "text": "public function rules()\n\t{\n\t\treturn array(\n\t\t\t// username and password are required\n\t\t\tarray('username', 'required'),\n\t\t\tarray('username', 'email'),\n\t\t);\n\t}", "title": "" }, { "docid": "e7fb9e957384fcaf0b4557d7750f4d73", "score": "0.73853076", "text": "public function rules()\n\t{\n\t\treturn array(\n\t\t\t// username and password are required\n\t\t\tarray('useremail, password', 'required'),\n\t\t\t//useremail needs to be in email format\n\t\t\tarray('useremail', 'email'),\n\t\t\t// rememberMe needs to be a boolean\n\t\t\tarray('rememberMe, sendMe', 'boolean'),\n\t\t\t// password needs to be authenticated\n\t\t\tarray('password', 'authenticate', 'on' => 'login'),\n\t\t);\n\t}", "title": "" }, { "docid": "2e10420be1c6cdd2721dc63a388f93c0", "score": "0.7384022", "text": "public function rules()\n {\n return [ \n 'username' => 'email|required', \n 'password' => 'required' \n ];\n }", "title": "" }, { "docid": "7a4a9558e64af751bba2dcb878fbc49f", "score": "0.7368877", "text": "public function rules()\n {\n return [\n 'password'=>'required',\n 'username'=>'required'\n ];\n }", "title": "" }, { "docid": "312ec99a01c758a0e72674e40ae66711", "score": "0.73249865", "text": "public function rules()\n\t{\n\t\treturn array(\n\t\t\t// username and password are required\n //array('email','email', 'allowEmpty' => false),\n array('username, password', 'required'),\n\t\t\t// rememberMe needs to be a boolean\n\t\t\tarray('rememberMe', 'boolean'),\n\t\t\t// password needs to be authenticated\n\t\t\t//array('password', ''),\n\t\t);\n\t}", "title": "" }, { "docid": "327326c7b590c8fd46ee63b02e41cfba", "score": "0.7305354", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n case 'POST':\n {\n return [\n 'username' => 'required',\n 'password' => 'required',\n ]; \n }\n case 'PUT':\n case 'PATCH':\n default:break;\n }\n }", "title": "" }, { "docid": "4bbb21ab932310c53243d58c617f994c", "score": "0.7301248", "text": "public function rules()\n\t{\n\t\treturn array(\n\t\t\t // username and password are required\n\t\t\t array('user_email', 'required'),\n\t\t\t array('user_email', 'authenticate'),\n\t\t\t array('user_email', 'safe'),\n\t\t);\n\t}", "title": "" }, { "docid": "f1f0eb12d001c98ba9a3d587a891d0e6", "score": "0.71338177", "text": "public function rules()\n {\n\n // dd($request);\n\n $request = Request::All();\n \n $rule_pass = (! empty($request['password'])) ? 'required|min:6' : '' ;\n\n return [\n 'username' => 'required|max:255|unique:users,username,'.$this->route->parameter('user'),\n 'password' => $rule_pass,\n 'email' => 'required|unique:users,email|email',\n 'email' => 'required|max:255|unique:users,email,'.$this->route->parameter('user'),\n 'is_active' => 'required',\n ];\n }", "title": "" }, { "docid": "eec8ab035bcf490e2d6144fab270cc37", "score": "0.7049186", "text": "public function rules()\n {\n return [\n 'username' => 'required',\n 'password' => 'required',\n 'repassword' => 'same:password',\n ];\n }", "title": "" }, { "docid": "85d4fea9438e8c6016f4c0f497b2db2b", "score": "0.7042416", "text": "public function rules()\n {\n return array(\n // username and password are required\n array('password', 'required'),\n array('password', 'compare'),\n array('password, password_repeat', 'safe'),\n // username needs to be verified\n //array('username', 'exist', 'className'=>'User'),\n //array('username', 'verify'),\n );\n }", "title": "" }, { "docid": "6cfeb708a152debfaa3e90266a429ad0", "score": "0.703899", "text": "public function rules()\n {\n return array(\n // username and password are required\n array('name, phone, code, email', 'required'),\n // when in register scenario, password must match password2\n array('name, phone, address, detail_text, orders', 'safe'),\n );\n }", "title": "" }, { "docid": "bb507946c0ad1b042f8e610d5ba69ec7", "score": "0.70186967", "text": "public function rules() {\n\n return [\n 'username' => 'required|min:2',\n 'email' => 'required|email',\n 'password' => 'required|confirmed|min:2'\n ];\n }", "title": "" }, { "docid": "3bb19917b40979a1ef5d6458bdb29d00", "score": "0.70152926", "text": "public function rules()\n {\n if(strlen(trim($this->input('username'))) > 0 && strlen(trim($this->input('password'))) > 0) {\n $str_validate = \"required|checklogin:{$this->input('username')},{$this->input('password')}\";\n } else {\n $str_validate = \"required\";\n }\n return [\n 'username' => $str_validate,\n// 'username' => 'required',\n 'password' => 'required',\n ];\n }", "title": "" }, { "docid": "3ad54634baf2f8a091db9c73075222a0", "score": "0.7009897", "text": "public function rules()\n {\n return [\n 'email' => 'required',\n 'password' => 'required'\n ];\n }", "title": "" }, { "docid": "d965ebbc980ec7d3433d1cd62d2a02b1", "score": "0.70020986", "text": "public function rules()\n {\n return [\n 'username' => 'required|min:6|max:20',\n 'password' => 'required|min:6',\n 'email' => 'required|email'\n ];\n }", "title": "" }, { "docid": "d2494c3a49b42d341595c65607056d3e", "score": "0.69792736", "text": "public function rules()\n {\n return [\n 'email' => 'required',\n 'password' => 'required',\n ];\n }", "title": "" }, { "docid": "d39f890b6de0dc44e9408cd5e3a563e4", "score": "0.6965933", "text": "public function rules()\n {\n return [\n 'account' => 'required',\n 'password' => 'required'\n ];\n }", "title": "" }, { "docid": "26f5671306a6bc3df9382e3915223bc1", "score": "0.69604015", "text": "public function rules()\n {\n return [\n 'user.username' => 'required|max:10',\n 'user.password' => 'required',\n ];\n }", "title": "" }, { "docid": "f4eba9ea54e9d0714d4e2a344edcb708", "score": "0.69565594", "text": "public function rules()\n {\n return [\n 'userName' => 'required',\n 'userEmail' => 'required|email',\n 'password' => 'required'\n //\n ];\n }", "title": "" }, { "docid": "e6bce028b22db102b246832b1f39fda5", "score": "0.69531435", "text": "public function rules()\n {\n switch ($this->method()){\n case 'POST':\n return [\n 'username' => 'required|string|unique:users,username',\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 're_password' => 'required|same:password',\n ];\n\n case 'PUT':\n case 'PATCH':\n return [\n 'username' => 'required|string',\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n 're_password' => 'required|same:password',\n ];\n }\n\n }", "title": "" }, { "docid": "6e96217224d8754e66fc3289675e3686", "score": "0.69427586", "text": "public function rules()\n {\n return [\n 'username' => ['required', 'string', 'between:1,100'],\n 'password' => ['required'],\n ];\n }", "title": "" }, { "docid": "9d08503934555bd27813eefe66e635b0", "score": "0.69360656", "text": "protected function customRules()\n {\n return [\n // username and password are both required\n [['username', 'password'], 'required', 'message' => Yii::t('error','Incorrect username or password.')],\n ['password', 'validatePassword'],\n ];\n }", "title": "" }, { "docid": "ce418e8af4432607318435beeab50699", "score": "0.6923077", "text": "public function rules() {\r\n return array(\r\n // username and password are required\r\n array('email', 'required'),\r\n array('email', 'email'),\r\n // rememberMe needs to be a boolean\r\n \r\n );\r\n }", "title": "" }, { "docid": "f4eeb7f7d10833e18c0315075aa2115c", "score": "0.69068736", "text": "public function rules()\n\t{\n\t\treturn array(\n\t\t\t// username and password are required\n\t\t\tarray('id ,firstname ,lastname, email ' ,'required'),\n\t\t\t// email has to be a valid email address\n\t\t\tarray('email', 'email'),\n\t\t\t// not mendatory \n\t\t\tarray('status', 'boolean'),\n\t\t\t// not required \n\t\t\tarray('newpassword , confpassword ','safe'),\n\t\t);\n\t}", "title": "" }, { "docid": "25c568d5a56235c75ac648ab25472e28", "score": "0.6896066", "text": "public function rules()\n {\n return [\n 'name' => ['required'],\n 'password' => ['required'],\n ];\n }", "title": "" }, { "docid": "3009fc18768f008b1253133f0bbe271d", "score": "0.6876468", "text": "public function rules()\n {\n return [\n 'email' => ['required', 'string', 'max:255', new EmailOrUsernameValidation()],\n 'password' => 'required',\n ];\n }", "title": "" }, { "docid": "f33b4b8def9ff58d314213a010255f72", "score": "0.6867184", "text": "public function rules()\n {\n return [\n 'email' => 'required|email|email',\n 'password' => 'required'\n ];\n }", "title": "" }, { "docid": "bf6f234aab2abc141cb380ee9f1680ee", "score": "0.6857462", "text": "public function rules()\n {\n return [\n 'email' => 'required|email',\n 'password' => 'required',\n ];\n }", "title": "" }, { "docid": "864456f712155432c16b815833ede57e", "score": "0.6856848", "text": "public function rules()\n {\n return [\n 'username' => 'required|max:32|min:3|alpha_dash',\n 'password' => 'required|min:3',\n ];\n }", "title": "" }, { "docid": "433e777beea6688c14b301cecd50885c", "score": "0.685652", "text": "public function rules()\n\t{\n\t\t$rules = [\n\t\t\t'first_name' => 'required|max:64',\n\t\t\t'last_name' => 'required|max:64',\n\t\t\t'role_id' => 'required',\n\t\t\t'email' => 'required|email|max:128|unique:users,email',\n\t\t];\n\n\t\t$data = $this->all();\n\n\t\tif ( isset($data['avatar']) && $data['avatar'] != '' ) {\n\t\t\t$rules['avatar'] = 'required';\n\t\t}\n\n\n\t\t$id = request()->route('id');\n\n\t\tif ( $id ) {\n\t\t\t$rules['email'] = 'required|email|max:128|unique:users,id,' . $id;\n\n\t\t\tif ( isset($data['password']) && $data['password'] != '' ) {\n\t\t\t\t$rules['password'] = 'required|min:8';\n\t\t\t}\n\t\t} else {\n\t\t\t$rules['password'] = 'required|min:8';\n\t\t\t$data['editable'] = true;\n\t\t}\n\n\t\tif ( isset($data['password']) && $data['password'] != '' ) {\n\t\t\t$data['password'] = Hash::make($data['password']);\n\t\t}\n\n\t\tif ( isset($data['newsletter']) ) {\n\t\t\t$data['newsletter'] = ( $data['newsletter'] ? 1 : 0 );\n\t\t}\n\n\t\tif ( isset($data['partner_offers']) ) {\n\t\t\t$data['partner_offers'] = ( $data['partner_offers'] ? 1 : 0 );\n\t\t}\n\n\t\tif ( isset($data['privacy']) ) {\n\t\t\t$data['privacy'] = ( $data['privacy'] ? 1 : 0 );\n\t\t}\n\n\t\tif ( isset($data['terms_conditions']) ) {\n\t\t\t$data['terms_conditions'] = ( $data['terms_conditions'] ? 1 : 0 );\n\t\t}\n\n\t\t$this->merge($data);\n\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "7c60659950186dbf2baec91133b7d6e9", "score": "0.6850884", "text": "public function rules()\n {\n return [\n 'account' => ['required'],\n 'password' => ['required'],\n ];\n }", "title": "" }, { "docid": "54a8656bf991bcd071c273f22be7ede2", "score": "0.68449914", "text": "public function rules()\n {\n $rule = [\n 'email' => 'required|email',\n 'password' => 'required'\n ];\n return $rule;\n }", "title": "" }, { "docid": "36c08eb5cc9eb3b473b2e5f7f893fe01", "score": "0.683566", "text": "public function rules()\n {\n $rules = [\n \"first_name\" => \"required|alpha_space|between:2,255\",\n \"last_name\" => \"required|alpha_space|between:2,255\",\n \"address\" => \"max:500\",\n ];\n\n if ($this->isMethod('POST')) {\n $rules[\"role_id\"] = \"required|exists:roles,id\";\n $rules[\"email\"] = \"required|email|unique:users,email|between:5,255\";\n $rules[\"username\"] = \"required|unique:users,username|max:255\";\n $rules[\"is_email_verified\"] = \"required|in:\" . array_to_string(email_status());\n $rules[\"is_financial_active\"] = \"required|in:\" . array_to_string(financial_status());\n $rules[\"is_active\"] = \"required|in:\" . array_to_string(account_status());\n $rules[\"is_accessible_under_maintenance\"] = \"required|in:\" . array_to_string(maintenance_accessible_status());\n } else {\n if (\n $this->request->has('role_id') && !in_array($this->route('id'), config('commonconfig.fixed_users')) && $this->route('id') != Auth::user()->id\n ) {\n $rules['role_id'] = \"required|exists:roles,id\";\n }\n }\n return $rules;\n }", "title": "" }, { "docid": "7bc4b73d6d3a383d9a48816d2f900243", "score": "0.6822123", "text": "public static function rules()\n {\n return [\n 'email' => 'required|string|email',\n 'password' => 'required|string',\n ];\n }", "title": "" }, { "docid": "df753c3ed8e5d0b6a948f35ece07ba20", "score": "0.6816942", "text": "public function rules()\n\t{\n\t\treturn array(\n\t\t\tarray('email,username', 'length', 'max' => 250, 'min' => 2),\t\t\t\t\n\t\t\t// username and password are required\n\t\t\tarray('username, password', 'required', 'on' => 'login'),\n\t\t\t// rememberMe needs to be a boolean\n\t\t\tarray('rememberMe', 'boolean', 'on' => 'login'),\n\t\t\t// password needs to be authenticated\n\t\t\tarray('password', 'authenticate', 'on' => 'login'),\n\t\t\t// email when requesting passwor\n\t\t\tarray('email', 'email', 'on' => 'password'),\t\n\t\t\tarray('email', 'required', 'on' => 'password'),\t\t\n\t\t\t\n\t\t\t/** the create scenario */\t\n\t\t\tarray('email,username, password,passwordRepeat', 'required', 'on' => 'create'),\t\n\t\t\tarray('email', 'email', 'allowEmpty'=> false, 'on' => 'create'),\t\n\t\t\tarray('has_newsletter', 'boolean', 'on'=>'create'),\t\n\t\t\tarray('password,passwordRepeat', 'length', 'min'=> 5, 'max' => 40, 'on'=>'create'),\t\n\t\t\tarray('password', 'compare', 'compareAttribute'=>'passwordRepeat', 'on' => 'create'),\t\t\t\t\n/**\n * must be moved to LoginForm\n \t\t\t\t\n\t\t\tarray('email', 'email', 'on' => 'login'),\t\t\n\t\t\tarray('email', 'emailIsUnique','on' => 'new'),\t\t\t\t\n*/\t\t\t\t\t\n\n\n\t\t);\n\t}", "title": "" }, { "docid": "144ce183560bab64390fdd7eb45a621a", "score": "0.6799978", "text": "public function rules()\n {\n // if( request()->is('api/*') || request()->expectsJson() ){\n // $this->redirectAction;\n // }\n \n $rules =[\n 'name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', Rule::unique('users')->ignore($this->user)],\n ];\n \n // for updating without password\n if($this->user && request()->password === null ){ \n\n $rules +=[\n 'password' => ['nullable','string', 'min:8', 'confirmed'],\n ];\n\n }else{\n\n $rules +=[\n 'password' => ['sometimes','required', 'string', 'min:8', 'confirmed'],\n ];\n }\n \n\n return $rules;\n }", "title": "" }, { "docid": "be0d35f9ba45e938a7c6021ad13a0c48", "score": "0.679753", "text": "public function rulesForLogin();", "title": "" }, { "docid": "e28621ed4adfd8222b17af1615bd2f84", "score": "0.6779435", "text": "public function rules()\n\t\t{\n\t\treturn array(\n\t\t\t// username and password are required\n\t\t\tarray('switchUser', 'required'),\n\t\t\tarray('returnUrl', 'required'),\n\t\t\t// uppercase\n\t\t\tarray('switchUser', 'UpperCaseValidator'),\n\t\t\tarray('switchUser', 'validateSwitchUser'),\n\t\t\t// array('switchUser', 'NicHandleValidator'), // no: would cause error in trying to get logged-in user as part of cache key\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "5a89b912314af9343cc913b66f423cd0", "score": "0.676393", "text": "public function rules()\n {\n return [\n 'username' => 'required|string|min:4|max:12',\n 'mail' => 'required|string|email|min:4|max:30|unique:users,mail',\n 'password' => 'required|string|min:4|max:12|alpha_num|confirmed',\n 'password_confirmation' => 'required|string|min:4|max:12|alpha_num',\n ];\n }", "title": "" }, { "docid": "3c3076d557d65f549a691ae8cccf95e9", "score": "0.6761852", "text": "public function rules()\n {\n return [\n 'username' => 'required|min:6|max:30|unique:users',\n 'password' => 'required|min:8|max:20',\n 'password_confirmation' => 'required|same:password',\n 'fullname' => 'required|string',\n 'email' => 'required|email|unique:users,email',\n 'level' => 'required|boolean',\n 'active'=>'required|boolean',\n ];\n }", "title": "" }, { "docid": "83431f611da702387529ed74b4d2cd52", "score": "0.6756194", "text": "public function rules() {\n return [\n 'username' => 'required|min:3|max:15',\n 'email' => 'required|email|max:45|unique:users',\n 'password' => 'required|min:6|confirmed'\n ];\n }", "title": "" }, { "docid": "8aa12ef9cfe03138ea260881e10a5117", "score": "0.6739612", "text": "public function rules()\n {\n return array(\n array('username, password', 'required', 'on' => 'create'),\n array('username, password, captcha', 'required', 'on' => 'login'),\n array('username', 'unique', 'on' => 'create'),\n array('captcha', 'captcha', 'allowEmpty' => !extension_loaded('gd'), 'on' => 'login'),\n array('username, password', 'required'),\n array('username', 'length', 'max' => 50),\n array('password', 'length', 'max' => 32),\n array('username, password', 'safe', 'on' => 'search'),\n array('rememberMe', 'boolean'),\n );\n }", "title": "" }, { "docid": "36d0f72802dd30ead7991f354014cbf0", "score": "0.67347974", "text": "public function rules()\n {\n return [\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'username' => 'required|max:255|unique:users',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|confirmed|min:6',\n ];\n }", "title": "" }, { "docid": "80bfe094b7a076ee7c3fed90aaa12514", "score": "0.672302", "text": "public function rules()\n {\n return [\n //'user_name' => 'min:5|max:80|required',\n //'user_password' => 'min:6|max:15|required'\n ];\n }", "title": "" }, { "docid": "59c9a58fd3fd3776ae08bbbfd2294109", "score": "0.6716711", "text": "public function rules()\n {\n return [\n 'email' => 'required|email|max:100',\n 'pwd' => 'required|min:6|max:32'\n ];\n }", "title": "" }, { "docid": "d3f5aad13c4efa794eabaa35aa2672bc", "score": "0.6716193", "text": "public function rules()\n {\n return array(\n array('username', 'checkActivate', 'on' => 'login'),\n // username and password are required\n array('username, password', 'required'),\n // password needs to be authenticated\n array('password', 'authenticate'),\n\n array('rememberMe', 'boolean'),\n // verifyCode needs to be entered correctly\n array('verifyCode', 'captcha', 'on' => 'login', 'allowEmpty' => !CCaptcha::checkRequirements()),\n );\n }", "title": "" }, { "docid": "d2ff7b729ea7463c26dc610f3a250ff5", "score": "0.67116225", "text": "public function rules()\n {\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6|max:32',\n ];\n }", "title": "" }, { "docid": "3ae2333a0099becd86ab4f30c8dc2be1", "score": "0.67040724", "text": "public function rules()\n\t{\n\t\treturn [\n\t\t\t'email' => 'required|string|email',\n\t\t\t'password' => 'required|string',\n\t\t\t'remember_me' => 'boolean'\n\t\t];\n\t}", "title": "" }, { "docid": "0272178ff51b521ee18bb2dc716c5728", "score": "0.6698621", "text": "public function rules()\n {\n return [\n 'username' => 'required',\n 'password' => 'required',\n \n 'email' => 'required|regex:/^([a-z0-9\\+_\\-]+)(\\.[a-z0-9\\+_\\-]+)*@([a-z0-9\\-]+\\.)+[a-z]{2,6}$/ix'\n ];\n }", "title": "" }, { "docid": "542c820228fad5240c40078d639ca679", "score": "0.66942894", "text": "public function rules()\n {\n return [\n 'username' => 'required|string|max:255',\n //'email' => 'required|string|email|max:255|unique:users',\n 'password' => 'required|string|min:6|confirmed',\n //'phone' => 'required|numeric|digits:11',\n ];\n }", "title": "" }, { "docid": "ffd95870512f8d6d8a6dc6a6ec5ace83", "score": "0.6692298", "text": "public function rules()\n {\n return [\n 'current_password' => ['required', new Password(auth('api')->user())],\n 'password' => 'required|min:6|max:255',\n ];\n }", "title": "" }, { "docid": "6fac4e9f657cb7e4c9e49e894c0350c0", "score": "0.66858715", "text": "public function rules(){ // reglas de validacion llamar al validated de request que utiliza las reglas introducidas aqui para hacer la validadcion\n return [\n 'login' => 'required|min:5|max:10|alpha_num', \n 'password' => 'required|numeric',\n 'email' => 'required',\n ];\n }", "title": "" }, { "docid": "ca0dd52d4a055c48b499430fabdc507a", "score": "0.6681894", "text": "public function rules()\n {\n $data = $this->request->all();\n $password_rule = isset($data['password']) ? 'min:6' : '';\n return [\n 'name' => 'required|string|min:2|',\n 'email' => 'sometimes|required|email|unique:users,id',\n 'password' => $password_rule\n ];\n }", "title": "" }, { "docid": "c05bc6b02c2f5bbe1dcd29ae8c0330bd", "score": "0.66758865", "text": "public function rules()\n\t{\n\t\treturn array(\n\t\t\t// username and password are required\n\t\t\tarray('username, password, verifyPassword', 'required'),\n\t\t\tarray('rememberMe', 'boolean'),\n\t\t\tarray('username, password', 'length', 'max'=>50),\n\t\t\tarray('verifyPassword', 'compare', 'compareAttribute'=>'password', 'message' => 'Passwords do not match'),\n\t\t);\n\t}", "title": "" }, { "docid": "5f6ed03c6a2371599150c87d740333b4", "score": "0.66729754", "text": "public function rules()\n {\n $id = Auth::guard('api')->user()->id;\n $validate = [\n 'name' => 'required|min:6|max:50',\n 'avatar' => 'sometimes',\n 'gender' => 'required',\n 'address' => 'required',\n 'email' => 'required|email|unique:users,email,' . $id,\n 'password' => 'sometimes|confirmed|min:6'\n ];\n if ($this->password) {\n $validate['current_password'] = ['required', new checkPasswordRule()];\n }\n return $validate;\n }", "title": "" }, { "docid": "4538134d5cfa4abbe6fec863053c0bb8", "score": "0.66708785", "text": "public function rules()\n {\n return [\n \"email\" => \"required|email\",\n \"password\" => \"required\"\n ];\n }", "title": "" }, { "docid": "6bb9f780a4619e6f21f6a82cde815413", "score": "0.66704434", "text": "public function rules()\n {\n return [\n 'username' => 'required|min:6|max:30|unique:users',\n 'fullname' => 'required',\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:8',\n 'password_confirm' => 'required|same:password',\n ];\n }", "title": "" }, { "docid": "ae66b6cff8d86450e36d5753628045bb", "score": "0.66669625", "text": "public function rules()\n {\n User::$rules['password'] = 'required|string|min:6';\n User::$rules['email'] = 'required|string|email|max:255|unique:users';\n return User::$rules;\n }", "title": "" }, { "docid": "011b363db774908d60dd6de824792571", "score": "0.666397", "text": "public function rules()\n {\n $user = $this->route()->parameter('user');\n $rules = [\n 'password' => 'required|min:6|regex:/^((?!.*[\\s])(?=.*[a-zA-Z])(?=.*\\d))/',\n 'password_confirmation' => 'required|same:password'\n ];\n return $rules;\n }", "title": "" }, { "docid": "ed215f5507ca62da27bf3211da44d6aa", "score": "0.66613364", "text": "public function rules()\n {\n return [\n 'first_name'=>'required',\n 'last_name'=>'required',\n 'username'=>'required|max:10|unique:users',\n 'password'=>'required',\n 'c_password'=>'required'\n ];\n }", "title": "" }, { "docid": "c571d59b703063705f5079e694428258", "score": "0.66558284", "text": "public function rules()\n {\n return array(\n array('password', 'check'),\n );\n }", "title": "" }, { "docid": "6252b8a5443173997498f35bf23430e9", "score": "0.6648928", "text": "public function getRules() {\n return [\n 'actions' => [ 'required', ],\n 'user_add' => [ 'required', 'rangeLogin', 'uniqueLogin', ],\n 'pass_add' => [ 'required', 'confirmPassword', 'minPassword' ],\n 'pass_repeat_add' => [ 'required', ],\n 'family_add' => [ 'required', ],\n 'name_add' => [ 'required', ],\n\n ];\n }", "title": "" }, { "docid": "79201a87ceceda7762aa76b9356ea0bf", "score": "0.66451156", "text": "public function rules()\n {\n return [\n ['login', 'required'],\n ['login', 'validateLogin'],\n ];\n }", "title": "" }, { "docid": "b95ee958451230b1aa8b9757d0908881", "score": "0.66433525", "text": "protected function rules()\n {\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6'\n ];\n }", "title": "" }, { "docid": "eabb0349c4a39ac0b3a12f99405af45a", "score": "0.6622888", "text": "public function rules()\n {\n $rules = [\n ];\n\n //Jeżeli zmienił się email - sprawdzamy czy\n if ($this->request->has('email') && User::find($this->request->get('id'))->email != $this->request->get('email')) {\n $rules['email'] = 'required|unique:users';\n }\n\n if ($this->request->has('password') && $this->request->get('password') != '') {\n $rules['password'] = 'required|same:password2';\n $rules['password2'] = 'required';\n }\n\n if (!is_array($this->request->get('role')))\n {\n $rules['role'] = 'required';\n }\n return $rules;\n }", "title": "" }, { "docid": "42f919c223adabf2e041de85e217ad43", "score": "0.66152513", "text": "public function rules()\n {\n return [\n 'name' => 'required',\n 'password' => 'required|min:8',\n 'username' => 'required|unique:users'\n ];\n }", "title": "" }, { "docid": "2b3ed95f31d2093a9bc0c1f2dc4f7d3d", "score": "0.66120636", "text": "public function rules()\n {\n return [\n 'user' => 'required|min:8|max:15|regex:/[A-Za-z0-9]$/',\n 'pass' =>'required|min:8|max:20|regex:/[A-Za-z0-9]$/'\n ];\n }", "title": "" }, { "docid": "cb464122322a821bea8d1e6c8b9fb5a4", "score": "0.66082263", "text": "public function rules()\n {\n return [\n 'email' => 'required|email|max:50',\n 'password' => 'required|min:6|string',\n ];\n\n }", "title": "" }, { "docid": "9bfe75925d42bd33dcb2186afcd91c79", "score": "0.66044354", "text": "public function rules(): array\n {\n return [\n 'username' => [Rule::requiredIf(fn () => ! isset($this->email)), 'string'],\n 'email' => [Rule::requiredIf(fn () => ! isset($this->username)), 'email'],\n 'password' => 'required',\n ];\n }", "title": "" }, { "docid": "28802e8b28e47450d5a28239f7290db3", "score": "0.6604058", "text": "private function createRules()\n {\n return [\n 'email' => 'required|email|unique:hc_users,email|min:5',\n// 'nickname' => 'required|unique:oc_users_personal_data,nickname|min:3',\n 'password' => 'required|min:5',\n// 'roles' => 'required',\n ];\n }", "title": "" }, { "docid": "bedcc084a74ac0a5cb46c07a43f5c8eb", "score": "0.6599585", "text": "public function rules()\n {\n $rules = array(\n // email\n array('email', 'required'),\n\n // password\n array('password', 'required'),\n array('password', 'authenticate', 'skipOnError' => true),\n\n // remember_me\n array('remember_me', 'boolean'),\n );\n // recaptcha\n if (Setting::item('recaptcha')) {\n $rules[] = array('recaptcha', 'validators.ReCaptchaValidator', 'privateKey' => Setting::item('recaptchaPrivate'), 'on' => 'recaptcha');\n }\n return $rules;\n }", "title": "" }, { "docid": "5ca322c52473b1cdf3452ac030dfece1", "score": "0.65982276", "text": "public function rules()\n {\n $id = $this->route('cms_user');\n\n $rules = [\n 'name' => 'required|string|max:255',\n 'login' => 'required|string|max:50',\n 'email' => 'nullable|string|max:50|unique:cms_users,email' . ($id ? \",$id\" : \"\"),\n 'roles' => 'required|array|exists:cms_roles,id',\n ];\n\n if (!$id || !empty($this->get('password'))) {\n $rules['password'] = 'required|string|min:5|confirmed';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "c4d94a1d8e53d209b0e80478459ebb47", "score": "0.6597877", "text": "public function rules()\n {\n return [\n \n 'name' => 'required|string', \n 'username' => 'required|string',\n 'email' => 'required|unique:users',\n 'password' => 'required|string'\n ];\n }", "title": "" }, { "docid": "3bf4a7123445afa0116f8f6176a75554", "score": "0.65957063", "text": "public function rules()\n {\n return [\n 'email' => ['required','email'],\n 'password' => ['required','string','min:4','max:16']\n ];\n }", "title": "" }, { "docid": "643cbeaff2abe1dba6e520767ddd2fb7", "score": "0.6594103", "text": "public function rules()\n {\n return [\n 'username'=>'required|min:5|max:255',\n 'password'=>'required|min:6|max:255',\n 're_password'=>'required|min:6|max:255',\n '_token'=>''\n ];\n }", "title": "" }, { "docid": "44a4f99e55eaee20032dc14473e75ad9", "score": "0.6591637", "text": "public function rules()\n {\n\t\t$pwRules = ['confirmed'];\n\t\tif ($this->input('password') || $this->input('password_confirmation')) {\n\t\t\t$pwRules[] = 'min:6';\n\t\t}\n\n\t\treturn [\n\t\t\t'name' => 'required|min:3',\n\t\t\t'email' => ['required', 'email', Rule::unique('users')->ignore($this->route('user')->id)],\n\t\t\t'usergroup' => 'required',\n\t\t\t'password' => $pwRules\n\t\t];\n }", "title": "" }, { "docid": "c8a9010d033ec474369a3cf59bb4667e", "score": "0.65902656", "text": "public function rules()\n {\n $rules = [\n 'role_id' => 'required',\n 'password' => 'required|confirmed',\n 'password_confirmation' => 'required'\n ];\n\n // 根据RESTful请求的方法来判断是新建还是更新(PUT)\n if ($this->method() === \"PUT\") {\n // 更新信息时,限制一个id,用于防止校验自身重复\n $rules['name'] = 'required|unique:users,name,' . $_POST[\"id\"];\n $rules['email'] = 'required|unique:users,email,' . $_POST[\"id\"];\n } else {\n $rules['name'] = 'required|unique:users';\n $rules['email'] = 'required|unique:users';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "fbcf6e8d2a32a3ec3b1f5b8d8375c218", "score": "0.6587393", "text": "public function rules()\n\t{\n\t\treturn [\n 'name' => 'required',\n 'email' => 'required|email',\n 'password' => 'required|confirmed',\n 'password_confirmation' => 'required'\n ];\n\t}", "title": "" }, { "docid": "228500b218e14298c29c25de08e3968d", "score": "0.6585196", "text": "public function rules() {\n return [\n 'username' => 'required',\n 'name' => 'required',\n 'surname' => 'required',\n 'password' => 'required|min:6',\n 'confirmPassword' => 'required|same:password',\n 'email' => 'required|email|unique:users,email',\n ];\n }", "title": "" }, { "docid": "3a675e4c8179dbf31218686fd7f76bb4", "score": "0.65773064", "text": "public function rules()\n {\n return [\n 'name' => ['required', 'min:3', 'max: 50'],\n 'lastname' => ['required', 'min:3', 'max: 50'],\n 'email' => ['required', 'email', 'unique:users'],\n 'password' => ['required', 'min:6', 'max:255'],\n 'c_password' => ['required', 'same:password'],\n ];\n }", "title": "" }, { "docid": "52b7c0ecd86654fe75929945abba5273", "score": "0.6566419", "text": "public function rules()\n {\n return [\n User::FIELD_NAME => 'required|unique:'.User::TABLE_NAME,\n User::FIELD_EMAIL => 'required|email|unique:'.User::TABLE_NAME,\n User::FIELD_PASSWORD => [\n 'required',\n 'string',\n 'confirmed',\n 'min:6',\n new PasswordRules()\n ]\n ];\n }", "title": "" }, { "docid": "5037f44a6557b35417782cdefdc5a0e1", "score": "0.6565078", "text": "public function validate() {\n $validator = new \\Validation($this->attributes);\n\n $validator->field(\"username\")\n ->required(\"Please enter a user name\")\n ->wordsnumbers(\"Please do not use special characters\")\n ->max(\"The username cannot be more than 60 characters\", 60);\n\n if (!$this->attributes['central_auth']) {\n $validator->field(\"fullname\")\n ->required(\"Please enter a name\")\n ->plaintext(\"Please do not use special characters\")\n ->max(\"A user's name cannot be more than 100 characters\", 100);\n\n $validator->field(\"email\")\n ->required(\"Please enter an email address\")\n ->plaintext(\"Please do not use special characters\")\n ->email(\"Please use the email format, eg. [email protected]\")\n ->max(\"The username cannot be more than 60 characters\", 60);\n }\n\n // if we haven't been created yet, enforce a password being entered\n if (!$this->exists) {\n $validator->field(\"password\")\n ->required(\"Please enter a password\")\n ->plaintext(\"Please do not use special characters\");\n }\n\n $this->errors = $validator->errors();\n\n return parent::validate();\n }", "title": "" }, { "docid": "b96b7b8b93de46c1370718cff54c6281", "score": "0.65627086", "text": "public function rules(): array\n {\n return [\n 'email'=> 'required',\n 'password'=> 'required',\n 'password2'=> 'required|same:password'\n ];\n }", "title": "" }, { "docid": "d61b4db586e84c4572c5917dace0e66f", "score": "0.6561809", "text": "public function rules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t// name, email, subject and body are required\r\n\t\t\tarray('password, passwordNew, passwordRepeat', 'required'),\r\n\t\t\tarray('password', 'access'),\r\n\t\t\tarray('passwordNew', 'compare', 'compareAttribute'=>'passwordRepeat')\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "20b7b442f035b8d530d2c2305c60c5c2", "score": "0.6559977", "text": "public function rules()\n {\n session()->flash('previous-route', 'website.web.auth.register');\n\n return [\n 'email' => 'required|string|email|max:255|unique:users',\n 'password' => 'required|string|confirmed|min:8',\n 'recaptcha_token' => ['required', new ReCaptchaRule($this->recaptcha_token)],\n ];\n }", "title": "" }, { "docid": "8028c46f18205b06441d6fbee5e07013", "score": "0.65487176", "text": "public function rules()\n {\n $user = User::find($this->users);\n\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'name_en' => 'required',\n 'username' => 'required|alpha_dash|min:3|unique:users',\n 'email' => 'required|email|unique:users',\n 'password' => 'required|min:6',\n 'user_group_id' => 'required'\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'name_en' => 'required',\n 'username' => 'required|alpha_dash|min:3|unique:users,username,' . $user->id,\n 'email' => 'required|email|unique:users,email,' . $user->id,\n 'password' => 'required|min:6',\n 'user_group_id' => 'required'\n ];\n }\n default:\n break;\n }\n }", "title": "" }, { "docid": "837c029fa890416e4327b8016ab81991", "score": "0.6548702", "text": "public function rules()\n {\n return [\n //\n \"username\"=>\"required|min:5\",\n \"password\"=>\"required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+$/\",\n ];\n }", "title": "" }, { "docid": "19b9cf76760fcb57435ca95359e04a6d", "score": "0.65430194", "text": "public function rules()\n {\n $captcha = $this->session()->get('milkcaptcha');\n\n $tableName = (new AdminUser())->getTable();\n if(isset($this->username) && isset($this->password)){\n return [\n 'username' => 'required|exists:'.$tableName.',user_name',\n 'password' => 'required',\n// 'captcha' => 'required|in:'.$captcha\n ];\n }elseif (isset($this->phone_num) && isset($this->identity_num)){\n $sessionOnlyLogin = $this->session()->get('onlyLogin');\n return [\n 'onlyLogin' => 'in:'.$sessionOnlyLogin,\n 'phone_num' => 'required|exists:'.$tableName.',phone_num',\n 'identity_num' => 'required',\n ];\n }\n\n }", "title": "" }, { "docid": "2f14645b3d51b391bf1e06709a62ac4a", "score": "0.65353376", "text": "public function rules()\n {\n return [\n 'txtUserName' => 'required|max:255|unique:users,username',\n 'txtEmail' => 'required|email|max:255|unique:users,email',\n 'txtPass' => 'required|min:6|confirmed',\n ];\n }", "title": "" }, { "docid": "6391a16d90946d40c06537894af0f7e0", "score": "0.65336204", "text": "public function rules()\n {\n return [\n 'email' => 'required|string|email|max:255',\n 'password' => 'required||string|min:6|max:255',\n ];\n }", "title": "" }, { "docid": "f7f24180183b9ae7b9a47f45b64b7b11", "score": "0.6530733", "text": "public function rules()\n {\n return [\n 'email' => 'required|email|max:60|unique:users,email,' . auth()->id(),\n 'current_password' => 'check_password',\n 'password' => 'min:6',\n 'password_confirmation' => 'required_with:password|same:password',\n 'first_name' => 'required|string|between:3,20',\n 'last_name' => 'required|string|between:3,20',\n 'phone' => 'phone:US|nullable',\n ];\n }", "title": "" }, { "docid": "5c3d39017722119bdd102b492fb0c395", "score": "0.65225667", "text": "public function rules()\n {\n $rules = [];\n $rules['full_name'] = ['required', 'min:3', 'max:100', new ValidateFullName, new SpamFree,];\n $rules['email'] = ['required', 'email', 'max:255', Rule::unique('users'),];\n $rules['mobile_number'] = ['required', new ValidateMobileNumber, Rule::unique('users'),];\n $rules['role_id'] = ['required', Rule::exists('roles', 'id'),];\n $rules['group_id'] = ['required', Rule::exists('user_groups', 'id'),];\n\n if ($this->getMethod() == 'PUT') {\n $userId = $this->route('user')->id;\n $rules['email'] = ['required', 'email', 'max:255', Rule::unique('users')->ignore($userId),];\n $rules['mobile_number'] = ['required', new ValidateMobileNumber, Rule::unique('users')->ignore($userId),];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "4e90c94ce0f097f0183e0a272941b590", "score": "0.6512773", "text": "public function rules()\n {\n return\n ['firstname' => 'required|string|max:255',\n 'middlename' => 'string|nullable|max:255',\n 'lastname' => 'required|string|max:255',\n 'username' => 'required|string|max:255|unique:users,username,1',\n 'email' => 'required|string|email|max:255|unique:users',\n 'password' => 'string|min:6|nullable|confirmed',\n 'password_confirmation' => 'required_with:password|string|nullable|min:6'];\n }", "title": "" }, { "docid": "7a598353be2aa39404b9362cc6d2226d", "score": "0.6510902", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n {\n return [\n 'username' => 'required|min:5|max:100|unique:users',\n 'password' => 'required|min:5|confirmed',\n 'full_name' => 'required|max:100',\n 'contact' => 'required|max:100'\n ];\n }\n case 'PUT':\n {\n return [\n 'full_name' => 'required|max:100',\n 'contact' => 'required|max:100'\n ];\n }\n default:\n break;\n }\n }", "title": "" }, { "docid": "16f749bf887b924d737b7b8a0db99161", "score": "0.650619", "text": "public function rules()\n {\n return [\n 'first_name' => ['required', 'string', 'max:255'],\n 'last_name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'password' => ['required', 'string', 'min:5'],\n ];\n }", "title": "" }, { "docid": "1ce609df145877bc2b15e45797e836b4", "score": "0.6503719", "text": "protected function rules()\n {\n// return [\n// 'email' => 'required|email|unique:hc_users,email',\n// 'password' => 'required',\n// ];\n\n switch ( $this->methodType() ) {\n case 'POST':\n return $this->createRules();\n\n case 'PUT':\n return $this->updateRules();\n\n default:\n return ['no_rules' => 'required'];\n }\n }", "title": "" }, { "docid": "a7589f372005d1d51e1b6fd490a7e316", "score": "0.64995545", "text": "public function rules()\n {\n return [\"email\" => [\"email\", \"required\"], \"password\" => [\"required\"], \"remember\" => [\"boolean\"]];\n }", "title": "" } ]
014e1f1d8929bd8937b676555496b536
/ funcion que inserta el nombre y la rerencia de un archivo de un id de personal
[ { "docid": "93022d95fec3f65d713bcc359549c285", "score": "0.5727344", "text": "function insertar_archivo($id, $NombreArchivo, $LinkArchivo){\n $conexion_bd = conectar();\n // INSERT INTO `personal` (`IdPersonal`, `NombrePersonal`, `TelefonoPersonal`, `CorreoPersonal`, `Privilegio`, `FechaInicioLaboral`, `Contrato`, `Respaldo`) VALUES (NULL, 'Sebas', '9678523', '[email protected]', '3', '12/10/20', NULL, NULL); `FechaInicioLaboral`, `FechaFinLaboral` , ?, ? , $_POST['fechaicolab'], $_POST['fechafcolab']$fechaicolab, $fechafcolab\n $consulta =\"INSERT INTO archivo (IdPersonal,NombreArchivo, LinkArchivo) VALUES(?,?,?)\";\n \n if(!($statement = $conexion_bd->prepare($consulta))) {\n die(\"Error(\".$conexion_bd->errno.\"): \".$conexion_bd->error);\n }\n \n if(!($statement->bind_param(\"sss\",$id, $NombreArchivo, $LinkArchivo))) {\n die(\"Error de vinculación(\".$statement->errno.\"): \".$statement->error);\n }\n \n if(!$statement->execute()) {\n die(\"Error en ejecución de la consulta(\".$statement->errno.\"): \".$statement->error);\n }\n \n desconectar($conexion_bd);\n\n\n}", "title": "" } ]
[ { "docid": "216bbcff473647e0758a4e4e7bfcf740", "score": "0.66003245", "text": "function nuevaPersona($conexion){\r\n\t$cedula = $conexion->real_escape_string($_POST['cedula']);\r\n\t$nombre = $conexion->real_escape_string($_POST['nombres']);\r\n\t$id_huella = $conexion->real_escape_string($_POST['id_huella']);\r\n\t$cargo = $conexion->real_escape_string($_POST['cargo']);\r\n\tif(!empty($_FILES['subirfoto']['name'])){\r\n\t\t$ruta_foto = $_FILES['subirfoto']['tmp_name'];\r\n\t\t$foto = $_FILES['subirfoto']['name'];\r\n\r\n\t\t$info = pathinfo($foto);\r\n\r\n\t\t$type = $info['extension'];\r\n\t\t$name = $id_huella.'.'.$type;\r\n\t\t$destino = '../fotos/'.$name;\r\n\t\tif(copy($ruta_foto, $destino)){\r\n\t\t\tregistrar($conexion, $name, $id_huella, $nombre, $cedula, $cargo);\r\n\t\t}\r\n\t} else {\r\n\t\t$resultado = consultar($conexion, \"foto\", \"personal\" , \"id_huella\", $id_huella, \"=\", \"\", \"\", \"\");\r\n\t\t$persona = $resultado->fetch_assoc();\r\n\r\n\t\t$name = $persona['foto'];\r\n\t\tregistrar($conexion, $name, $id_huella, $nombre, $cedula, $cargo);\r\n\t}\r\n}", "title": "" }, { "docid": "722e1e0a8eb404075c982086575049d2", "score": "0.621448", "text": "function addFile($archivo,$tipo,$descripcion,$descripcion2,$idActividad,$idModel){\n \t\t$query = \"SELECT idModelo_P, nombreM FROM modelo_p WHERE idModelo_P=$idModel\";\n\t\t$consulta = json_decode($this->getById($query));\n\t\t$nname = explode(\" \", $consulta->nombreM);\n\t\t$serv = $_SERVER['DOCUMENT_ROOT'] . '/base/archivos/'.$nname[0].\"/\";\n\t\techo $serv;\n\t\tif(!file_exists($serv))\n\t\t\tmkdir ($serv);\n\t\tif ($tipo == 'guia') {\n\t\t \tif($archivo[\"type\"]!=\"application/pdf\"){\n\t\t\t\t$_SESSION[\"msj\"] = \"Lo sentimos solo archivos PDF\";\n\t\t\t\theader(\"location: inicio_admin.php\");\n\t\t\t}\n\t\t if ($archivo[\"error\"] !== UPLOAD_ERR_OK) {\n\t\t $_SESSION['msj'] = \"Ha ocuurido un error.\";\n\t\t header(\"location: inicio_admin.php\");\n\t\t }\n\t\t \n\t\t // ensure a safe filename\n\t\t $name = preg_replace(\"/[^A-Z0-9._-]/i\", \"_\", $archivo[\"name\"]);\n\t\t \t\n\t\t // preserve file from temporary directory\n\t\t $success = move_uploaded_file($archivo[\"tmp_name\"],\n\t\t $serv . $name);\n\t\t if (!$success) { \n\t\t echo \"<p>No se pudo guardar.</p>\";\n\t\t exit;\n\t\t }/*\n\t\t // ensure a safe filename\n\t\t $name = preg_replace(\"/[^A-Z0-9._-]/i\", \"_\", $archivo[\"name\"]);\n\t\t \t\n\t\t // preserve file from temporary directory\n\t\t $success = move_uploaded_file($archivo[\"tmp_name\"],\n\t\t $serv . $name);*/\n\t\t // set proper permissions on the new file\n\t\t chmod($serv . $name, 0644);\n\t\t $serv = $consulta->nombreM.\"/\".$name;\n\t\t $query = \"INSERT INTO guia(nombre,tipo) VALUES('$serv','$descripcion')\";\n\t\t echo $query;\n\t\t if ($this->insertTabRel($query,\"A_Guia\",\"Actividad_idActividad\",\"Guia_idGuia\",$idActividad)) {\n\t\t\t\t$_SESSION[\"msj\"] = \"Guia Agregada Satisfactoriamente\";\n\t\t\t}else{\n\t\t\t\t$_SESSION[\"msj\"] = \"Guia no Agregada \";\n\t\t\t}\n\t\t}\n\t\tif ($tipo == 'activo') {\n\t\t // ensure a safe filename\n\t\t $name = preg_replace(\"/[^A-Z0-9._-]/i\", \"_\", $archivo[\"name\"]);\n\t\t \n\t\t // preserve file from temporary directory\n\t\t $success = move_uploaded_file($archivo[\"tmp_name\"],\n\t\t $serv . $name);\n\t\t // set proper permissions on the new file\n\t\t chmod($serv . $name, 0644);\n\t\t $serv = $consulta->nombreM.\"/\".$name;\n\t\t $query = \"INSERT INTO activo(nombre,descripcion) VALUES('$serv','$descripcion2')\";\n\t\t if ($this->insertTabRel($query,\"A_Activo\",\"Actividad_idActividad\",\"Activo_idActivo\",$idActividad)) {\n\t\t\t\t$_SESSION[\"msj\"] = \"Activo Agregado Satisfactoriamente\";\n\t\t\t}else{\n\t\t\t\t$_SESSION[\"msj\"] = \"Activo no Agregado \";\n\t\t\t}\n\t\t\t//echo $_SESSION['msj'];\n\t\t}\n \t}", "title": "" }, { "docid": "c992db03aa07294977fbc0dee50aee59", "score": "0.6012545", "text": "function saveNew() {\r\n\t\t$this->getVars();\r\n\t\t\r\n\t\t//tratamento UnOrg\r\n\t\tif(preg_match(\"|[0-9]{2}.[0-9]{2}.[0-9]{2}.[0-9]{2}.[0-9]{2}.[0-9]{2}|\", $this->unOrg['compl'], $matches)) {\r\n\t\t\t$this->unOrg['id'] = substr($this->unOrg['compl'], 0, 17);\r\n\t\t\t$this->unOrg['nome'] = substr($this->unOrg['compl'], 18, strpos($this->unOrg['compl'], ' ('));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//monta a consulta SQL\r\n\t\t$sql = \"INSERT INTO obra_empreendimento (nome, nomeBusca, unOrg, justificativa, local, descricao, solicNome, solicDepto, solicEmail, solicRamal, ofirID, responsavelID)\r\n\t\tVALUES ('{$this->nome}', '\".stringBusca(SGDecode($this->nome)).\"','{$this->unOrg['id']}','{$this->justificativa}','{$this->local}','{$this->descricao}','{$this->solicitante['nome']}','{$this->solicitante['depto']}','{$this->solicitante['email']}','{$this->solicitante['ramal']}','{$this->ofir}','{$this->responsavel}')\";\r\n\t\t\t\t\r\n\t\t$insert = $this->bd->query($sql); \r\n\t\tif(constant('DEBUG')) print '<BR />'.$sql.'<BR />';\r\n\t\t\r\n\t\t//se for inserido com sucesso \r\n\t\tif($insert) {\r\n\t\t\t//consulta o empreendimento\r\n\t\t\t$sql = \"SELECT id FROM obra_empreendimento WHERE nome = '{$this->nome}' AND unOrg = '{$this->unOrg['id']}'\";\r\n\t\t\tif(constant('DEBUG')) print '<BR />'.$sql.'<BR />';\r\n\t\t\t\r\n\t\t\t$selectID = $this->bd->query($sql);\r\n\t\t\tif(count($selectID) == 1){\r\n\t\t\t\t$this->id = $selectID[0]['id'];\r\n\t\t\t\t\r\n\t\t\t//cria a etapa padrao (Geral)\r\n\t\t\t//$etapa = new Etapa($this->id, 0, $this->bd);\r\n\t\t\t//$etapa->save();\r\n\t\t\t\r\n\t\t\t//adicao de fase/documento oficio de requisicao\r\n\t\t\tif(isset($_POST['ofir']) && $_POST['ofir'] > 0) {\r\n\t\t\t//\t$etapa->addFase(1,1,$_POST['ofir']);\r\n\t\t\t\t\r\n\t\t\t\t$ofir = new Documento($_POST['ofir']);\r\n\t\t\t\t$ofir->loadCampos();\r\n\t\t\t\tatribEmpreend($_POST['ofir'], $this->id, $this->bd, 0);\r\n\t\t\t\t$ofir->update(\"OwnerArea\", null);\r\n\t\t\t\t$ofir->update(\"ownerID\", 0);\r\n\t\t\t\t//if(isset($_POST['abrirSAP']) && $_POST['abrirSAP'] > 0)\r\n\t\t\t\t//\t$despOfir = showDespStatus($ofir, array('para' => 'Protocolo' ,\"outro\" => '', 'funcID' => '_todos', 'despExt' => '', 'despacho' => 'Despachado automaticamente pelo sistema para anexar ao processo referente a obra '.$this->nome),'hideFB');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//adicao de fase/documento solicitacao de abertura de processo\r\n\t\t\tif(isset($_POST['abrirSAP']) && $_POST['abrirSAP'] > 0) {\r\n\t\t\t\t$doc = new Documento(0);\r\n\t\t\t\t$doc->dadosTipo['nomeAbrv'] = 'sap';\r\n\t\t\t\t$doc->loadTipoData();\r\n\t\t\t\t\r\n\t\t\t\t//seleciona o attr da tabela\r\n\t\t\t\t$sql = 'SELECT numero_sap FROM '. $doc->dadosTipo['tabBD']. ' WHERE anoE='.date(\"Y\"). ' ORDER BY numero_sap DESC LIMIT 1';\r\n\t\t\t\t$r2 = $this->bd->query($sql);\r\n\t\t\t\t//incrementa o valor do attr e guarda no valor do campo\r\n\t\t\t\tif(isset($r2[0]['numero_sap']))\r\n\t\t\t\t\t$numero = $r2[0]['numero_sap'];\r\n\t\t\t\telse \r\n\t\t\t\t\t$numero = 0;\r\n\t\t\t\t//seta os campos a serem preenchidos\r\n\t\t\t\t$doc->campos['numero_sap'] = ($numero + 1);\r\n\t\t\t\t$doc->campos['anoE'] = date(\"Y\");\r\n\t\t\t\t$doc->campos['contato'] = $_SESSION['id'];\r\n\t\t\t\t$doc->campos['unOrgIntSAP'] = $this->unOrg['compl'];\r\n\t\t\t\t$doc->campos['pessoaIntSAP'] = '';\r\n\t\t\t\t$doc->campos['assunto'] = SGEncode(strtoupper('Planejamento '.SGDecode($this->nome)), ENT_QUOTES, null, false);\r\n\t\t\t\t$doc->campos['tipoProc'] = 'plan';\r\n\t\t\t\t$doc->campos['justificativa'] = $this->justificativa; \r\n\t\t\t\t// associa esta nova sap ao empreendimento\r\n\t\t\t\t$doc->empreendID = $this->id;\r\n\t\t\t\t//salva novo documento\r\n\t\t\t\t$doc->salvaCampos();\r\n\t\t\t\t$doc->salvaDoc(0);\r\n\t\t\t\tif (!$doc->doLogHist($_SESSION['id'],\"\",\"\",'','criacao','','')) {\r\n\t\t\t\t\treturn array(\"success\" => false, \"errorNo\" => 2, \"errorFeedback\" => \"Erro ao salvar o despacho de criacao.\");\r\n\t\t\t\t}\r\n\t\t\t\t//gera PDF da SAP\r\n\t\t\t\tgeraPDF($doc->id);\r\n\t\t\t\t//gera feedback\r\n\t\t\t\t$despStatus = showDespStatus($doc, array('para' => 'Protocolo' ,\"outro\" => '', 'funcID' => '_todos', 'despExt' => '', 'despacho' => 'Documento gerado automaticamente para abertura de processo de planejamento referente a obra '.$this->nome.'. Favor providenciar a abertura de processo para esta obra e anexar este documento a ele assim como o of&iacute;cio correspondete (se houver)'),'hideFB');\r\n\t\t\t\t//adiciona fase: solicitacao de abertura de processo de contratacao\r\n\t\t\t\t//$etapa->addFase(1,2,$doc->id);\r\n\t\t\t\t\r\n\t\t\t\t//Adiciona os recursos\r\n\t\t\t\t/*if(isset($_POST['recursos']) && $_POST['recursos'] && isset($_POST['montanteRec']) && $_POST['montanteRec']){\r\n\t\t\t\t\t//adicao de recurso\r\n\t\t\t\t\t$rec = new Recurso($this->bd);\r\n\t\t\t\t\t$insert = $rec->insertRecursoInEmpreend($this->id);\r\n\t\t\t\t\tif (!$insert['success']) return array(\"success\" => false, \"errorNo\" => 2, \"errorFeedback\" => \"Erro ao salvar recursos no BD\".$insert['errorFeedback']);\r\n\t\t\t\t\t$this->getRecursos();\r\n\t\t\t\t}*/\r\n\t\t\t}\r\n\t\t\t\treturn array('success' => true, 'errorID' => 0, 'errorFeedback' => '');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn array('success' => false, 'errorID' => 1, 'errorFeedback' => 'Erro ao salvar novo Empreendimento/duplicidade encontrada');\r\n\t}", "title": "" }, { "docid": "cfc1fbb51a7589f06fbcd9de3dea904e", "score": "0.5981382", "text": "private function InsertNames($Folder){\n $ID_Language=$this->session->uinterfacelangauge;\n $pictokey=$this->getPictokeysType('name');\n switch($ID_Language){\n case 1:\n $table=\"NameCA\";\n break;\n case 2:\n $table=\"NameES\";\n break;\n }\n $file = file_get_contents($Folder.\"/\".$table.\".json\");\n $names=json_decode($file);\n $count=count($names->nameid);\n sort($names->nameid);\n $pos=-1;\n for($i=0;$i<$count;$i++){\n if($names->nameid[$i]>$ant&&$names->nameid[$i]!=null){\n $pos++;\n $ant=$names->nameid[$i];\n }else{\n $ant=$names->nameid[$i];\n }\n $sql=\"INSERT INTO $table(nameid,nomtext,mf,singpl,contabincontab,determinat,ispropernoun,defaultverb,plural,femeni,fempl)\n VALUES (?,?,?,?,?,?,?,?,?,?,?)\";\n $this->db->query($sql,array(\n $pictokey[$i],\n $names->nomtext[$i],\n $names->mf[$i],\n $names->singpl[$i],\n $names->contabincontab[$i],\n $names->determinat[$i],\n $names->ispropernoun[$i],\n $names->defaultverb[$i],\n $names->plural[$i],\n $names->femeni[$i],\n $names->fempl[$i]\n ));\n}\n $this->InsertNameClass($Folder);\n}", "title": "" }, { "docid": "1cf4d6a5503b5844cae9758ea47afa3b", "score": "0.5977619", "text": "function updateHomeworks($userId, $hwFileName, $fileName){\n $newId = getNewId(\"homeworks.txt\");\n $lineToSave = $newId.\";\".$userId.\";\".$hwFileName;\n writeToFile($lineToSave, $fileName);\n}", "title": "" }, { "docid": "7dc99fe54d26ddb45c1b474a937e94f3", "score": "0.5943324", "text": "function insertarForo($a,$b,$c,$d)\r\n{\r\n $conec=new Conexion(); \r\n $con=$conec->getConection();\r\n\r\n $autor=$a;\r\n $tema=$b;\r\n $mensaje=$c;\r\n $cantidadC = $d;\r\n \r\n//Hacemos algunas validaciones\r\n if(empty($autor)) $autor = \"Anónimo\";\r\n//Evitamos que el usuario ingrese HTML\r\n $mensaje = htmlentities($mensaje);\r\n\r\n \r\n echo $autor.\"titulo:\".$tema.\"mensaje:\".$mensaje;\r\n $sql = \"INSERT INTO foro (autor, titulo, mensaje, cantidad_comentarios )\";\r\n $sql.= \"VALUES ('$autor','$tema','$mensaje','$cantidadC')\";\r\n pg_query($con,$sql) or die (\"ERROR ====> al grabar el sms :( \" .pg_last_error());\r\n \r\n //crear su archivo.data\r\n $codForo = retornarCodForo($autor);\r\n $miarchivo=fopen('../Vista/Otros/Comentarios/'.$codForo.'_'.$tema.'.data','w');\r\n fclose($miarchivo);\r\n}", "title": "" }, { "docid": "6d308d5a19ae582f8feeeea63d2df67a", "score": "0.59148204", "text": "public function addPerso() {\n if ($this->request->is('post')) {\n $name = $this->request->data['name'];\n $id = $this->Fighter->addPerso($name);\n $this->Session->setFlash('Ajout avec succes');\n $rep = $this->Fighter->uploadFile2($this->request->data['addPerso']['avatar_file'], $id);\n if ($rep == false) {\n $this->Session->setFlash('Vous ne pouvez pas envoyer ce type de fichier');\n }\n $this->redirect(array(\"controller\" => \"Fighters\",\n \"action\" => \"listePerso\"));\n }\n }", "title": "" }, { "docid": "b95132242ea331bcbec5ae5ffccfa28c", "score": "0.5909489", "text": "function registraAvatar($nome_utente, $nome_file, $tmp_nome){\n\t\t$conn = dbConnect();\n\n\t\t$sql = \"select id from utenti where nome_utente = '\" . $nome_utente . \"'\";\t\t\n\t\t$risposta = mysql_query($sql) or die (\"Errore nella query: \" . $sql . \"\\n!\" . mysql_error());\n\t\t$riga = mysql_fetch_row ($risposta);\n\t\t\n\t\t$id_utente = $riga[0];\n\t\t\n\t\tif(!avatarCaricato($nome_utente)){\n\t\t\t$sql = \"insert into avatar(id_utente, nome_immagine) values ('\" . $id_utente . \"','\" . $nome_file . \"')\";\n\t\t\t$risposta = mysql_query($sql) or die (\"Errore nella query: \" . $sql . \"\\n!\" . mysql_error());\n\t\t\tmove_uploaded_file($tmp_nome, \"avatar\" . \"/\" . $nome_file);\n\t\t} else {\n\t\t\t$conn = dbConnect();\n\t\t\t$sql = \"select nome_immagine from avatar where id_utente = '\" . $id_utente . \"'\";\t\t\n\t\t\t$risposta = mysql_query($sql) or die (\"Errore nella query: \" . $sql . \"\\n!\" . mysql_error());\n\t\t\t$riga = mysql_fetch_row ($risposta);\n\t\t\t$immagine_vecchia = $riga[0];\n\t\t\tunlink(\"avatar/\" . $immagine_vecchia);\n\t\t\t\n\t\t\t$sql = \"update avatar set nome_immagine='\" . $nome_file . \"' where id_utente=\" . $id_utente . \"\";\n\t\t\t$risposta = mysql_query($sql) or die (\"Errore nella query: \" . $sql . \"\\n!\" . mysql_error());\n\t\t\tmove_uploaded_file($tmp_nome, \"avatar/\" . $nome_file);\n\t\t}\n\t\t\n\t\tmysql_close ($conn);\n\t\t\n\t}", "title": "" }, { "docid": "75104ea2789f756cbf16734892bf6f2f", "score": "0.58685666", "text": "public function inserir() {\r\n $dados['id'] = mb_convert_case($this->input->post('id'), MB_CASE_UPPER);\r\n $dados['nome'] = $this->input->post('nome');\r\n $dados['rg'] = mb_convert_case($this->input->post('rg'), MB_CASE_UPPER);\r\n $dados['endereco'] = $this->input->post('endereco');\r\n $dados['turma'] = mb_convert_case($this->input->post('turma'), MB_CASE_UPPER);\r\n \r\n $this->professor->inserir($dados);\r\n redirect('professor');\r\n }", "title": "" }, { "docid": "bd8d6b7721fa9152756b81902375de01", "score": "0.586751", "text": "function add_file():void\n{\n \n $files=dirname(__DIR__).DIRECTORY_SEPARATOR.'data_dashboard'.DIRECTORY_SEPARATOR.'compteur'; \n $fichier_journalier=$files.'-'.date('Y-m-d'); \n increment_compteur($files);\n increment_compteur($fichier_journalier);\n \n}", "title": "" }, { "docid": "91d1e54c142b1782f0b1bce5abd89505", "score": "0.5864406", "text": "function insertPersonne($nom, $prenom, $url_photo, $date_naissance, $statut_couple) {\n \n $requete_prepare = $this->connexion -> prepare(\n \"INSERT INTO Personne (Nom, Prenom, URL_Photo, Date_Naissance, Statut_couple) values (:nom, :prenom, :url_photo, :date_naissance, :statut_couple)\");\n \n $requete_prepare -> execute(\n array( 'nom' => $nom,\n 'prenom' => $prenom,\n 'url_photo' => $url_photo,\n 'date_naissance' => $date_naissance,\n 'statut_couple' => $statut_couple)); \n\n // getLastId();\n \n\n // return $id;\n \n }", "title": "" }, { "docid": "da4104d7233cb414cee4e226cd0ea03b", "score": "0.5849763", "text": "function save() \n\t{\n\t\tif ($this->id<>0)\n\t\t\t{ \n\t\t\t$query_save = \"update vendedores set nombre = '$this->nombre', direccion = '$this->direccion', telefono = '$this->telefono', comision = '$this->comision', activo = '$this->activo' where id='$this->id'\"; \n\t\t\tmysql_query($query_save) or die(mysql_error()); \n\t\t\t}\n\t\telse\n\t\t\t{ \n\t\t\t$query_save = \"insert into vendedores values (null, '$this->nombre', '$this->direccion', '$this->telefono', '$this->comision', '$this->activo')\"; \n\t\t\tmysql_query($query_save) or die(mysql_error()); \n\t\t\t$this->id = mysql_insert_id(); \n\t\t\t} \n\t}", "title": "" }, { "docid": "049e7afa31f6c459c7d1ceb3a6a42d4a", "score": "0.5832367", "text": "function GuardarEnArchivo()\n {\n $archivo = fopen(\"datos.txt\", \"w\");\n fwrite($archivo,$nombres);\n fclose($archivo);\n echo(\"Se guardaron los datos en un archivo\");\n }", "title": "" }, { "docid": "008e26056991be38610efa26bd29d271", "score": "0.5805412", "text": "function save() {\n\t\t\t$id = htmlspecialchars($_POST['id']);\n\t\t\t$nombre = htmlspecialchars($_POST['nombre']);\n\t\t\t$apellidos = htmlspecialchars($_POST['apellidos']);\n\t\t\t$telefono = htmlspecialchars($_POST['telefono']);\n\t\t\t$email = htmlspecialchars($_POST['email']);\n\t\t\t$cargo = htmlspecialchars($_POST['cargo']);\n\t\t\t$dir_lab = htmlspecialchars($_POST['dir_lab']);\n\t\t\t$url = htmlspecialchars($_POST['url']);\n\t\t\t$competencias = htmlspecialchars($_POST['competencias']);\n\t\t\t$formation = json_decode($_POST['formation']);\n\t\t\t$projects = json_decode($_POST['projects']);\n\t\t\t$img = $_FILES['avatar'];\n\t\t\t$json;\n\t\t\tif (!empty($id) and !empty($nombre) and !empty($apellidos) and !empty($telefono) and\n\t\t\t\t!empty($email) and !empty($cargo) and !empty($dir_lab) and !empty($url) and\n\t\t\t\t!empty($img['name']) and !empty($competencias)) {\n\n\t\t\t\t$arrType = explode(\".\", $img['name']);\n\t\t\t\t$type = end($arrType);\n\t\t\t\tif ($type == 'jpg' or $type == 'png' or $type == 'bmp' or $type == 'jpeg') {\n\t\t\t\t\tif(!$_FILES['avatar']['error']) {\n\t\t\t\t\t\t$per = new PerDTO($id, $nombre, $apellidos, $telefono, $email, $cargo, $dir_lab, $url, $img['name'], $competencias);\n\t\t\t\t\t\t$res = Personal::insert($per);\n\t\t\t\t\t\t$json = $res;\n\t\t\t\t\t\tif ($json['ok']) {\n\t\t\t\t\t\t\tif (!file_exists(PROJECTPATH . \"/uploads/personal/avatar/\")) {\n\t\t\t\t\t\t\t\tmkdir(PROJECTPATH . \"/uploads/personal/avatar/\", 0777, true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$path = PROJECTPATH . \"/uploads/personal/avatar/\";\n\t\t\t\t\t\t\tmove_uploaded_file($img['tmp_name'], $path . $img['name']);\n\t\t\t\t\t\t\t$id_doc = Personal::find($id);\n\t\t\t\t\t\t\tif (!empty($formation)) {\n\t\t\t\t\t\t\t\tforeach($formation as $val) {\n\t\t\t\t\t\t\t\t\t$form = new FormDTO($val->titulo, $val->fechaini, $val->fechafin, $val->tesis, $val->lugar, $id_doc[0][0]);\n\t\t\t\t\t\t\t\t\t$json = FormDAO::insert($form);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\tif (!empty($projects)) {\n\t\t\t\t\t\t\t\tforeach ($projects as $val) {\n\t\t\t\t\t\t\t\t\t$pro = new ProyDTO($val->titulo, $val->lugar, $val->fecha, $id_doc[0][0]);\n\t\t\t\t\t\t\t\t\t$json = ProyectDAO::insert($pro);\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}else {\n\t\t\t\t\t\t$text;\n\t\t\t\t\t\tswitch ($_FILES['avatar']['error']) {\n\t\t\t\t\t case UPLOAD_ERR_NO_FILE:\n\t\t\t\t\t $text = 'No se ha subido ningun fichero';\n\t\t\t\t\t break;\n\t\t\t\t\t case UPLOAD_ERR_INI_SIZE:\n\t\t\t\t\t \t$text = 'Archivo execede el tamaño permitido 1';\n\t\t\t\t\t \tbreak;\n\t\t\t\t\t case UPLOAD_ERR_FORM_SIZE:\n\t\t\t\t\t $text = 'Archivo execede el tamaño permitido 2';\n\t\t\t\t\t break;\n\t\t\t\t\t default:\n\t\t\t\t\t $text = 'Error desconocido ' . $_FILES['file_doc']['error'];\n\t\t \t\t\t}\n\t\t\t\t\t\t$json = ['ok' => false, 'error' => $text];\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\t$json = ['ok' => false, 'error' => \"Extension de imagen no valida\"];\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\t$json = ['ok' => false, 'error' => 'Faltan datos por ingresar'];\n\t\t\t}\n\t\t\tprint(json_encode($json));\n\t\t}", "title": "" }, { "docid": "268cb70a487d019bf20d57e16f524805", "score": "0.5773857", "text": "public function subirDocumento($parametros)\n {\n $id_Usuario = ''; //obligatorio\n $fichero = array();\n extract($parametros);\n\n $ficheroTemporal = $fichero['tmp_name'];\n $carpetaDestino = $_SESSION['RAIZ'] . 'ficheros/docsUsuarios/';\n //$fichCod = sha1($fichero['name']);\n //$fichCod = str_pad($id_Usuario, 11, '0', STR_PAD_LEFT) . '_';\n $fichExt = '.' . pathinfo($fichero['name'], PATHINFO_EXTENSION);\n\n $contador = 0;\n do {\n $contador++;\n $fichNum = str_pad($contador, 4, '0', STR_PAD_LEFT); //Numero de 4 digitos\n $nombreFichero = $fichNum;\n } while (file_exists($carpetaDestino . $nombreFichero));\n\n $nombreFichero = $fichero['name'];\n $ficheroDestino = $carpetaDestino . $nombreFichero;\n\n if (move_uploaded_file($ficheroTemporal, $ficheroDestino)) {\n $datos = array();\n $datos['id_Usuario'] = $id_Usuario;\n $datos['url'] = 'ficheros/docsUsuarios/';\n //$datos['nombre'] = $fichCod . $contador;\n //$datos['nombre'] = $fichCod;\n $datos['nombre'] = $nombreFichero;\n $datos['nombre_Original'] = pathinfo($fichero['name'], PATHINFO_EXTENSION);\n $datos['ext'] = $fichExt;\n $datos['parametros'] = 'DocumentoUsuario';\n\n $id = $this->guardarFichero($datos);\n\n echo 'ok';\n } else {\n echo 'error';\n }\n }", "title": "" }, { "docid": "076ed883eaf5bdef3da9f59061456f93", "score": "0.57660043", "text": "public function save($data){\n\n\t\t\t$data['salt'] = uniqid();\n // $data['salt'] = md5(date(\"Y-m-d H:i:s\"));\n $data['clave'] = $this->encrypt($data['clave'],$data['salt']);\n \n foreach($data as $key => $value){\n\t\t\t\tif(!is_array($value)){\n\t\t\t\t\tif($value != null){\n\t\t\t\t\t\t$columns[]=$key;\n\t\t\t\t\t\t$datos[]=$value;\n\t\t\t\t\t}\n\t\t\t\t}\n }\n $sql = \"INSERT INTO usuarios(\".implode(',',$columns).\") VALUES('\".implode(\"','\",$datos).\"')\";\n $this->con->exec($sql);\n\t\t\t$id_usuario = $this->con->lastInsertId();\n\t\t\t \t\t\t\n\t\t\t$sql = '';\n\t\t\t\n\t\t\tif(!empty($data['perfil'])){\n\t\t\t\n\t\t\t\tforeach($data['perfil'] as $perfil){\n\t\t\t\t\t$sql .= 'INSERT INTO usuarios_perfiles(usuario_id,perfil_id) \n\t\t\t\t\t\t\t\tVALUES ('.$id_usuario.','.$perfil.');';\n\t\t\t\t}\n\t\t\t\t $this->con->exec($sql);\n\t\t\t}\n\n\t\t\t\treturn $id_usuario;\n\t\t\n\t\t\t\n\t}", "title": "" }, { "docid": "30c30847c098538c9c6b0ab47134f14d", "score": "0.574807", "text": "function writeToFile(){\r\n\r\n global $picture;\r\n move_uploaded_file($picture,'images');\r\n $file_name = 'ids';\r\n $handle = fopen($file_name, \"a+\");\r\n fwrite($handle,ucfirst($_POST['title']).\" \".ucfirst($_POST['fn']).\" \".ucfirst($_POST['ln']).\" \".$_POST['em'].\" \".$_POST['s'].\" \".$_POST['pn']\r\n .\" \".$_POST['hn'].\" \".$_POST['on'].\" \".$_POST['tw'].\" \".$_POST['fb'].\" \".$picture.\" \".$_POST['com'].\"\\n\");\r\n fclose($handle);\r\n\r\n}", "title": "" }, { "docid": "1b043aa932a32e19753f90b3caad753f", "score": "0.5744951", "text": "public function insertMedico() {\n\t\t$msgRetorno = $this->insertMedicoCompleto(\t$this->nome, \n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->senha, \n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->cpf,\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->especialidade,\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->planoDeSaude,\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->dtNascimento,\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->endereco,\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->telefone,\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->email\n\t\t);\n\t\tif (strcmp($msgRetorno, \"Inserção realizada com sucesso!\") != 0) {\n\t\t\treturn $msgRetorno; // Significa que deu erro.\n\t\t}\n\t\t$this->codigo = $this->getCodigoByMedico($this);\n\t\t$this->reg_date = $this->getMedicoByCodigo($this->codigo)[0]->reg_date;\n\t\treturn $msgRetorno;\n\t}", "title": "" }, { "docid": "545c6a74cd700ac7f0a48a2f1b7133ef", "score": "0.568825", "text": "function saveNewSoporte($operador,$tipo,$tema){\r\n\r\n\t\t$r = \"\";\r\n\t\t$extension = explode(\".\",$this->archivo['name']);\r\n\t\t$num = count($extension)-1;\r\n\t\t$noMatch = 0;\r\n\t\tforeach( $this->permitidos as $p ) {\r\n\t\t\tif ( strcasecmp( $extension[$num], $p ) == 0 ) $noMatch = 1;\r\n\t\t}\r\n\t\tif($this->archivo['name']!=null){\r\n\t\t\tif($noMatch==1){\r\n\t\t\t\tif($this->archivo['size'] < MAX_SIZE_DOCUMENTOS){\r\n\r\n\t\t\t\t\t$dirOperador=$this->cs->getDirectorioOperador($operador);\r\n\t\t\t\t\t$ruta = strtolower(RUTA_DOCUMENTOS.\"/\".$dirOperador.$this->cs->getTipoNombreById ($tipo).\"/\".$this->cs->getTemaNombreById ($tema).\"/\");\r\n\t\t\t\t\tmkdir($ruta,0777,true);\r\n\t\t\t\t\t$cad = $_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF'];\r\n\t\t\t\t\t//echo(\"<br>ruta:\".$ruta);\r\n\r\n\t\t\t\t\tif(!move_uploaded_file($this->archivo['tmp_name'], strtolower($ruta).$this->comunicado.'_'.$this->archivo['name'])){\r\n\t\t\t\t\t\t$r = ERROR_COPIAR_ARCHIVO;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$i = $this->cs->insertSoporte('',$this->comunicado,$this->comunicado.\"_\".$this->archivo['name']);\r\n\t\t\t\t\t\tif($i == \"true\"){\r\n\t\t\t\t\t\t\t$r = COMUNICADO_SOPORTE_AGREGADO;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$r = ERROR_ADD_COMUNICADO_SOPORTE;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$r = ERROR_SIZE_ARCHIVO;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$r = ERROR_FORMATO_ARCHIVO;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$r = ERROR_CONFIGURACION_RUTA;\r\n\t\t}\r\n\t\treturn $r;\r\n\r\n\t}", "title": "" }, { "docid": "9d797ff4e9ec9f0c522cddbe92633434", "score": "0.56755245", "text": "public function save() {\r\n $query = DB::connection()->prepare('INSERT INTO Category (personid, name) '\r\n . 'VALUES (:personid, :name) RETURNING id');\r\n $query->execute(array(\r\n 'name' => $this->name,\r\n 'personid' => $this->personid\r\n ));\r\n\r\n $row = $query->fetch();\r\n\r\n $this->id = $row['id'];\r\n }", "title": "" }, { "docid": "0ecf8090af41892f1c15a51f3d561aed", "score": "0.5658323", "text": "function save()\n {\n $GLOBALS['DB']->exec(\"INSERT INTO tasks (name) VALUES ('{$this->getName()}');\");\n $this->id = $GLOBALS['DB']->lastInsertId();\n }", "title": "" }, { "docid": "da83a7a1a7e72878bc20f38f78220d6f", "score": "0.56484777", "text": "function ajouter_personne($nom, $prenom,$date_naissance,$sexe,$groupe_sanguin,$poids,$taille,$observations, $photo){\n\t\t\t$idcon=@mysql_connect(\"localhost\",\"root\",\"\"); // Les attributs de connexion à la base de données\n\t\t\tmysql_select_db(\"etat_civile\",$idcon); // Seléction de la base de données \n\t\t\t$req=\"insert into personne(nom,prenom,date_naissance,sexe,groupe_sanguin,poids,taille,observations,photo) values('$nom','$prenom','$date_naissance','$sexe','$groupe_sanguin','$poids','$taille','$observations','$photo')\"; //Requéte pour insérer une personne \n\t\t\tmysql_query($req) or die(mysql_error()); //Exécution de la requéte \n\t\t}", "title": "" }, { "docid": "f3c091ce7a66d88a5f9279f8e87d53b9", "score": "0.5621467", "text": "public\n function registraTcc($titulo, $autores, $palavras_chave, $linha_pesquisa, $resumo)\n {\n /**************Coleta as informações do arquivo enviado e salva na pasta destino*********/\n $filename = $_FILES['arquivopdf']['name']; // Salva o nome do arquivo em $filename\n $ext = pathinfo($filename, PATHINFO_EXTENSION); // Filtra a extensão do arquivo a partir de $filename e salva em $ext\n $allowed = array('pdf'); // Define quais extensões de arquivo serão permitidas\n if (!in_array(strtolower($ext), $allowed)) { // Confere se o arquivo é válido\n exit('Tipo de arquivo inválido.');\n }\n $nomearquivo = $this->random_string(80); // Define um nome aleatório para o arquivo\n $pastadetcc = 'uploads/tcc/'; // Define a pasta para onde as imagens serão enviadas\n $uploadfile = $pastadetcc . $nomearquivo . '.' . $ext; // concatena as informações geradas para criar o arquivo\n while (file_exists($uploadfile)) { // Verifica se o arquivo já existe\n $nomearquivo = $this->random_string(60); // Gera um novo nome enquanto o anterior existir\n $uploadfile = $pastadetcc . $nomearquivo . '.' . $ext; // concatena as informações coletadas com o novo nome\n }\n if (!move_uploaded_file($_FILES['arquivopdf']['tmp_name'], $uploadfile)) { // Move o arquivo para o local definido\n exit('Falha ao enviar arquivo:' . $uploadfile . '<br />' . print_r($_FILES));\n }\n\n $foto = $nomearquivo . '.' . $ext; // Recupera somente o nome do arquivo para salvar na base de dados\n\n \n $this->query(\"INSERT INTO tcc (titulo, autores, palavras_chave, linha_pesquisa, resumo, arquivo) VALUES (:titulo, :autores, :palavras_chave, :linha_pesquisa, :resumo, :arquivo)\");\n $this->ligar(':titulo', $titulo);\n $this->ligar(':autores', $autores);\n $this->ligar(':palavras_chave', $palavras_chave);\n $this->ligar(':linha_pesquisa', $linha_pesquisa);\n $this->ligar(':resumo', $resumo);\n $this->ligar(':arquivo', $arquivo);\n if ($this->executar()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "ac236ee7b5d1f2b6e744ea69faf70310", "score": "0.5607881", "text": "function guardar($apartamentos='',$path='../archivos/')\n\n\t\t{\n\n\t\t$sql=\"select idi_id from idiomas order by idi_id ASC\";\n\n\t\t$idiomas = mysql_query($sql, $this->conect) or die(mysql_error());\n\n\t\t\n\n\t\t/*VERIFICO QUE SEA UN OBJECTO*/\n\n\t\tif(is_object($apartamentos))\n\n\t\t\t{\n\n\t\t\t/* VERIFICO SI TIENE ID, SI LO TIENE ACTUALIZO EL REGISTRO SINO INSERTO UNO NUEVO*/\n\n\t\t\tif($apartamentos->get_id())\n\n\t\t\t\t{\n\n\t\t\t\t$sql = \"UPDATE apartamentos SET \n\t\t\t\tapa_nombre='\".$apartamentos->get_nombre().\"',\n\t\t\t\tzon_id='\".$apartamentos->get_zona().\"',\n\t\t\t\tpai_id='\".$apartamentos->get_pais().\"',\n\t\t\t\tapa_provincia='\".$apartamentos->get_provincia().\"',\n\t\t\t\tapa_ciudad='\".$apartamentos->get_ciudad().\"',\n\t\t\t\tapa_cp='\".$apartamentos->get_cp().\"',\n\t\t\t\tapa_direccion='\".$apartamentos->get_direccion().\"',\n\t\t\t\tapa_estado='\".$apartamentos->get_estado().\"',\n\t\t\t\tapa_metros='\".$apartamentos->get_metros().\"',\n\t\t\t\tapa_dormitorios='\".$apartamentos->get_dormitorios().\"',\n\t\t\t\tapa_precio='\".$apartamentos->get_precio().\"',\n\t\t\t\tapa_portada='\".$apartamentos->get_portada().\"',\n\t\t\t\tapa_url='\".$apartamentos->get_url().\"',\n\t\t\t\tapa_order='\".$apartamentos->get_order().\"' WHERE apa_id='\".$apartamentos->get_id().\"'\";\n\n\t\t\t\tmysql_query($sql,$this->conect) or die('ERR DTO-31 - NO SE PUDO ACTUALIZAR EL APARTAMENTO');\n\n\t\t\t\t\n\n\t\t\t\t//guardo los detalles basandome en la posicion del idioma en la lista\n\n\t\t\t\t$descripciones = $apartamentos->get_descripcion();\n\n\t\t\t\t$ubicacion = $apartamentos->get_ubicacion();\n\n\t\t\t\t$tipologia = $apartamentos->get_tipologia();\n\n\t\t\t\t$pago = $apartamentos->get_pago();\n\n\t\t\t\t$informacion = $apartamentos->get_informacion();\n\n\t\t\t\t\n\n\t\t\t\t$puntero_idioma = 0;\n\n\t\t\t\t\n\n\t\t\t\tmysql_data_seek($idiomas,0);\n\n\t\t\t\twhile($rid = mysql_fetch_array($idiomas))\n\n\t\t\t\t\t{\n\n\t\t\t\t\t$sql = \"update apartamento_idiomas set aid_nombre='\".$descripciones[$puntero_idioma].\"',aid_ubicacion='\".$ubicacion[$puntero_idioma].\"',aid_tipologia='\".$tipologia[$puntero_idioma].\"',aid_pago='\".$pago[$puntero_idioma].\"',aid_informacion='\".$informacion[$puntero_idioma].\"' where idi_id='\".$rid['idi_id'].\"' and apa_id='\".$apartamentos->get_id().\"'\";\n\n\t\t\t\t\tmysql_query($sql, $this->conect) or die(mysql_error());\n\n\t\t\t\t\t$puntero_idioma++;\n\n\t\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t\tif($apartamentos->get_del_plano())\n\n\t\t\t\t\t{\n\n\t\t\t\t\t$sql = \"select apa_plano from apartamentos where apa_id='\".$apartamentos->get_id().\"'\";\n\n\t\t\t\t\t$planos = mysql_query($sql,$this->conect) or die('ERR DTO-132 - NO SE PUDO BORRAR EL PLANO DEL APARTAMENTO');\n\n\t\t\t\t\twhile($row = mysql_fetch_array($planos))\n\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\tif($row['apa_plano'])\n\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t@unlink($path.$row['apa_plano']);\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t\t\t$sql = \"update apartamentos set apa_plano=null where apa_id='\".$apartamentos->get_id().\"'\";\n\n\t\t\t\t\tmysql_query($sql, $this->conect) or die(mysql_error());\n\n\t\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t\tif($apartamentos->get_del())\n\n\t\t\t\t\t{\n\n\t\t\t\t\t$indice = split(\"\\|\",$apartamentos->get_del());\n\n\t\t\t\t\tfor($i=0;$i<=100;$i++)\n\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\tif($indice[$i])\n\n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t$sql=\"SELECT aga_imagen FROM apartamento_galerias WHERE aga_id='\".$indice[$i].\"' limit 0,1\";\n\n\t\t\t\t\t\t\t$arc = mysql_query($sql, $this->conect) or die(\"ERR CLI-43: ERROR AL CARGAR LAS IMAGENES\");\n\n\t\t\t\t\t\t\tif(mysql_num_rows($arc)>0)\n\n\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t@unlink($path.mysql_result($arc,0));\n\n\t\t\t\t\t\t\t\t$sql=\"DELETE FROM apartamento_galerias where aga_id='\".$indice[$i].\"'\";\n\n\t\t\t\t\t\t\t\tmysql_query($sql, $this->conect) or die(\"ERR CLI-48: ERROR AL CARGAR LAS IMAGENES\");\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t\t}\n\n\t\t\telse\n\n\t\t\t\t{\n\n\t\t\t\t$sql = \"INSERT INTO apartamentos (apa_nombre,zon_id,pai_id,apa_provincia,apa_ciudad,apa_cp,apa_direccion,apa_estado,apa_metros,apa_dormitorios,apa_precio,apa_portada,apa_alta,apa_url,apa_order) VALUES (\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\t\t\t\t\t\t\t\t\t\t'\".$apartamentos->get_nombre().\"',\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\t\t\t\t\t\t\t\t\t\t'\".$apartamentos->get_zona().\"',\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\t\t\t\t\t\t\t\t\t\t'\".$apartamentos->get_pais().\"',\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\t\t\t\t\t\t\t\t\t\t'\".$apartamentos->get_provincia().\"',\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\t\t\t\t\t\t\t\t\t\t'\".$apartamentos->get_ciudad().\"',\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\t\t\t\t\t\t\t\t\t\t'\".$apartamentos->get_cp().\"',\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\t\t\t\t\t\t\t\t\t\t'\".$apartamentos->get_direccion().\"',\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\t\t\t\t\t\t\t\t\t\t'\".$apartamentos->get_estado().\"',\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\t\t\t\t\t\t\t\t\t\t'\".$apartamentos->get_metros().\"',\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\t\t\t\t\t\t\t\t\t\t'\".$apartamentos->get_dormitorios().\"',\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\t\t\t\t\t\t\t\t\t\t'\".$apartamentos->get_precio().\"',\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\t\t\t\t\t\t\t\t\t\t'\".$apartamentos->get_portada().\"',\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\t\t\t\t\t\t\t\t\t\t'\".date(\"Y-m-d\").\"',\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\t\t\t\t\t\t\t\t\t\t'\".$apartamentos->get_url().\"',\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\t\t\t\t\t\t\t\t\t\t'\".$apartamentos->get_order().\"')\";\n\n\t\t\t\tmysql_query($sql,$this->conect) or die('ERR DTO-63 - NO SE PUDO GUARDAR EL APARTAMENTO');\n\n\t\t\t\t\n\n\t\t\t\t$apartamentos->set_id(mysql_insert_id($this->conect));\n\n\t\t\t\t\n\n\t\t\t\t//guardo los detalles basandome en la posicion del idioma en la lista\n\n\t\t\t\t$descripciones = $apartamentos->get_descripcion();\n\n\t\t\t\t$ubicacion = $apartamentos->get_ubicacion();\n\n\t\t\t\t$tipologia = $apartamentos->get_tipologia();\n\n\t\t\t\t$pago = $apartamentos->get_pago();\n\n\t\t\t\t$informacion = $apartamentos->get_informacion();\n\n\t\t\t\t$puntero_idioma = 0;\n\n\t\t\t\t\n\n\t\t\t\tmysql_data_seek($idiomas,0);\n\n\t\t\t\twhile($rid = mysql_fetch_array($idiomas))\n\n\t\t\t\t\t{\n\n\t\t\t\t\t$sql = \"insert into apartamento_idiomas (idi_id,apa_id,aid_nombre,aid_ubicacion,aid_tipologia,aid_pago,aid_informacion) values ('\".$rid['idi_id'].\"','\".$apartamentos->get_id().\"','\".$descripciones[$puntero_idioma].\"','\".$ubicacion[$puntero_idioma].\"','\".$tipologia[$puntero_idioma].\"','\".$pago[$puntero_idioma].\"','\".$informacion[$puntero_idioma].\"')\";\n\n\t\t\t\t\tmysql_query($sql, $this->conect) or die(mysql_error());\n\n\t\t\t\t\t$puntero_idioma++;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t//GUARDA LAS GALERIAS DE LOS APARTAMENTOS\n\t\t\tif($apartamentos->get_galeria())\n\t\t\t\t{\n\t\t\t\trequire_once(\"../includes/class_imagen.inc.php\");\n\t\t\t\t$image = $apartamentos->get_galeria();\t\t\t\t\n\t\t\t\tfor($i=0;$i<100;$i++)\n\t\t\t\t\t{\n\t\t\t\t\tif (is_uploaded_file($image[\"gene_\".$i]['tmp_name'])) \n\t\t\t\t\t\t{ \n\t\t\t\t\t\t$this->cargarImagen($image,$i,1,$apartamentos->get_id());\n\t\t\t\t\t\t}\n\t\t\t\t\tif (is_uploaded_file($image[\"loca_\".$i]['tmp_name'])) \n\t\t\t\t\t\t{ \n\t\t\t\t\t\t$this->cargarImagen($image,$i,2,$apartamentos->get_id());\n\t\t\t\t\t\t}\n\t\t\t\t\tif (is_uploaded_file($image[\"prec_\".$i]['tmp_name'])) \n\t\t\t\t\t\t{ \n\t\t\t\t\t\t$this->cargarImagen($image,$i,3,$apartamentos->get_id());\n\t\t\t\t\t\t}\n\t\t\t\t\tif (is_uploaded_file($image[\"ento_\".$i]['tmp_name'])) \n\t\t\t\t\t\t{ \n\t\t\t\t\t\t$this->cargarImagen($image,$i,4,$apartamentos->get_id());\n\t\t\t\t\t\t}\n\t\t\t\t\tif (is_uploaded_file($image[\"serv_\".$i]['tmp_name'])) \n\t\t\t\t\t\t{ \n\t\t\t\t\t\t$this->cargarImagen($image,$i,5,$apartamentos->get_id());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\tif($apartamentos->get_plano())\n\n\t\t\t\t{\n\n\t\t\t\tif (is_uploaded_file($image['file_plano']['tmp_name'])) \n\n\t\t\t\t\t{\n\n\t\t\t\t\t$extension = explode('.',$image[\"file_plano\"][\"name\"]);\n\n\t\t\t\t\t$extension = strtolower('.'.array_pop($extension));\n\n\t\t\t\t\tmove_uploaded_file($image[\"file_plano\"][\"tmp_name\"],$path.\"PLANO_\".$apartamentos->get_id().$extension);\n\n\t\t\t\t\tchmod($path.\"PLANO_\".$apartamentos->get_id().$extension,0777);\n\n\t\t\t\t\t\n\n\t\t\t\t\t$sql = \"update apartamentos set apa_plano='PLANO_\".$apartamentos->get_id().$extension.\"' where apa_id='\".$apartamentos->get_id().\"'\";\n\n\t\t\t\t\tmysql_query($sql, $this->conect) or die(mysql_error());\n\n\t\t\t\t\t}\t\n\n\t\t\t\t}\n\t\t\treturn true;\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9d83251469b690652791ca4247d5d8d4", "score": "0.5605713", "text": "function addFile($file, $user)\n {\n // numele utilizatorului va fi folosit la crearea directorului personal\n // unde vor si fi salvate toate fisierele\n $userfolder = $user['username'];\n $targetDir = WWW_ROOT.'data/'.$userfolder;\n // numele fisierului in sine\n $theFile = $file['file'];\n \n $message = 'Fișierul nu a fost salvat!'; // incepem cu stangu\n if(!empty($file))\n {\n // verificarea existentei datelor\n if(empty($file['description']) || empty($file['file']['name']))\n $message = 'Specificarea unui fișier și descrierea acestuia este obligatorie!';\n else\n {\n // incarcarea in sine\n $savedFile = $this->uploadFile($targetDir, $theFile);\n // verificam succesul\n if(empty($savedFile) == false)\n {\n // se creaza obiectul cu detaliile ce vor fi salvate in baza de date\n $newfile->description = $file['description'];\n $newfile->owner = $user['id'];\n $newfile->name = substr($savedFile, strlen(WWW_ROOT));\n // tot timpul adaugam fisiere, deci nu facem update!!!\n $this->create($newfile);\n $this->save();\n $message = 'Fișierul a fost salvat!'; // pentru a termina cu dreptul\n }\n }\n }\n return $message;\n }", "title": "" }, { "docid": "4a9fc214558a748830bc594904e73c45", "score": "0.5602644", "text": "public function realiser_new(){\r\n\t\tglobal $conn;\r\n\t\t$query = $conn->prepare(\"INSERT INTO realiser(id_realisateur, id_films) VALUES (:id_realisateur, :id_films)\");\r\n\t\t$query->execute(array(\"id_realisateur\" => $this->id_realisateur, \"id_films\" => $this->id_films));\r\n\t}", "title": "" }, { "docid": "0770829da7877675852a51af153b2ae6", "score": "0.557695", "text": "public function inserisci_allegato($descrizione, $link_file, $filename, $id_ordine, $data, $tipologia)\n {\n\t $query = \"INSERT INTO tb_allegati_ordini_commessa SET tipologia='$tipologia', data='$data', id_ordine_commessa='$id_ordine', descrizione='$descrizione', link_file='$link_file', filename='$filename';\";\n\t $e_query = EseguiQuery($query,\"inserimento\");\n return $e_query;\n }", "title": "" }, { "docid": "7e10ce5d01fd90f9ccae94fc90865573", "score": "0.5570823", "text": "public static function insertar()\r\n {\r\n $Conexion = new Conexion();\r\n $Conexiondb = $Conexion->conectar();\r\n try {\r\n\r\n if (!isset($_SESSION['Autentificar'])) {\r\n echo 'Debes Iniciar Sesion';\r\n exit();\r\n }\r\n $imagen = $_FILES['I']['name'];\r\n $tmp = ($_FILES['I']['tmp_name']);\r\n $guardar = 'C:\\xampp\\htdocs\\Colegio\\Publicas\\Perfil/' . $imagen;\r\n $Url = 'Publicas/Perfil/' . $imagen;\r\n move_uploaded_file($tmp, $guardar);\r\n\r\n $Cedula = $_SESSION['Autentificar'];\r\n $sql = 'UPDATE user SET Foto = :Foto WHERE Cedula = :Cedula';\r\n $query = $Conexiondb->prepare($sql);\r\n $query->bindParam(':Foto', $Url, PDO::PARAM_LOB);\r\n $query->bindParam(':Cedula', $Cedula);\r\n $query->execute();\r\n \r\n $sql1 = \"SELECT * From user WHERE Cedula = :Cedula\";\r\n $respuesta = $Conexiondb->prepare($sql1);\r\n $respuesta->bindParam(':Cedula', $Cedula);\r\n $respuesta->execute();\r\n $row = $respuesta->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n foreach ($row as $respuesta) {\r\n echo $respuesta['Foto'];\r\n }\r\n \r\n } catch (PDOException $e) {\r\n //Reconocer un error y revertir los cambios\r\n echo $e;\r\n }\r\n }", "title": "" }, { "docid": "f4dfe2dba60d60ef92d163930872c4d8", "score": "0.5569647", "text": "public function save()\n {\n\n Debug::console('In save of file upload');\n\n $id = $this->entity->getId();\n\n $filePath = PATH_UPLOADS.'attachments/';\n $filePath .= $this->entity->getTable().'/'.$this->attrName.'/';\n $filePath .= SParserString::idToPath($id);\n\n //$this->newpath = $filePath;\n //$this->newname = $id;\n Debug::console('in save name'.$id.' path:'.$filePath);\n\n $this->copy($id, $filePath);\n\n }", "title": "" }, { "docid": "71971c62b8e7a48b4afa04b985585fc8", "score": "0.5564399", "text": "function agregar()\n {\n $sql = \"INSERT INTO persona (nombre, apellido, email) VALUE (:nombre, :apellido, :email)\";\n $result = $this->db->prepare($sql);\n $result->execute(array(\":nombre\"=>\"{$this->getNombre()}\",\":apellido\"=>\"{$this->getLasname()}\",\n \":email\"=>\"{$this->getEmail()}\"));\n $result->closeCursor();\n }", "title": "" }, { "docid": "8684abd653f1cfd06e191615a094bd38", "score": "0.5560245", "text": "function writeToFile($imageFileName)\n{\n\t// Create user id\n\t$fileContent = file_get_contents(\"users.txt\");\n\t$usersArray = explode(\"\\n\", $fileContent);\n\t//print_r($usersArray);\n\t$id = 1;\n\tif(count($usersArray) != 0)\n\t{\n\t\t$maxId = 0;\n\t\tforeach($usersArray as $userText)\n\t\t{\n\t\t\t$user = explode(\"|\",$userText);\n\t\t\t$userId = intval($user[0]);\n\t\t\tif($maxId < $userId)\n\t\t\t{\n\t\t\t\t$maxId = $userId;\n\t\t\t}\n\t\t}\n\t\t$id = $maxId + 1;\n\t}\n\t\n\t\n\t// Write user\n\t$fid = fopen(\"users.txt\", \"a\");\n\t$arrayData = $_POST;\n\t// array_pop($arrayData);\n\t$arrayData['id'] = $id;\n\tforeach($arrayData as $value)\n\t{\n\t\tif( is_array($value) )\n\t\t{\n\t\t\t$value=implode(',', $value);\n\t\t}\n\t\t$textUser[]=$value;\n\t}\n\t$textUser[]=$imageFileName;\n\t$textUser=implode('|', $textUser);\n\tfwrite($fid, $textUser.PHP_EOL);\n\tfclose($fid);\n\t// file_put_contents(\"users.txt\", $textUser.\"\\r\\n\", FILE_APPEND);\n}", "title": "" }, { "docid": "416c62833ff89bedabc918ac1b293dea", "score": "0.5559182", "text": "function guardarRubricaEnBaseDeDatos($link,$nombre,$descripcion,$idCreador,$puntuacion){\n/*\nBaseDeDatos: rubricas\nFormato: informaciónDeConexión,nombre,descripcion,idCreador,puntuacion\n*/\n\n// comprobaciones\n/*$n = htmlEntities($nombre, ENT_QUOTES);\n$d = htmlEntities($descripcion, ENT_QUOTES);\n$id = htmlEntities($idCreador, ENT_QUOTES);\n$p = htmlEntities($puntuacion, ENT_QUOTES);*/\n\n$n = str_replace(\"'\",' ',$nombre);\n$d = str_replace(\"'\",' ',$descripcion);\n$id = str_replace(\"'\",' ',$idCreador);\n$p = str_replace(\"'\",' ',$puntuacion);\n// insertar\n$sql = \"INSERT INTO rubricas (nombre, descripcion, idCreador, puntuacion)\nVALUES ('$n','$d','$id','$p')\";\n\nif ($link->query($sql)=== TRUE) {\n\t//Rubrica creada\nreturn $last_id = $link->insert_id;\n\n} else {\necho \"Error: \" . $sql . \"<br>\" . $link->error;\nreturn \"f\";\n \n}\n}", "title": "" }, { "docid": "06e0f10d4626aeeff11a667cf630f78e", "score": "0.5547079", "text": "public function savePerfil($data){\n\t\t\n foreach($data as $key => $value){\n\t\t\t\t\n\t\t\t\tif(!is_array($value)){\n\t\t\t\t\tif($value != null){\n\t\t\t\t\t\t$columns[]=$key;\n\t\t\t\t\t\t$datos[]=$value;\n\t\t\t\t\t}\n\t\t\t\t}\n }\n $sql = \"INSERT INTO perfil(\".implode(',',$columns).\") VALUES('\".implode(\"','\",$datos).\"')\";\n\t\t\t\n $this->con->exec($sql);\n\t\t\t$id = $this->con->lastInsertId();\n\t\t\t \t\t\t\n\t\t\t$sql = '';\n\t\t\tforeach($data['secciones'] as $secciones){\n\t\t\t\t$sql .= 'INSERT INTO perfil_secciones(perfil_id,seccion_id) \n\t\t\t\t\t\t\tVALUES ('.$id.','.$secciones.');';\n\t\t\t}\n\t\t\t \n \t\t\t$this->con->exec($sql);\n\t}", "title": "" }, { "docid": "d72827fd1b68c795e341cdac4c518d37", "score": "0.55445755", "text": "public function crudNumero_ficha()\n {\n $nfi = new numero_ficha();\n\n //Se obtienen los datos del numero de ficha a editar.\n if(isset($_REQUEST['idnum_ficha']))\n {\n $nfi = $this->model->obtenerNumero_ficha($_REQUEST['idnum_ficha']);\n }\n\n //Llamado de las vistas.\n require_once '../vista/header.php';\n require_once '../vista/numero_ficha/numero_ficha-editar.php';\n require_once '../vista/footer.php';\n }", "title": "" }, { "docid": "c914e63674cd1ad78521731a894a6dc7", "score": "0.5520469", "text": "private function write_file($name, $content, $type) {\n // Create file name\n $filename = $_SERVER['DOCUMENT_ROOT'] . '/user_records/' . $type . '_user_' . $name . '.html';\n // Open File\n $myfile = fopen($filename, \"w\") or die(\"Unable to open file!\");\n // Write file\n fwrite($myfile, $content);\n // Close File\n fclose($myfile);\n\n // Save URL to DB\n $slug = 'user_records/' . $type . '_user_' . $name . '.html';\n $query = \"INSERT INTO USER_RECORDS (SLUG) VALUES ('$slug');\";\n if (parent::query($query)) {\n return true;\n } else {\n $this->error = \"Error inserting slug to DB.\";\n return false;\n }\n\n }", "title": "" }, { "docid": "780d3e80d65824f8ce445c56f2d282b5", "score": "0.55179346", "text": "function recuperar_teatro($identificador) {\n\t //Crea la página en la que se muestran los datos de un teatro($identificador) que se va a editar \t\n }", "title": "" }, { "docid": "c8bd680006ab727088446ebd5d7eb181", "score": "0.5507856", "text": "function add_personal($params)\n {\n $this->db->insert('personal',$params);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "6c67719f41486797883bfef156069543", "score": "0.55002254", "text": "function saveUser(int $id, string $name, string $surname, string $email, string $password, string $filename): int{\n $hash = password_hash(trim($password), PASSWORD_DEFAULT);\n\n //check if user with email exists\n if (userExists($email, $filename)){\n return -1;\n }\n\n $line = $id . \";\" . $name . \";\" . $surname . \";\" . $email . \";\" . $hash;\n writeToFile($line, $filename);\n\n return 0;\n}", "title": "" }, { "docid": "a3f85fe09e16f81d5b7f50c761a2b886", "score": "0.5498058", "text": "function add()\r\n {\r\n $existe=$this->existe($this->usu_codigo);\r\n\tif(!$existe)\r\n\t{\r\n\t $sql=<<<va\r\n\t insert into usuario\r\n\t (usu_codigo,usu_clave,usu_nombre,perfil_id)\r\n\t values \r\n\t (\r\n\t '$this->usu_codigo','$this->usu_clave','$this->usu_nombre','$this->perfil_id'\r\n\t )\r\nva;\r\n\r\n\t $rs = &$this->con->Execute($sql);\r\n\t if($rs)\r\n\t {\r\n\t $res=$this->usu_codigo;\r\n\t $this->cargarModulo($this->usu_codigo,$this->perfil_id);\r\n\t }\r\n\t else \r\n\t $res=0; \r\n\t}\r\n\telse \r\n\t{\r\n\t $res=$existe;\t\r\n\t}\r\n\treturn($res);\t\t\r\n }", "title": "" }, { "docid": "1453ac67f2a8f86b013afdaa2ee2d734", "score": "0.5495048", "text": "public function agregarDocenteControlador()\n\t\t{\n\t\t\t//Administrador\n\t\t\t$dni = modeloPrincipal::limpiarCadena($_POST['dni-reg']);\n\t\t\t$nombre = modeloPrincipal::limpiarCadena($_POST['nombre-reg']);\n\t\t\t$apellido = modeloPrincipal::limpiarCadena($_POST['apellido-reg']);\n\t\t\t$telefono = modeloPrincipal::limpiarCadena($_POST['telefono-reg']);\n\t\t\t$direccion = modeloPrincipal::limpiarCadena($_POST['direccion-reg']);\n\t\t\t$privilegio = \"Docente\";\n\n\t\t\t//Cuenta\n\t\t\t$usuario = modeloPrincipal::limpiarCadena($_POST['usuario-reg']);\n\t\t\t$password1 = modeloPrincipal::limpiarCadena($_POST['password1-reg']);\n\t\t\t$password2 = modeloPrincipal::limpiarCadena($_POST['password2-reg']);\n\t\t\t$email = modeloPrincipal::limpiarCadena($_POST['email-reg']);\n\t\t\t$genero = modeloPrincipal::limpiarCadena($_POST['optionsGenero']);\n\n\t\t\t$rol = 2;\n\n\n\t\t\tif ($genero == \"Masculino\") \n\t\t\t{\n\t\t\t\t$foto = \"docenteHombre.png\";\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\t$foto = \"docenteMujer.png\";\n\t\t\t}\n\n\t\t\tif ($password1 != $password2)\n\t\t\t{\n\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\"Texto\" => \"Contraseñas NO coinciden, verifique nuevamente\",\n\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$consultaDNI = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT PersonaDNI FROM persona WHERE PersonaDNI='$dni'\");\n\n\t\t\t\t\tif ($consultaDNI->rowCount()>=1) {\n\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\"Texto\" => \"El DNI ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif($email != \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$consultaEmail = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT CuentaEmail FROM cuenta WHERE CuentaEmail='$email'\");\n\t\t\t\t\t\t\t$resultadoEmail = $consultaEmail->rowCount();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$resultadoEmail = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($resultadoEmail >= 1) {\n\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\"Texto\" => \"El EMAIL ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$consultaUsuario = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT CuentaUsuario FROM cuenta WHERE CuentaUsuario='$usuario'\");\n\t\t\t\t\t\t\tif($consultaUsuario->rowCount() >= 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\"Texto\" => \"El USUARIO ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t];\t\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$consultaID = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT id FROM cuenta\");\n\n\t\t\t\t\t\t\t\t$numero = ($consultaID->rowCount())+1;\n\n\t\t\t\t\t\t\t\t$codigo = modeloPrincipal::generarCodigo(\"LM\", 5, $numero);\n\n\t\t\t\t\t\t\t\t$clave = modeloPrincipal::encriptar($password1);\n\n\t\t\t\t\t\t\t\t$datosCuenta = [\n\t\t\t\t\t\t\t\t\t\"Codigo\" => $codigo,\n\t\t\t\t\t\t\t\t\t\"Usuario\" => $usuario,\n\t\t\t\t\t\t\t\t\t\"Clave\" => $clave,\n\t\t\t\t\t\t\t\t\t\"Email\" => $email,\n\t\t\t\t\t\t\t\t\t\"Estado\" => \"Activo\",\n\t\t\t\t\t\t\t\t\t\"Rol\" => $rol,\n\t\t\t\t\t\t\t\t\t\"Genero\" => $genero,\n\t\t\t\t\t\t\t\t\t\"Foto\" => $foto\n\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t\t$cuentaAgregada = modeloPrincipal::agregarCuenta($datosCuenta);\n\n\t\t\t\t\t\t\t\tif ($cuentaAgregada)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$datosDocente = [\n\t\t\t\t\t\t\t\t\t\t\"DNI\" => $dni,\n\t\t\t\t\t\t\t\t\t\t\"Nombre\" => $nombre,\n\t\t\t\t\t\t\t\t\t\t\"Apellidos\" => $apellido,\n\t\t\t\t\t\t\t\t\t\t\"Telefono\" => $telefono,\n\t\t\t\t\t\t\t\t\t\t\"Direccion\" => $direccion,\n\t\t\t\t\t\t\t\t\t\t\"Codigo\" => $codigo,\n\t\t\t\t\t\t\t\t\t\t\"Privilegio\" => $privilegio\n\t\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t\t\t$docenteAgregado = docenteModelo::agregarDocenteModelo($datosDocente);\n\n\t\t\t\t\t\t\t\t\tif ($docenteAgregado)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"limpiar\",\n\t\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Éxito\",\n\t\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"Docente registrado con éxito\",\n\t\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"success\"\n\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tmodeloPrincipal::eliminarCuenta($codigo);\n\n\t\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"El DOCENTE NO pudo ser registrado. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"La CUENTA NO pudo ser registrada. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\treturn modeloPrincipal::mostrarAlerta($alerta);\n\t\t}", "title": "" }, { "docid": "e81bf469495021beee6f363b2f8fd473", "score": "0.54817605", "text": "function uploadFile($nomfile, $descripcion, $prefijo) {\r\n $rpta = false;\r\n $directorio = '../site/archivos/propuestas/';\r\n $file = $_FILES[$nomfile]['name'];\r\n if (!empty($_FILES[$nomfile]['name'])) {\r\n\r\n $tmpfile = $_FILES[$nomfile]['tmp_name']; //nombre temporal de la imagen \r\n $result_explode = end(explode('.', $file));\r\n $extension = $result_explode;\r\n\r\n $file = trim(strtoupper($_POST['codprop']));\r\n $file = $prefijo . $file . '.' . $extension;\r\n move_uploaded_file($tmpfile, \"$directorio$file\"); //movemos el archivo a la carpeta de destino \r\n\r\n $this->__set('url', $file);\r\n $this->__set('descripcion', $descripcion);\r\n $rpta = $this->insertarArchivos();\r\n }\r\n return $rpta;\r\n }", "title": "" }, { "docid": "bc17ac8095f3543d36a8d7e9166c901e", "score": "0.54767567", "text": "private function usuario_save() {\n $id = 0;\n //consulta la existencia del usuario\n $q = \"SELECT usr_id FROM fir_usuario WHERE usr_nick = '\" . $this->nick . \"' \";\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $resultado = mysql_num_rows($con);\n if ($this->id > 0) {\n //actualiza la informacion\n if (strlen($this->nick) > 3) {\n $q = \"SELECT usr_id FROM fir_usuario WHERE usr_id = \" . $this->id;\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n while ($obj = mysql_fetch_object($con)) {\n $id = $obj->usr_id;\n $pass = $this->make_hash_pass($this->nick, $this->pass);\n $table = \"fir_usuario\";\n $arrfieldscomma = array('usr_nombre' => $this->nombre,\n 'usr_apellido' => $this->apellido,\n 'usr_cargo' => $this->cargo,\n 'usr_correo' => $this->correo,\n 'usr_celular' => $this->celular,\n 'usr_foto' => $this->foto,\n 'usr_hashpass' => $pass,\n 'usr_nick' => $this->nick,\n 'usr_rol' => $this->rol);\n $arrfieldsnocomma = array('fir_empresa_emp_id' => $this->euid, 'fir_sede_sde_id' => $this->sdid);\n $q = $this->UTILITY->make_query_update($table, \"usr_id = '$id'\", $arrfieldscomma, $arrfieldsnocomma);\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\n }\n } else {\n $arrjson = array('output' => array('valid' => false, 'response' => array('code' => '2001', 'content' => ' Faltan datos.')));\n }\n } else {\n if ($resultado == 0) {\n //crea el nuevo usuario\n $pass = $this->make_hash_pass($this->nick, $this->pass);\n $q = \"INSERT INTO fir_usuario (usr_nombre, usr_apellido, usr_cargo, usr_correo, usr_celular, usr_foto, usr_hashpass, usr_nick, fir_empresa_emp_id, fir_sede_sde_id, usr_rol) VALUES ('$this->nombre', '$this->apellido', '$this->cargo', '$this->correo', '$this->celular', '$this->foto', '$pass', '$this->nick', $this->euid, $this->sdid, '$this->rol')\";\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $id = mysql_insert_id();\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\n } else {\n $arrjson = array('output' => array('valid' => false, 'response' => array('code' => '3002', 'content' => 'ya existe.')));\n }\n }\n $this->response = ($arrjson);\n }", "title": "" }, { "docid": "3e7ae8847f3bda5be46705f81adc6726", "score": "0.54723126", "text": "function ProveedorInsert($Nombre, $IdEmpresa) {\r\n\tglobal $Cfg;\r\n\r\n\t$sql = \"insert $Cfg[SqlPrefix]proveedores set\r\n\t\tNombre = '$Nombre',\r\n\t\tIdEmpresa = $IdEmpresa\";\r\n\r\n\tDbExecuteUpdate($sql);\r\n\r\n\treturn DbLastId();\r\n}", "title": "" }, { "docid": "2acaa97aab66923b45e52fbb48b7e92f", "score": "0.546016", "text": "function updateToFile($id, $imageName, $config)\n{\n\t// Reads users data from file\n\t$arrayUsers=readUsersFromFile($config);\n\t\t\n\t$arrayUser = array_merge(initArrayUserWithKeys(),$_POST);\n\t\n\tforeach($arrayUser as $key => $value)\n\t{\n\t\tif(is_array($value))\n\t\t\t$value=implode(',',$value);\n\t\t$arrayUser[$key]=trim($value);\n\t}\t\n\t$arrayUser[]=$imageName;\n\t$textUser=implode('|',$arrayUser);\n\t\n\t$arrayUsers[$id]=$textUser;\n\twriteUsersToFile($arrayUsers, $config);\n}", "title": "" }, { "docid": "93ed389ef894be3f93858bd8adc3ed79", "score": "0.5453533", "text": "public function AdicionarDOC($file, $id, $nomeAluno,$tipo){\n $formatP = array(\"pdf\");\n\n \n $extensao = pathinfo($file['name'], PATHINFO_EXTENSION);\n\n // echo \"$extensao\";\n\n if(in_array($extensao,$formatP)){\n // $caminho = \"../docs/\".$tipo.\"/\";\n $temp = $file['tmp_name'];\n\n $this->PrepraDiretorioDoc($tipo, $id);\n\n if($tipo == \"curriculo\"){\n $inserirDOC = \"UPDATE pessoa set DOC_Curriculo = :nomeArquivo WHERE CD_Pessoa = :idAluno\";\n $caminho = $this->caminhoCurriculo;\n $doc = \"DOC_Curriculo\";\n }\n if($tipo == \"relatorio\"){\n $inserirDOC = \"UPDATE pessoa set DOC_Relatorio = :nomeArquivo WHERE CD_Pessoa = :idAluno\";\n $caminho = $this->caminhoRelatorio;\n $doc = \"DOC_Relatorio\";\n }\n\n if(move_uploaded_file($temp, $caminho.$nomeAluno.\"_$doc.pdf\")){\n \n\n try{\n $conn = new ConexaoBD();\n $conect = $conn->ConDB();\n\n $result = $conect->prepare($inserirDOC);\n $result->bindParam(':nomeArquivo', $nomeAluno, PDO::PARAM_STR);\n $result->bindParam(':idAluno', $id, PDO::PARAM_INT);\n $result->execute();\n\n \n\n $funcionou = $result->rowCount();\n \n \n if($funcionou > 0){\n return true;\n }\n else{\n // echo\"não retornou linha nenhuma\";\n return false;\n }\n }\n catch(PDOException $e){\n echo \"erro de PDO \".$e->getMessage();\n }\n\n }\n else{\n echo\"erro ao mover para pasta<br/>\";\n // var_dump(move_uploaded_file($temp, $this->caminhoCurriculo.$nomeAluno.\".pdf\"));\n }\n\n }\n else{\n echo \"Formato inválido\";\n }\n\n }", "title": "" }, { "docid": "3fb477b6a20403be1c2b8296ea09a07e", "score": "0.5448722", "text": "public function storePersonal($Id , $Name, $Surname,$Rut,$Email,$Phone,$State,$Created,$FacilityID) {\r\n // Insert user into database\r\n $result = mysqli_query($this->con,\"INSERT INTO personal (id, name, surname, rut, email, phone, created, state, facility_id) VALUES ('$Id','$Name','$Surname','$Rut','$Email','$Phone','$Created','$State','$FacilityID');\");\r\n\t\t\r\n if ($result) {\r\n\t\t\treturn true;\r\n } else {\r\n\t\t\tif( mysqli_errno($this->con) == 1062) {\r\n\t\t\t\t// Duplicate key - Primary Key Violation\r\n\t\t\t\treturn false;\r\n\t\t\t} else {\r\n\t\t\t\t// For other errors\r\n\t\t\t\treturn false;\r\n\t\t\t} \r\n }\r\n }", "title": "" }, { "docid": "9f4d4d86a01e53f5693fe1780cf417dd", "score": "0.543103", "text": "public function save($con) {\n\t\t$query = \"INSERT INTO pictures (user_id,filename) VALUES ({$this->user_id},'{$this->filename}')\";\n\t\tmysqli_query($con,$query);\n\t}", "title": "" }, { "docid": "a8c324b4df996d59fa9826ee70427b0c", "score": "0.5430919", "text": "public function InsertGeneroLiterario()\n\t{\n\t\t// Configura a variável que receberá dados do usuário\n\t\t$formdata = json_decode(file_get_contents('php://input'), true);\n\n\t\t// Obtendo os dados do usuário\n\t\t$array = array(\n\t\t\t\"nome\" => $formdata['nome'],\n\t\t\t\"ativo\" => 1\n\t\t);\n\n\t\t// Chama a funcao do Model para inserir os dados no Banco de Dados.\n\t\t$this->M_Generos->create_genero($array);\n\t}", "title": "" }, { "docid": "d509faa7604429299709fdfba49bba13", "score": "0.5430548", "text": "public function saveInformation()\n\t\t{\n\t\t\t$con = MySQL::getConnection();\n\t\t\t$data = array(\n\t\t\t\t'firstName' => mysql_real_escape_string($this->getFirstName(), $con),\n\t\t\t\t'lastName' => mysql_real_escape_string($this->getLastName(), $con),\n\t\t\t\t'address' => mysql_real_escape_string($this->getAddress(), $con),\n\t\t\t\t'dateJoined' => $this->getDateJoined()->format('Y-m-d H:i:s'),\n\t\t\t\t'dateNextFee' => $this->getDateNextFee()->format('Y-m-d H:i:s'),\n\t\t\t\t'username' => mysql_real_escape_string($this->getUsername(), $con),\n\t\t\t\t'passwordHash' => $this->getPasswordHash,\n\t\t\t\t'email' => mysql_real_escape_string($this->getEmail(), $con),\n\t\t\t\t'isAdmin' => $this->isAdmin());\n\t\t\t$dataString = \n\t\t\t 'firstName=\\'' . $data['firstName'] . '\\',\n\t\t\t\tlastName=\\'' . $data['lastName'] . '\\',\n\t\t\t\taddress=\\'' . $data['address'] . '\\',\n\t\t\t\tdateJoined=\\'' . $data['dateJoined'] . '\\',\n\t\t\t\tdateNextFee=\\'' . $data['dateNextFee'] . '\\',\n\t\t\t\tusername=\\'' . $data['username'] . '\\',\n\t\t\t\tpasswordHash=\\'' . $data['passwordHash'] . '\\',\n\t\t\t\temail=\\'' . $data['email'] . '\\',\n\t\t\t\tisAdmin=\\'' . $data['isAdmin'] . '\\''; // string to be used in conjunction with MySQL's \"SET\" syntax\n\t\t\t\t\n\t\t\tif ($this->getID() == -1) \n\t\t\t{\t\n\t\t\t\tMySQL::executeQuery('INSERT INTO ' . self::$table . ' SET ' . $dataString);\n\t\t\t\t$this->id = mysql_insert_id(MySQL::getConnection());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// user already exists and needs to be updated\n\t\t\t\tMySQL::executeQuery('UPDATE ' . self::$table . ' SET ' . $dataString . ' WHERE id=' . $this->getID());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5febb285a10cd7f486822e2e2aa597d5", "score": "0.5413222", "text": "public function guadarImagenPerfilPersona($id_persona, $ruta, $contador){\n //echo \"Llego: \" . $id_persona . \":-:\" . $ruta . \":--:\" . $contador;\n $sql_guardar_imagen_perfil = \"INSERT INTO imgperfil\".\n \"(id_persona, nombre, contador, estado, fecha_creacion, hora_creacion)\".\n \"VALUES\".\n \"($id_persona, '$ruta', $contador, 1, '$this->fecha', '$this->hora')\";\n \n $resultado = mysql_query($sql_guardar_imagen_perfil) or die (\"No se guardo la imagen de perfil \" . mysql_error());\n \n return \"OK\";\n }", "title": "" }, { "docid": "b08a2b7341e7078892f370bdb1381f8c", "score": "0.54091126", "text": "function creer_admin_player($prenom,$nom,$login,$pwd,$C_pwd){\r\n $tab['prenom']=$prenom;\r\n $tab['nom']=$nom;\r\n $tab['login']=$login;\r\n $tab['pwd']=$pwd;\r\n $tab['c_pwd']=$C_pwd;\r\n $users[]=$tab;\r\n $data=file_put_contents($users);\r\n $data=json_encode($data);\r\n \r\n if(login_exist($login)==true){\r\n echo 'inscription reussi';\r\n }else{\r\n echo 'login existe deja';\r\n }\r\n\r\n }", "title": "" }, { "docid": "0e3eef84807032ca973de66242c7ee7a", "score": "0.5409108", "text": "public function insert() {\n $llibre = new llibres_model();\n\n //TITOL no pot estar buid\n if (!empty($_POST[\"titol\"])) {\n\n $imatge = \"\";\n if (!empty($_FILES['imatge']['name'])) {\n $imatge = $this->guarda_imatge( $llibre->netejar_camps($_POST[\"titol\"]) );\n if ($imatge === FALSE)\n die(\"No s'ha pogut guardar la imatge, llibres_controller\");\n }\n\n $llibre->setTitol( $llibre->netejar_camps($_POST[\"titol\"]) );\n $llibre->setAutor($llibre->netejar_camps($_POST[\"autor\"]));\n $llibre->setGenere($llibre->netejar_camps($_POST[\"genere\"]));\n if (!empty($_POST[\"data_entrada\"]))\n $llibre->setData_entrada($data_entrada = $llibre->netejar_camps($_POST[\"data_entrada\"]));\n else\n $llibre->setData_entrada( date(\"Y-m-d\") );\n\n $llibre->setPreu($_POST[\"preu\"]);\n $llibre->setImatge($imatge);\n\n $error = $llibre->insert();\n\n if (!$error)\n // header() evita que amb refresc de pantalla es crei una altra alta o baixa.\n header(\"Location: ./index.php\");\n else {\n die($error);\n }\n }\n}", "title": "" }, { "docid": "97ff4485aa51657a677a3aab5ac81e28", "score": "0.5402888", "text": "private function InsertNameClass($Folder){\n $ID_Language=$this->session->uinterfacelangauge;\n $pictokey=$this->getPictokeys();\n switch($ID_Language){\n case 1:\n $table=\"NameClassCA\";\n break;\n case 2:\n $table=\"NameClassES\";\n break;\n }\n $file = file_get_contents($Folder.\"/\".$table.\".json\");\n $nclass=json_decode($file);\n $count=count($nclass->nameid);\n for($i=0;$i<$count;$i++){\n $sql=\"INSERT INTO $table(nameid,class)VALUES (?,?)\";\n $this->db->query($sql,array(\n $pictokey[$i],\n $nclass->class[$i]\n ));\n}\n}", "title": "" }, { "docid": "2a6e3204e6312fbd099da84365830aea", "score": "0.5395458", "text": "public function createNewName()\n {\n $newNameCount = $this -> newNameCount + 1;\n $this -> providedImageName = $newNameCount.$this -> providedImageName;\n $this -> fileExistence();\n }", "title": "" }, { "docid": "5c9a86731681845fd42ee7522c4c0794", "score": "0.539335", "text": "public function persistir() ;", "title": "" }, { "docid": "b3381f468c52349f94a94e08bbcf8e2c", "score": "0.5392199", "text": "function lihat(){ //function lihat\n global $filename; //set variabel $filename yang bersifat global\n \n if(file_exists($filename)){ //jika file list_pengunjung.txt ada\n $value = file_get_contents($filename); //set nilai di notepad\n }else{ //jika file list_pengunjung.txt tidak ada maka akan membuat file list_pengunjung.txt\n $value = 0; //kemudian set value menjadi 0\n }\n \n file_put_contents($filename, ++$value); //menuliskan kedalam file list_pengunjung.txt value di tambah 1\n}", "title": "" }, { "docid": "a563145ad818cb2a799b75b83499fca3", "score": "0.5390051", "text": "public function insert_fotoCierre()\n {\n if ($this->auth->is_auth()) {\n $id_pds = $this->uri->segment(3);\n $id_inc = $this->uri->segment(4);\n\n $xcrud = xcrud_get_instance();\n $this->load->model('incidencia_model');\n\n $config['upload_path'] = dirname($_SERVER[\"SCRIPT_FILENAME\"]) . '/uploads/fotos/';\n $config['upload_url'] = base_url() . '/uploads/fotos/';\n $config['allowed_types'] = 'pdf|jpg|jpeg|png';\n $new_name = $id_inc . '-' . time();\n $config['file_name'] = $new_name;\n $config['overwrite'] = TRUE;\n $config['max_size'] = '10000KB';\n\n $this->load->library('upload', $config);\n\n\n $foto_cierre = '';\n $message=\"\";\n if ($this->upload->do_upload('userfile')) {\n $data = $this->upload->data();\n $foto_cierre = $data['file_name'];\n } else {\n //echo $this->upload->display_errors();\n $message= 'Ha fallado la carga de la foto de cierre de la incidencia. '.$this->upload->display_errors();\n }\n $this->session->set_flashdata(\"messageFoto\",$message);\n $data['messageFoto'] = (validation_errors() ? validation_errors() : ($message));\n\n $this->incidencia_model->set_fotoCierre($id_inc, $foto_cierre);\n\n redirect('admin/operar_incidencia/' . $id_pds . '/' . $id_inc, 'refresh');\n }\n }", "title": "" }, { "docid": "064cb1f71fc33df350ba9abda81dffa3", "score": "0.5385719", "text": "public function store(Request $request)\n {\n $pri_nombre=$request->input(\"pri_nombre\");\n $seg_nombre=$request->input(\"seg_nombre\");\n $pri_apellido=$request->input(\"pri_apellido\");\n $seg_apellido=$request->input(\"seg_apellido\");\n $cedula=$request->input(\"cedula\");\n $telefono=$request->input(\"telefono\");\n $email=$request->input(\"email\");\n $dias=$request->input(\"dias\");\n $mes=$request->input(\"mes\");\n $anio=$request->input(\"anio\");\n $cargo=$request->input(\"idcargo\");\n $imagen=$request->file('imagen'); \n $nombre=$imagen->getClientOriginalName();\n $data=PersonalModel::create([\n 'nombre_primero'=>mb_strtoupper($pri_nombre, 'UTF-8'),\n 'nombre_segundo'=>mb_strtoupper($seg_nombre, 'UTF-8'), \n 'apellido_primero'=>mb_strtoupper($pri_apellido, 'UTF-8'),\n 'apellido_segundo'=>mb_strtoupper($seg_apellido, 'UTF-8'), \n 'foto'=>$nombre,\n 'cedula'=>$cedula,\n //'telefono'=>,\n 'email'=>$email,\n 'cargo_id'=>$cargo\n //'fecha_nacimiento'=>\n ]);\n \\Storage::disk('local')->put($nombre,\\File::get($imagen));\n }", "title": "" }, { "docid": "28c9e0b53d9ae87dbd74eea99fc808ca", "score": "0.53756785", "text": "public function guardarNodo(){\n\t\t$id = intval(substr($this->get('id', true), 1));\n\t\t\n\t\t$texto = $this->get('texto', true);\n\t\t$codigo = $this->get('codigo', true);\n\t\t\n\t\t$datos = array(\n\t\t\t'texto' => $texto,\n\t\t\t'codigo' => $codigo\n\t\t);\n\t\t\n\t\t$this->db->seleccionar($this->conf['tablas']['app_estructura'], 'count(*) as c', array(\n\t\t\t'w' => \"codigo = '$codigo' and id!=$id and padre = (select padre from \" . $this->conf['tablas']['app_estructura'] . \" where id=$id)\"\n\t\t));\n\t\t\n\t\tif (intval($this->db->ur('c')) >= 1){\n\t\t\t$this->salida(array('s' => 'n', 'msj' => 'Ya Existe un Elemento con el Codigo \"' . $codigo . '\" Dentro del Nodo.'));\n\t\t}\n\t\t\n\t\t$this->db->actualizar($this->conf['tablas']['app_estructura'], $datos, false, 'id = ' . $id);\n\t\t\n\t\t$this->salida(array('s' => 's', 'msj' => 'Registros Guardados Satisfactoriamente.', 'arbol' => $this->arbol(true)));\n\t}", "title": "" }, { "docid": "296f5429b41ade1d6db1ad7dfb891ca7", "score": "0.53709227", "text": "private function empresa_save() {\n $id = 0;\n //consulta la existencia\n $q = \"SELECT emp_id FROM fir_empresa WHERE emp_nit = '\" . $this->nit . \"' \";\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $resultado = mysql_num_rows($con);\n if ($this->id > 0) {\n //actualiza la informacion\n if (strlen($this->nit) > 3) {\n $q = \"SELECT emp_id FROM fir_empresa WHERE emp_id = \" . $this->id;\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n while ($obj = mysql_fetch_object($con)) {\n $id = $obj->emp_id;\n $table = \"fir_empresa\";\n $arrfieldscomma = array('emp_nit' => $this->nit,\n 'emp_razonsocial' => $this->razonsocial,\n 'emp_ciudad' => $this->ciudad,\n 'emp_direccion' => $this->direccion,\n 'emp_telefono' => $this->telefono,\n 'emp_celular' => $this->celular,\n 'emp_contacto' => $this->contacto,\n 'emp_correo' => $this->correo,\n 'emp_descripcion' => $this->descripcion,\n 'emp_logo' => $this->logo);\n $arrfieldsnocomma = array();\n $q = $this->UTILITY->make_query_update($table, \"emp_id = '$id'\", $arrfieldscomma, $arrfieldsnocomma);\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\n }\n } else {\n $arrjson = array('output' => array('valid' => false, 'response' => array('code' => '2001', 'content' => ' Faltan datos.')));\n }\n } else {\n if ($resultado == 0) {\n $q = \"INSERT INTO fir_empresa (emp_nit, emp_razonsocial, emp_ciudad, emp_direccion, emp_telefono, emp_celular, emp_contacto, emp_correo, emp_descripcion, emp_logo) VALUES ('$this->nit', '$this->razonsocial', '$this->ciudad', '$this->direccion', '$this->telefono', '$this->celular', '$this->contacto', '$this->correo', '$this->descripcion', '$this->logo')\";\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $id = mysql_insert_id();\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\n } else {\n $arrjson = array('output' => array('valid' => false, 'response' => array('code' => '3002', 'content' => 'ya existe.')));\n }\n }\n $this->response = ($arrjson);\n }", "title": "" }, { "docid": "253206dac635d0a2db0c64f2fcb20d79", "score": "0.5368347", "text": "public static function Guardar($obj)\n{\n $resultado = FALSE;\n\n $ar = fopen(\"archivos/Usuarios.txt\",\"a\");\n\n $cant = fwrite($ar,$obj->ToString());\n if($cant >0)\n {\n $resultado = TRUE;\n }\n fclose($ar);\n\n return $resultado;\n}", "title": "" }, { "docid": "ef91b8a1df78768def1e32757937ee4c", "score": "0.53669286", "text": "private function equipo_save() {\n $id = 0;\n $numeroinventario = $this->euid.\"-\".$this->sdid.\"-\";\n if ($this->id > 0) {\n //actualiza la informacion\n $q = \"SELECT pro_id FROM fir_producto WHERE pro_id = \" . $this->id;\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n while ($obj = mysql_fetch_object($con)) {\n $id = $obj->pro_id;\n $numeroinventario = $numeroinventario.$id;\n $table = \"fir_producto\";\n $arrfieldscomma = array('pro_nombre' => $this->nombre,\n 'pro_marca' => $this->marca,\n 'pro_numinventario' => $numeroinventario);\n $arrfieldsnocomma = array('fir_sede_sde_id' => $this->sdid, 'fir_categoria_cat_id' => $this->catid, 'fir_empresa_emp_id' => $this->euid);\n $q = $this->UTILITY->make_query_update($table, \"pro_id = '$id'\", $arrfieldscomma, $arrfieldsnocomma);\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\n }\n } else {\n $q = \"INSERT INTO fir_producto (pro_nombre, pro_marca, pro_numinventario, fir_sede_sde_id, fir_categoria_cat_id, fir_empresa_emp_id) VALUES ('$this->nombre', '$this->marca', '$this->numinventario', $this->sdid, $this->catid, $this->euid)\";\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $id = mysql_insert_id();\n $numeroinventario = $numeroinventario.$id;\n $q = \"UPDATE fir_producto SET pro_numinventario = '\".$numeroinventario.\"' WHERE pro_id = \".$id;\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\n }\n $this->response = ($arrjson);\n }", "title": "" }, { "docid": "548a7a9593b0928eda6c8b25ba1d0065", "score": "0.5366166", "text": "function inserir_direto($ano)\n\t{\n\t\t$this->set('ano', $ano);\n\t\t$this->set('metodo_destino', 'inserir');\n\t\t$this->data['Sala']['ano_letivo'] = $ano;\n\t\t$this->render('sala');\n\t}", "title": "" }, { "docid": "3c6542594f202b4729fcfc69a0f3c0a5", "score": "0.53619766", "text": "public function store(Request $request)\n {\n // dd($request->all());\n\n $file = $request->file('file');\n $nombre = time().'_'.$file->getClientOriginalName();\n Storage::disk('documentos')->put($nombre, \\File::get($file));\n\n\n $store = new Marcaherrete;\n $store->ff_expedicion = $request->ff_exp; \n $store->ff_vencimiento = $request->ff_venc; \n $store->ruta = $nombre; \n \n $persona= Persona::where('num_dc', $request->persona_id)->first(); \n\n $store->persona_id = $persona->id; \n $store->save();\n return redirect()->route('marcas-herretes.index')\n ->with('success','Marca Herrete Registrado Exitosamente');\n }", "title": "" }, { "docid": "ad984d40f6dbf0d75dadccd3e0940d27", "score": "0.5360883", "text": "public function registro(){\r\n\r\n $consulta = $this->conexion->prepare(\"INSERT INTO \".$this->table.\" (nombre,apellido1,apellido2,email,telefono,contrasena,foto)\r\n VALUES (:nombre,:apellido1,:apellido2,:email,:telefono,:contrasena,:foto)\");\r\n $registro = $consulta->execute(array(\r\n \"nombre\" => $this->nombre,\r\n \"apellido1\" => $this->apellido1,\r\n \"apellido2\"=>$this->apellido2,\r\n \"email\" => $this->email,\r\n \"telefono\" => $this->telefono,\r\n \"contrasena\"=>$this->contrasena,\r\n \"foto\"=> $this->foto\r\n\r\n ));\r\n \r\n $lastId=$this->conexion->lastInsertId();\r\n $this->conexion = null;\r\n\r\n return $lastId;\r\n }", "title": "" }, { "docid": "d6c91a377fc96548368dcee676e15d0c", "score": "0.53567016", "text": "function addPorCidade()\n{\n if (!empty($_POST['imovel']))\n {\n \n $today = \n date_create('now', new DateTimeZone('America/Sao_Paulo'));\n\n $imovel = $_POST['imovel'];\n $imovel['modified'] = $imovel['created'] = $today->format(\"Y-m-d H:i:s\");\n \n save('imoveis', $imovel);\n header('location: index.php');\n }\n \n global $proprietarios;\n $proprietarios = findAll('proprietarios');\n\n getCidadesVista();\n\n}", "title": "" }, { "docid": "738b5d915f7d00cef43388075c5d9821", "score": "0.5353385", "text": "function addToDatabase($filename, $id, $data) {\n\t\t$file = file_get_contents($filename);\n\t\t$array = json_decode($file);\n\t\tarray_push($array, $data);\n\t\t$jsonData = json_encode($array);\n\t\tfile_put_contents($filename, $jsonData);\n\t}", "title": "" }, { "docid": "a3354fd51f0e0098329ba9501e6b646d", "score": "0.5349755", "text": "public function InsertAutor()\n\t{\n\t\t// Configura a variável que receberá dados do usuário\n\t\t$formdata = json_decode(file_get_contents('php://input'), true);\n\n\t\t// Obtendo os dados do usuário\n\t\t$array = array(\n\t\t\t\"nome\" => $formdata['nome'],\n\t\t\t\"sexo\" => $formdata['sexo'],\n\t\t\t\"data_de_nascimento\" => $formdata['data_de_nascimento'],\n\t\t\t\"nacionalidade\" => $formdata['nacionalidade'],\n\t\t\t\"ativo\" => 1\n\t\t);\n\n\t\t// Chama a funcao do Model para inserir os dados no Banco de Dados.\n\t\t$this->M_Autores->create_autor($array);\n\t}", "title": "" }, { "docid": "a4643c9a44554bc35f6efd0170a4547e", "score": "0.5346816", "text": "function addUser($name){\n $users = $this->readUsers();\n\n foreach ($users as $user){\n if ($user->getName() == $name) {\n echo \"user exists\";\n return;\n }\n }\n\n file_put_contents(USERFILE, $name.\";0;0\\r\\n\", FILE_APPEND);\n }", "title": "" }, { "docid": "cd6e2734082d12166b0f2e7ebeaff93f", "score": "0.5343147", "text": "function addProfil($tailleH,$tailleB,$genre,$idImg,$idClient,$nomProfil){\n $conn = bdd();\n $conditions = array();\n\tarray_push($conditions, array('nameChamps'=>'idClient','name'=>'idClient','value'=>$idClient));\n\tarray_push($conditions, array('nameChamps'=>'genre','name'=>'genre','value'=>$genre));\n array_push($conditions, array('nameChamps'=>'tailleBasProfil','name'=>'tailleBasProfil','value'=>$tailleB));\n\tarray_push($conditions, array('nameChamps'=>'tailleHautProfil','name'=>'tailleHautProfil','value'=>$tailleH));\n\tarray_push($conditions, array('nameChamps'=>'nomProfil','name'=>'nomProfil','value'=>$nomProfil));\n array_push($conditions, array('nameChamps'=>'idAvatar','name'=>'idAvatar','value'=>$idImg));\n $req = new myQueryClass('profil',$conditions);\n\t$r = $req->myQueryInsert();\n $conn = null ; //Quitte la connexion\n return $r= '';\n\n}", "title": "" }, { "docid": "3058d6cca4db029da4e7dd405a63a8ec", "score": "0.53421164", "text": "function SQL_Insert_Archivo()\n {\n $query_insert = sprintf(\"INSERT INTO adjunto (nombre, nombre_archivo, tipo, carpeta, principal, id_noticia)\n VALUES (%s, %s, %s, %s, %s, %s)\",\n $this->GetSQLValueString($this->nombre, \"text\"),\n $this->GetSQLValueString($this->nombre_archivo, \"text\"),\n $this->GetSQLValueString($this->tipo, \"text\"),\n $this->GetSQLValueString($this->carpeta, \"text\"),\n $this->GetSQLValueString($this->principal, \"int\"),\n $this->GetSQLValueString($this->id_noticia, \"int\"));\n return $query_insert;\n }", "title": "" }, { "docid": "d784656d879b8f6168fd43af71cd7591", "score": "0.5341523", "text": "function archivoExistente($ruta){\n\n /* Llamada a las variables globales a utilizar */\n global $conection;\n echo(\"La ruta a renombrar es \".$ruta);\n /*\n * Selecciono todos los datos de la tabla Usuarios donde el nombre de usuario\n * es el mismo que el introducido en el formulario\n */\n $sentence = \"SELECT * FROM Imagenes WHERE ruta='$ruta'\";\n\n /*\n * Ejecucion de la sentencia anterior, si se produce algun error se muestra\n * un mensaje y se detiene la ejecucion\n */\n $query = mysqli_query($conection, $sentence) or die(ERROR_CONSULTA_DB);\n\n /* Obtencion del numero de usuarios devueltos por la query ejecutada*/\n $numeroDatosDevueltos = mysqli_num_rows( $query);\n echo(\"Numero de involucradoes es \".$numeroDatosDevueltos);\n /* Liberacion de la query */\n mysqli_free_result($query);\n\n return $numeroDatosDevueltos;\n\n}", "title": "" }, { "docid": "d95ad90b8dd02882fe671f610a420d05", "score": "0.534099", "text": "public function store( Request $request){\n if($request->hasFile('ruta')){ \n $asignacion = $this->asignacionRepository->create($request->all());\n $file=$request->file('ruta');\n $name=$file->getClientOriginalName();\n /*Grantizo que los archivos no se sobrescriban*/\n $file->move(storage_path('app/Academic/Horarios/').$asignacion->id,$name);\n $asignacion->update(['ruta'=>$name]);\n Flash::success('Registrado con Exito.');\n return redirect(route('asignacion.index'));\n }else{\n Flash::error('Por favor completar todos los datos solicitados');\n return redirect()->back();\n }\n }", "title": "" }, { "docid": "08c3e837a2a5641b3967da13d6b57e88", "score": "0.5335123", "text": "function guardar_1($turno,$proyecto,$area,$area_2,$estacion,$estacion_2,$linea,$linea_2,$defecto,$defecto_2,$causa,$causa_2,$codigo_scrap,$vendor,$v_nombre,$codigo_scrap_2,$supervisor,$operador,$no_personal,$apd,$o_mantto,$info_1,$info_2,$comentario,$accion_correctiva,$partes,$partes_name,$archivo,$archivo_name) {\r\nif($archivo!='') { \r\n\t$s_ = \"select * from configuracion where variable='ruta_evidencias'\";\r\n\t$r_ = mysql_query($s_);\r\n\t$d_ = mysql_fetch_array($r_);\r\n\t\r\n\t$r_server = $d_['valor'];\r\n\t$pext = getFileExtension($archivo_name);\r\n\t$nombre = \"evidencia_UID\".$_SESSION[\"IDEMP\"].\".\".$pext;\r\n\t$nom_final = $r_server.$nombre;\r\n\tif (is_uploaded_file($archivo)) {\r\n\t\tif (!copy($archivo,\"$nom_final\")) {\r\n\t\t\techo \"<script>alert('Error al subir el archivo de evidencias: $nom_final');</script>\"; \r\n\t\t\tnuevo($turno,$proyecto,$area,$area_2,$estacion,$estacion_2,$linea,$linea_2,$defecto,$defecto_2,$causa,$causa_2,\r\n\t\t\t$codigo_scrap,$vendor,$v_nombre,$codigo_scrap_2,$supervisor,$operador,$no_personal,$apd,$o_mantto,$info_1,$info_2,$comentario,\r\n\t\t\t$accion_correctiva,'','','',''); exit;\r\n\t\t}\r\n\t}\t\t\r\n} \r\n\r\n//Cargo el archivo de partes \r\n\t$s_ = \"select * from configuracion where variable='ruta_capturas'\";\r\n\t$r_ = mysql_query($s_);\r\n\t$d_ = mysql_fetch_array($r_);\r\n\t\r\n\t$r_server = $d_['valor'];\r\n\t$pext = getFileExtension($partes_name);\r\n\t$nombre_ = \"partes_UID\".$_SESSION[\"IDEMP\"].\".\".$pext;\t\r\n\t$nom_final_ = $r_server.$nombre_;\r\n\tif (is_uploaded_file($partes)) {\r\n\t\tif (!copy($partes,\"$nom_final_\")) {\r\n\t\t\techo \"<script>alert('Error al subir el archivo de partes: $nom_final_');</script>\";\r\n\t\t\tnuevo($turno,$proyecto,$area,$area_2,$estacion,$estacion_2,$linea,$linea_2,$defecto,$defecto_2,$causa,$causa_2,\r\n\t\t\t$codigo_scrap,$vendor,$v_nombre,$codigo_scrap_2,$supervisor,$operador,$no_personal,$apd,$o_mantto,$info_1,$info_2,$comentario,\r\n\t\t\t$accion_correctiva,'','','',''); exit;\r\n\t\t}\r\n\t}\r\n\r\n $fecha\t = date(\"Y-m-d\");\r\n\t$anio\t = date(\"Y\"); $i=0;\r\n\tlist($anio,$mes,$dia) = split(\"-\",$fecha);\r\n $semana = date('W',mktime(0,0,0,$mes,$dia,$anio));\r\n\t\r\n\t$folios[$i] = $_SESSION['IDEMP']; $i++;\r\n\t$folios[$i] = $_SESSION['NAME']; $i++;\r\n\t$folios[$i] = $fecha; $i++;\r\n\t$folios[$i] = $semana; $i++; \r\n\t$folios[$i] = $anio; $i++;\r\n\t$folios[$i] = $turno; $i++;\r\n\r\n\t$d_pr = get_datos_proyecto($proyecto);\r\n\t$folios[$i] = $d_pr['id_pr']; $i++; //ID Proyecto\r\n\t$folios[$i] = $d_pr['nom_pr']; $i++; //Nombre Proyecto\r\n\t$folios[$i] = $d_pr['id_p']; $i++; //ID Planta\r\n\t$folios[$i] = $d_pr['nom_p']; $i++; //Nombre Planta\r\n\t$folios[$i] = $d_pr['id_d']; $i++; //ID División\r\n\t$folios[$i] = $d_pr['nom_d']; $i++; //Nombre División\r\n\t$folios[$i] = $d_pr['id_s']; $i++; //ID Segmento\r\n\t$folios[$i] = $d_pr['nom_s']; $i++; //Nombre Segmento\r\n\t$folios[$i] = $d_pr['id_pc']; $i++; //ID ceco\r\n\t$folios[$i] = $d_pr['nom_pc']; $i++; //Nombre ceco\r\n\r\n\t$folios[$i] = $apd; $i++;\r\n\t$folios[$i] = get_dato(\"nombre\",$apd,\"apd\"); $i++;\r\n\t$folios[$i] = $area; $i++;\r\n\t$folios[$i] = get_dato(\"nombre\",$area,\"areas\"); $i++;\r\n\t$folios[$i] = $estacion; $i++;\r\n\t$folios[$i] = get_dato(\"nombre\",$estacion,\"estaciones\"); $i++;\t\r\n\t$folios[$i] = $linea; $i++;\r\n\t$folios[$i] = get_dato(\"nombre\",$linea,\"lineas\"); $i++;\r\n\t$folios[$i] = $defecto; $i++;\t\r\n\t$folios[$i] = get_dato(\"nombre\",$defecto,\"defectos\"); $i++;\t\t\r\n\t$folios[$i] = $causa; $i++;\r\n\t$folios[$i] = get_dato(\"nombre\",$causa,\"causas\"); $i++;\r\n\t$folios[$i] = $codigo_scrap; $i++;\r\n\t$cod_scr = data_cod_scrap($d_pr['nom_pc'], $codigo_scrap);\r\n\t$folios[$i] = $cod_scr['fin']; $i++;\r\n\t$folios[$i] = $cod_scr['rc']; $i++;\r\n\r\n\t//Si aplica la orden OI Especial o se toma de códigos de scrap\r\n\t $s_oi = \"select orden_interna from oi_especial where (id_division='$d_pr[id_d]' or id_division='na') and (id_segmento='$d_pr[id_s]' or \";\r\n $s_oi.= \"id_segmento='na') and (id_pc='$d_pr[id_pc]' or id_pc='na') and (id_proyecto='$d_pr[id_pr]' or id_proyecto='todos') and \";\r\n\t $s_oi.= \"codigo_scrap='$codigo_scrap' and activo='1'\";\r\n\t $r_oi = mysql_query($s_oi);\r\n\t if(mysql_num_rows($r_oi)>0) { \r\n\t\t $d_oi = mysql_fetch_array($r_oi);\r\n\t\t $folios[$i] = $d_oi['orden_interna']; }\r\n\t else { $folios[$i] = $cod_scr['oi']; } $i++;\r\n\r\n\t$folios[$i] = $cod_scr['txs']; $i++;\r\n\t$folios[$i] = $cod_scr['mov']; $i++;\r\n\t$folios[$i] = $id_supervisor; $i++;\r\n\t$folios[$i] = $supervisor; $i++;\r\n\t\t$operador = str_replace(\"/\",\"\",$operador);\r\n\t$folios[$i] = $operador; $i++;\r\n\t$folios[$i] = $no_personal; $i++;\t\t\r\n\tif($info_1=='') { $info_1 = 'NA'; }\r\n\t$folios[$i] = $info_1; $i++;\r\n\t$folios[$i] = $info_2; $i++;\r\n\t$folios[$i] = $o_mantto; $i++;\r\n\t$folios[$i] = $nombre_; $i++;\t\r\n\t\t$comentario = str_replace(\"/\",\"\",$comentario);\r\n\t$folios[$i] = htmlentities($comentario,ENT_QUOTES,\"UTF-8\"); $i++;\r\n\t\t$accion_correctiva = str_replace(\"/\",\"\",$accion_correctiva);\t\r\n\t$folios[$i] = htmlentities($accion_correctiva,ENT_QUOTES,\"UTF-8\"); $i++;\r\n\t$folios[$i] = $vendor; $i++;\r\n\t$folios[$i] = $v_nombre; $i++;\r\n\t\r\n\t$s_1 = \"insert into scrap_folios_tmp values ('',\";\r\n\tfor($i=0;$i<count($folios);$i++) {\r\n\t\t\t$s_1 = $s_1.\"'\".$folios[$i].\"',\"; }\r\n\t$s_1 = substr($s_1,0,-1).\")\";\r\n\t$r_1 = mysql_query($s_1); $i=0;\r\n\r\n\t//Si es un código scrap que tiene financiero en 1\r\n\tif($cod_scr['fin']=='1') { \r\n\t\t$cod_id_area = $area_2; \r\n\t\t$cod_nom_area = get_dato(\"nombre\",$area_2,\"areas\"); \r\n\t\t$cod_id_est = $estacion_2;\r\n\t\t$cod_nom_est = get_dato(\"nombre\",$estacion_2,\"estaciones\");\r\n\t\t$cod_id_linea = $linea_2; \r\n\t\t$cod_nom_linea = get_dato(\"nombre\",$linea_2,\"lineas\");\r\n\t\t$cod_id_def = $defecto_2; \r\n\t\t$cod_nom_def = get_dato(\"nombre\",$defecto_2,\"defectos\"); \t\t\r\n\t\t$cod_id_cau = $causa_2; \r\n\t\t$cod_nom_cau = get_dato(\"nombre\",$causa_2,\"causas\");\r\n\t\r\n\t\t$s_1 = \"insert into scrap_codigos_tmp values('', '$cod_id_area', '$cod_nom_area', '$cod_id_est', '$cod_nom_est', \";\r\n\t\t$s_1.= \"'$cod_id_linea', '$cod_nom_linea', '$cod_id_def', '$cod_nom_def', '$cod_id_cau', '$cod_nom_cau', '$codigo_scrap_2', \";\r\n\t\t$s_1.= \"'$_SESSION[IDEMP]')\"; \r\n\t\t$r_1 = mysql_query($s_1); }\r\n\r\n\tinsert_csv($apd,$proyecto,$codigo_scrap);\t\r\n}", "title": "" }, { "docid": "3666d56da8ae0697fbae39dea628f560", "score": "0.5331595", "text": "public function inserta_equipo($datos, $files){\n\t\t\t//Solo es para acegurarse que se estan enviando los archivos\n\t\t echo \"<pre>\";\n\t\t print_r($datos);\n\t\t print_r($files);\n\t\t echo 'Desde Controller';\n\n\t\t echo \"</pre>\";\n\t\t //die();\n\t\t\t//Conexion con Equipo el cual continene Modelo y Conexion\n\t\t\t//$equipo=new Equipo();\n\n\t\t\t$this->set_nombre($datos['nombre']);\n\t\t\t$this->set_idpais($datos['idpais']);\n\t\t\t$this->set_escudo($files['escudo']);\n\n\t\t\t//Verificar si existen errores\n\t\t\tif(count ($this->errores)>0){\n\t\t\t\t$this->muestra_errores=true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmove_uploaded_file($files['escudo']['tmp_name'], \"../image/\".$files['escudo']['name']);\n\t\t\t\t//Insertar en la Base de datos\n\t\t\t\t$this->inserta($this->get_atributos());\n\t\t\t\techo '<div class=\"alert alert-success\" role=\"alert\">Insercion Correcta</div>';\n\t\t\t\t}\n\t\t\t\t//Detener un script *die();\n\n\t\t\t}", "title": "" }, { "docid": "9a8208478f10844b0d46d85d0a52a425", "score": "0.5330571", "text": "function edition($id = null)\r\n\t{\r\n\t\tif ($this->Auth->user('statut_id') < $this->statuts['admin'])\r\n\t\t{\r\n\t\t\t$this->Session->setFlash('Vous n\\'avez pas le droit d\\'accéder à cette page !', 'message');\r\n\t\t\t$this->redirect($this->referer());\r\n\t\t}\r\n\t\tif(isset($this->data))\r\n\t\t{\r\n\t\t\tif (empty($this->data['Personne']['id']))\r\n\t\t\t\t$this->data['Personne']['last_login'] = date('Y-m-d H:i:s');\r\n\t\t\t$this->Personne->set($this->data);\r\n\t\t\tif ($this->Personne->validates()) \r\n\t\t\t{\r\n\t\t\t\tif (empty($this->data['Personne']['id']))\r\n\t\t\t\t{\r\n\t\t\t\t\t$mdp = '';\r\n\t\t\t\t\t$caracteres = array_rand($this->caracteres, 8);\r\n\t\t\t\t\tforeach($caracteres as $i)\r\n\t\t\t\t\t\t$mdp .= $this->caracteres[$i];\r\n\t\t\t\t\t$this->data['Personne']['mot_de_passe'] = $this->Auth->password($mdp);\r\n\t\t\t\t\t$pers = ucwords($this->data['Personne']['prenom']).' '.strtoupper($this->data['Personne']['nom']).':';\r\n\t\t\t\t\t$pers.= $mdp.':'.$this->data['Personne']['login'].\"\\n\";\r\n\t\t\t\t\t$f = fopen(WWW_ROOT.'files/groupes/'.$this->data['Personne']['groupe_id'].'.txt', 'a');\r\n\t\t\t\t\tif ($f === false)\r\n\t\t\t\t\t\t$this->Session->setFlash('Le fichier n\\'a pas pût être ouvert ou créé, réessayez', 'message');\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfwrite($f, $pers);\r\n\t\t\t\t\t\tfclose($f);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$this->Personne->set($this->data);\r\n\t\t\t\t$this->Personne->save();\r\n\t\t\t\t$this->Session->setFlash('Modifications enregistrées.', 'message', array('class' => 'success'));\r\n\t\t\t\t$this->redirect(array('controller' => 'groupes', 'action' => 'index', $this->data['Personne']['groupe_id']));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->Session->setFlash('Le formulaire comporte des erreurs !', 'message');\t\r\n\t\t\t\t$this->data['Personne']['mot_de_passe'] = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->Personne->recursive = -1;\r\n\t\t\t$this->data = $this->Personne->findById($id);\r\n\t\t\tif (empty($this->data) AND !is_null($id))\r\n\t\t\t\t$this->redirect(array('action' => 'edition', $this->Auth->user('id')));\r\n\t\t}\r\n\t\t$d['depts'] = $this->Personne->Departement->find('list');\r\n\t\t$d['statuts'] = $this->Statut->find('list');\r\n\t\t$d['groupes'] = $this->Personne->Groupe->getGroupeList(true);\r\n\t\t$this->set($d);\r\n\t}", "title": "" }, { "docid": "4cba19faaf5decba430d62eb56227a01", "score": "0.53304", "text": "public function insertMedicoCompleto(string $nome, string $senha, string $cpf, string $especialidade, string $planoDeSaude, string $dtNascimento=null, string $endereco=null, string $telefone=null, string $email=null) {\n\t\t$tablePath = $this->tablePathMedico;\n\t\t$domXML = new DOMDocument('1.0');\n\t\t$domXML->preserveWhiteSpace = false;\n\t\t$domXML->formatOutput = true;\n\t\tif ($domXML->load($tablePath)) {\n\t\t\t//echo \"segue o baile\\n\";\n\t\t}else {\n\t\t\techo \"\\n\\nTabela '\". $tablePath.\"' não encontrada.\\nCriando tabela...\\n\\n\";\n\t\t\tif( createTableMedico($tablePath) ) exit(\"ERRO ao criar a tabela\");\n\t\t\telse echo \"\\nTabela '\".$tablePath. \"' criada com sucesso!\\n\";\n\t\t\t$domXML->load($tablePath);\n\t\t}\n\t\t$root = $domXML->getElementsByTagName('root')->item(0);\n\t\t// busca o primeiro espaco vazio\n\t\t$domPosition = lMedico::buscaEspacoVazio($domXML);\n\t\t//Extrai o codigo e transforma em int\n\t\t$strCodigo = $domPosition->firstChild->nodeValue;\n\t\t$strCodigo = substr($strCodigo, 1);\n\t\t$intCodigo = intval($strCodigo);\n\t\t$Medico = $domXML->createElement('medico');\n\t\tif ($this->semEspaco) {\n\t\t\t$codigo = \"M\".sprintf('%04d', $intCodigo + 1);\n\t\t\t$root->appendChild($Medico);\n\t\t}else {\n\t\t\t$codigo = \"M\".sprintf('%04d', $intCodigo - 1);\n\t\t\t$root->insertBefore($Medico, $domPosition);\n\t\t}\n\t\t// ******* Inserção do Código *******\n\t\t$codigoElement = $domXML->createElement(\"codigo\", $codigo);\n\t\t$Medico->appendChild($codigoElement);\n\t\t// ******* Inserção do Nome *******\n\t\tif($nome == null) {\n\t\t\treturn \"ERRO: Campo 'Nome' é obrigatório.\";\n\t\t}\n\t\t$nomeElement = $domXML->createElement(\"nome\", $nome);\n\t\t$Medico->appendChild($nomeElement);\n\t\t// ******* Inserção da Senha *******\n\t\tif($senha == null) {\n\t\t\treturn \"ERRO: Campo 'Senha' é obrigatório.\";\n\t\t}\n\t\t$senhaElement = $domXML->createElement(\"senha\", $senha);\n\t\t$Medico->appendChild($senhaElement);\n\t\t// ******* Inserção do CPF *******\n\t\tif($cpf == null) {\n\t\t\treturn \"ERRO: Campo 'CPF' é obrigatório.\";\n\t\t}\n\t\tif($this->verificaCPFMedico($cpf)){\n\t\t\treturn \"ERRO: Este CPF já está cadastrado.\";\n\t\t}\n\t\t$cpfElement = $domXML->createElement(\"cpf\", $cpf);\n\t\t$Medico->appendChild($cpfElement);\n\t\t// ******* Inserção da Especialidade *******\n\t\tif($especialidade == null) {\n\t\t\treturn \"ERRO: Campo 'Especialidade' é obrigatório.\";\n\t\t}\n\t\t$especialidadeElement = $domXML->createElement(\"especialidade\", $especialidade);\n\t\t$Medico->appendChild($especialidadeElement);\n\t\t// ******* Inserção do Plano de Saude *******\n\t\tif($planoDeSaude == null) {\n\t\t\treturn \"ERRO: Campo 'Plano de Saúde' é obrigatório.\";\n\t\t}\n\t\t$planoDeSaudeElement = $domXML->createElement(\"planoDeSaude\", $planoDeSaude);\n\t\t$Medico->appendChild($planoDeSaudeElement);\n\t\t// ******* Inserção da Data de Nascimento *******\n\t\tif($dtNascimento == null) {\n\t\t\t$dtNascimento = \"1900-01-01\"; // Data default\n\t\t}\n\t\t$dtNascimentoElement = $domXML->createElement(\"dtNascimento\", $dtNascimento);\n\t\t$Medico->appendChild($dtNascimentoElement);\n\t\t// ******* Inserção do Endereço *******\n\t\tif($endereco == null) {\n\t\t\t$endereco = \"(sem endereço)\";\n\t\t}\n\t\t$enderecoElement = $domXML->createElement(\"endereco\", $endereco);\n\t\t$Medico->appendChild($enderecoElement);\n\t\t// ******* Inserção do Telefone *******\n\t\tif($telefone == null) {\n\t\t\t$telefone = \"(sem telefone)\";\n\t\t}\n\t\t$telefoneElement = $domXML->createElement(\"telefone\", $telefone);\n\t\t$Medico->appendChild($telefoneElement);\n\t\t// ******* Inserção do E-mail *******\n\t\tif($email == null) {\n\t\t\t$email = \"(sem E-mail)\";\n\t\t}\n\t\t$emailElement = $domXML->createElement(\"email\", $email);\n\t\t$Medico->appendChild($emailElement);\n\t\t// ******* Inserção da Data de Registro no Sitema *******\n\t\t$reg_dateElement = $domXML->createElement(\"reg_date\", date(\"Y-m-d H:i:s\",time()));\n\t\t$Medico->appendChild($reg_dateElement);\n\t\tif($domXML->save($tablePath)) {\n\t\t\treturn \"Inserção realizada com sucesso!\";\n\t\t}else {\n\t\t\treturn \"Erro ao inserir registro de Medico.\";\n\t\t}\n\t}", "title": "" }, { "docid": "a1c31bff16f16b6f0f861ad9adc9394a", "score": "0.53283423", "text": "function save()\n {\n $statement = $GLOBALS['DB']->query(\"INSERT INTO categories (name) VALUES ('{$this->getName()}') RETURNING id;\");\n $result = $statement->fetch(PDO::FETCH_ASSOC);\n $this->setId($result['id']);\n }", "title": "" }, { "docid": "66e0b15028530477aa2acc9ff0945fd7", "score": "0.53283393", "text": "private function create(){\n\t\t\t\n\t\t$keys = '';\n\t\t$values = '';\n\t\t\n\t\tforeach($_POST as $k=>$v){\n\t\t\t\n\t\t\t$k = str_replace('new', '', $k);\t\t\t\n\t\t\t\n\t\t\t$keys .= \"`\".$k.\"`,\";\n\t\t\t\n\t\t\t//encapsulate strs only with quotes.\n\t\t\t$values .= (is_int($v) ? $v .\",\" : \"'\".$v.\"',\");\t\t\t\n\t\t\t\n\t\t}\t\t\t\n\t\t\t\n\t\t//remove trailing comma's\n\t\t$keys = rtrim($keys, ',');\n\t\t$values = rtrim($values, ',');\n\t\t\n\t\t$stmt = $this->pdo->prepare(\"INSERT INTO directory (\".$keys.\") VALUES(\".$values.\")\");\t\t\n\t\t\n\t\tif( $stmt->execute() ) {\n\t\t\t$insertedID = $this->pdo->lastInsertId ( );\n\t\t\texit( json_encode( array(\"msg\" => $_POST['newname'] . ' Successfully Created.', \"id\" => $insertedID) ));\n\t\n\t\t} else {\n\t\t\t\n\t\t\texit(json_encode( array(\"msg\" =>'Failed to Create Record for '.$_POST['newname'])) );\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "993867680d3325a42e74ff2d6afbf2f7", "score": "0.532815", "text": "function saveSelfie() {\n // with a random alphanumeric (URL\n // friendly) string as its' name,\n // then return its' path.\n //\n // Also append the file extension so we\n // know whether its' a jpeg or png.\n //\n $localSelfieFileName = \"Assets/Selfies/\" . md5(uniqid(rand(), true)) . \".\" . strtolower(pathinfo($_FILES[\"selfie\"][\"name\"], PATHINFO_EXTENSION));\n move_uploaded_file($_FILES[\"selfie\"][\"tmp_name\"], $localSelfieFileName);\n return $localSelfieFileName;\n }", "title": "" }, { "docid": "363885f70d439baa79de90eca6794236", "score": "0.5327002", "text": "public function store(){\n $validateInfo = $this->validate([\n 'titre'=>'required',\n 'descri'=>'required'\n ]);\n $this->validate([\n 'photo'=>'required'\n ]);\n $record = infoHeader::create($validateInfo);\n $this->photo->storePubliclyAs('public/headerInfo/', $record->id.'.png');\n //$this->photos[$index]->storePubliclyAs('public/galleries/', $data->id.'.png' );\n session()->flash('message', 'Info entete enregistré avec succès');\n $this->emit('Added');\n $this->dispatchBrowserEvent('Added');\n $this->resetFields();\n }", "title": "" }, { "docid": "e32d06b7c0a98b0337ec6b256914abde", "score": "0.53161025", "text": "function saveAction(){\r\n\t\t$iddiv= $this->_request->getParam('iddiv');\r\n\t\t$type = $this->_request->getParam('type');\r\n\t\t$version = $this->_request->getParam('version');\r\n\t\t$idDuthao = $this->_request->getParam('idDuthao');\r\n\t\t$idHSCV = $this->_request->getParam('idHSCV');\r\n\t\t$year = QLVBDHCommon::getYear(); //nam cua bang du lieu\r\n\t\t$idPBDuthao = $this->_request->getParam('idPBDuthao');\t\t\r\n\t\tglobal $auth;\r\n\t\t$user = $auth->getIdentity();\r\n\t\tif(!$idPBDuthao){\r\n\t\t\t$idPBDuthao = 0;\r\n\t\t}\r\n\t\tif(!$type)\r\n\t\t\t$type = -1;\r\n\t\tif(!$year)\r\n\t\t\t$year = $date['year'];\t\t\r\n\t\t$idObject = $this->_request->getParam('idObject');//id cua doi tuong chua file dinh kem\r\n\t\tif(!$idObject)\r\n\t\t\t$idObject = 0;\r\n\t\t$isTemp = $this->_request->getParam('isTemp');\r\n\t\tif(!$isTemp)\r\n\t\t\t$isTemp = 0;\r\n\t\t//$idOld = $this->_request->getParam('idOldFile');\r\n\t\t//tao cac lop model tuong ung\r\n\t\t//$fdk = new filedinhkemModel($year);\t\t\r\n\t\t//Cap nhat file dinh kem (them file moi, xoa file cu) \r\n\t\tif($idPBDuthao !=0){\r\n\t\t$re = filedinhkemModel::insertFile($idPBDuthao,$isTemp,$iddiv,$year,$type);\r\n\t\t}\r\n\t\t//if($re != -1){\r\n\t\t//\tif($idOld>0)\r\n\t\t//\t\t$fdk->deleteFile($idOld);\t\r\n\t\t//}\r\n\t\t//doan js cap nhat lai danh sach cac van ban du thao\r\n\t\techo \"<script>window.parent.loadDivFromUrl('PhienBanDiv\".$idPBDuthao.\"_\".$idDuthao.\"','/hscv/PhienBanFIle?year=\".$year.\"&idPBDuthao=\".$idPBDuthao.\"&idDuthao=\".$idDuthao.\"&idHSCV=\".$idHSCV.\"',1);\t\t\r\n\t\t</script>\";\t\r\n\t\texit; //khong xu dung lop view\r\n\t}", "title": "" }, { "docid": "1075e29f6c2ab5f1275e2971ff8f4701", "score": "0.5314989", "text": "public function edit($data){\n\t $id = $data['id_usuario'];\n\t unset($data['id_usuario']);\n\t\t$user = $this->get($id);\n\t\t\n if( $data['clave'] != null){\n $data['clave'] = $this->encrypt($data['clave'],$user->salt);\n }else{\n unset($data['clave']);\n\t\t\t}\n\n foreach($data as $key => $value){\n if($value != null && $key!= 'perfil'){\n\t\t\t\t\t$columns[]=$key.\" = '\".$value.\"'\";\n\t\t\t\t\t$sql = \"UPDATE usuarios SET \".implode(',',$columns).\" WHERE id_usuario = \".$id;\n \n\t\t\t\t\t$this->con->exec($sql);\n }\n\t\t\t}\n\t\t\t \n\t\t\t \n\t\t\t$sql = 'DELETE FROM usuarios_perfiles WHERE usuario_id = '.$id;\n\t\t\t$this->con->exec($sql);\n\t\t\t\n\t\t\t$sql = '';\n\t\t\tif(!empty($data['perfil'])){\n\t\t\t\n\t\t\t\tforeach($data['perfil'] as $perfil){\n\t\t\t\t\t$sql .= 'INSERT INTO usuarios_perfiles(usuario_id,perfil_id) \n\t\t\t\t\t\t\t\tVALUES ('.$id.','.$perfil.');';\n\t\t\t\t}\n\t\t\t\t $this->con->exec($sql);\n\t\t\t}\n\t\t\t\n\t}", "title": "" }, { "docid": "4614e36071cefbf1e1f46bc1d861a2bf", "score": "0.5311272", "text": "function save()\n {\n $statement = $GLOBALS['DB']->query(\"INSERT INTO brands (name) VALUES ('{$this->getName()}') RETURNING id;\");\n $result = $statement->fetch(PDO::FETCH_ASSOC);\n $this->setId($result['id']);\n }", "title": "" }, { "docid": "7a05dc9f484b9b73f2f400be5db9d136", "score": "0.53106165", "text": "function insertar_personal($nombre, $telefono, $correo, $password, $puesto, $rol, $fechai, $fechaf) {\n \n $conexion_bd = conectar();\n // INSERT INTO `personal` (`IdPersonal`, `NombrePersonal`, `TelefonoPersonal`, `CorreoPersonal`, `Privilegio`, `FechaInicioLaboral`, `Contrato`, `Respaldo`) VALUES (NULL, 'Sebas', '9678523', '[email protected]', '3', '12/10/20', NULL, NULL); `FechaInicioLaboral`, `FechaFinLaboral` , ?, ? , $_POST['fechaicolab'], $_POST['fechafcolab']$fechaicolab, $fechafcolab\n $consulta = \"INSERT INTO `personal` (`NombrePersonal`, `TelefonoPersonal`, `CorreoPersonal`, `ContrasenaPersonal`, `PuestoPersonal`,`RolPersonal`,`FechaInicioLaboral`, `FechaFinLaboral`) VALUES (?, ?, ? , ?, ?, ?, ?, ?)\";\n \n if(!($statement = $conexion_bd->prepare($consulta))) {\n die(\"Error(\".$conexion_bd->errno.\"): \".$conexion_bd->error);\n }\n \n if(!($statement->bind_param(\"ssssssss\",$nombre, $telefono, $correo, $password, $puesto, $rol, $fechai, $fechaf))) {\n die(\"Error de vinculación(\".$statement->errno.\"): \".$statement->error);\n }\n \n if(!$statement->execute()) {\n die(\"Error en ejecución de la consulta(\".$statement->errno.\"): \".$statement->error);\n }\n \n desconectar($conexion_bd);\n}", "title": "" }, { "docid": "4b18180b6a34ecb6ae1f2970f1ad1a0f", "score": "0.5309579", "text": "public function marcas_inserir($nome){\r\n global $config;\r\n\r\n $this->db->query('INSERT INTO '.MYSQL_USUARIO_VEICULO_MARCAS.' (nome,criacao_user,criacao_data) VALUES (\\''.$nome.'\\',\\''.\\Framework\\App\\Acl::Usuario_GetID_Static().'\\',\\''.APP_HORA.'\\')');\r\n return 1;\r\n }", "title": "" }, { "docid": "01d95e2ad2592a6d112614805071e613", "score": "0.53090346", "text": "function insert_new_file( $username, $path, $name, $type )\n{\n try {\n require_once \"config.php\";\n\n $connection = new PDO( \"mysql:host=\".DBHOST.\";dbname=\".DBNAME, DBUSER, DBPASS );\n $statement = $connection -> prepare( \"INSERT INTO file (username,path,name,format) VALUES (:username,:path,:name,:format)\" );\n $statement -> execute( array(\n 'username' => $username,\n 'path' => $path,\n 'name' => $name,\n 'format' => $type ) );\n\n $statement = null;\n }\n catch( PDOException $e ) {\n include \"error_message.inc\";\n exit;\n }\n}", "title": "" }, { "docid": "937643193b22aa66168b2d32b6898716", "score": "0.53082645", "text": "static public function ctrEditarEncargado(){\n\n\t\tif (isset($_POST['editAttendant'])) {\n\t\t\tif (preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"newName\"])) {\n\t\t\t \t/*======================================\n\t\t\t \t= Validar Imagen =\n\t\t\t \t======================================*/\n\t\t\t \t$ruta=$_POST['lastPhoto'];\n\t\t\t \tif (isset($_FILES['photo']['tmp_name']) && !empty($_FILES['photo']['tmp_name'])) {\n\t\t\t \t\tlist($ancho,$alto) = getimagesize($_FILES['photo']['tmp_name']);\n\t\t\t \t\t$nuevoAncho = 500;\n\t\t\t \t\t$nuevoAlto = 500;\n\t\t\t \t\t/*==========================================\n\t\t\t \t\t= CREANDO DIRECTORIO =\n\t\t\t \t\t==========================================*/\n\t\t\t \t\t$directorio = \"Views/img/encargados/\".$_POST['newUsername'];\n\t\t\t \t\tif (!empty($_POST['lastPhoto'])) {\n\t\t\t \t\t\tunlink($_POST['lastPhoto']);\n\t\t\t \t\t}else{\n\t\t\t \t\t\tmkdir($directorio,0755);\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= Funciones defecto PHP dependiendo de tipo de imagen =\n\t\t\t \t\t===========================================================================*/\n\t\t\t \t\tswitch ($_FILES['photo']['type']) {\n\t\t\t \t\t\tcase 'image/jpeg':\n\t\t\t \t\t\t\t$preruta = date('Y-m-d_his');\n\t\t\t \t\t\t\t$preruta = (string)$preruta;\n\t\t\t \t\t\t\t$ruta = $directorio.'/'.$_POST['newUsername'].'_'.$preruta.'.jpg';\n\t\t\t \t\t\t\t$origen = imagecreatefromjpeg($_FILES['photo']['tmp_name']);\n\t\t\t \t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\t\t\t \t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\t\t\t \t\t\t\timagejpeg($destino,$ruta);\n\t\t\t \t\t\t\tbreak;\n\t\t\t \t\t\tcase 'image/png':\n\t\t\t \t\t\t\t$preruta = date('Y-m-d_his');\n\t\t\t \t\t\t\t$preruta = (string)$preruta;\n\t\t\t \t\t\t\t$ruta = $directorio.'/'.$_POST['newUsername'].'_'.$preruta.'.png';\n\t\t\t \t\t\t\t$origen = imagecreatefrompng($_FILES['photo']['tmp_name']);\n\t\t\t \t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\t\t\t \t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\t\t\t \t\t\t\timagepng($destino,$ruta);\n\t\t\t \t\t\t\tbreak;\n\t\t\t \t\t\tdefault:\n\t\t\t \t\t\t\t# code...\n\t\t\t \t\t\t\tbreak;\n\t\t\t \t\t}\n\t\t\t \t\t\n\t\t\t \t\t\n\t\t\t \t}\n\t\t\t\t$answer = adminph\\Attendant::where('username',$_POST['newUsername'])->first();\n\t\t\t \tif ($_POST['newPassword'] != \"\") {\n\t\t\t \t\t$password = password_hash($_POST[\"newPassword\"], PASSWORD_DEFAULT);\n\t\t\t \t}else{\n\t\t\t \t\t$password=$_POST['password'];\n\t\t\t \t}\n\t\t\t \t$answer->property_id = $_POST['newPropertyId'];\n\t\t\t \t$answer->organization_id = $_POST['newOrganizationId'];\n\t\t\t \t$answer->name = $_POST['newName'];\n\t\t\t \t$answer->id_type = $_POST['newIdType'];\n\t\t\t \t$answer->id_number = $_POST['newIdNumber'];\n\t\t\t \t$answer->phone = $_POST['newPhone'];\n\t\t\t \t$answer->email = $_POST['newEmail'];\n\t\t\t \t$answer->address = $_POST['newAddress'];\n\t\t\t \t$answer->username = $_POST['newUsername'];\n\t\t\t \t$answer->password = $password;\n\t\t\t \t$answer->photo = $ruta;\n\t\t\t if ($answer->save()) {\n\t\t\t \treturn redirect('encargados');\t\t\t }\n\t\t\t } else {\n\t\t\t \treturn view('layouts.attendants_error');\n\t\t\t }\n\t\t}\n\n\t}", "title": "" }, { "docid": "af900ed9b6676471ab2b29c113c23862", "score": "0.5298994", "text": "function armarAvatar($imagen){\r\n //recupero nombre y extension\r\n $nombre = $imagen['avatar']['name'];\r\n $ext = pathinfo($nombre,PATHINFO_EXTENSION);\r\n //Este es el archivo fisico\r\n $archivoOrigen = $imagen['avatar']['tmp_name'];\r\n //Establesco carpeta destino y complemento un id aleatorio unico para guardarlo\r\n $archivoDestino = dirname(__DIR__); \r\n $archivoDestino = $archivoDestino.\"/imagenes/\";\r\n $avatar = uniqid();\r\n $archivoDestino = $archivoDestino.$avatar.\".\".$ext;\r\n //Copio al servidor el archivo\r\n move_uploaded_file($archivoOrigen,$archivoDestino);\r\n //Devuelvo el nombre con el cual almacene el avatar y su extension\r\n $avatar = $avatar.\".\".$ext;\r\n return $avatar;\r\n}", "title": "" }, { "docid": "14a05a6b06f5bd1080236b9133f7adf6", "score": "0.5297943", "text": "public function guardar()\n {\n if ($_FILES['foto']['name'] != \"\"):\n $archivo = $_FILES['foto']['name'];\n $ex = explode('.', $archivo);\n $ex = $ex[1]; // Extencion\n $archivo = $this->input->post('cedula') . \".\" . $ex;\n $ruta = getcwd(); // Obtiene el directorio actual en donde se esta trabajando\n //echo $ruta;\n move_uploaded_file($_FILES['foto']['tmp_name'], $ruta . \"/assets/foto/usuario/\" . $archivo);\n $array['foto'] = $archivo;\n endif;\n\n # Validacion los distintos acceso de usuarios\n if ($this->input->post('is_active') == '') {\n $is_active = 'False';\n } else {\n $is_active = 'True';\n }\n\n if ($this->input->post('is_superuser') == '') {\n $is_superuser = 'False';\n } else {\n $is_superuser = 'True';\n }\n\n if ($this->input->post('is_staff') == '') {\n $is_staff = 'False';\n } else {\n $is_staff = 'True';\n }\n\n\n $array['password'] = 'pbkdf2_sha256$12000$' . hash(\"sha256\", $this->input->post('password'));\n $array['is_superuser'] = $is_superuser;\n $array['username'] = $this->input->post('username');\n $array['first_name'] = $this->input->post('first_name');\n $array['ente'] = $this->input->post('ente');\n $array['cedula'] = $this->input->post('cedula');\n $array['is_staff'] = $is_staff;\n $array['is_active'] = $is_active;\n\n\n if ($this->input->post('id') == '') {\n\n $this->ModelUser->insertar($array);\n } else {\n $id = $this->input->post('id');\n $this->ModelUser->actualizar($id, $array);\n }\n }", "title": "" }, { "docid": "da60de2b5f0b3420c42f3dcb32b60382", "score": "0.52978075", "text": "static public function ctrCrearEncargado(){\n\n\t\tif (isset($_POST['newAttendant'])) {\n\t\t\tif (preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"newName\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9 ]+$/', $_POST[\"newUsername\"])) {\n\t\t\t \t/*======================================\n\t\t\t \t= Validar Imagen =\n\t\t\t \t======================================*/\n\t\t\t \t$ruta=\"\";\n\t\t\t \tif (isset($_FILES['photo']['tmp_name']) && !empty($_FILES['photo']['tmp_name'])) {\n\t\t\t \t\tlist($ancho,$alto) = getimagesize($_FILES['photo']['tmp_name']);\n\t\t\t \t\t$nuevoAncho = 500;\n\t\t\t \t\t$nuevoAlto = 500;\n\t\t\t \t\t/*==========================================\n\t\t\t \t\t= CREANDO DIRECTORIO =\n\t\t\t \t\t==========================================*/\n\t\t\t \t\t$directorio = \"Views/img/encargados/\".$_POST['newUsername'];\n\t\t\t \t\tmkdir($directorio,0755);\n\t\t\t \t\t/*===========================================================================\n\t\t\t \t\t= Funciones defecto PHP dependiendo de tipo de imagen =\n\t\t\t \t\t===========================================================================*/\n\t\t\t \t\tswitch ($_FILES['photo']['type']) {\n\t\t\t \t\t\tcase 'image/jpeg':\n\t\t\t \t\t\t\t$preruta = date('Y-m-d_his');\n\t\t\t \t\t\t\t$preruta = (string)$preruta;\n\t\t\t \t\t\t\t$ruta = $directorio.'/'.$_POST['newUsername'].'_'.$preruta.'.jpg';\n\t\t\t \t\t\t\t$origen = imagecreatefromjpeg($_FILES['photo']['tmp_name']);\n\t\t\t \t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\t\t\t \t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\t\t\t \t\t\t\timagejpeg($destino,$ruta);\n\t\t\t \t\t\t\tbreak;\n\t\t\t \t\t\tcase 'image/png':\n\t\t\t \t\t\t\t$preruta = date('Y-m-d_his');\n\t\t\t \t\t\t\t$preruta = (string)$preruta;\n\t\t\t \t\t\t\t$ruta = $directorio.'/'.$_POST['newUsername'].'_'.$preruta.'.png';\n\t\t\t \t\t\t\t$origen = imagecreatefrompng($_FILES['photo']['tmp_name']);\n\t\t\t \t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\t\t\t \t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\t\t\t \t\t\t\timagepng($destino,$ruta);\n\t\t\t \t\t\t\tbreak;\n\t\t\t \t\t\tdefault:\n\t\t\t \t\t\t\t# code...\n\t\t\t \t\t\t\tbreak;\n\t\t\t \t\t}\n\t\t\t \t\t\n\t\t\t \t\t\n\t\t\t \t}\n\t\t\t \t$answer = new adminph\\Attendant();\n\t\t\t \t$answer->property_id = $_POST['newPropertyId'];\n\t\t\t \t$answer->organization_id = $_POST['newOrganizationId'];\n\t\t\t \t$answer->name = $_POST['newName'];\n\t\t\t \t$answer->id_type = $_POST['newIdType'];\n\t\t\t \t$answer->id_number = $_POST['newIdNumber'];\n\t\t\t \t$answer->phone = $_POST['newPhone'];\n\t\t\t \t$answer->email = $_POST['newEmail'];\n\t\t\t \t$answer->address = $_POST['newAddress'];\n\t\t\t \t$answer->username = $_POST['newUsername'];\n\t\t\t \t$answer->password = password_hash($_POST[\"newPassword\"], PASSWORD_DEFAULT);\n\t\t\t \t$answer->photo = $ruta;\n\t\t\t if ($answer->save()) {\n\t\t\t \treturn redirect('encargados');\n\t\t\t }\n\t\t\t } else {\n\t\t\t \treturn view('layouts.attendants_error');\n\t\t\t }\n\t\t}\n\n\t}", "title": "" }, { "docid": "7052984f12b3032e1b3f70a2a0326d28", "score": "0.52962524", "text": "function insertar($modulo, $tipo, $id){\n //Se prepara el arreglo con los datos a insertar\n\n $datos = array(\n 'Fk_Id_Auditoria_Tipo' => $tipo,\n 'Fk_Id_Modulo' => $modulo,\n 'Fk_Id_Usuario' => $this->session->userdata('Pk_Id_Usuario'),\n 'Id' => $id\n );\n\n $this->db->insert('auditoria', $datos);\n }", "title": "" }, { "docid": "2439e2f34806362e646459ba021b7caa", "score": "0.5295385", "text": "public function addJugador() {\n // barrera de administradores\n $this->authHelper->checkLoggedAdmin();\n $nombre = $_POST['nombre'];\n $posicion = $_POST['posicion'];\n $idEquipo = $_POST['id_equipo']; \n\n if(!empty($nombre) && !empty($posicion) && is_numeric($idEquipo)){\n $agregar = true;\n \n if($agregar){\n if ($_FILES['input_name']['type'] == \"image/jpg\" || $_FILES['input_name']['type'] == \"image/jpeg\" || $_FILES['input_name']['type'] == \"image/png\" ) {\n $this->model->save($nombre, $idEquipo, $posicion, $_FILES['input_name']);\n }else{\n $this->model->save($nombre, $idEquipo, $posicion);\n }\n }\n header(\"Location: \" . BASE_URL . \"verJugadores\");\n }\n else{\n $this->view->showError(\"Faltan datos obligatorios\");\n }\n \n }", "title": "" }, { "docid": "9af8a2564d516f75cc2339653c8ae198", "score": "0.5292591", "text": "function registreer()\n {\n $persoon = new stdClass();\n\n $persoon->id = $this->input->post('id');\n $persoon->voornaam = html_escape($this->input->post('voornaam'));\n $persoon->familienaam = html_escape($this->input->post('familienaam'));\n $persoon->straat = html_escape($this->input->post('straat'));\n $persoon->nummer = html_escape($this->input->post('nummer'));\n $persoon->mailadres = html_escape($this->input->post('mailadres'));\n $persoon->gsmnummer = html_escape($this->input->post('gsmnummer'));\n $persoon->woonplaats = html_escape($this->input->post('gemeente'));\n $persoon->postcode = html_escape($this->input->post('postcode'));\n $persoon->biografie = html_escape($this->input->post('biografie'));\n $fotonaam = html_escape(str_replace(' ', '', $persoon->voornaam . $persoon->familienaam . '.jpg'));\n $persoon->foto = $fotonaam;\n\n $config['upload_path'] = './resources/img/personen/';\n $config['allowed_types'] = 'jpg';\n $config['max_size'] = 2000;\n $config['file_name'] = $fotonaam;\n $config['overwrite'] = TRUE;\n\n $this->load->library('upload', $config);\n\n if (!$this->upload->do_upload('foto')) {\n $error = array('error' => $this->upload->display_errors());\n }\n\n $this->load->model('persoon_model');\n\n if ($persoon->id == 0) {\n $this->persoon_model->insert($persoon);\n } else {\n $this->persoon_model->update($persoon);\n }\n if ($persoon->typePersoonId == 1) {\n redirect('trainer/home');\n } else {\n redirect('zwemmer/home');\n }\n }", "title": "" }, { "docid": "42ab9972337c49ce6c0e1e5df737d8d5", "score": "0.5290076", "text": "function save_file($artikel){\n //membuat file\n $fh =fopen(\"kategori.txt\",'w+') or die(\"file gagal dibuat\");\n// file_put_contents(\"artikel.php\",implode($artikel));\n $pre = <<<_END\n <?php\n #kategoris =\n_END;\n $pre = str_replace(\"#\",\"$\",$pre);\n $pra = <<<_END\n \n ?>\n_END;\n $isi = var_export($artikel,true);\n $text = $pre . $isi . $pra;\n fwrite($fh,$text) or die(\"file gagal disimpan\"); //menyimpan file\n fclose($fh);\n copy(\"kategoris.txt\",\"./kategoris.php\"); //mengganti nama file\n}", "title": "" }, { "docid": "a9197fe36d13447a22da0a216df71bf1", "score": "0.5289228", "text": "function add()\r\n {\r\n \t//$this->con->debug=true;\r\n \t$this->setear();\r\n \t$insertado=$this->validar();\t\r\n\tif(!$insertado)\r\n\t{\r\n\t $sql=\"insert into dp_documentacion\"\r\n\t\t\t.\" (datpro_id,tipdoc_codigo,doc_codigosis,doc_nombre,\"\r\n\t\t\t.\"doc_path)\"\r\n\t\t\t.\" values (\"\r\n\t\t\t.\"$this->datpro_id,$this->tipdoc_codigo,'$this->doc_codigosis','$this->doc_nombre',\"\r\n\t\t\t.\"'$this->doc_path')\";\r\n\t $rs = &$this->con->Execute($sql);\r\n\t if($rs)\r\n\t {\r\n\t //recuperar el id del dp_documentaciones insertado, doc_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": "9cb877ed3f012818d76a3108e2a87a4c", "score": "0.5285785", "text": "public static function Modificar($obj,$FileKey=NULL,$stringNameAndPathArchivoBD=NULL,$separadorDeCampos=NULL)\r\n\t{\r\n\t\tif( !is_a($obj,\"Usuario\") ) { return Usuario::Retorno(FALSE, \"Error\"); } // Si el objeto no es del tipo que necesito salgo y retorno \"Falso\"\r\n\r\n\t\t//Verifico que esté ingresado:\r\n\t\t$retorno = Usuario::BuscarPorId($obj->GetEmail(), $stringNameAndPathArchivoBD, $separadorDeCampos);\r\n\t\tif($retorno[\"Exito\"] == FALSE) // Si no se encontró salgo y retorno \"Falso\".\r\n\t\t{\r\n\t\t\t$retorno[\"Mensaje\"] = \"Imposible modificar Usuario. No se ha podido encontrar en los registros. \\n\";\r\n\t\t\treturn $retorno;\r\n\t\t}\r\n\r\n//\t\t$pathArchivoAborrar = ($retorno[\"Registros\"][ $retorno[\"Indice\"] ])->GetFoto(); //guardo el path del archivo asociado a borrar\r\n\t\t$ListaDeRegistrosLeidos = $retorno[\"Registros\"];\r\n\t\t$ListaDeRegistrosLeidos[ $retorno[\"Indice\"] ] = $obj; //donde estaba el registro a modificar guardo el registro ya modificado\r\n\r\n/*\t\t// Borro el anterior archivo asociado al objeto Usuario: \r\n\t\t$retorno = Archivo::Borrar($pathArchivoAborrar);\r\n\t\t// Subo el nuevo archivo asociado al objeto Usuario: \r\n\t\t$retorno = Archivo::Subir($obj->GetFoto(),$FileKey);\r\n*/\r\n\t\tif ( $retorno[\"Exito\"] )\r\n\t\t{\r\n\t\t\t$exito = Usuario::ActualizarArchivoDB($ListaDeRegistrosLeidos,\"w\",$stringNameAndPathArchivoBD,$separadorDeCampos);\r\n\t\t\t$retorno = Usuario::Retorno($exito, \"Modificar\", $retorno[\"Mensaje\"] );\r\n\t\t}\r\n\t\treturn $retorno;\r\n\t}", "title": "" }, { "docid": "b985d68624ce2f1bfffe2d75beaba601", "score": "0.52851117", "text": "function insertar($rut, $verificador , $nombre , $paterno ,\n $materno , $fecha_nacimiento , $fijo , $movil , $nacionalidad ,\n $profesion ){\n // . \"rut, verificador, nombre, paterno, materno, fecha_nacimiento, fijo, movil, nacionalidad, profesion ) \"\n // $my = new MySQL();\n $result = $this->database->consulta(\"INSERT INTO paciente( \"\n . \"identificador, dverificador,nombre_paciente, apellido_ppaciente, apellido_mpaciente, \"\n . \"fecha_nacimiento ,fono_paciente , fonoPaciente2,nacionalidad, profesion ) \"\n . \"VALUES \"\n . \"('$rut' ,'$verificador', '$nombre', '$paterno', '$materno', '$fecha_nacimiento', '$fijo',\"\n . \" '$movil', '$nacionalidad', '$profesion' )\");\n // $this->setid_paciente(mysql_insert_id());\n $this->id_paciente = mysql_insert_id();\n\n}", "title": "" }, { "docid": "855996af2f66a0cfbb7ea17b81c2af65", "score": "0.52828026", "text": "public function addPerson()\n\t{\n\t\t$personExists;\n\t\tif($this->selected_id < 1){\n\t\t\t$personExists = Person::where('identification',$this->identification)\t\t\n\t\t\t->where('user_id', Auth()->user()->id)\n\t\t\t->count();\n\t\t} else {\n\t\t\t$personExists = Person::where('identification',$this->identification)\n\t\t\t->where('user_id', Auth()->user()->id)\n\t\t\t->where('id','<>', $this->identification)\n\t\t\t->count();\n\t\t}\n\n\n\t\tif($personExists > 0)\n\t\t{\n\t\t\t$this->emit('person-exists',\"YA AGREGASTE UNA PERSONA CON LA IDENTIFICACIÓN: {$this->identification}\");\n\t\t\treturn;\n\t\t}\n\n\t\t\n\n\t\t$this->validate(Radicado::$PersonRules, Radicado::$PersonMessages);\n\n\n\n\t\t\t//$now = Carbon::now();\n\t\t\t//$uid = $now->format('His') . '';\n\n\t\t\t//'radicado_id' =>$this->deptoPerson NO LO TENEMOS \n\t\tPerson::create([\n\t\t\t'cup' => Session::get('cup'),\n\t\t\t'person_type'=> $this->personType,\n\t\t\t'name' => $this->name,\n\t\t\t'identification'=> $this->identification,\n\t\t\t'identification_type'=> $this->typeIdentification,\n\t\t\t'email' => $this->email,\n\t\t\t'phone'=> $this->phone,\n\t\t\t'person_type_dian'=> $this->personTypeDian,\n\t\t\t'age'=> $this->age,\n\t\t\t'ethnic_group'=> $this->ethnicGroup,\n\t\t\t'disabled'=> $this->disabled,\n\t\t\t'gender'=> $this->gender, \n\t\t\t'address'=> $this->address,\n\t\t\t'user_id' => Auth()->user()->id,\t\t\t\n\t\t\t'depto_id' =>$this->deptoPerson,\n\t\t\t'city_id' =>$this->city,\n\t\t]);\n\n\t\t$this->resetPersonInfo();\n\t\t$this->emit('person-added','Persona agregada');\n\n\t}", "title": "" }, { "docid": "1ab41e017c22b3e56ff8bc587d474b49", "score": "0.5280915", "text": "function salvarFotografias($conn, $id_peca){\n\t\t$total = count($_FILES['fotografias']['name']);\n\t\t\n\t\t// Loop through each file\n\t\tfor( $i=0 ; $i < $total ; $i++ ) {\n\n\t\t\t//Get the temp file path\n\t\t\t//$tmpFilePath = $_FILES['desenhos_tecnicos']['tmp_name'][$i];\n\t\t\t\n\t\t\t// File upload path\n\t\t\t$targetDir = \"img/\";\n\t\t\t$fileName = basename($_FILES['fotografias'][\"name\"][$i]);\n\t\t\t$fileNameNew = time();\n\t\t\t$targetFilePath = $targetDir . $fileName;\n\t\t\t$fileType = pathinfo($targetFilePath,PATHINFO_EXTENSION);\n\t\t\n\t\t\t$newFilePath = $targetDir.$fileNameNew.\".\".$fileType;\n\t\t\n\t\t\tif(!empty($_FILES['fotografias'][\"name\"][$i])){\n\t\t\t\t// Allow certain file formats\n\t\t\t\t$allowTypes = array('jpg','png','jpeg','gif','pdf');\n\t\t\t\tif(in_array($fileType, $allowTypes)){\n\t\t\t\t\t// Upload file to server\n\t\t\t\t\tif(move_uploaded_file($_FILES['fotografias'][\"tmp_name\"][$i], $newFilePath)){\n\t\t\t\n\t\t\t\t\t\t$conn = getConnection();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t$sql = 'INSERT INTO fotografias (id_peca, \n\t\t\t nome_imagem) VALUES(:id_peca, \n\t\t\t\t\t\t\t\t\t\t\t :nome_imagem)';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t$stmt = $conn->prepare($sql);\n\t\t\t\t\t\t$stmt->bindParam(':id_peca' , $id_peca);\n\t\t\t\t\t\t$stmt->bindParam(':nome_imagem', $newFilePath);\n\t\t\t\n\t\t\t\t\t\tif($stmt->execute()){\n\t\t\t\t\t\t\t$statusMsg = \"The file \".$fileName. \" has been uploaded successfully.\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$statusMsg = \"File upload failed, please try again.\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$statusMsg = \"Sorry, there was an error uploading your file.\";\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$statusMsg = 'Sorry, only JPG, JPEG, PNG, GIF, & PDF files are allowed to upload.';\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$statusMsg = 'Please select a file to upload.';\n\t\t\t}\n\n\t\t\t// Display status message\n\t\t\techo $statusMsg;\n\t\t\t\n\t\t}\n\t}", "title": "" } ]
52fca81ff05a12ce82e9e6788106906e
Call to reset the registries after setting or resetting a packagingroot
[ { "docid": "23ebca10f8b10df75e13ee66fc8e5c10", "score": "0.81251645", "text": "function resetForPackagingRoot()\n {\n $this->setCascadingRegistries($this->pearPaths);\n }", "title": "" } ]
[ { "docid": "568bda4c463a34aff14ce0726f15aca5", "score": "0.6365041", "text": "public static function reset_settings() {\n array_map('unlink', glob(\"lib/*.json\"));\n }", "title": "" }, { "docid": "f23d130f32a67e4b4860201aad712191", "score": "0.6311969", "text": "function rebuildRegistry ()\n {\n $subsystems = $this->loadModulesMetadata ($this->scanSubsystems (), ModuleInfo::TYPE_SUBSYSTEM);\n $plugins = $this->loadModulesMetadata ($this->scanPlugins (), ModuleInfo::TYPE_PLUGIN);\n $private = $this->loadModulesMetadata ($this->scanPrivateModules (), ModuleInfo::TYPE_PRIVATE);\n\n /** @var ModuleInfo[] $currentModules */\n $currentModules = array_merge ($subsystems, $plugins, $private);\n self::sortModules ($currentModules);\n $currentModuleNames = self::getNames ($currentModules);\n\n $prevModules = $this->registry->getModules ();\n $prevModuleNames = self::getNames ($prevModules);\n\n $newModuleNames = array_diff ($currentModuleNames, $prevModuleNames);\n $newModules = self::getOnly ($newModuleNames, $currentModules);\n\n $moduleNamesKept = array_intersect ($currentModuleNames, $prevModuleNames);\n $moduleNamesKept = array_intersect ($moduleNamesKept,\n $this->registry->onlyPrivateOrPlugins ()->onlyEnabled ()->getModuleNames ());\n $modulesKept = self::getOnly ($moduleNamesKept, $currentModules);\n\n $modules = [];\n foreach ($currentModules as $module) {\n /** @var ModuleInfo $oldModule */\n $oldModule = get ($prevModules, $module->name);\n if ($oldModule) {\n // Keep user preferences.\n foreach (ModuleInfo::KEEP_PROPS as $prop)\n $module->$prop = $oldModule->$prop;\n }\n $modules [$module->name] = $module;\n }\n $this->registry->setAllModules ($modules);\n $this->registry->save ();\n\n $this->publishModules ();\n\n if ($newModules || $modulesKept) {\n $this->registry->pendingInitializations (function () use ($newModules, $modulesKept) {\n $this->setupNewModules ($newModules);\n $this->updateModules ($modulesKept);\n });\n }\n\n $this->clearBootloaders ();\n\n $this->end ();\n }", "title": "" }, { "docid": "e25c7a6adae0652d90d75761a0e61dd8", "score": "0.620031", "text": "public static function reset()\n {\n static::$_registered = [];\n }", "title": "" }, { "docid": "2f25d7d3944df83896169276d8851588", "score": "0.61920595", "text": "private function resetConfig()\n {\n $config = Registry::getConfig();\n $config->reinitialize();\n /** Reset static variable in oxSuperCfg class, which is base class for every class. */\n $config->setConfig($config);\n }", "title": "" }, { "docid": "9f74d56b58a4a8bd0d35ddf4a7649f24", "score": "0.61919385", "text": "public function reset_autoloader() {\n\t\t$this->php_autoloader->unregister_autoloader();\n\t\t$this->hook_manager->reset();\n\n\t\t// Clear all of the autoloader globals so that older autoloaders don't do anything strange.\n\t\tglobal $jetpack_autoloader_latest_version;\n\t\t$jetpack_autoloader_latest_version = null;\n\n\t\tglobal $jetpack_packages_classmap;\n\t\t$jetpack_packages_classmap = array(); // Must be array to avoid exceptions in old autoloaders!\n\n\t\tglobal $jetpack_packages_psr4;\n\t\t$jetpack_packages_psr4 = array(); // Must be array to avoid exceptions in old autoloaders!\n\n\t\tglobal $jetpack_packages_filemap;\n\t\t$jetpack_packages_filemap = array(); // Must be array to avoid exceptions in old autoloaders!\n\t}", "title": "" }, { "docid": "71d8967529f2a1a1cf0fa9c2ce13d557", "score": "0.60616887", "text": "public static function clearPrefixPathRegistry()\n {\n static::$_prefixPaths = array();\n }", "title": "" }, { "docid": "9836da51d9bcb3cac7005452d4c6f02f", "score": "0.6041266", "text": "public function tear_down() {\n\t\t$this->registry = null;\n\n\t\tparent::tear_down();\n\t}", "title": "" }, { "docid": "d17723c6869d25c18de404b9fd852fbc", "score": "0.60406435", "text": "protected function resetGlobalSettings()\n {\n Yii::$app->assetManager->bundles = [];\n }", "title": "" }, { "docid": "8ecb5c62257ad16ece3c41844e2e3072", "score": "0.59974647", "text": "function reset ($packages) {\n\t\tparent::reset();\n\t\tforeach ($packages as $package) {\n\t\t\t$this->add($package);\n\t\t}\n\t}", "title": "" }, { "docid": "7921fe44420204c56f817e5920cb609a", "score": "0.5991477", "text": "function moduleRefresh ()\n {\n $this->modulesInstaller->rebuildRegistry ();\n }", "title": "" }, { "docid": "be8e82b5462c7f5f10ccb73f6b70f793", "score": "0.58975965", "text": "protected function resetSystem() {\n if ($this->routeBuilder) {\n $this->routeBuilder->setRebuildNeeded();\n }\n\n // @todo It feels wrong to have the requirement to clear the local tasks\n // cache here.\n Cache::invalidateTags(['local_task']);\n $this->themeRegistryRebuild();\n }", "title": "" }, { "docid": "ca3371d0fa7968f1e9d39c2b2e4f537c", "score": "0.5879078", "text": "function resetQueue() {\n foreach(array_keys($this->packages) as $packagename) {\n $this->packages[$packagename]->QueueInstall = FALSE;\n $this->packages[$packagename]->QueueRemove = FALSE;\n }\n }", "title": "" }, { "docid": "4e3a1f9ab19a10f23cb5ff680a0a4e2d", "score": "0.5812162", "text": "public static function tearDownAfterClass()\r\n {\r\n foreach(self::$_remembered_IncludeRoots as $root){\r\n Web2All_Manager_Main::registerIncludeRoot($root);\r\n }\r\n }", "title": "" }, { "docid": "762596864326e815c224899723bd6b01", "score": "0.5788356", "text": "function initializeRegistry() {\n $this->completeRegistry = theme_get_registry();\n\n return array_fill_keys(array_keys($this->completeRegistry), NULL);\n }", "title": "" }, { "docid": "f50f20da334e02fda54275c1eaed3914", "score": "0.5786008", "text": "public static function reset() {\n\t\tstatic::$_config = array();\n\t\tstatic::$_checks = array();\n\t\tstatic::$_handlers = array();\n\t\tstatic::$_exceptionHandler = null;\n\t\tstatic::__init();\n\t}", "title": "" }, { "docid": "e8839bf12a8f0c22cde13cf969a4e35c", "score": "0.5781303", "text": "public function reset() {\n\t\t\tdelete_option( 'nss_plugin_remote_version_' . $this->slug );\n\t\t\tdelete_option( 'nss_plugin_remote_license_' . $this->slug );\n\t\t\tdelete_option( 'nss_plugin_info_' . $this->slug );\n\t\t\tdelete_option( 'nss_plugin_check_' . $this->slug );\n\t\t\t//update_option( 'nss_plugin_check_' . $this->slug, time() );\n\t\t}", "title": "" }, { "docid": "53d5598242befd51f7fc55e1d50f9b13", "score": "0.56945837", "text": "function drupal_theme_rebuild() {\n drupal_static_reset('theme_get_registry');\n cache_clear_all('theme_registry', 'cache', TRUE);\n}", "title": "" }, { "docid": "1f7455a7285bbbb82521e5ee20322ecb", "score": "0.5680569", "text": "function tearDown() {\r\n Zend_Registry::set('config', $this->_realconfig);\r\n Zend_Registry::set('current_user', null);\r\n try { $this->fedora->purge($this->pid, \"removing test programs object\"); } catch (Exception $e) {}\r\n }", "title": "" }, { "docid": "f699dd7d7c96836a08de9f077becc7a8", "score": "0.56726146", "text": "public function reset_package_paths()\n\t{\n\t\t$this->_ci_library_paths = array(APPPATH, BASEPATH);\n\t\t$this->_ci_helper_paths = array(APPPATH, BASEPATH);\n\t\t$this->_ci_model_paths = array(APPPATH);\n\t\t$this->_ci_view_paths = array(APPPATH.'views/'\t=> TRUE);\n\t}", "title": "" }, { "docid": "83dad236f8eb581323b7f800a013f3ed", "score": "0.565156", "text": "public function reset()\n\t{\n\t\t// Container reset\n\t\t$this->resolved = [];\n\t\t$this->bindings = [];\n\t\t$this->instances = [];\n\t\t$this->aliases = [];\n\t\t$this->reboundCallbacks = [];\n\t\t$this->resolvingCallbacks = [];\n\t\t$this->globalResolvingCallbacks = [];\n\n\t\t// Application reset\n\t\t$this->bootingCallbacks = [];\n\t\t$this->bootedCallbacks = [];\n\t\t$this->finishCallbacks = [];\n\t\t$this->shutdownCallbacks = [];\n\t\t$this->middlewares = [];\n\t\t$this->serviceProviders = [];\n\t\t$this->loadedProviders = [];\n\t\t$this->deferredServices = [];\n\t}", "title": "" }, { "docid": "637c9d63d24f6fc5a16d79c6202c2210", "score": "0.5645853", "text": "public function resetAssetBundles()\n {\n $this->assetBundles = [];\n }", "title": "" }, { "docid": "0a0b6fcea28f4cdbd7ed938b1dd5fc39", "score": "0.5630586", "text": "public static function clearAll()\n {\n static::initialize();\n static::$registry->clearAll();\n }", "title": "" }, { "docid": "a4c744d04f6c00b9d726b55974a2af1e", "score": "0.56246185", "text": "public function loadRegistry()\n {\n RegistryConf::setTmpPath(\n $this->dir($this->conf['conf']['tmp']['registry'] ?? '')\n );\n }", "title": "" }, { "docid": "7ef48119721fe6933e250d14de397e29", "score": "0.5617588", "text": "public function resetPackage() {\n\t\t\t$this->packageID = false;\n\t\t\t$this->contents = array();\n\t\t\t$this->totalCost = false;\n\t\t\t$this->totalWeight = false;\n\t\t\t$this->itemCount = false;\n\t\t}", "title": "" }, { "docid": "6737c0e3efaf9feb856d40c264d52dd4", "score": "0.56010723", "text": "public static function resetPluginManager()\n {\n static::$plugins = null;\n }", "title": "" }, { "docid": "0f4729163c06ebc4795b3a6e2426430b", "score": "0.55963534", "text": "public static function resetEnvironment()\n {\n static::unAuthenticate();\n static::set('\\Gustavus\\Template\\Template', 'template', null);\n static::set('\\Gustavus\\Extensibility\\Base', 'items', []);\n\n // make the global cache data store use array cache instead of memcache or anything any tests set it to use.\n static::set('\\Gustavus\\GACCache\\GlobalCache', 'factory', new DataStoreFactory([new ArrayFactoryWorker()]));\n // verify that the datastore isn't set so it can build one off of our new factory\n static::set('\\Gustavus\\GACCache\\GlobalCache', 'datastore', null);\n }", "title": "" }, { "docid": "895bdc281ae2e668c5ef3c97dc9e91a8", "score": "0.5578403", "text": "public function afterImport()\n {\n $obj = Craft::$app->globals;\n $refObject = new \\ReflectionObject($obj);\n if ($refObject->hasProperty('_allGlobalSets')) {\n $refProperty1 = $refObject->getProperty('_allGlobalSets');\n $refProperty1->setAccessible(true);\n $refProperty1->setValue($obj, null);\n }\n }", "title": "" }, { "docid": "b4a506fcce45b34b4296e9f55af190b7", "score": "0.5553874", "text": "public function reconfigure();", "title": "" }, { "docid": "42cc9bc1c112c78b9c5f2c579be35153", "score": "0.5552529", "text": "protected function removeDefaultConfiguration()\n\t{\n\t\t$this->composer = \\GuzzleHttp\\json_decode(file_get_contents($this->directory . '/composer.json'), true);\n\n\t\tunlink($this->directory . '/composer.json');\n\t}", "title": "" }, { "docid": "e4010b9d29fce68942e48418729d762c", "score": "0.555208", "text": "protected function tearDown()\n {\n oxTestModules::addFunction('oxManufacturer', 'cleanRootManufacturer', '{oxManufacturer::$_aRootManufacturer = array();}');\n oxNew('oxManufacturer')->cleanRootManufacturer();\n parent::tearDown();\n }", "title": "" }, { "docid": "911d7f9b78b6f3fe86908ad0c9c83386", "score": "0.55498785", "text": "public function reset()\n {\n $this->config($this->def);\n $this->clear();\n }", "title": "" }, { "docid": "0be3535ee671284c5653405b4f3612ed", "score": "0.55422884", "text": "protected function tearDown() {\n\t\t$this->_clearRegistry();\n\t}", "title": "" }, { "docid": "f2e7e066640ba69663a1a69f22b8a19d", "score": "0.5533568", "text": "function tearDown() {\n Zend_Registry::set('config', $this->_realconfig);\n Zend_Registry::set('schools-config', $this->_schools_config);\n \n $this->esd_data->cleanUp();\n $this->etd_data->cleanUp();\n }", "title": "" }, { "docid": "0847307edb7c1caaf24cf9f7d71f1151", "score": "0.5525795", "text": "public static function tearDownAfterClass()\n {\n file_put_contents(__DIR__ . '/../../cache/packages.json', '{}');\n }", "title": "" }, { "docid": "7b5ce3a5ed5ab2a9a55239800f146d03", "score": "0.5508772", "text": "protected function initializePackageManager()\n {\n $cache = new PhpFrontend('cache_core', new NullBackend('production', []));\n $packageManager = CoreBootstrap::createPackageManager(UnitTestPackageManager::class, $cache);\n\n GeneralUtility::setSingletonInstance(PackageManager::class, $packageManager);\n ExtensionManagementUtility::setPackageManager($packageManager);\n }", "title": "" }, { "docid": "9eeb27065231de3677ff0dfd133fb85c", "score": "0.5503249", "text": "public function shutdown() {\n\t\t$this->_set_site_versions();\n\t\t$this->_set_group_versions();\n\t}", "title": "" }, { "docid": "209103550a4108e5dea4acf36296f911", "score": "0.5487837", "text": "private function registerPackages()\n\t{\n\t\t$disabled_packages = $this->getConfig('disabled.packages') ?: [];\n\n\t\tforeach ($this->getConfig('packages') as $package)\n\t\t{\n\t\t\tif ( ! in_array($package['name'], $disabled_packages))\n\t\t\t{\n\t\t\t\t$this->registerPackageServiceProviders($package);\n\n\t\t\t\t$this->registerPackageFacades($package);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "64fe2bf99dd5bf8ad0bfc8fb05df9bfc", "score": "0.5484396", "text": "private function clearBootloaders ()\n {\n $path = $this->kernelSettings->getBootloadersPath ();\n if (fileExists ($path))\n rrmdir ($path);\n mkdir (\"{$this->kernelSettings->baseDirectory}/$path\");\n }", "title": "" }, { "docid": "a97d7872526ddbd3d90333b054bc29c3", "score": "0.54652184", "text": "public static function resetCreatedModules()\n {\n self::$createdModules = array();\n }", "title": "" }, { "docid": "a42f8cd1b6251b5b547f1be3cc3898c0", "score": "0.5461861", "text": "public function purge_registration()\r\n {\r\n }", "title": "" }, { "docid": "1dd6108befd1dfdf42a547f2c6914b86", "score": "0.5450149", "text": "public function fillDefaultsByPackageName($packageName)\n {\n $path = $this->getPackagePath($packageName);\n $this->setTemplateRootPaths([$path . self::DEFAULT_TEMPLATES_DIRECTORY]);\n $this->setLayoutRootPaths([$path . self::DEFAULT_LAYOUTS_DIRECTORY]);\n $this->setPartialRootPaths([$path . self::DEFAULT_PARTIALS_DIRECTORY]);\n }", "title": "" }, { "docid": "e266c03de21009a26807a3010df265bf", "score": "0.54501116", "text": "private static function _resetAddons() {\n if (isset($_SESSION['lC_Addons_Admin_data'])) unset($_SESSION['lC_Addons_Admin_data']);\n lC_Cache::clear('modules-addons');\n lC_Cache::clear('modules-payment');\n lC_Cache::clear('configuration');\n lC_Cache::clear('templates');\n lC_Cache::clear('addons');\n lC_Cache::clear('vqmoda');\n lC_Cache::clear('vqmods'); \n }", "title": "" }, { "docid": "f37d2659a76af309178b60f65d2911b5", "score": "0.5445962", "text": "public function all() {\n\t\t$googlesitekit_reset_context = $this->context;\n\n\t\t// Call uninstaller.\n\t\trequire $this->context->path( 'uninstall.php' );\n\t}", "title": "" }, { "docid": "2ff58d7765a50dbe076d2c8e2448e8e1", "score": "0.5444641", "text": "public function reset() {\n $this->values[self::BRAND] = null;\n $this->values[self::ICON] = null;\n $this->values[self::SUBLIST] = array();\n }", "title": "" }, { "docid": "2b26901b2f6948bd7bd317876aa84cac", "score": "0.5437525", "text": "public function reset()\n {\n $this->getServiceManager()->getFrontController()->resetInstance();\n $this->config = null;\n $this->internalRegistry->setContainer(new \\Pimple());\n }", "title": "" }, { "docid": "07b26820c0bd43d6d1399c2161f1ae71", "score": "0.5429417", "text": "function ClearRegisteredImages(){}", "title": "" }, { "docid": "f2be1652e17cca01c313c3998e3fa92a", "score": "0.54028285", "text": "public function reset()\n {\n static::$files = array();\n }", "title": "" }, { "docid": "acdef630c3ebedf5d8220f9feb2cad10", "score": "0.5402594", "text": "public function tearDown() {\n TConfiguration::reset();\n }", "title": "" }, { "docid": "db1e3e77d486aa47e5d83e9f1c142fe4", "score": "0.5365793", "text": "static public function __unsetRegistry()\n {\n return Zend_Registry::_unsetInstance();\n }", "title": "" }, { "docid": "37c42124a22a1462f7f6b8cc4ca71ec0", "score": "0.53568494", "text": "public function tearDown() {\n foreach ($this->registered as $l) {\n ClassLoader::removeLoader($l);\n }\n }", "title": "" }, { "docid": "ea2a8af407f8100378b83a0636b05d89", "score": "0.5355584", "text": "public function registerAll()\n {\n foreach ($this->path as $path) {\n $themes = $this->createFinder()->in($path)->directories()->depth(0);\n\n foreach ($themes as $theme) { \n\n $config = $this->parseConfig($theme.'/theme.xml');\n $this->register($theme->getFilename(), $config);\n }\n }\n }", "title": "" }, { "docid": "b6bd8b97e781cce9e571c7fdaf5f365d", "score": "0.53499556", "text": "public function setRegistry()\n {\n $this->_registry = Zend_Registry::getInstance();\n $options = $this->getOptions();\n $baseUrl = substr($_SERVER['PHP_SELF'], 0, strpos($_SERVER['PHP_SELF'], '/index.php'));\n $this->_registry->set('base_path_html', realpath('.'));\n $this->_registry->set('base_path_app', realpath('..'));\n\t $this->_registry->set('base_url', $baseUrl);\n $this->_registry->set('siteurl',$options['siteurl']);\n $this->_registry->set('files_path',$options['path_files']);\n }", "title": "" }, { "docid": "06c7634cd24b4fb15b9bb890b835d5d9", "score": "0.5346962", "text": "public function reset()\n {\n $this->_defaults = array();\n $this->_personal_defaults = array();\n $this->_duplicate_defaults = array();\n }", "title": "" }, { "docid": "044162a053a37a044add72db95ff48f5", "score": "0.5344897", "text": "protected function tearDownAssetsTestTrait(): void\n {\n if (! empty($this->refreshVfs)) {\n self::$root = null;\n self::$published = false;\n }\n\n Asset::useConfig(null);\n }", "title": "" }, { "docid": "3ff8edf8f83c0b0a3067959c1e052346", "score": "0.5344314", "text": "public function reset()\n {\n unset( $this->properties['configurations'] );\n unset( $this->properties['pluginRegistry'] );\n $this->properties['configurations'] = new ezcWebdavServerConfigurationManager();\n $this->properties['pluginRegistry'] = new ezcWebdavPluginRegistry();\n $this->properties['auth'] = null;\n $this->properties['options'] = new ezcWebdavServerOptions();\n\n $this->properties['transport'] = null;\n $this->properties['backend'] = null;\n $this->properties['pathFactory'] = null;\n $this->properties['xmlTool'] = null;\n $this->properties['propertyHandler'] = null;\n $this->properties['headerHandler'] = null;\n }", "title": "" }, { "docid": "540f8df909acc989940c420299df855c", "score": "0.53334755", "text": "function __destruct()\n {\n if ( $this->node->isChanged() )\n {\n // Build our DOMDOcument and load the contents of the registry file\n $dom = new DOMDocument('1.0', 'UTF-8');\n $dom->formatOutput = true;\n $file = new fFile('Configuration/registry.xml');\n $dom->loadXML($file->read());\n\n // Get our registry node\n $registry = $dom->getElementsByTagName('registry')->item(0);\n\n // Build the new tree for the class that called us\n $tree = $this->node->buildDOMTree($dom);\n\n // Find the old node\n $xpath = new DOMXPath($dom);\n $entries = $xpath->query('/registry/node[@name=\"' . $this->name . '\"]');\n\n // Replace the old node with the new one\n $registry->replaceChild($tree, $entries->item(0));\n\n // Try and save the document\n if ( !$dom->save('Configuration/registry.xml') )\n {\n // Add an engine warning\n $this->fWarn->add('fRegistry could not save the updated registry.xml file.');\n }\n }\n }", "title": "" }, { "docid": "d1b0b4bc09bad16723c299b89b71b9f1", "score": "0.5330819", "text": "protected function resetTaxonomies() : void\n {\n foreach (get_taxonomies() as $tax) {\n $this->unregisterTaxonomy($tax);\n }\n\n create_initial_taxonomies();\n }", "title": "" }, { "docid": "ab9127c4074210c13c59de86528260b8", "score": "0.5325864", "text": "function _loadLocalPackages () {\n clearstatcache();\n $reg = &$this->ui->config->getRegistry();\n $installed = $reg->packageInfo();\n $this->_localPackageCache = array();\n foreach($installed as $packagear) {\n $package = PEAR_Frontend_Gtk_PackageData::staticNewFromArray($packagear);\n $this->_localPackageCache[] = $package;\n }\n \n }", "title": "" }, { "docid": "43bc0c12f259140eede893214820d926", "score": "0.53111416", "text": "static function resetAllServices(){\n self::restoreAllServices();\n self::$overwritten_services = [];\n }", "title": "" }, { "docid": "811b87b2c67fa540fbfed2c198989a76", "score": "0.5309329", "text": "protected static function flushNodeModules()\n {\n tap(new Filesystem, function ($files) {\n $files->deleteDirectory(base_path('node_modules'));\n\n $files->delete(base_path('yarn.lock'));\n $files->delete(base_path('package-lock.json'));\n });\n }", "title": "" }, { "docid": "af78f3ecaadb681ab6d5a2e76c50b28b", "score": "0.53053796", "text": "public static function reset_config() {\n self::$_config = array();\n }", "title": "" }, { "docid": "918fb72ca1700d4cbd3ded0f88416c3f", "score": "0.528952", "text": "public static function reset() {\n\t\t\tself::$_current = '';\n\t\t\tself::$_detector = null;\n\t\t\tself::$_configurations = array(\n\t\t\t\t'live' => array(),\n\t\t\t\t'local' => array(),\n\t\t\t\t'beta' => array()\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "96b5448d8f42bd1b926c36c515365278", "score": "0.5280286", "text": "protected static function flushNodeModules()\n {\n tap(new Filesystem(), function ($files) {\n $files->deleteDirectory(base_path('node_modules'));\n\n $files->delete(base_path('yarn.lock'));\n $files->delete(base_path('package-lock.json'));\n });\n }", "title": "" }, { "docid": "679c2ff606100c9164bab5b1228f0d2b", "score": "0.52756417", "text": "public function clearPlugins();", "title": "" }, { "docid": "261701c75e18f74b4333eff2c0a6c512", "score": "0.52670914", "text": "public function reset(): void\n {\n $this->cache->setLocales(null);\n foreach ($this->getLocales() as $locale) {\n $this->cache->saveLocale($locale, null);\n }\n\n $this->locales = [];\n $this->catalogues = [];\n }", "title": "" }, { "docid": "b7964a271b7b6c5bb08343d1cbdbaa0d", "score": "0.5262333", "text": "private function resetearSistemaHundir() {\n for ($i=0; $i<sizeof($this->_faseHundir); $i++) \n $this->_faseHundir[$i] = false;\n for ($i=0; $i<sizeof($this->_direccionValida); $i++) \n $this->_direccionValida[$i] = true;\n }", "title": "" }, { "docid": "ba36ef33afaf303119280728b6dbb67d", "score": "0.5259774", "text": "public function startup() {\n\t\tparent::startup();\n\t\t\n\t\t$this->unsetProjectsSession();\n\t}", "title": "" }, { "docid": "519e66103ba9b1bdfb510f98652128c5", "score": "0.525729", "text": "protected function _resetMissingFiles()\n {\n $this->_aMissingFiles = array();\n }", "title": "" }, { "docid": "2ef8bf4cacec5cac447dce38c3e99342", "score": "0.5248016", "text": "public static function setUpBeforeClass()\r\n {\r\n self::$_remembered_IncludeRoots = Web2All_Manager_Main::getRegisteredIncludeRoots();\r\n foreach(self::$_remembered_IncludeRoots as $root){\r\n Web2All_Manager_Main::unregisterIncludeRoot($root);\r\n }\r\n }", "title": "" }, { "docid": "e7b3266ca6fe2bf8e5bb4fb5fd2ef8ef", "score": "0.52422136", "text": "public function afterSetupTheme()\n {\n $this->imageSizesHelper->registerImageSizes();\n $this->postTypeHelper->registerPostTypes();\n $this->taxonomyHelper->registerTaxonomies();\n $this->fieldsHelper->registerFieldGroups();\n $this->hooker->hookUp();\n $this->shortcodeHelper->registerShortcodes();\n\n }", "title": "" }, { "docid": "f2d616b44a4614a5ccc1a2e1851394d4", "score": "0.52411133", "text": "protected function backwardCompatybilitySetup()\n {\n $this->internalRegistry = $internalRegistry = new My_Registry($this->getServiceManager());\n\n try{\n Zend_Registry::setInstance($internalRegistry);\n }catch (Zend_Exception $e){\n if($e->getMessage() == 'Registry is already initialized'){\n\n // hack for private properties in Zend_Registry\n $reflectedRegistry = new ReflectionClass('Zend_Registry');\n $refProperty = $reflectedRegistry->getProperty('_registry');\n $refProperty->setAccessible(true);\n $refProperty->setValue(null, null);\n\n Zend_Registry::setInstance($internalRegistry);\n }else{\n throw $e;\n }\n }\n\n /** @var $renderer Zend_Controller_Action_Helper_ViewRenderer */\n $renderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\n $renderer->setView($this->getServiceManager()->getView());\n }", "title": "" }, { "docid": "08864ebf3c27e91910972947d1a5e6e7", "score": "0.5225393", "text": "private function initializePartialPackages()\n {\n $rootData = $this->loadRootServerFile();\n\n $this->partialPackagesByName = array();\n foreach ($rootData['packages'] as $package => $versions) {\n $package = strtolower($package);\n foreach ($versions as $version) {\n $this->partialPackagesByName[$package][] = $version;\n if (!empty($version['provide']) && is_array($version['provide'])) {\n foreach ($version['provide'] as $provided => $providedVersion) {\n $this->partialPackagesByName[strtolower($provided)][] = $version;\n }\n }\n if (!empty($version['replace']) && is_array($version['replace'])) {\n foreach ($version['replace'] as $provided => $providedVersion) {\n $this->partialPackagesByName[strtolower($provided)][] = $version;\n }\n }\n }\n }\n\n // wipe rootData as it is fully consumed at this point and this saves some memory\n $this->rootData = true;\n }", "title": "" }, { "docid": "094305ad0239229a60c8adcc436f4632", "score": "0.5222584", "text": "public function reset()\n\t\t{\n\t\t\t$this->config = self::$defaults;\n\t\t\t$this->nameIsFull = false;\n\t\t\t$this->setFInfo( FILEINFO_NONE );\n\t\t\t$this->exception = NULL;\n\t\t\t$this->checked = false;\n\t\t\t$this->done = false;\n\t\t}", "title": "" }, { "docid": "81e4e295bc0b82488817534bb9433140", "score": "0.52174616", "text": "static function restoreAllServices(){\n self::$doubled_services = [];\n }", "title": "" }, { "docid": "9e5e46cb161d35ad71088ccc5dc9d893", "score": "0.52164805", "text": "function reset() {\n\t\t$this->reload();\n\t}", "title": "" }, { "docid": "67ec232aabb9e487ac7164175cfd5313", "score": "0.5207542", "text": "public static function tearDown() {\n \\Patchwork\\restoreAll();\n\n if (empty(self::$globalsBackup)) {\n return;\n }\n\n array_walk(self::$globalsBackup, function ($value, $key) {\n $GLOBALS[$key] = $value;\n });\n }", "title": "" }, { "docid": "0a401f8d5cc87b9a39c710cc787b2929", "score": "0.51876014", "text": "public function afterRegistry()\r\n {\r\n parent::afterRegistry();\r\n\r\n $this->initTranslateable();\r\n }", "title": "" }, { "docid": "8c5ed11864f9d95826ac3d1f075092bc", "score": "0.5187209", "text": "public static function resetNamespaces()\n {\n self::$namespaces = [ '\\\\Verja\\\\Validator' ];\n }", "title": "" }, { "docid": "20d6fa418ae7d70bd8a9bb06c36db54f", "score": "0.5184849", "text": "public function cleanup() {\n\t\tset_theme_mod( 'pixcare_install_notice_dismissed', false );\n\t}", "title": "" }, { "docid": "9d031f8939d2fae9fa4556cc3129225a", "score": "0.5181187", "text": "public function reInit();", "title": "" }, { "docid": "a5f13627fb382240bc895af45288def4", "score": "0.51753527", "text": "public static function resetConfiguration() {\n\t\treturn LoggerHierarchy::singleton()->resetConfiguration();\t \n\t}", "title": "" }, { "docid": "a39e15855a9134e96c3bb4916107bc66", "score": "0.5171453", "text": "function clear_autoreset() {\n $this->AUTORESET=0;\n }", "title": "" }, { "docid": "454aa7e02efa1984048c58df0c2a690e", "score": "0.51713705", "text": "public function unregisterMetaboxes(){\n /* chayka: unregisterMetaboxes */\n }", "title": "" }, { "docid": "100a8ace11296c43afbb42a51ff7486a", "score": "0.5167569", "text": "function quick_merge_uninstall()\n{\n\t// settings tables, templates, groups and setting groups\n\tif(!class_exists('WildcardPluginInstaller'))\n\t{\n\t\trequire_once MYBB_ROOT . 'inc/plugins/quick_merge/classes/installer.php';\n\t}\n\t$installer = new WildcardPluginInstaller(MYBB_ROOT . 'inc/plugins/quick_merge/install_data.php');\n\t$installer->uninstall();\n}", "title": "" }, { "docid": "bd3d0eb8d687e0803ab481d58ec32e5f", "score": "0.5161009", "text": "protected function reset(): void\n {\n\n $this->project = null;\n $this->projectHost = null;\n $this->projectNamespace = null;\n $this->projectPath = null;\n $this->projectDebugMode = null;\n $this->url = null;\n $this->caller = null;\n $this->context = null;\n $this->routerMock = null;\n\n }", "title": "" }, { "docid": "7320416c2e7d08757f6952fb2013b7eb", "score": "0.5157436", "text": "protected function tearDown() {\n\t\tConfig::getInstance()->clear();\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "18f88e9093ee3e6a54318f980187bfae", "score": "0.5152069", "text": "public function reset()\n\t{\n\t\t$this->filter_registry = [];\n\t}", "title": "" }, { "docid": "2dc95e58cadfd3617b57b58e2b9fdeab", "score": "0.5150532", "text": "public function tearDown()\n {\n \\Chadicus\\FunctionRegistry::reset(__NAMESPACE__, ['date', 'Core']);\n }", "title": "" }, { "docid": "abde93c410fae8f992d4312c2ad11c49", "score": "0.51380634", "text": "protected function configure_defaults() {\n\t\t\t$this->modules = new stdClass();\n\t\t\t$this->modules->count = 0;\n\t\t\t$this->installed_dir = dirname( __FILE__ );\n\t\t\t$this->installed_url = plugins_url( '/', __FILE__ );\n\t\t}", "title": "" }, { "docid": "7030d84dd29a49657fd49bfcb8c132f4", "score": "0.51375693", "text": "protected function tearDown() {\n\t\tApplication_Modules_Module_Info::setModuleTypesList(array(\n\t\t\tApplication_Modules_Module_Info::MODULE_TYPE_GENERAL => \"General module\",\n\t\t\tApplication_Modules_Module_Info::MODULE_TYPE_SITE_UI_MANAGER => \"Site UI manager module\",\n\t\t\tApplication_Modules_Module_Info::MODULE_TYPE_ADMIN_UI_MANAGER => \"Administration UI manager module\",\n\t\t\tApplication_Modules_Module_Info::MODULE_TYPE_AUTH_MANAGER => \"Authentication and authorization manager module\",\n\t\t\tApplication_Modules_Module_Info::MODULE_TYPE_OUTPUT_FILTER => \"Output filter module\",\n\t\t\tApplication_Modules_Module_Info::MODULE_TYPE_SYSTEM => \"System module\",\n\t\t));\n\t}", "title": "" }, { "docid": "8ea133e0607e63730a77ce0fddf840d8", "score": "0.5135168", "text": "public function reset() {\n $this->values[self::BRANDMODEL] = null;\n $this->values[self::ICON] = null;\n }", "title": "" }, { "docid": "748fdd523cf6eed8cd40240897a9ee22", "score": "0.5134868", "text": "public function resetServiceProviders()\n {\n $this->backedServiceProviders = array_merge(\n static::$corDict[WORKER_COROUTINE_ID]['serviceProviders'],\n $this->backedServiceProviders\n );\n\n //foreach ($this->backedServiceProviders as $p) {echo get_class($p), \"\\n\";}\n\n static::$corDict[WORKER_COROUTINE_ID]['serviceProviders'] = [];\n }", "title": "" }, { "docid": "824d00ddb424f03a8aa92da1d7b4cc59", "score": "0.5133534", "text": "public function setUp() {\n $this->resetAfterTest();\n }", "title": "" }, { "docid": "824d00ddb424f03a8aa92da1d7b4cc59", "score": "0.5133534", "text": "public function setUp() {\n $this->resetAfterTest();\n }", "title": "" }, { "docid": "c07b4a7a1fe4f14d718525d9e4fb575b", "score": "0.51335216", "text": "public function resetAll() {\r\n $this->_css = array();\n $this->_js = array();\n $this->_language_code = DEFAULT_LANGUAGE;\r\n }", "title": "" }, { "docid": "fdb1cc9565adf15d88334e66834b5899", "score": "0.51281244", "text": "function DetachRoot(){}", "title": "" }, { "docid": "eb88144556f7b08f8942eea173f65c3c", "score": "0.51209027", "text": "protected function setUp()\n {\n // @link http://sebastian-bergmann.de/archives/882-guid.html\n // Testing Code That Uses Singletons\n Net_Growl::reset();\n }", "title": "" }, { "docid": "fd17d62b6d0a12a795ca1f103e6d150f", "score": "0.5110134", "text": "public function reloadGroupsAndPermissions()\n {\n $this->_groups = null;\n $this->_permissions = null;\n $this->_allPermissions = null;\n }", "title": "" }, { "docid": "74bc240f90b8c9b56e6bd440a66a1e5c", "score": "0.51078945", "text": "function set_autoreset() {\n $this->AUTORESET=1;\n }", "title": "" }, { "docid": "aeb307fe729823140b8b453f45cc2744", "score": "0.51059437", "text": "public function populate(AbstractRegistry $registry): void;", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "8ccf49305f3cd6cd778768f22c01233e", "score": "0.0", "text": "public function store(Request $request)\n {\n\n if($project = Planet::create(request()->all())){\n return redirect(\"/planets\")->with('success', 'Planet Created');\n\n }\n else{\n return redirect()->back()->with('error', trans('global.save_ko'));\n }\n }", "title": "" } ]
[ { "docid": "70f839d67344487e3780c8ca780ec59c", "score": "0.78113544", "text": "public function store(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "df5c676a539300d5a45f989e772221a5", "score": "0.70093644", "text": "public function store()\n {\n return $this->storeResource();\n }", "title": "" }, { "docid": "0a2dcecef8071427bb4f3c22969d6817", "score": "0.6619958", "text": "public function store()\n {\n if (!$this->id) {\n $this->id = $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "56a1d1d00b789bcc32f6ce99932cc19b", "score": "0.65499157", "text": "public function store(Request $request)\n {\n //Validate request\n $this->validate($request, [\n 'name' => 'required|max:255|unique:resources',\n 'url' => 'required|max:255|unique:resources|active_url',\n 'description' => 'required|max:10000',\n 'tags.*' => 'exists:tags,id'\n ]);\n //Create the resource\n $newResourceData = [\n 'name' => $request->name,\n 'url' => $request->url,\n 'description' => $request->description,\n 'is_published' => Auth::user() && Auth::user()->isAdmin()\n ];\n if (Auth::user()){\n $resource = Auth::user()->resources()->create($newResourceData);\n }\n else{\n $resource = Resource::create($newResourceData);\n }\n //Add the tags for this resource to the pivot table\n $resource->tags()->attach($request->tags);\n $responseText = 'Resource created';\n $responseText .= Auth::user() && Auth::user()->isAdmin() ? ' and published!' : ' and awaiting review.';\n //Take them back to the resource form so they can add more resources\n return redirect('/resources/create')->with('success', $responseText);\n }", "title": "" }, { "docid": "d5deceebf787a137745e10078f88a17c", "score": "0.6420354", "text": "public function store(StorageRequest $request)\n {\n try {\n $this->service->addStorage($request);\n return $this->Created('Successfully added new storage');\n } catch (\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch (Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "title": "" }, { "docid": "148c42c41711b48306faccd1fdedbc39", "score": "0.6416866", "text": "public function store()\n\t{\n\t\t// TODO\n\t}", "title": "" }, { "docid": "7d031b8290ff632bab7fef6a00576916", "score": "0.6391937", "text": "public function store()\n\t\t{\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "6b28dcad1e76b2f4b98c6b3052b069d2", "score": "0.0", "text": "public function store(Request $request)\n {\n $product=DetallesVenta::create($request->all());\n return response()->json($product,200);\n }", "title": "" } ]
[ { "docid": "70f839d67344487e3780c8ca780ec59c", "score": "0.78098744", "text": "public function store(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "df5c676a539300d5a45f989e772221a5", "score": "0.70093757", "text": "public function store()\n {\n return $this->storeResource();\n }", "title": "" }, { "docid": "56a1d1d00b789bcc32f6ce99932cc19b", "score": "0.6548988", "text": "public function store(Request $request)\n {\n //Validate request\n $this->validate($request, [\n 'name' => 'required|max:255|unique:resources',\n 'url' => 'required|max:255|unique:resources|active_url',\n 'description' => 'required|max:10000',\n 'tags.*' => 'exists:tags,id'\n ]);\n //Create the resource\n $newResourceData = [\n 'name' => $request->name,\n 'url' => $request->url,\n 'description' => $request->description,\n 'is_published' => Auth::user() && Auth::user()->isAdmin()\n ];\n if (Auth::user()){\n $resource = Auth::user()->resources()->create($newResourceData);\n }\n else{\n $resource = Resource::create($newResourceData);\n }\n //Add the tags for this resource to the pivot table\n $resource->tags()->attach($request->tags);\n $responseText = 'Resource created';\n $responseText .= Auth::user() && Auth::user()->isAdmin() ? ' and published!' : ' and awaiting review.';\n //Take them back to the resource form so they can add more resources\n return redirect('/resources/create')->with('success', $responseText);\n }", "title": "" }, { "docid": "d5deceebf787a137745e10078f88a17c", "score": "0.64198804", "text": "public function store(StorageRequest $request)\n {\n try {\n $this->service->addStorage($request);\n return $this->Created('Successfully added new storage');\n } catch (\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch (Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.6375281", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63650924", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63650924", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63650924", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63650924", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63650924", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63650924", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
6b0469f55e167d9c11ce460ea7edf562
Crea el array de provincias desde BBDD
[ { "docid": "a4e4bf54982d7c8a816423f14e556335", "score": "0.5911344", "text": "function v1_GetArrayProvincias(){\n\n\tinclude 'bbdd_conexInicio.php';\n\n\t// Realizar una consulta MySQL\n\t$query = 'SELECT cod, nombre as nom\n\t\t\t\tFROM `tbl_provincias`';\n\n\t$result = mysqli_query($link, $query)\n\tor die('Consulta fallida: ' . mysqli_error($link));\n\n\n\t// Guardamos los datos en el array\n\t$NombresProvincias = Array();\n\n\twhile ($line = mysqli_fetch_array($result, MYSQL_ASSOC)) {\n\n\t\t$NombresProvincias[$line['cod']] = $line['nom'];\n\t}\n\n\tinclude 'bbdd_conexFin.php';\n\n\treturn $NombresProvincias; //Indexados por el codigo de provincia\n\n}", "title": "" } ]
[ { "docid": "c8995f235438a32b50517dd927f5cd09", "score": "0.63437784", "text": "public function armaArrays() {\n $arrayRet = array();\n $rubBSN = new BSN();\n $arrayRub = $rubBSN->cargaColeccionForm();\n foreach ($arrayRub as $registro) {\n $arrayRet[$registro['id_impuesto']] = $registro['denominacion'];\n }\n return $arrayRet;\n }", "title": "" }, { "docid": "63e511e2cfe63cf55a0df291c3f5e8a0", "score": "0.6337256", "text": "abstract protected function getConjugationArray();", "title": "" }, { "docid": "68ef9015364ce50c3500b1f1918ac30d", "score": "0.6243807", "text": "public function build(): array;", "title": "" }, { "docid": "13f4e8ba3271269111bbf3dcd16d7e02", "score": "0.61969435", "text": "function inicializa_arrays()\n {\n global $nm_data;\n $nm_data = new nm_data(\"pt_br\");\n $this->array_total_participante = array();\n $this->array_total_pista = array();\n }", "title": "" }, { "docid": "386ce57963ddbfe28bea1acac91ff651", "score": "0.6124308", "text": "public function getArrayCriterioAvaliacao()\r\n {\r\n \t//$nacional =2;\r\n\t\t$this->evaluationRow = $this->Appraiser->isCheckerPermit(\r\n $this->enterpriseRow->getId(), \r\n $this->userAuth->getUserId(), \r\n $this->programId,\r\n\t\t$this->nacional\r\n );\r\n $commentQuestions = $this->Appraiser->getQuestions();\r\n $evaluationQuestions = DbTable_QuestionChecker::getInstance()->fetchAll('QuestionTypeId = 7', 'Designation');\r\n\r\n $V = array(\r\n 'questionsAvaliacao' => $evaluationQuestions,\r\n 'respostas' => $this->evaluationRow->getAnswers(),\r\n 'conclusao' => $this->evaluationRow->getConclusao(),\r\n );\r\n\r\n\r\n\r\n return $V;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "e549d301d1f94c74a06b80ac57e71c44", "score": "0.6100978", "text": "public function generatePO1s()\n\t{\n\t\t$body \t\t\t= parent::getPart();\n\t\t$po1s \t\t\t= array();\n\t\tfor ($i=0; $i < sizeof($body); $i++) { \n\t\t\tif (PO1::IsPO1array($body[$i])) {\n\t\t\t\t$temp \t= new PO1($body[$i]);\n\t\t\t\t$po1s[] = $temp;\n\t\t\t}\n\t\t}\n\t\treturn $po1s;\n\t}", "title": "" }, { "docid": "d06fcbf7f02f521e27c31d3cf68c4640", "score": "0.6063604", "text": "public function transformToDatabaseAppropriateArray() {\n $arr[\"registration\"] = $this->registration;\n $arr[\"make\"] = $this->make;\n $arr[\"color\"] = $this->color;\n $arr[\"year\"] = $this->year;\n $arr[\"price\"] = $this->price;\n\n return $arr;\n }", "title": "" }, { "docid": "6477486dd26b70fb982626debc65202f", "score": "0.59145904", "text": "function defineArrayModeloDeCarteiraAvancoins()\n{\n $carteira = array(\n 'id_colaborador' => 0,\n 'moedas' => 0,\n 'periodo_atual' => array(\n 'data_inicial' => '',\n 'data_final' => ''\n ),\n 'periodo_anterior' => array(\n 'data_inicial' => '',\n 'data_final' => ''\n ),\n 'mes_atual' => date('n'),\n 'data_atual' => date('Y-m-d'),\n 'horario_atual' => ''\n );\n\n return $carteira;\n\n}", "title": "" }, { "docid": "e537c6a1f114c28e555677269cfc2a8a", "score": "0.58792335", "text": "function to_array()\n\t{\n\t\treturn array(\n\t\t\t'id' => $this->get_id(),\n\t\t\t'etiqueta' => $this->get_etiqueta(),\n\t\t\t'proyecto' => $this->get_proyecto(),\n\t\t\t'proyecto_ref' => ' - ',\n\t\t\t'descripcion' => $this->get_descripcion(),\n\t\t\t'path_pm' => $this->get_path(),\n\t\t\t'tipo' => $this->get_tipo()\n\t\t);\n\t}", "title": "" }, { "docid": "f886445812b8f509204d3875b9b39ccd", "score": "0.5875972", "text": "public function freezerArray() {\n\tglobal $dbrw;\n\t$returnArray = array();\n\t$sql = \"select id_study,pennkey pi,owner,freezer,count(*) quantity,boxsize from billing_deposit group by id_study,pennkey,owner,freezer,boxsize\";\n\t$result = mysqli_query($dbrw,$sql);\n if (!$result) {\n print 'Could not run query: ' . mysqli_error();\n exit;\n }\n while ($row = mysqli_fetch_assoc($result)) {\n $returnArray[] = $row;\n }\n return $returnArray;\n }", "title": "" }, { "docid": "6c09e23fde51b38c2d222baf29b967ed", "score": "0.5846624", "text": "public function create($qtd) : array\n {\n $checks = [];\n $array = [];\n $sorteio = 1;\n if(self::LIMITE >= $qtd){\n while($this->cartela <= $qtd){\n for($i = 1; $i <= self::MARCADOR; $i++){\n $sorteio = $this->random(); \n if(!in_array($sorteio, $checks)){\n $checks[] = $sorteio; \n $array[$this->cartela][] = $sorteio; \n if(count($checks) == self::MARCADOR )\n $checks = [];\n }\n else{\n $sorteio = $this->inArrayNumber($sorteio, $checks);\n $checks[] = $sorteio; \n $array[$this->cartela][] = $sorteio; \n if(count($checks) == self::MARCADOR )\n $checks = [];\n } \n } \n $this->cartela++; \n }\n } \n return $array; \n }", "title": "" }, { "docid": "37616641b12dee9763d699461447278e", "score": "0.5845475", "text": "public static function initArray()\n {\n $arr = [];\n for ($i = 0; $i < 6; $i++) \n {\n $aa = array();\n for ($j = 0; $j < 7; $j++) \n {\n //initializing array values to '-'\n $aa[$j] = '-';\n }\n //pushing array to each row of 2d array\n array_push($arr, $aa);\n }\n return $arr;\n }", "title": "" }, { "docid": "ad63e0909ad942877c27804e8e31b731", "score": "0.58391166", "text": "protected abstract function build(): array;", "title": "" }, { "docid": "0ece559dcab6dccfc9abb483e75d8b70", "score": "0.5837883", "text": "function get_com_pro(){\r\n \r\n $this->get_probability(); \r\n \r\n $this->com_pro = array();\r\n $x = 0;\r\n foreach($this->probability as $key => $val) {\r\n $x+= $val;\r\n $this->com_pro[] = $x;\r\n $this->console.=\"PK[$key] : $x \\r\\n\";\r\n } \r\n //reset($this->probability);\r\n $this->com_pro;\r\n }", "title": "" }, { "docid": "badc6e51f0234d0474bdcac81d8cb892", "score": "0.58255804", "text": "public function generate(): array;", "title": "" }, { "docid": "c93bb7b15ba950623ba964c1c89dce08", "score": "0.582498", "text": "function createPointsArr(){\n\t\tif($this->getFieldContent('pointssystem')){\n\t\t\t$listArr = explode(\"\\r\\n\", $this->getFieldContent('points'));\n\t\t\t$length = count($listArr);\n\t\t\tfor($i=0; $i<$length; $i++){\n\t\t\t\t$pos1 = strpos($listArr[$i], '=');\n\t\t\t\t$pos2 = strpos($listArr[$i], '>');\n\t\t\t\tif($pos1 !== false && $pos2 !== false && $pos1 < $pos2){\n\t\t\t\t\t$question = substr(trim(substr($listArr[$i], 0, $pos1)), 8);\n\t\t\t\t\t$questionArr = $this->pi_getRecord('tx_simplesurvey_questions', $question);\n\t\t\t\t\t$question = $questionArr['question'];\n\t\t\t\t\t$answers = trim(substr($listArr[$i], $pos1+1, ($pos2-$pos1-1)));\n\t\t\t\t\t$points = trim(substr($listArr[$i], $pos2+1));\n\t\t\t\t\t$answerArr = explode(';', $answers);\n\t\t\t\t\tif(!isset($this->pointsArr[$question]['min'])){\n\t\t\t\t\t\t$this->pointsArr[$question]['min'] = $points;\n\t\t\t\t\t}else if($points < $this->pointsArr[$question]['min']){\n\t\t\t\t\t\t$this->pointsArr[$question]['min'] = $points;\n\t\t\t\t\t}\n\t\t\t\t\tif(!isset($this->pointsArr[$question]['max'])){\n\t\t\t\t\t\t$this->pointsArr[$question]['max'] = $points;\n\t\t\t\t\t}else if($points > $this->pointsArr[$question]['max']){\n\t\t\t\t\t\t$this->pointsArr[$question]['max'] = $points;\n\t\t\t\t\t}\n\t\t\t\t\tforeach($answerArr as $answer){\n\t\t\t\t\t\t$this->pointsArr[$question][$answer] = $points;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4c001bb74410451dfcfae099cc65437b", "score": "0.5821686", "text": "public function correctGenerationWithoutPriority(): array\n {\n return [\n [150.0, [[100.0, 250.0], [0.0, 250.0]]],\n [69.0, [[10.0, 50.0], [5.0, 50.0], [5.0, 50.0]]],\n [65.0, [[10.0, 50.0], [5.0, 50.0], [45.0, 50.0]]],\n [65.0, [[10.0, 50.0], [10.0, 50.0], [45.0, 50.0]]],\n [145.0, [[10.0, 50.0], [5.0, 50.0], [45.0, 50.0]]],\n [150.0, [[10.0, 50.0], [5.0, 50.0], [45.0, 50.0]]],\n [14.0, [[10.0, 50.0], [0.0, 50.0], [0.0, 50.0]]],\n [100.0, [[10.0, 50.0], [0.0, 50.0], [45.0, 50.0]]],\n [175.0, [[0.0, 50.0], [0.0, 50.0], [0.0, 100.0]]],\n [10000.0, [[100.0, 500.0], [500.0, 5000.0], [500.0, 4900.0]]],\n ];\n }", "title": "" }, { "docid": "854a730c74850085e2ccc99f7926e676", "score": "0.58191663", "text": "public function get_provincias_ant()\r\n {\r\n return [\r\n 0 => ['codigo' => 'AZU', 'Valor' => 'AZUAY'],\r\n 1 => ['codigo' => 'BOL', 'Valor' => 'BOLIVAR'],\r\n 2 => ['codigo' => 'CAN', 'Valor' => 'CANAR'],\r\n 3 => ['codigo' => 'CAR', 'Valor' => 'EL CARCHI'],\r\n 4 => ['codigo' => 'CHI', 'Valor' => 'CHIMBORAZO'],\r\n 5 => ['codigo' => 'COT ', 'Valor' => 'COTOPAXI'],\r\n 6 => ['codigo' => 'EOR', 'Valor' => 'EL ORO'],\r\n 7 => ['codigo' => 'ESM', 'Valor' => 'ESMERALDAS'],\r\n 8 => ['codigo' => 'GAL', 'Valor' => 'GALAPAGOS'],\r\n 9 => ['codigo' => 'GUA', 'Valor' => 'GUAYAS'],\r\n 10 => ['codigo' => 'IMB', 'Valor' => 'IMBABURA'],\r\n 11 => ['codigo' => 'LOJ ', 'Valor' => 'LOJA'],\r\n 12 => ['codigo' => 'LRS', 'Valor' => 'LOS RIOS'],\r\n 13 => ['codigo' => 'MOR', 'Valor' => 'MORONA SANTIAGO'],\r\n 14 => ['codigo' => 'NAP', 'Valor' => 'NAPO'],\r\n 15 => ['codigo' => 'ORE', 'Valor' => 'ORELLANA'],\r\n 16 => ['codigo' => 'PAS', 'Valor' => 'PASTAZA'],\r\n 17 => ['codigo' => 'PIC ', 'Valor' => 'PICHINCHA'],\r\n 18 => ['codigo' => 'STD', 'Valor' => 'SANTO DOMINGO'],\r\n 19 => ['codigo' => 'STE', 'Valor' => 'SANTA ELENA'],\r\n 20 => ['codigo' => 'SUC', 'Valor' => 'SUCUMBIOS'],\r\n 21 => ['codigo' => 'TUN', 'Valor' => 'TUNGURAHUA'],\r\n 22 => ['codigo' => 'ZAM', 'Valor' => 'ZAMORA CHINCHIPE']\r\n ];\r\n }", "title": "" }, { "docid": "80af090d18b3213d69b9e294c07ad45b", "score": "0.581107", "text": "function get_com_pro(){\n \n $this->get_probability(); \n \n $this->com_pro = array();\n $x = 0;\n foreach($this->probability as $key => $val) {\n $x+= $val;\n $this->com_pro[] = $x;\n $this->console.=\"PK[$key] : $x \\r\\n\";\n } \n //reset($this->probability);\n $this->com_pro;\n }", "title": "" }, { "docid": "8f8b5b824516cb7245cb0dc86794d7da", "score": "0.57909447", "text": "protected function getProvinciasArray()\n {\n $data = Provincia::orderBy('id_provincia')->lists('descripcion');\n foreach ($data as $key => $provincia) {\n $data[$key] = ucwords(mb_strtolower($provincia));\n }\n return $data;\n }", "title": "" }, { "docid": "455c898d9dc097c49a14a4028c196b88", "score": "0.57749194", "text": "protected function initializeResultArray() : array {}", "title": "" }, { "docid": "a5c91078489a7c1056ca09b46864d292", "score": "0.5757343", "text": "private static function tableToArrayOfPropositions($tableArr)\r\n {\r\n $propositions=array();\r\n $nbDePropositions=getIdPropMax($tableArr);\r\n for($i=1;$i<=$nbDePropositions;$i++)\r\n {\r\n $propositions[]=new propositionVoyage(tablePropositionToProposition(getElementsById($tableArr,$i)));\r\n }\r\n return $propositions;\r\n }", "title": "" }, { "docid": "0c990d88b186f6abb2059a8ff9a177d7", "score": "0.57505435", "text": "abstract protected function createContentArray(): array;", "title": "" }, { "docid": "83a191e94421ae0388df245033579662", "score": "0.5748501", "text": "public function BuildArray_forCart() {\n\t$ar = NULL;\n\twhile ($this->NextRow()) {\n\t $ar[$this->TypeID()] = $this->FieldValue();\n\t}\n\treturn $ar;\n }", "title": "" }, { "docid": "78764af5f84cc5977692fe7ee01ee645", "score": "0.57484967", "text": "public function getArray() {\n $noticia = array();\n\n $noticia['id'] = $this->getID();\n $noticia['seccion'] = $this->getSeccion();\n $noticia['idmoderador'] = $this->getIdModerador();\n $noticia['titulo'] = $this->getTitulo();\n $noticia['fecha'] = $this->getFecha();\n $noticia['texto'] = $this->gettexto();\n $noticia['imagepath'] = $this->getImagePath();\n\n return $noticia ;\n }", "title": "" }, { "docid": "1b4f652978079437ff9a35d7d90c7d61", "score": "0.57298386", "text": "public function CreateProductCatalogArray();", "title": "" }, { "docid": "95294cda14ba7fbfb074392ee7871aa6", "score": "0.57264984", "text": "public function getReportScrutiniAllBitnew(): array\n {\n $array = array();\n $array = $this->reportService->reportAllScrutiniCandidatiPrincipaliBitnew();\n return $array;\n }", "title": "" }, { "docid": "db1aafbeb74f0afeb9de35e1b5db45ed", "score": "0.57048786", "text": "public abstract function as_array();", "title": "" }, { "docid": "732c6024836f06c91d7c0f4d50b78506", "score": "0.57001203", "text": "public function createParams(): array;", "title": "" }, { "docid": "e1912424b69d3ae5ebd3189824d5db23", "score": "0.56989855", "text": "function getArrayCampos() {\n\t\t$arr = array(\n\t\t\t\"id\"=>$this->id,\n\t\t\t\"idpadre\"=>$this->idpadre,\n\t\t\t\"nombre\"=>$this->nombre,\n\t\t\t\"codigo\"=>$this->codigo,\n\t\t\t\"tooltip\"=>$this->tooltip,\n\t\t\t\"visible\"=>$this->visible,\n\t\t\t\"orden\"=>$this->orden,\n\t\t\t\"browseable\"=>$this->browseable,\n\t\t\t\"tipo_valores\"=>$this->tipo_valores,\n\t\t\t\"extensible\"=>$this->extensible,\n\t\t\t\"vocabulario\"=>$this->vocabulario,\n\t\t\t\"decimales\"=>$this->decimales\n\t\t);\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "5d16929879fe489fd5c1533d0b804cb3", "score": "0.56942505", "text": "public function getBasicCombinationData()\n {\n return array(\n array(array(\"test\"),\n array(array(\"test\"))),\n array(array(\"test\", \"best\"),\n array(array(\"test\", \"best\"))),\n array(array(array(true, false)),\n array(array(true),\n array(false))),\n array(array(\"test\", array(true, false)),\n array(array(\"test\", true),\n array(\"test\", false))),\n array(array(array(true, false), \"test\"),\n array(array(true, \"test\"),\n array(false, \"test\")))\n );\n }", "title": "" }, { "docid": "2d9514ae7dfc4d2ab64a019d53859398", "score": "0.5693164", "text": "function setArrPro()\n\t{\n\t\tself::$_arr=array('id','title','type_id','kind_id','price','address','town_id','area_id',\n\t\t\t\t'living_space','rooms','bath_room','toilets','floor','advantages','description',\n\t\t\t\t'published','ordering','emphasis','date_created','checked_out','direction_id',\n\t\t\t\t'contact_name','contact_address', 'contact_phone', 'project_id' , 'living_width',\n\t\t\t\t'living_length','project_type_id','legal_id','currency_id','area_unit_id',\n\t\t\t\t'new_sest','realtor_id', 'map_lat' ,'map_lng' , 'success' ,'kind_value' ,'town_value');\n\t}", "title": "" }, { "docid": "20e2389f2e53bea282b4ffac8b7d4aef", "score": "0.5690823", "text": "function createWthSubArray() {\n\t\t\n\t\t$ret[\"yrdoyw\"] = \"\";\n\t\t$ret[\"srad\"] = \"\";\n\t\t$ret[\"tmax\"] = \"\";\n\t\t$ret[\"tmin\"] = \"\";\n\t\t$ret[\"rain\"] = \"\";\n\t\t$ret[\"tdew\"] = \"\";\n\t\t$ret[\"windsp\"] = \"\";\n\t\t$ret[\"par\"] = \"\";\n\t\t\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "0f7df83fb6ba58df58a5871763a67051", "score": "0.5685425", "text": "private function to_array() {\n\t\t$values = array(\n\t\t\t'id' => $this -> id,\n\t\t\t'code' => $this -> code,\n\t\t\t'software_type_id' => $this -> software_type_id,\n\t\t\t'software_status_id' => $this -> software_status_id,\n\t\t\t'person_id' => $this -> person_id,\n\t\t\t'is_bought' => $this -> is_bought);\n\t\treturn $values;\n\t}", "title": "" }, { "docid": "2496927be1cd8c1b09a62b6d684c21a4", "score": "0.5652496", "text": "protected function getdbce155f9c0e95dbd4bfbfaadab27eb79915789fa80c6c65068ccf60c9ef9e18(): array\n {\n return [];\n }", "title": "" }, { "docid": "2496927be1cd8c1b09a62b6d684c21a4", "score": "0.5652496", "text": "protected function getdbce155f9c0e95dbd4bfbfaadab27eb79915789fa80c6c65068ccf60c9ef9e18(): array\n {\n return [];\n }", "title": "" }, { "docid": "3eaf318719ea2c8893c4b01f39818561", "score": "0.56523174", "text": "public function toCreateArray()\n {\n if (method_exists($this, 'toArray')) {\n return $this->toArray();\n } else {\n return $this->__toArray();\n }\n }", "title": "" }, { "docid": "13f4933e7cc3e05bd96ec25214c778f5", "score": "0.56517255", "text": "protected function getStandardConjugation(){\n return array();\n }", "title": "" }, { "docid": "b774f057ffbaea13560e224b3b8786aa", "score": "0.5646556", "text": "public function toArray(): array\n {\n return $this->isValid() ? \\array_filter([\n $this->platePrefix,\n $this->plateNumber,\n $this->plateSuffix,\n ]) : [];\n }", "title": "" }, { "docid": "0fa5614da0afceb8a1b0029b3ce8d8c5", "score": "0.56443846", "text": "function toArray() {\n $arr = array(\n 0=>$this->phonebook_id,\n 1=>$this->number,\n 2=>$this->description,\n 'phonebook_id'=>$this->phonebook_id,\n 'number'=>$this->number,\n 'description'=>$this->description\n );\n\n return $arr;\n }", "title": "" }, { "docid": "15ff75fbf7110af1afd89b567227af0c", "score": "0.5638714", "text": "protected function _getInitial()\n {\n return array();\n }", "title": "" }, { "docid": "f4e3446c64afdae2480f4c450da701e7", "score": "0.5632949", "text": "public function getArrayCaratteristiche() { \n \n $array = array(\n 'Name' => $this->getTitle(), \n 'ShortDescription' => strip_tags($this->getShortDescription()),\n 'LongDescription' => strip_tags($this->getLongDescription()),\n 'Price' => ($this->getSpecialPrice() == null) ? $this->getPrice() : $this->getSpecialPrice(),\n 'OriginalPrice' => $this->getPrice(),\n 'Code' => $this->getSku(),\n 'Link' => $this->getLink().\"?utm_source=trovaprezzi&utm_medium=cpc&utm_term=\".$this->getSku().\"&utm_campaign=trovaprezzippc\",\n 'Stock' => $this->getAvailability() ? intval($this->getStockQty()) : 0,\n 'Categories' => $this->getPathCategoria(','), \n 'Image' => $this->getImageLink(), \n 'ShippingCost' => $this->costoSpedizione(), \n 'EanCode' => $this->getEan(),\n 'ShippingDays' => $this->getShippingDays(),\n ); \n \n if($this->getBrand() != false) { \n $array[\"Brand\"] = $this->getBrand();\n }\n \n return $array;\n }", "title": "" }, { "docid": "4c6f73f73806926583a8b0c7b7608b6b", "score": "0.56235486", "text": "private function prepareProductArray()\n {\n $this->products[0]['title'] = \"Product 1\";\n $this->products[0]['code'] = \"P0001\";\n $this->products[0]['quantity'] = 2;\n $this->products[0]['price'] = 100.00;\n $this->products[1]['title'] = \"Product 2\";\n $this->products[1]['code'] = \"P0002\";\n $this->products[1]['quantity'] = 1;\n $this->products[1]['price'] = 50.00;\n }", "title": "" }, { "docid": "cc99eb5a0f116cca44aec2470951efec", "score": "0.56202084", "text": "public function getArray():array {\n //create array to contain business objects data\n $arr=array();\n $i=0; //count of number of Object parameters read into array.\n foreach($this as $key => $value){\n if($i<$this->getObjectNumOfFields()){\n $arr[$key]=$value;\n $i++;\n }\n }\n return $arr;\n }", "title": "" }, { "docid": "d1f139919a764bff63b97de28f11103b", "score": "0.56179756", "text": "public function contruct_data_arrays() {\r\n\r\n\t\t\t$arrays = $event_array = $venue_array = $organizer_array = [];\r\n\r\n\t\t\tif( $this->ov == \"venue\" ) {\r\n\r\n\t\t\t\t$venue_array = $this->construct_venue_array();\r\n\r\n\t\t\t} elseif( $this->ov == \"organizer\" ) {\r\n\r\n\t\t\t\t$organizer_array = $this->construct_organizer_array();\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$event_array = $this->construct_event_array();\r\n\t\t\t\t$venue_array = $this->construct_venue_array();\r\n\t\t\t\t$organizer_array = $this->construct_organizer_array();\t\r\n\r\n\t\t\t}\r\n\r\n\t\t\t$arrays[\"event\"] = $event_array ? $event_array : null;\r\n\t\t\t$arrays[\"organizer\"] = $organizer_array ? $organizer_array : null;\r\n\t\t\t$arrays[\"venue\"] = $venue_array ? $venue_array : null;\r\n\r\n\t\t\treturn $arrays;\r\n\r\n\t\t}", "title": "" }, { "docid": "389f65ee45e82e20aea488222a495914", "score": "0.56036234", "text": "public static function providerEncodeArray()\n {\n return array(\n array( array('lessThanExpression'=>'4 < 9'), array('lessThanExpression'=>'4 &lt; 9') ),\n array( array(array('lessThanExpression'=>'4 < 9')), array(array('lessThanExpression'=>'4 &lt; 9')) ),\n array( array(array('lessThanExpression'=>'4 < 9'), 'greaterThanExpression'=>'4 > 9'), array(array('lessThanExpression'=>'4 &lt; 9'), 'greaterThanExpression'=>'4 &gt; 9') )\n );\n }", "title": "" }, { "docid": "e06dccceb8d53fd4ec4da35db5f37a78", "score": "0.56012344", "text": "public function ridiciVPraciAsArray() {\n $result = $this->ridiciVPraci();\n $ridici = array();\n foreach ($result as $key => $value) {\n $ridici[$value['idRidic']] = $value['prezdivka'];\n }\n return $ridici;\n }", "title": "" }, { "docid": "22c7d2e0b385c64dfcf90142d2cf7259", "score": "0.5582689", "text": "function getAllProduits()\n{\n \n $sReq = \" SELECT PDT_CODE, PDT_LIBELLE\n FROM PRODUIT \";\n $rstPdt = mysql_query($sReq) ;\n $iNb = 0 ;\n $lesProduits = array() ;\n while ($uneLigne = mysql_fetch_assoc($rstPdt) )\n {\n $iNb = $iNb + 1 ;\n $lesProduits[$iNb] = $uneLigne ;\n }\n return ($lesProduits) ;\n}", "title": "" }, { "docid": "d682773e3c48b31fb7589f9948c6f9d4", "score": "0.55752313", "text": "abstract protected function getCouponArray();", "title": "" }, { "docid": "64c2123073d24458cbff38c1605ec3d3", "score": "0.556946", "text": "function createWthArray() {\n\t\t\n\t\t$ret[\"address\"] = \"\";\n\t\t$ret[\"inste\"] = \"\";\n\t\t$ret[\"sitee\"] = \"\";\n\t\t$ret[\"xlat\"] = \"\";\n\t\t$ret[\"xlong\"] = \"\";\n\t\t$ret[\"elev\"] = \"\";\n\t\t$ret[\"tav\"] = \"\";\n\t\t$ret[\"tamp\"] = \"\";\n\t\t$ret[\"refht\"] = \"\";\n\t\t$ret[\"wndht\"] = \"\";\n\t\t$ret[\"daily\"] = array();\n\t\t\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "5de6853d22ef57e4de51478dc08aad81", "score": "0.5568022", "text": "public function validManArrayCases(): array\n {\n return [['valid-array', null, ['one' => '1', 'two' => '2', 'three' => '3']],\n ['null.array', [], []]];\n }", "title": "" }, { "docid": "3cf9990e8b3f7635cfe51e8b3bd9d8a3", "score": "0.5564838", "text": "function createArray($n) {\n\t\t$arr = [];\n\n\t\tfor ($i = 0; $i <= $n; $i++) {\n\t\t\t$arr[] = pow($i, 2);\n\t\t}\n\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "1c2647b47174080f906aeef1b18b63c9", "score": "0.5558944", "text": "public function build(): array\n {\n foreach ($this->items as &$value) {\n if ($this->isFizzBuzz($value)) {\n $value = self::FIZZ_BUZZ;\n continue;\n }\n\n if ($this->isFizz($value)) {\n $value = self::FIZZ;\n continue;\n }\n\n if ($this->isBuzz($value)) {\n $value = self::BUZZ;\n continue;\n }\n }\n\n return $this->items;\n }", "title": "" }, { "docid": "70e1ac30cdb7fb392f9d38eda9853940", "score": "0.5557305", "text": "public function getBcc(): array;", "title": "" }, { "docid": "9aa66ca8984d31a20e391b9f88e03231", "score": "0.555325", "text": "private function to_array() {\n\t\t$values = array(\n\t\t\t'id' => $this -> id,\n\t\t\t'serial' => $this -> serial,\n\t\t\t'person_id' => $this -> person_id,\n\t\t\t'is_spare' => $this -> is_spare,\n\t\t\t'key_type_id' => $this -> key_type_id,\n\t\t\t'key_status_id' => $this -> key_status_id);\n\t\treturn $values;\n\t}", "title": "" }, { "docid": "c9572c592c079ba6157abfc6e800c620", "score": "0.5552284", "text": "public function provider_constructor()\n\t{\n\t\treturn [\n\t\t\t[[''], '', 0],\n\t\t\t[[':a'], ':a', 0],\n\n\t\t\t[[':a', NULL], ':a', 0],\n\t\t\t[[':a', []], ':a', 0],\n\t\t\t[[':a', [':a' => 'b']], 'b', 0],\n\t\t\t[[':a :b', [':a' => 'c', ':b' => 'd']], 'c d', 0],\n\n\t\t\t[[':a', NULL, 5], ':a', 5],\n\t\t\t// #3358\n\t\t\t[[':a', NULL, '3F000'], ':a', '3F000'],\n\t\t\t// #3404\n\t\t\t[[':a', NULL, '42S22'], ':a', '42S22'],\n\t\t\t// #3927\n\t\t\t[[':a', NULL, 'b'], ':a', 'b'],\n\t\t\t// #4039\n\t\t\t[[':a', NULL, '25P01'], ':a', '25P01'],\n\t\t];\n\t}", "title": "" }, { "docid": "908c5fc4f07fc41a56cce46ff4fed7b2", "score": "0.5552054", "text": "public function fromCartaToArray(){\n\t\t$paramsCarta = array();\n\t\tarray_push($paramsCarta, $this->nombre);\n\t\tarray_push($paramsCarta, $this->descripcion);\n\t\tarray_push($paramsCarta, $this->hp);\n\t\tarray_push($paramsCarta, $this->energia);\n\t\tarray_push($paramsCarta, $this->tipo);\n\t\tarray_push($paramsCarta, $this->habilidades);\n\t\treturn $paramsCarta;\n\t}", "title": "" }, { "docid": "2b0bf2340c56b17476b99badc2f07019", "score": "0.55468297", "text": "function toArray() ;", "title": "" }, { "docid": "2b0bf2340c56b17476b99badc2f07019", "score": "0.55465895", "text": "function toArray() ;", "title": "" }, { "docid": "1c8f435158c7de068d50a286af313288", "score": "0.5531565", "text": "public function toArray() { \n return array(\t\tself::FIELD_IDPADRE=>$this->getIDPADRE(),\n\t\tself::FIELD_NOMBRE=>$this->getNOMBRE(),\n\t\tself::FIELD_POSICION=>$this->getPOSICION(),\n\t\tself::FIELD_DEPENDIENTE=>$this->getDEPENDIENTE(),\n\t\tself::FIELD_MODULO=>$this->getMODULO(),\n\t\tself::FIELD_DESCRIPCION=>$this->getDESCRIPCION(),\n\t\tself::FIELD_FILEMANUAL=>$this->getFILEMANUAL());\n\t\t}", "title": "" }, { "docid": "a1a5a5634f7adcbf15a3b5c060864ab1", "score": "0.5525068", "text": "function genChecedkArray($target) {\r\n //i=3~4 will never use in this product\r\n\t$data = array();\r\n\tfor ($i=0; $i<=6; $i++) {\r\n if (in_array($i, $target)===true) {\r\n $data[$i] = 'CHECKED'; \r\n }\r\n else { $data[$i] = ''; }\r\n }\r\n return $data;\t\r\n}", "title": "" }, { "docid": "676aded155092d248935af9930488f6b", "score": "0.5524748", "text": "public function to_array()\r\n {\r\n $array[Comment::get_id_index()] = $this->id;\r\n $array[Comment::get_device_id_index()] = $this->device_id;\r\n $array[Comment::get_device_folder_index()] = $this->device_folder;\r\n $array[Comment::get_poznamka_index()] = $this->poznamka;\r\n $array[Comment::get_aktivni_index()] = ($this->aktivni != false ? 1 : 0);//$this->aktivni;\r\n //echo \"count array comment=\".count($array);\r\n return $array;\r\n }", "title": "" }, { "docid": "ce415723b6aaa84cf2af42fbe95908e0", "score": "0.5522198", "text": "function get_beneficiary_array (){\n return $this->beneficiary_array ;\n }", "title": "" }, { "docid": "417cc5c4ab112687c60a783ce2e53461", "score": "0.55208", "text": "public function createArray(){\n \tself::itterateNumberArray($this->array, \"\", $this->numbers);\n\t\tforeach ($this->numbers as $key => $value) {\n\t\t $subarray = explode(\" \",$value); \n\t\t if(sizeof($subarray) > 2){\n\t\t unset($subarray[0]);\n\t\t if(sizeof($subarray) == 2){\n\t\t foreach ($this->arrayop1 as $arrayop1key => $arrayop1value) {\n\t\t $ops = self::addoperators($subarray, $arrayop1value);\n\t\t if($ops != 0)\n\t\t array_push($this->arraytocalculate, $ops);\n\t\t }\n\t\t }\n\t\t if(sizeof($subarray) == 3){\n\t\t foreach ($this->arrayop2 as $arrayop2key => $arrayop2value) {\n\t\t $ops = self::addoperators($subarray, $arrayop2value);\n\t\t if($ops != 0)\n\t\t array_push($this->arraytocalculate, $ops);\n\t\t }\n\t\t }\n\t\t if(sizeof($subarray) == 4){\n\t\t foreach ($this->arrayop3 as $arrayop3key => $arrayop3value) {\n\t\t $ops = self::addoperators($subarray, $arrayop3value);\n\t\t if($ops != 0)\n\t\t array_push($this->arraytocalculate, $ops);\n\t\t }\n\t\t }\n\t\t if(sizeof($subarray) == 5){\n\t\t foreach ($this->arrayop4 as $arrayop4key => $arrayop4value) {\n\t\t $ops = self::addoperators($subarray, $arrayop4value);\n\t\t if($ops != 0)\n\t\t array_push($this->arraytocalculate, $ops);\n\t\t }\n\t\t }\n\t\t if(sizeof($subarray) == 6){\n\t\t foreach ($this->arrayop5 as $arrayop5key => $arrayop5value) {\n\t\t $ops = self::addoperators($subarray, $arrayop5value);\n\t\t if($ops != 0)\n\t\t array_push($this->arraytocalculate, $ops);\n\t\t }\n\t\t }\n\t\t }\n\t\t}\n }", "title": "" }, { "docid": "e1b8bc376615a57f7e76b540b18c5b1c", "score": "0.5516134", "text": "protected function createClassArray ()\n {\n $this->class_reflection = new \\ReflectionClass($this->class_name);\n\n $doc_comment = $this->class_reflection->getDocComment();\n $this->class_atr_list = $this->createArray($doc_comment);\n }", "title": "" }, { "docid": "5cf5ee0b66e00c855195c24b568c32fc", "score": "0.55154246", "text": "public function getArray() {}", "title": "" }, { "docid": "75d7739cc6c29f801ef756f6fd828bf3", "score": "0.5513603", "text": "public function toArray(): array\n {\n return [\n null => __('-- wybierz --'),\n 'BLP' => __('BLP'),\n 'ZBLP' => __('ZBLP'),\n 'LP' => __('LP'),\n 'LBLP' => __('LBLP')\n ];\n }", "title": "" }, { "docid": "a5269c7c473e670a4cebd13b6bf36d96", "score": "0.55080736", "text": "public function toArray() {\n\t\treturn array(\n\t\t\tself::FIELD_ID_C_PROJEKT=>$this->getIdCProjekt(),\n\t\t\tself::FIELD_RAZENI=>$this->getRazeni(),\n\t\t\tself::FIELD_KOD=>$this->getKod(),\n\t\t\tself::FIELD_TEXT=>$this->getText(),\n\t\t\tself::FIELD_PLNY_TEXT=>$this->getPlnyText(),\n\t\t\tself::FIELD_VALID=>$this->getValid());\n\t}", "title": "" }, { "docid": "27029ed5722b30bfc6f4d3552c96166b", "score": "0.5501158", "text": "public function to_array(): array;", "title": "" }, { "docid": "132a597335c87a11b82fff7c7277cd1d", "score": "0.54993296", "text": "public function getPrependArrayData()\n {\n return array(array(array(array(array(\"b\"),\n array(\"c\")),\n array(1, 2)),\n array(array(1, \"b\"),\n array(1, \"c\"),\n array(2, \"b\"),\n array(2, \"c\"))),\n\n array(array(array(array(12),\n array(-1)),\n array(true, false)),\n array(array(true, 12),\n array(true, -1),\n array(false, 12),\n array(false, -1))),\n );\n }", "title": "" }, { "docid": "1ec42907603760ce937c2b6eaa9b7df6", "score": "0.5491174", "text": "public function correctGenerationWithPriority(): array\n {\n return [\n [\n 65.0,\n [\n '1' => ['from' => 10.0, 'to' => 50.0, 'priority' => 3],\n '2' => ['from' => 5.0, 'to' => 50.0, 'priority' => 1],\n '3' => ['from' => 35.0, 'to' => 50.0, 'priority' => 1]\n ],\n []\n ],\n [\n 65.0,\n [\n '1' => ['from' => 10.0, 'to' => 50.0, 'priority' => 3],\n '2' => ['from' => 5.0, 'to' => 50.0, 'priority' => 100],\n '3' => ['from' => 35.0, 'to' => 50.0, 'priority' => 1]\n ],\n []\n ],\n [\n 50.0,\n [\n '1' => ['from' => 10.0, 'to' => 50.0, 'priority' => 3],\n '2' => ['from' => 5.0, 'to' => 50.0, 'priority' => 100],\n '3' => ['from' => 35.0, 'to' => 50.0, 'priority' => 1]\n ],\n []\n ],\n [\n 70.0,\n [\n '1' => ['from' => 0.0, 'to' => 50.0, 'priority' => 3],\n '2' => ['from' => 0.0, 'to' => 50.0, 'priority' => 100],\n '3' => ['from' => 35.0, 'to' => 50.0, 'priority' => 1],\n '4' => ['from' => 0.0, 'to' => 50.0, 'priority' => 1],\n '5' => ['from' => 0.0, 'to' => 50.0, 'priority' => 2],\n ],\n [3, 4]\n ],\n [\n 599.0,\n [\n '1' => ['from' => 0.0, 'to' => 600.0, 'priority' => 3],\n '2' => ['from' => 0.0, 'to' => 500.0, 'priority' => 100],\n '3' => ['from' => 0.0, 'to' => 50.0, 'priority' => 1],\n '4' => ['from' => 0.0, 'to' => 50.0, 'priority' => 1],\n '5' => ['from' => 0.0, 'to' => 50.0, 'priority' => 0],\n ],\n [3, 4, 1]\n ],\n [\n 601.0,\n [\n '1' => ['from' => 0.0, 'to' => 600.0, 'priority' => 3],\n '2' => ['from' => 0.0, 'to' => 500.0, 'priority' => 0],\n '3' => ['from' => 0.0, 'to' => 50.0, 'priority' => 2],\n '4' => ['from' => 0.0, 'to' => 600.0, 'priority' => 1],\n '5' => ['from' => 0.0, 'to' => 50.0, 'priority' => 0],\n ],\n [4, 3]\n ]\n ];\n }", "title": "" }, { "docid": "b5ac54265783a5c15ae5ffb580b69d7e", "score": "0.5490366", "text": "public function getArray() {\r\n $Manufacturer = Factory::Create(\"Manufacturer\", $this->manufacturer_id);\r\n $Arrangement = Factory::Create(\"WheelArrangement\", $this->wheel_arrangement_id); #new WheelArrangement($this->wheel_arrangement_id); \r\n $Type = Factory::Create(\"Type\", $this->type_id); #new Type($this->type_id);\r\n \r\n return array(\r\n \"id\" => $this->id,\r\n \"name\" => $this->name,\r\n \"desc\" => $this->desc,\r\n \"type\" => $Type->getArray(),\r\n \"introduced\" => $this->introduced,\r\n \"weight\" => $this->weight,\r\n \"axle_load\" => $this->axle_load,\r\n \"tractive_effort\" => $this->tractive_effort,\r\n \"wheel_arrangement\" => $Arrangement->getArray(),\r\n \"manufacturer\" => $Manufacturer->getArray(),\r\n \"url\" => $this->url->getURLs()\r\n );\r\n }", "title": "" }, { "docid": "a6ec65b646cc205a4ca716e7b797a06b", "score": "0.54878706", "text": "function getBricks() : array ;", "title": "" }, { "docid": "0091b0889c7e59815497e73341697746", "score": "0.5482291", "text": "public function to_array()\n {\n }", "title": "" }, { "docid": "d1a14acb1ef2fe27f275585493eac122", "score": "0.5481898", "text": "public function toMultiLineArray();", "title": "" }, { "docid": "0091b0889c7e59815497e73341697746", "score": "0.5481041", "text": "public function to_array()\n {\n }", "title": "" }, { "docid": "0091b0889c7e59815497e73341697746", "score": "0.5481041", "text": "public function to_array()\n {\n }", "title": "" }, { "docid": "0091b0889c7e59815497e73341697746", "score": "0.54807603", "text": "public function to_array()\n {\n }", "title": "" }, { "docid": "0091b0889c7e59815497e73341697746", "score": "0.54807603", "text": "public function to_array()\n {\n }", "title": "" }, { "docid": "0091b0889c7e59815497e73341697746", "score": "0.54807603", "text": "public function to_array()\n {\n }", "title": "" }, { "docid": "37cc0d6ce397de38c727135595e7bfb2", "score": "0.5477566", "text": "public function toComponentValueArray();", "title": "" }, { "docid": "78389cda29cb69b859b9b715bf5124be", "score": "0.54710317", "text": "public static function getRevistaProminotas(){\r\n\t\treturn array(\r\n\t\t\t'1'=>'En el último año',\r\n\t\t\t'2'=>'En los últimos dos años',\r\n\t\t\t'3'=>'Hace más de dos años',\r\n\t\t\t'4'=>'Nunca la ha recibido',\r\n\t\t\t);\r\n\r\n\t}", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.5471001", "text": "public function asArray();", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.5471001", "text": "public function asArray();", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.5471001", "text": "public function asArray();", "title": "" }, { "docid": "cbaeba391728ac360cea3a1365d0aa0f", "score": "0.54695606", "text": "function generarArray($cadena_){ // metodo que separa la los caracteres de la cadena en arreglos\r\n $r = array();\r\n for($i=0; $i<strlen($cadena_); $i++) \r\n $r[$i] = $cadena_[$i];\r\n return $r;\r\n}", "title": "" }, { "docid": "8f3c02bfd07028b9434310ca040e7350", "score": "0.54663837", "text": "public function toArray(): array ;", "title": "" }, { "docid": "a87030496b977ad8f85a477b7fc60769", "score": "0.5460835", "text": "public function createKeyArray(){\n\t$keyArray = array();\n\tif (isset($this->id)) $keyArray[\"id\"] = (int)$this->id;\n\tif (isset($this->descrizione)) $keyArray[\"descrizione\"] = $this->descrizione;\n\tif (isset($this->date)) $keyArray[\"date\"] = $this->date;\n\treturn $keyArray;\n}", "title": "" }, { "docid": "784726d8b1b10631b1effbf60c52b335", "score": "0.5459917", "text": "abstract public function cascadable() : array;", "title": "" }, { "docid": "271621668421289dbea8d53f648cda64", "score": "0.54576683", "text": "function avail_arr_gen($db_conn, $date) {\r\n\t\t$query = \"SELECT p_code, name FROM project WHERE status = 1\";\r\n\r\n\t\t$result = mysqli_query($db_conn, $query) or (mysqli_info());\r\n\r\n\t\t$available = array();\r\n\r\n\t\twhile($row=mysqli_fetch_row($result)) {\r\n\t\t\t$status = avail_for_atten($row[0], $date, $db_conn);\r\n\t\t\tif($status) {\r\n\t\t\t\t$available[] = array($row[0], $row[1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $available;\r\n\t}", "title": "" }, { "docid": "793dce4adbe485b235a054e1be8fb36e", "score": "0.54574305", "text": "function createArray()\r\n\t{\r\n\t\t$xml = $this->xml;\r\n\t\t$values = array();\r\n\t\t$index = array();\r\n\t\t$array = array();\r\n\t\t$parser = xml_parser_create();\r\n\t\txml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\r\n\t\txml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\r\n\t\txml_parse_into_struct($parser, $xml, $values, $index);\r\n\t\txml_parser_free($parser);\r\n\t\t$i = 0;\r\n\t\t$name = $values[$i]['tag'];\r\n\t\t$array[$name] = isset($values[$i]['attributes']) ? $values[$i]['attributes'] : '';\r\n\t\t$array[$name] = $this->_struct_to_array($values, $i);\r\n\t\treturn $array;\r\n\t}", "title": "" }, { "docid": "c97d74eee4a123a5570107c3f1b9b513", "score": "0.5446246", "text": "private function _createObjects(){\n$beers = $this->_DbTable();// see below 3#private method\n$obj = [];\nfor($i = 0; $i < $this->howMany; $i++) //depend... \n{\n$beer = $beers[$i]; //for each loop we gonna pull one array from the array of arrays builded in _DbTable method\n$obj[$i] = new Product($beer['Name'], $beer['Price'], $_SESSION[\"val$i\"]);//for eche loop we gonna make one product with data from array we pulled line above\n}\nreturn $obj; // we are returning the array of objects\n}", "title": "" }, { "docid": "9681b3ec0d0190fddc7e643aea0847ed", "score": "0.5441336", "text": "public abstract function toArray () : array;", "title": "" }, { "docid": "1e49ac47e3a5da981afbee72d7d37c99", "score": "0.54413027", "text": "public function pack(): array;", "title": "" }, { "docid": "96d597eb442d83ec9d9c5882095d357d", "score": "0.54403114", "text": "static function ProofTalksToArray($ProofTalks = null)\r\n {\r\n if ($ProofTalks === null)\r\n {\r\n return null;\r\n }\r\n else\r\n {\r\n $ProofTalksArray = array();\r\n\r\n $ProofTalksArray['id'] = $ProofTalks->getId(); \r\n $ProofTalksArray['idOwner'] = $ProofTalks->getIdOwner();\r\n $ProofTalksArray['idGodFather'] = $ProofTalks->getIdGodFather();\r\n $ProofTalksArray['idGodMother'] = $ProofTalks->getIdGodMother();\r\n $ProofTalksArray['idChurch'] = $ProofTalks->getIdChurch();\r\n $ProofTalksArray['type'] = $ProofTalks->getType();\r\n\r\n return $ProofTalksArray;\r\n }\r\n }", "title": "" }, { "docid": "10f5929044e4a5f79b017a7b742bb507", "score": "0.54371524", "text": "public function calculateAllPossibilitiesProvider()\n {\n return array(\n array(\n new Subject(\n array(\n 'name' => 'Mario',\n 'surname' => 'Rossi',\n 'birthDate' => '1985-12-10',\n 'gender' => 'M',\n 'belfioreCode' => 'A562',\n )\n ),\n array(\n 'RSSMRA85T10A562S',\n 'RSSMRA85T10A56NH',\n 'RSSMRA85T10A5S2E',\n 'RSSMRA85T10A5SNT',\n 'RSSMRA85T10AR62N',\n 'RSSMRA85T10AR6NC',\n 'RSSMRA85T10ARS2Z',\n 'RSSMRA85T10ARSNO',\n 'RSSMRA85T1LA562V',\n 'RSSMRA85T1LA56NK',\n 'RSSMRA85T1LA5S2H',\n 'RSSMRA85T1LA5SNW',\n 'RSSMRA85T1LAR62Q',\n 'RSSMRA85T1LAR6NF',\n 'RSSMRA85T1LARS2C',\n 'RSSMRA85T1LARSNR',\n 'RSSMRA85TM0A562D',\n 'RSSMRA85TM0A56NS',\n 'RSSMRA85TM0A5S2P',\n 'RSSMRA85TM0A5SNE',\n 'RSSMRA85TM0AR62Y',\n 'RSSMRA85TM0AR6NN',\n 'RSSMRA85TM0ARS2K',\n 'RSSMRA85TM0ARSNZ',\n 'RSSMRA85TMLA562G',\n 'RSSMRA85TMLA56NV',\n 'RSSMRA85TMLA5S2S',\n 'RSSMRA85TMLA5SNH',\n 'RSSMRA85TMLAR62B',\n 'RSSMRA85TMLAR6NQ',\n 'RSSMRA85TMLARS2N',\n 'RSSMRA85TMLARSNC',\n 'RSSMRA8RT10A562E',\n 'RSSMRA8RT10A56NT',\n 'RSSMRA8RT10A5S2Q',\n 'RSSMRA8RT10A5SNF',\n 'RSSMRA8RT10AR62Z',\n 'RSSMRA8RT10AR6NO',\n 'RSSMRA8RT10ARS2L',\n 'RSSMRA8RT10ARSNA',\n 'RSSMRA8RT1LA562H',\n 'RSSMRA8RT1LA56NW',\n 'RSSMRA8RT1LA5S2T',\n 'RSSMRA8RT1LA5SNI',\n 'RSSMRA8RT1LAR62C',\n 'RSSMRA8RT1LAR6NR',\n 'RSSMRA8RT1LARS2O',\n 'RSSMRA8RT1LARSND',\n 'RSSMRA8RTM0A562P',\n 'RSSMRA8RTM0A56NE',\n 'RSSMRA8RTM0A5S2B',\n 'RSSMRA8RTM0A5SNQ',\n 'RSSMRA8RTM0AR62K',\n 'RSSMRA8RTM0AR6NZ',\n 'RSSMRA8RTM0ARS2W',\n 'RSSMRA8RTM0ARSNL',\n 'RSSMRA8RTMLA562S',\n 'RSSMRA8RTMLA56NH',\n 'RSSMRA8RTMLA5S2E',\n 'RSSMRA8RTMLA5SNT',\n 'RSSMRA8RTMLAR62N',\n 'RSSMRA8RTMLAR6NC',\n 'RSSMRA8RTMLARS2Z',\n 'RSSMRA8RTMLARSNO',\n 'RSSMRAU5T10A562P',\n 'RSSMRAU5T10A56NE',\n 'RSSMRAU5T10A5S2B',\n 'RSSMRAU5T10A5SNQ',\n 'RSSMRAU5T10AR62K',\n 'RSSMRAU5T10AR6NZ',\n 'RSSMRAU5T10ARS2W',\n 'RSSMRAU5T10ARSNL',\n 'RSSMRAU5T1LA562S',\n 'RSSMRAU5T1LA56NH',\n 'RSSMRAU5T1LA5S2E',\n 'RSSMRAU5T1LA5SNT',\n 'RSSMRAU5T1LAR62N',\n 'RSSMRAU5T1LAR6NC',\n 'RSSMRAU5T1LARS2Z',\n 'RSSMRAU5T1LARSNO',\n 'RSSMRAU5TM0A562A',\n 'RSSMRAU5TM0A56NP',\n 'RSSMRAU5TM0A5S2M',\n 'RSSMRAU5TM0A5SNB',\n 'RSSMRAU5TM0AR62V',\n 'RSSMRAU5TM0AR6NK',\n 'RSSMRAU5TM0ARS2H',\n 'RSSMRAU5TM0ARSNW',\n 'RSSMRAU5TMLA562D',\n 'RSSMRAU5TMLA56NS',\n 'RSSMRAU5TMLA5S2P',\n 'RSSMRAU5TMLA5SNE',\n 'RSSMRAU5TMLAR62Y',\n 'RSSMRAU5TMLAR6NN',\n 'RSSMRAU5TMLARS2K',\n 'RSSMRAU5TMLARSNZ',\n 'RSSMRAURT10A562B',\n 'RSSMRAURT10A56NQ',\n 'RSSMRAURT10A5S2N',\n 'RSSMRAURT10A5SNC',\n 'RSSMRAURT10AR62W',\n 'RSSMRAURT10AR6NL',\n 'RSSMRAURT10ARS2I',\n 'RSSMRAURT10ARSNX',\n 'RSSMRAURT1LA562E',\n 'RSSMRAURT1LA56NT',\n 'RSSMRAURT1LA5S2Q',\n 'RSSMRAURT1LA5SNF',\n 'RSSMRAURT1LAR62Z',\n 'RSSMRAURT1LAR6NO',\n 'RSSMRAURT1LARS2L',\n 'RSSMRAURT1LARSNA',\n 'RSSMRAURTM0A562M',\n 'RSSMRAURTM0A56NB',\n 'RSSMRAURTM0A5S2Y',\n 'RSSMRAURTM0A5SNN',\n 'RSSMRAURTM0AR62H',\n 'RSSMRAURTM0AR6NW',\n 'RSSMRAURTM0ARS2T',\n 'RSSMRAURTM0ARSNI',\n 'RSSMRAURTMLA562P',\n 'RSSMRAURTMLA56NE',\n 'RSSMRAURTMLA5S2B',\n 'RSSMRAURTMLA5SNQ',\n 'RSSMRAURTMLAR62K',\n 'RSSMRAURTMLAR6NZ',\n 'RSSMRAURTMLARS2W',\n 'RSSMRAURTMLARSNL',\n ),\n ),\n array(\n new Subject(\n array(\n 'name' => 'Roberto',\n 'surname' => 'Santi',\n 'birthDate' => '1963-05-08',\n 'gender' => 'M',\n 'belfioreCode' => 'H501',\n )\n ),\n array(\n 'SNTRRT63E08H501T',\n 'SNTRRT63E08H50ML',\n 'SNTRRT63E08H5L1E',\n 'SNTRRT63E08H5LMW',\n 'SNTRRT63E08HR01O',\n 'SNTRRT63E08HR0MG',\n 'SNTRRT63E08HRL1Z',\n 'SNTRRT63E08HRLMR',\n 'SNTRRT63E0UH501Q',\n 'SNTRRT63E0UH50MI',\n 'SNTRRT63E0UH5L1B',\n 'SNTRRT63E0UH5LMT',\n 'SNTRRT63E0UHR01L',\n 'SNTRRT63E0UHR0MD',\n 'SNTRRT63E0UHRL1W',\n 'SNTRRT63E0UHRLMO',\n 'SNTRRT63EL8H501E',\n 'SNTRRT63EL8H50MW',\n 'SNTRRT63EL8H5L1P',\n 'SNTRRT63EL8H5LMH',\n 'SNTRRT63EL8HR01Z',\n 'SNTRRT63EL8HR0MR',\n 'SNTRRT63EL8HRL1K',\n 'SNTRRT63EL8HRLMC',\n 'SNTRRT63ELUH501B',\n 'SNTRRT63ELUH50MT',\n 'SNTRRT63ELUH5L1M',\n 'SNTRRT63ELUH5LME',\n 'SNTRRT63ELUHR01W',\n 'SNTRRT63ELUHR0MO',\n 'SNTRRT63ELUHRL1H',\n 'SNTRRT63ELUHRLMZ',\n 'SNTRRT6PE08H501F',\n 'SNTRRT6PE08H50MX',\n 'SNTRRT6PE08H5L1Q',\n 'SNTRRT6PE08H5LMI',\n 'SNTRRT6PE08HR01A',\n 'SNTRRT6PE08HR0MS',\n 'SNTRRT6PE08HRL1L',\n 'SNTRRT6PE08HRLMD',\n 'SNTRRT6PE0UH501C',\n 'SNTRRT6PE0UH50MU',\n 'SNTRRT6PE0UH5L1N',\n 'SNTRRT6PE0UH5LMF',\n 'SNTRRT6PE0UHR01X',\n 'SNTRRT6PE0UHR0MP',\n 'SNTRRT6PE0UHRL1I',\n 'SNTRRT6PE0UHRLMA',\n 'SNTRRT6PEL8H501Q',\n 'SNTRRT6PEL8H50MI',\n 'SNTRRT6PEL8H5L1B',\n 'SNTRRT6PEL8H5LMT',\n 'SNTRRT6PEL8HR01L',\n 'SNTRRT6PEL8HR0MD',\n 'SNTRRT6PEL8HRL1W',\n 'SNTRRT6PEL8HRLMO',\n 'SNTRRT6PELUH501N',\n 'SNTRRT6PELUH50MF',\n 'SNTRRT6PELUH5L1Y',\n 'SNTRRT6PELUH5LMQ',\n 'SNTRRT6PELUHR01I',\n 'SNTRRT6PELUHR0MA',\n 'SNTRRT6PELUHRL1T',\n 'SNTRRT6PELUHRLML',\n 'SNTRRTS3E08H501Q',\n 'SNTRRTS3E08H50MI',\n 'SNTRRTS3E08H5L1B',\n 'SNTRRTS3E08H5LMT',\n 'SNTRRTS3E08HR01L',\n 'SNTRRTS3E08HR0MD',\n 'SNTRRTS3E08HRL1W',\n 'SNTRRTS3E08HRLMO',\n 'SNTRRTS3E0UH501N',\n 'SNTRRTS3E0UH50MF',\n 'SNTRRTS3E0UH5L1Y',\n 'SNTRRTS3E0UH5LMQ',\n 'SNTRRTS3E0UHR01I',\n 'SNTRRTS3E0UHR0MA',\n 'SNTRRTS3E0UHRL1T',\n 'SNTRRTS3E0UHRLML',\n 'SNTRRTS3EL8H501B',\n 'SNTRRTS3EL8H50MT',\n 'SNTRRTS3EL8H5L1M',\n 'SNTRRTS3EL8H5LME',\n 'SNTRRTS3EL8HR01W',\n 'SNTRRTS3EL8HR0MO',\n 'SNTRRTS3EL8HRL1H',\n 'SNTRRTS3EL8HRLMZ',\n 'SNTRRTS3ELUH501Y',\n 'SNTRRTS3ELUH50MQ',\n 'SNTRRTS3ELUH5L1J',\n 'SNTRRTS3ELUH5LMB',\n 'SNTRRTS3ELUHR01T',\n 'SNTRRTS3ELUHR0ML',\n 'SNTRRTS3ELUHRL1E',\n 'SNTRRTS3ELUHRLMW',\n 'SNTRRTSPE08H501C',\n 'SNTRRTSPE08H50MU',\n 'SNTRRTSPE08H5L1N',\n 'SNTRRTSPE08H5LMF',\n 'SNTRRTSPE08HR01X',\n 'SNTRRTSPE08HR0MP',\n 'SNTRRTSPE08HRL1I',\n 'SNTRRTSPE08HRLMA',\n 'SNTRRTSPE0UH501Z',\n 'SNTRRTSPE0UH50MR',\n 'SNTRRTSPE0UH5L1K',\n 'SNTRRTSPE0UH5LMC',\n 'SNTRRTSPE0UHR01U',\n 'SNTRRTSPE0UHR0MM',\n 'SNTRRTSPE0UHRL1F',\n 'SNTRRTSPE0UHRLMX',\n 'SNTRRTSPEL8H501N',\n 'SNTRRTSPEL8H50MF',\n 'SNTRRTSPEL8H5L1Y',\n 'SNTRRTSPEL8H5LMQ',\n 'SNTRRTSPEL8HR01I',\n 'SNTRRTSPEL8HR0MA',\n 'SNTRRTSPEL8HRL1T',\n 'SNTRRTSPEL8HRLML',\n 'SNTRRTSPELUH501K',\n 'SNTRRTSPELUH50MC',\n 'SNTRRTSPELUH5L1V',\n 'SNTRRTSPELUH5LMN',\n 'SNTRRTSPELUHR01F',\n 'SNTRRTSPELUHR0MX',\n 'SNTRRTSPELUHRL1Q',\n 'SNTRRTSPELUHRLMI',\n ),\n ),\n );\n }", "title": "" }, { "docid": "651aee03dbfa90fe4b7dd6df5f29f630", "score": "0.5436893", "text": "public function toArray() : array {\n\n return [\n 'cod_livro' => $this->codLivro,\n 'titulo' => $this->titulo,\n 'titulo_original' => $this->tituloOriginal,\n 'idioma' => $this->idioma,\n 'isbn_10' => $this->isbn10,\n 'isbn_13' => $this->isbn13,\n 'data_publicacao' => $this->dataPublicacao,\n 'sinopse' => $this->sinopse,\n 'total_paginas' => $this->totalPaginas,\n 'tipo_capa' => $this->tipoCapa,\n 'cod_editora' => $this->codEditora,\n 'autores' => $this->autores,\n 'generos' => $this->generos,\n 'series' => $this->series\n ];\n\n }", "title": "" }, { "docid": "b93cc9c7199726af0378f69540f2ea1d", "score": "0.54319394", "text": "function createDependencesArr(){\n\t\t$listArr = explode(\"\\r\\n\", $this->getFieldContent('dependences'));\n\t\t$length = count($listArr);\n\t\tfor($i=0; $i<$length; $i++){\n\t\t\t$pos1 = strpos($listArr[$i], '>');\n\t\t\t$pos2 = strpos($listArr[$i], '=');\n\t\t\tif($pos1 !== false && $pos2 !== false && $pos1 < $pos2){\n\t\t\t\t$question1 = trim(substr($listArr[$i], $pos1+1, ($pos2-$pos1-1)));\n\t\t\t\t$question2 = trim(substr($listArr[$i], 0, $pos1));\n\t\t\t\t$dependence = trim(substr($listArr[$i], $pos2+1));\n\t\t\t\tif($this->dependencesArr[$question1][$question2] != ''){\n\t\t\t\t\t$this->dependencesArr[$question1][$question2] .= ';'.$dependence;\n\t\t\t\t}else{\n\t\t\t\t\t$this->dependencesArr[$question1][$question2] = $dependence;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "38c1be4930dd8cfa89c71ad333af03e2", "score": "0.54205793", "text": "public function convertPlainArrayToTypoScriptArrayTestdata() {}", "title": "" }, { "docid": "25072daabc1528bb58389843f208a805", "score": "0.54152584", "text": "function createArray()\r\n {\r\n $xml = $this->xml;\r\n\r\n $values = array();\r\n $index = array();\r\n $array = array();\r\n $parser = xml_parser_create();\r\n xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\r\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\r\n xml_parse_into_struct($parser, $xml, $values, $index);\r\n xml_parser_free($parser);\r\n $i = 0;\r\n $name = $values[$i]['tag'];\r\n $array[$name] = isset($values[$i]['attributes']) ? $values[$i]['attributes'] : '';\r\n $array[$name] = $this->_struct_to_array($values, $i);\r\n return $array;\r\n\r\n }", "title": "" } ]
59372f348c0f0d58427c14153675c2f0
Get the registered name of the component.
[ { "docid": "bf2748b028aa503f113ddf5326b27c72", "score": "0.0", "text": "protected static function getFacadeAccessor()\n {\n return 'router';\n }", "title": "" } ]
[ { "docid": "6d5b72434d0b50aaca02dd00f46d7832", "score": "0.82362884", "text": "public function getName() {\n return $this->componentName;\n }", "title": "" }, { "docid": "990e3471efadb65e1125a4a5991f85ba", "score": "0.8216276", "text": "public function getComponentName()\n {\n return $this->component_name;\n }", "title": "" }, { "docid": "a59add3e1db5190b421beb78c3007c15", "score": "0.80290693", "text": "public function get_component_name() {\n return $this->componentname;\n }", "title": "" }, { "docid": "0b8976ada5ae304365e81927e6edd88e", "score": "0.78368616", "text": "public function getName()\n {\n if ($this->name !== null) {\n return $this->name;\n }\n\n if ($this->componentClass === null) {\n return null;\n }\n\n $component = $this->getComponent();\n\n return $this->name = ComponentHelpers::getComponentName($component);\n }", "title": "" }, { "docid": "ad790b742bc415ba91fe3b255424c5e9", "score": "0.7241867", "text": "function getName()\n {\n return $this->_impl->getName();\n }", "title": "" }, { "docid": "8d8eb6c44383fa7daa9d89b2db5ec9e8", "score": "0.71894544", "text": "public function get_name() {\n return static::$name;\n }", "title": "" }, { "docid": "38584356199228b1f01e4819ad205a86", "score": "0.7123655", "text": "final public function get_name() {\n\t\treturn $this->get_arg_or_plugin_data( 'name', 'Name' );\n\t}", "title": "" }, { "docid": "f0e1499394c1321d08637020e74123af", "score": "0.712076", "text": "public static function getName(): string\n {\n return 'centreon_frontend_component';\n }", "title": "" }, { "docid": "cc5a805c2eb4039b21f96537cdf67373", "score": "0.70456064", "text": "public function getName()\n {\n return $this->name ?: class_basename($this);\n }", "title": "" }, { "docid": "7e85c91283ed5d7e3ee75e09545e7087", "score": "0.6987091", "text": "public function getName() {\n return $this->get(self::NAME);\n }", "title": "" }, { "docid": "7e85c91283ed5d7e3ee75e09545e7087", "score": "0.6987091", "text": "public function getName() {\n return $this->get(self::NAME);\n }", "title": "" }, { "docid": "dc9d37c2d650fbddd1e133beb2354c6b", "score": "0.69652337", "text": "public function getName()\n {\n return $this->get(self::NAME);\n }", "title": "" }, { "docid": "dc9d37c2d650fbddd1e133beb2354c6b", "score": "0.69652337", "text": "public function getName()\n {\n return $this->get(self::NAME);\n }", "title": "" }, { "docid": "dc9d37c2d650fbddd1e133beb2354c6b", "score": "0.69652337", "text": "public function getName()\n {\n return $this->get(self::NAME);\n }", "title": "" }, { "docid": "c657925304848901d92e5e8c9c250038", "score": "0.6951117", "text": "public static function name()\n {\n return empty(static::$name) ? static::class : static::$name;\n }", "title": "" }, { "docid": "c4e75a09e3af38708ed4e635da9c6605", "score": "0.69377947", "text": "public function getName() {\n\t\treturn $this->m_strname;\n\t}", "title": "" }, { "docid": "2277fafd25a49b03e4eed8dd8544af1b", "score": "0.6903993", "text": "public function getInstanceName()\n\t{\n\t\treturn $this->_name;\n\t}", "title": "" }, { "docid": "f563c18d18a3338fa567dc3223431a61", "score": "0.6900258", "text": "public function getName()\n {\n $value = $this->get(self::name);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "0349b7b13e9cbfcef119e387a152ad03", "score": "0.6896249", "text": "public function getName()\n {\n return self::$name;\n }", "title": "" }, { "docid": "64c2068c7937f8df235360c3b5aec604", "score": "0.68884224", "text": "final public function getName()\n {\n if (null !== $this->name) {\n return $this->name;\n }\n\n $name = get_class($this);\n $pos = strrpos($name, '\\\\');\n\n return $this->name = false === $pos ? $name : substr($name, $pos + 1);\n }", "title": "" }, { "docid": "f73b9dec2027b9b7d526e23df595d9a9", "score": "0.68853307", "text": "public static function getName() {\n\t\treturn self::NAME;\n\t}", "title": "" }, { "docid": "355b34621416d664cb47e9c9a24a4509", "score": "0.68581325", "text": "public function get_component($name) {\r\n\t\tif ( array_key_exists($name, $this->components) ) {\r\n\t\t\treturn $this->components[$name];\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d2c2046a5550a87525a2c6eb257388ad", "score": "0.68397474", "text": "public function getName() {\n\t\treturn $this->getIdentifier();\n\t}", "title": "" }, { "docid": "adfc9b2bcd5104f55ef0b37bd5d948c7", "score": "0.68300396", "text": "public static function name(): string\n {\n return static::$name;\n }", "title": "" }, { "docid": "979efac7d1a76ca790d0695ff2fcb7d8", "score": "0.6792571", "text": "public function getName(): string\n {\n return (string) $this->constant->consts[$this->index]->name;\n }", "title": "" }, { "docid": "413cb909f009ffdcf7152f73cc522ca3", "score": "0.6791402", "text": "public function getName() {\n return $this->getData(self::NAME);\n }", "title": "" }, { "docid": "b4cf839f2e946be9eff5bc3efc08b2d2", "score": "0.6791152", "text": "public function get_name() {\n return get_string('modulename', 'mod_booking');\n }", "title": "" }, { "docid": "710cb2ab7fc9adee8654d6c4ff491690", "score": "0.67764634", "text": "public function getName()\n {\n return parent::getData(self::NAME);\n }", "title": "" }, { "docid": "e03612823ce1d675b396bc4d0289f3cf", "score": "0.6769296", "text": "public function getName()\n {\n return $this->getData(self::NAME);\n }", "title": "" }, { "docid": "4226a64a3976adbf95fbad7b9862276f", "score": "0.6768534", "text": "public static function getName()\n {\n return self::$name;\n // return ConNguoi::$name;\n }", "title": "" }, { "docid": "aec65170dad164cd59977d9109708f47", "score": "0.672306", "text": "public function getName()\n\t{\n\t\tif (!isset($this->_name)) {\n\t\t\t$this->_name = (string) $this->getDefaultName();\n\t\t}\n\t\treturn $this->_name;\n\t}", "title": "" }, { "docid": "7b400ea7aaaf9b1dc23f6090fd60cb40", "score": "0.67201656", "text": "function getName()\n\t{\n\t\t$name = $this->_name;\n\n\t\tif (empty( $name ))\n\t\t{\n\t\t\t$r = null;\n\t\t\tRb_Error::assert(preg_match('/Controller(.*)/i', get_class($this), $r) , Rb_Text::sprintf('PLG_SYSTEM_RBSL_ERROR_XICONTROLLER_CANT_GET_OR_PARSE_CLASS_NAME', get_class($this)), Rb_Error::ERROR);\n\n\t\t\t$name = strtolower( $r[1] );\n\t\t}\n\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "4d93c663c39ef1bc1e9ad3419c0806c3", "score": "0.6718562", "text": "public function name(): string {\n\t\treturn $this->_name;\n\t}", "title": "" }, { "docid": "0a697c607f037cacca2f015a5f68394a", "score": "0.67169267", "text": "public function getName()\n\t{\n\t if (isset($this->reference)) {\n\t\t\treturn $this->reference->getName();\n\t\t}\n\t}", "title": "" }, { "docid": "499928a06a571006de319fa9abbad7e4", "score": "0.67056257", "text": "public static function getName();", "title": "" }, { "docid": "499928a06a571006de319fa9abbad7e4", "score": "0.67056257", "text": "public static function getName();", "title": "" }, { "docid": "6811c35b389984044c4d9b7518f5c180", "score": "0.67049015", "text": "public function getName()\n\t{\n\t\t// if($plug->isInstalled && $plug->isEnabled)\n\t\t// {\n\t\t// \t$settings = $this->getSettings();\n\t\t// \tif ($settings->pluginName)\n\t\t// \t{\n\t\t// \t\treturn $settings->pluginName;\n\t\t// \t}\n\t\t// }\n\n\t return Craft::t('venti','Venti');\n\t}", "title": "" }, { "docid": "a8af4c777158e81186ff4d18d5ab4b5e", "score": "0.670414", "text": "public function getName()\n {\n $info = $this->getModuleInfo();\n\n if ($info['name']) {\n return $info['name'];\n }\n\n return $this->getId();\n }", "title": "" }, { "docid": "acf63b1b33ebb908afc4cc809a45e510", "score": "0.6702251", "text": "public function name()\n\t{\n\t\treturn $this->module;\n\t}", "title": "" }, { "docid": "ce7519fc2a2bbeed3e8ad498ba5606a4", "score": "0.6701951", "text": "public function get_name(): string {\n return $this->name;\n }", "title": "" }, { "docid": "d055ec9c4e7334941a9ebe15b452c106", "score": "0.6700462", "text": "function get_name()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_NAME);\r\n }", "title": "" }, { "docid": "d055ec9c4e7334941a9ebe15b452c106", "score": "0.6700462", "text": "function get_name()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_NAME);\r\n }", "title": "" }, { "docid": "0b7717416c265089aebf726e0c0b96ef", "score": "0.66997707", "text": "public function getName(): string\n {\n return $this->_name;\n }", "title": "" }, { "docid": "ba5e2e557451ed32384ce1f0e1c34089", "score": "0.66986567", "text": "public function getName() {\n return static::NAME;\n }", "title": "" }, { "docid": "ec8e06e907c22bd0878eaf534a9c2f02", "score": "0.66911215", "text": "public function getName()\r\n {\r\n return $this->offsetGet('name');\r\n }", "title": "" }, { "docid": "e7b6e3fcc4ba37b7ee4800a0f478d782", "score": "0.66903293", "text": "public function getName() {\n return $this->getDisplayName() ? $this->getDisplayName() : $this->getFrontendLabel();\n }", "title": "" }, { "docid": "ac96a2d6e524cbafa8fc2a1617544abf", "score": "0.66733056", "text": "function get_name(): string {\n return sprintf('(Unregistered dependency: \"%s\")', $this->get_id()); \n }", "title": "" }, { "docid": "92aa701c2f406471f453a133b3c0e0fe", "score": "0.66708505", "text": "public function getName()\n {\n $name = get_class($this);\n $name = explode('\\\\', $name);\n $name = end($name);\n $name = lcfirst($name);\n return $name;\n }", "title": "" }, { "docid": "4e00a53150a836fa63670f7d4bdb0ee4", "score": "0.666945", "text": "public function getName()\n {\n return $this->safeGet('name');\n }", "title": "" }, { "docid": "07da6756af41cca05238b40e243c672f", "score": "0.6664992", "text": "public function getName() {\r\n\t\treturn str_replace ( '\\\\', '-', get_called_class () );\r\n\t}", "title": "" }, { "docid": "e9744855ddc8bc9fe960aaffee2f6ff2", "score": "0.6662623", "text": "public function getName() {\n return isset($this->name) ? $this->name : '';\n }", "title": "" }, { "docid": "2ec2fce9d3315fb74e836ca9437f68b3", "score": "0.66626203", "text": "public function get_name()\n {\n return $this->get_default_property(self::PROPERTY_NAME);\n }", "title": "" }, { "docid": "d762415e6ea1048ec4b6fc981da24089", "score": "0.6660282", "text": "public function name() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "4c8748433ba5804227a5896f8645e6b8", "score": "0.66601497", "text": "public static function get_name();", "title": "" }, { "docid": "a9f5c63b86ee424b909ddfb549392d33", "score": "0.6660126", "text": "public function get_name() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "a9f5c63b86ee424b909ddfb549392d33", "score": "0.6660126", "text": "public function get_name() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "a9f5c63b86ee424b909ddfb549392d33", "score": "0.6660126", "text": "public function get_name() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "5f515c255388f25d93d99b7a34c4b84e", "score": "0.66557837", "text": "public static function name(): string\n {\n return self::newHandler()::$name;\n }", "title": "" }, { "docid": "35a0500b143f13c462c266d215a70c34", "score": "0.66515946", "text": "public function getName(): string\n {\n\n return $this->_name;\n\n }", "title": "" }, { "docid": "3bb949ebf1b368f61e806438bfdb3eba", "score": "0.6648875", "text": "public function getName()\n {\n $name = $this->name;\n if (is_object($this->engineKit)) {\n $name .= ' with ' . $this->engineKit->getName();\n }\n return $name;\n }", "title": "" }, { "docid": "d04199c44b6f948f3da80a9dd339a85e", "score": "0.6643254", "text": "public static function name(): string\n\t{\n\t\tstatic $name;\n\n\t\tif ($name === null) {\n\t\t\t$name = str_replace(__NAMESPACE__ . '\\\\', '', static::class);\n\t\t}\n\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "057c4ce01a2c3b93ba3f21d9869e5d95", "score": "0.66372675", "text": "public function getName()\r\n {\r\n return self::NAME;\r\n }", "title": "" }, { "docid": "b57a46cda94d37bcbf6eea854fa7190f", "score": "0.6635362", "text": "final public function getName()\r\n\t{\r\n\t\treturn $this->_name;\r\n\t}", "title": "" }, { "docid": "ca7f354aeca3b4face7347adee1d687b", "score": "0.66279787", "text": "public function getName ()\n {\n $class = get_class($this);\n return \"{$this->prefix}_{$class}\";\n }", "title": "" }, { "docid": "9506ac79f5953acadb30f49a20d42c22", "score": "0.66273755", "text": "final function getName() {\n\t\t\treturn $this->name;\n\t\t}", "title": "" }, { "docid": "cf6704f2ab7cd8742cb7a958e992cc4b", "score": "0.66239524", "text": "public function getName()\n {\n return self::NAME;\n }", "title": "" }, { "docid": "6e2b739d8c1f9f62844ff30dcefbb864", "score": "0.6617431", "text": "public function getName() {\n\t\treturn $this->_name;\n\t}", "title": "" }, { "docid": "6e2b739d8c1f9f62844ff30dcefbb864", "score": "0.6617431", "text": "public function getName() {\n\t\treturn $this->_name;\n\t}", "title": "" }, { "docid": "a53dda66643ae3d43dcf95cc47814aba", "score": "0.6615578", "text": "public static function getName() {\n\t\treturn static::getMessage('NAME');\n\t}", "title": "" }, { "docid": "7975e4ec8fca250acc542bcca7dfc679", "score": "0.6611141", "text": "public function getName ()\n\t\t{\n\t\t\treturn $this->name;\n\t\t}", "title": "" }, { "docid": "7975e4ec8fca250acc542bcca7dfc679", "score": "0.6611141", "text": "public function getName ()\n\t\t{\n\t\t\treturn $this->name;\n\t\t}", "title": "" }, { "docid": "2e8f1537812e0696b5a5848eb8ee1fa9", "score": "0.660919", "text": "public function getComponentTypeName()\n\t{\n\t\treturn $this->fkComponentType->name;\n\t}", "title": "" }, { "docid": "68ff7d939c60a3f55330a75188d3e2d6", "score": "0.6607788", "text": "public function getName() : string {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "2d4587f21feef50dc5d3299922db1d98", "score": "0.66068417", "text": "function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "2d4587f21feef50dc5d3299922db1d98", "score": "0.66068417", "text": "function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "2d4587f21feef50dc5d3299922db1d98", "score": "0.66068417", "text": "function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "a5dee485432d6e8f2b98755364450a41", "score": "0.6606137", "text": "public function getName()\n\t{\n\t\t# code...\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "d22ad068768d355f9fdc7e8e478e5a90", "score": "0.66024697", "text": "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "title": "" }, { "docid": "d22ad068768d355f9fdc7e8e478e5a90", "score": "0.66024697", "text": "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "title": "" }, { "docid": "d22ad068768d355f9fdc7e8e478e5a90", "score": "0.66024697", "text": "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "title": "" }, { "docid": "d22ad068768d355f9fdc7e8e478e5a90", "score": "0.66024697", "text": "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "title": "" }, { "docid": "d22ad068768d355f9fdc7e8e478e5a90", "score": "0.66024697", "text": "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "title": "" }, { "docid": "512512c1b422c61daef2e42f9ae07f1e", "score": "0.66015774", "text": "public function getName()\r\n {\r\n // TODO: Implement getName() method.\r\n return self::NAME;\r\n }", "title": "" }, { "docid": "ec949de632d9542517e694d206dc3b45", "score": "0.66005933", "text": "public function get_name() {\n\t\treturn $this->get_product_name() . ' plugin';\n\t}", "title": "" }, { "docid": "387695fdcf9e5e4e9bb40815c7a9b056", "score": "0.6599321", "text": "public function getName(): string\n {\n $className = static::class;\n /** @psalm-suppress PossiblyFalseOperand */\n return lcfirst(substr($className, strrpos($className, '\\\\') + 1));\n }", "title": "" }, { "docid": "c193b8da19dc7287e13844b0133b8b05", "score": "0.65974176", "text": "public function getName()\n {\n return $this->toString();\n }", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65962094", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65962094", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65962094", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65962094", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65962094", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65962094", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65962094", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65962094", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65962094", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65962094", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65962094", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65962094", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65962094", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65962094", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "269ce794b9e2fb2e1b6093428687ebfc", "score": "0.65962094", "text": "public function getName() {\n\t\treturn $this->name;\n\t}", "title": "" } ]
31f0d8aa3e538b2659f4abe01ae8b5eb
Sets select part of query
[ { "docid": "62e90d900b7aa718bfc3fdac3865ce6b", "score": "0.0", "text": "public function select($select, $params = [])\n {\n $this->setQueryPart(self::PART_SELECT, $select, $params);\n return $this;\n }", "title": "" } ]
[ { "docid": "10d49c1d0c6b730f9ca2cd2ac5b3db51", "score": "0.7241096", "text": "abstract protected function _initSelectQuery();", "title": "" }, { "docid": "d9ca2e5fa92179647eb78abbe418be93", "score": "0.7163349", "text": "function _selectIdent() {\n $this->query['select'] = array(\"<@{$this->_alias}.@>{{$this->_meta->pk}}\");\n return $this;\n }", "title": "" }, { "docid": "def9aea0d287b15be5e07156d795c5a1", "score": "0.71311146", "text": "function set_query_select() {\n\t\t\n\t\t$query = \" SELECT * \";\n\t\t\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "8593e66e083e3b982f164babf91adc8f", "score": "0.6972107", "text": "abstract public static function setSelectParams();", "title": "" }, { "docid": "b2545c5473e338b704ad41fda6130681", "score": "0.68248916", "text": "public function select(string $select, string $from = null);", "title": "" }, { "docid": "b4aaf5dd2c68411971c2db9c2d89c9f7", "score": "0.68138915", "text": "function select() {\n\t\t$arguments = func_get_args();\n\t\t\n\t\t$select = '*';\n\t\tif(count($arguments)) {\n\t\t\tif(count($arguments) == 1 and is_array($arguments[0])) { //If the first argument is the list of fields\n\t\t\t\t$arguments = $arguments[0];\n\t\t\t}\n\t\t\t\n\t\t\t$select = '`' . implode('`,`',$arguments) . '`';\n\t\t}\n\t\t$this->select = $select;\n\t}", "title": "" }, { "docid": "7fdb10b720d6e7f969022dc31ab2a544", "score": "0.6740309", "text": "public function select($select){\r\n echo \"SELECT \" . $select ;\r\n }", "title": "" }, { "docid": "c89b292184214b241dd4bb37ff3631fd", "score": "0.6735625", "text": "public static function select($select){\n\t\t\n\t\tif(empty($select)){\n\t\t\t$this->select = \"*\";\n\t\t}\n\t\t $this->select = $select;\n\t\t return $this;\n\n\t}", "title": "" }, { "docid": "2b3d2d67f85c21e55075c55bb095dbc0", "score": "0.6705483", "text": "private function checkSelect(): void\n {\n if (!str_contains($this->query ?? '', 'SELECT')) {\n $this->query = 'SELECT * FROM ' . $this->table . $this->query;\n }\n }", "title": "" }, { "docid": "930e26f4e01f0d972a7a528107749265", "score": "0.66982067", "text": "public function select()\n {\n }", "title": "" }, { "docid": "1e927768bcacc22d06cd6cb26667b0dc", "score": "0.65852296", "text": "protected function setSelect(): self\n {\n if ($this->selectedColumns) {\n $this->query->select($this->selectedColumns);\n }\n\n return $this;\n }", "title": "" }, { "docid": "888ae220a1ab2f70164957b54cf7d0e8", "score": "0.6571008", "text": "abstract protected function createSelectStatement();", "title": "" }, { "docid": "63f4c8e44e598a30987cb2d7049334ae", "score": "0.65604246", "text": "public function _generateSelect(){ }", "title": "" }, { "docid": "9b44063716b2d24a716fb1468119979c", "score": "0.65367246", "text": "public function select($condominio);", "title": "" }, { "docid": "316e60c2c2da5ccb46dac6f56a15c4e1", "score": "0.6516457", "text": "public function select() {\n //Does Nothing\n }", "title": "" }, { "docid": "fc08bf2bcd5690c41749eee6f92877f8", "score": "0.6515147", "text": "public function select($fields) {\n\n\t\t$this->reset();\n $this->query->base = \"SELECT \" . $fields . \" FROM \" . $this->table;\n $this->query->type = 'select';\n\n return $this;\n\t}", "title": "" }, { "docid": "a3200830cce1bdf50e39d3269779c8dc", "score": "0.64639443", "text": "public function prepareSelect() {\n\n $config = $this->queryConfig;\n\n // initialisation du tableau de données de la query\n $data = $this->initDatas();\n\n // récupération des champs sélectionnés et aliasement de chacun\n $select = $this->getSelectedFields($config);\n $data['parts']['select'] = $this->aliaseSelectedFields($this->queryConfig['alias'], $select);\n\n // from part\n $from_table = $this->queryConfig['table'];\n if ($this->getDependency($from_table)->escapeTablename) {\n $from_table = \"`\" . $from_table . \"`\";\n }\n $data['parts']['from'] = $from_table . ' ' . $this->queryConfig['alias'];\n\n // données supplémentaires\n if (isset($config['join'])) {\n foreach ($config['join'] as $filtername => $options) {\n $this->joinTable($data, $filtername, $options, $config);\n }\n }\n\n // réduction\n if (isset($config['where'])) {\n foreach ($config['where'] as $filtername => $options) {\n $this->applyConditions($data, $filtername, $options);\n }\n }\n\n // tri\n if (isset($config['orderby'])) {\n foreach ($config['orderby'] as $filtername => $options) {\n $this->applySorts($data, $filtername, $options);\n }\n }\n\n // au cas où des filtres auraient flanqué les mêmes parties de requêtes\n $parts = array_map(function ($part) {\n if (is_array($part)) {\n return array_unique($part);\n }\n return $part;\n }, $data['parts']);\n\n // formattage des paramètres, s'il y en a...\n $params = $this->formatQueryParamsKeys($data['params']);\n\n // ajout des alias aux champs sélectionnés\n $parts['select'] = $this->nameAliasesSelectedFields($parts['select']);\n\n // Limit et offset\n if (isset($config['limit'])) {\n if (is_array($config['limit']) && count($config['limit']) > 2) {\n throw new WrongParameterException(\"Wrong 'limit' parameter provided. It should be an integer, a string or an array with max 2 elements.\");\n }\n $parts['limit'] = is_array($config['limit']) ? implode(',', $config['limit']) : $config['limit'];\n }\n\n return array($parts, $params, $this->queryConfig['alias']);\n }", "title": "" }, { "docid": "dec405374850f09c41bd66506f229b74", "score": "0.6452481", "text": "public function select($query=null, $vars=null);", "title": "" }, { "docid": "537552764e3165579273c86d9cd2a179", "score": "0.64472926", "text": "public function createSelectQuery()\n {\n return new QuerySelect( $this );\n }", "title": "" }, { "docid": "ae2417d3ab5e19fca493294541d1e47b", "score": "0.64446276", "text": "public function resetSelect()\n\t{\n\t\t$this->_resetExec(\n\t\t\t[\n\t\t\t\t'table' => NULL,\n\t\t\t\t'table_aliases' => [ ],\n\t\t\t\t'union' => [ ],\n\t\t\t\t'select' => [ ],\n\t\t\t\t'from' => [ ],\n\t\t\t\t'join' => [ ],\n\t\t\t\t'where' => [ ],\n\t\t\t\t'or_where' => [ ],\n\t\t\t\t'like' => [ ],\n\t\t\t\t'or_like' => [ ],\n\t\t\t\t'having' => [ ],\n\t\t\t\t'or_having' => [ ],\n\t\t\t\t'group_by' => [ ],\n\t\t\t\t'order_by' => [ ],\n\t\t\t\t'limit' => FALSE,\n\t\t\t\t'offset' => FALSE,\n\t\t\t\t'binds' => [ ],\n\t\t\t\t'is_distinct' => FALSE,\n\t\t\t\t'is_union_all' => FALSE,\n\t\t\t\t'is_grouped' => FALSE,\n\t\t\t\t'string' => NULL,\n\t\t\t\t'compiled_string' => NULL,\n\t\t\t] );\n\t}", "title": "" }, { "docid": "a5da380c7e23aefd1b3fede055fc9aa3", "score": "0.64365727", "text": "public function select(){\n\n\t$argcount = func_num_args();\n\t$args = func_get_args();\n\n\t$sql = \"SELECT \";\n\n\tswitch ($argcount) {\n\t\t\tcase 0:\n\t\t\t$sql .= \"*\";\n\t\t\tbreak;\n\n\t\t\tcase 1:\n\t\t\t$sql .= $args[0];\n\t\t\tbreak;\n\t\t\t\t\n\t\t\t\n\t\t\tdefault:\n\t\t\tfor($i = 0; $i < $argcount - 1; $i++){\n\t\t\t\t$sql .= $args[$i].\", \";\n\t\t\t} \n\n\t\t\t$sql .= $args[$argcount - 1];\n\t\t\tbreak;\n\t}\n\n\t$sql .= \" FROM \".$this->table;\n\n\t$this->sql = $sql;\n\n\treturn $this;\n\n\t}", "title": "" }, { "docid": "3b47cccb22ff0f95396610b800b315d5", "score": "0.64276445", "text": "private function render_select(): string\n\t{\n\t\treturn 'SELECT ' . ($this->select ? $this->select : '*');\n\t}", "title": "" }, { "docid": "53f184510491c12f4bd4bf19b8e6818c", "score": "0.641827", "text": "function _buildQuerySelect()\n\t{\n\t\tglobal $_PROFILER;\n\t\tJDEBUG ? $_PROFILER->mark('queryselect: start') : null;\n\t\t$db =& $this->getDb();\n\t\t$form =& $this->getFormModel();\n\t\t$table =& $this->getTable();\n\t\t$form->getGroupsHiarachy(true);\n\t\tJDEBUG ? $_PROFILER->mark('queryselect: fields load start') : null;\n\t\t$fields =& $this->getAsFields();\n\t\t$pk = FabrikString::safeColName($table->db_primary_key);\n\t\t$shortKey = $this->_shortKey(null, true);\n\t\t//SEFSLUG TEST\n\t\t$params =& $this->getParams();\n\t\tif (in_array($this->_outPutFormat, array('raw', 'html', 'feed', 'pdf', 'phocapdf'))) {\n\t\t\t$slug = $params->get('sef-slug');\n\t\t\tif ($slug != '') {\n\t\t\t\t$slug = FabrikString::safeColName($slug);\n\t\t\t\t$fields[] = \"CONCAT_WS(':', $pk, $slug) AS slug\";\n\t\t\t} else {\n\t\t\t\tif ($shortKey !== '') {\n\t\t\t\t\t$fields[] = \"$pk AS slug\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//END\n\n\t\tJDEBUG ? $_PROFILER->mark('queryselect: fields loaded') : null;\n\t\t$sfields = (empty($fields)) ? '' : implode(\", \\n \", $fields) . \"\\n \";\n\t\t//$$$rob added raw as an option to fix issue in saving calendener data\n\t\tif (in_array($this->_outPutFormat, array('raw','html','feed','pdf','phocapdf','csv'))) {\n\t\t\t$sfields .= \", \";\n\t\t\t$pk = $shortKey == '' ? \"''\" : $pk;\n\t\t\t$strPKey = $pk . \" AS \" . $db->nameQuote('__pk_val') . \"\\n\";\n\t\t\t$query = 'SELECT SQL_CALC_FOUND_ROWS DISTINCT ' . $sfields . $strPKey;\n\t\t} else {\n\t\t\t$query = 'SELECT SQL_CALC_FOUND_ROWS DISTINCT ' . trim($sfields, \", \\n\") . \"\\n\";\n\t\t}\n\t\t$query .= \" FROM \".$db->nameQuote($table->db_table_name).\" \\n\";\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "36e47304305d8558bf789b1e00f7078b", "score": "0.63810885", "text": "public function select($selectData);", "title": "" }, { "docid": "c719332d27ff44d220910c525638ad6a", "score": "0.6380454", "text": "protected function runSelect()\n {\n return $this->connection->select(\n $this->toSql(),\n $this->getBindings(),\n //!$this->useWritePdo\n );\n }", "title": "" }, { "docid": "c0ed062fdd1cc544e517a70f029d3975", "score": "0.6379395", "text": "public function setSelect($document)\n\t{\n\t\t$this->_select = $document;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "6b9c93a6b20b5eb0b7b912aeaeacaa6b", "score": "0.6378421", "text": "protected function _initSelect()\n {\n $this->getSelect()->from([self::MAIN_TABLE_ALIAS => $this->getEntity()->getEntityTable()]);\n return $this;\n }", "title": "" }, { "docid": "aef8cb533c64ef9a0c0ccf75e38d15c8", "score": "0.6363847", "text": "public function addSelects() {\n\t\tif (!empty($this->config['select'])) {\n\t\t\t$tmp = array_merge($this->modx->fromJSON($this->config['select']), $this->config['tvsSelect']);\n\t\t\t$i = 0;\n\t\t\tforeach ($tmp as $k => $v) {\n\t\t\t\tif ($v == 'all' || $v == '*') {\n\t\t\t\t\t$v = $this->modx->getSelectColumns($k, $k);\n\t\t\t\t}\n\t\t\t\tif ($i == 0) {$v = 'SQL_CALC_FOUND_ROWS '.$v;}\n\t\t\t\t$this->query->select($v);\n\t\t\t\t$this->addTime('Added selection of <b>'.$k.'</b>: <small>' . $v . '</small>');\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$class = $this->config['class'];\n\t\t\t$select = 'SQL_CALC_FOUND_ROWS ' . $this->modx->getSelectColumns($class,$class);\n\t\t\tif (!empty($this->config['tvsSelect'])) {\n\t\t\t\t$select .= ', '.implode(',', $this->config['tvsSelect']);\n\t\t\t}\n\t\t\t$this->query->select($select);\n\t\t\t$this->addTime('Added selection of <b>'.$class.'</b>: <small>' . $select . '</small>');\n\t\t}\n\t}", "title": "" }, { "docid": "caba0c98b4d58018dc704307ae26dcca", "score": "0.63517934", "text": "public function select()\n {\n $this->stmt['action'] = 'SELECT';\n if ( func_num_args() !== 0 )\n $this->stmt['cols'] = array_unique(array_merge($this->stmt['cols'], $this->buildArrayOfArgs(func_get_args()))); \n\n return $this;\n }", "title": "" }, { "docid": "78da788f687bda951c65f9f208c94cc5", "score": "0.6350802", "text": "private function setSelectPart($fields, $QueryBuilder)\r\n {\r\n if (!$fields) {\r\n $fields = $this->getSafeAttributes();\r\n $fields[] = $this->getPkName();\r\n } else {\r\n $fields = array_intersect($fields, $this->getSafeAttributes());\r\n }\r\n\r\n $QueryBuilder->select($fields);\r\n return $QueryBuilder;\r\n }", "title": "" }, { "docid": "10bb944bc02da744a2a1e7baca7f49fc", "score": "0.6350059", "text": "function applyToSelect(Ac_Sql_Select $select) {\n $tmp = $this->currentSelect = null;\n $this->currentSelect = $select;\n if (!$this->_db) $this->setDb($select->getDb());\n if ($this->doesApply()) {\n $this->_doApplyToSelect($select);\n }\n $this->currentSelect = $tmp;\n }", "title": "" }, { "docid": "5110affdefac8959c46884045034e330", "score": "0.6347933", "text": "protected function updateSelect()\n {\n $obj = $this->update->select();\n $obj ? $this->update->obj($obj) : abort(404);\n }", "title": "" }, { "docid": "b73065a25284a6cad506298b088b97e1", "score": "0.63375705", "text": "protected function selectBuild()\n\t\t{\n\t\t$table = $this->table;\t\n\t\t$select = $this->selectfield;\n\t\t$orderby = (isset($this->orderby) ? \" ORDER BY \".$this->orderby.\" \".$this->order : null);\n\t\t$limit = null;\n\t\tif (isset($this->page)) {\n\t\t\t$this->getPage();\t\t\n\t\t\t$limit = \" LIMIT \".$this->first.\",\".$this->last;\n\t\t}\t\t\n\t\t$where = $this->buildWhere();\n\t\t$this->regen();\n\t\t$sql = \"SELECT \".$select.\" FROM \".$table.$where.$orderby.$limit;\t\t\t\n\t\treturn $sql;\n\t\t}", "title": "" }, { "docid": "6fef77fcc858a1c2962623902b901846", "score": "0.63357604", "text": "protected function _createSelectQuery() {\n return SelectQuery::create($this->_connection);\n }", "title": "" }, { "docid": "b62ddbdfc95c593ee4ab285728c64dae", "score": "0.6334217", "text": "public function select()\n\t{\n\t\t$this->select = array_merge($this->select, func_get_args());\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "86b995bbfc115c198ae6982d9d6ba9b7", "score": "0.63314176", "text": "public function reset_select()\n\n {\n\n $this->select = array();\n\n $this->from = array();\n\n $this->join = array();\n\n $this->where = array();\n\n $this->orderby = array();\n\n $this->groupby = array();\n\n $this->having = array();\n\n $this->distinct = FALSE;\n\n $this->limit = FALSE;\n\n $this->offset = FALSE;\n\n }", "title": "" }, { "docid": "bad5ea37bb2edb69ecda5fcd5684fb61", "score": "0.6326398", "text": "public function select($what = '')\n\t{\n\t\t$this->method = self::METHOD_SELECT;\n\t\t$this->select_what = !empty($what) ? $what : '*';\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "6ff2ac29c0dccea74e172ba531624592", "score": "0.6317421", "text": "public function composeSelectQuery()\n\t{\n\t\t$query = 'select ';\n\t\t$query .= implode(', ', $this->_composeFields()) . ' from `' . reset($this->_config['table']) . '` ';\n\t\treturn $this->_composeQuery($query);\n\t}", "title": "" }, { "docid": "94adf4641c3d7b30635ba0aa7d77a9b9", "score": "0.6317091", "text": "public function select(){\r\n $this->checkTable();\r\n $sql = 'SELECT '.$this->field.' FROM '.$this->table;\r\n if($this->where)\r\n $sql .= ' '.$this->where;\r\n if($this->order)\r\n $sql .= ' '.$this->order;\r\n if($this->limit)\r\n $sql = $this->_db->formatLimit($sql,$this->limit);\r\n return $this->_db->execute($sql,$this->bindValue);\r\n }", "title": "" }, { "docid": "158eea8b67e9d52051392fb50f71f6ae", "score": "0.6313305", "text": "public function testSelect(): void\n {\n $expectedQuery = \"SELECT Id FROM {$this->tableName}\";\n $builder = new Builder($this->tableName);\n $builder->select('Id');\n $this->assertEquals($expectedQuery, $builder->getQuery());\n\n // Test that select works with multiple fields\n $expectedQuery = \"SELECT Id, Name FROM {$this->tableName}\";\n $builder = new Builder($this->tableName);\n $builder->select(['Id', 'Name']);\n $this->assertEquals($expectedQuery, $builder->getQuery());\n }", "title": "" }, { "docid": "8f49d8145d7d3709b5ca39ddf864a718", "score": "0.6303371", "text": "function get_recordset_select($table, $select='', $values=null, $sort='', $fields='*', $limitfrom='', $limitnum='') {\n\n global $CFG;\n\n if ($select) {\n $select = ' WHERE '. $select;\n }\n\n if ($limitfrom !== '') {\n $limit = sql_paging_limit($limitfrom, $limitnum);\n } else {\n $limit = '';\n }\n\n if ($sort) {\n $sort = ' ORDER BY '. $sort;\n }\n\n return get_recordset_sql('SELECT '. $fields .' FROM '. $CFG->prefix . $table . $select . $sort .' '. $limit, $values);\n}", "title": "" }, { "docid": "e12faf31517bb6c3667f0b710242f2fc", "score": "0.6279917", "text": "public function select() {\n\t\t$fields = a::arguments(func_get_args());\n\t\tif (empty($fields)) $fields = array('*');\n\n\t\tif (!isset($this) || !is_object($this)) trigger_error('db::select must be called in object context, eg $result = db::table(\\'tablename\\')->select()');\n\n\t\t//build query\n\t\tforeach ($fields as &$field) $field = TAB . self::field_name($field, $this->table);\n\t\t$sql = 'SELECT ' . NEWLINE . implode(',' . NEWLINE, $fields) . NEWLINE . 'FROM' . NEWLINE . TAB . $this->table;\n\t\tif (!empty($this->joins)) $sql .= NEWLINE . implode(NEWLINE, $this->joins);\n\t\t$sql .= self::sql_where($this->wheres);\n\t\tif (!empty($this->order_by)) $sql .= NEWLINE . 'ORDER BY ' . NEWLINE . TAB . implode(', ' . NEWLINE . TAB, $this->order_by);\n\t\t\n\t\treturn self::query($sql);\n\t}", "title": "" }, { "docid": "bb8b96904c50f2ffc41c0b011e58dbd8", "score": "0.6273683", "text": "public function getSelect()\n\t {\n\t }", "title": "" }, { "docid": "4042e35af7ac7d24520250147da1b6f8", "score": "0.62736773", "text": "abstract public function setTarget(Select $select);", "title": "" }, { "docid": "8aeb3b68768fe1488f0267d34f5b2ae9", "score": "0.6273322", "text": "public function select($query = null) {\r\n $this->resetQuery();\r\n if ($query) {\r\n $this->query = $query;\r\n } else {\r\n $this->query = \"SELECT \" . join(', ', $this->fields) . \" FROM {$this->tableName}\";\r\n }\r\n return $this;\r\n }", "title": "" }, { "docid": "c22a3f0615d51e859ae423a3ed171770", "score": "0.62565434", "text": "protected function select_query($select,$from,$where,$sort,$start,$count){\r\n\t\tif (!$from)\r\n\t\t\treturn $select;\r\n\r\n\t\t$sql=\"SELECT \".$select.\" FROM \".$from;\r\n\t\tif ($where) $sql.=\" WHERE \".$where;\r\n\t\tif ($sort) $sql.=\" ORDER BY \".$sort;\r\n\t\tif ($start || $count) $sql.=\" LIMIT \".$start.\",\".$count;\r\n\t\treturn $sql;\r\n\t}", "title": "" }, { "docid": "8166a4fddd9db484557de4abf20d4277", "score": "0.6245294", "text": "function select($column) {\n\t\t$column = $this->clean($column);\n\t\tif ($this->state == 0) {\n\t\t\tif ($column != \"*\") {\n\t\t\t\tif (!is_array($column)) {\n\t\t\t\t\t$this->query .= \"SELECT `\" . $column . \"` \";\n\t\t\t\t} else {\n\t\t\t\t\t$this->query .= \"SELECT \";\n\t\t\t\t\t$numtargets = count($column);\n\t\t\t\t\tfor ($i = 0; $i < $numtargets; $i++) {\n\t\t\t\t\t\tif ($i < ($numtargets - 1)) {\n\t\t\t\t\t\t\t$this->query .= \"`\" . $column[$i] . \"`, \";\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t$this->query .= \"`\" . $column[$i] . \"` \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->query .= \"SELECT \" . $column . \" \";\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Exception(\"Select MUST be called first.\");\n\t\t}\n\t\t$this->transition(\"SELECT\");\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1be66a03469e3cab2b3c8104a8d6fc88", "score": "0.6240916", "text": "public function select($fields = '*'){\n if(is_string($fields) && strpos($fields, '(') !== false){\n $this->query['select'] = $fields;\n }\n else{\n if(!is_array($fields)){\n $fields = $this->splitParts($fields);\n }\n foreach($fields as $k => $field){\n if(false === strpos($field, '(')){\n if($alias = $this->matchAlias($field)){\n $fields[$k] = $this->db->quoteColumn($alias[0]).' AS '.$this->db->quoteColumn($alias[1]);\n }\n else{\n $fields[$k] = $this->db->quoteColumn($field);\n }\n }\n }\n $this->query['select'] = implode(', ', $fields);\n }\n \n return $this;\n }", "title": "" }, { "docid": "1f0fa7dc2d2c1613d09435b78baeba20", "score": "0.6239182", "text": "function select()\n\t{\n\t}", "title": "" }, { "docid": "5ac4d6e37ea7cc21c74498cc7ffc3c2e", "score": "0.62334204", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "5ac4d6e37ea7cc21c74498cc7ffc3c2e", "score": "0.62334204", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "5ac4d6e37ea7cc21c74498cc7ffc3c2e", "score": "0.62334204", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "def1a27c563e9904df2e5a0a17f603ff", "score": "0.6225253", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}", "title": "" }, { "docid": "def1a27c563e9904df2e5a0a17f603ff", "score": "0.6225253", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}", "title": "" }, { "docid": "def1a27c563e9904df2e5a0a17f603ff", "score": "0.6225253", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}", "title": "" }, { "docid": "def1a27c563e9904df2e5a0a17f603ff", "score": "0.6225253", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}", "title": "" }, { "docid": "5f7e8c1dcbbcf78441113f2cd337f891", "score": "0.6223125", "text": "function Recordset_Selecting(&$filter) {\r\n\r\n\t\t// Enter your code here\r\n\t}", "title": "" }, { "docid": "938d476ae439e776bc5a47b5d396da18", "score": "0.6218213", "text": "public function select($sql)\n {\n }", "title": "" }, { "docid": "10214609f310e54d3268fa30f22fac08", "score": "0.6199608", "text": "public function setSelect($column, $as = null, $count = false)\n\t{\n\t\t// A default * is often added, get rid of it if anything else is added\n\t\t// This wouldn't get rid of table.* as that is likely added intentionally\n\t\tif (isset($this->select[0]) && $this->select[0]['column'] == '*')\n\t\t{\n\t\t\t$this->resetSelect();\n\t\t}\n\n\t\t$this->select[] = [\n\t\t\t'column' => $column,\n\t\t\t'as' => $as,\n\t\t\t'count' => $count\n\t\t];\n\t}", "title": "" }, { "docid": "96c40db9f6aa139ceddb93bd229f3548", "score": "0.61985683", "text": "public function selectQuery();", "title": "" }, { "docid": "417734d9dfbde7357529b059a13682c6", "score": "0.619498", "text": "public function testSelect()\n {\n $connection = $this->getQueryBuilderConnection();\n\n $string = 'SELECT * FROM strings';\n $query = $connection->select()->from('strings');\n\n $this->assertEquals($string, $query->asString());\n $this->assertEquals($string, (string)$query);\n\n $query = $connection->select('*')->from('strings');\n $this->assertEquals($string, $query->asString());\n $this->assertEquals($string, (string)$query);\n\n $query = $connection->select(['*'])->from('strings');\n $this->assertEquals($string, $query->asString());\n $this->assertEquals($string, (string)$query);\n\n $query = $connection->select()->from('strings')->setFields('*');\n $this->assertEquals($string, $query->asString());\n $this->assertEquals($string, (string)$query);\n\n $query = $connection->select()->from('strings')->limit(2)->offset(1);\n $string = 'SELECT * FROM strings LIMIT 2 OFFSET 1';\n $this->assertEquals($string, $query->asString());\n $this->assertEquals($string, (string)$query);\n }", "title": "" }, { "docid": "72efc5d2b54005ff130a07a512430673", "score": "0.6166094", "text": "protected function _buildSelect() {\r\n // If the query is raw, just set the $this->_values to be\r\n // the raw query parameters and return the raw query\r\n if ($this->_isRawQuery) {\r\n $this->_values = $this->_rawParameters;\r\n return $this->_rawQuery;\r\n }\r\n\r\n // Build and return the full SELECT statement by concatenating\r\n // the results of calling each separate builder method.\r\n return $this->_joinIfNotEmpty(\" \", array(\r\n $this->_buildSelectStart(),\r\n $this->_buildJoin(),\r\n $this->_buildWhere(),\r\n $this->_buildGroupBy(),\r\n $this->_buildHaving(),\r\n $this->_buildOrderBy(),\r\n $this->_buildLimit(),\r\n $this->_buildOffset(),\r\n ));\r\n }", "title": "" }, { "docid": "27df28218fe9c264128f73539743eae9", "score": "0.6158529", "text": "function querySelect(& $layout_def) {\n\t\tif (!empty ($layout_def['column_function'])) {\n\t\t\t$func_name = 'querySelect'.$layout_def['column_function'];\n\t\t\tif (method_exists($this, $func_name)) {\n\t\t\t\treturn $this-> $func_name ($layout_def).\" \\n\";\n\t\t\t}\n\t\t}\n\t\treturn parent :: querySelect($layout_def).\" \\n\";\n\t}", "title": "" }, { "docid": "dddd8c4f60883e6be5e5847312840ad1", "score": "0.614754", "text": "protected function compileSelect() {\n\t\t\n\t\t$pivots = $this->query->getPivots();\n\t\t\n\t\t// add in what we want to select\n\t\t$sql = 'SELECT '. $this->compileFields();\n\n\t\t$aliases = &$this->query->getAliases();\n\t\t$relations = &$this->query->getRelations();\n\t\t\n\t\t// create a graph of the\n\t\t$graph = $this->relations->getRelationDependencies(\n\t\t\t$aliases,\n\t\t\t$relations,\n\t\t\t$this->models\n\t\t);\n\t\t\n\t\tif(!empty($graph)) {\n\t\t\t\n\t\t\t// pivots are being used, flatten the graph and translate the\n\t\t\t// nested joins into a flat set of inner joins with the conditions\n\t\t\t// in the WHERE clause\n\t\t\tif(!empty($pivots) && !empty($relations)) {\n\t\t\t\t$graph = $this->flattenRelationsGraph($graph);\n\t\t\t\t$this->compileRelationsAsPredicates();\n\t\t\t}\n\t\t\t\n\t\t\t$joins = trim($this->recursiveJoin(NULL, $graph, ''));\n\t\t\tif($joins[0] == '(') {\n\t\t\t\t$joins = substr($joins, 1, -1);\n\t\t\t}\n\t\t\t$sql .= ' FROM '. $joins;\n\t\t}\n\t\t\n\t\t\n\t\t// get parts of the query\n\t\t$this->compilePivots();\n\t\t\t\t\n\t\t$where = $this->compilePredicates('where');\n\t\t$order = $this->compilePredicates('order');\n\t\t$limit = $this->compilePredicates('limit');\n\t\t$group = $this->compilePredicates('group');\n\t\t\n\t\tif(!empty($where)) $sql .= \" WHERE \". implode(' ', $where);\n\t\tif(!empty($group)) $sql .= \" GROUP BY \". implode(' ', $group);\n\t\tif(!empty($order)) $sql .= \" ORDER BY \". implode(' ', $order);\n\t\tif(!empty($limit)) $sql .= \" LIMIT \". implode(' ', $limit);\n\t\t\n\t\t// add in the predicates and return\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "4126f1fac70db6e9bb15a9d4acf6aef7", "score": "0.6147434", "text": "function SelectSQL() {\n\t\t$sFilter = $this->getSessionWhere();\n\t\tew_AddFilter($sFilter, $this->CurrentFilter);\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\n\t\t$this->Recordset_Selecting($sFilter);\n\t\tif ($this->UseVirtualFields()) {\n\t\t\t$sSort = $this->getSessionOrderByList();\n\t\t\treturn ew_BuildSelectSql($this->getSqlSelectList(), $this->getSqlWhere(), $this->getSqlGroupBy(),\n\t\t\t\t$this->getSqlHaving(), $this->getSqlOrderBy(), $sFilter, $sSort);\n\t\t} else {\n\t\t\t$sSort = $this->getSessionOrderBy();\n\t\t\treturn ew_BuildSelectSql($this->getSqlSelect(), $this->getSqlWhere(), $this->getSqlGroupBy(),\n\t\t\t\t$this->getSqlHaving(), $this->getSqlOrderBy(), $sFilter, $sSort);\n\t\t}\n\t}", "title": "" }, { "docid": "1875f753abe22a859dcedd39dd564832", "score": "0.6135579", "text": "public function select($statement) {\n \n }", "title": "" }, { "docid": "b14a2155bfd10c684b829714c70c7346", "score": "0.61331815", "text": "public function buildSelectQuery() {\n\n $sql = $this->builder->select(\n $this->metadata->getTable(),\n $this->metadata->getModelName(),\n $this->getFields()\n );\n\n $sql .= $this->jointures;\n\n if ($this->where) $sql .= $this->builder->addWhere($this->where);\n if ($this->order) $sql .= $this->order;\n\n if ($this->limit) {\n\n $sql .= $this->builder->addLimitOffset();\n $this->parameters[] = $this->limit;\n $this->parameters[] = $this->offset;\n }\n\n return $sql;\n }", "title": "" }, { "docid": "2fe9705a205976f31c15350b69e0c64f", "score": "0.6115007", "text": "private function SQL_select()\n {\n $SQL = \"SELECT \";\n\n $all = false;\n foreach ($this->data as $col)\n {\n if ($col == self::ATTR_SELECT_ALL) {\n $SQL .= \"* \";\n $all = true;\n continue;\n }\n\n $SQL .= \"`{$col}`, \";\n }\n $SQL = rtrim($SQL);\n if (!$all) $SQL = substr($SQL, 0, -1); // Trim last comma.\n\n $SQL .= \" FROM `{$this->table_name}` \" . $this->parseWhere();\n\n if ($this->order_by) $SQL .= $this->parseOrderBy();\n if ($this->limit) $SQL .= \" \" . $this->parseLimit();\n\n //die($SQL);\n return trim($SQL);\n }", "title": "" }, { "docid": "931925ecf3a13885aeaf55d58cb13ec4", "score": "0.6112774", "text": "public function useQuery( $select_query ){\n\t\t$this->select_query = $select_query;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "94b5beb29e2ca8e4654e33788730c309", "score": "0.6107478", "text": "protected function _processSelect($builder, $select) {\n\t\t$builder -> select($select);\n\t\t\n\t\treturn $builder;\n\t}", "title": "" }, { "docid": "7e4a2c502ea97391c471b577bbf02a7b", "score": "0.6107299", "text": "protected function _compile_select($select_override = FALSE)\n {\n $sql = parent::_compile_select($select_override);\n\n if ($this->qb_calc_found_rows === TRUE) {\n $sql = preg_replace(\"/^SELECT /\", \"SELECT SQL_CALC_FOUND_ROWS \", $sql);\n }\n\n if ($this->qb_for_update === TRUE) {\n $sql = $sql . \" FOR UPDATE\";\n }\n\n return $sql;\n }", "title": "" }, { "docid": "70e245f32798d352b9dda3651041d30a", "score": "0.61016536", "text": "public function createSelectQuery()\n\t{\n\t\t$select = '';\n\t\t$this->select_where = !empty($this->select_where) ? 'WHERE ' .$this->select_where : '';\n\t\t$this->table = !empty($this->table) ? $this->table : static::tableName();\n\t\t$selectJoin = $this->createJoin();\n\t\t$selectOrder = !empty($this->select_order) ? 'ORDER BY '.$this->select_order : '';\n\t\t$selectLimit = !empty($this->select_limit) ? 'LIMIT '.$this->select_limit : '';\n\t\tif(!empty($this->select_what) && !empty($this->table) && !empty($this->method))\n\t\t{\n\t\t\t$select = sprintf('SELECT %s FROM %s %s %s %s %s', $this->select_what, $this->table, $selectJoin, $this->select_where, $selectOrder, $selectLimit);\n\t\t}\n\t\treturn $select;\n\t}", "title": "" }, { "docid": "913e83aaea04e627314f17795e7a5d9b", "score": "0.6089335", "text": "public function setSelecting($selecting)\n {\n $this->selecting = $selecting;\n }", "title": "" }, { "docid": "21422e2a601d2bd28d58a641e9e48328", "score": "0.60883695", "text": "public function select($selectedColumns = array()){\n $this->SelectedQueryType = self::SELECT;\n $this->SelectedColumns = $selectedColumns;\n }", "title": "" }, { "docid": "9b4f0118cbe5e266b38d0485d5e2dbbc", "score": "0.60878396", "text": "function select() {\n $args = func_get_args();\n \n foreach ($args as $key => $arg) {\n if (is_array($arg))\n $this->returnList[$this->__parseTableFieldKey(array_shift(array_keys($arg)))] = array_shift($arg);\n elseif (stristr($arg, '*'))\n $this->returnAllList[] = $this->__parseTableFieldKey($arg);\n else\n $this->returnList[$this->__parseTableFieldKey($arg)] = substr($arg, 2); \n }\n\n }", "title": "" }, { "docid": "d507cd379d9c99ebc95d49832010f4f2", "score": "0.6085294", "text": "function select($where=false, $order=false, $sql=false, $params=array(), $limit=false) {\n if ($sql) {\n $this->query = $sql;\n } else {\n $this->query\t= \"SELECT \".$this->table.\".* FROM \".$this->table;\n $this->query .= ($where == false) ? \"\" : \" WHERE \".$where;\n $this->query .= ($order == false) ? \"\" : \" ORDER BY \".$order;\n $this->query .= ($limit == false) ? \"\" : \" LIMIT \".$limit;\n }\n //echo $sql;\n $this->execute($params);\n $this->numRows = $this->result->rowCount();\n }", "title": "" }, { "docid": "fbf7ca1e3b7702152f7b617ef06e2d58", "score": "0.60845464", "text": "public function selectQuery(Query $query);", "title": "" }, { "docid": "b1caf745001af45f34dc039fba1acf4d", "score": "0.6079601", "text": "function select($column=\"*\") {\n\t\tif (func_num_args() > 1) {\n\t\t\t$columns = func_get_args();\n\t\t\t$this->selectFields = array_merge($this->selectFields, $columns);\n\t\t} else {\n\t\t\tif (is_array($column)) {\n\t\t\t\t$this->selectFields = array_merge($this->selectFields, $column);\t\n\t\t\t} else {\n\t\t\t\t$this->selectFields[] = $column;\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "fd347f0c23ae07ed725cd510d6c9f6d9", "score": "0.6075632", "text": "public static function select($select,$alias){\n if(self::checkOverride($alias) == true){\n //if there are overrides then a case is inserted around the select that instructs the override to populate on products where they exist\n return \"CASE WHEN `override_\" . $alias . \"`.`override_\" . $alias . \"` IS NOT NULL THEN `override_\" . $alias . \"`.`override_\" . $alias . \"` ELSE \" . $select . \" END AS `\" . $alias . \"`\";\n } else {\n //if there are no overrides set for this field then just the normal select is returned\n return $select . \" AS `\" . $alias . \"`\";\n }\n }", "title": "" }, { "docid": "25748c3e71bfae5a665ce082a54ea80e", "score": "0.6075311", "text": "public function recordsetSelecting(&$filter)\n {\n // Enter your code here\n }", "title": "" }, { "docid": "25748c3e71bfae5a665ce082a54ea80e", "score": "0.6075311", "text": "public function recordsetSelecting(&$filter)\n {\n // Enter your code here\n }", "title": "" }, { "docid": "4c68bebe624f0112e432b285e39419ed", "score": "0.60724145", "text": "public function selectInit($table = null)\n\t{\n\t\t// On attribue la table si besoin\n\t\tif ($table != null) {\n\t\t\t$this->selectTable = $table;\n\t\t}\n\n\t\t// On peut vérifier que selectTable est bien complétée, c'est à dire que la fonction setGlobalTable a été utilisée si $table n'était pas renseigné\n\t\tif ($this->selectTable == '') {\n\t\t\tdie ('[ORM 2] Aucune table pour la requête select');\n\t\t}\n\n\t\t// On reset les attributs, on reprend donc les valeurs définies au début\n\t\t$this->selectFields = '*';\n\t\t$this->selectWhere = [];\n\t\t$this->selectOrder = [];\n\t}", "title": "" }, { "docid": "bef395c3ef24909016010208f8d559df", "score": "0.606401", "text": "public function select($table) {\n\t\t$action = \"SELECT * FROM {$table} \";\n\t\t$this->_action = $action;\n\t\t$this->_actionType = \"SELECT\";\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ff7e5e7376dddce1006f68faa6fe790b", "score": "0.6060183", "text": "function execQuery(){\r\n\t\t// default fields must be added (if not yet)\r\n\t\tif(!$this->getModel()->isFieldsSet($this->owner->name))\r\n\t\t\t$this->getModel()->setQueryFields($this->owner->name);\r\n\t\t$this->getModel()->dsql($this->owner->name)->do_select();\r\n\t}", "title": "" }, { "docid": "c6300323a8d3d4352a2a09b0b87990ba", "score": "0.60600257", "text": "public function set_select($select)\n\t{\n\t\t$this->_selects[] = $select;\n\t}", "title": "" }, { "docid": "477c566e1d94e9072de50490f3a1158f", "score": "0.60593385", "text": "function setBigSelects()\n\t{\n\t\t$fabrikDb =& $this->getDb();\n\t\t$params =& $this->getParams();\n\t\tif ($params->get('enable_big_selects', 0)) {\n\t\t\t$fabrikDb->setQuery(\"SET OPTION SQL_BIG_SELECTS=1\");\n\t\t\t$fabrikDb->query();\n\t\t}\n\t}", "title": "" }, { "docid": "a290aac88016f43369ff359fca953e90", "score": "0.6057981", "text": "function select($id)\n\t{\n\treturn parent::select($id);\n\t}", "title": "" }, { "docid": "a290aac88016f43369ff359fca953e90", "score": "0.6057981", "text": "function select($id)\n\t{\n\treturn parent::select($id);\n\t}", "title": "" }, { "docid": "3bb641823376e398b44bce39b8712952", "score": "0.60486615", "text": "public static function querySelect( ){\n\t\treturn \"SELECT t_transaksi.ID as ID, t_transaksi.idProduk as idProduk, t_transaksi.stokAwal as stokAwal, t_transaksi.bbmMasuk as bbmMasuk, t_transaksi.sisa as sisa, t_transaksi.stokAkhir as stokAkhir, t_transaksi.shift as shift, t_transaksi.jenisTransaksi as jenisTransaksi, t_transaksi.tanggal as tanggal, \n\t\td.ID as ID_detail, d.Id_Transaksi as Id_Transaksi, d.idProduk as idProduk_detail, d.B1Awal, d.B1Akhir, d.B2Awal, d.B2Akhir, d.B3Awal, d.B3Akhir, d.B4Awal, d.B4Akhir, d.B1Tera, d.B2Tera, d.B3Tera, d.B4Tera\n\t\tFROM t_transaksi t_transaksi INNER JOIN t_detail_transaksi d ON t_transaksi.ID = d.Id_Transaksi\";\n\t}", "title": "" }, { "docid": "ddaca48a3578306d904cb571871a4acc", "score": "0.60246843", "text": "function get_record_select($table, $select='', $values=null, $fields='*') {\n\n global $CFG;\n\n if ($select) {\n $select = 'WHERE '. $select;\n }\n\n return get_record_sql('SELECT '. $fields .' FROM '. $CFG->prefix . $table .' '. $select, $values);\n}", "title": "" }, { "docid": "708fb19b76518a924a9505650f182bba", "score": "0.6019607", "text": "protected function _resetSelect()\n {\n }", "title": "" }, { "docid": "5bc7c546542a1c6f9c2bbd120482e739", "score": "0.60192037", "text": "protected function getSelectStatement(){\n return \"SELECT ISO, ISONumeric, CountryName, Capital, CityCode, Area, Population, Continent, TopLevelDomain, CurrencyCode, CurrencyName, PhoneCountryCode, Languages, Neighbours, CountryDescription FROM Countries \";\n }", "title": "" }, { "docid": "84ee90de6c716957c97d118b97bf5f51", "score": "0.601901", "text": "protected function _initSelect()\n {\n parent::_initSelect();\n // Conflict with PK_Job (entity_id) and PK_Department (entity_id)\n $this->addFilterToMap('entity_id', 'main_table.entity_id');\n\n // Get Department Name\n $this->getSelect()->join(\n ['department' => $this->getTable('phpaiss_jobs_departments')],\n 'main_table.department_id = department.entity_id',\n\n [\n 'department_name' => 'department.name'\n ]\n );\n }", "title": "" }, { "docid": "11c33dabc866e395a8fc111fd029b22c", "score": "0.60127807", "text": "public function _compile_select($select_override = FALSE)\n {\n $select = '';\n\n // Write the \"select\" portion of the query\n if ($select_override !== FALSE)\n {\n $select = $select_override;\n }\n else\n {\n $select = 'SELECT ';\n\n if ( $this->ar_sql_calc_found_rows )\n $select .= 'SQL_CALC_FOUND_ROWS ';\n\n if ( $this->ar_sql_no_cache )\n $select .= 'SQL_NO_CACHE ';\n\n if ( $this->ar_distinct )\n $select .= 'DISTINCT ';\n\n if (count($this->ar_select) == 0)\n {\n $select .= '*';\n }\n else\n {\n // Cycle through the \"select\" portion of the query and prep each column name.\n // The reason we protect identifiers here rather then in the select() function\n // is because until the user calls the from() function we don't know if there are aliases\n foreach ($this->ar_select as $key => $val)\n {\n $this->ar_select[$key] = $this->_protect_identifiers($val);\n }\n\n $select .= implode(', ', $this->ar_select);\n }\n }\n\n return parent::_compile_select($select);\n }", "title": "" }, { "docid": "205d4d23c1e5a72f772e5b4224e375f7", "score": "0.6012182", "text": "public function addSelect($column)\n {\n }", "title": "" }, { "docid": "9f36f4af9720fc8f2c9a5498c4ad615f", "score": "0.60108507", "text": "function select($table, $select = null, $where = null, $options = null) {\n $CI = & get_instance();\n return $CI->common_model->sql_select($table, $select, $where, $options);\n}", "title": "" }, { "docid": "291e278b4c706b4d23f3aa60cb1ecdef", "score": "0.6007749", "text": "public function select($table, $select = [], $where = [])\n\t{\n\t\t$parameters = $this->formatSelect($select);\n\n $sql = sprintf(\n 'SELECT %s FROM %s',\n $parameters, $table\n );\n\n\t\t$sql .= $this->checkWhere($where);\n\n\t\t$this->statement = $this->pdo->prepare($sql);\n\t}", "title": "" }, { "docid": "db2e9aa8e476f78049524bac47725171", "score": "0.6001819", "text": "function preSelect ();", "title": "" }, { "docid": "515143af5a9fea8076d88dc1782d4e34", "score": "0.60016716", "text": "abstract function select($query, $assoc = false);", "title": "" }, { "docid": "20539ec4ff81e14ea64bbc9588f58c21", "score": "0.59989333", "text": "public function setQuery($fields, $table, $primary = '', $where = '')\n\t{\n\t\t$this->primary = trim($primary);\n\n\t\t$this->select_fields = $fields;\n\t\t$this->select_table = $table;\n\t\t$this->select_where = trim($where);\n\t}", "title": "" }, { "docid": "f0286e13fd2b488194b6ec09a1b7bf31", "score": "0.5995804", "text": "protected function compileSelect()\n\t{\n\t\t$params = [];\n\n\t\t// select\n\t\t$query = 'SELECT ';\n\n\t\t// values\n\t\tif (count($this->select) === 0) {\n\t\t\t$query .= '* ';\n\t\t} else {\n\t\t\t$separator = '';\n\t\t\tforeach ($this->select as $identifier) {\n\t\t\t\tif (is_array($identifier)) {\n\t\t\t\t\tlist($identifier, $alias) = $identifier;\n\t\t\t\t} else {\n\t\t\t\t\t$alias = false;\n\t\t\t\t}\n\t\t\t\tif ($identifier instanceof \\Base\\Database\\Raw) {\n\t\t\t\t\t$query.= $separator . $identifier->expression();\n\t\t\t\t} else {\n\t\t\t\t\t$query.= $separator . $this->quoteIdentifier($identifier);\n\t\t\t\t}\n\t\t\t\tif ($alias) {\n\t\t\t\t\t$query.= ' AS ' . $this->quoteIdentifier($alias);\n\t\t\t\t}\n\t\t\t\t$separator = ', ';\n\t\t\t}\n\t\t}\n\n\t\t//distinct\n\t\tif (count($this->distinct) > 0) {\n\t\t\t$query.= ' DISTINCT ';\n\t\t\t$separator = '';\n\t\t\tforeach ($this->distinct as $identifier) {\n\t\t\t\t$query.= $separator . $this->quoteIdentifier($identifier);\n\t\t\t\t$separator = ', ';\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// from\n\t\tif (is_array($this->table)) {\n\t\t\tlist($table, $alias) = $this->table;\n\t\t} else {\n\t\t\t$table = $this->table;\n\t\t\t$alias = false;\n\t\t}\n\n\t\tif ($table instanceof \\Base\\Database\\Query) {\n\t\t\tlist($subQuery, $subParams) = $table->compile();\n\t\t\t$params = array_merge($params, $subParams);\n\t\t\t$query.= ' FROM (' . $subQuery . ')';\n\t\t} else {\n\t\t\t$query.= ' FROM ' . $this->quoteTable($table);\n\t\t}\n\t\tif ($alias) {\n\t\t\t$query.= ' AS ' . $this->quoteTable($alias);\n\t\t}\n\n\n\t\t// join\n\t\tif (count($this->joins) > 0) {\n\t\t\tforeach ($this->joins as $join) {\n\t\t\t\tif (in_array(strtoupper($join['type']), ['INNER', 'OUTER', 'LEFT', 'RIGHT', 'FULL'])) {\n\t\t\t\t\t$query .= ' ' . strtoupper($join['type']) . ' JOIN ';\n\n\t\t\t\t\tif (is_array($join['table'])) {\n\t\t\t\t\t\tlist($table, $alias) = $join['table'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$table = $join['table'];\n\t\t\t\t\t\t$alias = false;\n\t\t\t\t\t}\n\n\t\t\t\t\t$query.= $this->quoteTable($table) . ' ';\n\t\t\t\t\tif ($alias) {\n\t\t\t\t\t\t$query.= 'AS ' . $this->quoteTable($alias);\n\t\t\t\t\t}\n\n\t\t\t\t\t$on = false;\n\t\t\t\t\tif (count($join['on']) > 0) {\n\t\t\t\t\t\t$on = true;\n\t\t\t\t\t\tlist($onQuery, $onParams) = $this->compileConditions($join['on'], true);\n\t\t\t\t\t\t$query .= 'ON ' . $onQuery;\n\t\t\t\t\t\t$params = array_merge($params, $onParams);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (count($join['where']) > 0) {\n\t\t\t\t\t\tlist($onWhereQuery, $onWhereParams) = $this->compileConditions($join['where']);\n\t\t\t\t\t\tif ($on === true) {\n\t\t\t\t\t\t\t$query .= ' ' . $join['where'][0]['logic'] . ' ';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$query.= $onWhereQuery;\n\t\t\t\t\t\t$params = array_merge($params, $onWhereParams);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// where\n\t\tif (count($this->where) > 0) {\n\t\t\tlist($whereQuery, $whereParams) = $this->compileConditions($this->where);\n\t\t\t$query.= ' WHERE ' . $whereQuery;\n\t\t\t$params = array_merge($params, $whereParams);\n\t\t}\n\n\t\t// group by\n\t\t$separator = ' GROUP BY ';\n\t\tforeach ($this->group as $identifier) {\n\t\t\tif ($identifier instanceof \\Base\\Database\\Raw) {\n\t\t\t\t$query.= $separator . $identifier->expression();\n\t\t\t} else {\n\t\t\t\t$query.= $separator . $this->quoteIdentifier($identifier);\n\t\t\t}\n\t\t\t$separator = ', ';\n\t\t}\n\n\t\t// having\n\t\tif (count($this->having) > 0) {\n\t\t\tlist($havingQuery, $havingParams) = $this->compileConditions($this->having);\n\t\t\t$query.= ' HAVING ' . $havingQuery;\n\t\t\t$params = array_merge($params, $havingParams);\n\t\t}\n\n\t\t// order\n\t\t$separator = ' ORDER BY ';\n\t\tforeach ($this->order as $identifier => $direction) {\n\t\t\t$direction = strtoupper($direction) === 'DESC' ? 'DESC' : 'ASC';\n\t\t\tif ($identifier instanceof \\Base\\Database\\Raw) {\n\t\t\t\t$query.= $separator . $identifier->expression() . ' ' . $direction;\n\t\t\t} else {\n\t\t\t\t$query.= $separator . $this->quoteIdentifier($identifier) . ' ' . $direction;\n\t\t\t}\n\t\t\t$separator = ', ';\n\t\t}\n\n\t\t// limit\n\t\tif ($this->limit !== false) {\n\t\t\t$query .= ' LIMIT ' . (int) $this->limit;\n\t\t}\n\n\t\t// offset\n\t\tif ($this->offset !== false) {\n\t\t\t$query .= ' OFFSET ' . (int) $this->offset;\n\t\t}\n\n\t\t// union / union_all\n\t\t$unioned = false;\n\t\tforeach ($this->union as $union) {\n\t\t\tlist($unionQuery, $unionParams) = $union->compile();\n\t\t\t$params = array_merge($params, $unionParams);\n\t\t\tif ($unioned == false) {\n\t\t\t\t$query = '(' . $query . ')';\n\t\t\t}\n\t\t\t$query.= ' UNION (' . $unionQuery . ')';\n\t\t\t$unioned = true;\n\t\t}\n\n\t\tforeach ($this->unionAll as $union) {\n\t\t\tlist($unionQuery, $unionParams) = $union->compile();\n\t\t\t$params = array_merge($params, $unionParams);\n\t\t\tif ($unioned == false) {\n\t\t\t\t$query = '(' . $query . ') ';\n\t\t\t}\n\t\t\t$query.= ' UNION ALL (' . $unionQuery . ')';\n\t\t\t$unioned = true;\n\t\t}\n\n\n\t\treturn [$query, $params];\n\t}", "title": "" } ]
5322c5c44d68d5280e89b5d6bf507587
Logs out a user. This method responds to the "logout" button's OnClick event.
[ { "docid": "8751fd4e86e180e5eaf3c7b834c38710", "score": "0.0", "text": "public function logoutButtonClicked($sender,$param)\r\n {\r\n $this->Application->getModule('auth')->logout();\r\n $url=$this->getRequest()->constructUrl('page',$this->Service->DefaultPage);\r\n $this->Response->redirect($url);\r\n }", "title": "" } ]
[ { "docid": "45280095e714e2e241a6d84f7daa3daf", "score": "0.8094596", "text": "public function logOutUser() {\n\n if ($this->model->isLoggedIn()) {\n \n if ($this->loggedInView->didUserPressLogOut()) {\n \n if ($this->loginView->loadCookie()) {\n $this->loginView->unsetCookies(); \n }\n $this->model->doLogOut();\n $this->setMessage();\n }\n }\n }", "title": "" }, { "docid": "c8ede4c092b102b4a484197967785ad6", "score": "0.7760184", "text": "private function logUserOut()\n\t{\n\t\t$this->setSessionUsername();\n\t\t$this->redirect(\\Yii::app()->baseUrl . '/login?message=1');\n\t}", "title": "" }, { "docid": "faa7f2cc26adebc4ea220e7ffbb75a82", "score": "0.774435", "text": "function logoutUser() {\n\t\t\t$this->model->logoutUser ();\n\t\t}", "title": "" }, { "docid": "168822db1be28cb036b81bd1dbfbd579", "score": "0.7657622", "text": "public function logoutUser();", "title": "" }, { "docid": "c9e15770ac3bb8d07bd70c1db2fe130c", "score": "0.7656475", "text": "public function LogoutUser () {\n\t\t\tif ($this->RememberMe()) {\n\t\t\t\t\n\t\t\t\t$this->DeleteUserCredentials();\n\t\t\t}\n\n\t\t\t// Logout user and render loginView.\n\t\t\t$this->sessionModel->LogoutUser();\n\t\t}", "title": "" }, { "docid": "523c5fdd5ed4cbf03c4b5d3361622df9", "score": "0.7587811", "text": "public function action_sign_out()\n\t{\n\t\tORM::factory('user')->logout(TRUE, TRUE, '/');\n\t}", "title": "" }, { "docid": "e6235439ca73783a4072b77b51c1cb5b", "score": "0.75751567", "text": "public function actionLogout()\n\t{\n\t\t$this->addToTitle(\"Sign out\");\n\t\tYii::log(\"user log out\");\n\t\tYii::app()->user->logout();\n\t\t$this->redirect(Yii::app()->homeUrl);\n\t}", "title": "" }, { "docid": "5a42a56f9d8b0c98d26669be100c5060", "score": "0.7565797", "text": "public function logOut()\n {\n Horde::getServiceLink('logout', $this->_app)->setRaw(true)->redirect();\n }", "title": "" }, { "docid": "e469485ea36d033bfa112c92a3523a8d", "score": "0.7541131", "text": "public function logOut() {\n\n if ($this->model->isLoggedIn()) {\n\n if ($this->loggedInView->didUserPressLogOut() == true) {\n if ($this->loginView->loadCookie()) {\n $this->loginView->unsetCookies(); \n }\n\n $this->model->doLogOut();\n $this->setMsg();\n }\n }\n }", "title": "" }, { "docid": "d923597e353d2af11cffad290ef05f45", "score": "0.7538471", "text": "public function logOutUser(){\r\n $this->session->logOut();\r\n $this->loggedIn = $this->session->isLoggedIn();\r\n $this->user = null;\r\n }", "title": "" }, { "docid": "fc44d86d1829de9ce5a7b09b40990739", "score": "0.7472439", "text": "public function logout() {\n $this->userObj->logout($this->user->email);\n Router::redirect(\"/\");\n }", "title": "" }, { "docid": "0fe3d98b6876853e85b5921781a536a4", "score": "0.7435092", "text": "public function actionLogout()\n\t{\n\t\tYii::app()->user->logout();\n\t\t$this->afterLogout();\n\t}", "title": "" }, { "docid": "04f572804c751b152092e9d65d2f85da", "score": "0.7412586", "text": "public function actionLogout()\n\t{\n\t Yii::app()->session->add('user', NULL);\n\t\tYii::app()->user->logout();\n\t\t$this->redirect(Yii::app()->homeUrl);\n\t}", "title": "" }, { "docid": "4813562e5f6cf6a75cf3697e418b28ab", "score": "0.7389475", "text": "public function logoutUser() {\n\t\t$this->clearCookies();\n\t\theader('Location: ' . htmlspecialchars($_SERVER[\"PHP_SELF\"]));\n\t\texit();\n\t}", "title": "" }, { "docid": "afe99803e35b04b1eaeee59ebc61ea9f", "score": "0.73520696", "text": "public function Logout()\n {\n $this->Users_model->logout();\n\t}", "title": "" }, { "docid": "708e9a6d6c119669230e6bbd28a118c2", "score": "0.7338129", "text": "function logoutAction() {\n $user = UserModel::singleton();\n $class_view = get_final_class_name('View');\n $view = $class_view::singleton();\n if ($user->is_logged()) {\n $user->logout();\n $view->set_msg($user->get_msg(), $user->is_ok());\n }\n $this->redirect_to('login');\n }", "title": "" }, { "docid": "5b1277e4c191fd38436dadefa7a160c7", "score": "0.7336212", "text": "public function actionLogout() {\n\t\t$user = User::model()->findByPk(Yii::app()->user->getId());\n\t\tif(isset($user)) {\n\t\t\t$user->lastLogin=time();\n\t\t\t// $session = Session::model()->findByAttributes(array('user'=>$user->username));\n\t\t\t$session = Session::model()->deleteAllByAttributes(array('user'=>$user->username));\n\t\t\t// if(isset($session))\n\t\t\t\t// $session->delete();\n\t\t\t$user->save();\n\t\t}\n\t\tif(isset($_SESSION['access_token'])){\n\t\t\tunset($_SESSION['access_token']);\n\t\t}\n\t\tYii::app()->user->logout();\n\t\t$this->redirect(Yii::app()->homeUrl);\n\t}", "title": "" }, { "docid": "4a38c333ba658b684278821fa51883ea", "score": "0.7325231", "text": "public function logout()\n {\n if ($this->check()) {\n # unset session #\n unset($_SESSION['user_id']);\n $this->userId = null;\n\n # and output \"successful\" message #\n $this->message = \"User '{$this->user()->name}' signed out successfully\";\n }\n }", "title": "" }, { "docid": "097650591dc04a7149a7218337a248e3", "score": "0.73167986", "text": "public function actionLogout()\n {\n unset($_SESSION['signinUser']);\n header('Location: /');\n }", "title": "" }, { "docid": "d848b76fcadd8b95d2567f7a28dab2ce", "score": "0.7296609", "text": "public function logout() {\n\t\t$uname = $this->_auth->getUserField('login');\n $update = array( \"auth_token\" => 'NULL' );\n $bind = array( \":login\" => $uname );\n \n DB::inst()->update( \"user\", $update, \"login = :login\", $bind );\n\t\t\n\t\t$this->_auth->_setcookie(\"TP_COOKNAME\", '', time()-COOKIE_EXPIRE);\n \t$this->_auth->_setcookie(\"TP_COOKID\", '', time()-COOKIE_EXPIRE);\n\t\t$this->_auth->_setcookie(\"TP_REMEMBER\", '', time()-COOKIE_EXPIRE);\n\t\tredirect( BASE_URL );\n\t}", "title": "" }, { "docid": "27ef1c5be5234d6c452ec10ca796f899", "score": "0.728084", "text": "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->controller->createUrl('login'));\n }", "title": "" }, { "docid": "19ffc3dfa70017af46c5247e40865028", "score": "0.7278121", "text": "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(array('login'));\n }", "title": "" }, { "docid": "2e26d261f7e3104e8867c6e320a42eb9", "score": "0.72774106", "text": "public function logoutUser() {\n\t\t$this->loginModel->setLogin(false);\n\t\t$this->sessionHandler->setMessage(Message::logoutSuccess);\n\t\t$this->cookieHandler->forgetUser();\n\t\t$this->sessionHandler->saveUsername(\"\");\n\t\treturn $this->loginView->getLoginForm();\n\t}", "title": "" }, { "docid": "0177f0d36bee6d8eb076e17d273e9753", "score": "0.7277099", "text": "public function actionLogout()\r\n\t{\r\n\t\tYii::app()->user->logout();\r\n\t\t$this->redirect('login');\r\n\t}", "title": "" }, { "docid": "d19d15f8c84bced3a9868c24f6ca3125", "score": "0.7275894", "text": "public function logout()\n {\n $mySession = $this->getSession();\n $myConfig = $this->getConfig();\n\n $oUser = oxNew(\"oxuser\");\n $oUser->logout();\n\n // kill session\n $mySession->destroy();\n\n // delete also, this is usually not needed but for security reasons we execute still\n if ($myConfig->getConfigParam('blAdodbSessionHandler')) {\n $oDb = oxDb::getDb();\n $oDb->execute(\"delete from oxsessions where SessionID = \" . $oDb->quote($mySession->getId()));\n }\n\n //reseting content cache if needed\n if ($myConfig->getConfigParam('blClearCacheOnLogout')) {\n $this->resetContentCache(true);\n }\n\n oxRegistry::getUtils()->redirect('index.php', true, 302);\n }", "title": "" }, { "docid": "05f8b788f3d1e3ce1b6868b996e752f0", "score": "0.72649515", "text": "public function logout() {\n\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\t\n\t# Create the data array we'll use with the update method\n\t# In this case, we're only updating one field, so our array only has one entry\n\t$data = Array(\"token\" => $new_token);\n\t\n\t# Do the update\n\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\t\n\t# Delete their token cookie - effectively logging them out\n\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\t\n\t# Send them back to the main landing page\n\tRouter::redirect(\"/\");\n\t}", "title": "" }, { "docid": "c48c46ef911507d6f3b7967e7232d324", "score": "0.7262293", "text": "public function logout() {\n $this->getSession()->visit($this->locatePath('/user/logout'));\n }", "title": "" }, { "docid": "3993bea66f2ed672fe915c507b252aa5", "score": "0.72510886", "text": "public function actionLogout()\n\t{\n\t\tYii::app()->user->logout();\n\t\t$this->redirect(\"login\");\n\t}", "title": "" }, { "docid": "be4a8fcf826218d8161e645352bec2ed", "score": "0.7249294", "text": "public function logout()\r\n {\r\n unset($_SESSION['user_2']);\r\n $this->oSession->aUser = $this->aUser = null;\r\n $this->oSession->iUserId = $this->iUserId = null;\r\n\r\n return \"<User Type='OK'/>\";\r\n }", "title": "" }, { "docid": "45ffd58183b40c4a98a18ba35cdf1931", "score": "0.7246698", "text": "public static function logoutLisener(){\n\t\tif(isset($_GET['logoutbutton']) && isset($_SESSION['username'])){\n\t\t\tOC_LOG::event($_SESSION['username'],2,'');\n\t\t\t$_SESSION['user_id']=false;\n\t\t\t$_SESSION['username']='';\n\t\t\t$_SESSION['username_clean']='';\n\t\t}\n\t}", "title": "" }, { "docid": "a9bbf88b2b69d0b09ececc2f81be3d7e", "score": "0.72439647", "text": "public function actionLogout()\n\t{\n\t\tYii::app()->user->logout();\n\t\t$this->redirect('login');\n\t}", "title": "" }, { "docid": "1d8c7583bf99bf80c29aa944ba2a903f", "score": "0.7243157", "text": "public function logOut(){\r\n require_once \"models/User.php\";\r\n $user = new User();\r\n\r\n //Eliminamos las cookies y el session\r\n setcookie(\"id_usuario\", null, strtotime('+10 second'),'/');\r\n setcookie(\"sessionId\", null, strtotime('+10 second'),'/');\r\n setcookie(\"rol\",null, strtotime('+10 second'),'/');\r\n unset($_SESSION);\r\n $user->logOut();\r\n //header(\"Location: \" . BASE_DIR);\r\n }", "title": "" }, { "docid": "f006279e1728c61c6e2e6ff33b5d87f9", "score": "0.72186834", "text": "public function logout() {\n\t\t\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\n\t\t\t# Create the data array we'll use with the update method\n\t\t\t# In this case, we're only updating one field, so our array only has one entry\n\t\t\t$data = Array(\"token\" => $new_token);\n\n\t\t\t# Do the update\n\t\t\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n\t\t\t# Delete their token cookie - effectively logging them out\n\t\t\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n\t\t\t# Send them back to the main landing page\n\t\t\tRouter::redirect(\"/\");\n\t\t}", "title": "" }, { "docid": "32f0cee0456860d17f08e2fd25c805de", "score": "0.72173333", "text": "public function signOutUser() {\n session_destroy();\n }", "title": "" }, { "docid": "76299d5d625d06deb4625c8d104e4e1a", "score": "0.7216335", "text": "public function logout () {\n $this->user->logout();\n $this->status();\n }", "title": "" }, { "docid": "e268f2884cde1dac95ae1215485b390b", "score": "0.7211901", "text": "function logout() \n {\n $this->user_id = 0;\n $this->login = \"Guest\";\n $this->name = \"Guest\";\n $this->ok = true;\n $this->msg = _(\"You have been logged out!\");\n \n $_SESSION['auth_login'] = \"\";\n $_SESSION['auth_secret'] = \"\";\n\n unset($_SESSION['auth_login']);\n unset($_SESSION['auth_secret']);\n }", "title": "" }, { "docid": "27d63524c57d529eada324be957836c4", "score": "0.72074395", "text": "public function logout()\n {\n $this->session->set('auth', false);\n $this->logger->info('User {user} logged out.', ['user' => $this->session->get('user')['name']]);\n $this->session->set('user', null);\n $this->cache->clear();\n $this->redirectTo(BASEURL . '/');\n }", "title": "" }, { "docid": "49b77f338d77c79079bc2677fdd9ca83", "score": "0.72014683", "text": "public static function logout(){\n authenticator::conectdb();\n authenticator::logOutUser();\n }", "title": "" }, { "docid": "2f5f3f3f73be702d782d1612cc32baaf", "score": "0.71925694", "text": "public function actionLogout() {\n\t\tYii::app() -> user -> logout();\n\t\t$session = new CHttpSession;\n\t\t$session -> open();\n\t\t$session -> destroy();\n\n\t\t$this -> redirect(Yii::app() -> homeUrl);\n\t}", "title": "" }, { "docid": "5305b1dab2076ea62800a8147db90d8b", "score": "0.71921206", "text": "public function logout()\r\n {\r\n $this->login(null, null, null);\r\n }", "title": "" }, { "docid": "887a1491ab666ebf9e3c7aae33af0bb0", "score": "0.7188389", "text": "public function actionLogout() {\n if (!Yii::app()->user->isGuest) {\n $model = new LoginForm;\n $model->username = Yii::app()->user->name;\n $this->beforeLogout($model);\n\n ## audit trail tracker\n AuditTrail::logout();\n\n ## logout user\n Yii::app()->user->logout();\n\n $this->afterLogout($model);\n }\n\n $_SESSION = array();\n\n // unset cookies\n if (isset($_SERVER['HTTP_COOKIE'])) {\n $cookies = explode(';', $_SERVER['HTTP_COOKIE']);\n foreach($cookies as $cookie) {\n $parts = explode('=', $cookie);\n $name = trim($parts[0]);\n setcookie($name, '', time()-1000);\n setcookie($name, '', time()-1000, '/');\n }\n }\n \n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "6f80d5598950f5d215da3e8c26353e17", "score": "0.7185824", "text": "public function user_logout(){\n\t\t\t$_SESSION['login'] = FALSE;\n\t\t\tsession_destroy();\n\t\t}", "title": "" }, { "docid": "89b9a117f132f485f9f38a7709031fb9", "score": "0.7181704", "text": "public function logoutUser() {\n }", "title": "" }, { "docid": "21f58888acfb61fd85667777b4af3711", "score": "0.71767706", "text": "public function logOut()\n {\n sfEasyAuthUtils::logDebug('Logging user out...');\n \n sfContext::getInstance()->getResponse()->setCookie(sfConfig::get('app_sf_easy_auth_remember_cookie_name'), '', -1);\n \n $this->getAttributeHolder()->remove('security_user_id');\n $this->getAttributeHolder()->remove('sf_easy_auth.restricted_url');\n $this->setAuthenticated(false);\n $this->clearCredentials();\n $this->eaUser = null;\n }", "title": "" }, { "docid": "ebf97620b7a0731172ce1fd8f1f2211f", "score": "0.71736324", "text": "public function actionLogout() {\r\n Yii::app()->user->logout();\r\n $this->redirect('/');\r\n }", "title": "" }, { "docid": "71ae57254e8415f60a0cf9927ec1d286", "score": "0.71685255", "text": "public function logout()\n {\n unset($_SESSION['user']);\n }", "title": "" }, { "docid": "fc50fa06908e0ea70f027edc54931328", "score": "0.71642804", "text": "public function actionLogout() {\n $this->getUser()->logout(true);\n $this->redirect('Homepage:', ['userid' => null]);\n }", "title": "" }, { "docid": "3f3faf4555bf01389fa3c8eab169827e", "score": "0.7162144", "text": "public function logout()\n {\n if ($_SERVER[\"REQUEST_METHOD\"] != \"GET\")\n {\n echo $this->encodeJson(\"Wrong resource call\", 0xDEAD, NULL);\n\n return;\n }\n\n // For now do nothing\n echo $this->encodeJson(\"User logout.\", 0x00, NULL);\n }", "title": "" }, { "docid": "0b3b86660e996abf3755b3315c7a8989", "score": "0.7149717", "text": "public function actionLogout()\n\t{\n\t\tYii::app()->user->logout(false);\t\t\n\t\t$this->redirect(Yii::app()->homeUrl);\n\t}", "title": "" }, { "docid": "6c27e2e1d8bc1e2f2d7434445359fdd6", "score": "0.7145357", "text": "public function actionLogout()\n\t{\n\t\tYii::$app->account->auth->logout();\n\t\tAlert::add(['user/auth', 'logout_success'], Alert::TYPE_SUCCESS);\n\t\treturn $this->goHome();\n\t}", "title": "" }, { "docid": "ec8e6733c64f5bbf7e3d735f49692b4f", "score": "0.7138763", "text": "public function logout() {\n $new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\n # Create the data array we'll use with the update method\n # In this case, we're only updating one field, so our array only has one entry\n $data = Array(\"token\" => $new_token);\n\n # Do the update\n DB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n # Delete their token cookie by setting it to a date in the past - effectively logging them out\n setcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n # Send them back to the main index.\n Router::redirect(\"/\");\n\n }", "title": "" }, { "docid": "5afb35ddc9f3451a8f1e4450524687d2", "score": "0.7137581", "text": "public function logoutAction() {\n\t$auth = $this->auth;\n $auth->clearIdentity();\n $this->view->title = \"Users\";\n $this->view->message = \"Logged out\";\n }", "title": "" }, { "docid": "c88ef69fddbaeb1e7c7cee465ea5e970", "score": "0.7134716", "text": "public function action_logout()\n {\n // log out\n Auth::instance()->logout();\n $referer = $_REQUEST['r'] ? $_REQUEST['r']\n : URL::site('user/login');\n Request::instance()->redirect($referer);\n Request::instance()->redirect($referer);\n }", "title": "" }, { "docid": "80285d801bfa091f2cc41115eba6caa3", "score": "0.7130791", "text": "public function logout() {\n\t\t$_SESSION['user'] = NULL;\n\t}", "title": "" }, { "docid": "faebba24edfbed99dc1f6ec9f01459e3", "score": "0.712927", "text": "public function logoutAction(): void\n {\n unset($_SESSION[\"user\"]);\n\n $data = $this->lang->getData('login_view');\n $this->render('login_view', $data);\n }", "title": "" }, { "docid": "603e5f078d416cbf77a87c166eb4e487", "score": "0.7128112", "text": "public function user_logout()\n\t\t{\n\t\t\t$_SESSION['uid'] = FALSE;\n\t\t\t$_SESSION['email'] = FALSE;\n\t\t\t$_SESSION['logged_in'] = FALSE;\n\t\t\t$_SESSION['uName'] = FALSE;\n\t\t\t$_SESSION['balance'] = FALSE;\n\n\t\t\tsession_unset();\n\t\t\tsession_destroy();\n\n\t\t\theader(\"Location: index.php\");\n\t\t}", "title": "" }, { "docid": "ab6f7d2ebdcae3b4befe56649c39be13", "score": "0.71274894", "text": "public function logOut()\n {\n $_SESSION['actionDone'] = 'Vous avez été déconnecté.';\n\n unset($_SESSION['connected']);\n unset($_SESSION['currentMember']);\n\n $view = new View();\n $view->redirect('home');\n }", "title": "" }, { "docid": "294f1fffe0f97d9486403b2cdab930e8", "score": "0.7127112", "text": "public function actionLogout()\r\n {\r\n Yii::app()->user->logout();\r\n $this->redirect('/');\r\n }", "title": "" }, { "docid": "ac39b2304e4c492bcdc107242d23aa2b", "score": "0.7126697", "text": "public function logoffUser():void\n {\n unset($_SESSION['user']);\n }", "title": "" }, { "docid": "6f129128681b0dbfac63ea3fc5a3bbcc", "score": "0.71252036", "text": "public function actionLogout() {\r\n Yii::app()->user->logout();\r\n $this->redirect(Yii::app()->homeUrl);\r\n }", "title": "" }, { "docid": "4cd8fe676a53e89f0b3ecc3c9384fc90", "score": "0.7124358", "text": "public function actionLogout()\n\t{\n\t\tYii::app()->user->logout();\n\t\t$this->redirect('/');\n\t}", "title": "" }, { "docid": "5607189c58996f089b1b3855e11e04af", "score": "0.7123698", "text": "public function actionLogout()\n {\n Yii::app()->user->logout();\n if (Yii::app()->user->isGuest) {\n $result = new ApiResult(ApiResponse::STATUS_SUCCESS, null, null, null, 200);\n Yii::app()->apiHelper->sendResponse($result);\n } else {\n throw new CException('Sign out failed.');\n }\n }", "title": "" }, { "docid": "1ad0955a5819093ee6d8c10f0d04ff27", "score": "0.71162724", "text": "public function actionLogout()\n {\n require_once(dirname(__FILE__).'/../extensions/hoauth/models/UserOAuth.php');\n\n $hauth = UserOAuth::model()->getHybridAuth();\n $sessionData = $hauth::getSessionData();\n $user = User::model()->findByPk(Yii::app()->user->getId());\n $user->hauth_session_data = $sessionData;\n $user->save();\n\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "eeb7815b73618074ae368b9925a1a97a", "score": "0.7107944", "text": "public function userLogout()\n {\n session_unset();\n\n // destroy the session\n // session_destroy();\n\n echo \"<meta http-equiv='refresh' content='0'>\";\n }", "title": "" }, { "docid": "d4a365bf5c92000701e189f2267bd6cb", "score": "0.7107125", "text": "public function Signout() {\n\t\tunset($_SESSION[self::$SESSION_NAME]);\n\t\t$this->currentUser = null;\n\t\t// Now call to this method is compulsory since the automatic user serialization in Dispatcher disabled\n\t\t$this->SerializeUser();\n\t}", "title": "" }, { "docid": "4b4dbe89ff9dce422c3965cf10c6b80d", "score": "0.70980513", "text": "public static function logout(){}", "title": "" }, { "docid": "59c88fb7dce0dddbf4db49f408a23ba1", "score": "0.7092526", "text": "public function logout()\n {\n $this->session->unset_userdata('uid');\n\n // Empty response to let the client know they have been logged out\n echo '{}';\n }", "title": "" }, { "docid": "58e382a8253023980dce962354156f99", "score": "0.708787", "text": "public function logout()\r\n\t{\r\n\t\tif ($this->_user)\r\n\t\t{\r\n\t\t\t// User is logged in, so we can logout\r\n\t\t\t$this->user_model->logout_user();\r\n\t\t}\r\n\r\n\t\t// Redirect to login page\r\n\t\tredirect('account/login');\r\n\t}", "title": "" }, { "docid": "a084a1f534100197b144c453a7b22e45", "score": "0.70857346", "text": "public function logout();", "title": "" }, { "docid": "a084a1f534100197b144c453a7b22e45", "score": "0.70857346", "text": "public function logout();", "title": "" }, { "docid": "1b3fa543c3d0d52e3cebfd74ed10e59a", "score": "0.70839614", "text": "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "1b3fa543c3d0d52e3cebfd74ed10e59a", "score": "0.70839614", "text": "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "1b3fa543c3d0d52e3cebfd74ed10e59a", "score": "0.70839614", "text": "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "1b3fa543c3d0d52e3cebfd74ed10e59a", "score": "0.70839614", "text": "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "1b3fa543c3d0d52e3cebfd74ed10e59a", "score": "0.70839614", "text": "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "1b3fa543c3d0d52e3cebfd74ed10e59a", "score": "0.70839614", "text": "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "1b3fa543c3d0d52e3cebfd74ed10e59a", "score": "0.70839614", "text": "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "1b3fa543c3d0d52e3cebfd74ed10e59a", "score": "0.70839614", "text": "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "1b3fa543c3d0d52e3cebfd74ed10e59a", "score": "0.70839614", "text": "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "5f18c60a3450780f4743e92f14bdc1a4", "score": "0.70836985", "text": "public function logoutUser()\n {\n // Add control to check if there is an active user session\n $user = $this->session::isUserAuthenticated();\n // Destroy current user session\n if ($user != false && isset($_GET['userKey']) && $_GET['userKey'] == $_SESSION['user']['userKey']) {\n $this->session::destroy();\n $this->httpResponse->addHeader('Location: /admin/login');\n exit();\n } else {\n // Wrong user key is applied to logout!\n $this->httpResponse->set401ErrorResponse($this->config::isDebug('Logout refused: user was not recognized! [Debug trace: wrong user key is applied!]'), $this->router);\n exit();\n }\n }", "title": "" }, { "docid": "7b9b3fe0e4361db2e40d59587911845b", "score": "0.70785797", "text": "public function doLogOut() {\n\n if ($this->model->isLoggedIn()) {\n if ($this->loggedInView->didUserPressLogOut()) {\n if ($this->loginView->loadCookie()) {\n $this->loginView->unsetCookies(); \n }\n\n $this->model->doLogOut();\n $this->registerController->setMessage();\n }\n }\n }", "title": "" }, { "docid": "b0750c03bfa989f2b5c2567b28e6f5e8", "score": "0.70636386", "text": "function Signout() {\n\t\tunset($_SESSION[self::$SESSION_NAME]);\n PersistenceManager::GetInstance()->DestroyPersistence();\n\t\t$this->currentUser = null;\n\t\t// Now call to this method is compulsory since the automatic user serialization in Dispatcher disabled\n\t\t$this->SerializeUser();\n }", "title": "" }, { "docid": "d9795ce4e38e7e9f33e198efc4486b8e", "score": "0.7063572", "text": "public function actionLogout()\r\n {\r\n Yii::app()->user->logout();\r\n $this->redirect(Yii::app()->homeUrl);\r\n }", "title": "" }, { "docid": "d9795ce4e38e7e9f33e198efc4486b8e", "score": "0.7063572", "text": "public function actionLogout()\r\n {\r\n Yii::app()->user->logout();\r\n $this->redirect(Yii::app()->homeUrl);\r\n }", "title": "" }, { "docid": "99e7da12c1527922538be37932b9c32c", "score": "0.70593715", "text": "public static function logOutAction()\n\t{\n\t\t// Ready the session\n\t\tparent::startSession();\n\n\t\t// Fetch the user name of the current user from the session object for later use\n\t\t$username = $_SESSION[BaseController::SESSION_USER_LABEL]['userName'];\n\n\t\t// Then wipe the session from the face of this earth\n\t\tsession_unset();\n\t\tsession_destroy();\n\t\tsession_write_close();\n\t\tsession_regenerate_id(true);\n\n\t\t// Destroy all the cookies as well\n\t\tif ( isset($_COOKIES) )\n\t\t{\n\t\t\tforeach ($_COOKIES as $c_id => $c_value)\n\t\t\t{\n\t\t\t\tsetcookie($c_id, NULL, time() - 3600, \"/\");\n\t\t\t}\n\t\t}\n\n\t\t$logInDAO = new LogInDAO();\n\t\t$logInDAO->killLogInCookie($username);\n\n\t\t// Send back a heads-up to the client for notification purposes\n\t\tparent::sendPositiveHTTPResponse();\n\t}", "title": "" }, { "docid": "86af79c3019bdcf575f6b9bcfbf34b65", "score": "0.7047273", "text": "public function actionLogout() {\n\t\tYii::app()->user->logout();\n\t\t$this->redirect(Yii::app()->homeUrl);\n\t}", "title": "" }, { "docid": "9bc90ccc7d44bb1285488e51441ef5b9", "score": "0.7044656", "text": "public function logout() {\r\n if(!user_logged_in()) {\r\n //Redirect user\r\n redirect('home');\r\n }\r\n\r\n //Modal functions\r\n logout_user();\r\n\r\n //Load page\r\n redirect('home');\r\n }", "title": "" }, { "docid": "d194e0101a80a91f51a5d1b2ac17b7d1", "score": "0.7043986", "text": "public function actionLogout() {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "ed776ee1b68c3af34894c186627d3aef", "score": "0.70392805", "text": "public static function logOut()\n {\n session_start_safe();\n unset($_SESSION['user_id']);\n }", "title": "" }, { "docid": "25e9c12f4b10cb441d9a08e614b0073e", "score": "0.70355195", "text": "public function actionLogout()\n {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "25e9c12f4b10cb441d9a08e614b0073e", "score": "0.70355195", "text": "public function actionLogout()\n {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "25e9c12f4b10cb441d9a08e614b0073e", "score": "0.70355195", "text": "public function actionLogout()\n {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "25e9c12f4b10cb441d9a08e614b0073e", "score": "0.70355195", "text": "public function actionLogout()\n {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "25e9c12f4b10cb441d9a08e614b0073e", "score": "0.70355195", "text": "public function actionLogout()\n {\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "4bf7b84fd6cdfb834c044385171dfd91", "score": "0.7031351", "text": "function logout()\n {\n //Import default user object\n $this->_data = $this->config->userDefaultData->toArray();\n $this->log->report('User Logged out');\n }", "title": "" }, { "docid": "ee223d51cfd662fd524d122b30c61c1b", "score": "0.7023332", "text": "public function logout()\n\t{\n\t\tif( $this->xfUser->get('is_admin') )\n\t\t{\n\t\t\t$adminSession = new XenForo_Session(array('admin' => true));\n\t\t\t$adminSession->start();\n\t\t\tif( $adminSession->get('user_id') == $this->xfUser->getUserId() )\n\t\t\t{\n\t\t\t\t$adminSession->delete();\n\t\t\t}\n\t\t}\n\t\tXenForo_Model::create('XenForo_Model_Session')->processLastActivityUpdateForLogOut($this->xfUser->getUserId());\n\t\tXenForo_Application::get('session')->delete();\n\t\tXenForo_Helper_Cookie::deleteAllCookies(\n\t\t\tarray('session'),\n\t\t\tarray('user' => array('httpOnly' => false))\n\t\t);\n\t\t$this->xfUser->setup(0);\n\t\treturn;\n\t}", "title": "" }, { "docid": "8eb56ae0f094b7c41a2305f692b81493", "score": "0.702195", "text": "public function actionLogout()\r\n\t{\r\n\t\tYii::app()->user->logout();\r\n\t\t$this->redirect(Yii::app()->homeUrl);\r\n\t}", "title": "" }, { "docid": "8eb56ae0f094b7c41a2305f692b81493", "score": "0.702195", "text": "public function actionLogout()\r\n\t{\r\n\t\tYii::app()->user->logout();\r\n\t\t$this->redirect(Yii::app()->homeUrl);\r\n\t}", "title": "" }, { "docid": "6ae4cdb81e722582ca36c55b0422e5f7", "score": "0.7019865", "text": "public function iLogout() {\n // Logout if I am logged in.\n if ($this->loggedIn()) {\n $this->logout();\n }\n }", "title": "" }, { "docid": "bf1173e7547e914ab60bb08b617e222c", "score": "0.70137155", "text": "function logUserOut() {\n unset($_SESSION[\"user\"]);\n }", "title": "" }, { "docid": "5fa9d3d2d3ddbebd9f4d7c7292e56b11", "score": "0.69980484", "text": "public function logout() {\n // unset/destroys variables\n unset($_SESSION['user']);\n unset($_SESSION['access_level']);\n unset($_SESSION['display_name']);\n $this->signed_in = false;\n }", "title": "" } ]
c83108962c9542595dcc307f1652632b
This method will redirect users back to the login page if not properly authenticated
[ { "docid": "18f6bd66bf11dc506f7c24b6077eaf18", "score": "0.0", "text": "public function __construct() {\n $this->middleware('auth:web');\n }", "title": "" } ]
[ { "docid": "45425e6da3c191df1caa22bca426948e", "score": "0.7687778", "text": "public function redirect_login() {\n header('location: ' . $this->get_login_url());\n exit;\n }", "title": "" }, { "docid": "cdc6cad9aa928d6b9b8b440b10a363af", "score": "0.7581755", "text": "public function redirectIfNotLoggedIn() {\n\t\t\tif (!self::isLoggedIn())\n\t\t\t\tself::redirect();\n\t\t}", "title": "" }, { "docid": "d513b0814f8cd1a8df6fa951099bcd4f", "score": "0.748966", "text": "public function login()\t\n\t{\n\t\tredirect('/user', 'refresh');\n\t\t\n\t}", "title": "" }, { "docid": "bb50b34153cd9047d31497ef4abc593d", "score": "0.74874896", "text": "protected function redirectToLoginPage()\n {\n $this->view->redirect(\n Uri::setOrReplaceParamValue('target', Uri::getCurrentUri(), '/login.php'));\n exit;\n }", "title": "" }, { "docid": "9e67a73d6313140e9491b91e5fc7356e", "score": "0.74376804", "text": "public function login_required() {\n\t\tif (isset($_SERVER['PATH_INFO'])) {\n\t\t\t$url = URL::base(true) . substr($_SERVER['PATH_INFO'], 1);\n\t\t} else {\n\t\t\t$url = URL::base(true);\n\t\t}\n\n\t\tCookie::set('user_redirect', $url);\n\t\tthrow new HTTP_Exception_401(\"You do not have permissions to view this page\");\n\t}", "title": "" }, { "docid": "17c83b47fb3e6eade95c14d05d0739e1", "score": "0.73564845", "text": "public function login_redirect() {\n $this->f3->set('use_viewport', false);\n $this->f3->set('view', 'user/login.htm');\n }", "title": "" }, { "docid": "6c1233fcc28733eebc1fc44f84c50256", "score": "0.7356109", "text": "function _loginRedirect(){\n \t// send user to the login page\n \theader(\"Location:/login.php\");\n }", "title": "" }, { "docid": "f08c7430313c716c98102f7a3c43ca84", "score": "0.7320429", "text": "protected function _requireAuth() {\n\t\t\t$this->Session->setFlash(__('auth_autherror'), 'flash/warning');\n\t\t\t$here = $this->request->here(false);\n\t\t\t$this->Auth->redirectUrl($here);\n\t\t\t$this->redirect(['controller' => 'users', 'action' => 'login']);\n\t\t}", "title": "" }, { "docid": "1270e2789345f7ac6d02083394d91f48", "score": "0.7307911", "text": "protected function loginAndRedirect()\n\n\t{\n\n\t\tif( isset($_SESSION['username']) ) \n\n\t\t{\n\n\t\t\t$this->redirect('./') ;\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "0818ce58f89d6dddec39a8481dee2d57", "score": "0.7307457", "text": "public function redirectToLogin() {\n\t\tif (Auth::guest()) {\n\t\t\treturn Redirect::guest('login');\n\t\t} \n\t\telse {\n\t\t\treturn Redirect::to('housing/post') -> with(array('alert' => 'You are successfully logged in.', 'alert-class' => 'alert-success'));\n\t\t}\n\t}", "title": "" }, { "docid": "8b7ba3585056befabb36beff18734a31", "score": "0.7293961", "text": "public static function checkAuth(): void\n {\n if (!self::isloggedIn()) {\n Router::redirect(\"/inloggen?referrer={$_SERVER['REQUEST_URI']}\");\n }\n }", "title": "" }, { "docid": "5c97d227019b24918c995beec12707ad", "score": "0.72882134", "text": "public function post_login()\n\t{\n\t\t// check login here\n\t\tredirect('home');\n\t}", "title": "" }, { "docid": "60442c9382155f5da36470c1bf323de4", "score": "0.72627884", "text": "private function _checkAuth() {\n // check login or not\n if (!$this->getUser()->isAuthenticated()) {\n $this->redirect('login');\n }\n }", "title": "" }, { "docid": "7c51cae1131f361b080a9033603c32c7", "score": "0.7257879", "text": "protected function _loginPostRedirect()\n {\n $session = $this->_getSession();\n\n if (!$session->getBeforeAuthUrl() || $session->getBeforeAuthUrl() == Mage::getBaseUrl()) {\n\n // Set default URL to redirect customer to\n $session->setBeforeAuthUrl(Mage::helper('customer')->getAccountUrl());\n // Redirect customer to the last page visited after logging in\n if ($session->isLoggedIn()) {\n if (!Mage::getStoreConfigFlag('customer/startup/redirect_dashboard')) {\n $referer = $this->getRequest()->getParam(Mage_Customer_Helper_Data::REFERER_QUERY_PARAM_NAME);\n if ($referer) {\n $referer = Mage::helper('core')->urlDecode($referer);\n if ($this->_isUrlInternal($referer)) {\n $session->setBeforeAuthUrl($referer);\n }\n }\n } else if ($session->getAfterAuthUrl()) {\n $session->setBeforeAuthUrl($session->getAfterAuthUrl(true));\n }\n } else {\n $session->setBeforeAuthUrl(Mage::helper('customer')->getLoginUrl());\n }\n } else if ($session->getBeforeAuthUrl() == Mage::helper('customer')->getLogoutUrl()) {\n $session->setBeforeAuthUrl(Mage::helper('customer')->getDashboardUrl());\n } else {\n if (!$session->getAfterAuthUrl()) {\n $session->setAfterAuthUrl($session->getBeforeAuthUrl());\n }\n if ($session->isLoggedIn()) {\n $session->setBeforeAuthUrl($session->getAfterAuthUrl(true));\n }\n }\n $this->_redirectUrl($session->getBeforeAuthUrl(true));\n }", "title": "" }, { "docid": "ed656b5fa049234ed0bfdbab9e6e4a3f", "score": "0.7255711", "text": "public function redirectToLoginPage()\n {\n wp_logout(); // logout current user\n wp_redirect(wp_login_url());\n exit;\n }", "title": "" }, { "docid": "30867a6e3c5642893b93c0cc3fa7069d", "score": "0.7241694", "text": "function loginRedirect() {\n\t\tif ($this->Auth->user('disabled') == 1) {\n\t\t\t$this->Auth->logout();\n\t\t\t$this->Session->setFlash(__('User disabled', true));\n\t\t\t$this->redirect('/');\n\t\t}\n\t\n if($this->Auth->user('group_id') == 3)\n $this->redirect(\"/dealers\");\n else\n $this->redirect(\"/madico\");\n }", "title": "" }, { "docid": "811f0476315024755a18b15ff5052f85", "score": "0.7236851", "text": "protected function _loginPostRedirect()\r\n {\r\n $session = $this->_getSession();\r\n\r\n if (!$session->getBeforeAuthUrl() || $session->getBeforeAuthUrl() == Mage::getBaseUrl()) {\r\n\r\n // Set default URL to redirect customer to\r\n $session->setBeforeAuthUrl(Mage::helper('customer')->getAccountUrl());\r\n // Redirect customer to the last page visited after logging in\r\n if ($session->isLoggedIn()) {\r\n if (!Mage::getStoreConfigFlag('customer/startup/redirect_dashboard')) {\r\n $referer = $this->getRequest()->getParam(Mage_Customer_Helper_Data::REFERER_QUERY_PARAM_NAME);\r\n if ($referer) {\r\n $referer = Mage::helper('core')->urlDecode($referer);\r\n if ($this->_isUrlInternal($referer)) {\r\n $session->setBeforeAuthUrl($referer);\r\n }\r\n }\r\n } else if ($session->getAfterAuthUrl()) {\r\n $session->setBeforeAuthUrl($session->getAfterAuthUrl(true));\r\n }\r\n } else {\r\n $session->setBeforeAuthUrl(Mage::helper('customer')->getLoginUrl());\r\n }\r\n } else if ($session->getBeforeAuthUrl() == Mage::helper('customer')->getLogoutUrl()) {\r\n $session->setBeforeAuthUrl(Mage::helper('customer')->getDashboardUrl());\r\n } else {\r\n if (!$session->getAfterAuthUrl()) {\r\n $session->setAfterAuthUrl($session->getBeforeAuthUrl());\r\n }\r\n if ($session->isLoggedIn()) {\r\n $session->setBeforeAuthUrl($session->getAfterAuthUrl(true));\r\n }\r\n }\r\n $this->_redirectUrl($session->getBeforeAuthUrl(true));\r\n }", "title": "" }, { "docid": "ec71d647495bd92f311b1326aaad7e9c", "score": "0.72009796", "text": "protected function postLoginRedirect() {\n\t\t$oSession = $this->getSession();\n\t\t// Do we have a return Url ?\n\t\tif( ($returnUrl = $oSession->get('PPI_Login::returnUrl')) !== null) {\n\t\t\t// Remove return url from session\n\t\t\t$oSession->remove('PPI_Login::returnUrl');\n\t\t\t$this->redirect($returnUrl, false);\n\t\t}\n\t\t$this->redirect('');\n\t}", "title": "" }, { "docid": "2eb7f5957ed91b7fb0afb68345c9a1df", "score": "0.7186012", "text": "public function redirectOnFail()\r\n {\r\n return Redirect::to('login');\r\n }", "title": "" }, { "docid": "2ea9afb35f2ad32e95536e6c2245e50f", "score": "0.71417546", "text": "public function redirectUser() : RedirectResponse {\n $noRedirectRoles = [\n 'administrator',\n 'client_admin'\n ];\n\n \\Drupal::service('page_cache_kill_switch')->trigger();\n\n if ($this->currentUser()->isAnonymous()) {\n if ($this->moduleHandler()->moduleExists('simplesamlphp_auth')) {\n return $this->redirect('simplesamlphp_auth.saml_login')->send();\n } else {\n return $this->redirect('user.login')->send();\n }\n\n } else if ($this->currentUser()->isAuthenticated() && !array_intersect($noRedirectRoles, $this->currentUser()->getRoles())) {\n return $this->redirect('profile.user_page.single', ['profile_type' => self::PROFILE_TYPE, 'user' => $this->currentUser()->id()])->send();\n }\n\n return $this->redirect('user.login')->send();\n }", "title": "" }, { "docid": "e11c5e592daba1ca9c78c2a6b41558f5", "score": "0.7128858", "text": "protected function _loginPostRedirect()\n {\n $session = $this->_getSession();\n\n if (!$session->getBeforeAuthUrl() || $session->getBeforeAuthUrl() == Mage::getBaseUrl() ) {\n\n // Set default URL to redirect customer to\n $session->setBeforeAuthUrl(Mage::helper('customer')->getAccountUrl());\n\n // Redirect customer to the last page visited after logging in\n if ($session->isLoggedIn())\n {\n if (!Mage::getStoreConfigFlag('customer/startup/redirect_dashboard')) {\n if ($referer = $this->getRequest()->getParam(Mage_Customer_Helper_Data::REFERER_QUERY_PARAM_NAME)) {\n $referer = Mage::helper('core')->urlDecode($referer);\n if ($this->_isUrlInternal($referer)) {\n $session->setBeforeAuthUrl($referer);\n }\n }\n }\n else if ($session->getAfterAuthUrl()) {\n $session->setBeforeAuthUrl($session->getAfterAuthUrl(true));\n }\n } else {\n $session->setBeforeAuthUrl(Mage::helper('customer')->getLoginUrl());\n }\n } else if ($session->getBeforeAuthUrl() == Mage::helper('customer')->getLogoutUrl()) {\n $session->setBeforeAuthUrl(Mage::helper('customer')->getDashboardUrl());\n }\n else {\n if (!$session->getAfterAuthUrl()) {\n $session->setAfterAuthUrl($session->getBeforeAuthUrl());\n }\n if ($session->isLoggedIn()) {\n $session->setBeforeAuthUrl($session->getAfterAuthUrl(true));\n }\n }\n $_myGroupId = Mage::getSingleton('customer/session')->getCustomerGroupId();\n if($_myGroupId == 2){\n $this->_redirectUrl($session->getBeforeAuthUrl(true).'?___store=wholesaledefault');\n }\n else\n {$this->_redirectUrl($session->getBeforeAuthUrl(true));}\n }", "title": "" }, { "docid": "4489d75f46b301dd4731521579348b0a", "score": "0.712065", "text": "public function index() {\n if ($this->getSession()) redirect('/');\n // Otherwise shows the login form\n else view('auth.login');\n }", "title": "" }, { "docid": "f6d774e17bede797fd776733c614fd2b", "score": "0.7107464", "text": "function loggedInRedirect() {\n\t\tif ( isLoggedIn() ) { // user is logged in\n\t\t\t// send them to the home page\n\t\t\theader( 'location: index.php' );\n\t\t\t//header( 'location: http://localhost/login-fb/auth-signin.php' );\n\t\t}\n\t}", "title": "" }, { "docid": "db31fff7120fc1dc121b735d99b7d5e7", "score": "0.70944804", "text": "protected function _redirectToLogin() {\n $this->_storeTargetUrl();\n\n $auth = Garp_Auth::getInstance();\n $authVars = $auth->getConfigValues();\n\n $flashMessenger = Zend_Controller_Action_HelperBroker::getStaticHelper('FlashMessenger');\n $flashMessenger->addMessage(!$auth->isLoggedIn()\n ? __($authVars['notLoggedInMsg'])\n : __($authVars['noPermissionMsg'])\n );\n\n // Make sure the redirect is not cached\n Zend_Controller_Action_HelperBroker::getStaticHelper('cache')->setNoCacheHeaders(\n $this->getResponse()\n );\n\n $redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');\n $redirectMethod = 'gotoUrlAndExit';\n $redirectParams = array('/g/auth/login');\n\n if (!empty($authVars['login']['route'])) {\n $redirectMethod = 'gotoRoute';\n $redirectParams = array(array(), $authVars['login']['route']);\n }\n call_user_func_array(array($redirector, $redirectMethod), $redirectParams);\n }", "title": "" }, { "docid": "d9b2c6158bb61503dbc433ff832d20fb", "score": "0.70441014", "text": "protected function _loginPostRedirect()\n {\n $session = $this->_getSession();\n\n if (!$session->getBeforeAuthUrl() || $session->getBeforeAuthUrl() == Mage::getBaseUrl()) {\n // Set default URL to redirect customer to\n $session->setBeforeAuthUrl($this->_getHelper('customer')->getAccountUrl());\n // Redirect customer to the last page visited after logging in\n if ($session->isLoggedIn()) {\n if (!Mage::getStoreConfigFlag(\n Mage_Customer_Helper_Data::XML_PATH_CUSTOMER_STARTUP_REDIRECT_TO_DASHBOARD\n )) {\n $referer = $this->getRequest()->getParam(Mage_Customer_Helper_Data::REFERER_QUERY_PARAM_NAME);\n if ($referer) {\n // Rebuild referer URL to handle the case when SID was changed\n $referer = $this->_getModel('core/url')\n ->getRebuiltUrl( $this->_getHelper('core')->urlDecodeAndEscape($referer));\n if ($this->_isUrlInternal($referer)) {\n $session->setBeforeAuthUrl($referer);\n }\n }\n } else if ($session->getAfterAuthUrl()) {\n $session->setBeforeAuthUrl($session->getAfterAuthUrl(true));\n }\n } else {\n $session->setBeforeAuthUrl( $this->_getHelper('customer')->getLoginUrl());\n }\n } else if ($session->getBeforeAuthUrl() == $this->_getHelper('customer')->getLogoutUrl()) {\n $session->setBeforeAuthUrl( $this->_getHelper('customer')->getDashboardUrl());\n } else {\n if (!$session->getAfterAuthUrl()) {\n $session->setAfterAuthUrl($session->getBeforeAuthUrl());\n }\n if ($session->isLoggedIn()) {\n $session->setBeforeAuthUrl($session->getAfterAuthUrl(true));\n }\n }\n if($session->isLoggedIn() && $_POST['refererUrl'] != NULL)\n {\n $refererUrl=$_POST['refererUrl'];\n $this->_redirectUrl($refererUrl);\n }\n else{\n $this->_redirectUrl($session->getBeforeAuthUrl(true));\n }\n }", "title": "" }, { "docid": "2c65da5256c134adcceb63a443ea449c", "score": "0.7007604", "text": "public function loginOrRegister()\n {\n $this->destroySessionIfIsExpired();\n\n //Check if the user is already logged in, if yes then redirect him to welcome page\n if(isset($_SESSION[\"loggedin\"]) && $_SESSION[\"loggedin\"] === true){\n header(\"location: ../../index.php\");\n exit;\n }\n }", "title": "" }, { "docid": "b6661604314c74337b61c42fdc693236", "score": "0.69879305", "text": "function logged_in_redirect() {\n\tif (logged_in() === true) {\n\t\theader('Location: home.php');\n\t\texit();\n\t}\n}", "title": "" }, { "docid": "5675a3b4ac9083e34b3e03d787be7cd0", "score": "0.697214", "text": "private function _mustLoginValidation(){\n ($this->session->userdata('isLogin') == 1) ?\n\t\t\t: (redirect(base_url(), 'refresh'));\n\t}", "title": "" }, { "docid": "d8d7d3d0a1adae0127708f61f30e2681", "score": "0.69698375", "text": "public static function requiresAuth() {\r\n if(!self::isAuth()) {\r\n header('Location: login.php');\r\n }\r\n }", "title": "" }, { "docid": "0b60a52d3e44bf4ab16273550718403b", "score": "0.69697237", "text": "public function login()\n {\n \n if ($this->isPostRequest())\n {\n \n $validator = $this -> getLoginValidator();\n\n if ($validator->passes()) \n {\n $credentials = $this->getLoginCredentials();\n\n if (Auth::attempt($credentials))\n {\n return Redirect::route(\"user.home\");\n }\n\n return Redirect::back()->withErrors([\n \"password\" => [\"Credentials invalid.\"]]);\n }\n else \n {\n echo \"Go back\";\n return Redirect::back()\n ->withInput()\n ->withErrors($validator);\n }\n }\n\n return View::make(\"user.login\");\n }", "title": "" }, { "docid": "7f7181a50f9232f3c210f09e101e9279", "score": "0.69678956", "text": "public function loginAction()\n {\n $securityContext = $this->container->get('security.authorization_checker');\n if ($securityContext->isGranted('IS_AUTHENTICATED_REMEMBERED')) {\n return new RedirectResponse($this->container->get('router')->generate('homepage'));\n }\n\n return parent::loginAction();\n }", "title": "" }, { "docid": "822db93c23435d07928f7f7d0a86f985", "score": "0.69551015", "text": "function Redirect() {\n\tif ( isset( $_SESSION[ 'role' ] ) ) {\n\t\tif ( $_SESSION[ 'role' ] == 2 || $_SESSION[ 'role' ] == 1 ) {\n\t\t\t$_SESSION[ 'error' ] = \"You cannot view that page.\";\n\t\t\theader( \"location: viewbooks.php\" );\n\t\t}\n\t} else {\n\t\t$_SESSION[ 'error' ] = \"Please log in.\";\n\t\theader( \"location: login.php\" );\n\t}\n}", "title": "" }, { "docid": "bc675d8d6bc921c0fccecbc08301529f", "score": "0.6945329", "text": "public function restrict()\n\t{\n\t if ( ! $this->is_logged_in() == TRUE)\n {\n redirect('login');\n }\n\t}", "title": "" }, { "docid": "4938b754c85dffd7d50cbc8dec262014", "score": "0.6931011", "text": "function verifyLoggedIn()\n {\n if (!Session::isLoggedIn()) {\n $this->redirect('/Account/Login' . '?returnUrl=' . $_SERVER['REQUEST_URI']);\n //Exit the script (the whole request, sending the redirect header only)\n exit();\n }\n }", "title": "" }, { "docid": "ec3cf7e55ab607dc13222fe671d41fd0", "score": "0.6914786", "text": "function authenticationFailed() {\r\n\t\t\t$this->forward( 'login' );\r\n\t\t\treturn;\r\n\t\t}", "title": "" }, { "docid": "6032ccc2fda9c1e3765c947b63759f6e", "score": "0.6901971", "text": "public function login() {\n if ($this->request->is('post')) {\n $user = $this->Auth->identify();\n if ($user) {\n $this->Flash->usersuccess(__('We Will come back to you soon'));\n $this->Auth->setUser($user);\n return $this->redirect($this->Auth->redirectUrl());\n }\n $this->Flash->usererror(__('Invalid username or password'));\n return $this->redirect(['controller' => 'Homes', 'action' => 'index']);\n }\n }", "title": "" }, { "docid": "49758d2b4e14079fbd87bf89fb48e376", "score": "0.69017136", "text": "public function redirectLogin()\n {\n $this->setFlag('', 'no-dispatch', true);\n $this->getResponse()->setRedirect(\n Mage::helper('core/url')->addRequestParam(\n Mage::helper('customer')->getLoginUrl(),\n array('context' => 'checkout')\n )\n );\n }", "title": "" }, { "docid": "8dc4cef3d49b85ac4a52c3a9c6e5e819", "score": "0.689114", "text": "function authRedirect($curLocation){\n\t\tif(isset($_SESSION['admin'])){\n\t\t\tif($curLocation != \"admin\"){\n\t\t\t\t// if user is authed, put them in the panel\n\t\t\t\theader(\"Location: admin.php\");\n\t\t\t}\n\t\t}else{\n\t\t\tif($curLocation != \"login\"){\n\t\t\t\t// If user is not authed, force to login screen\n\t\t\t\theader(\"Location: index.php?login=failed\");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "55ad40e44e9ae35e4a12b830be3c09fa", "score": "0.6889426", "text": "public function index()\n\t{\n\t\tredirect('admin/login/signin/');\n\t}", "title": "" }, { "docid": "f3322b3e543339f954faa8f07c2cc4b1", "score": "0.68816894", "text": "protected function checkLogin()\n {\n if (!$this->LoginData) {\n $this->session->set_userdata('solr.callback',current_url());\n redirect('auth');\n }\n }", "title": "" }, { "docid": "f6ed44bf28c920780a7ee21767a6b0f2", "score": "0.6860337", "text": "public function requireAuth()\n {\n if (! $this->isAuthenticated()) {\n $this->renderLoginForm();\n exit();\n }\n }", "title": "" }, { "docid": "8a7a0bea6ed99531c40b7ea39fca7ee0", "score": "0.6859594", "text": "public static function page_protected() {\n\t\t\tif(!isset($_SESSION['auth']['token'])) {\n\t\t\t\theader(\"Location: home\");\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c2be257bc4535aabc4d8d5ca5971cc0e", "score": "0.6855623", "text": "public function checkLogin()\n\t\t{\n\t\t\tif(!isset($_SESSION[\"Login_user\"]) || empty($_SESSION[\"Login_user\"]))\n\t\t\t{\n\t\t\t\theader('Location:login.php');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b1a2ae67c9fc9fb5117569640b99009f", "score": "0.68537396", "text": "public function index() {\n\t\tredirect('auth/login','refresh');\n\t}", "title": "" }, { "docid": "39be54e99cbf3d9e0483f8b0d05d1336", "score": "0.68467057", "text": "public function requireLogin()\n { \n if (!$this->_sessObj->getUserID()) {\n if (!empty($_SERVER['HTTP_REFERER'])) \n $this->_sessObj->setVar('loginMsg', 'Please login to continue!');\n \n HTTP::redirect(ROOT_URL . '/login');\n }\n }", "title": "" }, { "docid": "6ebb6b04b6644b86f9de2a09ffe8c8d9", "score": "0.6838068", "text": "public function index() {\n\n Router::redirect('/users/login');\n }", "title": "" }, { "docid": "252292c0ffb4c84c734fa46a0273f537", "score": "0.68379855", "text": "public function postLogin() {\n\t\t$credentials = Input::only('email', 'password');\n\t\tif (Auth::attempt($credentials, $remember = true)) {\n\t\t\treturn Redirect::intended('/')->with('flash_message', 'Welcome Back!');\n\t\t}\n\t\telse {\n\t\t\treturn Redirect::to('/login')\n\t\t\t\t->with('flash_message', 'Log in failed; please try again.')\n\t\t\t\t->withInput();\n\t\t}\n\t\treturn Redirect::to('/');\n\t}", "title": "" }, { "docid": "3abf45ca8bbf003c61895cf2cdedfb6c", "score": "0.68252116", "text": "public function login_redirect() {\r\n\r\n\t\t// We only redirect right after plugin activation.\r\n\t\tif ( ( empty( $_GET['activate'] ) || 'true' != $_GET['activate'] ) || ! empty( $_GET['activate-multi'] ) ) {\r\n\t\t\t$redirect = false;\r\n\t\t} elseif ( WPMUDEV_Dashboard::$api->has_key() ) {\r\n\t\t\t$redirect = false;\r\n\t\t} else {\r\n\t\t\t$redirect = true; //this means we are on the right page and not logged in\r\n\t\t}\r\n\r\n\t\tif ( $redirect ) {\r\n\t\t\t// This is not a valid request.\r\n\t\t\tif ( defined( 'DOING_AJAX' ) ) {\r\n\t\t\t\t$redirect = false;\r\n\t\t\t} elseif ( ! current_user_can( 'install_plugins' ) ) {\r\n\t\t\t\t// User is not allowed to login to the dashboard.\r\n\t\t\t\t$redirect = false;\r\n\t\t\t} elseif ( WPMUDEV_Dashboard::$site->get_option( 'redirected_v4' ) ) {\r\n\t\t\t\t// We already redirected the user to login page before.\r\n\t\t\t\t$redirect = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* ----- Save the flag and redirect if needed ----- */\r\n\t\tif ( $redirect ) {\r\n\t\t\tWPMUDEV_Dashboard::$site->set_option( 'redirected_v4', 1 );\r\n\r\n\t\t\t// Force refresh of all data during first redirect.\r\n\t\t\tWPMUDEV_Dashboard::$site->set_option( 'refresh_remote_flag', 1 );\r\n\t\t\tWPMUDEV_Dashboard::$site->set_option( 'refresh_profile_flag', 1 );\r\n\r\n\t\t\theader( 'X-Redirect-From: UI first_redirect' );\r\n\t\t\twp_safe_redirect( $this->page_urls->dashboard_url );\r\n\t\t\texit;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "833590fd898346f24cdc1a874e96bbf5", "score": "0.68241096", "text": "public function securePage(){\n if (!$this->user->getRole()) {\n header(\"Location: /\");\n exit;\n }\n }", "title": "" }, { "docid": "5cc28f6aec1986bd96f5ce4f7b93bc70", "score": "0.6818827", "text": "function redirect_to_unauthorized() {\n redirect_and_exit('/unauthorized');\n}", "title": "" }, { "docid": "3e7f32ab00bc92aeab1d28b78b125b89", "score": "0.680876", "text": "public function redirectAction()\n {\n $registry = Zend_Registry::getInstance();\n \n $router = Zend_Controller_Front::getInstance()->getRouter();\n \n $config = $registry->get(\"config\");\n \n $request = $this->getRequest();\n \n $params = $request->getParams();\n \n if ($config['ssl']) {\n $loginFallback = \"https://\" . $config['webhostssl'];// no place for $config['webroot'] here\n } else {\n $loginFallback = \"http://\" . $config['webhost'];\n }\n \n $loginFallback .=\n $router->assemble(array(), \"login\") . \"?redirect_after_login=\" .\n $router->assemble($params, $router->getCurrentRouteName());\n \n $this->_redirect($loginFallback, array(\"exit\"));\n }", "title": "" }, { "docid": "7e004589b988f6e39e83343c826bc012", "score": "0.6803747", "text": "public function checkUserLogin() {\n\t\tSession::start();\n\t\tif (Session::get('userID') === false) {\n\t\t\theader(\"Location: \" . BASEURL . \"?c=login&continue=\" . urlencode($_SERVER['QUERY_STRING']));\n\t\t}\n\t}", "title": "" }, { "docid": "4eb061ea7d0c7fb234b9df8ac840f58a", "score": "0.678855", "text": "public function index()\n {\n redirect('login');\n }", "title": "" }, { "docid": "f85f6b6fe116ab07a4278d3903fea357", "score": "0.6777858", "text": "function redirectLogin() {\n\t$username = $_SESSION['username'];\n\tif (!empty($username)) {\n\t\theader(\"Location: index.php\");\n\t}\n}", "title": "" }, { "docid": "ce42666dfd61d2f593ed443192360138", "score": "0.67767406", "text": "private function _redirectLoggedInUser() {\n if ($this->Session->check('User')) {\n $userLoginData = $this->Session->read('User');\n // we check here if client of that user is blocked or not\n switch ($userLoginData['User']['user_type_id']) {\n case Configure::read('UserType.superadmin'):\n $this->redirect(array('controller' => 'users', 'action' => 'dashboard', 'superadmin' => true));\n break;\n case Configure::read('UserType.branchadmin') :\n $this->redirect(array('controller' => 'users', 'action' => 'dashboard'));\n break;\n case Configure::read('UserType.admin') :\n $this->redirect(array('controller' => 'admins', 'action' => 'dashboard', 'admin' => true));\n break;\n }\n }\n }", "title": "" }, { "docid": "9a01a516fa6e426a88e12cbc8c597d92", "score": "0.67760336", "text": "function login()\n {\n if(!empty($_SERVER['HTTP_REFERER']) && strstr($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST']) && !strstr(strtolower($_SERVER['HTTP_REFERER']), 'users/login')) {\n $this->Session->write('User.lastPage', $_SERVER['HTTP_REFERER']);\n } else {\n $this->Session->write('User.lastPage', $this->Auth->loginRedirect);\n }\n\n $url = Configure::read('Rails.loginURL');\n $url .= \"?redirect_club_id=\".Configure::read('Club.id');\n if ($this->Session->check('Message.auth')) {\n // NOTE: Only the first flash message will be passed through to Rails.\n // CakePHP support for multiple flash messages was added after this\n // was implemented.\n $flash = $this->Session->read('Message.auth')[0];\n $url .= '&flash_message='.urlencode($flash['message']);\n $this->Session->delete('Message.auth');\n }\n $this->redirect($url);\n }", "title": "" }, { "docid": "10d093f8315e952af18b9e8588c2ba12", "score": "0.67670333", "text": "private function _mustLoginValidation(){\n\t\t// harus login\n\t\t// kalau belum redirect ke home\n\t\tif ( $this->session->userdata('isLogin') == 0 ) {\n\t\t\tredirect(base_url(), 'refresh');\n\t\t}\n\t}", "title": "" }, { "docid": "d09b28877e4816249cf62d434327ec3e", "score": "0.6764882", "text": "public function redirect()\n\t{\n\t\t$email = $this->session->userdata('email_id');\n\t\tif($email =='')\n\t\t{\n\t\t\tredirect('admin/index');\n\t\t}\n\t}", "title": "" }, { "docid": "ae50853d66c7c4731d268d17ff130943", "score": "0.6764633", "text": "public function auth()\n {\n if (isset($_SESSION['userIsAdmin']) && $_SESSION['userIsAdmin'] && !empty($_SESSION['userId'])) {\n $this->go('admin', 'dashboard');\n } else if (isset($_SESSION['userId']) && !empty($_SESSION['userId'])){\n $this->go('user', 'profile');\n } else {\n $this->setView('auth');\n $this->view->pageTitle = SITENAME . \" - Authenticate\";\n $this->view->render();\n }\n }", "title": "" }, { "docid": "a0d81a8fc33bc54af17c7892263a8d97", "score": "0.6756441", "text": "public function postLogin(){\n\t\ttry{\n\t\t\t$user = User::where('username', '=', Input::get('username'))->orWhere('email', '=', Input::get('username'))->firstOrFail();\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\treturn Redirect::to('/login')->withInput()->with('flash_message', 'Invalid username or e-mail. Please try again.');\n\t\t}\n\t\tif(Hash::check(Input::get('password'), $user->password)){\n\t\t\tAuth::login($user, Input::get('remember'));\n\t\t\treturn Redirect::intended('/user/'.$user->username)->with('flash_message', 'Login successful. Welcome back, '.$user->first_name);\n\t\t}\n\t\telse{\n\t\t\treturn Redirect::to('/login')->withInput()->with('flash_message', 'Invalid password');\n\t\t}\n\t}", "title": "" }, { "docid": "57aa0f8e4661d6a0df78ba8d12b01a8b", "score": "0.67499304", "text": "private function _redirectAfterLogin(){\n $user = $this->Auth->user();\n $autoLogin = true;\n if(empty($user['timezone_offset'])){\n if (isset($_COOKIE[\"timezoneOffset\"])){\n $user['timezone_offset'] = intval($_COOKIE['timezoneOffset']);\n unset($_COOKIE['timezoneOffset']); \n $this->Auth->login($user);\n }\n }\n //pr($this->Auth->user());die;\n \n if (!empty($user) && $autoLogin) {\n\t\t\t$this->AutoLogin->write($user, $this->request->header('User-Agent'));\n } else if (!$autoLogin) {\n\t\t\t$this->AutoLogin->delete();\n\t\t}\n \n if($this->Auth->user('language')){\n $this->Auth->loginRedirect['lang'] = $this->L10n->map($this->Auth->user('language'));\n }\n return $this->redirect($this->Auth->loginRedirect);\n }", "title": "" }, { "docid": "6a9f0c1cda7c9cda1e2f6d7f77d3e729", "score": "0.67486155", "text": "function verifyNotLoggedIn()\n {\n if (Session::isLoggedIn()) {\n $this->redirect('/');\n //Exit the script (the whole request, sending the redirect header only)\n exit();\n }\n }", "title": "" }, { "docid": "b634c36a4118e598eb624fb3ddc3ae19", "score": "0.6744953", "text": "public function postLogin() \n\t\t{\n\t\t\t$validator = Validator::make(Input::all(),\n\t\t\t\tUser::loginValidator()\n\t\t\t);\n\n\t\t\tif($validator->fails()) \n\t\t\t{\n\t\t\t\treturn Redirect::back()\n\t\t\t\t\t->withErrors($validator)\n\t\t\t\t\t->withInput(); \n\t\t\t\t\t // redirect with inputs and error\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\t// record\t\n\t\t\t\t$dataAttempt = array(\n\t \t'username' => Input::get('username'),\n\t \t'password' => Input::get('password')\n\t \t);\t\t\n\n\t\t\t\t//attempt Login\n\t\t\t\t$auth = Auth::attempt($dataAttempt,true);\n\t\t\t\t\n\t\t\t\tif($auth) \n\t\t\t\t{\n\t\t\t\t// Redirect to the intented page\n\t\t\t\t// For example, a user will be redirected to '/\n\t\t\t\t// when the user tried to change password without login'\n\t\t\t\t\treturn Redirect::intended('/');\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\treturn Redirect::back()\n\t\t\t\t\t\t->with('global', 'Tên đăng nhập hoặc mật khẩu không đúng.');\n\t\t\t\t}\n\n\t\t\t\treturn Redirect::back()\n\t\t\t\t\t->with('global', 'There is a problem.');\n\n\t\t\t}\n\t}", "title": "" }, { "docid": "12dd5942fe3c5b479468840782abd000", "score": "0.67430794", "text": "public function login()\n {\n $auth = new Authentication();\n //check is authenticated\n if (!$auth->isAuthenticated())\n $this->view('Authentication/login');\n else\n {\n $local = PATH . \"/Home/index\";\n header(\"location: $local\");\n exit();\n }\n }", "title": "" }, { "docid": "7a98d61f983e7b826156b898144d33af", "score": "0.6721595", "text": "public function redirect_login_page() {\n\t\t\t\n\t\t\t$login_page = apply_filters( 'ipress_login_page', '' );\n\t\t\tif ( empty( $login_page ) ) { return; }\n\n\t\t\t$login_url = home_url( '/' . $login_page . '/' );\n\t\t\t$page_viewed = basename($_SERVER['REQUEST_URI']);\n\n\t\t\tif ( $page_viewed == \"wp-login.php\" && $_SERVER['REQUEST_METHOD'] == 'GET' ) {\n\t\t\t\twp_redirect( $login_url );\n\t\t\t\texit;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a576cfcb20496f6c4d665267dcdc61ad", "score": "0.67196727", "text": "function redirectBack($notAllowed = true)\n\t{\n\t\tif ($notAllowed && JFactory::getUser()->id == 0)\n\t\t{\n\t\t\tJRequest::setVar('option','com_users');\n\t\t\tJRequest::setVar('view','login');\n\t\t\tJRequest::setVar('layout','');\n\n\t\t\t$url = self::urlRequest();\t\t\t\t\t//Login page\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// TODO : Not finished : only redirect to Root\n\t\t\tJFactory::getApplication()->redirect(JURI::base(true));\n\t\t\treturn;\n\n\t\t\t$current = JURI::current();\n\n\t\t\t//Get the previous page : TODO : finish this\n\t\t\t$url = (isset($_SERVER['HTTP_REFERER'])?$_SERVER['HTTP_REFERER']:null);\n\n\t\t\tif (!$url || ($url == $current))\n\t\t\t{\n\t\t\t\tJRequest::setVar('view','');\n\t\t\t\tJRequest::setVar('layout','');\n\n\t\t\t\t$url = self::urlRequest();\t\t\t\t//Component Root\n\t\t\t}\n\t\t\tif ($url == $current)\n\t\t\t{\n\t\t\t\t$url = JURI::base(true);\t\t\t\t// Site Root\n\t\t\t}\n\t\t}\n\n\n\t\tJFactory::getApplication()->redirect($url);\n\n\t}", "title": "" }, { "docid": "18c5896dbcb06b6f9d4a5d6302784d03", "score": "0.6718485", "text": "public function index()\n\t{\n\t\tif (!$this->session->userdata('logged_in') == true)\n\t\t\tredirect('login');\t\n\t}", "title": "" }, { "docid": "b9982cef25ad7800e85ef27bf80a71c6", "score": "0.6715438", "text": "public function login()\n\t{\n $formData = Input::only('email', 'password');\n\n $this->signInForm->validate($formData);\n\n if( ! Auth::attempt($formData))\n {\n Flash::message('We were unable to sign you in. Please check your credentials.');\n\n return Redirect::back()->withInput();\n }\n\n return Redirect::intended('/statuses');\n\t}", "title": "" }, { "docid": "b4c7039280a0b5e77ee7b845ba74794b", "score": "0.6708108", "text": "public function login()\n {\n if ( Auth::isLoggedIn() ) {\n header('Location: ' . ($_SESSION['backRef'] ?? ROOT_PREFIX));\n }\n\n if ( !Auth::isValidInput() ) {\n\n return $this->twig->render('login.html.twig', [\n 'username' => $_POST['username'],\n 'formAction' => $_SERVER['REQUEST_URI'],\n 'backRef' => $_SESSION['backRef'] ?? ROOT_PREFIX,\n 'errors' => true,\n ]);\n }\n\n if ( !$this->authInstance->loginUser() ) {\n return $this->index();\n }\n\n header('Location: ' . ($_SESSION['backRef'] ?? ROOT_PREFIX));\n }", "title": "" }, { "docid": "ac78f16faa419a456e59a37fb64eedf8", "score": "0.66971934", "text": "public function loginContiune()\n {\n $role = $this->session->role;\n \n if($role == 1)\n {\n redirect('manager');\n }\n else if ($role == 2) {\n redirect('supervisor');\n }\n else if ($role == 3)\n {\n redirect('sales');\n }\n else if ($role == 4)\n {\n redirect('designer');\n }\n }", "title": "" }, { "docid": "d344d1ba34010d81a21f1ccd8916bedc", "score": "0.6694169", "text": "function logged_in_redirect(){\r\n\tif(logged_in() === true){\r\n\t\theader('Location: index.php'); //we can redirect to a generic error page\r\n\t\texit();\r\n\t}\r\n}", "title": "" }, { "docid": "de4226b8c2d77ec702a89e344d7de231", "score": "0.6689333", "text": "public function redirect()\n {\n return redirect($this->getAuthUrl());\n }", "title": "" }, { "docid": "72e9066f0e7b20ef835ea808e422ea48", "score": "0.6676863", "text": "public function loginAction()\n\t{\n\t\t$this->_helper->viewRenderer->setNoRender();\n\t\t\n\t\t$request = $this->getRequest();\n\t\t\n\t\t$this->db = Zend_Registry::get('db');\n\t\t\n\t\t$bootOut = \"location:http://www.humanities.manchester.ac.uk/tandl/elearning/exemplars/\";\n\t\t\n\t\t//is $_SERVER['HTTP_CAS_USER'] set? No? Error page!\n\t\tif(!isset($_SERVER['REMOTE_USER']))\n\t\t{\n\t\t header($bootOut);\n\t\t exit;\n\t\t}\n\t\t\n\t\t//check CAS id against local users table\n\t\t$userOb = new User();\n\t\t$userRow = $userOb->fetchRow($userOb->select()->where('username = ?', $_SERVER['REMOTE_USER']));\n\t\t\n\t\t$auth = Zend_Auth::getInstance();\n\t\t\n\t\tif(!$userRow)\n\t\t{\n\t\t\t//invalid user\n\t\t\t$auth->clearIdentity();\n\t\t\theader($bootOut);\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//valid user\n\t\t\t$auth->getStorage()->write($userRow);\n\t\t\t$this->user = $auth->getStorage()->read();\n\t\t\t\n\t\t\t//$authSession = new Zend_Session_Namespace('Zend_Auth');\n\t\t}\n\t\t\n\t\t$this->_redirect('/');\n\t\t\n\t}", "title": "" }, { "docid": "2372416296757a0267cce57c5b0325d7", "score": "0.6672677", "text": "public function login() {\n if ($this->getSession()) redirect('/');\n // Getting via post method the needed variables\n $mail = filter_input(INPUT_POST, 'identifier', FILTER_VALIDATE_EMAIL);\n $psw = md5(filter_input(INPUT_POST, 'password', FILTER_DEFAULT));\n // Authenticating and redirecting to the home route\n if ($mail && $psw && $user = $this->auth($mail, $psw)) {\n $this->setAuthCookies($user->email, $user->password, $user->id);\n redirect('/');\n }\n // In error case, it will go back with the error message\n redirect('login', ['login' => 'Usuário ou senha incorretos']);\n }", "title": "" }, { "docid": "3c392fb41519b0b14a228ad9fa911cdc", "score": "0.66686356", "text": "function redireccionarLoginFallido() {\n header('Location:../frontweb/login/index.php?msg=errorLogin');\n}", "title": "" }, { "docid": "77d65127a9c3317637b4a74eae1d9a62", "score": "0.6659543", "text": "public function goToLogin(){\n exit('<script>location.href = \\'/index/login\\'</script>');\n }", "title": "" }, { "docid": "f2d4021b955b56dd79ac907a70a01d77", "score": "0.6635757", "text": "public function index() {\n\n if ($this->session->userdata('admin_login') == 1)\n redirect(site_url('admin/dashboard'), 'refresh');\n\n if ($this->session->userdata('teacher_login') == 1)\n redirect(site_url('teacher/dashboard'), 'refresh');\n\n // if ($this->session->userdata('student_login') == 1)\n // redirect(site_url('student/dashboard'), 'refresh');\n\n // if ($this->session->userdata('parent_login') == 1)\n // redirect(site_url('parents/dashboard'), 'refresh');\n\n // if ($this->session->userdata('librarian_login') == 1)\n // redirect(site_url('librarian/dashboard'), 'refresh');\n\n // if ($this->session->userdata('accountant_login') == 1)\n // redirect(site_url('accountant/dashboard'), 'refresh');\n\n $this->load->view('backend/login');\n }", "title": "" }, { "docid": "11ee3170f0d94b4cdf9f4146fb6c1e00", "score": "0.6620299", "text": "public function needToLogin(){\n if(!$this->user){\n $this->goToLogin();\n }\n }", "title": "" }, { "docid": "8995bcc4ac3ac491202042bf7ed0f93d", "score": "0.6613705", "text": "public function index() {\n \tif(is_login()){\n \t\tredirect( base_url().'user/dashboard', 'refresh');\n \t} \n }", "title": "" }, { "docid": "f9204d178d6899264cbd973bbcf827a9", "score": "0.6613478", "text": "function login($arguments) {\n $ack = loadModel(\"personalize\", \"login\", $arguments);\n if ($ack == false) {\n echo('Please enter valid credentials');\n echo(\"<br/>Redirecting in 5 seconds....\");\n header(\"Refresh:5; url=\".generate_url('personalize', 'login_form'));\n exit();\n }\n redirect(\"store\", \"home\");\n }", "title": "" }, { "docid": "9c7886fabf4dbee4e404b610cd54e22a", "score": "0.6611996", "text": "public function redirectTo()\n {\n //get authenticated user object\n $user = Auth::user();\n\n //if user has Admin role then redirect to admin panel otherwise redirect to profile page\n if($user->hasRole('Admin'))\n {\n return '/admin';\n }\n else\n {\n return '/profile';\n }\n\n }", "title": "" }, { "docid": "4fb146bb1cb0f530d252997e65aaeda7", "score": "0.66040206", "text": "public function loginRedirect()\n {\n return Auth::user()->isModerator() ? route('admin.dashboard') : route('test.profile');\n\n }", "title": "" }, { "docid": "b047ecfd3d82215a3b4d8632ab56e310", "score": "0.65953374", "text": "private function accessRedirect() {\n\t\t\theader(\"Location: $this->url\");\n\t\t\texit();\n\t\t}", "title": "" }, { "docid": "6d9439c79a4fdf0cf4af9185fc0e776d", "score": "0.659454", "text": "function confirm_logged_in() {\n\t\tif (!logged_in()) {\n\t\t\tredirectTo(\"/../presentation/home.php\");\n\t\t}\n\t}", "title": "" }, { "docid": "f562f05c9f9164fa4688dae111004f25", "score": "0.65888125", "text": "static function ForceLogin() {\n\n\t\tif(isset($_SESSION['user_id'])) {\n\t\t\t// user is allowed here\n\t\t} else {\n\t\t\t// user is not logged in yet\n\t\t\theader(\"Location: /login.php\"); exit;\n\t\t}\n\t}", "title": "" }, { "docid": "4e4d742ff7eddef9d6150db99afdc6bc", "score": "0.65836203", "text": "function custom_login_redirect()\n{\n\twp_redirect(get_option(\"url_login_redirect\"));\n\t\n\texit();\n}", "title": "" }, { "docid": "6dd7bdb7c6e55002c73fa5125ca90226", "score": "0.65809816", "text": "protected function logined()\n \t\t{\n \t\t\t// kiem tra xem neu chua dang nhap thi dieu huong trang login form\n\t \t\t if (!isset($_SESSION['login']) ) {\n\t \t\t \t//thanh dieu huong\n\t\t\t header($this->redirectTologin);\n\t\t\t }\n \t\t}", "title": "" }, { "docid": "5e115bc321247848868f6ea53dbe3687", "score": "0.6578576", "text": "public function test_redirect_to_login_if_not_authenticated()\n {\n $this->visit('/accounts')\n ->see('Sign In');\n\n $this->visit('/accounts/create')\n ->see('Sign In');\n }", "title": "" }, { "docid": "49b194934196e1cdb8fc6cb3b0ef9fc0", "score": "0.6573899", "text": "protected function chkLoginAndRedirect()\n\n\t{\n\n\t\tif( isset($_SESSION['username']) )\n\n\t\t{\n\n\t\t\treturn true ;\n\n\t\t}\n\n\t\telse\n\n\t\t{\n\n\t\t\treturn false ;\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "03d2a4aa2b06fe08a8858221ed041deb", "score": "0.65697247", "text": "public function login()\n\t{\n\t\tif($this->Auth->user('id')){\n\t\t\treturn $this->redirect(['controller' => 'dashboard', 'action' => 'index']);\n\t\t}\n\n\t\tif($this->request->is('post')){\n\t\t\t$user=$this->Auth->identify();\n\t\t\tif($user){\n\t\t\t\t$this->Auth->setUser($user);\n\t\t\t\treturn $this->redirect(['controller' => 'dashboard', 'action' => 'index']);\n\t\t\t}\n\t\t\t$this->Flash->error('Your username or password is incorrect.');\n\t\t}\n\t}", "title": "" }, { "docid": "8e7a5dd8cac8c983b995481b7705b402", "score": "0.6569716", "text": "function bsign_signin_redirect() {\n\t\tinclude( trailingslashit( BSIGN_DIR ) . 'includes/login-functions.php' );\n\t\tinclude( trailingslashit( BSIGN_DIR ) . 'templates/signin.php' );\n\t\texit;\n\t}", "title": "" }, { "docid": "b73ca9247f852a97541246e54bc441d0", "score": "0.65635407", "text": "private function login()\n {\n if (isset($this->_name)) {\n $this->auth->activate($this->_name);\n $this->auth->login();\n }\n\n $this->validate();\n\n if ($this->session->return) {\n $this->redirect($this->session->return);\n $this->session->return = false;\n } elseif ($this->config->auth['start']) {\n $this->redirect($this->config->auth['start']);\n }\n }", "title": "" }, { "docid": "043c6c5d0645ed7b06145ac6f1633392", "score": "0.65572196", "text": "public function check_login(){\n if(!$this->session->userdata('logged_in')){\n redirect('users/login');\n }\n }", "title": "" }, { "docid": "7853bef103a4acbe70d6211116d98450", "score": "0.6549454", "text": "function login_redirect( $redirect_to, $request, $user ) {\n \tif ( isset( $user->roles ) && is_array( $user->roles ) ) {\n \t\t//check for admins\n \t\tif ( in_array( 'administrator', $user->roles ) ) {\n \t\t\t// redirect them to the default place\n \t\t\treturn $redirect_to;\n \t\t} else {\n\n \t\t\tif(!empty($this->options['private_url'])) return $this->options['private_url'];\n \t\t\telse return home_url();\n \t\t\t\n \t\t}\n \t} else {\n \t\treturn $redirect_to;\n \t}\n }", "title": "" }, { "docid": "0a87dfa8524109040894286c62a840a2", "score": "0.6541967", "text": "public function index()\n {\n if($this->checkSession())\n {\n return redirect()->route('home');\n }\n else\n {\n return redirect()->route('loginform');\n }\n }", "title": "" }, { "docid": "250f94bc8dc1e3048fe25819b902d924", "score": "0.6531595", "text": "public function admin_login() \n\t{\n\t\tredirect('login/login_admin');\n\t}", "title": "" }, { "docid": "5de58f875c22139d8c2725d1cfb7bf16", "score": "0.65300816", "text": "function elbp_protect_page($redirect = '') {\n\tglobal $wp;\n\t$current_url = home_url(add_query_arg(array(),$wp->request));\n\tif($redirect != '') $current_url = $redirect;\n\tif( !is_user_logged_in() ) {\n\t\telbp_set_session_message('You need to be a registered user and logged in to view that page.', 'info');\n\t\twp_redirect(add_query_arg('redirect_to', $current_url, get_home_url()));\n\t\texit;\n\t}\n}", "title": "" }, { "docid": "a3b9f8bb27c70c1de36fb4e8fdf65b03", "score": "0.6528014", "text": "function mjh_login_redirect( $redirect_to, $request, $user ) {\n\t//is there a user to check?\n\tif (isset($user->roles) && is_array($user->roles)) {\n\t\t//check for subscribers\n\t\tif (in_array('subscriber', $user->roles)) {\n\t\t\t// redirect them to another URL, in this case, the homepage\n\t\t\t$redirect_to = home_url().'/my-account';\n\t\t}\n\t}\n\n\treturn $redirect_to;\n}", "title": "" }, { "docid": "e9e50f198431dff0f606c331d1331e93", "score": "0.65265596", "text": "function checkLogin(){\n\t\tif (isset($_SESSION['email'])) {\n\t\t\theader('Location: dashboard.php'); // Redirect To Dashboard Page\n\t\t\texit();\n\t }\n\t}", "title": "" }, { "docid": "d40b6c0be056e3b65614e344e0dea022", "score": "0.6525705", "text": "function redirect_login_page() {\n\t$login_page = home_url( '/login/' );\n\t$page_viewed = basename($_SERVER['REQUEST_URI']);\n\n\tif( $page_viewed == \"wp-login.php\" && $_SERVER['REQUEST_METHOD'] == 'GET') {\n\t\twp_redirect($login_page);\n\t\texit;\n\t}\n}", "title": "" }, { "docid": "893323ecd7852bc5e45623bbc256eb7d", "score": "0.65246874", "text": "public function logout_redirect() {\n\n\t\t\t$login_page = apply_filters( 'ipress_login_page', '' );\n\t\t\tif ( empty( $login_page ) ) { return; }\n\n\t\t\t$login_url = home_url( '/' . $login_page . '/' );\n\t\t\twp_redirect( $login_url . \"?login=false\");\n\t\t\texit;\n\t\t}", "title": "" } ]
06c97451328f444e263cfb311ac0b85f
/////////////////////// remove_cookie obviously removes the cookie. To remove a cookie, ALL parameters must be the same as when the cookie was set. Since this cookie is set with a name, value, time, and path, all must be present to remove it. ///////////////////////
[ { "docid": "2ed3076deca7b2b85aa7f957906ba01e", "score": "0.7716615", "text": "function remove_cookie() {\n setcookie(\"kc_user\", \"\", time() - 3600, \"/\");\n}", "title": "" } ]
[ { "docid": "f234606daf46b36e04e3fe8a6ccdfa7a", "score": "0.8001763", "text": "function removeCookie($name);", "title": "" }, { "docid": "4e693121098e11a6f6799ae88fce4898", "score": "0.7832412", "text": "function removeCookies();", "title": "" }, { "docid": "fee18095a71bd9ce786f060c41110f45", "score": "0.75169677", "text": "public static function RemoveCookies() {\n self::__dbg('Remove cookies');\n\n $CookieInfo = session_get_cookie_params();\n\n if (empty($CookieInfo['domain']) AND empty($CookieInfo['secure'])) {\n setCookie(session_name(), session_id(), 1, $CookieInfo['path']);\n } elseif (empty($CookieInfo['secure'])) {\n setCookie(session_name(), session_id(), 1, $CookieInfo['path'], $CookieInfo['domain']);\n } else {\n setCookie(session_name(), session_id(), 1, $CookieInfo['path'], $CookieInfo['domain'], $CookieInfo['secure']);\n }\n }", "title": "" }, { "docid": "6936600f7fe9148c74b8cc4ec4e14609", "score": "0.7296065", "text": "public function deleteCookie() {\n\t\t// set the rememberme-cookie to ten years ago (3600sec * 365 days * 10).\n\t\t// that's obviously the best practice to kill a cookie via php\n\t\t// @see http://stackoverflow.com/a/686166/1114320\n\t\tsetcookie ( 'rememberme', false, time () - (3600 * 3650) ); // , '/', COOKIE_DOMAIN\n\t}", "title": "" }, { "docid": "c8c17958dc26d49b15192a977c86d2bc", "score": "0.7291718", "text": "public function delete_cookie(){\n\t// Delete cookie contents\n $cookie = '';\n unset($_COOKIE[$this->options('cookie_name')]);\n \n // If any output has been sent, setcookie() will fail.\n // If we're not in debug mode, we'll fail silently.\n if (headers_sent() AND ! $this->options('debug'))\n return FALSE;\n \n // Setting a cookie with a value of FALSE will try to delete it\n return setcookie($this->options('cookie_name'), FALSE, time() - 86400, $this->options('cookie_path'), $this->options('cookie_domain'));\n }", "title": "" }, { "docid": "08d453a7dc0b0962cef54b6ac4d499e0", "score": "0.72657436", "text": "public static function deleteCookie()\n {\n \tsetcookie('remember_me', false, time() - (3600 * 24 * 3650), Config::get('COOKIE_PATH'));\n }", "title": "" }, { "docid": "1eaae8ee0e814fc7c69f82827d24d082", "score": "0.72550625", "text": "public function unset_cookie()\n\t{\n\t\t$cookie_path = $this->config->app_relative_web_path == \"\" ? \"/\" : $this->config->app_relative_web_path;\n\t\treturn setcookie('RPCAUTH', '', time() - 86400, $cookie_path, $_SERVER['SERVER_NAME']);\n\t}", "title": "" }, { "docid": "6569160f07b799e8891968e3f153ffc9", "score": "0.7253088", "text": "public function unsetCookie()\n {\n setcookie(self::$cookie,\"\", time() - 360000);\n }", "title": "" }, { "docid": "a7758ba39bd97f77460b9e37aa3fb2e9", "score": "0.72259706", "text": "public function delete() {\n\n\t\t$session = $this->_dependencyContainer->get('session');\n\t\t$session->remove('_PHCOOKIE_' . $this->_name);\n\n\t\t$this->_value = '';\n\n\t\tsetcookie($this->_name, null);\n\t\tunset($_COOKIE[$this->_name]);\n\t}", "title": "" }, { "docid": "84f07100b520651fa9813deca51aa160", "score": "0.71895134", "text": "public function delete_cookie($cookie)\n\t{\n\t\t$this->EE->input->delete_cookie($cookie);\n\t}", "title": "" }, { "docid": "5c904680ab1685580f7cdf3526e2bbcf", "score": "0.7153166", "text": "private function unsetCookie() {\n\t\tsetcookie(self::$cookieName, \"\", time() - (2*60*60));\n\t\tsetcookie(self::$cookiePassword, \"\", time() - (2*60*60));\n\t}", "title": "" }, { "docid": "a535ac6d045b4bbb5f9effbfb1b32a13", "score": "0.7080027", "text": "function cookie_destroy()\n{\n\tforeach($_COOKIE as $param)\n\t{\n\t\tsetcookie($param, '', -1000);\n\t\tunset($_COOKIE[$param]);\n\t}\n}", "title": "" }, { "docid": "3397b58108413f80c0db1f3610917d1b", "score": "0.70559496", "text": "public function clearCookies();", "title": "" }, { "docid": "6cf83a63afecc5c6ec8a70328f1b78ac", "score": "0.70539004", "text": "public function delete_cookie($name){\t\t \n\t\t$this->Cookie->delete($name); \n\n\t}", "title": "" }, { "docid": "823be49d5f46abc63ab2c1b32a8a59a7", "score": "0.70369625", "text": "function remove_cookies()\n\t{\n\t\tsetcookie (\"_bkdlog_\", \"\", 1);\n\t\tsetcookie (\"_bkdlog_\", false);\n\t\tunset($_COOKIE[\"_bkdlog_\"]);\n\t\tunset($_SESSION[\"_bkdlog_\"]);\n\n\t\tsetcookie (\"_bkdmail_\", \"\", 1);\n\t\tsetcookie (\"_bkdmail_\", false);\n\t\tunset($_COOKIE[\"_bkdmail_\"]);\n\t\tunset($_SESSION[\"_bkdmail_\"]);\n\n\t\tsetcookie (\"_bkduser_\", \"\", 1);\n\t\tsetcookie (\"_bkduser_\", false);\n\t\tunset($_COOKIE[\"_bkduser_\"]);\n\t\tunset($_SESSION[\"_bkduser_\"]);\n\n\t\tsetcookie (\"_bkdname_\", \"\", 1);\n\t\tsetcookie (\"_bkdname_\", false);\n\t\tunset($_COOKIE[\"_bkdname_\"]);\n\t\tunset($_SESSION[\"_bkdname_\"]);\n\n\t\tsetcookie (\"_bkdtype_\", \"\", 1);\n\t\tsetcookie (\"_bkdtype_\", false);\n\t\tunset($_COOKIE[\"_bkdtype_\"]);\n\t\tunset($_SESSION[\"_bkdtype_\"]);\n\t}", "title": "" }, { "docid": "edb94ced70a3b752269390ace3d570d0", "score": "0.70012563", "text": "public function deleteCookieByName(string $name);", "title": "" }, { "docid": "65e7eb1724e408080437d2eded11d2fa", "score": "0.6999394", "text": "function deleteTokenCookie() {\n\n unset($_COOKIE[\"token\"]);\n setcookie(\"token\", \"\", time()-3600);\n}", "title": "" }, { "docid": "9666d404ff335d4411736ce982b5002c", "score": "0.69979006", "text": "function removeCookie($fname,$lname,$email){\n $cookie_value = $fname+$lname;\n $cookie_name = 'STEAD';\n setcookie($cookie_name, $cookie_value, time() - (86400 * 31), \"/\"); // 86400 = 1 day\n\n if(($_COOKIE[$cookie_name])) {\n // echo \"Failed to set cookies... make sure cookies is enabled and try signing in again\";\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "dcdc90b75827d1e59ed11f0379620fae", "score": "0.69850475", "text": "function sessionCookieDelete()\n {\n setcookie('user', '', time() - 60000, '/');\n unset($_COOKIE);\n }", "title": "" }, { "docid": "5c373b232b316ffc210a2ce093a3caa5", "score": "0.6933333", "text": "public function deleteCookie()\n {\n if ($this->useCookie) {\n getCookie()->delete($this->cookieUserKey);\n getCookie()->delete($this->cookieTokenKey);\n }\n }", "title": "" }, { "docid": "62a09ad2e226129ee84baef19e47687c", "score": "0.69290197", "text": "public static function rm($cName, $path){ setcookie($cName,\"\",0,$path); }", "title": "" }, { "docid": "ea702cd462ac7355578e10249c444a29", "score": "0.6926225", "text": "public function remove_cookie($name)\n {\n $this->assert_types(array('string' => array($name)));\n\n unset($this->cookies[$name]);\n\n $this->removed_cookies[strtolower($name)] = true;\n }", "title": "" }, { "docid": "53a2d5635ec3cc2b6122c93bc7e7f412", "score": "0.6908532", "text": "public static function unset_cookie() {\n if(!empty($_COOKIE['sess_login'])) {\n setcookie(\"sess_login\", $_SESSION['sess_login'], time() - 1000);\n unset($_COOKIE['sess_login']);\n }\n if(!empty($_SESSION['sess_password'])) {\n setcookie(\"sess_password\", $_SESSION['sess_password'], time() - 1000);\n unset($_COOKIE['sess_password']);\n }\n \n \n\n }", "title": "" }, { "docid": "985c3b3fea2b279e7f567cb40e7da8b8", "score": "0.68908966", "text": "public function delete_cookie($cookie_name)\n {\n setcookie($cookie_name, \"\", 1, $this->cookie_directory);\n }", "title": "" }, { "docid": "9a88a3fa511cb237caf506bf5a5386db", "score": "0.6887065", "text": "public function delete($cookiePath = NULL) {\n if ($this->isSet())\n setcookie($this->name, \"\", time() - 3600, $cookiePath ?? self::$defaultPath);\n }", "title": "" }, { "docid": "729ed5c4e3db8067db2609e675b60381", "score": "0.686541", "text": "private function discardCookie()\n {\n $rememberedIdentity = new Entity\\RememberedIdentity;\n $cookieMapper = $this->mapperFactory->createCookieMapper(Mapper\\Cookie::class);\n\n if ($cookieMapper->fetch($rememberedIdentity) !== false) {\n $cookieMapper->delete($rememberedIdentity);\n }\n }", "title": "" }, { "docid": "52f38a9ce5945a09a822a4f45cbb9f4f", "score": "0.68012434", "text": "public function delete(){\n // Delete cookie contents\n $cookie = '';\n unset($_COOKIE[$this->options('cookie_name')]);\n \n // If any output has been sent, setcookie() will fail.\n // If we're not in debug mode, we'll fail silently.\n if (headers_sent() AND ! $this->options('debug'))\n return FALSE;\n \n // Setting a cookie with a value of FALSE will try to delete it\n return setcookie($this->options('cookie_name'), FALSE, time() - 86400, $this->options('cookie_path'), $this->options('cookie_domain'));\n }", "title": "" }, { "docid": "3d0a3152246b89178549891c207208f6", "score": "0.6791594", "text": "public function delete()\n {\n $params = func_get_arg(0);\n if (!is_array($params)) {\n unset($_COOKIE[$params]);\n } else {\n foreach ($params as $key) {\n unset($_COOKIE[$key]);\n }\n }\n }", "title": "" }, { "docid": "a6a611cdb29eac25c6186db058618a1b", "score": "0.67652214", "text": "public function remove($key)\n {\n unset($_COOKIE[$key]);\n }", "title": "" }, { "docid": "0ecbd96b8c825d6d5ee8adfc8386ae8a", "score": "0.6751395", "text": "public function delete_cookie($name)\n\t{\n\t\t$data = array(\n\t\t\t'name' => $name,\n\t\t\t'value' => '',\n\t\t\t'expire' => ee()->localize->now - 86500,\n\t\t);\n\n\t\treturn $this->_set_cookie($data);\n\t}", "title": "" }, { "docid": "1d3be9b07f29f012e73637afe7ee1aac", "score": "0.6722265", "text": "public function cookie_destroy() {\n // outdate the cookie\n if( session_id() != \"\" || isset( $_COOKIE[session_name()] ) ) {\n setcookie( session_name(), '', 0 );\n }\n }", "title": "" }, { "docid": "e89145795ac3900ddaff4a4731b68467", "score": "0.663485", "text": "private function remove()\r\n {\r\n /*\r\n if ($this->cookies->has('RMU')) {\r\n $this->cookies->get('RMU')->delete();\r\n }\r\n if ($this->cookies->has('RMT')) {\r\n $this->cookies->get('RMT')->delete();\r\n }\r\n */\r\n\r\n $this->session->remove('auth-identity');\r\n }", "title": "" }, { "docid": "96c0670cdbc59823f32696310ff10c31", "score": "0.6620914", "text": "function remove($name, $subdomains=false){\n\t\t// Allow iframe cookies in IE\n\t\t\theader('P3P:CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"');\n\t\t// Set up domain\n\t\t\tif($subdomains) $domain = '.'.$this->zajlib->domain;\n\t\t\telse $domain = '';\n\t\t// Set and return \n\t\t\treturn setcookie($name, '', time()-24*60*60*365, '/', $domain);\n\t}", "title": "" }, { "docid": "460bd7850c767fc884d891ae2c96e3cc", "score": "0.66025436", "text": "static function delete($name)\n\t{\n\t\tunset(self::$vars[$name]);\n\t\treturn setcookie(self::$prefix.$name, null, -86400, self::$path, self::$domain, self::$secure, false);\n\t}", "title": "" }, { "docid": "3dcc9a349c521ca63563db344a584585", "score": "0.6590788", "text": "public function delete()\n {\n unset($_COOKIE[ $this->name ]);\n\n return setcookie($this->name, '', 1, $this->path,\n $this->domain, $this->secure, $this->httpOnly);\n }", "title": "" }, { "docid": "f7530b05987d6f75140b3f5a878096c1", "score": "0.65123445", "text": "public static function deleteCookie($user_name=null){\n\t\t// is $user_name was set, then clear remember_me token in database\n\t if($user_name){\n\t \t$user_name = Filter::html_entity_invert($user_name);\n\t\t \t$user = UserModel::getByUsername($user_name);\n\t\t \t$user->setRemembermetoken(NULL);\n\t\t \t$em = DbResource::getEntityManager();\n\t\t \t$em->persist($user);\n\t\t \t$em->flush();\n\t }\n\t \n // delete remember_me cookie in browser\n setcookie(self::COOKIE_REMEMBER_ME, false, time() - (3600 * 24 * 3650), self::config('auth.cookie.path'),\n self::config('auth.cookie.domain'), self::config('auth.cookie.secure'), self::config('auth.cookie.http'));\n }", "title": "" }, { "docid": "4302f3554ef7b7c0413d1364555aec07", "score": "0.65114003", "text": "public function deleteCookie(ContextInterface $ctx, DeleteCookieRequest $request): void;", "title": "" }, { "docid": "24a1a1dd3c53238eefcdd1c4a184ac8a", "score": "0.6492462", "text": "public function remove( $key ){\n\t\t\n\t\t// chek IF the cookie EXISTS\n\t\tif( $this->exists( $key ) ){\n\t\t\t\n\t\t\t// DELETE the COOKIE\n\t\t\t$this->set( $key );\n\t\t\t\n\t\t\t// Update the cookie's array\n\t\t\tunset( $_COOKIE[ $key ] );\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7695f34b4f4c2b2b737079171a3580ee", "score": "0.64682215", "text": "function disconnectUser() {\n\tunset($_COOKIE['id']);\n\tunset($_COOKIE['token']);\n\n\tsetcookie('id', null, -1, '/');\n\tsetcookie('token', null, -1, '/');\n}", "title": "" }, { "docid": "47623a5edb530a648ed4c073d28e2af4", "score": "0.6430423", "text": "function unsetCookie($cookieName, $cookieDomain = NULL)\n {\n\n //\tsetcookie($cookieName, '', 0, '/', $cookieDomain);\n setcookie($cookieName, '', 0, '/');\n }", "title": "" }, { "docid": "748fb45bb1819f82f0aa25df27859e7a", "score": "0.642074", "text": "function KillSessionCookie() {\n // Delete cookie by setting expiration time in the past with root path\n setcookie($this->sCookieName, '', time()-3600);\n }", "title": "" }, { "docid": "d6c7846bc9d91975ac31bc75023c3c4c", "score": "0.64192337", "text": "public function removeCookiesValues($cookieName) {\n if (!empty($cookieName)) {\n $cookies = Yii::$app->response->cookies;\n $cookies->remove($cookieName);\n unset($cookies[$cookieName]);\n }\n }", "title": "" }, { "docid": "cac8d9be8259d5fff5cfcb1c140a859b", "score": "0.6408441", "text": "public function unset() {\n if ($this->isSet())\n unset($_COOKIE[$this->name]);\n }", "title": "" }, { "docid": "9ca0bfc0cc3e38bb6596301e1cb214a9", "score": "0.6401126", "text": "public function logout()\n\t{\n\t\t//does the user have a cookie?\n\t\tif( !isset($_COOKIE['login']) )\n\t\t\treturn;\n\t\t\n\t\t//get the user's cookie\n\t\t$cookie = $_COOKIE['login'];\n\t\t\n\t\t//delete the cookie from the database table\n\t\t$stmt = $this->con->prepare(\"DELETE FROM Log_in_State WHERE cookie = ?\");\n\t\t$stmt->bind_param(\"s\", $cookie);\n\t\t$stmt->execute();\n\t\t\n\t\t//remove the cookie from the user's browser\n\t\t//this won't work unless this method is called in a controller's executeBefore()\n\t\tsetcookie(\"login\", \"\", time() - 1); //set the cookie's expiration date to a past time so that the cookie expires\n\t}", "title": "" }, { "docid": "27a6d6556b1ee63cc9dd410fa89e1b5d", "score": "0.6389129", "text": "private function clearRememberMeCookie() {}", "title": "" }, { "docid": "279fd0a9597147c3ff992fa5f0374dac", "score": "0.6352892", "text": "protected function _deleteCook() {\n\t\tsetcookie(MVR_COOKIE_NAME,0);\n\t}", "title": "" }, { "docid": "5fb741e5af9c76c77cee5d846c507f44", "score": "0.6352161", "text": "private function logout ()\n\t{\n\t\t$cookie_file = $this->cookie_file;\n\t\tunset($cookie_file);\n\t}", "title": "" }, { "docid": "26bb0c639d8e94fddc940e6ba677ce70", "score": "0.6348433", "text": "private\tfunction delCookie( $C ) {\r\n\t\t\t\t\r\n\t\t\t\t// check if key is present\r\n\t\t\t\tif ( !( isset( $C[ 'name' ] ) ) )\r\n\t\t\t\t\treturn false ;\r\n\t\t\t\t\r\n\t\t\t\t// expire cookie\r\n\t\t\t\tsetcookie( $C[ 'name' ] , \t// the name of the cookie\r\n\t\t\t\t\t\t null , \t\t\t// the token value\t\r\n\t\t\t\t\t\t time() - 1 , \t// the length of the cookie\r\n\t\t\t\t\t\t $this->path , \t// the server path of the cookie\r\n\t\t\t\t\t\t $this->domain , \t// the domain that the cookie is for\r\n\t\t\t\t\t\t $this->secure ) ;// true for https \r\n\t\t\t\t\r\n\t\t\t\t// check that cookie was expired\r\n\t\t\t\tif ( $this->getCookie( $C[ 'name' ] ) != null )\r\n\t\t\t\t\treturn false ;\r\n\t\t\t\t\r\n\t\t\t\t// return success\t\t\t\t\r\n\t\t\t\treturn true ;\r\n\t\t\t}", "title": "" }, { "docid": "d2b80cf0d9f44d3fb8b0ff9a27a8e19f", "score": "0.6334804", "text": "private function _clearCookies()\n {\n Cookie::make(md5($this->authCookieName), [\n 'name' => $this->authCookieName,\n 'path' => PLUGINS_COOKIE_PATH,\n 'domain' => COOKIE_DOMAIN,\n 'salt' => '',\n 'base64' => true\n ])->clear();\n\n Cookie::make(md5($this->authCookieName . 'admin'), [\n 'name' => $this->authCookieName,\n 'path' => ADMIN_COOKIE_PATH,\n 'domain' => COOKIE_DOMAIN,\n 'salt' => '',\n ])->clear();\n\n Cookie::make(md5($this->loggedInCookieName), [\n 'name' => $this->loggedInCookieName,\n 'path' => COOKIEPATH,\n 'domain' => COOKIE_DOMAIN,\n 'salt' => ''\n ])->clear();\n\n if (COOKIEPATH != SITECOOKIEPATH) {\n Cookie::make(md5($this->loggedInCookieName . 'site'), [\n 'name' => $this->loggedInCookieName,\n 'path' => SITECOOKIEPATH,\n 'domain' => COOKIE_DOMAIN,\n 'salt' => ''\n ])->clear();\n }\n }", "title": "" }, { "docid": "7ab142c921149b7fff0846daba92e778", "score": "0.6322914", "text": "public static function removeCookie(string $cookieName): void\n {\n setcookie($cookieName, '', time() - COOKIE_EXPIRE_VALUE);\n }", "title": "" }, { "docid": "5517e3f690c940bdcb6da0aba8c700f1", "score": "0.6307278", "text": "public function offsetUnset($key) {\n\t\tif(!$this->allowSetCookie($key)) return;\n\t\tparent::offsetUnset($key);\n\t\t$this->setCookie($key, null, array());\n\t\tunset($_COOKIE[$key]);\n\t}", "title": "" }, { "docid": "17b9b95354900e4989d8724cce7367ef", "score": "0.6292467", "text": "public static function deleteCookie($name, $domain = null, $path = null) {\n\t\tsetcookie($name, '', 1, $path, $domain);\n\t}", "title": "" }, { "docid": "65b9f04fae8b595a882696890d3740bf", "score": "0.62786496", "text": "function logout() {\n\t\tif(isset($_COOKIE['cookuname']) || isset($_COOKIE['cookpass'])){\n\t\t\tsetcookie(\"cookuname\", \"\", time()-60*60*24*101, \"/\");\n\t\t\tsetcookie(\"cookpass\", \"\", time()-60*60*24*101, \"/\");\n\t\t\tsetcookie(\"cookservice\", \"\", time()-60*60*24*101, \"/\");\n\t\t}\n\t\n\t\t/* Kill session variables */\t\n\t\tunset($_SESSION['loggedIn']);\n\t\tunset($_SESSION['username']);\n\t\tunset($_SESSION['userId']);\n\t\tunset($_SESSION['fb-user-id']);\n\t\tunset($_SESSION['login-service']);\n\t\t$_SESSION = array(); // reset session array\n\t\tsession_destroy(); // destroy session.\n\t\t\n\t}", "title": "" }, { "docid": "4fd6472df55ea37da08c61b226cfbbc5", "score": "0.6263783", "text": "function clear_rememberme_cookies()\n {\n setcookie('username', '', 0, '/');\n setcookie('password', '', 0, '/');\n }", "title": "" }, { "docid": "e14abcfba383fd7d0afd5442f62aeb68", "score": "0.6262307", "text": "public function removeDntCookie()\n {\n $this->hasPlaceDntCookie = false;\n $this->setTrackingOn();\n }", "title": "" }, { "docid": "4a02dc0808a1f2250da24c04a9a92b0d", "score": "0.6256815", "text": "function deleteCookie($email){\t\t\t\t\n\t\t$sql = \"UPDATE \" . USERS . \n\t\t\t\t\" SET \" . USER_COOKIE . \" = null \" .\n\t\t\t\t\" WHERE \" . USER_EMAIL . \" = ?\";\t\t\t\n\t\t\n\t\t$paramTypes = array('text');\t\t\n\t\t$params = array($email);\t\t\t\t\t\t\t\t\n\t\treturn $this->update($sql, $params, $paramTypes, \"9823934234\");\t\t\t\t\n\t}", "title": "" }, { "docid": "200b9f771ea4f9cd4f6dd660b11a5429", "score": "0.6246629", "text": "private function deleteRememberMeCookie(){\n // if database connection opened\n global $dbase;\n if($dbase){\n // Reset rememberme token\n //$sth = $dbase->query(\"UPDATE \".$this->tbl_name.\" SET \".$this->token.\" = 0 WHERE \".$this->uid.\" ='\".$_SESSION[$this->sessionkey]['user_id'].\"'\");\n }\n\n // set the rememberme-cookie to ten years ago (3600sec * 365 days * 10).\n // that's obivously the best practice to kill a cookie via php\n // @see http://stackoverflow.com/a/686166/1114320\n //setcookie('rememberme', false, time() - (3600 * 3650), '/');\n }", "title": "" }, { "docid": "6364b60b6540a1556bf6954224ae00b9", "score": "0.6242273", "text": "protected function unsetRememberMeCookies()\n {\n if (isset($_COOKIE['user_login'])) {\n setcookie('user_login', '', '-1', '/');\n }\n\n if (isset($_COOKIE['random_password'])) {\n setcookie('random_password', '', '-1', '/');\n }\n\n if (isset($_COOKIE['random_selector'])) {\n setcookie('random_selector', '', '-1', '/');\n }\n }", "title": "" }, { "docid": "71c7b63781617ea854c7d7105b806119", "score": "0.62404644", "text": "static public function destroy()\n {\n session_start();\n $_SESSION = array();\n $params = session_get_cookie_params();\n setcookie(session_name(), '', time() - 42000,\n $params[\"path\"], $params[\"domain\"],\n $params[\"secure\"], $params[\"httponly\"]\n );\n session_destroy();\n }", "title": "" }, { "docid": "77126b7703bbcb6c34e52c4b5b54af4e", "score": "0.62264854", "text": "public function delete($name)\n\t{\n\t\treturn setcookie($this->_prefix.$name, '', time() - 3600);\n\t}", "title": "" }, { "docid": "b2ff20f2cfe5b2e39fb043f115b9f634", "score": "0.6220453", "text": "function logout()\n{\n\tunset($_SESSION['user']);\n\t//destruir la session\n\tsession_destroy();\n\t//borrar la cookie de recordarme\n\tsetcookie('fs05_user', 0, time() * -1);\n}", "title": "" }, { "docid": "96a5510f3b24520e696d54fac2d9b6b6", "score": "0.618304", "text": "public static function userLogout() {\n\t\tsetcookie(self::$cookieName, \"\", time() - 3600, '/');\n\t}", "title": "" }, { "docid": "fef851ee8ca20b50e13ab1e903524480", "score": "0.6164943", "text": "function clear($name) {\n\t setcookie($name, '', time()-3600, '/');\t\t\n }", "title": "" }, { "docid": "a88cbe89d4a26ee7c93342e4ac215a9a", "score": "0.61581", "text": "function del_cookie($array)\r\n\t{\r\n\t\t$func_name = 'del_cookie';\r\n\r\n\t\t// sample cookie\r\n\t\t// NAME=VALUE; path=/; domain=.mydomain.com; expires=Wednesday, 31-Dec-2010 12:10:00 GMT; \r\n\r\n\t\t$cookies = array();\r\n\t\t$delete = array();\r\n\r\n\t\tif (!is_array($array)) {\r\n\t\t\tif ($this->debug) $this->_debug(\"$func_name: Argument not array\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// extract vars from array and prefix them \r\n\t\textract($array, EXTR_PREFIX_ALL, 'cookie');\r\n\r\n\t\tif (!isset($cookie_domain)) {\r\n\t\t\tif ($this->debug) $this->_debug(\"$func_name: Domain must be supplied\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// check domain for cookies\r\n\t\tif (is_array($this->cookie[$cookie_domain]) && count($this->cookie[$cookie_domain]) > 0) {\r\n\t\t\t$delete['domain'] = $cookie_domain;\r\n\t\t} else {\r\n\t\t\tif ($this->debug) $this->_debug(\"$func_name: No cookies set under this domain ($cookie_domain)\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// check domain and path for cookies\r\n\t\tif (isset($cookie_path)) {\r\n\t\t\tif (is_array($this->cookie[$cookie_domain][$cookie_path]) && count($this->cookie[$cookie_domain][$cookie_path]) > 0) {\r\n\t\t\t\t$delete['path'] = $cookie_path;\r\n\t\t\t} else {\r\n\t\t\t\tif ($this->debug) $this->_debug(\"$func_name: No cookies set under this domain ($cookie_domain) AND path ($cookie_path)\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// check name and delete\r\n\t\tif (isset($cookie_name)) {\r\n\t\t\tif (isset($cookie_path)) {\r\n\t\t\t\tif (isset($this->cookie[$cookie_domain][$cookie_path][$cookie_name]) &&\r\n\t\t\t\t\t\tis_array($this->cookie[$cookie_domain][$cookie_path][$cookie_name])) {\r\n\t\t\t\t\tif ($this->debug) $this->_debug(\"(-) Deleting cookie ($cookie_name)\");\r\n\t\t\t\t\tunset($this->cookie[$cookie_domain][$cookie_path][$cookie_name]);\r\n\t\t\t\t\t// delete path if no more entries\r\n\t\t\t\t\tif (count($this->cookie[$cookie_domain][$cookie_path]) == 0) {\r\n\t\t\t\t\t\tunset($this->cookie[$cookie_domain][$cookie_path]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// delete domain if no more entries\r\n\t\t\t\t\tif (count($this->cookie[$cookie_domain]) == 0) {\r\n\t\t\t\t\t\tunset($this->cookie[$cookie_domain]);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif ($this->debug) $this->_debug(\"$func_name: Cookie not found ($cookie_name)\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tforeach ($this->cookie[$cookie_domain] as $path => $path_val) {\r\n\t\t\t\t\tif (isset($this->cookie[$cookie_domain][$path][$cookie_name])) {\r\n\t\t\t\t\t\tif ($this->debug) $this->_debug(\"(-) Deleting cookie ($cookie_name)\");\r\n\t\t\t\t\t\tunset($this->cookie[$cookie_domain][$path][$cookie_name]);\r\n\t\t\t\t\t\t// delete path if no more entries\r\n\t\t\t\t\t\tif (count($this->cookie[$cookie_domain][$path]) == 0) {\r\n\t\t\t\t\t\t\tunset($this->cookie[$cookie_domain][$path]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// delete domain if no more entries\r\n\t\t\t\t\t\tif (count($this->cookie[$cookie_domain]) == 0) {\r\n\t\t\t\t\t\t\tunset($this->cookie[$cookie_domain]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// delete path\r\n\t\tif (isset($delete['path'])) {\r\n\t\t\tif ($this->debug) $this->_debug(\"(-) Deleting cookies in path ($cookie_path)\");\r\n\t\t\tunset($this->cookie[$delete['domain']][$delete['path']]);\r\n\t\t\t// delete domain if no more entries\r\n\t\t\tif (count($this->cookie[$delete['domain']]) == 0) {\r\n\t\t\t\tunset($this->cookie[$delete['domain']]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// delete domain\r\n\t\tif ($this->debug) $this->_debug(\"(-) Deleting cookies in domain ($cookie_domain)\");\r\n\t\tunset($this->cookie[$delete['domain']]);\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "e3f8aace2b3cf43853a111fe9c565e08", "score": "0.6155905", "text": "function logout_sesion()\n{\n $_SESSION = array();\n\n // get session parameters\n $params = session_get_cookie_params();\n\n // Delete the actual cookie.\n setcookie(session_name(), '', time() - 42000, $params[\"path\"], $params[\"domain\"], $params[\"secure\"], $params[\"httponly\"]);\n\n // Destroy session\n session_destroy();\n}", "title": "" }, { "docid": "795370847c9aacc9519ce4f12919e5ca", "score": "0.6151223", "text": "protected function deleteCookie($name)\n {\n // Remove the cookie.\n unset($_COOKIE[$name]);\n\n // Nullify the cookie and make it expire.\n return setcookie($name, null, -86400, $this->options['cookie_path'], $this->options['cookie_domain'], $this->options['cookie_secure'], $this->options['cookie_http_only']);\n }", "title": "" }, { "docid": "df54216d5d669e7164aaff04130288e8", "score": "0.61398953", "text": "function logout()\n {\n // unset any session variables\n $_SESSION = array();\n\n // expire cookie\n if (isset($_COOKIE[session_name()]))\n {\n if (preg_match(\"{^(/~[^/]+/pset7/)}\", $_SERVER[\"REQUEST_URI\"], $matches))\n setcookie(session_name(), \"\", time() - 42000, $matches[1]);\n else\n setcookie(session_name(), \"\", time() - 42000);\n }\n\n // destroy session\n session_destroy();\n }", "title": "" }, { "docid": "a7a99fbd563ad96c32aa9401095a5804", "score": "0.61375195", "text": "private function deleteRememberMeCookie()\n {\n // if database connection opened\n if ($this->databaseConnection()) {\n // Reset rememberme token\n $sth = $this->db_connection->prepare(\"UPDATE mitgliederExt SET user_rememberme_token = NULL WHERE user_id = :user_id\");\n $sth->execute(array(':user_id' => $_SESSION['user_id']));\n }\n\n // set the rememberme-cookie to ten years ago (3600sec * 365 days * 10).\n // that's obviously the best practice to kill a cookie via php\n // @see http://stackoverflow.com/a/686166/1114320\n\n #setcookie('rememberme', false, time() - (3600 * 3650), '/', COOKIE_DOMAIN);\n setcookie('rememberme', false, time() - (3600 * 3650), '/');\n }", "title": "" }, { "docid": "71eeb8486c1f990eb89f4ec4d7502bd5", "score": "0.61336386", "text": "public static function destruir() {\n\t\tif (ini_get(\"session.use_cookies\")) {\n\t\t\t$params = session_get_cookie_params();\n\t\t\t\\core\\HTTP_Respuesta::setcookie(session_name(), '', time() - 42000,\n\t\t\t\t$params[\"path\"], $params[\"domain\"],\n\t\t\t\t$params[\"secure\"], $params[\"httponly\"]\n\t\t\t);\n\t\t}\n\t\t\n\t\tsession_destroy();\n\t\t\n\t}", "title": "" }, { "docid": "cc87cd63f1dbe63d4e6fc9702ee1e910", "score": "0.6096989", "text": "public static function forgetMe()\n {\n self::setCookieLifetime(-1);\n }", "title": "" }, { "docid": "0aeb20615c2367b22a37bb9600edcd6b", "score": "0.6070904", "text": "public static function rmAll(){\n\t\tforeach($_COOKIE as $name){\n\t\t\tif(strpos($name,$this->cName) !== false){\n\t\t\t\t$_COOKIE[$name] = NULL;\n\t\t\t\t$this->rmCookie($name);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "cc6cedde71477688ee530c445576cb76", "score": "0.6066407", "text": "public static function ClearCookies()\n {\n self::$cookies = array();\n }", "title": "" }, { "docid": "e26612df1232a7ca129f341307f643bd", "score": "0.60505426", "text": "function delete_session(){\n\t\t\tunset($_SESSION['user_id'],$_SESSION['user_role'] ,$_SESSION['user_logged_in'],$_SESSION['userAgent'],$_SESSION['rmt_address']);\n // session_destroy();\n\t\t unset($_COOKIE['rememberme']);\n \t\t setcookie('rememberme', '', time() - 3600, '/');\n\n\t\t\t}", "title": "" }, { "docid": "3b4d031ad93ec39c9c6f3466a64cea13", "score": "0.60495174", "text": "function logout_user(){\n\tsec_session_start(); \n\t$_SESSION = array(); // Unset all session values\n\t$params = session_get_cookie_params(); // get session parameters \n\t// Delete the actual cookie.\n\tsetcookie(session_name(), '', time() - 42000, $params[\"path\"], $params[\"domain\"], $params[\"secure\"], $params[\"httponly\"]);\n\tsession_destroy();\n\techo \"user_logged_out\";\n\tdie();\n}", "title": "" }, { "docid": "f844592df150dfe6d5c2638ca3d30f87", "score": "0.6038247", "text": "public function onLogout()\n {\n \t$this->clearIdentity();\n \tsetcookie(self::COOKIE_NAME, null, null, '/');\n \tsetcookie(self::COOKIE_SIGN, null, null, '/');\n \t//@todo для чего эти куки?? в каком проекте?\n \t\tsetcookie('lingck', 1, time()+8600000000, '/');\n \t\tsetcookie(\"is18\", \"\", time() - 3600, '/');\n }", "title": "" }, { "docid": "d573fe6d0eda0f0d33988e31bc249193", "score": "0.60315055", "text": "function delete_GA_cookies() {\n\t$domain = 'nationalarchives.gov.uk';\n\t$cookie_list = ['_ga', '_gid', '_gat_UA-2827241-22', '_gat_UA-2827241-1'];\n \n\tif (isset($_SERVER['HTTP_COOKIE'])) {\n\t\t$cookies = explode(';', $_SERVER['HTTP_COOKIE']);\n\t\tforeach($cookies as $cookie) {\n\t\t\t$parts = explode('=', $cookie);\n\t\t\t$name = trim($parts[0]);\n\t\t\tforeach($cookie_list as $single_cookie) {\n\t\t\t\tif($name == $single_cookie) {\n clear_cookie($name, $domain);\n }\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "83fb4d1cf5241e86215c09ad771287a2", "score": "0.6016287", "text": "function clear_cookie_session() {\n\t\t// Clear cookies\n\t\tif (isset($_SERVER['HTTP_COOKIE'])) {\n\t\t\t$cookies = explode(';', $_SERVER['HTTP_COOKIE']);\n\t\t\tforeach($cookies as $cookie) {\n\t\t\t\t$parts = explode('=', $cookie);\n\t\t\t\t$name = trim($parts[0]);\n\t\t\t\tsetcookie($name, '', time()-1000);\n\t\t\t\tsetcookie($name, '', time()-1000, '/');\n\t\t\t}\n\t\t}\n\t\t\n\t\t//clear session from globals\n\t\t$_SESSION = array();\n\t\t//clear session from disk\n\t\tsession_destroy();\t\n\t\tsession_write_close();\n\t}", "title": "" }, { "docid": "37fcf0dd9b67db7d5534100f4f3c2aa3", "score": "0.6016064", "text": "public function httpClear($keyIdentifier) {\n unset($_COOKIE[$keyIdentifier]);\n setcookie($keyIdentifier, NULL, -1);\n }", "title": "" }, { "docid": "d11731624280a0c02fad9e92accaa073", "score": "0.601598", "text": "public function logout()\n\t{\n\t\tif($this->loggedIn)\n\t\t{\n\t\t\t// remove cookie\n\t\t\t$this->pun_setcookie($this->pun_user['id'], $this->pun_user['password'], time()-10);\n\t\t\t$this->loggedIn = false;\n\t\t\t$this->pun_user = null;\n\t\t}\n\t}", "title": "" }, { "docid": "0f125e8802496c22ffd8bfad352bf657", "score": "0.60096794", "text": "public function after_logouted()\n {\n \t//$_SESSION[C('SESSION_PREFIX') . 'nick'] = '';\n \tunset($_SESSION['qq'], $_SESSION['sina']);\n \tcookie('auth', null);\n \tcookie('avatar', null);\n }", "title": "" }, { "docid": "4410f430724f03a7732b7cbcd6280faf", "score": "0.5977458", "text": "static function logout()\n {\n session_start();\n session_unset();\n\n $expire_time = time() - 7000000;\n\n setcookie(session_name(), '', $expire_time);\n setcookie('user_id', '', $expire_time);\n setcookie('login_string', '', $expire_time);\n\n setcookie(session_name(), '', $expire_time, mySpires::$serverfolder);\n setcookie('user_id', '', $expire_time, mySpires::$serverfolder);\n setcookie('login_string', '', $expire_time, mySpires::$serverfolder);\n\n setcookie(session_name(), '', $expire_time, mySpires::$serverfolder, mySpires::$serverdomain);\n setcookie('user_id', '', $expire_time, mySpires::$serverfolder, mySpires::$serverdomain);\n setcookie('login_string', '', $expire_time, mySpires::$serverfolder, mySpires::$serverdomain);\n\n session_destroy();\n\n return true;\n }", "title": "" }, { "docid": "76c5f40139052a7aae4e04c64675a6e6", "score": "0.5965986", "text": "function remove_cookies_on_page_load() {\n\t$siteUrl = site_url();\n\t$global_cookie = 'cookies_policy';\n\t\n\tif (strpos($siteUrl, 'latin') !== false) { \n\t\tif(isset($_COOKIE[$global_cookie])) {\n\t\t\t$cookie = $_COOKIE[$global_cookie];\n\t\t\t$clean_cookie = preg_replace('/\\\\\\\\/', '', $cookie);\n\t\t\t$cookies_policy_to_obj = json_decode( $clean_cookie );\n\t\t\tif(property_exists($cookies_policy_to_obj, 'usage')) {\n\t\t\t\tif($cookies_policy_to_obj->usage === false) { \n\t\t\t\t\tadd_action( 'init', 'delete_GA_cookies' );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n}", "title": "" }, { "docid": "9702227f9230497391db1dbd9c006abd", "score": "0.59651184", "text": "public function destroy()\n {\n $_SESSION = [];\n \n if ($this->cookieJar) {\n $this->cookieJar->remove($this->name());\n } else {\n $params = session_get_cookie_params();\n setcookie($this->name(), '', time() - 42000,\n $params[\"path\"], $params[\"domain\"],\n $params[\"secure\"], $params[\"httponly\"]\n );\n }\n \n session_destroy();\n }", "title": "" }, { "docid": "2f445cf9c58396add09372cbd5e90893", "score": "0.59516776", "text": "public function clearCookie(string $name)\n {\n unset($_COOKIE[$name]);\n $this->setCookie($name, \"\", ['expiry' => time() - 3600]);\n }", "title": "" }, { "docid": "10e05db64657b177b99f2ef067f30c08", "score": "0.5947618", "text": "public function logout(){\r\n unlink($this->client->getCookieFileLocation());\r\n }", "title": "" }, { "docid": "a0e9b12b43a397af625196f12aa3e1f0", "score": "0.59168965", "text": "function logout(){\n //Cheks if post request contains logout set\n if($_SERVER['REQUEST_METHOD'] == \"POST\" and isset($_POST['logout'])){\n session_unset();\n session_destroy();\n $params = session_get_cookie_params();\n setcookie(session_name(), '', time() - 1, $params[\"path\"], $params[\"domain\"], $params[\"secure\"], $params[\"httponly\"]);\n redirect('home.php');\n die(0);\n } \n}", "title": "" }, { "docid": "0f774c53180dd41ba9945f6cc103da70", "score": "0.59035945", "text": "function logout() {\n\t$username = $_SESSION['user_name'];\n\t\n\tsetcookie(\"auth_key\", \"\", time() - 3600, \"/\", \"notes.thejungleblog.com\");\n\t//$auth_query = mysql_query(\"UPDATE users SET auth_key = 0 WHERE name = '\" . $username . \"'\");\n\t\n\t// If auth key is deleted from database proceed to unset all session variables\n\tif (true) {\n\t\tunset($_SESSION['user_id']);\n\t\t//unset($_SESSION['user_level']);\n\t\tunset($_SESSION['user_name']);\n\t\tunset($_SESSION['user_lastactive']);\n\t\tsession_unset();\n\t\tsession_destroy();\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "039a649800faef17dfa39759c2999fd9", "score": "0.5869196", "text": "public function clearCookies()\n {\n // of cookies. We lose reusable connection though.\n curl_close($this->curl);\n @unlink($this->cookieFile);\n $this->_curlInit();\n }", "title": "" }, { "docid": "4f3dc7fd44df33e1fe79b4a6b214cf5b", "score": "0.5868313", "text": "function doWholesalerLogout() {\n if (isset($_SESSION['sessUserInfo'])) {\n unset($_SESSION['sessUserInfo']);\n unset($_SESSION['MyCart']);\n setcookie(\"MyCart\", \"\", time() - 3600);\n }\n }", "title": "" }, { "docid": "8cb6f143e674f44d533fe2d29884723f", "score": "0.5859972", "text": "function mlogout()\n {\n // unset any session variables\n $_SESSION = array();\n\n // expire cookie\n if (!empty($_COOKIE[session_name()]))\n {\n setcookie(session_name(), \"\", time() - 42000);\n }\n\n // destroy session\n session_destroy();\n }", "title": "" }, { "docid": "151d54521afad90914ea2b35c79eb686", "score": "0.58589906", "text": "public function DeleteLoginSavedOnClient() {\n assert($this->IsLoginSavedOnClient());\n\n // Remove cookie, set expiration date to past.\n setcookie (self::$COOKIE_ID, \"\", time() - 3600);\n }", "title": "" }, { "docid": "1ae4571ca2a613c4f44e28572c7d1e23", "score": "0.5854134", "text": "public function deleteCookie($sLabel) {\n\t\t$sCookiePrefix = @ $this->core->config['COOKIE_PREFIX'] . '_';\n\t\t$sPath = '/';\n\t\t$sLabel = strtolower($sLabel);\n\t\tsetcookie ($sCookiePrefix . $sLabel, ' ', 0, $sPath);\n\t\tsetcookie ($sCookiePrefix . $sLabel, '', time() - 3600, $sPath);\n\t}", "title": "" }, { "docid": "a2779d58e4d82ed8e1d46938d1ee6357", "score": "0.58437943", "text": "public function logout() {\n\t\n\t\tif($this->cookies) {\n\t\t\tsetcookie('id', null, null, '/', null, null, true);\n\t\t\tsetcookie('password', null, null, '/', null, null, true);\n\t\t\n\t\t\tunset($_COOKIE['id']);\n\t\t\tunset($_COOKIE['password']);\t\n\t\t}\n\t\t\n\t\tif($this->sessions) {\n\t\t\tsession_unset();\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "646b7a674d1034e843c105a133286e54", "score": "0.5834909", "text": "public function logout() {\n\t\tunset($_SESSION['logged_in']);\n\t\tunset($_SESSION['login_time']);\n\t\t//unset($_SESSION[\"FinYearID\"]);\n\t\tunset($_SESSION['token'] );\n\t\tunset($_SESSION['username']);\n\t\tunset($_SESSION['userid']);\n\t\tsession_destroy();\n\t\tsetcookie('username', '', time() - 1*24*60*60);\n setcookie('password', '', time() - 1*24*60*60);\n\t\t\t}", "title": "" }, { "docid": "81d2878012ceb582fff2574da65afcb6", "score": "0.58323014", "text": "function cms_eatcookie($name)\n{\n $expire = time() - 100000; // Note the negative number must be greater than 13*60*60 to account for maximum timezone difference\n\n // Try and remove other potentials\n @setcookie($name, '', $expire, '', preg_replace('#^www\\.#', '', cms_srv('HTTP_HOST')));\n @setcookie($name, '', $expire, '/', preg_replace('#^www\\.#', '', cms_srv('HTTP_HOST')));\n @setcookie($name, '', $expire, '', 'www.' . preg_replace('#^www\\.#', '', cms_srv('HTTP_HOST')));\n @setcookie($name, '', $expire, '/', 'www.' . preg_replace('#^www\\.#', '', cms_srv('HTTP_HOST')));\n @setcookie($name, '', $expire, '', '');\n @setcookie($name, '', $expire, '/', '');\n\n // Delete standard potential\n return @setcookie($name, '', $expire, get_cookie_path(), get_cookie_domain());\n}", "title": "" }, { "docid": "741487e67005de988ecf36d6cd37e5e7", "score": "0.5823165", "text": "public function logout() {\n\t\t// set the remember-me-cookie to ten years ago (3600sec * 365 days * 10).\n\t\t// that's obviously the best practice to kill a cookie via php\n\t\t// @see http://stackoverflow.com/a/686166/1114320\n\t\tsetcookie ( 'rememberme', false, time () - (3600 * 3650) ); // , '/', COOKIE_DOMAIN\n\t\t \n\t\t// delete the session\n\t\tSession::destroy ();\n\t}", "title": "" }, { "docid": "12a7ce23e8aecb09b0c88962acd7b59d", "score": "0.5821349", "text": "public function onLogout()\n {\n $this->cookieManager()->delete();\n }", "title": "" }, { "docid": "47a6f47a9b899403496ad25e66821c34", "score": "0.5819533", "text": "function destroySession() {\n $_SESSION = array();\n\n// get session parameters\n $params = session_get_cookie_params();\n\n// Delete the actual cookie.\n setcookie(session_name(),\n '', time() - 42000,\n $params[\"path\"],\n $params[\"domain\"],\n $params[\"secure\"],\n $params[\"httponly\"]);\n\n// Destroy session\n session_destroy();\n}", "title": "" }, { "docid": "43954c8b13d569ff4944e66486f63f98", "score": "0.5818418", "text": "function logout()\n {\n // unset any session variables\n $_SESSION = [];\n\n // expire cookie\n if (!empty($_COOKIE[session_name()]))\n {\n setcookie(session_name(), \"\", time() - 42000);\n }\n\n // destroy session\n session_destroy();\n }", "title": "" }, { "docid": "43954c8b13d569ff4944e66486f63f98", "score": "0.5818418", "text": "function logout()\n {\n // unset any session variables\n $_SESSION = [];\n\n // expire cookie\n if (!empty($_COOKIE[session_name()]))\n {\n setcookie(session_name(), \"\", time() - 42000);\n }\n\n // destroy session\n session_destroy();\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "107a45a8fa7a9e32d6c9f4a3bcae2a55", "score": "0.0", "text": "public function edit($id)\n {\n\n $maincategory = main_category::where('id',$id)->first();\n // dd($maincategory);\n return view('admin/mainCategory/edit',compact('maincategory'));\n\n\n }", "title": "" } ]
[ { "docid": "63925fbab89765f6ec514208a03fc871", "score": "0.78354216", "text": "public function edit(Resource $resource)\n {\n return view('resource.edit', compact('resource'));\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3e4affd8df1c5ef8f2afe9c9c3221248", "score": "0.7487642", "text": "public function edit($id)\n {\n // show form to edit\n }", "title": "" }, { "docid": "e148f1d3d9a48b05d53bc0934e9c8555", "score": "0.74829096", "text": "public function edit(Request $request, $resource)\n {\n $this->authorize('update', $resource);\n\n $this->event('updating', $resource->load($this->with)); \n\n if($this instanceof Compact) {\n $this->editingResource = $resource;\n\n return $this->index($request, app(Builder::class));\n }\n\n return view($this->editView)\n ->withForm($this->form()->setModel($resource))\n ->withName($this->name())\n ->withTitle($this->title())\n ->withActions($this->getActions())\n ->withRouteParameters((array) $this->routeParameters('edit', $resource));\n }", "title": "" }, { "docid": "4de13c28a63d7306cf639907e8ef1d9c", "score": "0.7343273", "text": "public function edit($resource, $resourceId)\n {\n return view('microboard::resource.edit', compact('resource', 'resourceId'));\n }", "title": "" }, { "docid": "4020b0e5a357920b39cf24e715e8cab6", "score": "0.7274648", "text": "public function edit($id) {\n ${$this->resource} = $this->model->findOrFail($id);\n\n App::setLocale(Helpers::getLang());\n\n return view($this->view_path . '.edit', compact($this->resource));\n }", "title": "" }, { "docid": "0cd4d6ca6f0a2017970904abf26fd651", "score": "0.7259789", "text": "public function edit($id)\n {\n return view('resource::edit');\n }", "title": "" }, { "docid": "256cb5b6f36786b11ec44b4af931758b", "score": "0.72310144", "text": "public function edit(Resource $resource)\n {\n\t\t\t\t$Item = $resource; $Actions = Action::all()->toArray();\n\t\t\t\t$Item[\"actions\"] = array_keys(str_split(str_replace(\".\",\"\",$this->floattostr ( $Item->action ))),\"1\");\n return view(\"resource.create\",compact(\"Item\",\"Actions\"))->with([\"update\"=>true]);\n }", "title": "" }, { "docid": "65ada685cf8e833ca627450ccc9d2441", "score": "0.7191711", "text": "public function edit($id)\n {\n $resource = Resource::find($id);\n \n return view('resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "0cf290df710095ca7ea001893658b9e6", "score": "0.71411604", "text": "public function editAction()\n {\n $page = $this->_helper->db->findById();\n $form = $this->_getForm($page);\n $this->view->form = $form;\n $this->_processPageForm($page, $form, 'edit');\n }", "title": "" }, { "docid": "5aefc7fd6a02ad9693185ed9c8d5b8d2", "score": "0.7032755", "text": "public function editAction() \n {\n $id = $this->request->get('id');\n\n // load the recipe from the database\n $recipe = Recipe::findFirst($id);\n\n $this->view->recipe = $recipe;\n $this->view->submit = \"editSubmit\";\n $this->view->title = \"Edit a recipe\";\n $this->view->pick('admin/add');\n }", "title": "" }, { "docid": "9126d463642a49ad64ccc9d4ccaea048", "score": "0.7032053", "text": "public function edit($id)\n {\n // Get the resource\n $object = $this->api()->show($id);\n\n // Get the form options\n $options = method_exists($this, 'formOptions') ? $this->formOptions($object) : [$this->package => $object];\n\n // Render edit view\n return $this->content( 'edit', $options );\n }", "title": "" }, { "docid": "c7274abf6ae2de7d4553b1b4b51a2134", "score": "0.6967485", "text": "public function edit()\n {\n /** @var Request $request */\n $request = app(Request::class);\n $formbuilder = app(FormBuilder::class);\n $args = $request->route()->parameters();\n\n $referer = url()->previous();\n $route = Route::getCurrentRoute()->getName();\n $model = $this->getEditModel($request, $args);\n\n $form_data = $this->getEditFormData($model, $request, $args);\n $form_data = array_merge(['prev_url' => $referer], $form_data);\n\n $url = (empty($this->route_update)) ? route(str_replace('edit', 'update', $route), $args) : $this->route_update;\n\n $form = $formbuilder->create($this->form_class, [\n 'method' => 'PUT',\n 'url' => $url,\n 'data' => $form_data,\n 'model' => $model,\n ]);\n\n $breadcrumb = $this->getEditBreadcrumb($model, $request, $args);\n\n if($request->ajax()) {\n return view($this->form_view, compact('form', 'breadcrumb', 'model', 'args', 'layout', 'section', 'request', 'form_data'));\n } else {\n $layout = $this->layout;\n $section = $this->section;\n $view = $this->form_view;\n return view('cms-package::default-resources.layout-extender', compact('form', 'breadcrumb', 'model', 'args', 'layout', 'section', 'layout', 'section', 'view', 'request', 'form_data'));\n }\n }", "title": "" }, { "docid": "052fcb4be65ef559048af91970a9092c", "score": "0.6962541", "text": "public function edit($id)\n {\n // we don't need this method which shows a form to edit\n }", "title": "" }, { "docid": "a801700662a2deaaefc059a611aa40bd", "score": "0.69617313", "text": "public function editformAction() {\r\n\t\tif (($messages = $this->_messages->getMessages ())) {\r\n\t\t\t$this->view->assign ( 'messages', $messages );\r\n\t\t}\r\n\t\t\r\n\t\t$info = $this->_tree->getNodeInfo ( $this->_request->getParam ( $this->_id_field ) );\r\n\t\t$form = new Bel_Forms_Builder ( $this->_formname, $this->_form_edit_action );\r\n\t\t$form->addElement ( 'hidden', $this->_id_field, array ('value' => $info->{$this->_id_field} ) );\r\n\t\t$form->populateForm ( $info );\r\n\t\t$this->view->assign ( 'form', $form );\r\n\t\t$this->view->display ( $this->_form_template );\r\n\t}", "title": "" }, { "docid": "83b72662162c1c99a4a9ec1b7b4e6edc", "score": "0.69612134", "text": "public function show_editform()\n {\n $this->item_form->display();\n }", "title": "" }, { "docid": "aaf7cccb1997350d3476b1b809c87285", "score": "0.6960807", "text": "public function edit(Resource $resource)\n {\n try {\n $grou = Groups::with([])->get();\n return view('resource.edit')->with(['groups' => $resource, 'op' => $grou]);\n } catch (\\Exception $e) {\n session()->flash('flash_error', 'Something went wrong');\n return Redirect::back();\n }\n }", "title": "" }, { "docid": "f8826a70c4e190274cdb2b9b04638375", "score": "0.6959897", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FormBundle: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('FormBundle:Form:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "627cc08a03d861bf43b77f13aa1b356b", "score": "0.6949801", "text": "public function edit($id)\n { \n return $this->showForm($id);\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": "167dafd94209f70f38ffcad67381a2e9", "score": "0.69375557", "text": "public function edit() {\n\t\t$this->mode = 'edit';\n\t\t$this->submit();\n\t}", "title": "" }, { "docid": "8c9d1b02602edc2dd288db289ad2a173", "score": "0.69332457", "text": "public function editAction()\n {\n // returning due to validation:\n if (isset($this->view->form)) {\n return;\n }\n \n $this->view->form = $this->_getCarForm();\n \n // Retrieve the record for editing:\n $manager = new Lightman_Managers_Car();\n $carId = $this->getRequest()->getParam('id');\n $data = $manager->fetch($carId);\n $this->view->form->populate($data[0]);\n $this->view->form->setAction('/car/save');\n }", "title": "" }, { "docid": "6eef3a46914dacc1a3123674c081e2a5", "score": "0.69211656", "text": "public function edit($id)\n {\n $model = $this->resourceModel::find($id);\n\n if (!is_null($this->relatedModel)) {\n $model->load($this->relatedModel);\n }\n\n $this->beforeEdit($model);\n\n $this->viewData['resourceData'] = $model;\n\n return view(\n \"{$this->viewBaseDir}.{$this->viewFiles['edit']}\",\n $this->viewData\n );\n }", "title": "" }, { "docid": "7abb5638b8fab40720496e4c8e4e6ee3", "score": "0.69126725", "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('customer', array('action' => 'new')));\n\t\t} // if\n\n\t\t$model = ORM::factory('Customer')->where('id', '=', $id)->find();\n\n\t\t$this->content = View::factory('customer/form', array(\n\t\t\t'title' => __('Edit customer \":customer\"', array(':customer' => $model->company ?: $model->name)),\n\t\t\t'customer' => $model,\n\t\t\t'properties' => $model->get_properties(),\n\t\t\t'ajax_url' => Route::url('customer', array('action' => 'save', 'id' => $id)),\n\t\t\t'invoices' => $model->invoices->order_by('id', 'DESC')->limit(20)->find_all()\n\t\t));\n\t}", "title": "" }, { "docid": "7e98823aebb6ba9203517ae50d88ad7a", "score": "0.69074184", "text": "function edit(){\n\t\t$id = $this->input->get('id');\n\t\t$data = array();\n\t\t$data['title']\t\t= 'Edit '.$this->title;\n\t\t$data['controller']\t= $this->controller;\n\t\t$data['state']\t\t= 'edit';\n\t\t$data['id'] \t\t= $id;\n\n\t\t// because it's simple index and form, use common form\n\t\t$data['table_field'] = $this->group->table_field;\n\t\t$data['primary_key'] = $this->group->primary_key;\n\t\t$data['content']\t= 'content/common/form';\n\t\t$data['datas'] = $this->group->get(decrypt_id($id));\n\n\t\t$this->template($data);\n\t}", "title": "" }, { "docid": "442f0c0607d600b71f651788512fa4e2", "score": "0.68972987", "text": "public function edit()\n {\n return view('backend::edit');\n }", "title": "" }, { "docid": "9443931fcf9450e4082ea1fcc8f7947f", "score": "0.685467", "text": "public function editAction()\n {\n $category = $this->_helper->db->findById();\n $form = $this->_getForm($category);\n $this->view->form = $form;\n $this->_processPageForm($category, $form, 'edit'); \n }", "title": "" }, { "docid": "572f29a2affec4fc1f0fcd8cf08070ff", "score": "0.68250066", "text": "public function edit($id){\n \n try {\n $resource = Resource::withTrashed()->findOrFail($id); \n }catch (ModelNotFoundException $e){\n $errors = collect(['El recurso con ID '.$id.' no se encuentra.']);\n return back()\n ->withInput()\n ->with('errors', $errors);\n }\n $resourceStatuses = ResourceStatus::orderBy('name', 'ASC')->get();\n $resourceTypes = ResourceType::orderBy('name', 'ASC')->get();\n $dependencies = Dependency::orderBy('name', 'ASC')->get();\n $resourceCategories = ResourceCategory::orderBy('name', 'ASC')->get();\n $physicalStates = PhysicalState::orderBy('name', 'ASC')->get();\n $spaces = Space::orderBy('name', 'ASC')->get();\n\n return view('admin.resources.create_edit')\n ->with('resource', $resource)\n ->with('resourceStatuses', $resourceStatuses)\n ->with('resourceTypes', $resourceTypes)\n ->with('dependencies', $dependencies)\n ->with('resourceCategories', $resourceCategories)\n ->with('physicalStates', $physicalStates)\n ->with('spaces', $spaces)\n ->with('title_page', 'Editar recurso: '.$resource->name)\n ->with('menu_item', $this->menu_item);\n }", "title": "" }, { "docid": "92c9e3a1c5275112cb6b6e51244fca5c", "score": "0.6815314", "text": "public function edit($id)\n {\n $model = static::$model;\n $className = $this->getClass();\n\n $item = $className::find($id);\n\n $formOptions = [\n 'route' => ['admin.' . strtolower($this->getClassNameFromModel()) . '.update', $id],\n 'method' => 'put',\n ];\n\n return view('pilot::admin.' . static::$viewFolder . '.form', compact('item', 'formOptions', 'model'));\n }", "title": "" }, { "docid": "23a4ee1572e6b647de73c414d405951f", "score": "0.68132675", "text": "public function edit($id)\n {\n //\n $form = Form::find($id);\n return view('forms.edit',compact('form','id'));\n\n }", "title": "" }, { "docid": "a3f2b74e4e1ef90e3f2b369f12999507", "score": "0.68113613", "text": "public function edit($id)\n {\n\t\t$params = [\n\t\t\t'data' => $this->repository->findById($id),\n\t\t];\n\n\t\treturn view('admin.pages.material-form-update', ['page' => 'material'])->with($params);\n\t}", "title": "" }, { "docid": "873a08d0f357fca631ccc7259052d9ce", "score": "0.68018645", "text": "public function edit()\n {\n return view('common::edit');\n }", "title": "" }, { "docid": "ea939d247defa384f3c7bb826e339c02", "score": "0.6799606", "text": "public function edit($id)\n {\n $product = Product::findOrFail($id);\n return view('Admin/product/form',compact('product'));\n }", "title": "" }, { "docid": "81e049bcae69bcc2654f7dc4038b4aaf", "score": "0.679763", "text": "public function edit($id)\n {\n $requestform = requestform::findOrFail($id);\n\n return view('RequestForms.requestforms.edit', compact('requestform'));\n }", "title": "" }, { "docid": "e3fad094d4252fd72e2502d403dfc367", "score": "0.67960227", "text": "public function edit()\n {\n return view('product::edit');\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": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "8566978c055c66cbf8d8ff39c2b4fa99", "score": "0.6789007", "text": "public function getEditForm($id){\n $data = $this->model->findOrFail($id);\n return view('administrator.pages.update_form')->with(compact('data'));\n }", "title": "" }, { "docid": "d8b4457853a470b2a27d3bf2af2f3273", "score": "0.67831767", "text": "public function edit($id)\n {\n return view('operationmanager::edit');\n }", "title": "" }, { "docid": "3e2f2a29164ba9a0158e7b2fd5bd8f61", "score": "0.6764436", "text": "public function edit() {\n\t\tglobal $DIC;\n\t\t$tpl = $DIC['tpl'];\n\n\t\t$this->initForm(\"edit\");\n\t\t$this->getValues();\n\n\t\t$tpl->setContent($this->form->getHTML());\n\t}", "title": "" }, { "docid": "df462f5d85bc8fd7cf9dce14953e8abf", "score": "0.67639047", "text": "public function edit()\n {\n return view('offer::edit');\n }", "title": "" }, { "docid": "418884af8e182e5d20016d3fb1359c7e", "score": "0.67567337", "text": "public function editAction()\n {\n $em = $this->getDoctrine()->getManager();\n\t\t/* Template fields */\n\t\t$GlobalFields = new GlobalFields();\n\t\t$globalfieldsarray = $GlobalFields->getGlobalFields($this, $em);\n\t\t\n\t\t$entity = $globalfieldsarray[\"empleado\"];\n\t\t$entity->setUserName($entity->getUsuario()->getUserName());\n\t\t$entity->setPassword($entity->getUsuario()->getPassword());\n\t\t\n $editForm = $this->createForm(new EmpleadoType(), $entity);\n\n return $this->render('SystemEmpleadoBundle:EditarPerfil:edit.html.twig', array(\n\t\t\t'globalfieldsarray' => $globalfieldsarray,\n 'edit_form' => $editForm->createView(),\n 'error' => NULL,\n ));\n }", "title": "" }, { "docid": "c3a72c58c6b66c9b866217649ddaef6a", "score": "0.67562574", "text": "public function edit()\n {\n return view('sallereservation::edit');\n }", "title": "" }, { "docid": "f9f7f910c8b16a5d918564783761275b", "score": "0.67492944", "text": "public function edit($id, Request $request)\n {\n $resource = MyResource::find($id);\n if ($resource != null) {\n if ($request->user()->id == $resource->user->id || $request->user()->hasRole('Admin')) {\n $modules = Module::getFormModulesArray();\n return view('resources.edit', compact('resource', 'modules'));\n } else {\n return abort(401, 'You\\'re not allowed to edit this resource!');\n }\n }\n }", "title": "" }, { "docid": "06a1955be6e482728e09337f630bb727", "score": "0.67316383", "text": "public function editAction($id)\n {\n $user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('SifoSharedBundle:Program')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Program entity.');\n }\n\n $form = $this->createEditForm($entity);\n\n return $this->render('SifoAdminBundle:edit:layout.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'user' => $user,\n ));\n }", "title": "" }, { "docid": "444f98d0090cda3d8ec6a32c569483fe", "score": "0.6730375", "text": "public function edit()\n {\n return view('item::edit');\n }", "title": "" }, { "docid": "3511b1492265afe62ecb75757f43c811", "score": "0.67264074", "text": "protected function showForm() {\n\t\t// Setup header Data\n\t\t$titleStr = '';\n\t\tswitch ($this->mode) {\n\t\t\tcase 'delete':\n\t\t\t\t$titleStr = 'Delete';\n\t\t\t\tbreak;\n\t\t\tcase 'edit':\n\t\t\t\t$titleStr = 'Edit';\n\t\t\t\tbreak;\n\t\t\tcase 'add':\n\t\t\tdefault:\n\t\t\t\t$titleStr = 'Add';\n\t\t\t\tbreak;\n\t\t}\n\t\tif (!isset($this->data['form']) || empty($this->data['form'])) {\n\t\t\t$this->data['form'] = $this->form->get();\n\t\t}\n\t\t$this->data['subTitle'] = $titleStr.\" \".$this->_NAME;\n\t\t$this->data['thisItem']['id'] = $this->recordId;\n\t\t$this->data['thisItem']['ownerId'] = (isset($this->dataModel->recordOwnerId) ? $this->dataModel->recordOwnerId : -1);\n\t\t$this->data['currUser'] = $this->params['currUser'];\n\t\t$this->params['content'] = $this->load->view($this->views['EDIT'],$this->data,true);\n\t\t$this->params['pageType'] = PAGE_FORM;\n\t\t$this->displayView();\n\t}", "title": "" }, { "docid": "32e951846997ccc0adda9087b6a46d09", "score": "0.6724373", "text": "public function edit($id){\n return $this->form($id);\n }", "title": "" }, { "docid": "3cb809ceeb3604d4bdf66da701d2423d", "score": "0.67104334", "text": "public function showEdit($id)\n {\n return $this->view('edit', [\n 'model' => $this->service->find($id)\n ]);\n }", "title": "" }, { "docid": "56f9be8327c6825b7bab6704e048d9b7", "score": "0.67073035", "text": "public function edit(Request $request, $client, $resource)\n\t{\n\t\t$resource = Resource::findBySlug($client, $resource);\n\n\t\tif (!$resource) {\n\t\t\treturn response(view('resources.404'), 404);\n\t\t}\n\n\t\t$this->authorize('manage', $resource);\n\n\t\t$resource->load('client', 'tags', 'type');\n\n\t\treturn view('resources.edit', ['client' => $resource->client, 'resource' => $resource]);\n\t}", "title": "" }, { "docid": "41b2f68ed73a5cc186c76264c0d17f7a", "score": "0.6706397", "text": "public function edit($id)\n\t{\n\t\t$question = Question::find($id);\n\t \n\t \n $display = Question::$display;\n\n\t\treturn view('admin.question.edit', compact('question', \"display\"));\n\t}", "title": "" }, { "docid": "e825c5f01addbfd2313d771317890d1d", "score": "0.6702575", "text": "public function editAction() {\n\t\t$this->enableLayout();\n\t\t$id\t\t = $this->getRequest()->getParam('id');\n\t\t$product = Object_Abstract::getById($id);\n\n\t\t$user\t\t\t\t = ParagonFramework_Models_User::getUser();\n\t\t$configReader\t\t = ParagonFramework_ConfigReader::getInstance();\n\t\t$configReaderView\t = $this->getView($user, $configReader);\n\n\t\t$templateName = $configReaderView->getTemplate();\n\n\t\t$plugin\t\t\t\t = ParagonFramework_Plugin::getInstance();\n\t\t$templateFilePath\t = $plugin->getDeployPath() . '/templates/' . $templateName;\n\n\t\t$this->view->pathToSnipplet\t = $templateFilePath;\n\t\t$this->view->user\t\t\t = $user;\n\t\t$this->view->product\t\t = $product;\n\t}", "title": "" }, { "docid": "9b1f710040cf008ce0cc39a2446c2e3f", "score": "0.66995674", "text": "public function edit()\n\t{\n\t\t$this->subcontrollers[\"form\"] = new Form\\FormController($this->config, \"Form\", \"index\", array());\n\n\n\t\t// $this->context[\"forms\"] = $this->form_controller->get_forms($this->forms);\n\t\t// var_dump($this->context[\"forms\"]);\n\t}", "title": "" }, { "docid": "281109723855c04252dbc51f84833e23", "score": "0.6693279", "text": "public function editAction()\n\t{\n\t\t// We first retrieve the report ID\n\t\t$id = $this->getRequest()->getParam('id');\n\t\t// Then we generate the report path\n\t\t$path = Mage::getBaseDir('var') . DS . 'report';\n\n\t\t// Load the report\n\t\t$model = Mage::getModel('reportsviewer/report')->load($id, $path);\n\n\t\t// Register the data so we can use it in the form\n\t\tMage::register('report_data', $model);\n\n\t\t// Layout loading / rendering\n\t\t$this->loadLayout();\n\t\t$this->_setActiveMenu('system/tools/reportsviewer');\n\n\t\t$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);\n\n\t\t$this->_addContent($this->getLayout()->createBlock('reportsviewer/adminhtml_reportsviewer_edit'));\n\n\t\t$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n\n\t\t$this->renderLayout();\n\t}", "title": "" }, { "docid": "e229be1f6baba6da610f480a33455c90", "score": "0.6690778", "text": "public function edit($id)\n {\n $resource = $this->findResource($id);\n\n return view($this->getTemplatePath('edit'), compact('resource'));\n }", "title": "" }, { "docid": "ea46a3f45fe3107a2b87f10fd7bb2223", "score": "0.6688617", "text": "public function edit(Record $record)\n {\n $this->authorize('edit', $record);\n\n $fieldChanges = $this->requestProcessor->fromFieldsRequest(\n $record->recordType->fields(), \"field_\");\n $linkChanges = $this->requestProcessor->getLinkChanges(\n $record->recordType);\n $record->updateData($fieldChanges);\n return view('record.edit', [\n \"record\" => $record,\n \"idPrefix\" => \"\",\n \"returnTo\" => $this->requestProcessor->returnURL(),\n \"linkChanges\" => $linkChanges,\n \"nav\" => $this->navigationMaker->recordNavigation($record, \"Edit\")\n ]);\n }", "title": "" }, { "docid": "15c7a9f1bc35a63d24f1c419ea44bb8e", "score": "0.6687803", "text": "public function edit($id)\n {\n $countries = Country::all();\n $roles = Role::all();\n $admin = Admin::find($id);\n $pageTitle = trans(config('dashboard.trans_file').'edit');\n $submitFormRoute = route('admins.update', $id);\n $submitFormMethod = 'put';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('countries', 'roles', 'admin', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "bf49bc8226e13e2862c2259d16e93588", "score": "0.6680715", "text": "public function edit($id)\n {\n $product = Product::find($id);\n return view('products.edit_form')->with('product', $product)->with('manufacturers', Manufacturer::all());\n }", "title": "" }, { "docid": "3e9f248cdce27ef62f9af24dbc0c177d", "score": "0.66793704", "text": "public function edit($id)\n {\n $edit_object = $this->objectRepository->find($id);\n return view('admin.Object.edit-object',compact('edit_object'));\n }", "title": "" }, { "docid": "6d7fd6cc71038b382ce6486ecbf4fe92", "score": "0.6670073", "text": "public function viewEdit()\n {\n if (isset($_GET['id'])) {\n $data['product'] = Product::getById($_GET['id']);\n View::render('Products/edit.php', $data);\n } else {\n echo 'Page not found';\n }\n }", "title": "" }, { "docid": "136c14e90c2ade2a65f234ee3ff6ac85", "score": "0.66696644", "text": "public function edit($id)\n {\n // get the nerd\n $employee = Employee::find($id);\n\n // show the edit form and pass the nerd\n return View::make('employee.edit')\n ->with('employee', $employee);\n }", "title": "" }, { "docid": "419edcb2aed17f9ea1df57d9b28b5be3", "score": "0.6668747", "text": "public static function edit()\r\n {\r\n $record = todos::findOne($_REQUEST['id']);\r\n self::getTemplate('edit_task', $record);\r\n }", "title": "" }, { "docid": "7ab4920df56f35f41b7bed2b83e1e12f", "score": "0.6665399", "text": "public function edit($id)\n\t{\n\t\t$product = Product::findOrFail($id);\n\t\t$show = false;\n\t\treturn View::make('admin.product.new_edit_product', compact('product', 'show'));\n\t}", "title": "" }, { "docid": "261de490d37bf33e08a7b49ebcdbaf10", "score": "0.66629046", "text": "public function edit($id)\n\t{\n\t\tif(Auth::user() && Auth::user()->id == Config::get('laracancan.super_admin')) {\n\t\t\t$resource = Resource::find($id);\n\t\t\treturn view('laracancan::resource.edit')\n\t\t\t\t->with('resource', $resource);\n\t\t}\n\n\t\treturn response(view('laracancan::master.401'), 401);\n\t}", "title": "" }, { "docid": "324456cc428b315bcf53fd80359eafa2", "score": "0.6654099", "text": "public function edit($id)\n {\n $forms = Form::Find($id);\n return view('be/forms/edit', ['forms'=>$forms ]);\n }", "title": "" }, { "docid": "3e646f91bbc9b42ba119ea81f1e01e36", "score": "0.66473585", "text": "public function edit($id)\n {\n\n $formulario = new FormBuilder($this->class::findOrFail($id),$this->formFields);\n $modelo = $this->model;\n return view($this->chooseView('edit'), compact('formulario', 'modelo'));\n }", "title": "" }, { "docid": "7c426795b6ade66a5e5ef6b740010b61", "score": "0.6642236", "text": "public function editAction(){\n if($this->_getParam('id',false)){\n $form = new HelpForm();\n $form->submit->setLabel('Submit changes');\n $form->author->setValue($this->getIdentityForForms());\n $this->view->form = $form;\n if($this->getRequest()->isPost() \n && $form->isValid($this->_request->getPost())){\n if ($form->isValid($form->getValues())) {\n $where = array();\n $where[] = $this->_help->getAdapter()->quoteInto('id = ?', \n $this->_getParam('id'));\n $this->_help->update($form->getValues(),$where);\n $this->getFlash()->addMessage('You updated: <em>' \n . $form->getValue('title')\n . '</em> successfully. It is now available for use.');\n $this->_redirect('admin/help/');\n } else {\n $form->populate($form->getValues());\n }\n } else {\n $form->populate($this->_help->fetchRow('id= ' \n . $this->_getParam('id'))->toArray());\n }\n } else {\n throw new Pas_Exception_Param($this->_missingParameter, 500);\n }\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": "ccb8cbed1c0323296fb99a02c5821089", "score": "0.6636548", "text": "public function editAction() {\n \n View::renderTemplate('Settings/edit.html', [\n 'user' => $this->user\n ]);\n }", "title": "" }, { "docid": "0da44488fa19010ad9532838a532cf8a", "score": "0.66324544", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $data['title'] = $this->title;\n $tbl = User::find($id);\n $data['form'] = $formBuilder->create('App\\Forms\\UserForm', [\n 'method' => 'PUT',\n 'model' => $tbl,\n 'url' => route($this->uri.'.update', $id)\n ])\n ->modify('role', 'choice', [\n 'selected' => null\n ])\n ->modify('password', 'password', [\n 'value' => '',\n 'attr' => ['data-validation' => '']\n ]);\n $data['back'] = route($this->uri.'.index');\n return view($this->folder.'.create', $data);\n }", "title": "" }, { "docid": "d89d877aeb4e888fc162f4776686a75f", "score": "0.66217417", "text": "public function edit()\n {\n return view('satuan::edit');\n }", "title": "" }, { "docid": "afb09dad84e30958b4252ef05c35ffd3", "score": "0.66183454", "text": "public function editView() {\n $this->edit = true;\n $this->addView();\n }", "title": "" }, { "docid": "da2c7e0272b4f7cc0f2b78554d9864cb", "score": "0.66176736", "text": "public function edit($id)\n {\n return view('employee::edit');\n }", "title": "" }, { "docid": "d6c2c7e0ddbac0b65be0ee74a7fcd796", "score": "0.6614968", "text": "public function edit($id)\n {\n return view('consultas::edit');\n }", "title": "" }, { "docid": "05a97cb5f26b111f1833f8ff3fcfa159", "score": "0.6611799", "text": "public function edit() {\n\n \t\tif (!$this->user || !$_POST)\n \t\tRouter::redirect('/organizations/index');\n\n \t$organization_id = $_POST['organization_id'];\n\n\t\t# Transfer POST data to Organization object\n\t\t$organization = new Organization();\n\t\t$organization->findInDb ($organization_id);\n\n # Setup view\n\t\t$this->template->content = View::instance('v_organizations_edit');\n\t\t$this->template->title = \"Edit Organization\";\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->organization = $organization;\n\n \techo $this->template;\n }", "title": "" }, { "docid": "b492e01b8e4a4d95cb491744ad7b75fd", "score": "0.6607943", "text": "public function edit($id)\n {\n abort_if(Gate::denies('user_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n $forms = Form::findOrFail($id);\n return view('admin.form.edit', compact('forms'));\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "69349f7253951cb5e1d148a7d1e3929b", "score": "0.6607782", "text": "function edit($request) {\n\t\tif(!$this->currentRecord) {\n\t\t\treturn $this->httpError(404);\n\t\t}\n\t\tif(!$this->currentRecord->canEdit(Member::currentUser())) {\n\t\t\treturn $this->httpError(403);\n\t\t}\n\n\t\treturn $this->render(array(\n\t\t\t'Form' => $this->EditForm(),\n\t\t\t'ExtraForm' => $this->DeleteForm()\n\t\t));\n\t}", "title": "" }, { "docid": "1103d1caa349a1d4f5beb8012d42d974", "score": "0.66074175", "text": "public function edit($id)\n {\n return view('apollo::edit');\n }", "title": "" }, { "docid": "4c41c54cdabcef7aee925039ff148afa", "score": "0.66037405", "text": "public function edit()\n {\n // return view('master::edit');\n }", "title": "" }, { "docid": "18ea739bdb9f6382c60e491e54174aee", "score": "0.6600729", "text": "public function edit($id)\n {\n return view('book.form', compact('id'));\n }", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.6596694", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "12259e1dd0f580f13929c361e6808b7f", "score": "0.65930325", "text": "public function edit($id)\n {\n return view('helpcentermodule::edit');\n }", "title": "" }, { "docid": "a6922b424cc81f43c7dfdb03fa2fdd30", "score": "0.6587789", "text": "public function edit($id)\n\t{\n\n\t\t$record=LegalAssistance::find($id);\n\t\t$elements_data=$this->generate_form($record->toArray());\n\t\t$data['elements_data']=$elements_data;\n\t\t$data['can_import']=true;\n\t\t$data['centers']=retrieveField(Center::all(),'name');\n\t\t$data['submit_url']='legalassistance.update';\n\t\t$data['heading']='Legal Assistance';\n\t\t$data['go_back']='legalassistance.index';\n\t\t$data['record_id']=$record['id'];\n\n\t\treturn View::make('layouts.records.edit')->with('data', $data);\n\t}", "title": "" }, { "docid": "c0ed2d04ca6f88da3fdd5ba24182cabd", "score": "0.65859956", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('StalkAdminBundle:Faq')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Faq entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('StalkAdminBundle:Faq:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "69f193cd505298f2c28370b8b0c844c4", "score": "0.65842503", "text": "public function edit($id)\n {\n $especialidade = Especialidade::find($id);\n\n if (is_null($especialidade)) {\n return $this->retornaMensagemNaoEncontrado(false);\n } else {\n return view('especialidade.especialidadeForm')\n ->with('titulo', 'Especialidades - Alteração')\n ->with('especialidade', $especialidade);\n }\n }", "title": "" }, { "docid": "364ca1756970ce6a0c4ca2c96ab66a99", "score": "0.65837765", "text": "function edit() {\n //$this->view->render('Pharmacy/edit');\n }", "title": "" }, { "docid": "b14f129d44d316c72400cd045d6a4e84", "score": "0.65830815", "text": "public function edit($id)\n {\n $formation = Formation::findOrFail($id);\n return view('/formation.update-form', compact('formation'));\n }", "title": "" }, { "docid": "5189a2b2eec4b70ad630efbb5387c44a", "score": "0.6579895", "text": "public function edit(Request $request)\n {\n $id = $request->id;\n if(!$id){\n $request->session()->flash('error', \"Something Went Wrong!.\");\n return redirect(route('manage-contractor-resources'))->withInput();\n }\n $data['chapters'] = Chapter::all();\n $data['info'] = $info = ContractorResource::find($id);\n if(!$info) {\n $request->session()->flash('error', \"Unable to find contractor resource.\");\n return redirect(route('manage-contractor-resources'))->withInput();\n }\n $data['title'] = \"Manage Contractor Resources - Edit\";\n return view('manage_contractor_resources.edit', $data);\n }", "title": "" }, { "docid": "a21034b7eacdbe071c44a2839d5a86e5", "score": "0.6579643", "text": "public function edit()\n\t{\n\t\t$jInput = JFactory::getApplication()->input;\n\t\t$jInput->set('view', 'template');\n\t\t$jInput->set('layout', 'default');\n\t\t$jInput->set('hidemainmenu', 1);\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "12c851ca81effd8d08719b4e8d030021", "score": "0.6579554", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('DevPCultBundle:Representation')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Representation entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('DevPCultBundle:Representation:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "82fbbfb6e7f70c57e4866451e08650ae", "score": "0.6572959", "text": "public function edit()\n {\n return view('licenca.edit');\n }", "title": "" }, { "docid": "293e4323f95692bc641e5529b888814d", "score": "0.6572167", "text": "public function edit($id) {\n\n\t\treturn view('balance.entry.edit', \n\t\t\t[\n\t\t\t'title' => 'Editar Registro',\n\t\t\t'action' => [\n\t\t\t'name' => 'edit',\n\t\t\t'value' => 'Editar',\n\t\t\t'route' => '/entry/update/'.$id,\n\t\t\t],\n\t\t\t'concepts' => Concepts::all('name', 'id'),\n\t\t\t'entry' => count(old()) > 0 ? $this->createEntry (old()) : $this->show($id)[0]\n\t\t\t]\n\t\t\t);\n\t}", "title": "" }, { "docid": "f49e849e4d81c6dd329330e95933d929", "score": "0.65693146", "text": "public function showEditForm($jobId) {\n $job = Job::find($jobId);\n return view('jobs/edit', [\n 'job' => $job\n ]);\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "8e54661cceae01836ae81c249aa4446e", "score": "0.6568565", "text": "public function edit($id)\n {\n return view('bodeguero/historial.form', [\n 'historial' => Historial::find($id), \n 'is_editing' => true\n ]);\n }", "title": "" }, { "docid": "544a3a2d2b88694a924ab6829e4dee76", "score": "0.6568338", "text": "public function editAction()\n {\n // returning due to validation:\n if (isset($this->view->form)) {\n return;\n }\n \n $this->view->form = $this->_getTaskForm();\n \n // Get the assignees droplist ready:\n $assignees = $this->_getAssigneesList();\n $this->view->assignees = $assignees;\n \n // Retrieve the record for editing:\n $manager = new Lightman_Managers_Task();\n $taskId = $this->getRequest()->getParam('id');\n $data = $manager->fetch($taskId);\n $this->view->form->populate($data[0]);\n $this->view->form->setAction('/task/save');\n }", "title": "" } ]
ff40c6dc30f27c3e74adc5dd17a5de59
returns description of the service
[ { "docid": "fabc1747eec4bd2938d612216397a61c", "score": "0.0", "text": "public function getDescription()\r\n {\r\n return $this->description;\r\n }", "title": "" } ]
[ { "docid": "49fd1dfda3434b9c5cfa9c80a428ffb4", "score": "0.8652776", "text": "public function getServiceDescription();", "title": "" }, { "docid": "2e9adbb273e6e13c1a7168e8150c62fd", "score": "0.76434535", "text": "function get_service_description()\n\t{\n\t\treturn $this->load_url();\n\t}", "title": "" }, { "docid": "bb912b06eff8f820c22b07a3c1e293fa", "score": "0.7204955", "text": "public function get_service_name();", "title": "" }, { "docid": "6386574ce71e798131002fc28dea5f60", "score": "0.7101087", "text": "public function getServiceInfo() {}", "title": "" }, { "docid": "e9ba4a03042b4463a952ea904e1a39c1", "score": "0.68509257", "text": "public function describeService() {\n $xml = \"\\n <ser:\". $this->service. '>';\n $xml .= $this->describeCredential();\n $xml .= \"\\n <captacaoBaseExterna>\";\n $xml .= $this->codigoCaptacaoBaseExterna? \"\\n <codigoCaptacaoBaseExterna>\". $this->codigoCaptacaoBaseExterna. \"</codigoCaptacaoBaseExterna>\": NULL;\n $xml .= \"\\n <detalhesBaseExterna>\";\n $xml .= \"\\n <detalheBaseExterna>\";\n $xml .= $this->codigoNaturezaReceita? \"\\n <codigoNaturezaReceita>\". $this->codigoNaturezaReceita. \"</codigoNaturezaReceita>\": NULL;\n $xml .= $this->codigoUnidadeRecolhedora? \"\\n <codigoUnidadeRecolhedora>\". $this->codigoUnidadeRecolhedora. \"</codigoUnidadeRecolhedora>\": NULL;\n $xml .= $this->subNatureza? \"\\n <subNatureza>\". $this->subNatureza. \"</subNatureza>\": NULL;\n $xml .= $this->justificativa? \"\\n <justificativa>\". utf8_encode($this->justificativa). \"</justificativa>\": NULL;\n $xml .= $this->metodologia? \"\\n <metodologia>\". utf8_encode($this->metodologia). \"</metodologia>\": NULL;\n $xml .= $this->memoriaDeCalculo? \"\\n <memoriaDeCalculo>\". utf8_encode($this->memoriaDeCalculo). \"</memoriaDeCalculo>\": NULL;\n $xml .= \"\\n <valoresBaseExterna>\";\n $xml .= \"\\n <valorBaseExterna>\";\n $xml .= $this->exercicio? \"\\n <exercicio>\". $this->exercicio. \"</exercicio>\": NULL;\n $xml .= $this->valor? \"\\n <valor>\". $this->valor. \"</valor>\": NULL;\n $xml .= \"\\n </valorBaseExterna>\";\n $xml .= \"\\n </valoresBaseExterna>\";\n $xml .= \"\\n </detalheBaseExterna>\";\n $xml .= \"\\n </detalhesBaseExterna>\";\n $xml .= \"\\n </captacaoBaseExterna>\";\n $xml .= \"\\n\". ' </ser:'. $this->service. '>';\n return $xml;\n }", "title": "" }, { "docid": "7931dd628d586c9252f7c2121b5bd0c2", "score": "0.6835291", "text": "public function getServiceTitle() {}", "title": "" }, { "docid": "3fe0514dd091ef20787ad5dbb95c9168", "score": "0.6617324", "text": "public function service() {\n\t\treturn $this->_service->get();\n\t}", "title": "" }, { "docid": "251258486867e83db2a541ee8dbae174", "score": "0.6574206", "text": "public static function getDescription()\n\t{\n\t\treturn 'zugspitze client framework integration i.e. scaffoldgenarators, service proxy ant builds, ...';\n\t}", "title": "" }, { "docid": "425078c0b27cc15637b1d293ec23a6ed", "score": "0.65427566", "text": "public function service()\r\n {\r\n return $this->service;\r\n }", "title": "" }, { "docid": "b563eea684b8f80fd8f55feab917deab", "score": "0.6522583", "text": "public function getServiceName(): string\n {\n return $this->serviceName;\n }", "title": "" }, { "docid": "a820d4073f6b4c9128e937b8b3e687a6", "score": "0.64447343", "text": "public function describeService($data)\r\n\t{\r\n\t\t$className = $data['label'];\r\n\t\t//Sanitize path\r\n\t\t//$path = str_replace('..', '', $data['data']);\r\n\t\t$methodTable = MethodTable::create($this->servicePath . ($data['data'] ? DIRECTORY_SEPARATOR . $data['data'] : '') . $className . '.php', NULL, $classComment);\r\n\t\treturn array($methodTable, $classComment);\r\n\t}", "title": "" }, { "docid": "65af192fdf88ae93659fdb502de8cf32", "score": "0.64266056", "text": "public function __toString()\n {\n $service = $this->getName();\n if (empty($service)) {\n $service = $this->getId();\n }\n\n return $service;\n }", "title": "" }, { "docid": "2a4a630fd533f64443bfc3faec876bf1", "score": "0.6366621", "text": "function describeService($data)\r\n\r\n\t{\r\n\r\n\t\t$className = $data['label'];\r\n\r\n\t\t//Sanitize path\r\n\r\n\t\t$path = str_replace('..', '', $data['data']);\r\n\r\n\t\t//Generate the method table from this info\r\n\r\n\t\t// Browse the cakePHP controllers folder\t\t\r\n\r\n\t\t$this->_path = CONTROLLERS;\r\n\r\n\t\t\r\n\r\n\t\t$methodTable = CakeMethodTable::create($this->_path . $path . $className . '.php', NULL, $classComment);\r\n\r\n\t\treturn array($methodTable, $classComment);\r\n\r\n\t}", "title": "" }, { "docid": "6de404ebcc7414b4419aea1c5f0fcf17", "score": "0.6355364", "text": "public function definition()\n {\n return [\n 'service_name' => 'StravaGatewayService',\n 'human_friendly_name' => 'Strava'\n ];\n }", "title": "" }, { "docid": "03c45e759a3a8bfcbd5827463f1dec63", "score": "0.6343328", "text": "public function getServiceLabel()\n {\n return isset($this->service_label) ? $this->service_label : '';\n }", "title": "" }, { "docid": "e04886175f0cba78f062078e0e9052de", "score": "0.6320548", "text": "public function setServiceDescription(ServiceDescriptionInterface $description);", "title": "" }, { "docid": "78407c0ecf78c53bec8392bed3977257", "score": "0.63203764", "text": "public function getService() {\n $result = \"\";\n foreach($this->service as $key => $value) {\n $result = $result . $key .\"->\". \" $value \". \".\";\n }\n return $result;\n }", "title": "" }, { "docid": "44f7641dafb2109e4c198cc69f8f9bd2", "score": "0.63192225", "text": "public function getServiceName()\n {\n return $this->serviceName;\n }", "title": "" }, { "docid": "66078d72b31c77caa1dd97a07f87b07b", "score": "0.6280762", "text": "function setDescription(ServiceDescription $service, $updateFactory = true);", "title": "" }, { "docid": "f60d2554567301f99112e941e59fff7e", "score": "0.6250097", "text": "public function getDescription() {}", "title": "" }, { "docid": "f60d2554567301f99112e941e59fff7e", "score": "0.6250097", "text": "public function getDescription() {}", "title": "" }, { "docid": "f60d2554567301f99112e941e59fff7e", "score": "0.6250097", "text": "public function getDescription() {}", "title": "" }, { "docid": "f60d2554567301f99112e941e59fff7e", "score": "0.6250097", "text": "public function getDescription() {}", "title": "" }, { "docid": "f60d2554567301f99112e941e59fff7e", "score": "0.6250097", "text": "public function getDescription() {}", "title": "" }, { "docid": "f60d2554567301f99112e941e59fff7e", "score": "0.6250097", "text": "public function getDescription() {}", "title": "" }, { "docid": "f60d2554567301f99112e941e59fff7e", "score": "0.6250097", "text": "public function getDescription() {}", "title": "" }, { "docid": "f60d2554567301f99112e941e59fff7e", "score": "0.62500083", "text": "public function getDescription() {}", "title": "" }, { "docid": "f60d2554567301f99112e941e59fff7e", "score": "0.62500083", "text": "public function getDescription() {}", "title": "" }, { "docid": "f60d2554567301f99112e941e59fff7e", "score": "0.6249712", "text": "public function getDescription() {}", "title": "" }, { "docid": "f60d2554567301f99112e941e59fff7e", "score": "0.6249712", "text": "public function getDescription() {}", "title": "" }, { "docid": "2c62f467dab689c38f8ef8e1ba625a97", "score": "0.6235705", "text": "public function getEventDescription(): string;", "title": "" }, { "docid": "3d26e33a05518b307f34598aef9916ef", "score": "0.62249416", "text": "public function getServiceName()\n {\n return $this->service_name;\n }", "title": "" }, { "docid": "3d26e33a05518b307f34598aef9916ef", "score": "0.62249416", "text": "public function getServiceName()\n {\n return $this->service_name;\n }", "title": "" }, { "docid": "88f6cfc3e41a58d7165d7c74dfdeca23", "score": "0.6199614", "text": "public function getClientServiceInfo($service, $package)\n {\n return '';\n }", "title": "" }, { "docid": "a7bfeb59d480d09b9b32044cbd80a5f0", "score": "0.6189709", "text": "public function description();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "db24af085a6e7afcceb4b8190714477a", "score": "0.617892", "text": "public function getDescription();", "title": "" }, { "docid": "cf93ef7c620d575346dfd5dd5c241be2", "score": "0.6177952", "text": "public function serviceAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $systemConfig = $this->view->systemConfig;\n\n // set the input params\n $requiredParams = array(\n 'serviceName',\n );\n\n // process the input and validate\n $input = $this->processInput( $requiredParams, null, $errors );\n\n $serviceName = $input->serviceName;\n\n $serviceDocsXmlDir = $systemConfig->getSetting( 'SYSTEM_SERVICE_DOCS_XML_DIR' );\n\n $serviceDocXmlFile = \"$serviceDocsXmlDir/$serviceName.xml\";\n\n if ( ! file_exists( $serviceDocXmlFile ) ) {\n $errors->setError( 'serviceName', 'INPUT_INVALID_SERVICE_NAME' );\n }\n\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'docsErrors' );\n }\n\n $this->view->serviceDocXml = simplexml_load_file( $serviceDocXmlFile );\n\n return $this->renderPage( 'docsService' );\n }", "title": "" }, { "docid": "86467ef344eec3a04bdbecb65cf411ac", "score": "0.6161866", "text": "public function get_description()\n {\n }", "title": "" }, { "docid": "86467ef344eec3a04bdbecb65cf411ac", "score": "0.6161866", "text": "public function get_description()\n {\n }", "title": "" }, { "docid": "be99684471cd5065a550c43c30a4ceab", "score": "0.6161733", "text": "abstract protected function describeContainerService(object $service, array $options = [], ContainerBuilder $container = null): void;", "title": "" }, { "docid": "b19077adf896c37533bc3c95e6dd0144", "score": "0.613022", "text": "public function getDescription()\n {\n }", "title": "" }, { "docid": "fcd13c2ef70b6c31d29481522d28f7d7", "score": "0.61269045", "text": "public function help()\n\t{\n\t\t// You could include a file and return it here.\n\t\treturn \"<h4> Shipping Service </h4>\";\n\t}", "title": "" }, { "docid": "3c6bae29208f8a54c86b09b3d706cbeb", "score": "0.60955554", "text": "public function getDescription()\n {\n return;\n }", "title": "" }, { "docid": "43f82037e770b5b20a5a81dff04d8e6d", "score": "0.60765946", "text": "private function getService(){\n\n return ($this->servicename!==null) ? $this->servicename : service;\n }", "title": "" }, { "docid": "7333e30e4c84512fc4eaf04d2b38ab09", "score": "0.6074893", "text": "public function __toString()\n {\n $service = $this->getName();\n if (empty($service)) {\n $service = strval($this->getId());\n }\n\n return $service;\n }", "title": "" }, { "docid": "0405f25b20e3bb806fbd12e32bc62641", "score": "0.6051221", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "fdb7fb67e553dc73d77480674c5b7202", "score": "0.60353464", "text": "public function getClientDescription(): string;", "title": "" }, { "docid": "af976ea88fa347d765a139d499273a17", "score": "0.6029278", "text": "private function get_description_endpoint() : string {\n\t\tpreg_match( '/detailDesc=\\\"(.*?)\\\";/si', $this->request, $matches );\n\t\tif ( empty( $matches[1] ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn str_replace( '\"', '', $matches[1] );\n\t}", "title": "" }, { "docid": "ff54782c5be58489a504ece3f00c0ae3", "score": "0.60254455", "text": "public function description()\r\n {\r\n }", "title": "" }, { "docid": "d8a7ffbd1039f25ba8c760d8b856029d", "score": "0.6024847", "text": "public static function getServiceName()\n {\n return UtilsHttp::getParameterValue('w', 'GET');\n }", "title": "" }, { "docid": "3c5056a6f622bbe7843c7bb7cd11ebc8", "score": "0.60222876", "text": "public function getAdminServiceInfo($service, $package)\n {\n return '';\n }", "title": "" }, { "docid": "1bce8a0bdf5ca580533933f2145a7ec0", "score": "0.5980198", "text": "public function getServiceName()\n {\n return isset($this->service_name) ? $this->service_name : '';\n }", "title": "" }, { "docid": "b4e9a9c206f24ee8a7b10210bd6b7511", "score": "0.5969671", "text": "public function getService() {\n\t\treturn $this->service;\n\t}", "title": "" }, { "docid": "9838bc631b65a0726ffe11eb2e9abac8", "score": "0.5961165", "text": "public function getDesciption();", "title": "" }, { "docid": "78ac115529d687620340149d5ae6143b", "score": "0.5957334", "text": "public function getDescription() {\n // TODO: Implement getDescription() method.\n }", "title": "" }, { "docid": "9b2db19ab030615da8e714895e390744", "score": "0.5956032", "text": "public static function getDescription();", "title": "" }, { "docid": "9b2db19ab030615da8e714895e390744", "score": "0.5956032", "text": "public static function getDescription();", "title": "" }, { "docid": "6242b5a76e7cc909f40c30bf50162e86", "score": "0.5955927", "text": "public function show(Service $service)\n {\n\n }", "title": "" }, { "docid": "0a5eee6dc30177a4e64d7799b8fded81", "score": "0.59557664", "text": "public function getService() {\n\t\treturn $this->_service;\n\t}", "title": "" }, { "docid": "9cd7f6658f4b4ff839f55b8999b93ff5", "score": "0.5950148", "text": "public abstract function getDescription();", "title": "" }, { "docid": "fcf835e09603583ef3de90067f5f024a", "score": "0.5935997", "text": "public function getDesign()\n {\n return $this->_app->getDi()->getShared(ServiceMeta::SERVICE_DESIGN);\n }", "title": "" }, { "docid": "13aaad7121730e9705ab494799d1b015", "score": "0.59143823", "text": "public function getShortDescription() {}", "title": "" }, { "docid": "9d66759d8721666b16703b1441816bf4", "score": "0.5908284", "text": "public function getDescription(): string;", "title": "" }, { "docid": "9d66759d8721666b16703b1441816bf4", "score": "0.5908284", "text": "public function getDescription(): string;", "title": "" }, { "docid": "9d66759d8721666b16703b1441816bf4", "score": "0.5908284", "text": "public function getDescription(): string;", "title": "" }, { "docid": "9d66759d8721666b16703b1441816bf4", "score": "0.5908284", "text": "public function getDescription(): string;", "title": "" }, { "docid": "9d66759d8721666b16703b1441816bf4", "score": "0.5908284", "text": "public function getDescription(): string;", "title": "" }, { "docid": "9d66759d8721666b16703b1441816bf4", "score": "0.5908284", "text": "public function getDescription(): string;", "title": "" }, { "docid": "9d66759d8721666b16703b1441816bf4", "score": "0.5908284", "text": "public function getDescription(): string;", "title": "" }, { "docid": "9d66759d8721666b16703b1441816bf4", "score": "0.5908284", "text": "public function getDescription(): string;", "title": "" }, { "docid": "87befb721eec04b43ee996c8b7daff67", "score": "0.5878362", "text": "public function inServiceText() {\n return 'This application is currently being serviced. Check back later.';\n }", "title": "" }, { "docid": "fe583634031e8e8649685d468290ac83", "score": "0.58714", "text": "public function getDescription(){\n return $this->getParameter('description');\n }", "title": "" } ]
7cd2e678a89eda078c5a91e477ec0849
convert SetCookie: header value into proxy cookie
[ { "docid": "8759896e78cf9f483e92e9c10589923e", "score": "0.7412521", "text": "private function forward_cookie($header){\n\t\t$nv_pairs = explode(\";\", $header);\n\t\t\n\t\t// cookie attributes we care about\n\t\t$name = '';\n\t\t$value = '';\n\t\t$expires = '';\n\t\t$domain = '';\n\t\t\n\t\tforeach($nv_pairs as $index => $pair){\n\t\t\t$pair = ltrim($pair);\n\t\t\t$parts = explode(\"=\", $pair, 2);\n\t\t\t\n\t\t\t// first pair will always be cookie_name=value\n\t\t\tif($index == 0){\n\t\t\t\t$name = $parts[0];\n\t\t\t\t$value = $parts[1];\n\t\t\t} else if($parts[0] == 'expires'){\n\t\t\t\t$expires = $parts[1];\n\t\t\t} else if($parts[0] == 'domain'){\n\t\t\t\t$domain = $parts[1][0] == '.' ? substr($parts[1], 1) : $parts[1];\n\t\t\t}\n\t\t}\n\n\t\t$expires = empty($expires) ? 0 : strtotime($expires);\n\t\t$domain = empty($domain) ? URL_HOST : $domain;\n\t\t\n\t\t$cookie_name = COOKIE_PREFIX.str_replace(\".\", \"_\", $domain).'__'.$name;\n\t\t\n\t\t//var_dump(\"Set-Cookie before: \".$header);\n\t\t//var_dump(\"Set-Cookie after: \".$cookie_name.\"=\".$value);\n\t\t\n\t\tsetcookie($cookie_name, $value, time() + 60*60*60);\n\t}", "title": "" } ]
[ { "docid": "3f6ac00f10afdc77eead1f86f316a04e", "score": "0.64077353", "text": "function parseCookie($header) {\n\t\t//Obtain cookies from the header\n\t\t$a1 = explode(\"Set-Cookie: \", $header);\n\t\tfor ($i=1;$i<count($a1);$i++) {\n\t\t\t$a2 = explode(\"; \", $a1[$i]);\n\t\t\t$a3 = explode(\"=\", $a2[0]);\n\t\t\t$a4 = explode(\";\", $a3[1]);\n\t\t\t$tempcookiename[count($tempcookiename)] = $a3[0];\n\t\t\t$tempcookievalue[count($tempcookievalue)] = $a4[0];\n\t\t}\n\n\t\t//Process existing cookies\n\t\t$a1 = explode(\"; \", $this->cookie);\n\t\tfor ($i=0;$i<count($a1);$i++) {\n\t\t\t$a2 = explode(\"=\", $a1[$i]);\n\t\t\t$tempcookiename[count($tempcookiename)] = $a2[0];\n\t\t\t$a3 = explode(\";\", $a2[1]);\n\t\t\t$tempcookievalue[count($tempcookievalue)] = $a3[0];\n\t\t}\n\n\t\t//Replace existing cookies and add new ones\n\t\tfor ($i=0;$i<count($tempcookiename);$i++) {\n\t\t\t$add = true;\n\t\t\tfor ($x=0;$x<count($cookiename);$x++) {\n\t\t\t\tif ($cookiename[$x] == $tempcookiename[$i]) {\n\t\t\t\t\t$add = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($add == true && $tempcookiename[$i] != \"\" && $tempcookievalue[$i] != \"\") {\n\t\t\t\t$cookiename[count($cookiename)] = $tempcookiename[$i];\n\t\t\t\t$cookievalue[count($cookievalue)] = $tempcookievalue[$i];\n\t\t\t}\n\t\t}\n\n\t\t//Format the cookie as a single string and update the class object field\n\t\tfor ($i=0;$i<count($cookiename);$i++) {\n\t\t\t$return .= $cookiename[$i].\"=\".$cookievalue[$i].\"; \";\n\t\t}\n\t\t$return = substr($return, 0, (strlen($return) - 2));\n\t\treturn $return.\";\";\n\t}", "title": "" }, { "docid": "97602eeb5faed1ecd7a6ec6bd8620d5f", "score": "0.6226966", "text": "function setCookie($cookie);", "title": "" }, { "docid": "b18bc7265d3121af1557385d26eaab54", "score": "0.6076502", "text": "private function setHeadersFromCookies(): void\n {\n $values = [];\n\n foreach ($this->cookies as $cookie) {\n $values[] = $cookie->toString();\n }\n\n $this->setHeader(\"cookie\", $values);\n }", "title": "" }, { "docid": "6628d939b83d735817784376a90805e0", "score": "0.5945558", "text": "function get_cookies($header, $return = 'string') {\n\t\n/* \t\t$this->cookie_array = unserialize($this->cookie_array); */\n\t\t// rewritten; Neerav; 5 Nov 2007\n\t\t$cookie = \"\";\n\t\t\n\t\t// separate headers from body\n\t\tif (strpos($header, \"\\r\\n\\r\\n\") !== false) {\n\t\t\t@list($headers, $body) = explode(\"\\r\\n\\r\\n\",$header,2);\n\t\t} else {\n\t\t\t// no headers found\n\t\t\treturn \"\";\n\t\t}\n\t\t// forget the body\n\t\t$body = \"\";\n\t\t// extract headers into an array\n\t\t$header_lines = explode(\"\\r\\n\",$headers);\n\t\t//Debugger::say(basename(__FILE__).\": \".__LINE__.\": \".print_r($header_lines,true));\n\t\t\n/* Results of the preg_match:\nArray\n\t(\n\t\t[0] => Set-Cookie: LSID=EXPIRED;Domain=.google.com;Path=/;Expires=Mon, 01-Jan-1990 00:00:00 GMT\n\t\t[1] => LSID=EXPIRED\n\t\t[2] => LSID\n\t\t[3] => EXPIRED\n\t\t[4] => ;Domain=.google.com\n\t\t[5] => .google.com\n\t\t[6] => ;Path=/\n\t\t[7] => /\n\t\t[8] => Expires=Mon, 01-Jan-1990 00:00:00 GMT\n\t)\n*/\n\t\tforeach ($header_lines as $line) {\n\t\t\t$line = trim($line);\n\t\t\t//Debugger::say(basename(__FILE__).\": \".__LINE__.\": \".\"line: \".print_r($line,true));\n\t\t\tif (!preg_match('!Set-Cookie: (([^=]+)=([^;\\s]+))([;]?Domain=([^;]+))?([;]?Path=([^;]+))?[;]?(.*)?$!', $line, $match)) continue;\n\t\t\t$name = $match[2];\n\t\t\t$value = $match[3];\n\t\t\t$domain = $match[5];\n\t\t\t$path = $match[7];\n\t\t\tif ($value == \"EXPIRED\") {\n\t\t\t\t// delete expired cookies; by Neerav; 4 Apr 2006\n\t\t\t\tif (isset($this->cookie_array[\"$name\"])) unset($this->cookie_array[\"$name\"]);\n\t\t\t} else {\n\t\t\t\tif ($name == \"GoogleAccountsLocale_session\") $value = \"en\";\n\t\t\t\t// set/update cookie\n\t\t\t\t$this->cookie_array[\"$name\"] = array(\"name\" => \"$name\"\n\t\t\t\t\t\t\t\t, \"value\" => \"$value\"\n\t\t\t\t\t\t\t\t, \"domain\" => \"$domain\"\n\t\t\t\t\t\t\t\t, \"path\" => (($path == \"/\") ? \"\": \"$path\")\n\t\t\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t//Debugger::say(basename(__FILE__).\": \".__LINE__.\": updated cookies: \".print_r($this->cookie_array,true));\n\t\tif (!is_array($this->cookie_array)) $this->cookie_array = array();\n\t\tforeach($this->cookie_array as $name => $value) {\n\t\t\tif ($cookie !== \"\") $cookie .= \"; \";\n\t\t\t$cookie .= $name.\"=\".$value['value'];\n\t\t}\n\t\t\n\t\t$this->cookie_array_serial = serialize($this->cookie_array);\n\t\t$this->cookie_str = $cookie;\n\t\t//Debugger::say(basename(__FILE__).\": \".__LINE__.\": updated cookie string:\\n\".$this->cookie_str);\n\t\t\n\t\tif ($return == 'array') {\n\t\t\treturn $this->cookie_array;\t\t\n\t\t} else {\n\t\t\treturn $cookie;\n\t\t}\n\t}", "title": "" }, { "docid": "6fd11b222411b96b905ddda8118ddcef", "score": "0.5840643", "text": "public static function setCookieHeader(&$header, $name, $value)\n {\n //Build cookie header\n if (is_array($value)) {\n $domain = '';\n $path = '';\n $expires = '';\n $secure = '';\n $httponly = '';\n if (isset($value['domain']) && $value['domain']) {\n $domain = '; domain=' . $value['domain'];\n }\n if (isset($value['path']) && $value['path']) {\n $path = '; path=' . $value['path'];\n }\n if (isset($value['expires'])) {\n if (is_string($value['expires'])) {\n $timestamp = strtotime($value['expires']);\n } else {\n $timestamp = (int) $value['expires'];\n }\n if ($timestamp !== 0) {\n $expires = '; expires=' . gmdate('D, d-M-Y H:i:s e', $timestamp);\n }\n }\n if (isset($value['secure']) && $value['secure']) {\n $secure = '; secure';\n }\n if (isset($value['httponly']) && $value['httponly']) {\n $httponly = '; HttpOnly';\n }\n $cookie = sprintf('%s=%s%s', urlencode($name), urlencode((string) $value['value']), $domain . $path . $expires . $secure . $httponly);\n } else {\n $cookie = sprintf('%s=%s', urlencode($name), urlencode((string) $value));\n }\n //Set cookie header\n if (!isset($header['Set-Cookie']) || $header['Set-Cookie'] === '') {\n $header['Set-Cookie'] = $cookie;\n } else {\n $header['Set-Cookie'] = implode(\"\\n\", array($header['Set-Cookie'], $cookie));\n }\n }", "title": "" }, { "docid": "61301d5d81bc7b0280f2eb4837c06473", "score": "0.5812908", "text": "function _processHeader($header)\n {\n if (false === strpos($header, ':')) {\n return;\n }\n list($headername, $headervalue) = explode(':', $header, 2);\n $headername = strtolower($headername);\n $headervalue = ltrim($headervalue);\n \n if ('set-cookie' != $headername) {\n if (isset($this->_headers[$headername])) {\n $this->_headers[$headername] .= ',' . $headervalue;\n } else {\n $this->_headers[$headername] = $headervalue;\n }\n } else {\n $this->_parseCookie($headervalue);\n }\n }", "title": "" }, { "docid": "2521b90be5f45dbc4c119ef3591f9662", "score": "0.5644076", "text": "function _parseCookie($headervalue)\n {\n $cookie = array(\n 'expires' => null,\n 'domain' => null,\n 'path' => null,\n 'secure' => false\n );\n\n // Only a name=value pair\n if (!strpos($headervalue, ';')) {\n $pos = strpos($headervalue, '=');\n $cookie['name'] = trim(substr($headervalue, 0, $pos));\n $cookie['value'] = trim(substr($headervalue, $pos + 1));\n\n // Some optional parameters are supplied\n } else {\n $elements = explode(';', $headervalue);\n $pos = strpos($elements[0], '=');\n $cookie['name'] = trim(substr($elements[0], 0, $pos));\n $cookie['value'] = trim(substr($elements[0], $pos + 1));\n\n for ($i = 1; $i < count($elements); $i++) {\n if (false === strpos($elements[$i], '=')) {\n $elName = trim($elements[$i]);\n $elValue = null;\n } else {\n list ($elName, $elValue) = array_map('trim', explode('=', $elements[$i]));\n }\n $elName = strtolower($elName);\n if ('secure' == $elName) {\n $cookie['secure'] = true;\n } elseif ('expires' == $elName) {\n $cookie['expires'] = str_replace('\"', '', $elValue);\n } elseif ('path' == $elName || 'domain' == $elName) {\n $cookie[$elName] = urldecode($elValue);\n } else {\n $cookie[$elName] = $elValue;\n }\n }\n }\n $this->_cookies[] = $cookie;\n }", "title": "" }, { "docid": "b40e2c18bfd5ad5d3638e0fbc8dfa304", "score": "0.55936587", "text": "protected function renewIdentityCookie() {\n $name = $this->identityCookie['name'];\n $value = Yii::$app->getRequest()->getCookies()->getValue($name);\n if ($value !== null) {\n $data = json_decode($value, true);\n if (is_array($data) && isset($data[3])) {\n $cookie = new Cookie($this->identityCookie);\n $cookie->value = $value;\n $cookie->expire = time() + (int) $data[3];\n Yii::$app->getResponse()->getCookies()->add($cookie);\n }\n }\n }", "title": "" }, { "docid": "3e31165c11ae38dcb388d3be1934c8c8", "score": "0.5588655", "text": "function _getCookies(){\n $headers = '';\n foreach ($this->cookies as $key => $val){\n $headers .= \"$key=$val; \";\n }\n $headers = substr($headers, 0, -2);\n if ($headers) $headers = \"Cookie: $headers\".HTTP_NL;\n return $headers;\n }", "title": "" }, { "docid": "80fe33f412d90e8fd735135d733a48aa", "score": "0.5492275", "text": "public static function setCookieJar($cookie) {\n \n }", "title": "" }, { "docid": "f4b1a2aeba1bebc1d967dcf217002ae9", "score": "0.54641026", "text": "public function parse_hdr($conn, $hdr)\n {\n list($key, $value) =\n array_pad(array_map('trim', explode(':', $hdr, 2)), 2, null);\n $key = $this->prepare_header_key($key);\n if (null !== $value) {\n if ('Set-Cookie' == $key) {\n $crumbs = array();\n foreach (explode(';', $value) as $s) {\n $s = array_map('trim', explode('=', $s, 2));\n $crumbs[$s[0]] = @$s[1];\n }\n reset($crumbs);\n list($k, $v) = each($crumbs);\n if (empty($crumbs['domain'])) {\n $u = parse_url($this->last_url());\n $crumbs['domain'] = $u['host'];\n }\n if ('deleted' == $v) {\n unset($this->cookies[$k][$crumbs['domain']]);\n } else {\n $this->cookies[$k][$crumbs['domain']] = array(\n 'value' => $v,\n 'expires' => strtotime(@$crumbs['expires']),\n );\n }\n } else {\n $this->_resp_hdr[$key] = $value;\n #print \"key: $key :: value:: $value\";\n }\n }\n return strlen($hdr);\n }", "title": "" }, { "docid": "d20617c9bcc9540775ba428e787806da", "score": "0.54640806", "text": "public function __setCookie($name, $value = false);", "title": "" }, { "docid": "d7da8dade42b495044cf6f32bd36ab7f", "score": "0.54621357", "text": "public function set_cookies($data){\n\t\t$cookies = '';\n\t\tforeach($data as $key=>$val){\n\t\t\t$cookies .= $key.'='.urlencode($val).';';\n\t\t}\n\t\t\n\t\t$this->cookies = \"Cookie: \".$cookies.\"\\r\\n\";\n\t\t\n\t\treturn $this->cookies;\n\t}", "title": "" }, { "docid": "1037fb5227ec7e9a57d88deb5f2ecf31", "score": "0.54552144", "text": "public function testSetCookie()\n {\n $this->_response->setCookie('test_cookie', 'hey cookie');\n $expected = array('value' => 'hey cookie',\n 'expiration' => '0',\n 'path' => '/');\n $this->assertEquals($expected, $this->_response->getCookie('test_cookie'));\n }", "title": "" }, { "docid": "ef3b3c528bd49acc48d26d773b4223ef", "score": "0.5433658", "text": "function setCookie($key, $value) {\n if(is_null($value)) {\n unSet($this->cookies[$key]);\n } else {\n $this->cookies[$key] = $value;\n }\n }", "title": "" }, { "docid": "fdd459313829023c1dd2215ee8b47c1d", "score": "0.54211265", "text": "protected function parseCookie(string $header): array\n {\n list($void, $cookie) = explode('Set-Cookie: ', $header);\n $cookie = explode('; ', $cookie);\n // Parse the name and value\n list($name, $value) = explode('=', array_shift($cookie), 2);\n $out = [\n 'name' => $name,\n 'value' => rawurldecode($value),\n 'expires' => null,\n 'path' => null,\n 'domain' => null,\n ];\n // Parse additional settings. e.g Domain,Path,Expires etc\n foreach ($cookie as $attr) {\n if (strpos($attr, '=') !== false) {\n list($key, $v) = explode('=', $attr, 2);\n if ($key === 'expires') {\n $v = strtotime($v);\n }\n $out[strtolower($key)] = $v;\n } else {\n $out[] = $attr;\n }\n }\n\n return $out;\n }", "title": "" }, { "docid": "a309527b74d183e720144c47cf91a3b7", "score": "0.5417665", "text": "protected function makeCookie()\n {\n return empty($this->id) ? '' : $this->_getCookieHash();\n }", "title": "" }, { "docid": "984a7713e9ef0473919599c00af27eea", "score": "0.5390053", "text": "public static function parseCookieHeader($header)\n {\n $cookies = array();\n $header = rtrim($header, \"\\r\\n\");\n $headerPieces = preg_split('@\\s*[;,]\\s*@', $header);\n foreach ($headerPieces as $c) {\n $cParts = explode('=', $c, 2);\n if (count($cParts) === 2) {\n $key = urldecode($cParts[0]);\n $value = urldecode($cParts[1]);\n if (!isset($cookies[$key])) {\n $cookies[$key] = $value;\n }\n }\n }\n\n return $cookies;\n }", "title": "" }, { "docid": "62cfcecf9033c0fe61255e6414146f06", "score": "0.5386632", "text": "function parse( $cookie_str, $host ) {\r\n\t\t\t$cookie_str = str_replace( '; ', ';', $cookie_str ) . ';';\r\n\t\t\t$data = explode( ';', $cookie_str );\r\n\t\t\t$value_str = $data[0];\r\n\r\n\t\t\t$cookie_param = 'domain=';\r\n\t\t\t$start = strpos( $cookie_str, $cookie_param );\r\n\t\t\tif ( $start > 0 ) {\r\n\t\t\t\t$domain = substr( $cookie_str, $start + strlen( $cookie_param ) );\r\n\t\t\t\t$domain = substr( $domain, 0, strpos( $domain, ';' ) );\r\n\t\t\t} else\r\n\t\t\t\t$domain = $host;\r\n\r\n\t\t\t$cookie_param = 'expires=';\r\n\t\t\t$start = strpos( $cookie_str, $cookie_param );\r\n\t\t\tif ( $start > 0 ) {\r\n\t\t\t\t$expires = substr( $cookie_str, $start + strlen( $cookie_param ) );\r\n\t\t\t\t$expires = substr( $expires, 0, strpos( $expires, ';' ) );\r\n\t\t\t} else\r\n\t\t\t\t$expires = '';\r\n\t\t\t\r\n\t\t\t$cookie_param = 'path=';\r\n\t\t\t$start = strpos( $cookie_str, $cookie_param );\r\n\t\t\tif ( $start > 0 ) {\r\n\t\t\t\t$path = substr( $cookie_str, $start + strlen( $cookie_param ) );\r\n\t\t\t\t$path = substr( $path, 0, strpos( $path, ';' ) );\r\n\t\t\t} else\r\n\t\t\t\t$path = '/';\r\n\t\t\t\t\t\t\t\r\n\t\t\t$sep_pos = strpos( $value_str, '=');\r\n\t\t\t\r\n\t\t\tif ($sep_pos){\r\n\t\t\t\t$name = substr( $value_str, 0, $sep_pos );\r\n\t\t\t\t$value = substr( $value_str, $sep_pos+1 );\r\n\t\t\t\t$this->set( $name, $value, $domain, $path, $expires );\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "f634d0983a8869244611f54db175c093", "score": "0.53567845", "text": "function prso_set_cookie( $name = null, $value = null, $timestamp = null ) {\n\n\t//vars\n\t$cookie_expires = null;\n\n\t//If no timestamp provided default to session cookie\n\tif ( ! empty( $timestamp ) ) {\n\t\t$cookie_expires = date( 'D, d M Y H:i:s e', $timestamp );\n\t}\n\n\t$site_url = get_site_url();\n\n\t//Remove http to get just domain\n\t$find = array( 'http://', 'https://' );\n\t$replace = '';\n\t$site_domain = str_replace( $find, $replace, $site_url );\n\n\t$cookie_header = 'Set-Cookie: ' . esc_attr( $name ) . '=' . esc_attr( $value ) . '; path=/; domain=' . $site_domain . '; Expires=' . $cookie_expires . '; HttpOnly; Secure; SameSite=Strict';\n\n\theader( $cookie_header );\n}", "title": "" }, { "docid": "897a54ff7cef5b40b68be54a5c54f7a0", "score": "0.5314658", "text": "function convertToCookie() {\n $cookieData = array();\n $longNames = array_flip(self::$shortNames);\n\n foreach ($this->data as $key => $value) {\n if (is_null($value) || !($key = \\RightNow\\Utils\\Text::getSubstringAfter($key, self::NEW_DATA))) continue;\n\n if ($shortName = $longNames[$key]) {\n $key = $shortName;\n }\n\n // using urlencode/decode because json_encode doesn't support JSON_UNESCAPED_UNICODE until PHP v5.4\n $cookieData[$key] = urlencode($value);\n }\n\n return $cookieData;\n }", "title": "" }, { "docid": "cd8d53909cc3f2b2dd1730eb1970a5ee", "score": "0.5282232", "text": "public function unsetMagicInCookie() {\n\t\t//TODO: DI for cookies and IRequest\n\t\t$secureCookie = OC::$server->getRequest()->getServerProtocol() === 'https';\n\n\t\tunset($_COOKIE['nc_username']); //TODO: DI\n\t\tunset($_COOKIE['nc_token']);\n\t\tunset($_COOKIE['nc_session_id']);\n\t\tsetcookie('nc_username', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT, '', $secureCookie, true);\n\t\tsetcookie('nc_token', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT, '', $secureCookie, true);\n\t\tsetcookie('nc_session_id', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT, '', $secureCookie, true);\n\t\t// old cookies might be stored under /webroot/ instead of /webroot\n\t\t// and Firefox doesn't like it!\n\t\tsetcookie('nc_username', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', '', $secureCookie, true);\n\t\tsetcookie('nc_token', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', '', $secureCookie, true);\n\t\tsetcookie('nc_session_id', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', '', $secureCookie, true);\n\t}", "title": "" }, { "docid": "1ae177a20333e7f91567c95adb88267c", "score": "0.52625465", "text": "function addCookie($name, $value)\n {\n $cookies = isset($this->_requestHeaders['cookie']) ? $this->_requestHeaders['cookie']. '; ' : '';\n $this->addHeader('Cookie', $cookies . $name . '=' . $value);\n }", "title": "" }, { "docid": "f4df6199ccce2a156e792f13d6e8d45c", "score": "0.52493215", "text": "public function setCookie()\n {\n setcookie($this->name, $this->value, $this->expire, $this->path, $this->domain, $this->secure, $this->httpOnly);\n }", "title": "" }, { "docid": "2eb991a53bb3c3b3271bd5a30d64a84c", "score": "0.5240216", "text": "private function setProxyUser()\n {\n $request = Request::createFromGlobals();\n $switchUser = $request->headers->get('switch-user');\n if (trim($switchUser) != \"\") {\n $proxyUserObj = $this->container->get('proxy_user');\n if ($proxyUserObj) {\n $this->container->get(UploadConstant::SECURITY_CONTEXT)\n ->getToken()\n ->setUser($proxyUserObj);\n }\n }\n }", "title": "" }, { "docid": "9133a4c55fda8d047cc23f0d19736e45", "score": "0.5226549", "text": "private function _saveShoppingCartCookie($value)\n {\n $header = new SetCookie();\n $header->setName(self::SHOPPING_CART_COOKIE)\n ->setValue($value)\n ->setPath('/')\n ->setHttpOnly(true)\n ->setExpires(time() + (int) SettingService::getSetting('payment_shopping_cart_session_time'));\n\n $this->serviceLocator->get('Response')->getHeaders()->addHeader($header);\n }", "title": "" }, { "docid": "c9bb625e40c1dc3ae91337b8b6f8d783", "score": "0.5217623", "text": "private function setPassport() {\r\n\r\n\t\t$randString\t= rand(0, 99999) . $_SERVER['REQUEST_TIME'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'];\r\n\t\t$firstPart\t= substr(md5($randString), 0, 8);\r\n\r\n\t\t$fromString\t= $this->getId() . $firstPart . $this->passportToken;\r\n\t\t$secondPart\t= substr(md5($fromString), 0, 8);\r\n\r\n\t\t$setString\t= $firstPart . $secondPart . $this->getId();\r\n\r\n\t\t$response\t= $this->getContext()->getResponse();\r\n\t\t$response->setCookie($this->passportName, $setString, 1577808000);\t// 1577808000 = 2020-01-01\r\n\r\n\t}", "title": "" }, { "docid": "b3d2471357961d3a2458cbdc8ca5bcdc", "score": "0.5202678", "text": "protected function HttpCookieHeaderValue($obibaId = NULL, $micaId = NULL) {\n $cookie_parts = array();\n\n if (isset($obibaId)) {\n $cookie_parts[] = self::OBIBA_COOKIE . '=' . $obibaId;\n }\n\n if (isset($micaId)) {\n $cookie_parts[] = self::MICA_COOKIE . '=' . $micaId;\n }\n\n return implode(\"; \", $cookie_parts);\n }", "title": "" }, { "docid": "5f0398a5e6a8b147fa1efa2eaff0b6d6", "score": "0.5201985", "text": "function decode_http_cookie(){\n\n\t// 2 fucking days spent figuring this out... suhosin.cookie.max_name_length\n\t$http_cookie = $_SERVER['HTTP_COOKIE'];\n\t$cookie_pairs = array();\n\t\n\tif(preg_match_all('@'.COOKIE_PREFIX.'(.+?)__(.+?)=([^;]+)@', $http_cookie, $matches, PREG_SET_ORDER)){\n\t\n\t\tforeach($matches as $match){\n\t\t\n\t\t\t$domain = $match[1];\n\t\t\t$domain = str_replace(\"_\", \".\", $domain);\n\t\t\t\n\t\t\t$name = $match[2];\n\t\t\t$value = $match[3];\n\t\t\t\n\t\t\t// does that cookie belong to that domain\n\t\t\tif(strpos(URL_HOST, $domain) !== false){\n\t\t\t\t$cookie_pairs[] = \"{$name}={$value}\";\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn \"Cookie: \".implode(\"; \", $cookie_pairs);\n}", "title": "" }, { "docid": "aa029f44b60956299a6bc78bb11830be", "score": "0.51938576", "text": "protected function parseCookies ()\n {\n $cookie = '';\n\n foreach( $this->cookies as $name => $value )\n $cookie .= $name . '=' . $value . '; ';\n\n return rtrim( $cookie, ';' );\n }", "title": "" }, { "docid": "307379e70b069217197c8210de8b7f85", "score": "0.5190191", "text": "private function setCookie($cookie)\n { \n if (!is_null($cookie)) {\n setcookie(self::TOKEN_COOKIE, $cookie, 0, '/', $this->getCookieDomain(), $this->debug ? false: true);\n $this->debug('Setting cookie '.$cookie);\n }\n }", "title": "" }, { "docid": "4f1fa7b18c68a7f43fe7314234ce84e6", "score": "0.51724637", "text": "public function set_customer_session_cookie( $set ) {\r\n\t\tif ( $set ) {\r\n\t\t\t$to_hash = $this->_customer_id . '|' . $this->_session_expiration;\r\n\t\t\t$cookie_hash = hash_hmac( 'md5', $to_hash, wp_hash( $to_hash ) );\r\n\t\t\t$cookie_value = $this->_customer_id . '||' . $this->_session_expiration . '||' . $this->_session_expiring . '||' . $cookie_hash;\r\n\t\t\t$this->_has_cookie = true;\r\n\r\n\t\t\tif ( ! isset( $_COOKIE[ $this->_cookie ] ) || $_COOKIE[ $this->_cookie ] !== $cookie_value ) {\r\n\t\t\t\tlw_setcookie( $this->_cookie, $cookie_value, $this->_session_expiration, $this->use_secure_cookie(), true );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "12298d9a59987370835e9acfcb7e06bd", "score": "0.51667833", "text": "public function setThirdPartyCookie($idVisitor)\n {\n if (!$this->shouldUseThirdPartyCookie()) {\n return;\n }\n\n Common::printDebug(\"We manage the cookie...\");\n\n $cookie = $this->makeThirdPartyCookieUID();\n // idcookie has been generated in handleNewVisit or we simply propagate the old value\n $cookie->set(0, bin2hex($idVisitor));\n $cookie->save();\n }", "title": "" }, { "docid": "90b78838fd365a6cb2613274564da4ab", "score": "0.51647353", "text": "public function setRequestCookie($option, $value = null)\n {\n if (!is_array($option)) {\n $option = [$option => $value];\n }\n\n return $this->setCurlOpt(CURLOPT_COOKIE, http_build_query($option, '', '; '));\n }", "title": "" }, { "docid": "32824985bdd007c4b345773222493c11", "score": "0.51645696", "text": "public function testPullCookie()\n {\n $_COOKIE[Cookie::$prefix . 'cookie_name'] = 'value';\n\n $this->assertContains(Cookie::pull('cookie_name'), 'value');\n }", "title": "" }, { "docid": "323d1f267dbd7ddb2e9be199516fca5d", "score": "0.5160481", "text": "public function setIdentity(){\n\t\t$time = time() + $this->tmp;\n\t\t$this->time = $time;\n\t\t\n\t\tsetcookie($this->cookieUsr, $this->username, $this->time); // <------- Username\n\t\tsetcookie($this->cookiePass, $this->password, $this->time); // <------- Password\n\t}", "title": "" }, { "docid": "ecc664d5fd859e6de94b067e5a5ba297", "score": "0.5157527", "text": "function s_addCookie($name,$value) {\r\n\t\t//*** Cleaning name\r\n\t\t$name = preg_replace(\"/[=,; \\t\\r\\n\\013\\014]/\", '', $name);\r\n\r\n\t\t//*** Storing cookie value\r\n\t\t$this->output['cookies'][$name] = $value;\r\n\t}", "title": "" }, { "docid": "8a76778f43d90b3c437cbaba63430d86", "score": "0.5151232", "text": "function http_parse_cookie($cookie, $flags = null, array $allowed_extras = null)\n {\n }", "title": "" }, { "docid": "553fbd282ad2dcb4e64da7efd73a5d55", "score": "0.51496595", "text": "private function getAuthCookie() {\n\t\treturn $this->headers->getCookie('AuthenticationTicket');\n\t}", "title": "" }, { "docid": "babf48a25825446d5fcc9f9699c34c86", "score": "0.5134864", "text": "function convertToCookie()\n {\n $cookieArray = self::getCookieData();\n foreach ($this->mapping as $cookieName => $memberName)\n {\n if ($this->$memberName)\n $cookieArray[$cookieName] = $this->$memberName;\n }\n return $cookieArray;\n }", "title": "" }, { "docid": "1fa30cd875db01dddb7df7d13abadb57", "score": "0.5126645", "text": "public function addCookieFromHeader(SetCookieHeader $header, HttpUri $defaultUri = null)\n {\n if (! $defaultUri) {\n $defaultUri = new HttpUri('/');\n }\n\n $cookieId = $this->getCookieId($header);\n $this->cookies[$cookieId] = $header;\n\n $cookieDomain = $header->getDomain() ?: $defaultUri->getHost();\n if (! isset($this->cookieRefs[$cookieDomain])) {\n $this->cookieRefs[$cookieDomain] = new ArrayObject();\n }\n\n $domain = $this->cookieRefs[$cookieDomain]; /* @var $domain \\ArrayObject */\n\n $path = $header->getPath() ?: $defaultUri->getPath();\n\n if (! isset($domain[$path])) {\n $domain[$path] = new ArrayObject();\n }\n $cookieRefs = $domain[$path];\n $cookieRefs[$header->getName()] = $cookieId;\n\n return $this;\n }", "title": "" }, { "docid": "eb53f199c8188a58476fa255914e37c6", "score": "0.5091453", "text": "public static function serializeCookies(Headers &$header)\n {\n $instance = static::singleton();\n $config = Config::singleton();\n $cookies = $instance->cookies();\n $prefix = $config->get('cookie_encrypt_prefix', 'enc|');\n (is_string($prefix) && trim($prefix)) || $prefix = 'enc|';\n $config->cookie_encrypt = $config->get('cookie_encrypt', true);\n foreach ($cookies as $name => $settings) {\n if (is_string($settings['expires'])) {\n $expires = strtotime($settings['expires']);\n } else {\n $expires = (int) $settings['expires'];\n }\n\n /**\n * Check if is has encrypted value\n * if config cookie encrypt has true\n * and\n * (__ settings['encrypted'] = has null or not exists)\n * or not empty $settings['encrypted']\n * @var boolean\n */\n if (! empty($settings['encrypted']) || $config->cookie_encrypt && ! isset($settings['encrypted'])) {\n // add prefix enc to make sure if cookie has encrypt\n $settings['value'] = $prefix.Security::encrypt(\n $settings['value'],\n Sha1::hash(\n $config->security_key\n .$config->security_salt\n .$config->session_hash\n )\n );\n }\n /**\n * Cookie only accept 4KB\n */\n if (strlen($settings['value']) > 4096) {\n ErrorHandler::set(\n E_USER_WARNING,\n sprintf(\n 'Cookie %s has been generate more than 4KB failed to save! if there was cookie before, it will be not replaced!',\n $name\n ),\n __FILE__,\n __LINE__\n );\n } else {\n // set header cookies\n static::setCookieHeader($header, $name, $settings);\n }\n }\n }", "title": "" }, { "docid": "351d8890249879b65735c1dc823aa99d", "score": "0.5087353", "text": "public function set(Cookie $cookie)\n {\n // Do setcookie()\n return $this->setCookie($cookie);\n }", "title": "" }, { "docid": "a883938514001a8644e250b33edeacfd", "score": "0.5071024", "text": "public function setCookie($name, $value = null) {\n if ($value === null) {\n $this->browser->removeCookie($name);\n }\n //TODO: set the cookie with domain, not with url, meaning www.aaa.com or .aaa.com\n if ($value !== null) {\n $urlData = parse_url($this->getCurrentUrl());\n $cookie = array(\"name\" => $name, \"value\" => $value, \"domain\" => $urlData[\"host\"]);\n $this->browser->setCookie($cookie);\n }\n }", "title": "" }, { "docid": "fef75fa1276c2bc1b633363bbba2674c", "score": "0.50640726", "text": "function setCookieJar($file){\n curl_setopt($this->ch,CURLOPT_COOKIEFILE,$file);\n curl_setopt($this->ch,CURLOPT_COOKIEJAR,$file);\n\n }", "title": "" }, { "docid": "74f1cd11717e7b407f8de6654eb15ecf", "score": "0.5060093", "text": "public function addCookie(Cookie $cookie): self;", "title": "" }, { "docid": "30b55a178f9c686cd58b671533105c50", "score": "0.50440437", "text": "protected function getCookieId(SetCookieHeader $header)\n {\n return $header->getName() . \",\" . $header->getDomain() . \",\" . $header->getPath();\n }", "title": "" }, { "docid": "15f9dd32c4bc1118c43f92222bf10c81", "score": "0.5040083", "text": "private function set_download_cookie() {\n\t\t$token = $this->get_param( 'packlink_download_token' );\n\t\tsetcookie( 'packlink_download_token', $token, time() + 3600, '/' );\n\t}", "title": "" }, { "docid": "15f9dd32c4bc1118c43f92222bf10c81", "score": "0.5040083", "text": "private function set_download_cookie() {\n\t\t$token = $this->get_param( 'packlink_download_token' );\n\t\tsetcookie( 'packlink_download_token', $token, time() + 3600, '/' );\n\t}", "title": "" }, { "docid": "a3f6a2e7775e72e270963387f5c5133f", "score": "0.50328875", "text": "function _parseResponse($response) {\n\t\t$headers = substr($response, 0, strpos($response, \"\\r\\n\\r\\n\"));\n\t\t$body = substr($response, strlen($headers));\n\n\t\t//split up the headers\n\t\t$parts = preg_split(\"/\\r?\\n/\", $headers, -1, PREG_SPLIT_NO_EMPTY);\n\t\t$heads = array();\n\t\tfor ($i = 1, $total = sizeof($parts); $i < $total; $i++ ) {\n\t\t\tlist($name, $value) = explode(': ', $parts[$i]);\n\t\t\t$heads[$name] = $value;\n\t\t}\n\n\t\tif (array_key_exists('Set-Cookie', $heads)) {\n\t\t\t// Save cookies\n\n\t\t\t$cookies = array();\n\t\t\tforeach ($heads as $headerKey => $headerValue) {\n\t\t\t\tif ($headerKey == 'Set-Cookie') {\n\t\t\t\t\t$parts = split('; ', $headerValue);\n\n\t\t\t\t\t$cookieKey = '';\n\t\t\t\t\tforeach ($parts as $index => $part) {\n\t\t\t\t\t\tlist($key, $value) = split('=', $part);\n\n\t\t\t\t\t\tif ($index == 0) {\n\t\t\t\t\t\t\t$cookieKey = $key;\n\t\t\t\t\t\t\t$cookies[$cookieKey]['value'] = $value;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$cookies[$cookieKey][$key] = $value;\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$this->cookies = $cookies;\n\t\t}\n\n\t\t$this->response['headers'] = $heads;\n\t\t$this->response['body'] = trim($body);\n\t}", "title": "" }, { "docid": "6724d2c81bbea583957053a453ac7c57", "score": "0.5026678", "text": "public static function createFromHeaderString(string $cookie, array $defaults = []): static\n {\n if (str_contains($cookie, '\";\"')) {\n $cookie = str_replace('\";\"', '{__cookie_replace__}', $cookie);\n $parts = str_replace('{__cookie_replace__}', '\";\"', explode(';', $cookie));\n } else {\n $parts = preg_split('/\\;[ \\t]*/', $cookie) ?: [];\n }\n\n [$name, $value] = explode('=', (string)array_shift($parts), 2);\n $data = [\n 'name' => urldecode($name),\n 'value' => urldecode($value),\n ] + $defaults;\n\n foreach ($parts as $part) {\n if (str_contains($part, '=')) {\n [$key, $value] = explode('=', $part);\n } else {\n $key = $part;\n $value = true;\n }\n\n $key = strtolower($key);\n $data[$key] = $value;\n }\n\n if (isset($data['max-age'])) {\n $data['expires'] = time() + (int)$data['max-age'];\n unset($data['max-age']);\n }\n\n // Ignore invalid value when parsing headers\n // https://tools.ietf.org/html/draft-west-first-party-cookies-07#section-4.1\n if (isset($data['samesite'])) {\n try {\n $data['samesite'] = static::resolveSameSiteEnum($data['samesite']);\n } catch (ValueError) {\n unset($data['samesite']);\n }\n }\n\n $name = $data['name'];\n $value = $data['value'];\n assert(is_string($name) && is_string($value));\n unset($data['name'], $data['value']);\n\n return Cookie::create(\n $name,\n $value,\n $data\n );\n }", "title": "" }, { "docid": "b047635c76dc1a9059121412684d6781", "score": "0.5020415", "text": "public function setCookie($name, $value) \r\n {\r\n \t$this->cookies[] = $name . '=' . $value;\r\n }", "title": "" }, { "docid": "7f132c38c445190d7a1fecdceb8494ec", "score": "0.5019676", "text": "function backend_login($name, $pw)\r\n{\r\n\t$url = 'https://vitasa.abandonedfactory.net/login';\r\n\r\n\t$body = json_encode(array( 'email' => $name, 'password' => $pw ));\r\n\r\n\t$ch = curl_init();\r\n\tcurl_setopt($ch, CURLOPT_URL, $url);\r\n\tcurl_setopt($ch, CURLOPT_POST, true);\r\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $body);\r\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json', 'Content-Type: application/json'));\r\n\tcurl_setopt($ch, CURLOPT_HEADER, TRUE);\r\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\r\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\r\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\r\n\t//curl_setopt($ch, CURLOPT_COOKIE, $token);\r\n\t$response = curl_exec($ch);\r\n\t$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n\t//$cookies = curl_getinfo($ch, CURLINFO_COOKIELIST); didn't return anything...\r\n\tcurl_close($ch);\r\n\r\n\t$token = '';\r\n\tif ($httpCode != 200)\r\n\t\treturn $token;\r\n\r\n\t// todo: there has to be a better way of cracking the response...\r\n\t// extract the Set-Cookie value from the response\r\n\t$ix = strpos($response, 'Set-Cookie:'); // find the cookie in the stream\r\n\t$str1 = substr($response, $ix); // get the string from that index to the end\r\n\t$iy = strpos($str1, ';'); // find the end of the cookie\r\n\t$str2 = substr($str1, 0, $iy); // get from the start (Set-Cookie) to the ';'\r\n\t$ia = strlen('Set-Cookie: ');\r\n\t// and finally, get the token\r\n\t$token = substr($str2, $ia); // remove the prefix and the rest is out token\r\n\r\n\t$ix = strpos($response, '{'); // find the open-curl brace, that starts our data\r\n\t$jb = substr($response, $ix); // get just that portion\r\n\r\n\t$user = json_decode($jb); // and decode our user from that text\r\n\r\n\t// we only accept users that have admin priviledge\r\n\tif (!userHasAdmin($user))\r\n\t\t$token = '';\r\n\r\n\treturn $token;\r\n}", "title": "" }, { "docid": "1cc0ce06b979898e08a46cfadbc759c7", "score": "0.50195515", "text": "function cookieSet($val){\n\tsetcookie(\"md5\",$val,time()+(10*365*24*60*60));\n}", "title": "" }, { "docid": "946b6dc06ad4bb287a2286d4fe274f47", "score": "0.5008647", "text": "function assignCookie($cookiename,$cookievalue,$lifespan=false) {\n if (!$lifespan) $lifespan = time()+60*60*24*180; // 180 days by default\n setcookie($cookiename,$cookievalue,$lifespan);\n $_COOKIE[$cookiename]=$cookievalue;\n}", "title": "" }, { "docid": "97e2d5352a9182bd9e1e4e716014c7f6", "score": "0.5004759", "text": "private function sendCookie(): void\n\t{\n\t\t$cookie = session_get_cookie_params();\n\t\t$this->response->setCookie(\n\t\t\tsession_name(), session_id(),\n\t\t\t$cookie['lifetime'] ? $cookie['lifetime'] + time() : 0,\n\t\t\t$cookie['path'], $cookie['domain'], $cookie['secure'], $cookie['httponly'], $cookie['samesite'] ?? null\n\t\t);\n\t}", "title": "" }, { "docid": "9d06518488d56e009788b02e19a6bea5", "score": "0.50008583", "text": "public function setAuthToken($token){\n\n $cookie_name = \"authToken\";\n $cookie_value = $token;\n setcookie($cookie_name, $cookie_value, time() + (86400 / 24), \"/\");\n \n }", "title": "" }, { "docid": "c4f5188b4489267fdfe8635a0dd55c54", "score": "0.49967375", "text": "protected function setCookieToHeader(string $cookie): bool\n {\n if (!\\headers_sent() && !empty($cookie)) {\n\n \\header($cookie, false);\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "587bbb699f98d8c1da09002e7a691197", "score": "0.49789342", "text": "function send_header($ch, $string){\t\r\n\t\t$length = strlen($string);\r\n\t\tif(!strncmp($string, \"Location:\", 9))\r\n\t\t{\r\n\t\t $this->location = trim(substr($string, 9, -1));\r\n\t\t}\r\n\t\t$cookie = \"\";\r\n\t\tif(trim($string) == \"\") \r\n\t\t{\r\n\t\t\t$cookie .= file_get_contents('cookie.txt');\r\n\t\t\tcurl_setopt($ch, CURLOPT_COOKIE, $cookie);\r\n\t\t}\r\n\t\treturn $length;\r\n\t}", "title": "" }, { "docid": "b042c1ba7d4b7e8b2e3d8aac29e1d3c6", "score": "0.49768856", "text": "public static function setClientIDCookie(AphrontRequest $request) {\n\n // NOTE: See T3471 for some discussion. Some browsers and browser extensions\n // can make duplicate requests, so we overwrite this cookie only if it is\n // not present in the request. The cookie lifetime is limited by making it\n // temporary and clearing it when users log out.\n\n $value = $request->getCookie(self::COOKIE_CLIENTID);\n if ($value === null || !strlen($value)) {\n $request->setTemporaryCookie(\n self::COOKIE_CLIENTID,\n Filesystem::readRandomCharacters(16));\n }\n }", "title": "" }, { "docid": "51d6c67b0f393ee5d28906cf00bb2545", "score": "0.497545", "text": "public function cookie($key);", "title": "" }, { "docid": "3ef9b1de1435cb96d0baf8c34eb07d95", "score": "0.49666077", "text": "protected function getCookie() {\n\t\t$cookieValue = '';\n\t\tif (isset($_SERVER['HTTP_COOKIE'])) {\n\t\t\t$cookies = GeneralUtility::trimExplode(';', $_SERVER['HTTP_COOKIE']);\n\t\t\tforeach ($cookies as $cookie) {\n\t\t\t\tlist($name, $value) = GeneralUtility::trimExplode('=', $cookie);\n\t\t\t\tif (trim($name) === self::COOKIE_NAME) {\n\t\t\t\t\t// Use the last one\n\t\t\t\t\t$cookieValue = urldecode($value);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// Fallback if there is no HTTP_COOKIE, use original method:\n\t\t\t$cookieValue = isset($_COOKIE[self::COOKIE_NAME]) ? stripslashes($_COOKIE[self::COOKIE_NAME]) : '';\n\t\t}\n\n\t\treturn $cookieValue;\n\t}", "title": "" }, { "docid": "f37d4d7695748dba5ccf60e6391f0e88", "score": "0.49624714", "text": "public function seckitFromOrigin() {\n $value = $this->config->get('seckit_various.from_origin_destination');\n $this->response->headers->set('From-Origin', $value);\n }", "title": "" }, { "docid": "bbea46af9f7f45e7d47f97dc0afe3d8e", "score": "0.4940691", "text": "public function setHeader($header);", "title": "" }, { "docid": "bbea46af9f7f45e7d47f97dc0afe3d8e", "score": "0.4940691", "text": "public function setHeader($header);", "title": "" }, { "docid": "1610aa0857e28d3abd79a57a240bf50c", "score": "0.492803", "text": "private function setTargetGroupCookie(Response $response, Request $request)\n {\n $response->headers->setCookie(\n new Cookie(\n static::TARGET_GROUP_COOKIE,\n $request->headers->get(static::TARGET_GROUP_HEADER),\n static::TARGET_GROUP_COOKIE_LIFETIME\n )\n );\n\n $response->headers->setCookie(\n new Cookie(\n static::VISITOR_SESSION_COOKIE,\n time()\n )\n );\n }", "title": "" }, { "docid": "fab45a9df3a3fcbf52d3f5be86074085", "score": "0.49266586", "text": "final public static function setCookie(string $key,$value):void\n {\n Arrs::setRef($key,$value,$_COOKIE);\n }", "title": "" }, { "docid": "cb7afbcc1e4439ac876bdc5bddc9519b", "score": "0.49196586", "text": "private function parseCookieHeader(string $cookieHeader): array\n {\n preg_match_all('(\n (?:^\\\\n?[ \\t]*|[;:][ ])\n (?P<name>[!#$%&\\'*+-.0-9A-Z^_`a-z|~]+)\n =\n (?P<DQUOTE>\"?)\n (?P<value>[\\x21\\x23-\\x2b\\x2d-\\x3a\\x3c-\\x5b\\x5d-\\x7e]*)\n (?P=DQUOTE)\n (?=\\\\n?[ \\t]*$|;[ ])\n )x', $cookieHeader, $matches, PREG_SET_ORDER);\n\n $cookies = [];\n\n foreach ($matches as $match) {\n $cookies[$match['name']] = urldecode($match['value']);\n }\n\n return $cookies;\n }", "title": "" }, { "docid": "56f95cb37d8a03cbdeae21459d4dad4b", "score": "0.4916938", "text": "public function addCookie(Cookie ...$cookies): void;", "title": "" }, { "docid": "d1cc9743c5fe030d77f5a2e88b9f7f38", "score": "0.4915681", "text": "function ci_setcookie( $name, $value, $expire = 0, $secure = false ) {\n if ( ! headers_sent() ) {\n setcookie( $name, $value, $expire, COOKIEPATH ? COOKIEPATH : '/', COOKIE_DOMAIN, $secure);\n } elseif ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {\n trigger_error( $name . \"cookie cannot be set - headers already sent\", E_USER_NOTICE ); // WPCS: XSS ok.\n }\n}", "title": "" }, { "docid": "521b26b5254a6b00299aaf919d0f597e", "score": "0.4910031", "text": "function reference_set_cookie(){\n \t//pokud se pres tento prohlizec uz registroval, skonci\n\t\t\tif(isset($_COOKIE[$this->ref_test_nazev])){\n\t\t\t\tif($_COOKIE[$this->ref_test_nazev]==1){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} \t\n \tif(isset($_REQUEST[$this->ref_nazev]) && is_numeric($_REQUEST[$this->ref_nazev])){\n \t\t$_SESSION[$this->ref_nazev] = $_REQUEST[$this->ref_nazev];\n \t\t//nastaveni cookie\n \t\tsetcookie($this->ref_test_nazev, 1, time()+3600*24*10);\n \t}\n }", "title": "" }, { "docid": "9f44253b5c3e01f8def65cc1367fb363", "score": "0.4891945", "text": "function setCookie($name, $value = '', $expires = NULL, $httponly = false)\n\t{\n\t\tmy_setcookie($name, $value, $expires, $httponly);\n\t}", "title": "" }, { "docid": "f18c471e5fee81f6ba5588ac83c666e2", "score": "0.48860472", "text": "function util_set_cookie( $p_name, $p_value, $p_path=null, $p_domain=null ) {\n\n return setcookie( $p_name, $p_value, time() + COOKIE_EXPIRE_LENGTH, COOKIE_PATH, COOKIE_DOMAIN );\n}", "title": "" }, { "docid": "5cf9a613d332e5a82370dc4a15c7773b", "score": "0.4878577", "text": "public function getCookie()\n\t{\n\t\tif (empty($this->cookie_value) && isset($_COOKIE[$this->cookie_name]))\n\t\t{\n\t\t\t$this->cookie_value = $_COOKIE[$this->cookie_name];\n\t\t}\n\t\treturn $this->cookie_value;\n\t}", "title": "" }, { "docid": "3c24c9f2a0ea38b2e2e80a03de1e956b", "score": "0.48753414", "text": "public function addCookie(\\Http\\Cookie $cookie)\n {\n }", "title": "" }, { "docid": "c30779a293d32b87d964f253fa92923f", "score": "0.48724425", "text": "public function handle(Request $request, Closure $next)\n {\n $headers = $request->headers->all();\n\n $headers['cookie'][0] = urldecode($headers['cookie'][0]);\n\n $request->headers->replace($headers);\n\n return $next($request);\n }", "title": "" }, { "docid": "254445aa0dd8048551dfc5b6a73e5234", "score": "0.48700875", "text": "function http_socket_cookie_mysql_in ($temp) {\r\n\t\t $cookies = array();\r\n\t\t while ($t = mysql_fetch_array($temp)) {\r\n\t \t \t $tp = $t['name'];\r\n\t \t \t \tunset ($t['name']);\r\n\t \t \t \t$t['expires'] = gmdate(\"D, d-M-y H:i:s\",$t['expires']) . \" GMT\";\r\n\t\t \t \t$cookies[$tp] = $t;\r\n\t\t }\r\n\t\t return $cookies;\r\n}", "title": "" }, { "docid": "ff257d392ee60afe2912c341313eb7ff", "score": "0.48632392", "text": "function handleCookie($name)\n{\n\t# Check if the value should be set\n\tif ( isset($_REQUEST['set' . $name]) )\n\t{\n\t\t# Ensure the cookie is not set\n\t\tsetcookie($name, FALSE);\n\t\t\n\t\t# Set cookie\n\t\tsetcookie($name, $_REQUEST['set' . $name], time()+60*60*24*30);\n\t\t\n\t\t# Return the value it was set to\n\t\treturn $_REQUEST['set' . $name];\n\t}\n\t# Check if the cookie itself is available\n\telseif ( isset($_COOKIE[$name]) )\n\t\treturn $_COOKIE[$name];\n\t# Default to on for all settings\n\telse\n\t\treturn 'on';\n}", "title": "" }, { "docid": "3c5bcb4266321b9a8bbbc65fa885943c", "score": "0.48620218", "text": "protected function addCookieToJsonResponse($request, $response)\n {\n $config = config('session');\n\n $response->headers->setCookie(\n new Cookie(\n 'XSRF-TOKEN', $request->session()->token(), time() + 60 * 120,\n $config['path'], $config['domain'], true, true\n )\n );\n\n return $response;\n }", "title": "" }, { "docid": "d2af11f54cbd74a86e55b7cb1d5ce2f5", "score": "0.48605943", "text": "function cookie_set($name, $value, $expiry=0, $path='/', $domain='', $secure=false, $httpOnly=false){\n\tif(!$domain) $domain = _cfg('siteDomain');\n\t$name = preg_replace('/^('.S_PREFIX.')/', '', $name);\n\t$name = S_PREFIX . $name;\n\tif($expiry > 0) $expiry = time() + $expiry;\n\tsetcookie($name, $value, $expiry, $path, $domain, $secure, $httpOnly);\n}", "title": "" }, { "docid": "9e6b9b666888969cf38ac66fdaf190f4", "score": "0.4854088", "text": "function http_build_cookie(array $cookie)\n {\n }", "title": "" }, { "docid": "e54d4ec45eaba9bd619bbfae4fcbcccf", "score": "0.4843206", "text": "public function getCookie() {\n return $this->cookie;\n }", "title": "" }, { "docid": "e0ec2fb42b6ccafb7c6de4138416b92a", "score": "0.48405007", "text": "function set_domain_cookie($name='',$value='',$expiry=3600) {\n // localhost cookies need to be treated special\n $domain = ($_SERVER['HTTP_HOST'] != 'localhost') ? $_SERVER['HTTP_HOST'] : false;\n $result = setcookie($name, $value, $expiry, \"/\", $domain, false, true);\n\n return $result;\n}", "title": "" }, { "docid": "a47a57bbf8b1876bf2185f7440e29329", "score": "0.48390558", "text": "public function setHeader($header, $value = null, $erase = false, $code = 200){\n if(isset($this->headers[$header]) && !$erase){\n $this->headers[$header]->addValue($value);\n }else{\n $this->headers[$header] = new HttpHeader($header, $value, $erase, $code);\n }\n \n return $this->headers[$header];\n }", "title": "" }, { "docid": "557872853a0119af838ca9b3301c2e0a", "score": "0.48366636", "text": "public function setMagicInCookie($username, $token) {\n\t\t$secureCookie = OC::$server->getRequest()->getServerProtocol() === 'https';\n\t\t$webRoot = \\OC::$WEBROOT;\n\t\tif ($webRoot === '') {\n\t\t\t$webRoot = '/';\n\t\t}\n\n\t\t$maxAge = $this->config->getSystemValue('remember_login_cookie_lifetime', 60 * 60 * 24 * 15);\n\t\t\\OC\\Http\\CookieHelper::setCookie(\n\t\t\t'nc_username',\n\t\t\t$username,\n\t\t\t$maxAge,\n\t\t\t$webRoot,\n\t\t\t'',\n\t\t\t$secureCookie,\n\t\t\ttrue,\n\t\t\t\\OC\\Http\\CookieHelper::SAMESITE_LAX\n\t\t);\n\t\t\\OC\\Http\\CookieHelper::setCookie(\n\t\t\t'nc_token',\n\t\t\t$token,\n\t\t\t$maxAge,\n\t\t\t$webRoot,\n\t\t\t'',\n\t\t\t$secureCookie,\n\t\t\ttrue,\n\t\t\t\\OC\\Http\\CookieHelper::SAMESITE_LAX\n\t\t);\n\t\ttry {\n\t\t\t\\OC\\Http\\CookieHelper::setCookie(\n\t\t\t\t'nc_session_id',\n\t\t\t\t$this->session->getId(),\n\t\t\t\t$maxAge,\n\t\t\t\t$webRoot,\n\t\t\t\t'',\n\t\t\t\t$secureCookie,\n\t\t\t\ttrue,\n\t\t\t\t\\OC\\Http\\CookieHelper::SAMESITE_LAX\n\t\t\t);\n\t\t} catch (SessionNotAvailableException $ex) {\n\t\t\t// ignore\n\t\t}\n\t}", "title": "" }, { "docid": "f3e54ef415ff86e4c8b1c7eb0a2c1cf7", "score": "0.48191786", "text": "public function setCookie(RequestCookie $cookie): void\n {\n $this->cookies[$cookie->getName()] = $cookie;\n $this->setHeadersFromCookies();\n }", "title": "" }, { "docid": "8645d45cebe4e50aea95f159ddd0dadd", "score": "0.48187417", "text": "static function authBackyard($bid, $password, $cookie_file_name, $use_guesthouse,\n $proxy = null, $proxyType = null, $verbose = false)\n {\n $url = \"https://by.bouncer.login.yahoo.com/login/\";\n if($use_guesthouse)\n $url = \"https://gh.bouncer.login.yahoo.com/login/\";\n\n $ch = curl_init();\n $timeout = 0;\n\n if($verbose)\n curl_setopt($ch, CURLOPT_VERBOSE, TRUE); \n\n curl_setopt($ch, CURLOPT_POST, TRUE);\n curl_setopt($ch, CURLOPT_POSTFIELDS,\n array('action' => 'login',\n 'id' => $bid,\n 'pass_word' => $password));\n\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HEADER, TRUE);\n if($cookie_file_name){\n curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_name);\n curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_name);\n }\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);\n\n if(self::isWindows()){\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n }\n \n if($proxy) {\n curl_setopt($ch, CURLOPT_PROXYTYPE, $proxyType);\n curl_setopt($ch, CURLOPT_PROXY, $proxy);\n }\n\n $result = curl_exec($ch);\n curl_close($ch);\n\n if($cookie_file_name)\n chmod($cookie_file_name, 0600);\n if($result === false || preg_match(\"/YBY=/\", $result) != 1){\n return false;\n }\n \n preg_match_all('|Set-Cookie: (.*);|U', $result, $matches);\n return implode(';', $matches[1]);\n // return true;\n }", "title": "" }, { "docid": "402bf96a5e3bdee1ce9ef5d332ae3746", "score": "0.48019004", "text": "public function cookie() {\n $cookie_array = array(\n 'name'=>'Very_Important_Cookie',\n 'value'=>'Chocolate Flavored Mint Delight',\n 'expire'=>'86500',\n 'domain'=>'.example.com',\n 'path'=>'/'\n );\n// cookie::set($cookie_array);\n cookie::get($cookie_array, $default_value = null, $xss_clean = false);\n// cookie::delete($cookie_array);\n }", "title": "" }, { "docid": "bbdd9b6b4574609f665fdf51c56c027e", "score": "0.47958276", "text": "protected function httpUpdateCookieHeaders($obibaId = NULL, $micaId = NULL) {\n $cookie = $this->HttpCookieHeaderValue($obibaId, $micaId);\n if (isset($this->headers[self::COOKIE_HEADER])) {\n array_push($this->headers[self::COOKIE_HEADER], $cookie);\n }\n else {\n $this->headers[self::COOKIE_HEADER] = array($cookie);\n }\n return $this;\n }", "title": "" }, { "docid": "bcffff4d00b2bb7b1d9be0ad92f18ec1", "score": "0.47932407", "text": "protected function initCookieOpt(){\r\n\t\tif(!$this->cookie_name){\r\n\t\t\t$this->cookie_name = '/tmp/' . md5(rand(1,99999999) . time()) . '.cookie';\r\n\t\t\t$this->createCookieJar();\r\n\r\n\t\t\tcurl_setopt($this->curl, CURLOPT_COOKIEFILE,$this->cookie_name);\r\n\t\t\tcurl_setopt($this->curl, CURLOPT_COOKIEJAR, $this->cookie_name);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8c115e69372a391ec3d563a2b3db1afb", "score": "0.4789652", "text": "public function getCookieName(): string;", "title": "" }, { "docid": "8c115e69372a391ec3d563a2b3db1afb", "score": "0.4789652", "text": "public function getCookieName(): string;", "title": "" }, { "docid": "e7545127e91e0a02f20129e6cd6e60b3", "score": "0.4788852", "text": "public function setCookie($attribute,$value,$expire=2592000){\n\t\t$prefix = __config('system','cookie_identifier').\"_\";\n\t\tsetcookie($prefix.$attribute,$value,time()+60*60*24*30);\n\t}", "title": "" }, { "docid": "e9375415cd21df216c98f1e00d45d014", "score": "0.47836524", "text": "function unsetCookies($name,$value,$expire) {\n\n}", "title": "" }, { "docid": "4889e3d732657ac14832a4b3ea7932b5", "score": "0.47704837", "text": "function set_cookie_pro($key, $value, $crypt_key = null, $iv = null, $expires = null, $path = '/', $domain = null, $is_http_only = false)\n{\n $expires = is_null($expires) ? 0 : time() + $expires;\n $domain = is_null($domain) ? getenv('HTTP_HOST') : $domain;\n if ($crypt_key && $iv) {\n $value = get_mcrypt_value($value, $crypt_key, $iv);\n }\n __add_info(\n sprintf('set to cookie: %s, %s, %s, %s, %s', $key, $value, $expires, $path, $domain),\n InfoCollector::TYPE_LOGIC,\n InfoCollector::LEVEL_DEBUG\n );\n return setcookie($key, $value, $expires, $path, $domain, false, $is_http_only);\n}", "title": "" }, { "docid": "e4a03a443fe8ba48c444182e34d7cab1", "score": "0.4767567", "text": "public function testSetAndGet()\n {\n $cookieJar = new CookieJar();\n\n $this->assertEmpty($cookieJar->get('testCookie'));\n\n //set a test cookie\n $cookieJar->set('testCookie', 'testVal');\n\n //make sure it was set\n $this->assertEquals('testVal', $cookieJar->get('testCookie'));\n\n //make sure we can distinguish it from ones that were \"existing\"\n $this->assertEmpty($cookieJar->get('testCookie', false));\n\n //PHP will replace an incoming COOKIE called 'var.with.dots' to 'var_with_dots'\n $cookieJar = new CookieJar(\n [\n 'var_with_dots' => 'value',\n ]\n );\n\n $cookieJar->set('test.dots', 'dots');\n\n //check we can access with '.' and with '_'\n $this->assertEquals('value', $cookieJar->get('var.with.dots'));\n $this->assertEquals('value', $cookieJar->get('var_with_dots'));\n $this->assertEquals('dots', $cookieJar->get('test.dots'));\n }", "title": "" }, { "docid": "0c8d8e087585262af72928f061b39256", "score": "0.47673085", "text": "function saveLogin($id, $pass){\r\n $data = $id . ',' . $pass;\r\n setcookie (\"userdata\", $data);\r\n}", "title": "" }, { "docid": "8bfe942879ca79996cb40498f6a6b169", "score": "0.47634175", "text": "public function setHeader($header, $value);", "title": "" }, { "docid": "cf4f8abc9a18fa0d3c5ad2b451f57ea5", "score": "0.47627828", "text": "public function set_device_id_cookie() {\n\t\t\t$value = WC_PostFinanceCheckout_Unique_Id::get_uuid();\n\t\t\tif ( isset( $_COOKIE['wc_postfinancecheckout_device_id'] ) && ! empty( $_COOKIE['wc_postfinancecheckout_device_id'] ) ) {\n\t\t\t\t$value = sanitize_text_field( wp_unslash( $_COOKIE['wc_postfinancecheckout_device_id'] ) );\n\t\t\t}\n\t\t\tsetcookie( 'wc_postfinancecheckout_device_id', $value, time() + YEAR_IN_SECONDS, '/' );\n\t\t}", "title": "" }, { "docid": "f46c1e84cbc6ad0fdf28ceafe6dd8fb5", "score": "0.4759441", "text": "public function send_headers() {\n\t\tforeach ($this->headers as $header)\n\t\t\theader($header);\n\t\t\t\n\t\tforeach($this->pixie->cookie->get_updates() as $key => $params)\n\t\t\tsetcookie($key,\n\t\t\t\t\t$params['value'],\n\t\t\t\t\t$params['expires'],\n\t\t\t\t\t$params['path'],\n\t\t\t\t\t$params['domain'],\n\t\t\t\t\t$params['secure'],\n\t\t\t\t\t$params['http_only']\n\t\t\t);\n\t\t\n\t\treturn $this;\n\t}", "title": "" } ]
26c586d3ae6983597bfb9ddf5fb24f71
Operation topologyTagUuidDeleteAsync Delete a topology tag
[ { "docid": "1f625698b271586e50b6b9df202bfb70", "score": "0.65256715", "text": "public function topologyTagUuidDeleteAsync($topotaguuid)\n {\n return $this->topologyTagUuidDeleteAsyncWithHttpInfo($topotaguuid)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" } ]
[ { "docid": "1153036f73310431fb2b50db9e16271c", "score": "0.629021", "text": "public function topologyTagUuidDelete($topotaguuid)\n {\n $this->topologyTagUuidDeleteWithHttpInfo($topotaguuid);\n }", "title": "" }, { "docid": "53891da599fc4374121887e2eae9fd94", "score": "0.60473293", "text": "public function delete_tag($tag)\n\t{\n\t\treturn $this->driver->delete($tag, TRUE);\n\t}", "title": "" }, { "docid": "aa5e7427c6152d65d5d55b3965a960fd", "score": "0.57331187", "text": "public function topologyTagUuidDeleteAsyncWithHttpInfo($topotaguuid)\n {\n $returnType = '';\n $request = $this->topologyTagUuidDeleteRequest($topotaguuid);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\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": "c62cc00ee7960f346bad6726dc72175b", "score": "0.5693982", "text": "public function tagDelete(string $tag):bool;", "title": "" }, { "docid": "7fe57037a1a6ead17a0968ec0a0bbffd", "score": "0.56888735", "text": "public function delete($tag, $params = array(), $options = array())\n {\n $path = sprintf(\"/tags/%s\", $tag);\n return $this->client->delete($path, $params, $options);\n }", "title": "" }, { "docid": "2e55729e031428e03c2c81d6195f8f01", "score": "0.55754656", "text": "public function delete($uuid = null);", "title": "" }, { "docid": "7d64d5dd9a06a0291e3bd08500b5fc2a", "score": "0.552851", "text": "public function deleteTag(SemanticTag $tag, $property = null)\n {\n $store = SemanticTagsHelper::getARC2Store();\n $query = 'DELETE { <//tag#' . $tag->getConceptId() . '> ' . (($property != null) ? $property : '?p') . ' ?o }';\n $store->query($query);\n }", "title": "" }, { "docid": "ede512302330b95ed4385af2c5e7a4a1", "score": "0.55269414", "text": "protected function topologyTagUuidDeleteRequest($topotaguuid)\n {\n // verify the required parameter 'topotaguuid' is set\n if ($topotaguuid === null || (is_array($topotaguuid) && count($topotaguuid) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $topotaguuid when calling topologyTagUuidDelete'\n );\n }\n\n $resourcePath = '/ttms/1.0.0/topology_tag/{topotaguuid}/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($topotaguuid !== null) {\n $resourcePath = str_replace(\n '{' . 'topotaguuid' . '}',\n ObjectSerializer::toPathValue($topotaguuid),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $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 // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "9182bcb21ada6c9ae48af36e3b7502d5", "score": "0.5424507", "text": "public function topologyTagUuidDeleteWithHttpInfo($topotaguuid)\n {\n $request = $this->topologyTagUuidDeleteRequest($topotaguuid);\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 return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "09060f72a9128b72adf287e44cf25815", "score": "0.53801674", "text": "public function destroy(Tag $tag)\n {\n //\n }", "title": "" }, { "docid": "09060f72a9128b72adf287e44cf25815", "score": "0.53801674", "text": "public function destroy(Tag $tag)\n {\n //\n }", "title": "" }, { "docid": "09060f72a9128b72adf287e44cf25815", "score": "0.53801674", "text": "public function destroy(Tag $tag)\n {\n //\n }", "title": "" }, { "docid": "09060f72a9128b72adf287e44cf25815", "score": "0.53801674", "text": "public function destroy(Tag $tag)\n {\n //\n }", "title": "" }, { "docid": "09060f72a9128b72adf287e44cf25815", "score": "0.53801674", "text": "public function destroy(Tag $tag)\n {\n //\n }", "title": "" }, { "docid": "09060f72a9128b72adf287e44cf25815", "score": "0.53801674", "text": "public function destroy(Tag $tag)\n {\n //\n }", "title": "" }, { "docid": "88d5a30baa2335abe63856d73f2ba043", "score": "0.5380003", "text": "public function destroy(Tag $tag)\n {\n $tag->delete();\n }", "title": "" }, { "docid": "bd37a2fec1ba438568c272b652b54e6e", "score": "0.52595556", "text": "public function delete($id, $tag = false);", "title": "" }, { "docid": "56626b3dccf75128aa0206f656efddf9", "score": "0.52564645", "text": "public function destroy(Tag $tag)\n {\n $tag->delete();\n\n return response()->json([\n 'message' => 'Successfully deleted'\n ]);\n }", "title": "" }, { "docid": "a3f427312f59b6c5af038d84adb925a0", "score": "0.52564013", "text": "public function topologyTagGetAsync()\n {\n return $this->topologyTagGetAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "799939e8aca1029d43e68bc997e4ede7", "score": "0.52164334", "text": "public function destroy(BlogTag $tag)\n {\n $tag->delete();\n return response()->json('Tag was deleted successfully', 204);\n }", "title": "" }, { "docid": "d6ea898d75da1a4dc44b1ce78a48c96d", "score": "0.5196146", "text": "public function removeTagAsync($tag, $publicIds = [], $options = [])\n {\n return $this->callTagsApiAsync(TagCommand::REMOVE, $tag, $publicIds, $options);\n }", "title": "" }, { "docid": "c02ecdc374449731ca1bbe6620620488", "score": "0.51932627", "text": "public function destroy(Tag $tag)\n {\n //\n $this->authorize('delete', $tag);\n \n //\n $tag->delete();\n \n if(request()->wantsJson()) {\n return response([], 204);\n }\n \n return redirect('/tags');\n }", "title": "" }, { "docid": "f1fc7f585c3d522e2ae37396e108004e", "score": "0.51695347", "text": "public function destroy(Tag $tag)\n {\n $tag->delete();\n\n return redirect()->route('admin.tags.index')->with('success', trans('message.success.delete'));\n }", "title": "" }, { "docid": "0d701a2c2693a353d2d15ee123984866", "score": "0.51650673", "text": "public function deleteTagAsync(string $tagName): PromiseInterface\n {\n return $this->deleteTagAsyncWithHttpInfo($tagName)->then(function ($response) {\n return $response[0];\n });\n }", "title": "" }, { "docid": "bc71ce2a91f51623e9605ae1360d1f65", "score": "0.5164499", "text": "public function delete_tag($tag)\n\t{\n\t\tif ($this->driver instanceof Cache_Memcacheimp_Driver) {\n\t\t\t$this->driver->delete_tag($tag);\n\t\t}\n\t\telse {\n\t\t\treturn $this->driver->delete($tag, TRUE);\n\t\t}\n\t}", "title": "" }, { "docid": "a61501fd694228dc4bbd3b0ab5ba14ea", "score": "0.5148007", "text": "public function eliminar(Tag $tag)\n {\n $tag->delete();\n return redirect()->route('tag')->with('mensaje','Tag eliminado con exito');\n }", "title": "" }, { "docid": "bdc228acb393dc187099d4e064bfc267", "score": "0.5120066", "text": "public function destroy(Tag $tag)\n {\n $this->tagService->delete($tag);\n flash('success', 'Record is deleted successfully !');\n return redirect('admin/tag');\n\n }", "title": "" }, { "docid": "63fa9c777f6fea7a90de4dc604eeb5a3", "score": "0.5113637", "text": "public function deleteTag($emailOrId, $tag, $list = null)\n {\n $this->beforeRequest();\n \n try {\n $list = $this->normalizeList($list);\n \n $this->restJson->delete(\n $this->normalizeUrl(\n 'contacts/' . $list . '/' . rawurlencode($emailOrId)\n . '/tags/' . rawurlencode($tag)\n ),\n $this->getHeaders(),\n null,\n Client\\Http::NO_CONTENT\n );\n \n $this->getCache()->remove(self::CACHE_KEY_CONTACT . '-' . $list . '-' . $emailOrId);\n } catch (\\RuntimeException $e) {\n if (Client\\Http::NOT_FOUND == $e->getCode()) {\n return null;\n }\n \n throw $e;\n }\n \n return true;\n }", "title": "" }, { "docid": "4d6a8f11647bfc9c5a8877a548707d1d", "score": "0.5095967", "text": "public function testDeleteTagUsingDELETE()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "ff20abbec99c576d411d2e1db9a2a962", "score": "0.5086278", "text": "public function deleteTag(Tag $tag, object $entity): void\n {\n $tags = $this->getTags($entity);\n if ($tags->contains($tag)) {\n $tags->removeElement($tag);\n }\n }", "title": "" }, { "docid": "47f292929d7a843ad7d8992341111cd9", "score": "0.50550807", "text": "public function destroy(Tag $tag)\n {\n $tag->delete();\n return redirect()->route('tags.index')->with('successMessage', 'Tag was successfully deleted!');\n }", "title": "" }, { "docid": "c923dec3abf4669d2e15b9513b73f3cb", "score": "0.4991711", "text": "public function deleteTag($tag_id)\n {\n $query = \"DELETE FROM adv_tag WHERE id = $tag_id\";\n return $this->getQueryResult($query, $this->getConnection());\n }", "title": "" }, { "docid": "dad1e0e1e9703f809c2caf714b3f10ec", "score": "0.49807513", "text": "public function delete($seriesId, $submissionId, $tagId, $optParams = array()) {\n $params = array('seriesId' => $seriesId, 'submissionId' => $submissionId, 'tagId' => $tagId);\n $params = array_merge($params, $optParams);\n $data = $this->__call('delete', array($params));\n return $data;\n }", "title": "" }, { "docid": "653463201d6f8d2fb73797eaffa4dd62", "score": "0.4972458", "text": "function give_remove_email_tag( $tag ) {\n\tGive()->email_tags->remove( $tag );\n}", "title": "" }, { "docid": "5a308614caa06696abbde6d128e47e12", "score": "0.49337932", "text": "public function remove( $tag ) {\n\t\tunset( $this->tags[ $tag ] );\n\t}", "title": "" }, { "docid": "bd30f5146343aa3900a6891dd4585261", "score": "0.49320975", "text": "public function destroy(Tag $tag)\n {\n //Eliminamos la etiqueta que viene por la entidad tag, osea ese id.\n $tag->delete();\n\n return back()->with('info_success', \"La etiqueta $tag->name se ha eliminado satisfactoriamente!\");\n\n }", "title": "" }, { "docid": "9610a3c10bf35bdf5280801bce4d005a", "score": "0.49259266", "text": "public function destroy(Tag $tag)\n {\n $tag->delete();\n\n Session::flash('type','success');\n Session::flash('message','Tag Deleted Successfully');\n\n return redirect()->route('tags.index');\n }", "title": "" }, { "docid": "2b0319440f2af2aa7ac77e2de7202567", "score": "0.49251205", "text": "public function destroy()\n {\n //\n $token = Input::get('token');\n $user = $this->jwtauth->authenticate($token);\n\n if (!$user)\n {\n abort(401);\n }\n\n $tagID = (int) Input::get('tag_id');\n $found = false;\n $tag = null;\n foreach($user->tags as $user_tags)\n {\n if ($tagID == $user_tags->id)\n {\n $tag = $user_tags;\n $found = true;\n }\n }\n\n if(!$found)\n {\n abort(404);\n }\n\n $tag->delete();\n\n return response()->json(\n [\n \"status\" =>\n [\n \"message\" => \"tag deleted\",\n \"code\" => 200\n ],\n \"errors\" => false,\n \"data\" =>\n [\n\n ]\n ]\n );\n }", "title": "" }, { "docid": "0ed90efc6b2bb81baadf4170d5a04f4c", "score": "0.49143964", "text": "public function removeTag(Tag $tag)\r\n {\r\n }", "title": "" }, { "docid": "e422daaeeeeb2e261db07e9fd25f33e7", "score": "0.48131642", "text": "public function deleteExpression($uuid);", "title": "" }, { "docid": "1f1789e9dacaebfc2663bbb9b0d2847e", "score": "0.48031893", "text": "public function deleteById($tagId)\n {\n return $this->delete($this->getById($tagId));\n }", "title": "" }, { "docid": "1d68eebea34baca1fb7991484eba9fd9", "score": "0.47823545", "text": "public function deleteTagAsyncWithHttpInfo(string $tagName): PromiseInterface\n {\n $url = $this->buildPath('tag/{tagName}', compact('tagName'));\n $request = new Request('DELETE', $url);\n\n return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) {\n return $response->toArray();\n });\n }", "title": "" }, { "docid": "4013fcc5a12441e4d50ed4e9ff9084fa", "score": "0.47596747", "text": "public function destroy(Tag $tag)\n {\n /*$tag->delete();\n emotify('success', 'تمت الحذف بنجاح');\n return redirect()->route('imports.index');*/\n }", "title": "" }, { "docid": "6aaf030ad7398f99b1485ee8f9da6097", "score": "0.4738648", "text": "public function delete($tag_type_id)\n {\n try {\n $this->app['db']->delete(self::$table_name, array('tag_type_id' => $tag_type_id));\n } catch (\\Doctrine\\DBAL\\DBALException $e) {\n throw new \\Exception($e);\n }\n }", "title": "" }, { "docid": "f7035677489d2afe9d77ac24ea69100c", "score": "0.47381154", "text": "public function destroy(Tag $tag)\n {\n $tag->delete();\n\n return back()->with('success-message', 'Tag has been removed.');\n }", "title": "" }, { "docid": "69bb4ef4533b65e2508c9f2e6770b40b", "score": "0.47269234", "text": "private function delete($tagID)\n {\n require_once( FRAMEWORK_PATH . 'models/tags.inc');\n $tag = new tags( $this->registry );\n if ($tag->canErase($tagID) )\n {\n $tag->delete( $tagID ); \n } \n header('Location: /socialNetwork/admin_tags/search');\n }", "title": "" }, { "docid": "f180e2bca6f9d7c07bcf413b3d8b7bd4", "score": "0.47261414", "text": "public function destroy(Request $request)\n {\n // $tagIds = $request->input('id');\n Topic::destroy($request->id);\n return $this->success(route('admin.topics.index'),'标签删除成功');\n\n }", "title": "" }, { "docid": "2226b574d2142ebb4f874ee7c4b68ded", "score": "0.47257882", "text": "public function deleteTag(string $tagName): void\n {\n $this->deleteTagWithHttpInfo($tagName);\n }", "title": "" }, { "docid": "751868fcf5898777ce8bcc6dc9431385", "score": "0.47152603", "text": "protected static function deleteCacheByTag($tag)\n {\n $cache = Application::getInstance()->getTaggedCache();\n $cache->clearByTag($tag);\n }", "title": "" }, { "docid": "5151b4a22239dba4e142241d2535dae1", "score": "0.4710044", "text": "public function destroy(Request $request, Tag $tag)\n {\n $tag->delete();\n $request->session()->flash('status', \"Tag {$tag->tag_name} deleted!\");\n return redirect()->route('tags.index');\n }", "title": "" }, { "docid": "9ff53792468904e80d269284e281bdab", "score": "0.47039995", "text": "public function removeTag(Post $post, Tag $tag) : Post;", "title": "" }, { "docid": "fcb86b8b3553269464c5ef5598dd1d13", "score": "0.46982598", "text": "public function tag_delete($tagid) {\n if (empty($tagid)) {\n $this->error = 'Illegal Arguments';\n return FALSE;\n }\n\n // delete tag\n $response = $this->_http_request('/tag/'.urlencode($tagid), 'DELETE');\n\n if (empty($response->error)) {\n return TRUE;\n } else {\n $this->error = 'Tag deletion failed: '.$response->error;\n return FALSE;\n }\n }", "title": "" }, { "docid": "394f80c29a8902f13093d0c3784c8136", "score": "0.46832806", "text": "public function delete($ptag_id)\n {\n $result = 0;\n $ptag_model = new \\models\\Products_Tag();\n $ptag_model->setPtagId($ptag_id);\n if($ptag_model->delete())\n {\n $result = 1;\n }\n echo $result;\n }", "title": "" }, { "docid": "78a8027fc705295ecd794a3d192aaf66", "score": "0.46655774", "text": "public function deleteCacheByTag( $tag, $value )\n\t{\n\t\treturn $this->cache->deleteCacheByTag( $tag, $value );\n\t}", "title": "" }, { "docid": "828657047ed1b50feeb67c2ed39de4f6", "score": "0.46486062", "text": "function detach_tag($resource_id, $tag_id)\n\t{\n\t\t$this -> db -> where ('resource_id', $resource_id);\n\t\t$this -> db -> where ('keyword_id', $tag_id);\n\t\t$query = $this -> db -> delete ('gh_resource_keyword');\t\t\n\t}", "title": "" }, { "docid": "8d612db9d04e552dc30e4ee0c818bcb4", "score": "0.4632396", "text": "function delete_tag($tag_id) {\n\t$sql = \"DELETE FROM \" . PREFIX . \"_tags WHERE id = $tag_id\";\n\t$query = mysql_query($sql);\n\tif(!$query) fic_error(\"Could not delete tag\", mysql_error(), __FILE__, __LINE__);\n\treturn true;\n}", "title": "" }, { "docid": "3de27ee88d72f65e4a0323de75c8ebd4", "score": "0.4630736", "text": "public function destroy($slug)\n {\n \n $posttag = Posttag::where('slug', $slug)->first();\n $posttag->delete();\n\n Session::flash('success', 'Post Tag successfully deleted!');\n return redirect()->route('posttags.index');\n }", "title": "" }, { "docid": "11ec7a07b0b1f80a27dfe373ecc1b8c4", "score": "0.46024922", "text": "function deleteTag($client, $user, $albumId, $photoId, $tagContent)\n{\n $photos = new Zend_Gdata_Photos($client);\n\n $photoQuery = new Zend_Gdata_Photos_PhotoQuery;\n $photoQuery->setUser($user);\n $photoQuery->setAlbumId($albumId);\n $photoQuery->setPhotoId($photoId);\n $query = $photoQuery->getQueryUrl() . \"?kind=tag\";\n\n $photoFeed = $photos->getPhotoFeed($query);\n\n foreach ($photoFeed as $entry) {\n if ($entry instanceof Zend_Gdata_Photos_TagEntry) {\n if ($entry->getContent() == $tagContent) {\n $tagEntry = $entry;\n }\n }\n }\n\n $photos->deleteTagEntry($tagEntry, true);\n\n outputPhotoFeed($client, $user, $albumId, $photoId);\n}", "title": "" }, { "docid": "a8734725d0783ab5644a405c65a71ed4", "score": "0.45781162", "text": "public function removeTag($comment_id, $tag_id, $tag_unique_id) {\n try {\n $this->httpClient->delete(self::EXTERNAL_API_CONFIG['api_endpoints']['tags_endpoint'], [\n 'json' => [\n 'comment_id' => $comment_id,\n 'tag_id' => $tag_id,\n 'id' => $tag_unique_id,\n 'author_id' => $this->currentUser->id(),\n ],\n ]);\n }\n catch (RequestException $e) {\n $this->handleRequestException($e);\n }\n }", "title": "" }, { "docid": "648f2a607aa190e285e27c5e888200a3", "score": "0.45640352", "text": "public function endpointsTopologyTagUuidAsync($topotaguuid)\n {\n return $this->endpointsTopologyTagUuidAsyncWithHttpInfo($topotaguuid)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "de96fcc9d51d337ab0cf8df1e3584810", "score": "0.45606914", "text": "public function delete(string $uuid):void\n {\n $query = $this->pdo->prepare(\"DELETE FROM {$this->table} WHERE uuid = :uuid\");\n $query->execute(['uuid' => $uuid]);\n }", "title": "" }, { "docid": "e39d276ac190d646a59aeea07a5e7bd4", "score": "0.45600307", "text": "public function remove($site_name, $organization, $tag)\n {\n $org = $this->session()->getUser()->getOrgMemberships()->get($organization)->getOrganization();\n $site = $org->getSiteMemberships()->get($site_name)->getSite();\n $site->tags->get($tag)->delete();\n\n $this->log()->notice(\n '{org} has removed the {tag} tag from {site}.',\n ['org' => $org->get('profile')->name, 'tag' => $tag, 'site' => $site->get('name'),]\n );\n }", "title": "" }, { "docid": "23ef3bf00c3aab7cdd23d343da503e66", "score": "0.45499846", "text": "public function topologyTagGetAsyncWithHttpInfo()\n {\n $returnType = '\\tpn\\Model\\Topology[]';\n $request = $this->topologyTagGetRequest();\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": "f2c7f86a980f42e3d5520842645eecee", "score": "0.45380655", "text": "public function removeTag(Tag $tag) {\n \n $this->tagMapper->removeTag($tag);\n \n }", "title": "" }, { "docid": "0d3a5c04859aa20dddfeab9cc53b9127", "score": "0.45339322", "text": "public function destroy($id)\n {\n Tag::find($id)->delete();\n }", "title": "" }, { "docid": "f75f489326b0b6ab4bdfe2ad0a2a4cb3", "score": "0.4533801", "text": "public function delete(): void\n {\n $this->api->delete($this);\n $this->api->getPool()->remove($this->_getPoolKeys());\n }", "title": "" }, { "docid": "24f13f34a48d0dd62137025134314e5a", "score": "0.4531585", "text": "public function delete_tag($tags)\n\t{\n\t\tif (is_array($tags) === FALSE)\n\t\t{\n\t\t\t$tags = array($tags);\n\t\t}\n\n\t\treturn $this->driver->delete_tag($tags);\n\t}", "title": "" }, { "docid": "21072269bdd9e20c82964274617040b2", "score": "0.4530182", "text": "public function clearByTag(string $tag): void\n {\n return;\n }", "title": "" }, { "docid": "9327b0063214d7213cd25fcbed52899d", "score": "0.45277187", "text": "public function ansiblegalaxyDelete($arg = '')\n {\n $this->taskAnsibleGalaxyDelete()->arg($arg)->run();\n }", "title": "" }, { "docid": "3d932022e4917f976ab8ba36db149003", "score": "0.45251682", "text": "protected function deleteAlertTagRequest($alert_id, $alert_tag)\n {\n // verify the required parameter 'alert_id' is set\n if ($alert_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $alert_id when calling deleteAlertTag'\n );\n }\n // verify the required parameter 'alert_tag' is set\n if ($alert_tag === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $alert_tag when calling deleteAlertTag'\n );\n }\n\n $resourcePath = '/beta/alert/{alertId}/tag/{alertTag}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($alert_id !== null) {\n $resourcePath = str_replace(\n '{' . 'alertId' . '}',\n ObjectSerializer::toPathValue($alert_id),\n $resourcePath\n );\n }\n // path params\n if ($alert_tag !== null) {\n $resourcePath = str_replace(\n '{' . 'alertTag' . '}',\n ObjectSerializer::toPathValue($alert_tag),\n $resourcePath\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 []\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "bdedfed5ed59f86e507bb141ff4d281a", "score": "0.45196393", "text": "function tag_delete_by($rid, $tag = '') {\r\n\t// delete by rid\r\n\tif (empty($tag)) {\r\n\t\tsql_query(\"DELETE FROM tag_assoc WHERE rid='$rid';\");\r\n\r\n\t// delete by rid and tag\r\n\t} else {\r\n\t\t// change to string\r\n\t\t$tag_str = '';\r\n\t\tif (is_string($tag)) {\r\n\t\t\t$tag\t= trim($tag);\r\n\t\t\t$tag\t= explode(' ', $tag);\r\n\t\t}\r\n\r\n\t\t// delete tag one by one\r\n\t\tforeach($tag as $val) {\r\n\t\t\tsql_query(\"\r\n\t \t\t\tDELETE FROM tag_assoc WHERE rid = '$rid' AND tid = \r\n\t\t\t\t\t(SELECT tid FROM tag WHERE name = '$val' LIMIT 1)\r\n\t\t\t\");\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "6d0579096223eb6865b76cdabdb41b27", "score": "0.4519311", "text": "public function testTagsIdTemplatesDelete()\n {\n\n }", "title": "" }, { "docid": "ad256251c8321d36b8cd9ff380946727", "score": "0.45176885", "text": "public function deleteMicroschema(string $uuid): MeshRequest;", "title": "" }, { "docid": "e4119239ec0839d0430e2b3aa2e53f71", "score": "0.44992054", "text": "public function deleteTag($tagid){\n $tagid = mysql_real_escape_string($tagid);\n $e = mysql_query(\"DELETE FROM tv_tags_join WHERE tag_id='$tagid'\") or die(mysql_error());\n $e = mysql_query(\"DELETE FROM tv_tags WHERE id='$tagid'\") or die(mysql_error());\n }", "title": "" }, { "docid": "6d3e583438d56808bcf5dbb1c4f30b6a", "score": "0.44875893", "text": "public function testTemplatesTagsNameDelete()\n {\n }", "title": "" }, { "docid": "ccb6c2773298cdaf9f2b5b14a00f4454", "score": "0.4481382", "text": "public function deleteTag($id)\n {\n //ToDo: add the UnDo functionality from contao\n \\Database::getInstance()\n ->prepare('DELETE FROM ' . $this->table . ' WHERE id = ? '\n . 'AND (type = \"sHtml5Start\" OR type = \"sHtml5End\")')\n ->execute($id);\n }", "title": "" }, { "docid": "b06a1c82504c08e79bb9acad12999cf8", "score": "0.4474975", "text": "public function deleteAlertTagAsync($alert_id, $alert_tag)\n {\n return $this->deleteAlertTagAsyncWithHttpInfo($alert_id, $alert_tag)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "29b3dfec9ede0ea3c65c389fe15feb8a", "score": "0.44691986", "text": "public function deleteAsync(array $params = [])\n {\n $id = $this->extractArgument($params, 'id');\n\n $endpointBuilder = $this->endpoints;\n /** @var Sql\\DeleteAsync $endpoint */\n $endpoint = $endpointBuilder('Sql\\DeleteAsync');\n $endpoint->setParams($params);\n $endpoint->setId($id);\n\n return $this->performRequest($endpoint);\n }", "title": "" }, { "docid": "ffc3b922d0481b0827893f41a1a8573e", "score": "0.44610387", "text": "public function destroy(TagRequest $request, $id) {\n \n $this->tagDestroy(json_decode($request->id)); \n return response()\n ->json(array(\n 'message' => __('messages.update_success'),\n 'status' => 'success'\n ), 201);\n }", "title": "" }, { "docid": "2e00bc52d8b275fb2f3ceffb37e273d9", "score": "0.44483337", "text": "public function deleteRecordByUuid($uuid)\n {\n }", "title": "" }, { "docid": "ac8d04bb5dfe33ef47c4980f1793fd36", "score": "0.44463873", "text": "public function destroy($id)\n {\n $tag = Tag::find($id);\n\n DB::beginTransaction();\n try{\n $woocommerce = $this->helper->getWooCommerceAdminShop();\n $woocommerce->delete('products/tags/'.$tag->woocommerce_id, ['force' => true]);\n\n $tag->products()->detach();\n $tag->delete();\n\n DB::commit();\n return redirect()->back()->with('success', 'Tag deleted Successfully');\n }\n catch (\\Exception $e) {\n DB::rollBack();\n return redirect()->back()->with('error', $e->getMessage());\n }\n }", "title": "" }, { "docid": "e22883fe9a1ac7c3dcf2ce8937452d85", "score": "0.44463176", "text": "public function deleteById($labelId);", "title": "" }, { "docid": "7e338cedb6cdf506ffd4e84c4c7f96d9", "score": "0.44454986", "text": "public function removeTag($tag) {\n $tagid = 0;\n // this bit might be able to be refactored into $this->getTags()\n if (!isset($this->_cachedXml->tags[0])) {\n $this->load();\n }\n foreach ($this->_cachedXml->tags[0] as $xmlTag) {\n // compare both the raw and cleaned tags\n if ((string) $xmlTag == $tag || (string) $xmlTag['raw'] == $tag) {\n $tagid = (integer) $xmlTag['id'];\n break;\n }\n }\n $resp = $this->getApi()->executeMethod(\n 'flickr.photos.removeTag',\n array('photo_id' => $this->getId(), 'tag_id' => $tagid)\n );\n $this->refresh();\n }", "title": "" }, { "docid": "2ec484d6da6cb0a9666e4c239e0126f7", "score": "0.44392547", "text": "public function destroy($id) {\n try{\n $tag = TagsModel::findOrFail($id);\n $tag->delete();\n\n return response()->json(['message' => \"The tag has been deleted\" ], 200);\n } catch(QueryException $e) {\n return response()->json(['error' => \"The tag was not found\" ], 404);\n }\n }", "title": "" }, { "docid": "8936ff2bcfb28826c5b61fbd23b2dbe4", "score": "0.44371352", "text": "public function untagAsync(string $serverId, string $tagName): PromiseInterface\n {\n return $this->untagAsyncWithHttpInfo($serverId, $tagName)->then(function ($response) {\n return $response[0];\n });\n }", "title": "" }, { "docid": "bb2b5f28bb8a4d78df2ed1800fd4731e", "score": "0.4428704", "text": "public function testTeamsIdTemplatesNkTagsFkDelete()\n {\n\n }", "title": "" }, { "docid": "1d63f1612a337b2bfe6273ccb6fb24f6", "score": "0.44245178", "text": "public function destroy($objectTag)\n {\n $objectTag = ObjectTag::findOrFail($objectTag);\n $objectTag->delete();\n return $this->successResponse($objectTag);\n \n }", "title": "" }, { "docid": "e47712c8a90eee273efaad3cbdb09e2e", "score": "0.4420149", "text": "public function removeTag($tag, $publicIds = [], $options = [])\n {\n return $this->removeTagAsync($tag, $publicIds, $options)->wait();\n }", "title": "" }, { "docid": "f0f23623ddee7b84c04df985ff499617", "score": "0.44141757", "text": "public function testTeamsIdTemplatesNkTagsDelete()\n {\n\n }", "title": "" }, { "docid": "e4acfb88a3e5dccfd59095b8244c4739", "score": "0.440264", "text": "public function destroy(Request $request, $id)\n {\n $tag = Tag::find($id);\n\n if($request->ajax()){\n $tag->delete($id);\n return response()->json([\n 'flash' => 'Etiqueta elimina con éxito',\n ]);\n }\n }", "title": "" }, { "docid": "2d4665f29c671ed24eca3e2dd43fc69e", "score": "0.43984008", "text": "public function deleteAlertTagAsyncWithHttpInfo($alert_id, $alert_tag)\n {\n $returnType = '';\n $request = $this->deleteAlertTagRequest($alert_id, $alert_tag);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\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": "9b79efd4d437c73ed9bd5db7c33ffc5c", "score": "0.43955272", "text": "public function endpointsTopologyTagUuidEndpointAsync($topotaguuid, $endpointuuid)\n {\n return $this->endpointsTopologyTagUuidEndpointAsyncWithHttpInfo($topotaguuid, $endpointuuid)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "381482dfe17e9a3d87265f5e292999e3", "score": "0.4392846", "text": "public function delete(){\n $this->zones()->detach();\n\n // Remove all venue associations from the pivot table\n $this->venues()->detach();\n\n // Delete the tag itself\n $result = parent::delete();\n return $result;\n }", "title": "" }, { "docid": "eeac87a402c200e71fa1cfefae3ff466", "score": "0.43918285", "text": "public function delete($id) {\n //find tag by id\n $tag = Tag::find($id); \n //delete record from database\n Tag::destroy($id); \n //redirect to dashboard all tags list\n return redirect()->route('adminDisplayTags')->with(['status' => 'Tag Deleted.']);\n }", "title": "" }, { "docid": "29809c70c6e9a5671b9ab7c84910515e", "score": "0.43861753", "text": "public function destroy($id)\n {\n Tag::findOrFail($id)->delete();\n return redirect()->route('tags.index')->with('success','Etiqueta eliminada con exito');\n }", "title": "" }, { "docid": "1d8e1e57cf78bf7c3f39cc8faa5d32d2", "score": "0.43784964", "text": "public function destroy($id)\n {\n Tag::find($id)->delete();\n flash()->success('Tag Deletada com Sucesso!');\n return redirect('admin/tag');\n }", "title": "" }, { "docid": "cb1d2b9217c294733b7c37920c63f446", "score": "0.43716195", "text": "public function topologyTagUuidGetAsync($topotaguuid)\n {\n return $this->topologyTagUuidGetAsyncWithHttpInfo($topotaguuid)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "4846fbcf4f41cb8002595f880bb26961", "score": "0.4361937", "text": "public function destroy($id)\n {\n $tag = Tag::find($id);\n\t\tif(!is_null($tag)){\n\t\t\t\n\t\t\t$userRequested = \\Auth::User();\n\t\t\t\n\t\t\tif($userRequested->roleAuth == \"ADMIN\"){\n\t\t\t\t\n\t\t\t\t$tag->role_id = $userRequested->id;\n\t\t\t\t$tag->role = $this->user_roles[$userRequested->roleAuth];\n\t\t\t\t$tag->save();\n\t\t\t\n\t\t\t\t//SE BORRA CATEGORY\n\t\t\t\t$tag->delete();\n\t\t\t\t\n\t\t\t\tif($tag != false){\n\t\t\t\t\t$response = ['code' => 200,'message' => \"Tag was deleted succefully\"];\n\t\t\t\t\treturn response()->json($response,200);\n\t\t\t\t}else{\n\t\t\t\t\t$response = ['error' => 'It has occurred an error trying to delete the tag','code' => 500];\n\t\t\t\t\treturn response()->json($response,500);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}else{\n\t\t\t//EN DADO CASO QUE EL ID DE Tag NO SE HALLA ENCONTRADO\n\t\t\t$response = ['error' => 'Tag does not exist','code' => 422];\n\t\t\treturn response()->json($response,422);\n\t\t}\n }", "title": "" }, { "docid": "7ca7419ebde3f0ee66f472058b1a7cba", "score": "0.43580627", "text": "protected function topologyTagUuidGetRequest($topotaguuid)\n {\n // verify the required parameter 'topotaguuid' is set\n if ($topotaguuid === null || (is_array($topotaguuid) && count($topotaguuid) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $topotaguuid when calling topologyTagUuidGet'\n );\n }\n\n $resourcePath = '/ttms/1.0.0/topology_tag/{topotaguuid}/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($topotaguuid !== null) {\n $resourcePath = str_replace(\n '{' . 'topotaguuid' . '}',\n ObjectSerializer::toPathValue($topotaguuid),\n $resourcePath\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 []\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 // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "88232b58aeb74ce3ff44e3756abb94da", "score": "0.4357843", "text": "public function destroy($id)\n {\n // Find the tag that we wont to delete\n $tag = Tag::find($id);\n $tag->posts()->detach();\n\n // Delete the tag\n $tag->delete();\n\n // Success message\n Session::flash('success', 'The blog tag is successfully Deleted');\n\n // Redirect to other page with the success message\n return redirect()->route('tags.index');\n }", "title": "" } ]
d92751c217326389d5c2e73ba51a8bed
Filter the query on the account_id column Example usage: $query>filterByAccountId(1234); // WHERE account_id = 1234 $query>filterByAccountId(array(12, 34)); // WHERE account_id IN (12, 34) $query>filterByAccountId(array('min' => 12)); // WHERE account_id > 12
[ { "docid": "79e1bc9bbff98bf522b4284f6449f807", "score": "0.5687547", "text": "public function filterByAccountId($accountId = null, $comparison = null)\n {\n if (is_array($accountId)) {\n $useMinMax = false;\n if (isset($accountId['min'])) {\n $this->addUsingAlias(AccountSeriesTableMap::COL_ACCOUNT_ID, $accountId['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($accountId['max'])) {\n $this->addUsingAlias(AccountSeriesTableMap::COL_ACCOUNT_ID, $accountId['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AccountSeriesTableMap::COL_ACCOUNT_ID, $accountId, $comparison);\n }", "title": "" } ]
[ { "docid": "ed2eb8621d33635856ca594a547b4f3f", "score": "0.54299456", "text": "public function filterByPrimaryKey($key)\n {\n throw new LogicException('The AccountSeries object has no primary key');\n }", "title": "" }, { "docid": "43f8ead8f5f0f5db3a11f941b7dc604f", "score": "0.52796286", "text": "public function getByAccountId($accountId);", "title": "" }, { "docid": "7ba13a976e642d9c7e1f224021477e0d", "score": "0.5217943", "text": "public function addAccountFilter($accountId)\n {\n $this->getSelect()->where('report.account_id = ?', $accountId);\n return $this;\n }", "title": "" }, { "docid": "3ac6bdfc0d49d46fc777bb6fa467027f", "score": "0.5167834", "text": "public function filterByIdAccount($idAccount = null, ?string $comparison = null)\n {\n if (is_array($idAccount)) {\n $useMinMax = false;\n if (isset($idAccount['min'])) {\n $this->addUsingAlias(LoginAccountTableMap::COL_ID_ACCOUNT, $idAccount['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($idAccount['max'])) {\n $this->addUsingAlias(LoginAccountTableMap::COL_ID_ACCOUNT, $idAccount['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n $this->addUsingAlias(LoginAccountTableMap::COL_ID_ACCOUNT, $idAccount, $comparison);\n\n return $this;\n }", "title": "" }, { "docid": "6c4049229924b768d0e996e29ab992e6", "score": "0.49796036", "text": "public function filterByPrimaryKey($key)\n {\n\n $this->addUsingAlias(LoginAccountTableMap::COL_ID_ACCOUNT, $key, Criteria::EQUAL);\n\n return $this;\n }", "title": "" }, { "docid": "222da16cd1e7d072507c3ade13145970", "score": "0.4799147", "text": "public function findByAccount(User_Model_Row_Account $account) {\n\t\t\n\t}", "title": "" }, { "docid": "a19f313cd7abf8e0a4c300e18048e12e", "score": "0.47608468", "text": "public function filterByAccount($account, $comparison = null)\n {\n if ($account instanceof \\App\\Model\\Account) {\n return $this\n ->addUsingAlias(PlayerTableMap::COL_ID, $account->getPlayerId(), $comparison);\n } elseif ($account instanceof ObjectCollection) {\n return $this\n ->useAccountQuery()\n ->filterByPrimaryKeys($account->getPrimaryKeys())\n ->endUse();\n } else {\n throw new PropelException('filterByAccount() only accepts arguments of type \\App\\Model\\Account or Collection');\n }\n }", "title": "" }, { "docid": "428768ee16365c929e57d2701aa9ecfc", "score": "0.4727487", "text": "public function filter($accountId, $userId, $fromDate, $toDate, $type, $order)\r\n {\r\n $tranzArray = array();\r\n \r\n $db = Db::connect();\r\n if ($db->connect_errno) {\r\n die(\"Connection failed: (\" . $db->connect_error . \")\" . $db->connect_error);\r\n }\r\n \r\n // $this->accountHandler->getAndCheckAccount($accountId, $userId);\r\n \r\n $query = <<<SQL\r\n SELECT a.id, a.account_id, b.account_number, a.transaction_type, a.amount, a.balance, \r\n a.transaction_time, a.description\r\n FROM tbl_transaction a INNER JOIN tbl_account b ON a.account_id=b.id\r\n WHERE a.account_id=?\r\nSQL;\r\n if (isset($fromDate)) {\r\n $query = $query . \" AND a.transaction_time>=? \";\r\n $query = $query . \" AND a.transaction_time<=? \";\r\n }\r\n \r\n switch ($type) {\r\n case \"D\":\r\n $query = $query . \" AND a.transaction_type='D' \";\r\n break;\r\n case \"W\":\r\n $query = $query . \" AND a.transaction_type='W' \";\r\n break;\r\n case \"F\":\r\n $query = $query . \" AND a.transaction_type='F' \";\r\n break;\r\n case \"T\":\r\n $query = $query . \" AND a.transaction_type='T' \";\r\n break;\r\n case \"P\":\r\n $query = $query . \" AND a.transaction_type='P' \";\r\n break;\r\n }\r\n \r\n switch ($order) {\r\n case \"asc\":\r\n $query = $query . \" ORDER BY a.id\";\r\n break;\r\n case \"desc\":\r\n $query = $query . \" ORDER BY a.id DESC\";\r\n break;\r\n }\r\n \r\n $stmt = $db->prepare($query);\r\n \r\n if ($stmt) {\r\n if (isset($fromDate)) {\r\n $stmt->bind_param('iss', $accountId, $fromDate, $toDate);\r\n } else {\r\n $stmt->bind_param('i', $accountId);\r\n }\r\n $stmt->execute();\r\n $stmt->store_result();\r\n $stmt->bind_result($id, $newAccountId, $accountNumber, $transactionType, \r\n $amount, $balance, $transactionTime, $description);\r\n while ($stmt->fetch()) {\r\n $tranz = new Tranz();\r\n $tranz->setId($id);\r\n $tranz->setAccountId($newAccountId);\r\n $tranz->setAccountNumber($accountNumber);\r\n $tranz->setTransactionType($transactionType);\r\n $tranz->setAmount($amount);\r\n $tranz->setBalance($balance);\r\n $tranz->setTransactionTime($transactionTime);\r\n $tranz->setDescription($description);\r\n $tranzArray[$id] = $tranz;\r\n }\r\n $stmt->close();\r\n } else {\r\n $no = $db->errno;\r\n $err = $db->error;\r\n $db->close();\r\n throw new Exception(\"Tranz prepare failed: (\" . $no . \")\" . $err);\r\n }\r\n \r\n $db->close();\r\n \r\n return $tranzArray;\r\n }", "title": "" }, { "docid": "16b2f6e82cb21996516c605204f91839", "score": "0.4721209", "text": "public function filter(string $column, int $value);", "title": "" }, { "docid": "822baea0a8332a01ad42c23e01090690", "score": "0.4715946", "text": "public function userIdFiltering(&$filter)\n {\n // Enter your code here\n }", "title": "" }, { "docid": "822baea0a8332a01ad42c23e01090690", "score": "0.4715946", "text": "public function userIdFiltering(&$filter)\n {\n // Enter your code here\n }", "title": "" }, { "docid": "822baea0a8332a01ad42c23e01090690", "score": "0.4715946", "text": "public function userIdFiltering(&$filter)\n {\n // Enter your code here\n }", "title": "" }, { "docid": "cb2fc6d8a7d06d3f60409182f57942ac", "score": "0.47131145", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(PhilcomreportsPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "448ea4989b89adac302eb591f0f93d4e", "score": "0.46891552", "text": "public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(LogRequisicaoPeer::ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(LogRequisicaoPeer::ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(LogRequisicaoPeer::ID, $id, $comparison);\n }", "title": "" }, { "docid": "345b5662eea4bc07f877f7d3993265b5", "score": "0.4687052", "text": "public function filterByAid($aid = null, $comparison = null)\n {\n if (is_array($aid)) {\n $useMinMax = false;\n if (isset($aid['min'])) {\n $this->addUsingAlias(AliFcTableMap::COL_AID, $aid['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($aid['max'])) {\n $this->addUsingAlias(AliFcTableMap::COL_AID, $aid['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliFcTableMap::COL_AID, $aid, $comparison);\n }", "title": "" }, { "docid": "6a76bfbf77fa79f787b1c31eb589a405", "score": "0.46726605", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(sfGuardUserPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "eda45a98d9b819561aadf1fbfccabb3c", "score": "0.46527106", "text": "public function findById($accountId)\n {\n }", "title": "" }, { "docid": "6e923137011f8bedf8f3af8cadd5b9fb", "score": "0.4636618", "text": "public function search_filter_customer($param = array()) {\n // @todo Please modify the following code to remove attributes that should not be searched.\n $criteria = new CDbCriteria($param);\n\n if (!empty($this->from_date) && empty($this->to_date)) {\n $criteria->condition = \"appoint_date >= '$this->from_date'\"; // date is database date column field\n } elseif (!empty($this->to_date) && empty($this->from_date)) {\n $criteria->condition = \"appoint_date <= '$this->to_date'\";\n } elseif (!empty($this->to_date) && !empty($this->from_date)) {\n $criteria->condition = \"appoint_date >= '$this->from_date' and appoint_date <= '$this->to_date'\";\n }\n\n\n\n if (!empty($this->cost_range_from) && empty($this->cost_range_to)) {\n $criteria->condition = \"total_amount >= '$this->cost_range_from'\"; // date is database date column field\n } elseif (!empty($this->cost_range_to) && empty($this->cost_range_from)) {\n $criteria->condition = \"total_amount <= '$this->cost_range_to'\";\n } elseif (!empty($this->cost_range_to) && !empty($this->cost_range_from)) {\n $criteria->condition = \"total_amount >= '$this->cost_range_from' and total_amount <= '$this->cost_range_to'\";\n }\n\n \n $criteria->group = ('customer_id');\n $criteria->order = 'total_amount DESC';\n $criteria->addCondition('appoint_date <= DATE(NOW())');\n $criteria->select = array(\n '*' => new CDbExpression('customer_id, shop_id, SUM(total_cost) AS total_amount, COUNT(customer_id) AS number_of_visit'),\n );\n\n //$criteria->condition='your_condition';\n //$user = User::model()->find($criteria);\n $criteria->limit = 100;\n $criteria->compare('id', $this->id);\n $criteria->compare('company_id', $this->company_id);\n $criteria->compare('shop_id', $this->shop_id);\n $criteria->compare('customer_id', $this->customer_id);\n $criteria->compare('staff_id', $this->staff_id);\n $criteria->compare('service_category', $this->service_category);\n $criteria->compare('service_id', $this->service_id);\n $criteria->compare('appoint_date', $this->appoint_date, true);\n $criteria->compare('applied_date,', $this->applied_date, true);\n $criteria->compare('appoint_time', $this->appoint_time, true);\n $criteria->compare('end_time', $this->end_time, true);\n //$criteria->compare('total_cost',$this->total_cost);\n $criteria->compare('note', $this->note, true);\n $criteria->compare('status', $this->status);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "06dcfbd9e92629739539560e28fb9e61", "score": "0.46357667", "text": "public function query()\n {\n $model = app(AccountInterface::class)->getModel();\n $select = [\n 're_accounts.id',\n 're_accounts.first_name',\n 're_accounts.last_name',\n 're_accounts.email',\n 're_accounts.created_at',\n ];\n\n $query = $model->select($select);\n\n return $this->applyScopes(apply_filters(BASE_FILTER_TABLE_QUERY, $query, $model, $select));\n }", "title": "" }, { "docid": "6277d2a6aa7556c2ee34cc9e441703f6", "score": "0.4603469", "text": "function filterUserActive(User $user);", "title": "" }, { "docid": "255d3e9b96b6d1302d6adb830c4ead08", "score": "0.45988303", "text": "public function filterByPrimaryKeys($keys)\n {\n throw new LogicException('The AccountSeries object has no primary key');\n }", "title": "" }, { "docid": "dd72fb18904dfddc3f0607fc2f346dba", "score": "0.45975313", "text": "public function getPrimaryWhere($id)\r\n\t{\r\n\t\t$where = array();\r\n\t\t$where[] = $this->getPrimary() . ' = ' . $this->_db->quote((int)$id, 'INT');\r\n\t\t\r\n\t\treturn $where;\r\n\t}", "title": "" }, { "docid": "2dc8f761e1fb90136e2ed47955c3bb3b", "score": "0.4586885", "text": "function filter (array $records, array $query = [], $sort = false, $limit = false, $offset = false, & $remainingQuery = true, & $sorted = false, $areByIds = false) {\n if (func_num_args() > 5) $remainingQuery = true;\n return parent::filter($records, $query, $sort, $limit, $offset, $remainingQuery, $sorted, $areByIds);\n }", "title": "" }, { "docid": "2dc8f761e1fb90136e2ed47955c3bb3b", "score": "0.4586885", "text": "function filter (array $records, array $query = [], $sort = false, $limit = false, $offset = false, & $remainingQuery = true, & $sorted = false, $areByIds = false) {\n if (func_num_args() > 5) $remainingQuery = true;\n return parent::filter($records, $query, $sort, $limit, $offset, $remainingQuery, $sorted, $areByIds);\n }", "title": "" }, { "docid": "2dc8f761e1fb90136e2ed47955c3bb3b", "score": "0.4586885", "text": "function filter (array $records, array $query = [], $sort = false, $limit = false, $offset = false, & $remainingQuery = true, & $sorted = false, $areByIds = false) {\n if (func_num_args() > 5) $remainingQuery = true;\n return parent::filter($records, $query, $sort, $limit, $offset, $remainingQuery, $sorted, $areByIds);\n }", "title": "" }, { "docid": "53c3b8f30025c119fb753c4f24ebc0d4", "score": "0.45847312", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(UserPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "41dfa4d590f363cbe153f9b75af96b52", "score": "0.45821413", "text": "public function getFilter($id)\n {\n return parent::getFilter(strtolower($id));\n }", "title": "" }, { "docid": "9ed58f53dd769eb632416fd98e90634e", "score": "0.4574829", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(EmpProfilePeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "1dac034bddf86c1d4391b49873108b4c", "score": "0.45726982", "text": "public function setAccountId($var)\n {\n GPBUtil::checkString($var, True);\n $this->account_id = $var;\n }", "title": "" }, { "docid": "c35b58b0d51174a9d7410bdd9eec4bc1", "score": "0.45616987", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(TblUserPeer::USER_ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "55364fee0c397059f70e89699d5aceb9", "score": "0.45611602", "text": "public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(JournalEntryPeer::ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(JournalEntryPeer::ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(JournalEntryPeer::ID, $id, $comparison);\n }", "title": "" }, { "docid": "2ee797837e165121fc5690f9e5276ac0", "score": "0.45601487", "text": "public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(EmpProfilePeer::ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(EmpProfilePeer::ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(EmpProfilePeer::ID, $id, $comparison);\n }", "title": "" }, { "docid": "1b7df1dabd06c0ec4065b8f079d8656c", "score": "0.45570168", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AliDmbonusTableMap::COL_AID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "082fdc165b8714065bc88155e100551a", "score": "0.45545092", "text": "public function filterByAccount($account, $comparison = null)\n {\n if ($account instanceof \\AppBundle\\Database\\Propel\\Model\\Account) {\n return $this\n ->addUsingAlias(AccountSeriesTableMap::COL_ACCOUNT_ID, $account->getAccountId(), $comparison);\n } elseif ($account instanceof \\AppBundle\\Database\\Propel\\Collection\\ObjectCollection) {\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n\n return $this\n ->addUsingAlias(AccountSeriesTableMap::COL_ACCOUNT_ID, $account->toKeyValue('PrimaryKey', 'AccountId'), $comparison);\n } else {\n throw new PropelException('filterByAccount() only accepts arguments of type \\AppBundle\\Database\\Propel\\Model\\Account or Collection');\n }\n }", "title": "" }, { "docid": "d14ebbb9de1c56a41cb8a9678f6b75da", "score": "0.45496485", "text": "function getAccounts($accountIDArray = null, $conditions = null, $sortOrder = null) {\t\t// Well, you can run this command here fine. But where will you set it back down to the default?\r\n\t\tif (!ini_get('safe_mode')) { \r\n\t\t\tini_set('max_execution_time', 60); // in seconds\r\n\t\t}\r\n\t\treturn $this->accountOps->getAccounts($accountIDArray, $conditions, $sortOrder);\r\n\t}", "title": "" }, { "docid": "604833fb187f4f51e288295ec496a86b", "score": "0.45403934", "text": "public function filterById($id = null, $comparison = null)\n\t{\n\t\tif (is_array($id)) {\n\t\t\t$useMinMax = false;\n\t\t\tif (isset($id['min'])) {\n\t\t\t\t$this->addUsingAlias(PhilcomreportsPeer::ID, $id['min'], Criteria::GREATER_EQUAL);\n\t\t\t\t$useMinMax = true;\n\t\t\t}\n\t\t\tif (isset($id['max'])) {\n\t\t\t\t$this->addUsingAlias(PhilcomreportsPeer::ID, $id['max'], Criteria::LESS_EQUAL);\n\t\t\t\t$useMinMax = true;\n\t\t\t}\n\t\t\tif ($useMinMax) {\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tif (null === $comparison) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(PhilcomreportsPeer::ID, $id, $comparison);\n\t}", "title": "" }, { "docid": "67fd9ee751f2d163b50cd909c7f2e400", "score": "0.45245394", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(RuleCodePeer::RULE_CODE_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "6b614b545f890c55acad2a128d09975e", "score": "0.45231172", "text": "public function scopeScope($query, $accountId = false)\n {\n\n /*\n * GOD MODE - DON'T UNCOMMENT!\n * returning $query before adding the account_id condition will let you\n * browse all events etc. in the system.\n * //return $query;\n */\n\n if (!$accountId && Auth::check()) {\n $accountId = Auth::user()->account_id;\n }\n\n if ($accountId !== false) {\n $table = $this->getTable();\n\n $query->where(function ($query) use ($accountId, $table) {\n $query->whereRaw(\\DB::raw('('.$table.'.account_id = '.$accountId.')'));\n });\n }\n\n return $query;\n }", "title": "" }, { "docid": "c7e4aac1e5c1088d9bc2c9ebcc403138", "score": "0.45218244", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(LogRequisicaoPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "3ce988d4b7506e4f07cdb4f6bfc43107", "score": "0.45081562", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AliFcTableMap::COL_AID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "f35bcb2dfc9ec4f31a85485b8bb7fff3", "score": "0.45008725", "text": "public function admin_users_filter( $query ) {\n if ( isset( $query->query_vars[ 'yith_wcmbs_user_suppress_filter' ] ) && $query->query_vars[ 'yith_wcmbs_user_suppress_filter' ] )\n return;\n\n remove_action( current_action(), array( $this, __FUNCTION__ ) );\n global $pagenow;\n if ( is_admin() && $pagenow == 'users.php' && isset( $_REQUEST[ 'filter_by_membership_plan' ] ) && $_REQUEST[ 'filter_by_membership_plan' ] != '' ) {\n $membership_plan_id = $_REQUEST[ 'filter_by_membership_plan' ];\n $users_ids_in_plan = YITH_WCMBS_Manager()->get_user_ids_by_plan_id( $membership_plan_id );\n array_push( $users_ids_in_plan, 0 );\n $query->set( 'include', $users_ids_in_plan );\n }\n add_action( current_action(), array( $this, __FUNCTION__ ) );\n }", "title": "" }, { "docid": "2dff4f5e72d0c626cd9e33cec0ba6f6b", "score": "0.4496669", "text": "public function addActiveFilter()\n {\n return $this\n ->addFieldToFilter('status', 1);\n }", "title": "" }, { "docid": "96a0128885b6fc119ef278565518d8e9", "score": "0.44961205", "text": "protected function _user_filter(&$db, $user_id) {\t\t\n\t\t$db->where('uploadedby', (int) $user_id);\n\t}", "title": "" }, { "docid": "cad7b8291f2f4f516d093ed14a6c582f", "score": "0.4495367", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(TarjetaCreditoPeer::ID_TARJETA_CREDITO, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "cc8bade00b50e133e512b24a6663d71a", "score": "0.44905326", "text": "public function filterByPrimaryKey($key)\n {\n return $this->addUsingAlias(CustomValuePeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "818bb1b89c46e210af4b0c7bd1b7c15d", "score": "0.44890246", "text": "public function addActiveFilter()\n {\n return $this->addFieldToFilter('status', 1);\n }", "title": "" }, { "docid": "d0d716fc8bac98af622b13a67e117a34", "score": "0.44827616", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(UsersTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "c17ed30e6e0f617c755c9e51e78ffd84", "score": "0.44765353", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(JournalEntryPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "99d986921e69836d6bf9d8e5e554d112", "score": "0.44614476", "text": "function active_filter($active, $urlParams, $row)\n{\n $userId = api_get_user_id();\n $action = '';\n $image = '';\n if ($active == '1') {\n $action = 'AccountActive';\n $image = 'accept';\n }\n if ($active == '0') {\n $action = 'AccountInactive';\n $image = 'error';\n }\n $result = '';\n\n /* you cannot lock yourself out otherwise you could disable all the accounts including your own => everybody is\n locked out and nobody can change it anymore.*/\n if ($row[0] <> $userId) {\n $result = '<center><img src=\"'.Display::returnIconPath($image.'.png', 16).'\" border=\"0\" alt=\"'.get_lang(ucfirst($action)).'\" title=\"'.get_lang(ucfirst($action)).'\"/></center>';\n }\n\n return $result;\n}", "title": "" }, { "docid": "48575102ca0c4dbc21bf7f1bfc5a0ca6", "score": "0.44555587", "text": "public function getCollectionByAccountId($accountId)\n {\n $orderMapCollection = false;\n $orderMapCollection = $this->_collectionFactory->create()\n ->addFieldToFilter('mage_amz_account_id', $accountId);\n return $orderMapCollection;\n }", "title": "" }, { "docid": "a9174aa3b07edc8a319ef6bf3c6e0ef7", "score": "0.4453739", "text": "public function andFilterWhere(array $condition);", "title": "" }, { "docid": "375ffe830254e0719884468297780830", "score": "0.44505277", "text": "function getAccounts($accId = null){\n\t$accountResult = $GLOBALS['db']->prepare(\"SELECT a.*, SUM(e.amount) FROM accounts a LEFT JOIN expenses e\n\t\t\t\t\t\t\t\t\tON e.account_id = a.account_id\n\t\t\t\t\t\t\t\t\tGROUP BY a.account_id\");\n\t$accountResult->execute();\n\t$accounts = $accountResult->fetchAll(PDO::FETCH_ASSOC);\n\tforeach ($accounts as $key => $value) {\n\t\tunset($accounts[$key]);\n\t\t$new_key = $value['account_id'];\n\t\t$accounts[$new_key] = $value;\n\t}\n\tif(isset($accounts)){\n\t\treturn $accounts;\n\t}else{\n \treturn false;\n }\n\n}", "title": "" }, { "docid": "5f78be23019e9d571b9e92600d9d80b3", "score": "0.4447431", "text": "public function filterById($id = null, $comparison = null)\n\t{\n\t\tif (is_array($id)) {\n\t\t\t$useMinMax = false;\n\t\t\tif (isset($id['min'])) {\n\t\t\t\t$this->addUsingAlias(ClubProfilePeer::ID, $id['min'], Criteria::GREATER_EQUAL);\n\t\t\t\t$useMinMax = true;\n\t\t\t}\n\t\t\tif (isset($id['max'])) {\n\t\t\t\t$this->addUsingAlias(ClubProfilePeer::ID, $id['max'], Criteria::LESS_EQUAL);\n\t\t\t\t$useMinMax = true;\n\t\t\t}\n\t\t\tif ($useMinMax) {\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tif (null === $comparison) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(ClubProfilePeer::ID, $id, $comparison);\n\t}", "title": "" }, { "docid": "33287cc3e9180bf73f4236564eb84e7d", "score": "0.44397697", "text": "public function filterByAid($aid = null, $comparison = null)\n {\n if (is_array($aid)) {\n $useMinMax = false;\n if (isset($aid['min'])) {\n $this->addUsingAlias(AliDmbonusTableMap::COL_AID, $aid['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($aid['max'])) {\n $this->addUsingAlias(AliDmbonusTableMap::COL_AID, $aid['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliDmbonusTableMap::COL_AID, $aid, $comparison);\n }", "title": "" }, { "docid": "4fdb784c3876eebf116e500152611ddf", "score": "0.44293484", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(HistoricoPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "53050883ff663e1351dc9af9bc7b0567", "score": "0.44269103", "text": "abstract public function filter($val);", "title": "" }, { "docid": "db565983ba8024aa6f34b8383717134c", "score": "0.44219258", "text": "public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(ProveedorPeer::ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(ProveedorPeer::ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ProveedorPeer::ID, $id, $comparison);\n }", "title": "" }, { "docid": "6c25d1097751ef19affd2344b4922a23", "score": "0.4406539", "text": "function UserID_Filtering(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "90f92e215f09edf43ee8700fbf335a4a", "score": "0.44040534", "text": "function UserID_Filtering(&$filter) {\r\n\r\n\t\t// Enter your code here\r\n\t}", "title": "" }, { "docid": "1f6a875df6e36429df7029fc5dc745a8", "score": "0.44031817", "text": "public function filterWhere(Builder $dataSource)\r\n {\r\n $adapter = $adapter = $dataSource->getModel()->getReadConnection();\r\n $alias = $dataSource->getCorrelationName($this->_column);\r\n $key = $this->getFilterField()->getKey();\r\n\r\n $this->setBoundParamKey($alias.'_'.$this->_column.'_'.$key);\r\n\r\n\t\treturn $alias.'.'.$this->_column.($this->_criteria == self::CRITERIA_NOTEQ) ? ' NOT ' : ' '. 'BETWEEN :'.$this->getBoundParamKey().'_min: AND :'.$this->getBoundParamKey().'_max:';\r\n\t}", "title": "" }, { "docid": "42f93a9a308075c11335175948d285aa", "score": "0.4389148", "text": "public function setAccountId($id)\n {\n $this->account_id = (string)$id;\n\n return $this;\n }", "title": "" }, { "docid": "237f26647899817625c8299f7166586d", "score": "0.4380982", "text": "public function setAccount($value){\n return $this->setParameter('account', $value);\n }", "title": "" }, { "docid": "82a1b82c4508e09964b3f1bb97c187ae", "score": "0.43790618", "text": "public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(VentaPeer::ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(VentaPeer::ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(VentaPeer::ID, $id, $comparison);\n }", "title": "" }, { "docid": "c93d90f497cfce27d26a740b82a90885", "score": "0.43635684", "text": "public function filter($value);", "title": "" }, { "docid": "c93d90f497cfce27d26a740b82a90885", "score": "0.43635684", "text": "public function filter($value);", "title": "" }, { "docid": "c93d90f497cfce27d26a740b82a90885", "score": "0.43635684", "text": "public function filter($value);", "title": "" }, { "docid": "700113f5d63dc8666b4f1792d684a3d0", "score": "0.43515545", "text": "public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(LicensePeer::ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(LicensePeer::ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(LicensePeer::ID, $id, $comparison);\n }", "title": "" }, { "docid": "aa3fdfb1138354d2f03544b708373efa", "score": "0.4347802", "text": "public function filter ( $total_items, $per_page, $start ){\n\n $this->filter[\"total_items\"] = $total_items;\n $this->filter[\"per_page\"] = $per_page;\n $this->filter[\"start\"] = $start;\n\n }", "title": "" }, { "docid": "581bef928e8f2f9121139108efa9b725", "score": "0.4343022", "text": "public function getAccount($id)\n {\n $stmt = $this->database->prepare('SELECT id, name, balance FROM accounts WHERE user_id = :id');\n $stmt->bindValue('id', $id, PDO::PARAM_INT);\n $stmt->execute();\n foreach($stmt->fetchAll(PDO::FETCH_ASSOC) as $account)\n {\n $accounts[] = new Account($account);\n }\n return $accounts ?? [];\n }", "title": "" }, { "docid": "7f99071d2d69d8541a6e85bb00ef6702", "score": "0.4341117", "text": "public function get_by_id($account_id = null, $optional = array())\r\n {\r\n if (empty($account_id))\r\n {\r\n return '';\r\n }\r\n\r\n $params = array($account_id);\r\n\r\n // Construct SQL query\r\n $sql =\r\n \"SELECT at.accounttype_code, ac.*, ad.*, \" .\r\n \"u.\" . USER_FIRSTNAME . \", \" .\r\n \"u.\" . USER_LASTNAME . \", \" .\r\n \"u.\" . USER_PHONE . \", \" .\r\n \"u.\" . USER_PREFIX . \", \" .\r\n \"DATE_FORMAT(\" . ACCOUNT_EXPIRY . \", '%y') AS \"\r\n . ACCOUNT_EXPIRY_YEAR. \", \" .\r\n \"DATE_FORMAT(\" . ACCOUNT_EXPIRY . \", '%m') AS \"\r\n . ACCOUNT_EXPIRY_MONTH . \" \" .\r\n \", CONCAT(SUBSTRING(ac.account_number,1,4),' XXXXXXXX ',SUBSTRING(account_number,-4)) AS account_safenumber \" . \r\n \", CONCAT(SUBSTRING(ac.account_number,1,4),' XXXXXXXX ',SUBSTRING(account_number,-4)) AS account_number \" . \r\n \", ac.\" . PAYMENT_GATEWAY . \" \" . \r\n \", '***' AS account_security_number \" . \r\n \", '****' AS account_security_pin \" . \r\n \"FROM \" . ACCOUNT_TABLE . \" ac \" .\r\n \"INNER JOIN \" . ADDRESS_TABLE .\" ad ON ac.\" . ADDRESS_ID .\r\n \" = ad.\" . ADDRESS_ID . \" \" .\r\n \"INNER JOIN \" . USER_TABLE . \" u ON ac.\" . USER_ID . \" = u.\" .\r\n USER_ID . \" \" .\r\n \"INNER JOIN \" . ACCOUNTTYPE_TABLE . \" at ON at.\" . ACCOUNTTYPE_ID . \" = ac.\" . ACCOUNT_TYPE . \" \" .\r\n \"WHERE ac.\" . ACCOUNT_ID . \" = ? \" .\r\n \"AND \" . USER_ENABLED . \" = 1 \";\r\n //echo $sql;\r\n if (!empty($optional) && array_key_exists(ACCOUNT_ENABLED, $optional))\r\n { // TODO: decide in when to use enabled flag\r\n //$sql .= \"AND \" . ACCOUNT_ENABLED . \" = ?\";\r\n //array_push($params, $optional[ACCOUNT_ENABLED]);\r\n }\r\n\r\n $query = parent::query($sql, $params);\r\n \r\n $ret = $query->row_array();\r\n \r\n $sql = \"SELECT t.transaction_datetime_paid , t.transaction_amount FROM transaction t WHERE account_id = ? AND transaction_paid = 1 ORDER BY transaction_id DESC LIMIT 1\";\r\n\r\n if( $account_id )\r\n {\r\n $query = parent::query($sql, array($account_id));\r\n $ret = array_merge($ret,$query->row_array());\r\n }\r\n\r\n return $ret;\r\n }", "title": "" }, { "docid": "2d8430a5ea50966d0f8174641ee67042", "score": "0.43284294", "text": "public function filterById($id = null, $comparison = null)\n {\n if (is_array($id)) {\n $useMinMax = false;\n if (isset($id['min'])) {\n $this->addUsingAlias(VolunteerHoursPeer::ID, $id['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($id['max'])) {\n $this->addUsingAlias(VolunteerHoursPeer::ID, $id['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(VolunteerHoursPeer::ID, $id, $comparison);\n }", "title": "" }, { "docid": "5817f0e3fb927d4ca9398ae53dc5827b", "score": "0.43240365", "text": "function seeOnFilter($seeFilter)\n{\n\tglobal $con;\n\t\n\t$query_ConsultaFuncion = sprintf(\"SELECT * FROM inscriptions WHERE id_client = %s\",\n\t\t GetSQLValueString($seeFilter, \"int\"));\n\t//echo $query_ConsultaFuncion;\n\t$ConsultaFuncion = mysqli_query($con, $query_ConsultaFuncion) or die(mysqli_error($con));\n\t$row_ConsultaFuncion = mysqli_fetch_assoc($ConsultaFuncion);\n\t$totalRows_ConsultaFuncion = mysqli_num_rows($ConsultaFuncion);\n\t\n\treturn $row_ConsultaFuncion[\"id_insc\"];\t\n\t\n\tmysqli_free_result($ConsultaFuncion);\n}", "title": "" }, { "docid": "bcf0bd29aed7e7121ce848296650b625", "score": "0.43195018", "text": "public function filter_by_id($customer_id){\n \n $this->db->select(\"*\");\n $this->db->where(\"{$this->customer}.customerid\",$customer_id);\n return $this->db->get($this->customer)->row();\n }", "title": "" }, { "docid": "5c384b41869e5f71c3ec529e63fe19b7", "score": "0.43152767", "text": "function UsersbyIds($user_arr=array()){\r\n\r\nif(empty($user_arr))return false;\t\r\n\r\n$criteria=new CDbCriteria();\r\n\r\n$criteria->addInCondition('id',$user_arr); \r\n\r\n$criteria->order = 'FIELD(id,'.implode(\",\",$user_arr).')';\r\n\r\n$users=users::model()->findAll($criteria);\r\n\r\nreturn $users!=NULL?$users:false;\r\n\r\n}", "title": "" }, { "docid": "50cbd1d31ef5d91c06edbd1fdf4e79b5", "score": "0.4313631", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(AgendaPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "655d7891db79f9391bdb18db19a920b7", "score": "0.43119246", "text": "function filters($filter)\n{\n\tglobal $con;\n\t\n\t$query_ConsultaFuncion = sprintf(\"SELECT * FROM appearance WHERE id_appearance = %s\",\n\t\t\t\t\t\t\t\t\t\t GetSQLValueString($filter, \"int\"));\n\t//echo $query_ConsultaFuncion;\n\t$ConsultaFuncion = mysqli_query($con, $query_ConsultaFuncion) or die(mysqli_error($con));\n\t$row_ConsultaFuncion = mysqli_fetch_assoc($ConsultaFuncion);\n\t$totalRows_ConsultaFuncion = mysqli_num_rows($ConsultaFuncion);\n\t\n\treturn $row_ConsultaFuncion[\"filters\"];\n\t\n\tmysqli_free_result($ConsultaFuncion);\n}", "title": "" }, { "docid": "5b90911ea2499fb1ac75f6fa279cdeed", "score": "0.4308234", "text": "public function getAccount(int $id);", "title": "" }, { "docid": "e1c7d79950e35c50b149f1de0b1cb56e", "score": "0.43064892", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(QuotaTypePeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "1bc93a35a1d302d07d5c98bd7430bbe0", "score": "0.43061352", "text": "protected function applyFilter()\n\t{\n\t\tinclude_once(\"./Services/ADN/AD/classes/class.adnPersonalDataTableGUI.php\");\n\t\t$table = new adnPersonalDataTableGUI($this, \"listPersonalData\", $this->mode);\n\t\t$table->resetOffset();\n\t\t$table->writeFilterToSession();\n\n\t\t$this->listPersonalData();\n\t}", "title": "" }, { "docid": "5f712150ff7a4a498edb87846892412c", "score": "0.43035942", "text": "public function filterByUsuarioId($usuarioId = null, $comparison = null)\n {\n if (is_array($usuarioId)) {\n $useMinMax = false;\n if (isset($usuarioId['min'])) {\n $this->addUsingAlias(LogRequisicaoPeer::USUARIO_ID, $usuarioId['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($usuarioId['max'])) {\n $this->addUsingAlias(LogRequisicaoPeer::USUARIO_ID, $usuarioId['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(LogRequisicaoPeer::USUARIO_ID, $usuarioId, $comparison);\n }", "title": "" }, { "docid": "0dd4d21d671997142ac82a9aaa658454", "score": "0.43007496", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(FeriaPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "5f859378096f7056fcfe67e5df98879d", "score": "0.43000686", "text": "public function filter();", "title": "" }, { "docid": "5f859378096f7056fcfe67e5df98879d", "score": "0.43000686", "text": "public function filter();", "title": "" }, { "docid": "a6935b2fb088fc2d9ca1130dc7441c51", "score": "0.42996153", "text": "abstract protected function filter();", "title": "" }, { "docid": "40bf2f6f4ab660a43785899bbb8f70af", "score": "0.42949152", "text": "public function filtering();", "title": "" }, { "docid": "e4335233fa9c770cd5466ce24a7ad636", "score": "0.42798114", "text": "public function filterWhere(array $condition);", "title": "" }, { "docid": "99b706dfaede24f98c1dd75eeaf61a28", "score": "0.4276013", "text": "public function getFiltered(array $entries);", "title": "" }, { "docid": "dc65944300f08e285cccea0a22c43443", "score": "0.42720976", "text": "public function userFilter($var) {\n\t\t\n\t\t//$var->id = filter_var($var->id, FILTER_SANITIZE_EMAIL);\n\t\tif (isset($var->id) && isset($var->profiletype) && #\n\t\t\t($var->profiletype=='association' || \n\t\t\t $var->profiletype=='admin')) {\n\t\t\t\n\t\t\t// Filter association basing on permissions\n\t\t\tif ($var->permission < 1){\n\t\t\t\t$this->blocked[] = $var;\n\t\t\t} else if ($var->permission == 1){\n\t\t\t\t$this->normals[] = $var;\n\t\t\t} else {\n\t\t\t\t$this->admins[] = $var;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a6a4791bd0902c3be3a79001f801b06c", "score": "0.42715266", "text": "function filteredResultsQuery($filteringKey, $inWhichTable, $lowerLimit = -1, $upperLimit = -1, $colsToFetch = array('*'),$groupByKey = -1) {\n\t\tglobal $_ginfo;\n\t\t$colsToFetch = implode(',', $colsToFetch);\n\t\t$parametersArr = array();\n\t\tif($lowerLimit==-1 && $upperLimit==-1){\n\t\t\treturn array('query'=>' TRUE ','parama'=>$parametersArr);\n\t\t}\n\t\t$parametersArr['lowerlimit'] = $lowerLimit;\n\t\t$parametersArr['upperlimit'] = $upperLimit;\n\t\t\n\t\t$query = \"SELECT \".$colsToFetch.\" FROM \".$inWhichTable.\" WHERE \";\n\t\tif($lowerLimit==-1)\n\t\t\t$query .= \" TRUE AND \";\n\t\telse\n\t\t\t$query .= $filteringKey.\" > {lowerlimit} AND \";\n\t\tif($upperLimit==-1)\n\t\t\t$query .= \" TRUE \";\n\t\telse\n\t\t\t$query .= $filteringKey.\" < {upperlimit} \";\n\t\tif($groupByKey!=-1)\n\t\t\t$query .= \"group by \".$groupByKey.\" \";\n\t\treturn array('query'=>$query,'parama'=>$parametersArr);\n\t}", "title": "" }, { "docid": "0f7c2d993f35c071690abcbe24c29326", "score": "0.42667717", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AliMemberTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "104ca9573f8cf165005c795fd16f961f", "score": "0.42665935", "text": "public function filter()\n {\n return $this->list->filter(...func_get_args());\n }", "title": "" }, { "docid": "dd26defa05d807b1efedbbb978aa697b", "score": "0.42586893", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AsociacionTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "173c0d7d523a7e7ba49671b38ca50915", "score": "0.42544448", "text": "private function _get_datatables_query()\n {\n if(Helper::permission('chart-of-account-bulk-action-delete')){\n $this->column_order = array('','id', 'account_type_id', 'account_title','account_number','balance','status','');\n }else{\n $this->column_order = array('id', 'account_type_id', 'account_title','account_number','balance','status','');\n }\n $query = self::where(['company_id'=>auth()->user()->company_id,'branch_id'=>session()->get('branch')]);\n\n if (!empty($this->accountTypeID)) {\n $query->where('account_type_id', $this->accountTypeID);\n }\n if (!empty($this->account_title)) {\n $query->where('account_title', 'like','%'.$this->account_title.'%');\n }\n if (!empty($this->account_number)) {\n $query->where('account_number', $this->account_number);\n }\n if (!empty($this->balance_from)) {\n $query->where('balance', '>=',$this->balance_from);\n }\n if (!empty($this->balance_to)) {\n $query->where('balance', '<=',$this->balance_to);\n }\n if (!empty($this->status)) {\n $query->where('status',$this->status);\n }\n\n //Do Not Touch This Block Section\n /********************************/\n if (isset($this->_orderValue) && isset($this->_dirValue)) // here order processing\n {\n $query->orderBy($this->column_order[$this->_orderValue], $this->_dirValue);\n\n } else if (isset($this->order)) {\n\n $order = $this->order;\n $query->orderBy(key($order), $order[key($order)]);\n }\n /********************************/\n\n return $query;\n\n }", "title": "" }, { "docid": "6474ef884869704b31306b1b709c31e5", "score": "0.42512277", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(WsAplikasiPeer::APLIKASI_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "fc173afad24b2d2771ee05f0e2839861", "score": "0.4249708", "text": "public function filterByPrimaryKeys($keys)\n {\n\n $this->addUsingAlias(LoginAccountTableMap::COL_ID_ACCOUNT, $keys, Criteria::IN);\n\n return $this;\n }", "title": "" }, { "docid": "3a9362b93d7bf2ca4892ac4191737d71", "score": "0.4248837", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AliTmbonusTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "077f636f572d471c795edc6caae9ad96", "score": "0.42473227", "text": "public function findUserBySocialAccountId($strSocialAccountId) {\n\t\tif ($strSocialAccountId) {\n\t\t\t$criteria = new CDbCriteria();\n\t\t\t$criteria->condition = 'social_account_id = :binSocialAccountId';\n\t\t\t$criteria->params = array(\n\t\t\t\t\t':binSocialAccountId' => $strSocialAccountId\n\t\t\t);\n\t\t\n\t\t\t$modelSocialAccount = self::model()->findAll($criteria);\n\t\t\n\t\t\tif (!empty($modelSocialAccount)) {\n\t\t\t\treturn $modelSocialAccount;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn array();\n\t}", "title": "" }, { "docid": "874ae56bbf75293070cbaf743649174e", "score": "0.42459878", "text": "function getAdvRuleFilterByRuleid($id,$only_columns = false)\n\t{\n\t\tglobal $adb;\n\t\tglobal $modules;\n\n\t\t$sSQL = \"select tbl_s_advancedrulefilters.* from tbl_s_advancedrulefilters inner join tbl_s_advancedrule on tbl_s_advancedrulefilters.advrule_id = tbl_s_advancedrule.advrule_id\";\n\t\t$sSQL .= \" where tbl_s_advancedrulefilters.advrule_id=?\";\n\t\t$result = $adb->pquery($sSQL, array($id));\n\n\t\twhile($advfilterrow = $adb->fetch_array($result))\n\t\t{\n\t\t\tif ($only_columns){\n\t\t\t\tif ($advfilterrow[\"columnname\"] != null){\n\t\t\t\t\t$advfilterlist[] = $advfilterrow[\"columnname\"];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$advft[\"columnname\"] = $advfilterrow[\"columnname\"];\n\t\t\t\t$advft[\"comparator\"] = $advfilterrow[\"comparator\"];\n\t\t\t\t$advft[\"value\"] = $advfilterrow[\"value\"];\n\t\t\t\t$advfilterlist[] = $advft;\n\t\t\t}\n\t\t}\n\t\treturn $advfilterlist;\n\t}", "title": "" }, { "docid": "acf84d5159e98fbd4c11e523f405fe4e", "score": "0.424546", "text": "public function filterByPrimaryKey($key)\n {\n throw new LogicException('The AliReportPoint object has no primary key');\n }", "title": "" }, { "docid": "169485b0e764b50ac446203fed27726e", "score": "0.4241846", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(TbhistoricoPeer::ID_HISTORICO, $key, Criteria::EQUAL);\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "879f40439a6574f84f0a45a90a58bffd", "score": "0.0", "text": "public function edit($id)\n {\n //buscara por id del usuario para editar los datos. mandado del formualrio de list\n $eusuarios=User::find($id);\n if ($eusuarios!=null){\n return view('usuario.edit',compact('eusuarios'));\n }\n else{\n Session::flash('message','El usuario fue desactivado');\n return redirect()->action('ControllerUsers@list');\n\n }\n\n }", "title": "" } ]
[ { "docid": "eaff1ff5ad75e879908bb065beeea534", "score": "0.78924835", "text": "public function edit(Resource $resource)\n {\n return view('actions.resource.edit', compact('resource'));\n }", "title": "" }, { "docid": "f3bc4ff0e0f2cc54bf914d77670e405e", "score": "0.7810695", "text": "public function edit(Resource $resource)\n {\n return view('resource.edit',['resource'=>$resource]);\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.769519", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "4bdbe4ff8aec98fee963bdf4dbf6da91", "score": "0.75132114", "text": "public function edit(FormBuilder $formBuilder, $course, Resource $resource)\n {\n //\n $edit = $formBuilder->create(\\App\\Forms\\Resource::class, [\n 'method' => 'PATCH',\n 'url' => route('resource.update', [$course, $resource->id]),\n 'model' => $resource,\n ]);\n //\n $delete = $formBuilder->create(\\App\\Forms\\DeleteForm::class, [\n 'method' => 'DELETE',\n 'url' => route('resource.destroy', [$course, $resource->id]),\n ]);\n $pageTitle = 'Edit Resource';\n return view('resources.formEdit', compact('edit','delete', 'pageTitle'));\n\n }", "title": "" }, { "docid": "93f7e624d9e32a9fbf006f4f83dae8a8", "score": "0.74871564", "text": "public function edit($id)\n {\n /*show edit form*/\n }", "title": "" }, { "docid": "1404e57fbb5774c03bfe25411f8fe287", "score": "0.73302686", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n \n $data = [\n 'resource' => $resource,\n ];\n\n return view('resources.edit-resource')->with($data);\n }", "title": "" }, { "docid": "ed0028dbd1fbb47ee337d77b8a651d9a", "score": "0.73022586", "text": "public function edit($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\t\treturn View::make('resource/edit', compact('resource'));\n\t}", "title": "" }, { "docid": "4753e80c2af19bb37f8b9df0bf10829e", "score": "0.726226", "text": "public function edit( )\n\t{\n\t\t// show\n\t}", "title": "" }, { "docid": "2d0354bc64da2d977cfd60754017882b", "score": "0.72584474", "text": "public function edit($id)\n {\n $userdata = Resources::findOrFail($id);\n return view('admin.resource.edit', compact('userdata'));\n }", "title": "" }, { "docid": "8c5ec66a768a8406204fdc19e3dec141", "score": "0.72386426", "text": "public function edit($id)\n\t{\n\t\t// Get the resource if it has not been provided by the child class\n\t\tif( ! $this->resource->getKey())\n\t\t\t$this->resource = $this->resource->findOrFail($id);\n\n\t\t$this->layout->subtitle = _('Edit');\n\n\t\treturn $this->loadView(__FUNCTION__, $this->resource->getFillableLabels());\n\t}", "title": "" }, { "docid": "f486aa2dad1b98a29b575e9dba22938d", "score": "0.7132497", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n\n return view('resources.edit')->with(compact('resource'));\n }", "title": "" }, { "docid": "654b96e5d414d66677bf1e3d1695b1d8", "score": "0.7120603", "text": "public function edit_form()\n {\n return View::make(\"app.edit\");\n }", "title": "" }, { "docid": "8640b0c244bf00ab3b420106f09d5eb1", "score": "0.71160936", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BWBlogBundle:Resource')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Resource entity.');\n }\n\n $form = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BWBlogBundle:Resource:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "ecbdcecae7d17f5fd47a1b3471865b07", "score": "0.71144456", "text": "public function edit($resourceId)\n {\n $resource = $this->resource->find($resourceId);\n\n return view('laramanager::resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "ab1c5f00384bd443c0312a8cedd635d9", "score": "0.70970047", "text": "function edit() {\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t$productId = KRequest::getInt('productId');\n\t\t$matrixId = KRequest::getInt('id');\n\n\t\t$view = $this->getDefaultViewForm();\n\t\t$view->setProductId($productId);\n\t\t$view->setMatrixId($matrixId);\n\t\t$view->display();\n\n\t}", "title": "" }, { "docid": "5df52742ed05bd924198604d4236743d", "score": "0.70601755", "text": "public function edit($id)\n {\n //$resource = Resource::findOrFail($id);\n $query = '\"select\":\"*\",\"where\":\"id=' . $id . '\"';\n $data = ResourcesService::getResourcesTableRow($query);\n $resource = $data[\"Result\"][0];\n SyncService::SyncResourcesTable();\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "6c1e231bfb659c518730d45c158fa402", "score": "0.7041746", "text": "public function edit($id)\n\t{\n\t\t$resource = $this->repository->getResource($id);\n\t\t$menuTab = $this->menuTab;\n\t\treturn response()->view('admin.resources.edit', compact(['resource', 'menuTab']));\n\t}", "title": "" }, { "docid": "9c8836b3e3aa143dfa78083f839f6e60", "score": "0.70391995", "text": "public function editAction()\n {\n $request = $this->getRequest();\n\t\t$id = $request->getParam(\"id\");\n\n $form = new Application_Form_Book();\n $book = new Application_Model_Book();\n\t\t$mapper = new Application_Model_BookMapper();\n $mapper->find($id, $book);\n\t\t\n\t\t$form->populate($book);\n\t\t\n\t\t$this->view->form=$form;\n\n }", "title": "" }, { "docid": "96884a0d55f36349b743e3d913248156", "score": "0.70033234", "text": "function edit()\n {\n $this->_view_edit('edit');\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.69474626", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "0aee08a6c8d208457326de0c63ab1d93", "score": "0.69425774", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->revision->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['revision' => $this->revision]);\n\t}", "title": "" }, { "docid": "13550b89e98e00015a895299bc148377", "score": "0.69365096", "text": "public function editAction()\n {\n $assign_id = $this->_getParam('assign');\n $this->_includeForm($assign_id);\n }", "title": "" }, { "docid": "44db8e15fc1352a7c519823621a72cc9", "score": "0.69348013", "text": "public function edit()\n {\n return view('coreplanification::edit');\n }", "title": "" }, { "docid": "6acf67aab48fd2b396026c0eeb096874", "score": "0.6913291", "text": "public function edit()\n {\n return view('prappo::edit');\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.6913111", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "291ee83a27f023635ff2c99d1e9ea7a6", "score": "0.6904886", "text": "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'em' => $this->getDoctrine()->getManager(),\n 'action' => $this->generateUrl('resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array(\n 'label' => 'Update',\n 'attr' => array(\n 'class' => 'btn btn-primary',\n ),\n ));\n\n return $form;\n }", "title": "" }, { "docid": "53a8dd3945e8d394e8af0378fcb0759a", "score": "0.68766063", "text": "public function edit($id)\n\t{\n // get\n $resident = Resident::find($id);\n\n // show the edit form and pass\n return View::make('residents.edit')\n ->with('resident', $resident);\n\t}", "title": "" }, { "docid": "b1f8a3dd503a02e69fbec578be1ee9d1", "score": "0.6865325", "text": "public function editForm($id)\n\t{\n\t\t$job = Job::find($id);\n\t\tif(!$job)\n\t\t{\n\t\t\tApp::abort(404);\n\t\t}\n\n\t\treturn View::make('admin.jobs.edit')->with(array(\n\t\t\t'title' => 'Edition de '.$job->name,\n\t\t\t'job' => $job\n\t\t));\n\t}", "title": "" }, { "docid": "6fe32e6f0c7ebd96d516ccbe60770da8", "score": "0.68651867", "text": "public function edit()\n\t{\n\t\t$jInput = JFactory::getApplication()->input;\n\t\t$jInput->set('view', 'field');\n\t\t$jInput->set('layout', 'default');\n\t\t$jInput->set('hidemainmenu', 1);\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "766ad0e46f9488ff1bb3e99bffd9b013", "score": "0.68605846", "text": "public function edit($id)\n {\n return view('formbuilder::edit');\n }", "title": "" }, { "docid": "3adf6e4a4db6770a78d161ea39e0d09a", "score": "0.68597305", "text": "public function editAction ( )\n {\n $model = $this->getModel($this->_modelName);\n $request = $this->getRequest();\n $form = $model->getForm();\n $params = $request->getParams();\n\n $model->load($request->getParam('id'));\n\n $form->injectDependencies($model, $params);\n\n if (! $model->id) {\n $message = sprintf(self::MSG_LOAD_FAILURE, $this->_modelName);\n $this->flashAndRedirect($message, 'error', array(\n 'module' => $request->getModuleName(),\n 'controller' => $request->getControllerName(),\n 'action' => 'index',\n ));\n }\n\n if ($request->isPost()) {\n try {\n $this->_edit($model, $request);\n } catch (Zend_Exception $exception) {\n $get = $this->_getGetRequest();\n $this->flashAndRedirect($exception->getMessage(), 'error', $get);\n }\n }\n\n $this->view->form = $form;\n $this->view->model = $model;\n\n }", "title": "" }, { "docid": "d56e1574f0c5378fe3811673b7df8b42", "score": "0.6853364", "text": "public function edit($id)\n\t{\n\t\t$this->page_title = 'Edit Associate';\n\t\t$data = $this->rendarEdit($id);\n\t\treturn view('admin.crud.form',$data);\n\t}", "title": "" }, { "docid": "489dd9e64fb4a5c656aedbd3e14c8922", "score": "0.6849436", "text": "public function edit($id)\n\t{\n\t\t$question = Question::findOrFail($id);\n return view('admin.question.form', compact('question'));\n\t}", "title": "" }, { "docid": "9f631e40538fb44577d89db78f7348d8", "score": "0.68490803", "text": "public function edit($id)\n {\n\t\t$user = $this->repository->findOneById($id);\n\n return view($this->base . 'form',compact('user'));\n }", "title": "" }, { "docid": "ebdfabd30fdb198a4595764f3e45e18f", "score": "0.6835259", "text": "public function actionEdit()\n {\n $this->view->article = Article::findById((int)$_GET['id']);\n $this->view->display(__DIR__ . '/../../../templates/admin/edit.php');\n }", "title": "" }, { "docid": "8f4207c19a0c7a6f7e5ad8a14497a90f", "score": "0.68264955", "text": "public function edit($id)\n\t{\n\t\treturn \"Shows a form for editing a specific post\";\n\t}", "title": "" }, { "docid": "3968d721d2d6a0540f1d6feba20cef0c", "score": "0.6824088", "text": "public function edit($id)\n {\n return view('controllers.resource-controllers.edit', compact('id'));\n }", "title": "" }, { "docid": "43a06ccc90a0e604ffd06cacb786b0ff", "score": "0.682211", "text": "public function edit($id)\n\t{\n\t\t$student = $this->students->findById($id);\n return View::make('students._form', array('student' => $student, 'exists' => true));\n\n\t}", "title": "" }, { "docid": "dd6567bb75ad8b2f5dcd4461b639f0e6", "score": "0.6821583", "text": "public function edit($id)\n {\n $form = Form::find($id);\n return view('formbuilder::form.edit',compact('form'));\n }", "title": "" }, { "docid": "ca5f52bec4884c7fcd8605fda797f2e0", "score": "0.6813522", "text": "public function edit($id)\n {\n $form =\\App\\Form::find($id);\n return view('form.edit',compact('form'));\n }", "title": "" }, { "docid": "07993cef1b04896170dffd4d46ed96aa", "score": "0.6813223", "text": "public function edit($class_id, $resource)\n {\n //\n }", "title": "" }, { "docid": "42fefa0bb00f6a35ff461a006d5fb4fe", "score": "0.681089", "text": "public function editForm()\n {\n $data = [\n 'question' => App::get('database')->select('questions', 'id', $_GET['id']),\n 'answers' => App::get('database')->select('answers', 'answer_id', $_GET['id'])\n ];\n\n return view('questions.edit', compact('data'));\n }", "title": "" }, { "docid": "5dbf6a424144f5f1ea70f7e2584cb814", "score": "0.6806671", "text": "public function edit()\r\n {\r\n return view('admin::edit');\r\n }", "title": "" }, { "docid": "b2548057b424e6a5cacb6db19ee658ae", "score": "0.6804348", "text": "public function edit()\n {\n return view('api::edit');\n }", "title": "" }, { "docid": "62c2bf22604789e0fe0631318bc4da7e", "score": "0.6795873", "text": "public function edit() {\n\t\t/* CHANGED - switched to url(\"id\") as $this->param(\"id\") is deprecated */\n\t $this->id = WaxUrl::get(\"id\");\n\t\tif(!$this->id) $this->id = $this->route_array[0];\n $this->model = new $this->model_class($this->id);\n \n\t\t$this->form = $this->render_partial(\"form\");\n\t\tif($_POST['cancel']) $this->redirect_to(Session::get(\"list_refer\"));\n\t\tif($_POST['save']) $this->save($this->model, \"edit\");\n\t\telse $this->save($this->model, Session::get(\"list_refer\"));\n\t}", "title": "" }, { "docid": "4d4b5c8d6ba885d863626bf0f1e99725", "score": "0.6792428", "text": "public function edit($id)\n\t{\n\t\t$this->resources = array('car' => $this->resource,\n \t\t\t\t\t\t\t\t 'categories' => Category::ClassListSelectInput(),\n \t\t\t\t\t\t\t\t 'carList' => Car::carListSelectOptions()\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": "86d596efe1714c0e50410fc7134cd9e3", "score": "0.6791974", "text": "public function edit()\n {\n return view('berating::edit');\n }", "title": "" }, { "docid": "2147ded57d317abac917ded7bf4c5589", "score": "0.6790756", "text": "public function edit($id)\n {\n $record = $this->model->findOrFail($id);\n\n $this->viewData['record'] = $record;\n\n $this->viewData['formMethod'] = 'PUT';\n $this->viewData['formAction'] = 'user.update';\n\n return view($this->defaultFormView, $this->viewData);\n }", "title": "" }, { "docid": "cadf80168cda3fc14631174ff8ec05e6", "score": "0.67702585", "text": "public function editAction()\n {\n $model = $this->_initModel();\n\n // make sure that the model exists before continuing\n if ($this->_getRequestedId() && !$model && !$model->getId()) {\n Mage::getSingleton('adminhtml/session')->addError($this->__('This ' . $this->_getObjectLabel() . ' no longer exist or is corrupt.'));\n $this->_redirect('*/*/');\n } else {\n $this->_initAction()->renderLayout();\n }\n }", "title": "" }, { "docid": "b475fc8e937568a510257d6507f3a6e2", "score": "0.6770107", "text": "public function edit($id)\n {\n $product = Product::find($id);\n return view('admin.product.form',[ 'product' => $product ]);\n }", "title": "" }, { "docid": "5bf37156a011a54f8d1f89ba96911864", "score": "0.676094", "text": "public function edit(Form $form)\n {\n return view('forms.edit',compact('form'));\n }", "title": "" }, { "docid": "ac62d8f04a855af96ee81ddcc7f43f6a", "score": "0.67512125", "text": "public function edit(): void\n {\n $this->showEditPage($this->getItem());\n }", "title": "" }, { "docid": "e87e608ddadfa3687caa6cc9477425cf", "score": "0.6747314", "text": "public function edit($id)\n {\n $is_edit = true;\n $product = Product::find($id);\n\n return view('products.form', compact('product', 'is_edit'));\n }", "title": "" }, { "docid": "f317696c87c55af5bdb2c774e7855698", "score": "0.6742636", "text": "public function edit(Resource $resource)\n {\n //\n // $this->authorize('update',Resource::class);\n // $page=Page::all();\n // return view('resource.edit',compact('page','resource'));\n return response()->json($resource);\n }", "title": "" }, { "docid": "2a0de8686ce09f7bacd45838296d3aac", "score": "0.67410463", "text": "public function edit($id)\n {\n if(Gate::denies('familia-edit')){\n abort(403,\"Não autorizado!\");\n }\n\n $familia = Familia::find($id);\n\n return view('familias.form',compact('familia'));\n }", "title": "" }, { "docid": "6d0cd677e592e2179223532437971edd", "score": "0.6729273", "text": "public function edit($id)\n\t{\n return view($this->path . 'edit', ['record' => Record::find($id)] );\n\t}", "title": "" }, { "docid": "8ecab6633b0244e83acc1262c8f70524", "score": "0.6726292", "text": "public function edit($id)\n\t{\n\t\t$famoso = Famoso::find($id);\n\n\t\t// show the edit form and pass the object\n\t\treturn View::make('famoso.edit')\n\t\t\t->with('famoso', $famoso);\n\t}", "title": "" }, { "docid": "5e95479074ff3a4269a77c41326ace59", "score": "0.67248", "text": "public function editing(){\n\t\t/// Send the user to this view\n\t\t$this->render(\"editing\");\n\t}", "title": "" }, { "docid": "e9232910411eba7ae6c98603663c9453", "score": "0.67211163", "text": "public function edit($id)\n {\n $company = Company::find($id);\n $company->form_action = $this->getRoute() . '.update';\n $company->page_title = 'Company Edit Page';\n // Add page type here to indicate that the form.blade.php is in 'edit' mode\n $company->page_type = 'edit';\n return view('backend.companies.form', [\n 'company' => $company\n ]);\n }", "title": "" }, { "docid": "73c3c8ef8ccb5ebffbd7c9d1617e5de2", "score": "0.67186904", "text": "public function editForm() {\n\t\t$layout = $this->input->get('layout', null, 'string');\n\t\t$nameModelForm = (empty($layout)) ? $this->nameKey.'form' : $layout.'form';\n\t\t$layout = (empty($layout)) ? 'edit' : 'edit_'.$layout; //BmDebug::log($layout, __method__);\n\t\t$view = $this->getView($this->default_view,\n\t\t\tJFactory::getDocument()->getType(), '', array('layout' => $layout));\n\t\t$view->setModel($this->getModel($this->nameKey));\n\t\t$view->setModel($this->getModel($nameModelForm));\n\t\t$view->editForm();\n\t}", "title": "" }, { "docid": "1d24319a1462677632ee7717aa20a61d", "score": "0.6717305", "text": "public function edit($id)\n { \n \treturn view(\"gestion.formularios.edit\",[\"formulario\"=>Formulario::findOrFail($id)]); \n }", "title": "" }, { "docid": "2a667f76d35f0224dbbf223e12e110af", "score": "0.67093575", "text": "public function actionEdit($id)\n\t{\n\t\t$form = $this->getComponent('rightResourceForm');\n\t\t/* @var $form Form */\n\n\t\t$submit = $form->addSubmit(FormBuilder::SUBMIT_EDIT, 'upravit zdroj oprávnění');\n\t\t$submit->onClick[] = callback($this,'edit');\n\n\t\t$form->addSubmit('stortno', \"storno\")->setValidationScope(false)->onClick[] = callback($this,'formStorno');\n\t}", "title": "" }, { "docid": "4e3f60120231c9e9fb4516dda6cad799", "score": "0.6701199", "text": "public function edit($id)\n {\n $entity = Entity::query()->find($id);\n return view('crudgenerator::entities.edit', compact('entity'));\n }", "title": "" }, { "docid": "a7dded643ee65e6b9cf08ef89ee539b6", "score": "0.6701186", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->presentation->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['presentation' => $this->presentation]);\n\t}", "title": "" }, { "docid": "b3e1f1e6d5549bd781053c989eb1e847", "score": "0.66972214", "text": "public function edit($id)\n {\n $author = Author::find($id);\n return view('admin.author.form',['author' => $author]); \n }", "title": "" }, { "docid": "fe08627e9afbe6ed7f13f71f273030a1", "score": "0.6696401", "text": "public function edit($id)\n\t{\n $employee = Employee::find($id);\n return View::make('system.Employee.edit',compact(\"employee\"));\n\t}", "title": "" }, { "docid": "b8547be61d1a0bb98b26ec7de01610cd", "score": "0.668774", "text": "public function edit($id, FormBuilder $form_builder): Renderable\n {\n $existing_product = $this->product_repository->getById($id);\n\n $form = $form_builder->create('App\\Forms\\Product\\EditForm', [\n 'method' => 'PUT',\n 'url' => route('product.update'),\n 'model' => $existing_product\n ]);\n\n return view('product.modify', compact('form'));\n }", "title": "" }, { "docid": "bf49bc8226e13e2862c2259d16e93588", "score": "0.6682422", "text": "public function edit($id)\n {\n $product = Product::find($id);\n return view('products.edit_form')->with('product', $product)->with('manufacturers', Manufacturer::all());\n }", "title": "" }, { "docid": "6c0376e096733d3b0fa90503eef2434b", "score": "0.66796196", "text": "public function edit()\n {\n return view('bangunan::edit');\n }", "title": "" }, { "docid": "44ff363bc16fe7311c23454456531dbc", "score": "0.6679247", "text": "public function edit_item()\n {\n $this->check_authorization();\n \n $id = $this->get_arg('id', 0);\n $item = Item::find($id); \n $data['item'] = $item;\n $data['breadcrumbs'] = $this->generate_breadcrumbs(\n $item->category_id,\n array('/show_item?id='.$item->id => $item->name)\n );\n\n return new View('item_form', $data); \n }", "title": "" }, { "docid": "41567083a127c71ff96104505b7b5dec", "score": "0.6676899", "text": "public static function edit()\n {\n $record = todos::findOne($_REQUEST['id']);\n self::getTemplate('edit_task', $record);\n\n }", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.666716", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "98c3057a696eb14943e7e5fea5851c0b", "score": "0.6666833", "text": "public function edit($id)\n {\n return $this->showForm($id);\n }", "title": "" }, { "docid": "adb01bd13a4dfbf550016516570e7b60", "score": "0.6665537", "text": "public function edit($id)\n\t{\n\t\t$this->resources = array('station' => $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": "5fa4968110c48bd9bdcff5495b19f29a", "score": "0.6654247", "text": "public function edit()\n {\n return view('task::edit');\n }", "title": "" }, { "docid": "c13dfacb9aed13d70a670ff15ea907b6", "score": "0.6651044", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EmpleadoBundle:Empleado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Empleado entity.');\n }\n\n $editForm = $this->createForm(new EmpleadoType(), $entity);\n \n\n return $this->render('PanelBundle:Empleado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }", "title": "" }, { "docid": "58f55c0117c1a36e605cb5c2aabc68e3", "score": "0.6642671", "text": "public function edit() {\n\t\t$author = pick_arg(Author::class) ?: new Author;\n\t\treturn $this->viewEdit(compact('author'));\n\t}", "title": "" }, { "docid": "221efc99f3dd40c0f971d42862c5b218", "score": "0.6637486", "text": "public function edit($id)\n\t{\n\t\tif(!$this->autorizado) return Redirect::to('/login');\n\t\t$modelo = Modelo::find($id);\n\t\tif (is_null ($modelo))\n\t\t{\n\t\t\tApp::abort(404);\n\t\t}\n\t\treturn View::make('models.form')->with('modelo', $modelo);\n\t}", "title": "" }, { "docid": "b912d383bf373377209a233f3ceefe90", "score": "0.6630979", "text": "public function editAction($id) {\r\n $em = $this->getDoctrine()->getEntityManager();\r\n\r\n $entity = $em->getRepository('MedicinaKernelBundle:Oficina')->find($id);\r\n\r\n if (!$entity) {\r\n throw $this->createNotFoundException('No se ha encontrado la oficina solicitada');\r\n }\r\n\r\n $editForm = $this->createForm(new OficinaType(), $entity);\r\n\r\n return $this->render('BackendBundle:Oficina:edit.html.twig', array(\r\n 'entity' => $entity,\r\n 'form' => $editForm->createView(),\r\n ));\r\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6629606", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "e69682a60ea811251468072e63bf80cb", "score": "0.6627009", "text": "public function showEditForm($id)\n\t{\n\t\t$post = Post::where('id', $id)->first();\n\t\treturn view('admin.post.edit', ['post' => $post]);\n\t}", "title": "" }, { "docid": "bb154b1db81c97b24dc305b03e48e156", "score": "0.66258526", "text": "function edit() {\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "4ba7055b2304ab3f588267e488d1cfb9", "score": "0.6623131", "text": "function viewedit(){\n $id=Request::read('id');\n \n $nota = $this->getModel()->getNota($id);\n $this->getModel()->addData('titulo', $nota->getTitulo());\n $this->getModel()->addData('contenido', $nota->getContenido());\n $this->getModel()->addData('favorito', $nota->getFavorito());\n $this->getModel()->addData('idNotas', $nota->getId());\n $this->getModel()->addData('idUsuario', $nota->getIdUsuario());\n $this->getModel()->addFile('form', 'sections/nota/formEdit.html');\n }", "title": "" }, { "docid": "afb09dad84e30958b4252ef05c35ffd3", "score": "0.6620521", "text": "public function editView() {\n $this->edit = true;\n $this->addView();\n }", "title": "" }, { "docid": "c9ce59f5b770500a9924cc8e0f97bf72", "score": "0.6619644", "text": "public function edit($id)\n {\n $resident = Resident::where('id','=',$id)->with('relatives')->first();\n return view('survey.family-member-form.edit', compact('resident'));\n }", "title": "" }, { "docid": "63720603ef56686d63e3133a9a3ec385", "score": "0.66143847", "text": "public function edit()\n {\n return view('mgdestino::edit');\n }", "title": "" }, { "docid": "09ca9097e9f59afd7ab61c2fa4368b57", "score": "0.661253", "text": "public function showEditForm($id)\r\r\n {\r\r\n $userinfo = User::findOrFail($id);\r\r\n return view('/auth/edituser', compact('userinfo'));\r\r\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.6611915", "text": "public function edit($id);", "title": "" }, { "docid": "f77eec10d5891a2545e2b33ab8d59228", "score": "0.6610485", "text": "public function edit()\n {\n $company = Company::first();\n return view('company.edit',compact('company'));\n }", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.6610249", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.6610249", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "9ec66c39b4a9570023bc9493ee748e0e", "score": "0.6607048", "text": "protected function editAction()\n {\n $this->editAction\n ->setAccess($this, Access::CAN_EDIT)\n ->setOwnerAccess($this)\n ->execute($this, UserEntity::class, UserActionEvent::class, NULL, __METHOD__, [], ['user_id' => $this->thisRouteID()])\n ->render()\n ->with(\n [\n 'user' => $this->toArray($this->findOr404()),\n 'check_icon' => '<li><ion-icon name=\"checkmark-outline\"></ion-icon></li>',\n 'close_icon' => '<ion-icon name=\"close-outline\"></ion-icon>'\n ]\n )\n ->form($this->formUser)\n ->end();\n }", "title": "" }, { "docid": "f1396c5dcd191e30f534693231be69da", "score": "0.6603662", "text": "public function edit()\n {\n return view('usersupplier::edit');\n }", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.65986454", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "5f22addb2b8cf9ad635b7e8fa77bb71c", "score": "0.6596766", "text": "public function edit()\n {\n return view('mgcatalogos::edit');\n }", "title": "" }, { "docid": "751bc10498bcb4f6f6569034693a7061", "score": "0.65928566", "text": "public function edit($id)\n {\n $template = (object) $this->template;\n $form = $this->form();\n $data = SPM::find($id);\n return view('admin.master.edit',compact('template','form','data'));\n }", "title": "" }, { "docid": "bdaf931446dd96d9ab719a5b26c06691", "score": "0.6591597", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $form = $formBuilder->create(\\App\\Forms\\BookForm::class, [\n 'method' => 'PUT',\n 'url' => route('book.update',$id),\n ]);\n $books = Book::find($id);\n return view($this->folder.'.edit',compact('books','form'));\n }", "title": "" }, { "docid": "fbf7adc2631fd986ff97047f975f7733", "score": "0.6591146", "text": "public function formEdit($id)\n {\n //data poli berdasarkan id poli\n $poli = Poli::find($id);\n\n return view('poli.edit', compact('poli'));\n }", "title": "" }, { "docid": "300b72dd1771af8bcd33044e19ed0e2d", "score": "0.65877336", "text": "public function edit($id)\n\t{\n\t\t// get the nerd\n\t\t$user = Cliente::find($id);\n\n\t\t// show the edit form and pass the nerd\n\t\treturn View::make('preinscrito.editar')\n\t\t\t->with('user', $user);\n\t}", "title": "" }, { "docid": "f39615b9da8997b13628876a6e82ad26", "score": "0.6585353", "text": "public function edit()\n {\n return view('bill::edit');\n }", "title": "" }, { "docid": "48a8ca09ce387a26578ef11260681196", "score": "0.65815216", "text": "public function editform($id){\n $cultivo = Cultivo::findOrFail($id);\n\n return view(\"editform\", compact(\"cultivo\"));\n }", "title": "" } ]
de5cdf39da9fdc3af589e7db2d719790
Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose. Each line item represents one charge for goods and services rendered. Details such as date, code and amount are found in the referenced ChargeItem resource.
[ { "docid": "14ace71fa3fd6c148f7c4df59b807c15", "score": "0.0", "text": "public function getLineItem(): ?array\n\t{\n\t\treturn $this->lineItem;\n\t}", "title": "" } ]
[ { "docid": "0834894bb6be1b13cb6a57d36f4e60fa", "score": "0.5585176", "text": "public function calculateInvoice() {\r\n\r\n\t\t\t// Loop through the array of InvoiceItems and add it's\r\n\t\t\t// item total to the current invoiceTotal\r\n\t\t\tforeach ($this->getInvoiceItems() as $invoiceItem) {\r\n\r\n\t\t\t\t$this->setInvoiceTotal($this->getInvoiceTotal()\r\n\t\t\t\t\t\t+ $invoiceItem->calculateItemTotal());\r\n\r\n\t\t\t}\r\n\r\n\t\t\treturn $this->getInvoiceTotal();\r\n\r\n\t\t}", "title": "" }, { "docid": "725f414ba7860ed64033a197c3ed4603", "score": "0.53923583", "text": "public function Invoices ()\n\t\t{\n\t\t\t/* ORIGINAL\n\t\t\t$ivlInvoices = new Invoices;\n\t\t\t$ivlInvoices->Constrain ('Account', '=', $this->Pull ('Id')->getValue ());\n\t\t\treturn $ivlInvoices;\n\t\t\t*/\n\t\t\t\n\t\t\treturn new Invoices($this->Pull ('Id')->getValue ());\n\t\t\t\n\t\t}", "title": "" }, { "docid": "dddc5572dc19489923734b87b1d131da", "score": "0.5355765", "text": "public function generateInvoice()\n {\n $i = new Invoice();\n // Get Invoice column mapping and intersect with Recurring one\n // to remove non common columns. Unset id and type columns.\n \n $iKeys = array_flip(array_keys($i->getTable()->getColumns()));\n $data = $this->toArray(false);\n unset($data['id'], $data['type'], $data['must_occurrences'], $data['created_at'], \n $data['last_execution_date'], $data['occurrences']);\n $data = array_intersect_key($data, $iKeys);\n \n // Add specific fields for Invoice and hydrate.\n $data = array_merge($data, array(\n 'recurring_invoice_id' => $this->getId(),\n 'issue_date' => sfDate::getInstance()->format('Y-m-d'),\n 'due_date' => sfDate::getInstance()->addDay($this->getDaysToDue())->format('Y-m-d'),\n 'draft' => false\n ));\n $i->fromArray($data);\n \n // Copy Items and taxes\n foreach ($this->Items as $item)\n {\n $iTmp = $item->copy(false);\n foreach ($item->Taxes as $tax)\n {\n $iTmp->Taxes[] = $tax;\n }\n $i->Items[] = $iTmp;\n }\n // copy tags\n foreach ($this->getTags() as $tag)\n {\n $i->addTag($tag);\n }\n \n if($i->trySave())\n {\n $this->setLastExecutionDate(sfDate::getInstance()->format('Y-m-d'));\n $this->save();\n }\n \n return $i;\n }", "title": "" }, { "docid": "5349839c5a2303da810e954a87ba6ee2", "score": "0.5333473", "text": "public function invoices()\n {\n return $this->hasMany('App\\Cove\\Invoice', 'pk_item', 'pk_item');\n }", "title": "" }, { "docid": "5da2f9d3d9d3aa15e27d4068e94cbd8c", "score": "0.52209294", "text": "public static function generateInvoiceArray ( ) {\n\t\t# Generate Array \n\t\t$invoice = array(\n\t\t\t'id' => intval(rand(50,200)),\n\t\t\t'currency_code' => 'AUD',\n\t\t\t'payment_status' => 'awaiting',\n\t\t\t'weight_unit' => Bal_Payment_Model_Invoice::WEIGHT_UNIT_KGS,\n\t\t\t\n\t\t\t'Payer' => array(\n\t\t\t\t'id' => intval(rand(50,200)),\n\t\t\t\t'firstname' => 'Benjamin',\n\t\t\t\t'lastname' => 'Lupton'\n\t\t\t),\n\t\t\t'InvoiceItems' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' \t\t\t\t\t=> 1,\n\t\t\t\t\t'title' \t\t\t\t=> 'My First Item',\n\t\t\t\t\t'price_each'\t\t\t=> 1.00,\n\t\t\t\t\t'quantity'\t\t\t\t=> 1,\n\t\t\t\t\t'weight_unit' \t\t\t=> Bal_Payment_Model_InvoiceItem::WEIGHT_UNIT_KGS,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' \t\t\t\t\t=> 2,\n\t\t\t\t\t'title' \t\t\t\t=> 'My Second Item',\n\t\t\t\t\t'price_each'\t\t\t=> 1.00,\n\t\t\t\t\t'quantity'\t\t\t\t=> 3,\n\t\t\t\t\t'weight_unit' \t\t\t=> Bal_Payment_Model_InvoiceItem::WEIGHT_UNIT_KGS,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' \t\t\t\t\t=> 3,\n\t\t\t\t\t'title' \t\t\t\t=> 'My Third Item',\n\t\t\t\t\t'price_each'\t\t\t=> 1.00,\n\t\t\t\t\t'quantity'\t\t\t\t=> 3,\n\t\t\t\t\t\n\t\t\t\t\t'handling_each' \t\t=> 1.00,\n\t\t\t\t\t\n\t\t\t\t\t'tax_each'\t\t\t\t=> 1.00,\n\t\t\t\t\t\n\t\t\t\t\t'weight_each'\t\t\t=> 1.00,\n\t\t\t\t\t'weight_unit'\t\t\t=> Bal_Payment_Model_InvoiceItem::WEIGHT_UNIT_KGS,\n\t\t\t\t\t\n\t\t\t\t\t'discount_each'\t\t\t=> 0.10,\n\t\t\t\t\t\n\t\t\t\t\t'shipping_first' \t\t=> 1.00,\n\t\t\t\t\t'shipping_additional'\t=> 0.50\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' \t\t\t\t\t=> 4,\n\t\t\t\t\t'title' \t\t\t\t=> 'My Fourth Item',\n\t\t\t\t\t'price_each'\t\t\t=> 1.00,\n\t\t\t\t\t'quantity'\t\t\t\t=> 3,\n\t\t\t\t\t\n\t\t\t\t\t'handling_each' \t\t=> 1.00,\n\t\t\t\t\t\n\t\t\t\t\t'tax_each'\t\t\t\t=> 1.00,\n\t\t\t\t\t'tax_each_rate'\t\t\t=> 0.01,\n\t\t\t\t\t\n\t\t\t\t\t'weight_each'\t\t\t=> 1.00,\n\t\t\t\t\t'weight_unit'\t\t\t=> Bal_Payment_Model_InvoiceItem::WEIGHT_UNIT_KGS,\n\t\t\t\t\t\n\t\t\t\t\t'discount_each'\t\t\t=> 0.10,\n\t\t\t\t\t'discount_each_rate'\t=> 0.10,\n\t\t\t\t\t\n\t\t\t\t\t'shipping_first' \t\t=> 1.00,\n\t\t\t\t\t'shipping_additional'\t=> 0.50\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t\n\t\t# Return invoice\n\t\treturn $invoice;\n\t}", "title": "" }, { "docid": "5b9d3c87b1ef754ff37b56c1998c4c04", "score": "0.5188304", "text": "public function addToCharge($item)\n {\n // validation for constraint: itemType\n if (!false) {\n throw new \\InvalidArgumentException(sprintf('The Charge property can only contain items of anyType, \"%s\" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);\n }\n $this->Charge[] = $item;\n return $this;\n }", "title": "" }, { "docid": "febe0c0eeb0089d58db853a252b4707d", "score": "0.5159568", "text": "public function items()\n {\n return $this->hasMany('Modules\\Deliver\\Entities\\InvoiceItem', 'deliver__invoice_id', 'id');\n }", "title": "" }, { "docid": "a2d0a59394bab8d5a11b9863b44889d6", "score": "0.50760794", "text": "private function getAllPaidInFullInvoices(IncomeReportFilter $filter): Collection\n {\n $revenueAccountsIds = $this->glAccountService->getGLAccountsByGroupName(\n AccountTypeGroups::REVENUE,\n $filter->getGLAccountId()\n )\n ->pluck('id')\n ->toArray();\n\n $invoiceItemsTotalQuery = InvoiceItem::withTotalAmountExcludeTax('items_total')\n ->selectRaw('invoice_items.invoice_id')\n ->join('invoices', 'invoice_items.invoice_id', '=', 'invoices.id')\n ->whereIn('gl_account_id', $revenueAccountsIds)\n ->groupBy('invoice_items.invoice_id');\n\n $invoiceItemsFilteredQuery = $filter->apply($invoiceItemsTotalQuery);\n\n $invoicePaymentTotalQuery = InvoicePayment::query()\n ->selectRaw('invoice_payment.invoice_id, SUM(invoice_payment.amount) AS income, invoice_payment.is_fp')\n ->join('invoices', 'invoice_payment.invoice_id', '=', 'invoices.id')\n ->groupBy('invoice_payment.invoice_id', 'invoice_payment.is_fp');\n\n $invoicePaymentFilteredQuery = $filter->apply($invoicePaymentTotalQuery);\n\n $from = sprintf(\n '(%s) AS t1, (%s) AS t2',\n $invoiceItemsFilteredQuery->toSql(),\n $invoicePaymentFilteredQuery->toSql()\n );\n\n $bindings = [$invoiceItemsFilteredQuery->getBindings(), $invoicePaymentFilteredQuery->getBindings()];\n\n $resultQuery = DB::query()\n ->select(['t1.invoice_id', 't2.is_fp'])\n ->fromRaw($from, $bindings)\n ->whereRaw('t1.invoice_id = t2.invoice_id AND t2.income >= t1.items_total');\n\n return $resultQuery->get();\n }", "title": "" }, { "docid": "26b47863685eec1933a7274c4ff1883a", "score": "0.50665796", "text": "public function RecurringCharges ()\n\t\t{\n\t\t\t$rclRecurringCharges = new RecurringCharges ();\n\t\t\t$rclRecurringCharges->Constrain ('Account', '=', $this->Pull ('Id')->getValue ());\n\t\t\treturn $rclRecurringCharges;\n\t\t}", "title": "" }, { "docid": "6245f6d3c24df51dff2c92aea3b03869", "score": "0.50585914", "text": "public function displayInvoice() {\r\n\r\n\t\t\t// Create a table to neatly display the invoice data\r\n\t\t\techo \"<table border=\\\"solid\\\" cellpadding=\\\"5px\\\"><tr><th>ID</th>\"\r\n\t\t\t\t\t. \"<th>Description</th><th>Quantity</th><th>Price Per Item</th>\"\r\n\t\t\t\t\t. \"<th>Item Total</th></tr>\";\r\n\r\n\t\t\t// Display each item's details in a table row\r\n\t\t\tforeach ($this->getInvoiceItems() as $invoiceItem) {\r\n\r\n\t\t\t\t$invoiceItem->display();\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// |total|invoice_total-------------------|\r\n\t\t\techo \"<tr><td>Total</td><td colspan=\\\"4\\\">$\"\r\n\t\t\t\t\t. $this->calculateInvoice()\r\n\t\t\t\t\t. \"</td></tr></table>\";\r\n\r\n\t\t}", "title": "" }, { "docid": "2417d824c67fdee044f4574a2289126a", "score": "0.5051691", "text": "protected function assemble_line_items() {\n\t\t$collection = new LineItems();\n\t\tforeach ( $this->wc_order->get_items() as $line_item_data ) {\n\t\t\t$collection[] = $this->assemble_one_line_item( $line_item_data );\n\t\t}\n\t\treturn $collection;\n\t}", "title": "" }, { "docid": "5e3cdc944984ab4f8d15b190a5846a98", "score": "0.50478816", "text": "abstract protected function getInvoiceNewTotals();", "title": "" }, { "docid": "4beb54caf7a87ce62b1d21eae4a45c88", "score": "0.50068766", "text": "public function purchaseInvoice($accountId, $data) {\n\n $this->connect();\n\n // Set the due date to 30 days.\n $dueDate = strtotime(date(\"Y-m-d\", strtotime(date_format(date('Y-m-d'), 'Y-m-d'))) . \" +30 day\");\n\n $new_invoice = array(\n array(\n \"Type\" => \"ACCPAY\",\n \"Contact\" => array(\n // Xero Beneficiary ContactID.\n \"ContactID\" => $accountId\n ),\n \"Date\" => date('Y-m-d'),\n \"DueDate\" => $dueDate,\n \"InvoiceNumber\" => $data['invoice-number'],\n \"Status\" => \"DRAFT\",\n \"LineAmountTypes\" => \"Inclusive\",\n \"LineItems\"=> array(\n \"LineItem\" => array(\n array(\n \"ItemCode\" => $data['code'],\n \"UnitAmount\" => $data[\"amount\"]\n )\n )\n )\n )\n );\n\n $response = $xero->Invoices ($new_invoice);\n\n return $response;\n\n }", "title": "" }, { "docid": "7c5033f80581265650e5d839bfa286d6", "score": "0.50056106", "text": "public function invoiceLineItems()\n {\n return $this->hasMany(InvoiceLineItem::class);\n }", "title": "" }, { "docid": "2f9178fac3b453060ecff672d63e3333", "score": "0.4987357", "text": "public function chargeToAccount(){\r\n $uuid = $this->_operator->getAccountsInterface()->getUser()->getUUID();\r\n $ic = count($this->_line_items);\r\n $total = 0.00;\r\n for($i=0;$i<$ic;$i++){\r\n $total += $this->_line_items[$i]->getPrice();\r\n }\r\n\r\n $query = $this->_mysqli->prepare(\"UPDATE `client_info` SET `balance`=`balance`+?, `transaction_count`=`transaction_count`+1 WHERE `uuid`=?\");\r\n $query->bind_param(\"di\", $total, $uuid);\r\n $query->execute();\r\n $query->store_result();\r\n if($this->_mysqli->affected_rows != 1){\r\n header(\"tsastatus: 500\");\r\n exit(json_encode(array(\"type\"=>1, \"message\"=>\"Unable to charge account! Transaction NOT completed. \" . $this->_mysqli->affected_rows, \"time\"=>8000)));\r\n }\r\n $query->close();\r\n\r\n $op_id = $this->_operator->getOperator()->getopID();$zero = 0; $emptyString = \"\";\r\n $query = $this->_mysqli->prepare(\"INSERT INTO `trans_completed` VALUES(?,?,?,?,?,?,?)\");\r\n $query->bind_param(\"iiisdis\", $this->_session_id, $op_id, $uuid, $this->_line_item_id_string, $total, $zero, $emptyString);\r\n $query->execute();\r\n $query->store_result();\r\n if($this->_mysqli->affected_rows != 1){\r\n header(\"tsastatus: 500\");\r\n exit(json_encode(array(\"type\"=>1, \"message\"=>\"Unable to close transaction, but Account WAS charged succesfully.\", \"time\"=>8000)));\r\n }\r\n $query->close();\r\n//TODO: report discrepency\r\n\r\n $query = $this->_mysqli->prepare(\"DELETE FROM `trans_sessions` WHERE `id`=? LIMIT 1\");\r\n $query->bind_param(\"i\", $this->_session_id);\r\n $query->execute();\r\n $query->store_result();\r\n if($this->_mysqli->affected_rows != 1){\r\n header(\"tsastatus: 500\");\r\n exit(json_encode(array(\"type\"=>1, \"message\"=>\"Unable to close transaction, but Account WAS charged succesfully.\", \"time\"=>8000)));\r\n }\r\n $query->close();\r\n//TODO: report discrepency\r\n $this->_operator->registerNewTransactionSession();\r\n }", "title": "" }, { "docid": "fae85d1bf0be98d0268d54ae629a6ede", "score": "0.49662182", "text": "public function getAllInvoices(){\n $invoices = OcHeaderInvoice::with(['customer', 'orderCustomers' => function($query){\n $query->with('priceMaster');\n }, 'shipment', 'user'])->get();\n\n foreach($invoices as $invoice){\n $invoice->setInvoiceAttributes();\n }\n\n return $invoices;\n }", "title": "" }, { "docid": "d0340ee33f64755e445dbe73ef35c7eb", "score": "0.49656647", "text": "public function collect(Mage_Sales_Model_Order_Invoice $invoice)\n {\n $totalTax = 0;\n $baseTotalTax = 0;\n $totalHiddenTax = 0;\n $baseTotalHiddenTax = 0;\n\n $order = $invoice->getOrder();\n\n /** @var $item Mage_Sales_Model_Order_Invoice_Item */\n foreach ($invoice->getAllItems() as $item) {\n $orderItem = $item->getOrderItem();\n $orderItemQty = $orderItem->getQtyOrdered();\n\n if (($orderItem->getTaxAmount() || $orderItem->getHiddenTaxAmount()) && $orderItemQty) {\n if ($item->getOrderItem()->isDummy()) {\n continue;\n }\n\n /**\n * Resolve rounding problems\n */\n $tax = $orderItem->getTaxAmount() - $orderItem->getTaxInvoiced();\n $baseTax = $orderItem->getBaseTaxAmount() - $orderItem->getBaseTaxInvoiced();\n $hiddenTax = $orderItem->getHiddenTaxAmount() - $orderItem->getHiddenTaxInvoiced();\n $baseHiddenTax = $orderItem->getBaseHiddenTaxAmount() - $orderItem->getBaseHiddenTaxInvoiced();\n if (!$item->isLast()) {\n $availableQty = $orderItemQty - $orderItem->getQtyInvoiced();\n $tax = $invoice->roundPrice($tax / $availableQty * $item->getQty());\n $baseTax = $invoice->roundPrice($baseTax / $availableQty * $item->getQty(), 'base');\n $hiddenTax = $invoice->roundPrice($hiddenTax / $availableQty * $item->getQty());\n $baseHiddenTax = $invoice->roundPrice($baseHiddenTax / $availableQty * $item->getQty(), 'base');\n }\n\n $item->setTaxAmount($tax);\n $item->setBaseTaxAmount($baseTax);\n $item->setHiddenTaxAmount($hiddenTax);\n $item->setBaseHiddenTaxAmount($baseHiddenTax);\n\n $totalTax += $tax;\n $baseTotalTax += $baseTax;\n $totalHiddenTax += $hiddenTax;\n $baseTotalHiddenTax += $baseHiddenTax;\n }\n }\n\n if ($this->_canIncludeShipping($invoice)) {\n $totalTax += $order->getShippingTaxAmount();\n $baseTotalTax += $order->getBaseShippingTaxAmount();\n $totalHiddenTax += $order->getShippingHiddenTaxAmount();\n $baseTotalHiddenTax += $order->getBaseShippingHiddenTaxAmount();\n $invoice->setShippingTaxAmount($order->getShippingTaxAmount());\n $invoice->setBaseShippingTaxAmount($order->getBaseShippingTaxAmount());\n $invoice->setShippingHiddenTaxAmount($order->getShippingHiddenTaxAmount());\n $invoice->setBaseShippingHiddenTaxAmount($order->getBaseShippingHiddenTaxAmount());\n }\n $allowedTax = $order->getTaxAmount() - $order->getTaxInvoiced();\n $allowedBaseTax = $order->getBaseTaxAmount() - $order->getBaseTaxInvoiced();;\n $allowedHiddenTax = $order->getHiddenTaxAmount() + $order->getShippingHiddenTaxAmount()\n - $order->getHiddenTaxInvoiced() - $order->getShippingHiddenTaxInvoiced();\n $allowedBaseHiddenTax = $order->getBaseHiddenTaxAmount() + $order->getBaseShippingHiddenTaxAmount()\n - $order->getBaseHiddenTaxInvoiced() - $order->getBaseShippingHiddenTaxInvoiced();\n\n if ($invoice->isLast()) {\n $totalTax = $allowedTax;\n $baseTotalTax = $allowedBaseTax;\n $totalHiddenTax = $allowedHiddenTax;\n $baseTotalHiddenTax = $allowedBaseHiddenTax;\n } else {\n $totalTax = min($allowedTax, $totalTax);\n $baseTotalTax = min($allowedBaseTax, $baseTotalTax);\n $totalHiddenTax = min($allowedHiddenTax, $totalHiddenTax);\n $baseTotalHiddenTax = min($allowedBaseHiddenTax, $baseTotalHiddenTax);\n }\n\n $invoice->setTaxAmount($totalTax);\n $invoice->setBaseTaxAmount($baseTotalTax);\n $invoice->setHiddenTaxAmount($totalHiddenTax);\n $invoice->setBaseHiddenTaxAmount($baseTotalHiddenTax);\n\n $invoice->setGrandTotal($invoice->getGrandTotal() + $totalTax + $totalHiddenTax);\n $invoice->setBaseGrandTotal($invoice->getBaseGrandTotal() + $baseTotalTax + $baseTotalHiddenTax);\n\n return $this;\n }", "title": "" }, { "docid": "6d97e972ff514cf76d514bdb5916b4d1", "score": "0.49607614", "text": "function recurring_invoice( $invoices, $items) {\n\t\t$this->db->insert( 'invoices', $invoices );\n\t\t$invoice = $this->db->insert_id();\n\t\t\t$loggedinuserid = 0;\n\t\t$i = 0;\n\t\tforeach ( $items as $item ) {\n\t\t\t$this->db->insert( 'items', array(\n\t\t\t\t'relation_type' => 'invoice',\n\t\t\t\t'relation' => $invoice,\n\t\t\t\t'product_id' => $item[ 'product_id' ],\n\t\t\t\t'code' => $item[ 'code' ],\n\t\t\t\t'name' => $item[ 'name' ],\n\t\t\t\t'description' => $item[ 'description' ],\n\t\t\t\t'quantity' => $item[ 'quantity' ],\n\t\t\t\t'unit' => $item[ 'unit' ],\n\t\t\t\t'price' => $item[ 'price' ],\n\t\t\t\t'tax' => $item[ 'tax' ],\n\t\t\t\t'discount' => $item[ 'discount' ],\n\t\t\t\t'total' => $item[ 'total' ],\n\t\t\t) );\n\t\t\t$i++;\n\t\t};\n\t\t//LOG\n\t\t$staffname = 'Ciuis CRM Recurring';\n\t\t$this->db->insert( 'logs', array(\n\t\t\t'date' => date( 'Y-m-d H:i:s' ),\n\t\t\t'detail' => ( '<a href=\"#\"> ' . $staffname . '</a> ' . lang( 'added' ) . ' <a href=\"invoices/invoice/' . $invoice . '\">' . lang( 'invoiceprefix' ) . '-' . $invoice . '</a>.' ),\n\t\t\t'staff_id' => $loggedinuserid,\n\t\t\t'customer_id' => $invoices['customer_id']\n\t\t) );\n\t\t//NOTIFICATION\n\t\t$staffavatar = 'defualt-avatar.jpg';\n\t\t$this->db->insert( 'notifications', array(\n\t\t\t'date' => date( 'Y-m-d H:i:s' ),\n\t\t\t'detail' => ( '' . $staffname . ' ' . lang( 'isaddedanewinvoice' ) . '' ),\n\t\t\t'customer_id' => $invoices['customer_id'],\n\t\t\t'perres' => $staffavatar,\n\t\t\t'target' => '' . base_url( 'area/invoice/' . $invoice . '' ) . ''\n\t\t) );\n\t\t//--------------------------------------------------------------------------------------\n\t\t\t$status = 3;\n\t\t$this->db->insert( $this->db->dbprefix . 'sales', array(\n\t\t\t'invoice_id' => '' . $invoice . '',\n\t\t\t'status_id' => $status,\n\t\t\t'staff_id' => $loggedinuserid,\n\t\t\t'customer_id' => $invoices['customer_id'],\n\t\t\t'total' => $invoices['total'],\n\t\t\t'date' => date( 'Y-m-d H:i:s' )\n\t\t) );\n\t\t//----------------------------------------------------------------------------------------\n\t\treturn $invoice;\n\t}", "title": "" }, { "docid": "5f20b15f86aa74cb3e3b7776e33cad00", "score": "0.4948975", "text": "public function calculateInvoiceAmount()\n {\n $invoiceAmount = 0;\n $invoiceAmountNet = 0;\n\n // Iterate order details to recalculate the amount.\n /** @var Detail $detail */\n foreach ($this->getDetails() as $detail) {\n $price = round($detail->getPrice(), 2);\n\n $invoiceAmount += $price * $detail->getQuantity();\n\n $tax = $detail->getTax();\n\n $taxValue = $detail->getTaxRate();\n\n // Additional tax checks required for sw-2238, sw-2903 and sw-3164\n if ($tax && $tax->getId() !== 0 && $tax->getId() !== null && $tax->getTax() !== null) {\n $taxValue = $tax->getTax();\n }\n\n if ($this->net) {\n $invoiceAmountNet += Shopware()->Container()->get('shopware.cart.net_rounding')->round($price, $taxValue, $detail->getQuantity());\n } else {\n $invoiceAmountNet += round(($price * $detail->getQuantity()) / (100 + $taxValue) * 100, 2);\n }\n }\n\n if ($this->taxFree) {\n $this->invoiceAmountNet = $invoiceAmount + $this->invoiceShippingNet;\n $this->invoiceAmount = $this->invoiceAmountNet;\n } elseif ($this->net) {\n $this->invoiceAmountNet = $invoiceAmount + $this->invoiceShippingNet;\n $this->invoiceAmount = $invoiceAmountNet + $this->invoiceShipping;\n } else {\n $this->invoiceAmount = $invoiceAmount + $this->invoiceShipping;\n $this->invoiceAmountNet = $invoiceAmountNet + $this->invoiceShippingNet;\n }\n }", "title": "" }, { "docid": "b87070fa0c517b43f4ec8bb18f811677", "score": "0.48972976", "text": "public function invoiceitemreport(){\n\n\t\t$db = new dbconnection();\n\t\t$conn = $db->startconnection();\t\n\n\t\t$query = $conn->prepare(\"select invoice.invoice_no,invoice.date,invoice_master.item_id,item.item_code,item.item_name,item_category.category,item_subcategory.sub_category,item.unit_price,customer.first_name from invoice join invoice_master join item join customer JOIN item_category join item_subcategory on invoice.invoice_no = invoice_master.invoice_no and invoice_master.item_id = item.id and invoice.customer = customer.id and item.item_category = item_category.id and item.item_subcategory = item_subcategory.id\");\n\t\t\n\t\t$query->execute();\n\n\t\t$result = $query->get_result();\n\n\t\treturn $result;\n\t\t\t\n\t\t\t\n\n\t\t}", "title": "" }, { "docid": "c45ee6024d60d9ecfe14ac0c891072f3", "score": "0.48824808", "text": "public function invoiceList() {\n // Fetch the invoices.\n $invoices = $this->beaconBilling->getInvoices();\n\n // Fetch the upcoming invoice.\n $upcoming_invoice = $this->beaconBilling->getUpcomingInvoice();\n\n // Check if the invoice calls failed.\n if (($invoices === FALSE) || ($upcoming_invoice === FALSE)) {\n drupal_set_message(t('An error occurred while loading your invoices. Please try again or contact support for assistance.'), 'error');\n }\n\n // Generate the invoice table header.\n $header = [\n t('Invoice number'),\n t('Date'),\n t('Period beginning'),\n t('Period ending'),\n t('Total'),\n t('Paid'),\n ];\n\n // Generate the build.\n $build = [\n 'upcoming' => [\n '#type' => 'details',\n '#title' => t('Upcoming invoice'),\n '#open' => 'TRUE',\n '#description' => !empty($upcoming_invoice) ? t('This invoice is subject to change.') : NULL,\n 'empty' => [\n '#type' => 'item',\n '#markup' => t('There is currently no invoice to display.'),\n '#access' => empty($upcoming_invoice),\n ],\n 'invoice' => [\n '#theme' => 'table',\n '#header' => $header,\n '#rows' => [$upcoming_invoice ? $this->formatInvoiceTableRow($upcoming_invoice) : []],\n '#access' => !empty($upcoming_invoice),\n ],\n ],\n 'invoices' => [\n '#type' => 'details',\n '#title' => t('Past invoices'),\n '#open' => 'TRUE',\n 'empty' => [\n '#type' => 'item',\n '#markup' => t('There are currently no invoices to display.'),\n '#access' => empty($invoices),\n ],\n 'list' => [\n '#theme' => 'table',\n '#header' => $header,\n '#rows' => [],\n '#access' => !empty($invoices),\n ],\n ],\n 'notice' => [\n '#type' => 'item',\n '#markup' => t('Invoices are updated approximately every 24 hours.'),\n ],\n '#cache' => [\n 'keys' => ['invoices'],\n 'contexts' => [\n 'user',\n ],\n 'tags' => array_merge(\n $this->beaconBilling->getUserSubscription()->getCacheTags(),\n ['user.channels:' . $this->beaconBilling->getUser()->id()]\n ),\n 'max-age' => BeaconBilling::CACHE_LIFETIME,\n ],\n ];\n\n // Add rows for each invoice.\n foreach ($invoices as $invoice) {\n $build['invoices']['list']['#rows'][] = $this->formatInvoiceTableRow($invoice);\n }\n\n return $build;\n }", "title": "" }, { "docid": "0b61360e77d608df81c573559161efc1", "score": "0.48821783", "text": "public function getInvoicesForAccount($account_id) {\n $statement = $this->db->prepare(\"SELECT *\n FROM invoice\n WHERE account_id = :account_id\");\n\n $result = $statement->execute([\n \"account_id\" => $account_id\n ]);\n\n if($result) {\n $invoices = $statement->fetchAll(\\PDO::FETCH_CLASS, 'SteveEdson\\Invoice\\Invoice');\n }\n\n return $invoices;\n }", "title": "" }, { "docid": "11951b43d21ade79667953d32020099d", "score": "0.48690742", "text": "public function show() {\n $order_id = request()->segment(count(request()->segments())); // the order id from url\n $orders = Order::where('_id', $order_id)->get(); // the order from Orders collection\n \n $customer = new Buyer([ // the user's info from Orders collection\n 'name' => $orders[0]['attributes']['billing_fname'].' '.$orders[0]['billing_lname'],\n 'custom_fields' => [\n 'email' => $orders[0]['billing_email'],\n 'telefon' => $orders[0]['billing_phone'],\n 'adresă' => $orders[0]['billing_address'],\n 'oraș' => $orders[0]['billing_city'],\n 'județ' => $orders[0]['billing_county'],\n 'cod poștal' => $orders[0]['billing_zipcode']\n ],\n ]);\n $products = array();\n $quantities = array();\n for($i = 0; $i < count($orders[0]['products']); $i++) {\n $prod = Product::findOrFail($orders[0]['products'][$i]['product_id']);\n $products[] = $prod;\n\n $qty = $orders[0]['products'][$i]['quantity'];\n $quantities[] = $qty;\n }\n \n $items = [];\n foreach ($products as $product) { \n for ($i = 0; $i < count($products); $i++) { //store the quantity that were bought from that specific product \n if ($product['_id'] == $orders[0]['products'][$i]['product_id']) { //if the id from products is equal to the product_id from our collection\n $quantity = $quantities[$i]; \n }\n \n }\n $items[] = (new InvoiceItem())->title($product['name'])\n ->quantity($quantity)\n ->pricePerUnit($product['price']);\n }\n\n $invoice = Invoice::make()\n ->buyer($customer)\n ->dateFormat('d/m/Y')\n ->addItems($items)\n ->logo(public_path('/img/Logo-mirasoil.png'));\n return $invoice->stream();\n }", "title": "" }, { "docid": "8007a105c8df288c90b134958925418c", "score": "0.4855046", "text": "public function process()\n\t{\n\t\tPhpfox::isUser(true);\n\t\tif (($sId = $this->request()->get('item_number')) != '')\n\t\t{\n\t\t define('PHPFOX_SKIP_POST_PROTECTION', true);\n\t\t $this->url()->send('ad.invoice', null,'Payment Completed');\n\t\t}\n\t\t$aCond = array();\n\t\t$aCond[] = 'ai.user_id = ' . Phpfox::getUserId();\n\t\t\n\t\tlist($iCnt, $aInvoices) = Phpfox::getService('ad')->getInvoices($aCond);\n\t\t\n\t\tPhpfox::getService('ad')->getSectionMenu();\n\t\t\n\t\t$this->template()->setTitle(Phpfox::getPhrase('ad.ad_invoices'))\n\t\t\t->setFullSite()\n\t\t\t->setBreadcrumb(Phpfox::getPhrase('ad.advertise'), $this->url()->makeUrl('ad'))\n\t\t\t->setBreadcrumb(Phpfox::getPhrase('ad.invoices'), $this->url()->makeUrl('ad.invoice'), true)\n\t\t\t->setHeader('cache', array(\n\t\t\t\t\t'table.css' => 'style_css'\n\t\t\t\t)\n\t\t\t)\t\t\t\n\t\t\t->assign(array(\n\t\t\t\t\t'aInvoices' => $aInvoices\n\t\t\t\t)\n\t\t\t);\t\n\t}", "title": "" }, { "docid": "df9a49025deaffce3f49abb625b264e2", "score": "0.48288143", "text": "public function getInvoiceitems()\n {\n return $this->hasMany(Invoiceitems::className(), ['bookId' => 'bookId']);\n }", "title": "" }, { "docid": "c483351f04571c898e3dba1aa00a8637", "score": "0.4824913", "text": "protected function _getOrderLines()\n {\n $orderLines = array();\n $this->_appliedStoreCreditsToRefund = (int) round($this->_creditmemo->getBaseCustomerBalanceAmount() * 100, 0);\n $this->_appliedRewardPointsToRefund = (int) round($this->_creditmemo->getBaseRewardCurrencyAmount() * 100, 0);\n\n foreach ($this->_creditmemo->getAllItems() as $orderItem) {\n\n if (empty($orderItem) || $orderItem->hasParentItemId() || $orderItem->getPriceInclTax() == 0 ) {\n continue;\n }\n\n $orderItemQty = $orderItem->getQty();\n\n // If product cannot be loaded by Id get the child order item\n if(is_null($orderItem->getId())) {\n $orderItem = $orderItem->getOrderItem();\n }\n\n // Do not take parent product of bundle\n if($orderItem->getProductType() == 'bundle') {\n continue;\n }\n\n $vatCategory = $this->_getTaxCategory($orderItem->getProduct()->getTaxClassId());\n $unitPrice = (int) round($orderItem->getPriceInclTax() * 100 * -1, 0);\n\n // multiply times quantity to get correct amount spent\n $unitPrice *= $orderItemQty;\n\n $line = array(\n 'articleDescription' => \"Refund: \" . $orderItem->getName(),\n 'articleId' => \"REFUND\",\n 'unitPrice' => $unitPrice,\n 'vatCategory' => $vatCategory,\n 'quantity' => 1,\n );\n\n $orderLines[] = $line;\n }\n\n $orderLines[] = $this->_addShippingLine();\n $orderLines[] = $this->_addDiscountLine();\n $orderLines[] = $this->_addPaymentFeeLine();\n $orderLines[] = $this->_addPositiveAdjustmentLine();\n $orderLines[] = $this->_addAppliedStorecreditsLine();\n $orderLines[] = $this->_addAppliedRewardPointsLine();\n\n return $orderLines;\n }", "title": "" }, { "docid": "69c8c40ffac67f0b3a4409f76c6b41d2", "score": "0.4813068", "text": "public function calculate($invoice_id)\n {\n // Get the basic totals\n $query = $this->db->query(\"\n SELECT SUM(item_subtotal) AS invoice_item_subtotal,\n\t\t SUM(item_tax_total) AS invoice_item_tax_total,\n\t\t SUM(item_subtotal) + SUM(item_tax_total) AS invoice_total,\n\t\t SUM(item_discount) AS invoice_item_discount\n\t\tFROM ip_invoice_item_amounts\n\t\tWHERE item_id IN (\n\t\t SELECT item_id FROM ip_invoice_items WHERE invoice_id = \" . $this->db->escape($invoice_id) . \"\n\t\t )\n \");\n\n $invoice_amounts = $query->row();\n\n $invoice_item_subtotal = $invoice_amounts->invoice_item_subtotal - $invoice_amounts->invoice_item_discount;\n $invoice_subtotal = $invoice_item_subtotal + $invoice_amounts->invoice_item_tax_total;\n $invoice_total = $this->calculate_discount($invoice_id, $invoice_subtotal);\n\n // Get the amount already paid\n $query = $this->db->query(\"\n SELECT SUM(payment_amount) AS invoice_paid\n FROM ip_payments\n WHERE invoice_id = \" . $this->db->escape($invoice_id)\n );\n\n $invoice_paid = $query->row()->invoice_paid ? floatval($query->row()->invoice_paid) : 0;\n\n // Create the database array and insert or update\n $db_array = array(\n 'invoice_id' => $invoice_id,\n 'invoice_item_subtotal' => $invoice_item_subtotal,\n 'invoice_item_tax_total' => $invoice_amounts->invoice_item_tax_total,\n 'invoice_total' => $invoice_total,\n 'invoice_paid' => $invoice_paid,\n 'invoice_balance' => $invoice_total - $invoice_paid\n );\n\n $this->db->where('invoice_id', $invoice_id);\n\n if ($this->db->get('ip_invoice_amounts')->num_rows()) {\n // The record already exists; update it\n $this->db->where('invoice_id', $invoice_id);\n $this->db->update('ip_invoice_amounts', $db_array);\n } else {\n // The record does not yet exist; insert it\n $this->db->insert('ip_invoice_amounts', $db_array);\n }\n\n // Calculate the invoice taxes\n $this->calculate_invoice_taxes($invoice_id);\n\n // Get invoice status\n $this->load->model('invoices/mdl_invoices');\n $invoice = $this->mdl_invoices->get_by_id($invoice_id);\n $invoice_is_credit = ($invoice->creditinvoice_parent_id > 0 ? true : false);\n\n // Set to paid if balance is zero\n if ($invoice->invoice_balance == 0) {\n // Check if the invoice total is not zero or negative\n if ($invoice->invoice_total != 0 || $invoice_is_credit) {\n $this->db->where('invoice_id', $invoice_id);\n $payment = $this->db->get('ip_payments')->row();\n $payment_method_id = ($payment->payment_method_id ? $payment->payment_method_id : 0);\n\n $this->db->where('invoice_id', $invoice_id);\n $this->db->set('invoice_status_id', 4);\n $this->db->set('payment_method', $payment_method_id);\n $this->db->update('ip_invoices');\n\n // Set to read-only if applicable\n if (\n $this->config->item('disable_read_only') == false\n && $invoice->invoice_status_id == get_setting('read_only_toggle')\n ) {\n $this->db->where('invoice_id', $invoice_id);\n $this->db->set('is_read_only', 1);\n $this->db->update('ip_invoices');\n }\n }\n }\n }", "title": "" }, { "docid": "b63f2b819a349f700949be1d9694153b", "score": "0.4790844", "text": "function fill_paid_invoice_array($id, $account_id, $type = 'c') {\r\n\t// to build this data array, all current open invoices need to be gathered and then the paid part needs\r\n\t// to be applied along with discounts taken by row.\r\n\tglobal $db, $currencies;\r\n\t$negate = ((JOURNAL_ID == 20 && $type == 'c') || (JOURNAL_ID == 18 && $type == 'v')) ? true : false;\r\n\r\n\t// first read all currently open invoices and the payments of interest and put into an array\r\n\t$sql = \"select distinct so_po_item_ref_id from \" . TABLE_JOURNAL_ITEM . \" where ref_id = \" . $id;\r\n\t$result = $db->Execute($sql);\r\n\t$paid_indeces = array();\r\n\twhile (!$result->EOF) {\r\n\t\tif ($result->fields['so_po_item_ref_id']) $paid_indeces[] = $result->fields['so_po_item_ref_id'];\r\n\t\t$result->MoveNext();\r\n\t}\r\n\tswitch ($type) {\r\n\t\tcase 'c': $search_journal = '(12, 13)'; break;\r\n\t\tcase 'v': $search_journal = '(6, 7)'; break;\r\n\t\tdefault: return false;\r\n\t}\r\n\t$sql = \"select id, journal_id, post_date, terms, purch_order_id, purchase_invoice_id, total_amount, gl_acct_id \r\n\t\tfrom \" . TABLE_JOURNAL_MAIN . \" \r\n\t\twhere (journal_id in \" . $search_journal . \" and closed = '0' and bill_acct_id = \" . $account_id . \")\";\r\n\tif (sizeof($paid_indeces) > 0) $sql .= \" or (id in (\" . implode(',',$paid_indeces) . \") and closed = '0')\";\r\n\t$sql .= \" order by post_date\";\r\n\t$result = $db->Execute($sql);\r\n\t$open_invoices = array();\r\n\twhile (!$result->EOF) {\r\n\t\tif ($result->fields['journal_id'] == 7 || $result->fields['journal_id'] == 13) {\r\n\t\t $result->fields['total_amount'] = -$result->fields['total_amount'];\r\n\t\t}\r\n\t\t$result->fields['total_amount'] -= fetch_partially_paid($result->fields['id']);\r\n\t\t$result->fields['description'] = $result->fields['purch_order_id'];\r\n\t\t$result->fields['discount'] = '';\r\n\t\t$result->fields['amount_paid'] = '';\r\n\t\t$open_invoices[$result->fields['id']] = $result->fields;\r\n\t\t$result->MoveNext();\r\n\t}\r\n\t// next read the record of interest and add/adjust open invoice array with amounts\r\n\t$sql = \"select id, ref_id, so_po_item_ref_id, gl_type, description, debit_amount, credit_amount, gl_account \r\n\t\tfrom \" . TABLE_JOURNAL_ITEM . \" where ref_id = \" . $id;\r\n\t$result = $db->Execute($sql);\r\n\twhile (!$result->EOF) {\r\n\t\t$amount = ($result->fields['debit_amount']) ? $result->fields['debit_amount'] : $result->fields['credit_amount'];\r\n\t\tif ($negate) $amount = -$amount;\r\n\t\t$index = $result->fields['so_po_item_ref_id'];\r\n\t\tswitch ($result->fields['gl_type']) {\r\n\t\t case 'dsc': // it's the discount field\r\n\t\t\t$open_invoices[$index]['discount'] = $amount;\r\n\t\t\t$open_invoices[$index]['amount_paid'] -= $amount;\r\n\t\t\tbreak;\r\n\t\t case 'chk':\r\n\t\t case 'pmt': // it's the payment field\r\n\t\t\t$open_invoices[$index]['total_amount'] += $amount;\r\n\t\t\t$open_invoices[$index]['description'] = $result->fields['description'];\r\n\t\t\t$open_invoices[$index]['amount_paid'] = $amount;\r\n\t\t\tbreak;\r\n\t\t case 'ttl':\r\n\t\t\t$payment_fields = $result->fields['description']; // payment details\r\n\t\t default:\r\n\t\t}\r\n\t\t$result->MoveNext();\r\n\t}\r\n\tksort($open_invoices);\r\n\r\n\t$balance = 0;\r\n\t$index = 0;\r\n\t$item_list = array();\r\n\tforeach ($open_invoices as $key => $line_item) {\r\n\t\t// fetch some information about the invoice\r\n\t\t$sql = \"select id, post_date, terms, purchase_invoice_id, purch_order_id, gl_acct_id, waiting \r\n\t\t\tfrom \" . TABLE_JOURNAL_MAIN . \" where id = \" . $key;\r\n\t\t$result = $db->Execute($sql);\r\n\t\t$due_dates = calculate_terms_due_dates($result->fields['post_date'], $result->fields['terms'], ($type == 'v' ? 'AP' : 'AR'));\r\n\t\tif ( $negate) {\r\n\t\t $line_item['total_amount'] = -$line_item['total_amount'];\r\n\t\t $line_item['discount'] = -$line_item['discount'];\r\n\t\t $line_item['amount_paid'] = -$line_item['amount_paid'];\r\n\t\t}\r\n\t\t$balance += $line_item['total_amount'];\r\n\r\n\t\t$item_list[] = array(\r\n\t\t\t'id' => $result->fields['id'],\r\n\t\t\t'waiting' => $result->fields['waiting'],\r\n\t\t\t'purchase_invoice_id' => $result->fields['purchase_invoice_id'],\r\n\t\t\t'purch_order_id' => $result->fields['purch_order_id'],\r\n\t\t\t'percent' => $due_dates['discount'],\r\n\t\t\t'early_date' => gen_spiffycal_db_date_short($due_dates['early_date']),\r\n\t\t\t'net_date' => gen_spiffycal_db_date_short($due_dates['net_date']),\r\n\t\t\t'total_amount' => $currencies->format($line_item['total_amount']),\r\n\t\t\t'gl_acct_id' => $result->fields['gl_acct_id'],\r\n\t\t\t'description' => $line_item['description'],\r\n\t\t\t'discount' => $line_item['discount'] ? $currencies->format($line_item['discount']) : '',\r\n\t\t\t'amount_paid' => $line_item['amount_paid'] ? $currencies->format($line_item['amount_paid']) : '',\r\n\t\t);\r\n\t\t$index++;\r\n\t}\r\n return array('balance' => $balance, 'payment_fields' => $payment_fields, 'invoices' => $item_list);\r\n}", "title": "" }, { "docid": "18581bf96753e6ef1c455ec4dd63637d", "score": "0.4782545", "text": "function execute()\n\t{\n\t\t$this->obj_form_item\t\t\t= New invoice_form_item;\n\t\t$this->obj_form_item->type\t\t= \"ar_credit\";\n\t\t$this->obj_form_item->invoiceid\t\t= $this->id;\n\t\t$this->obj_form_item->itemid\t\t= $this->itemid;\n\t\t$this->obj_form_item->item_type\t\t= \"credit\";\n\t\t$this->obj_form_item->processpage\t= \"accounts/ar/credit-items-edit-process.php\";\n\t\t\n\t\t$this->obj_form_item->execute();\n\n\n\n\t\t/*\n\t\t\tCredit Information\n\t\t*/\n\t\t$this->credit\t \t= New credit;\n\t\t$this->credit->id\t= $this->id;\n\t\t$this->credit->type\t= \"ar_credit\";\n\n\t\t$this->credit->load_data();\n\n\n\t\t/*\n\t\t\tFetch details for selected item and overwrite form (if an item is selected)\n\t\t*/\n\n\n\n\t\tif ($this->invoice_item)\n\t\t{\n\t\t\t$sql_item_obj\t\t= New sql_query;\n\t\t\t$sql_item_obj->string\t= \"SELECT type, description, chartid, customid, amount FROM account_items WHERE id='\". $this->invoice_item .\"' LIMIT 1\";\n\t\t\t$sql_item_obj->execute();\n\n\t\t\tif ($sql_item_obj->num_rows())\n\t\t\t{\n\t\t\t\t$sql_item_obj->fetch_array();\n\n\t\t\t\t$description = \"Credit for \";\n\n\t\t\t\tswitch ($sql_item_obj->data[0][\"type\"])\n\t\t\t\t{\n\t\t\t\t\tcase \"standard\":\n\n\t\t\t\t\t\t$description .= sql_get_singlevalue(\"SELECT CONCAT_WS('--', code_chart, description) as value FROM account_charts WHERE id='\". $sql_item_obj->data[0][\"chartid\"] .\"' LIMIT 1\");\n\n\t\t\t\t\t\t// fetch taxes from account_items_options\n\t\t\t\t\t\t$sql_tax_obj\t\t= New sql_query;\n\t\t\t\t\t\t$sql_tax_obj->string\t= \"SELECT option_value FROM account_items_options WHERE itemid='\". $this->invoice_item .\"'\";\n\t\t\t\t\t\t$sql_tax_obj->execute();\n\n\t\t\t\t\t\tif ($sql_tax_obj->num_rows())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sql_tax_obj->fetch_array();\n\n\t\t\t\t\t\t\tforeach ($sql_tax_obj->data as $data_tax)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->obj_form_item->obj_form->structure[\"tax_\". $data_tax[\"option_value\"] ][\"defaultvalue\"]\t= \"on\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tunset($sql_tax_obj);\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"time\":\n\t\t\t\t\tcase \"product\":\n\t\t\t\t\t\t$description .= sql_get_singlevalue(\"SELECT CONCAT_WS('--', code_product, name_product) as value FROM products WHERE id='\". $sql_item_obj->data[0][\"customid\"] .\"' LIMIT 1\");\n\n\t\t\t\t\t\t// fetch taxes from products\n\t\t\t\t\t\t$sql_tax_obj\t\t= New sql_query;\n\t\t\t\t\t\t$sql_tax_obj->string\t= \"SELECT taxid FROM products_taxes WHERE productid='\". $sql_item_obj->data[0][\"customid\"].\"'\";\n\t\t\t\t\t\t$sql_tax_obj->execute();\n\n\t\t\t\t\t\tif ($sql_tax_obj->num_rows())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sql_tax_obj->fetch_array();\n\n\t\t\t\t\t\t\tforeach ($sql_tax_obj->data as $data_tax)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$sql_cust_tax_obj\t\t= New sql_query;\n\t\t\t\t\t\t\t\t$sql_cust_tax_obj->string\t= \"SELECT id FROM customers_taxes WHERE customerid='\". $this->credit->data[\"customerid\"] .\"' AND taxid='\". $data_tax[\"taxid\"] .\"'\";\n\t\t\t\t\t\t\t\t$sql_cust_tax_obj->execute();\n\n\t\t\t\t\t\t\t\tif ($sql_cust_tax_obj->num_rows())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->obj_form_item->obj_form->structure[\"tax_\". $data_tax[\"taxid\"] ][\"defaultvalue\"]\t= \"on\";\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tunset($sql_cust_tax_obj);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tunset($sql_tax_obj);\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"service\":\n\t\t\t\t\tcase \"service_usage\":\n\t\t\t\t\t\t$description .= sql_get_singlevalue(\"SELECT name_service as value FROM services WHERE id='\". $sql_item_obj->data[0][\"customid\"] .\"' LIMIT 1\");\n\n\t\t\t\t\t\t// fetch taxes from services\n\t\t\t\t\t\t$sql_tax_obj\t\t= New sql_query;\n\t\t\t\t\t\t$sql_tax_obj->string\t= \"SELECT taxid FROM services_taxes WHERE serviceid='\". $sql_item_obj->data[0][\"customid\"].\"'\";\n\t\t\t\t\t\t$sql_tax_obj->execute();\n\n\t\t\t\t\t\tif ($sql_tax_obj->num_rows())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sql_tax_obj->fetch_array();\n\n\t\t\t\t\t\t\tforeach ($sql_tax_obj->data as $data_tax)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$sql_cust_tax_obj\t\t= New sql_query;\n\t\t\t\t\t\t\t\t$sql_cust_tax_obj->string\t= \"SELECT id FROM customers_taxes WHERE customerid='\". $this->credit->data[\"customerid\"] .\"' AND taxid='\". $data_tax[\"taxid\"] .\"'\";\n\t\t\t\t\t\t\t\t$sql_cust_tax_obj->execute();\n\n\t\t\t\t\t\t\t\tif ($sql_cust_tax_obj->num_rows())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->obj_form_item->obj_form->structure[\"tax_\". $data_tax[\"taxid\"] ][\"defaultvalue\"]\t= \"on\";\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\tunset($sql_tax_obj);\n\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$description .= \"unknown item\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$description .= \" [\". $sql_item_obj->data[0][\"description\"] .\"]\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// no such invoice item\n\t\t\t\tlog_write(\"error\", \"page\", \"The selected item does not appear to exist.\");\n\t\t\t}\n\n\n\t\t\t/*\n\t\t\t\tAdd Data\n\t\t\t*/\n\n\t\t\t$this->obj_form_item->obj_form->structure[\"amount\"][\"defaultvalue\"]\t\t= $sql_item_obj->data[0][\"amount\"];\n\t\t\t$this->obj_form_item->obj_form->structure[\"chartid\"][\"defaultvalue\"]\t\t= $sql_item_obj->data[0][\"chartid\"];\n\t\t\t$this->obj_form_item->obj_form->structure[\"description\"][\"defaultvalue\"]\t= $description;\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlog_write(\"debug\", \"page\", \"No invoice_item supplied, if an item is being edited, this will be OK.\");\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "d5f0b45bc18d716a23c1b0c7ba6fdc53", "score": "0.47658497", "text": "public function serialize_contract_items($item)\n {\n $doc = new DOMDocument('1.0');\n $doc->formatOutput = true;\n // setup document root 'invoice'\n $root = $doc->createElement('contracts-item');\n\n $doc->appendChild($root);\n $this->add_field($doc, $root, 'id', $item['ContractsItem']['id']);\n $this->add_field($doc, $root, 'active', $item['ContractsItem']['active']);\n $this->add_field($doc, $root, 'contract_id', $item['ContractsItem']['contract_id']);\n $this->add_field($doc, $root, 'description', $item['ContractsItem']['description']);\n $this->add_field($doc, $root, 'amount', $item['ContractsItem']['amt']);\n $this->add_field($doc, $root, 'cost', $item['ContractsItem']['cost']);\n\n\n $this->add_field($doc, $root, 'notes', $item['ContractsItem']['notes']);\n $this->add_field($doc, $root, 'ordering', $item['ContractsItem']['ordering']);\n\n $this->add_field($doc, $root, 'created_date', $item['ContractsItem']['created_date']);\n $this->add_field($doc, $root, 'created_user_id', $item['ContractsItem']['created_user_id']);\n $this->add_field($doc, $root, 'modified_date', $item['ContractsItem']['modified_date']);\n $this->add_field($doc, $root, 'modified_user_id', $item['ContractsItem']['modified_user_id']);\n\n\n\n // timestamp\n $dategenerated = $doc->createElement('date_generated');\n $dategenerated = $root->appendChild($dategenerated);\n $text = $doc->createTextNode(date('D, d M Y H:i:s'));\n $dategenerated->appendChild($text);\n\n\n return $doc->saveXML();\n }", "title": "" }, { "docid": "5095fe7420cd5a461e571f92f0dc4a9e", "score": "0.47634053", "text": "public function invoices()\n {\n return $this->belongsToMany('App\\Invoice', 'invoice_items', 'item_id', 'invoice_id');\n }", "title": "" }, { "docid": "b56d4535adaa15387ce57c8f6e2424f9", "score": "0.47624737", "text": "private function createInvoices($XeroOAuth) {\n\n\t\t$xeroConnection = clone $XeroOAuth;\n\t\t$shopConfig = ShopConfig::current_shop_config();\n\t\t$invoicePrefix = $this->config()->invoicePrefix;\n\t\t$defaultAccountCode = $this->config()->defaultAccountCode;\n\n\t\t$invoices = array();\n\t\t// Orders that have not been sent to Xero and are completed\n\t\t$orders = Order::get()->where(\" \\\"XeroInvoiceID\\\" IS NULL AND \\\"Status\\\" != 'Cart'\");\n\t\t$i = 0;\n\n\t\tif ($orders && $orders->exists()) foreach ($orders as $order) {\n\n\t\t\t$invoices[$i]['Invoice'] = array(\n\t\t\t\t'Type' => 'ACCREC',\n\t\t\t\t'InvoiceNumber' => $invoicePrefix . $order->ID,\n\t\t\t\t'Contact' => array(\n\t\t\t\t\t'Name' => $order->Member()->getName()\n\t\t\t\t),\n\t\t\t\t'Date' => $order->OrderedOn,\n\t\t\t\t'DueDate' => $order->OrderedOn,\n\t\t\t\t'Status' => 'AUTHORISED',\n\t\t\t\t'LineAmountTypes' => 'Exclusive',\n\t\t\t\t'CurrencyCode' => $shopConfig->BaseCurrency\n\t\t\t);\n\n\t\t\t// Line items for each item in the order\n\t\t\t$items = $order->Items();\n\t\t\tif ($items && $items->exists()) foreach ($items as $item) {\n\n\t\t\t\t$object = ($item->Variation()) ? $item->Variation() : $item->Product();\n\n\t\t\t\t$description = $object->Title;\n\t\t\t\tif ($object instanceof Variation) {\n\t\t\t\t\t$description = strip_tags($object->Product()->Title . ' ' . $object->SummaryOfOptions());\n\t\t\t\t}\n\n\t\t\t\t$invoices[$i]['Invoice']['LineItems'][]['LineItem'] = array(\n\t\t\t\t\t'Description' => $description,\n\t\t\t\t\t'Quantity' => $item->Quantity,\n\t\t\t\t\t'UnitAmount' => $item->Price,\n\t\t\t\t\t'AccountCode' => $defaultAccountCode,\n\t\t\t\t\t'TaxType' => $item->XeroTaxType\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Line items for each order modifier\n\t\t\t$modifications = $order->Modifications();\n\t\t\tif ($modifications && $modifications->exists()) foreach ($modifications as $modification) {\n\n\t\t\t\tif ($modification->XeroTaxType) {\n\t\t\t\t\t$invoices[$i]['Invoice']['LineItems'][]['LineItem'] = array(\n\t\t\t\t\t\t\"Description\" => $modification->Description,\n\t\t\t\t\t\t\"Quantity\" => 1,\n\t\t\t\t\t\t\"UnitAmount\" => $modification->Amount()->getAmount(),\n\t\t\t\t\t\t\"AccountCode\" => $defaultAccountCode,\n\t\t\t\t\t\t'TaxType' => $modification->XeroTaxType\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$i++;\n\t\t}\n\n\t\t// If no data do not send to Xero\n\t\tif (empty($invoices)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$invoicesXML = new SimpleXMLElement(\"<Invoices></Invoices>\");\n\t\t$this->arrayToXML($invoices, $invoicesXML);\n\t\t$xml = $invoicesXML->asXML();\n\n\t\t$response = $xeroConnection->request('POST', $xeroConnection->url('Invoices', 'core'), array(), $xml);\n\t\tif ($xeroConnection->response['code'] == 200) {\n\n\t\t\t$invoices = $xeroConnection->parseResponse($xeroConnection->response['response'], $xeroConnection->response['format']);\n\t\t\techo count($invoices->Invoices[0]). \" invoice(s) created in this Xero organisation.\";\n\n\t\t\t// Update Orders that have been pushed to Xero so that they are not sent again\n\t\t\tforeach ($invoices->Invoices->Invoice as $invoice) {\n\n\t\t\t\t$order = Order::get()\n\t\t\t\t\t->filter('ID', str_replace($invoicePrefix, '', $invoice->InvoiceNumber->__toString()))\n\t\t\t\t\t->first();\n\n\t\t\t\tif ($order && $order->exists()) {\n\t\t\t\t\t$order->XeroInvoiceID = $invoice->InvoiceID->__toString();\n\t\t\t\t\t$order->write();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\techo 'Error: ' . $xeroConnection->response['response'] . PHP_EOL;\n\t\t\tSS_Log::log(new Exception(print_r($xeroConnection, true)), SS_Log::NOTICE);\n\t\t}\n\t}", "title": "" }, { "docid": "45656445810e22a8c943b315b29012c6", "score": "0.47397557", "text": "function invoice_item_total($item) {\n\treturn display_currency($item->item_total);\n\t\n}", "title": "" }, { "docid": "6ed4a702a5afd9d7c917ff2e5569c79a", "score": "0.4739485", "text": "public function serialize_invoice_item($item)\n {\n $doc = new DOMDocument('1.0');\n $doc->formatOutput = true;\n // setup document root 'invoice'\n $root = $doc->createElement('invoices-item');\n $doc->appendChild($root);\n\n $this->add_field($doc, $root, 'id', $item['InvoicesItem']['id']);\n $this->add_field($doc, $root, 'invoice_id', $item['InvoicesItem']['invoice_id']);\n\n $this->add_field($doc, $root, 'description', $item['InvoicesItem']['description']);\n\n $this->add_field($doc, $root, 'amount', $item['InvoicesItem']['amount']);\n\n $this->add_field($doc, $root, 'quantity', $item['InvoicesItem']['quantity']);\n\n $this->add_field($doc, $root, 'cost', $item['InvoicesItem']['cost']);\n\n $this->add_field($doc, $root, 'ordering', $item['InvoicesItem']['ordering']);\n\n $this->add_field($doc, $root, 'cleared', $item['InvoicesItem']['cleared']);\n\n\n\n // timestamp\n $dategenerated = $doc->createElement('date_generated');\n $dategenerated = $root->appendChild($dategenerated);\n $text = $doc->createTextNode(date('D, d M Y H:i:s'));\n $text = $dategenerated->appendChild($text);\n\n $new_element = $doc->createElement('invoice-commissions-items');\n $items = array();\n foreach($item['InvoicesItemsCommissionsItem'] as $iitem)\n {\n $items[] = $iitem['id'];\n }\n\n $new_element = $doc->createElement('payments');\n $this->add_id_list_to_element($doc, $new_element, $items);\n $root->appendChild($new_element);\n\n return $doc->saveXML();\n }", "title": "" }, { "docid": "d2c305fdab67c2b0f7f53f1b303cfbf9", "score": "0.4723612", "text": "public function invoices()\n {\n return $this->belongsToMany('App\\CustomerInvoice', 'parent_child', 'parentable_id', 'childable_id')\n ->wherePivot('parentable_type', 'aBillander\\WooConnect\\WooOrder')\n ->wherePivot('childable_type', 'App\\CustomerInvoice')\n ->withTimestamps();\n }", "title": "" }, { "docid": "40c0a7f9c4b6bf36bf0624704279e39a", "score": "0.47144607", "text": "public function getPaidCartItems()\n {\n $params = json_decode($this->params, true);\n $discount = isset($params[\"discount\"]) ? Discount::find($params[\"discount\"]) : null;\n $resources = $params[\"resources\"];\n\n $items = [];\n $total = 0;\n\n foreach($resources as $resource_id => $subtotal){\n try{\n $resource = \\App\\vod\\model\\ResourceAllocated::find($resource_id);\n if($resource){\n $allocation_date = Carbon::createFromFormat('Y-n-j G:i:s', $resource->allocation_date);\n $expiration_date = Carbon::createFromFormat('Y-n-j G:i:s', $resource->expiration_date);\n\n // if resource is a movie get that movie\n if($resource->movie_id){\n $resource_data = Movie::find($resource->movie_id);\n } else if($resource->collection_id){\n // get the collection\n $resource_data = Collection::find($resource->collection_id);\n } else{\n // do nothing\n }\n\n if($resource->status == SUBSCRIPTION_STATUS_LIFETIME){\n $item['duration'] = \"-\";\n } else{\n $diff = $expiration_date->diffInDays($allocation_date);\n $item['duration'] = $diff. \" Days Plan\";\n }\n $item['title'] = ucwords($resource_data->title);\n $item['plan_type'] = $resource->plan_type == PLAN_TYPE_PURCHASE ? \"Download\" : \"Rent\";\n\n $item_discount = $discount ? 0.01 * $discount->discount_percent * $subtotal : 0;\n $item['subtotal'] = round($subtotal - $item_discount, 2);\n }\n\n\n $items[] = $item;\n $total += $item['subtotal'];\n } catch(\\Exception $e){\n continue;\n }\n }\n\n return [\"items\" => $items, \"total\" => $total];\n }", "title": "" }, { "docid": "c53fed2e3ec0086c5bf55d638bced9c1", "score": "0.47103822", "text": "function _makeIBADetail($totals) {\n\t\tglobal $controlFromDate;\n\t\tglobal $controlToDate;\n\n\t\t$START = $controlFromDate;\n\t\t$END = $controlToDate;\n\t\t$ibaReceiptsPaymentsDR = new ControlAccountTotal( 'IBA Receipts/Payments, debits', false, null );\n\t\t$clRecPayDR = &$totals['clRecPayDR'];\n\t\t$icRecPayDR = &$totals['icRecPayDR'];\n\t\t$inRecPayDR = &$totals['inRecPayDR'];\n\n\t\t$amt = 0 - ( $clRecPayDR->get( ) + $icRecPayDR->get( ) + $inRecPayDR->get( ) );\n\t\t$ibaReceiptsPaymentsDR->setAmount( $amt );\n\t\t$totals['ibaReceiptsPaymentsDR'] = &$ibaReceiptsPaymentsDR;\n\n\t\t$ibaReceiptsPaymentsDRcls = new ControlAccountTotal( 'IBA Receipts/Payments, clients, debits', true, null );\n\t\t$clRecPayDR = &$totals['clRecPayDR'];\n\n\t\t$amt = $clRecPayDR->get( );\n\t\t$ibaReceiptsPaymentsDRcls->setAmount( 0 - $amt );\n\t\t$totals['ibaReceiptsPaymentsDRcls'] = &$ibaReceiptsPaymentsDRcls;\n\n\t\t$ibaReceiptsPaymentsDRins = new ControlAccountTotal( 'IBA Receipts/Payments, insurers, debits', false, null );\n\t\t$icRecPayDR = &$totals['icRecPayDR'];\n\n\t\t$amt = 0 - $icRecPayDR->get( );\n\t\t$ibaReceiptsPaymentsDRins->setAmount( $amt );\n\t\t$totals['ibaReceiptsPaymentsDRins'] = &$ibaReceiptsPaymentsDRins;\n\n\t\t$ibaReceiptsPaymentsDRint = new ControlAccountTotal( 'IBA Receipts/Payments, insurers, debits', false, null );\n\t\t$inRecPayDR = &$totals['inRecPayDR'];\n\n\t\t$amt = 0 - $inRecPayDR->get( );\n\t\t$ibaReceiptsPaymentsDRint->setAmount( $amt );\n\t\t$totals['ibaReceiptsPaymentsDRint'] = &$ibaReceiptsPaymentsDRint;\n\n\t\t$total = $ibaReceiptsPaymentsDRcls->get( ) + $ibaReceiptsPaymentsDRint->get( ) + $ibaReceiptsPaymentsDRins->get( );\n\t\t$prev = $ibaReceiptsPaymentsDR->get( );\n\n\t\tif ($total != $prev) {\n\t\t\t_showWhenError( 'IBA Receipts DR', . 'ibaReceiptsPaymentsDR amount was ' . $prev . ', now ' . $total );\n\t\t}\n\n\t\t$ibaReceiptsPaymentsCR = new ControlAccountTotal( 'IBA Receipts/Payments, credits', false, null );\n\t\t$clRecPayCR = &$totals['clRecPayCR'];\n\t\t$icRecPayCR = &$totals['icRecPayCR'];\n\t\t$inRecPayCR = &$totals['inRecPayCR'];\n\n\t\t$amt = 0 - ( $clRecPayCR->get( ) + $icRecPayCR->get( ) + $inRecPayCR->get( ) );\n\t\t$ibaReceiptsPaymentsCR->setAmount( $amt );\n\t\t$totals['ibaReceiptsPaymentsCR'] = &$ibaReceiptsPaymentsCR;\n\n\t\t$ibaReceiptsPaymentsCRcls = new ControlAccountTotal( 'IBA Receipts/Payments, clients, credits', false, null );\n\t\t$clRecPayCR = &$totals['clRecPayCR'];\n\n\t\t$amt = 0 - $clRecPayCR->get( );\n\t\t$ibaReceiptsPaymentsCRcls->setAmount( $amt );\n\t\t$totals['ibaReceiptsPaymentsCRcls'] = &$ibaReceiptsPaymentsCRcls;\n\n\t\t$ibaReceiptsPaymentsCRins = new ControlAccountTotal( 'IBA Receipts/Payments, insurers, credits', false, null );\n\t\t$icRecPayCR = &$totals['icRecPayCR'];\n\n\t\t$amt = 0 - $icRecPayCR->get( );\n\t\t$ibaReceiptsPaymentsCRins->setAmount( $amt );\n\t\t$totals['ibaReceiptsPaymentsCRins'] = &$ibaReceiptsPaymentsCRins;\n\n\t\t$ibaReceiptsPaymentsCRint = new ControlAccountTotal( 'IBA Receipts/Payments, insurers, credits', false, null );\n\t\t$inRecPayCR = &$totals['inRecPayCR'];\n\n\t\t$amt = 0 - $inRecPayCR->get( );\n\t\t$ibaReceiptsPaymentsCRint->setAmount( $amt );\n\t\t$totals['ibaReceiptsPaymentsCRint'] = &$ibaReceiptsPaymentsCRint;\n\n\t\t$total = $ibaReceiptsPaymentsCRcls->get( ) + $ibaReceiptsPaymentsCRint->get( ) + $ibaReceiptsPaymentsCRins->get( );\n\t\t$prev = $ibaReceiptsPaymentsCR->get( );\n\n\t\tif ($total != $prev) {\n\t\t\t_showWhenError( 'IBA Receipts CR', . 'ibaReceiptsPaymentsCR amount was ' . $prev . ', now ' . $total );\n\t\t}\n\n\t\t$ibaMiscReceipts = &$totals['ibaMiscReceipts'];\n\n\t\t$total = $ibaReceiptsPaymentsDR->get( ) + $ibaReceiptsPaymentsCR->get( );\n\t\t0 - $ibaMiscReceipts->get( );\n\t\t$ibaReceiptsPayments = &$totals['ibaReceiptsPayments'];\n\n\t\t$prev = $ibaReceiptsPayments->get( );\n\n\t\tif ($total != $prev) {\n\t\t\t_showWhenError( 'IBA Receipts', . 'ibaReceiptsPayments amount was ' . $prev . ', now ' . $total );\n\t\t}\n\n\t}", "title": "" }, { "docid": "b6508db1b2f6fd1d48ddbec1c516c264", "score": "0.47022521", "text": "function _makeCommPaidRecDetail($totals) {\n\t\tglobal $controlFromDate;\n\t\tglobal $controlToDate;\n\n\t\t$START = $controlFromDate;\n\t\t$END = $controlToDate;\n\t\t$prDiscDR = new ControlAccountTotal( 'Client discounts given, debit', false, ( . 'SELECT\n\t\t\t\tSUM(ptClientDiscount) \t\tas ptClientDiscount\n\t\t\tFROM policyTransactions\n\t\t\tWHERE ptPostStatus = \\'P\\'\n\t\t\tAND\t ptDebit = 1\n\t\t\tAND ptPostingDate >= \\'' . $START . '\\' AND ptPostingDate <= \\'' . $END . '\\'' ) );\n\t\t$totals['prDiscDR'] = &$prDiscDR;\n\n\t\t$prDiscCR = new ControlAccountTotal( 'Client discounts given, credit', true, ( . 'SELECT\n\t\t\t\tSUM(ptClientDiscount) \t\tas ptClientDiscount\n\t\t\tFROM policyTransactions\n\t\t\tWHERE ptPostStatus = \\'P\\'\n\t\t\tAND\t ptDebit != 1\n\t\t\tAND ptPostingDate >= \\'' . $START . '\\' AND ptPostingDate <= \\'' . $END . '\\'' ) );\n\t\t$totals['prDiscCR'] = &$prDiscCR;\n\n\t\t$total = $prDiscDR->get( ) + $prDiscCR->get( );\n\t\t$prDisc = &$totals['prDisc'];\n\n\t\t$prev = $prDisc->get( );\n\n\t\tif ($total != $prev) {\n\t\t\t_showWhenError( 'Commission Discount', . 'prDisc amount was ' . $prev . ', now ' . $total );\n\t\t}\n\n\t\t$prCommPaidPaid = new ControlAccountTotal( 'Commission Paid - where client has paid', true, ( . 'SELECT\n\t\t\t\tSUM(itCommission) \t\t\tas itCommission,\n\t\t\t\tSUM(itAddlCommission) \t\tas itAddlCommission,\n\t\t\t\tSUM(itEngineeringFeeComm) \tas itEngineeringFeeComm\n\t\t\tFROM inscoTransactions, policyTransactions, clientTransactions\n\t\t\tWHERE itTransType = \\'I\\'\n\t\t\tAND\t itPolicyTran = ptCode\n\t\t\tAND\t ctPolicyTran = ptCode\n\t\t\tAND ctBalance = 0\n\t\t\tAND itBalance = 0\n\t\t\tAND\t itPaidDate >= \\'' . $START . '\\' AND itPaidDate <= \\'' . $END . '\\'' ) );\n\t\t$totals['prCommPaidPaid'] = &$prCommPaidPaid;\n\n\t\t$prCommPaidPaidDR = new ControlAccountTotal( 'Commission Paid - where client has paid, debits', true, ( . 'SELECT\n\t\t\t\tSUM(itCommission) \t\t\tas itCommission,\n\t\t\t\tSUM(itAddlCommission) \t\tas iitAddlCommission,\n\t\t\t\tSUM(itEngineeringFeeComm) \tas itEngineeringFeeComm\n\t\t\tFROM inscoTransactions, policyTransactions, clientTransactions\n\t\t\tWHERE itTransType = \\'I\\'\n\t\t\tAND\t itPolicyTran = ptCode\n\t\t\tAND\t ctPolicyTran = ptCode\n\t\t\tAND ctBalance = 0\n\t\t\tAND itBalance = 0\n\t\t\tAND itCommission > 0\n\t\t\tAND\t itPaidDate >= \\'' . $START . '\\' AND itPaidDate <= \\'' . $END . '\\'' ) );\n\t\t$totals['prCommPaidPaidDR'] = &$prCommPaidPaidDR;\n\n\t\t$prCommPaidPaidCR = new ControlAccountTotal( 'Commission Paid - where client has paid, credits', true, ( . 'SELECT\n\t\t\t\tSUM(itCommission) \t\t\tas itCommission,\n\t\t\t\tSUM(itAddlCommission) \t\tas iitAddlCommission,\n\t\t\t\tSUM(itEngineeringFeeComm) \tas itEngineeringFeeComm\n\t\t\tFROM inscoTransactions, policyTransactions, clientTransactions\n\t\t\tWHERE itTransType = \\'I\\'\n\t\t\tAND\t itPolicyTran = ptCode\n\t\t\tAND\t ctPolicyTran = ptCode\n\t\t\tAND ctBalance = 0\n\t\t\tAND itBalance = 0\n\t\t\tAND itCommission <= 0\n\t\t\tAND\t itPaidDate >= \\'' . $START . '\\' AND itPaidDate <= \\'' . $END . '\\'' ) );\n\t\t$totals['prCommPaidPaidCR'] = &$prCommPaidPaidCR;\n\n\t\t$total = $prCommPaidPaidDR->get( ) + $prCommPaidPaidCR->get( );\n\t\t$prev = $prCommPaidPaid->get( );\n\n\t\tif ($total != $prev) {\n\t\t\t_showWhenError( 'Commission Discount Paid', . 'prCommPaidPaid amount was ' . $prev . ', now ' . $total );\n\t\t}\n\n\t\t$prCommPaidUnpaid = new ControlAccountTotal( 'Commission Paid - where client has not paid', true, ( . 'SELECT\n\t\t\t\tSUM(itCommission) \t\t\tas itCommission,\n\t\t\t\tSUM(itAddlCommission) \t\tas iitAddlCommission,\n\t\t\t\tSUM(itEngineeringFeeComm) \tas itEngineeringFeeComm\n\t\t\tFROM inscoTransactions, policyTransactions, clientTransactions\n\t\t\tWHERE itTransType = \\'I\\'\n\t\t\tAND\t itPolicyTran = ptCode\n\t\t\tAND\t ctPolicyTran = ptCode\n\t\t\tAND ctBalance != 0\n\t\t\tAND itBalance = 0\n\t\t\tAND\t itPaidDate >= \\'' . $START . '\\' AND itPaidDate <= \\'' . $END . '\\'' ) );\n\t\t$totals['prCommPaidUnpaid'] = &$prCommPaidUnpaid;\n\n\t\t$prCommPaidUnpaidDR = new ControlAccountTotal( 'Commission Paid - where client has not paid, debits', true, ( . 'SELECT\n\t\t\t\tSUM(itCommission) \t\t\tas itCommission,\n\t\t\t\tSUM(itAddlCommission) \t\tas iitAddlCommission,\n\t\t\t\tSUM(itEngineeringFeeComm) \tas itEngineeringFeeComm\n\t\t\tFROM inscoTransactions, policyTransactions, clientTransactions\n\t\t\tWHERE itTransType = \\'I\\'\n\t\t\tAND\t itPolicyTran = ptCode\n\t\t\tAND\t ctPolicyTran = ptCode\n\t\t\tAND ctBalance != 0\n\t\t\tAND itBalance = 0\n\t\t\tAND itOriginal < 0\n\t\t\tAND\t itPaidDate >= \\'' . $START . '\\' AND itPaidDate <= \\'' . $END . '\\'' ) );\n\t\t$totals['prCommPaidUnpaidDR'] = &$prCommPaidUnpaidDR;\n\n\t\t$prCommPaidUnpaidCR = new ControlAccountTotal( 'Commission Paid - where client has not paid, credits', true, ( . 'SELECT\n\t\t\t\tSUM(itCommission) \t\t\tas itCommission,\n\t\t\t\tSUM(itAddlCommission) \t\tas iitAddlCommission,\n\t\t\t\tSUM(itEngineeringFeeComm) \tas itEngineeringFeeComm\n\t\t\tFROM inscoTransactions, policyTransactions, clientTransactions\n\t\t\tWHERE itTransType = \\'I\\'\n\t\t\tAND\t itPolicyTran = ptCode\n\t\t\tAND\t ctPolicyTran = ptCode\n\t\t\tAND ctBalance != 0\n\t\t\tAND itBalance = 0\n\t\t\tAND itOriginal >= 0\n\t\t\tAND\t itPaidDate >= \\'' . $START . '\\' AND itPaidDate <= \\'' . $END . '\\'' ) );\n\t\t$totals['prCommPaidUnpaidCR'] = &$prCommPaidUnpaidCR;\n\n\t\t$total = $prCommPaidUnpaidDR->get( ) + $prCommPaidUnpaidCR->get( );\n\t\t$prev = $prCommPaidUnpaid->get( );\n\n\t\tif ($total != $prev) {\n\t\t\t_showWhenError( 'Commission Unpaid', . 'prCommPaidUnPaid amount was ' . $prev . ', now ' . $total );\n\t\t}\n\n\t\t$prWrOff = &$totals['prWrOff'];\n\n\t\t$total = $prCommPaidPaid->get( ) + $prCommPaidUnpaid->get( );\n\t\t$prCommPaid = &$totals['prCommPaid'];\n\n\t\t$prev = $prCommPaid->get( );\n\n\t\tif ($total != $prev) {\n\t\t\t_showWhenError( 'Commission Paid Total', . 'prCommPaid amount was ' . $prev . ', now ' . $total );\n\t\t}\n\n\t\t$prCommTransDR = new ControlAccountTotal( 'Commission transferred, debits)', false, ( . 'SELECT\n\t\t\t\tSUM(baAmount) \t\t\tas baAmount\n\t\t\tFROM bankAccountTrans\n\t\t\tWHERE baType = 1\n\t\t\tAND baAmount > 0\n\t\t\tAND\t baPostingDate >= \\'' . $START . '\\' AND baPostingDate <= \\'' . $END . '\\'' ) );\n\t\t$totals['prCommTransDR'] = &$prCommTransDR;\n\n\t\t$prCommTransCR = new ControlAccountTotal( 'Commission transferred, credits', false, ( . 'SELECT\n\t\t\t\tSUM(baAmount) \t\t\tas baAmount\n\t\t\tFROM bankAccountTrans\n\t\t\tWHERE baType = 1\n\t\t\tAND baAmount < 0\n\t\t\tAND\t baPostingDate >= \\'' . $START . '\\' AND baPostingDate <= \\'' . $END . '\\'' ) );\n\t\t$totals['prCommTransCR'] = &$prCommTransCR;\n\n\t\t$total = $prCommTransDR->get( ) + $prCommTransCR->get( );\n\t\t$prCommTransferred = &$totals['prCommTransferred'];\n\n\t\t$prev = $prCommTransferred->get( );\n\n\t\tif ($total != $prev) {\n\t\t\t_showWhenError( 'Commission Transferred', . 'prCommTrans amount was ' . $prev . ', now ' . $total );\n\t\t}\n\n\t}", "title": "" }, { "docid": "bc36b4cb9128f435a448857e63b5f128", "score": "0.4699651", "text": "public function index()\n {\n $where['stripe_id !='] = \"\";\n $clients = $this->Clients_model->get(\"\",$where);\n\n foreach ($clients as $client) {\n //step2 get all unpaid invoices of client in crm\n $clientid = $client['userid'];\n $invoicesInCRM = $this->invoices_model->getInvoices($clientid);\n\n //step3 get all invoices of client in stripe\n $clientStripeId = $client['stripe_id'];\n $subs = $this->stripe_core->get_subscriptions($clientStripeId);\n\n if(isset($subs->data[0])){\n $subscriptionId = $subs->data[0]->id;\n $arr = array(\"subscription\"=>$subscriptionId);\n $allInvoices = $this->stripe_core->allinvoices($arr);\n $stripeInvoices = array();\n foreach ($allInvoices['data'] as $k4 => $v2) {\n\n $epoch = $v2->date;\n $dt = new DateTime(\"@$epoch\");\n $invDate = $dt->format('Y-m-d');\n $status = $v2->status;\n $strpData = array(\"date\"=>$invDate,\"status\"=>$status);\n array_push($stripeInvoices, $strpData); \n }\n }\n\n $sizeofStripe = count($stripeInvoices);\n\n //step4 compare stripe invoices with crm invoices and get invoice of same dates\n for ($i=0; $i < $sizeofStripe ; $i++) { \n \n if(isset($invoicesInCRM[$i]['date']) && isset($stripeInvoices[$i]['date']))\n {\n \n if($invoicesInCRM[$i]['date'] == $stripeInvoices[$i]['date']){ \n\n //step5 check status of stripe invoice\n if($stripeInvoices[$i]['status'] == \"paid\"){\n echo \"we should pay this invoice \".$invoicesInCRM[$i]['id'].\" \".$stripeInvoices[$i]['status'].\"<br>\";\n\n //step6 update status of crm invoice \n // $updateWhere[\"id\"] = $invoicesInCRM[$i]['id'];\n // $updateInvoice = array(\"status\"=>2);\n // $this->invoices_model->updateInvoice($updateWhere,$updateInvoice);\n } \n }\n } \n }\n } \n }", "title": "" }, { "docid": "5f899298ef4ed887615400e72adea662", "score": "0.46947396", "text": "public function getPendingInvoices();", "title": "" }, { "docid": "b09f107b5749bd81062ddbf88e4dbbb3", "score": "0.4683723", "text": "private function build_invoices() {\n\t\t$invoices = self::fetch('invoices', [':orders_id' => $this->id()]);\n\n\t\tforeach ($invoices as &$invoice) {\n\t\t\t$invoice['invoice_date'] = self::DateTime($invoice['invoice_date']);\n\t\t\t$invoice['paid_in_full'] = CK\\fn::check_flag($invoice['paid_in_full']);\n\t\t\t$invoice['credit_memo'] = CK\\fn::check_flag($invoice['credit_memo']);\n\n\t\t\t$invoice['products'] = self::fetch('invoice_products', [':invoice_id' => $invoice['invoice_id']]);\n\t\t\t$invoice['totals'] = self::fetch('invoice_totals', [':invoice_id' => $invoice['invoice_id']]);\n\t\t\t$invoice['allocated_payments'] = self::fetch('invoice_allocated_payments', [':invoice_id' => $invoice['invoice_id']]);\n\n\t\t\tforeach ($invoice['products'] as &$product) {\n\t\t\t\t$product['ipn'] = new ck_ipn2($product['stock_id']);\n\t\t\t}\n\t\t}\n\n\t\t$this->skeleton->load('invoices', $invoices);\n\t}", "title": "" }, { "docid": "5a46ad9d7d2cfab596401e5c33119f98", "score": "0.46738845", "text": "public static function generateInvoice ( ) {\n\t\t# Generate Array\n\t\t$invoice = self::generateInvoiceArray();\n\t\t\n\t\t# Generate Invoice\n\t\t$Invoice = new Bal_Payment_Model_Invoice($invoice);\n\t\t\n\t\t# Return Invoice\n\t\treturn $Invoice;\n\t}", "title": "" }, { "docid": "cbae2b4d8b2d109d221343a3819292e3", "score": "0.466872", "text": "private function getIncomeData(Collection $invoices): Collection\n {\n $invoicesIds = $invoices->pluck('invoice_id')\n ->toArray();\n\n $query = InvoiceItem::withTotalAmountExcludeTax('amount_ex_tax')\n ->selectRaw('at.name AS account_type_name, gl.name AS account_name')\n ->join('gl_accounts AS gl', 'gl.id', '=', 'invoice_items.gl_account_id')\n ->join('account_types AS at', 'at.id', '=', 'gl.account_type_id')\n ->whereIn('invoice_items.invoice_id', $invoicesIds)\n ->groupBy('account_type_name', 'account_name');\n\n return $query->get();\n }", "title": "" }, { "docid": "ee68c7e66fe182e1d2d238c7d1bf17fa", "score": "0.46576968", "text": "private function calculateRows(): void\n\t{\n\t\t$totalSum = 0;\n\t\t$totalTax = 0;\n\t\t$totalDiscount = 0;\n\n\t\tif (!empty($this->rows) && $this->isCrmFormat())\n\t\t{\n\t\t\tforeach ($this->rows as $index => $row)\n\t\t\t{\n\t\t\t\tif ($this->crmSettings['ALLOW_LD_TAX'])\n\t\t\t\t{\n\t\t\t\t\t$row['PRICE'] = CCrmProductRow::CalculateExclusivePrice($row['PRICE'], $row['TAX_RATE']);\n\t\t\t\t\t$row['TAX_RATE'] = 0;\n\t\t\t\t\t$row['TAX_INCLUDED'] = 'N';\n\t\t\t\t}\n\n\t\t\t\t$row['TAX_SUM'] = 0;\n\n\t\t\t\tif ($row['TAX_RATE'] != 0)\n\t\t\t\t{\n\t\t\t\t\tif ($row['TAX_INCLUDED'] === 'Y')\n\t\t\t\t\t{\n\t\t\t\t\t\t$taxSum = $row['PRICE'] * $row['QUANTITY'] * (1 - 1 / (1 + $row['TAX_RATE'] / 100));\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$taxSum = $row['PRICE_EXCLUSIVE'] * $row['QUANTITY'] * $row['TAX_RATE'] / 100;\n\t\t\t\t\t}\n\n\t\t\t\t\t$row['TAX_SUM'] = round($taxSum, $this->crmSettings['PRICE_PRECISION']);\n\t\t\t\t}\n\n\t\t\t\tif (!isset($row['PRICE_NETTO']) || $row['PRICE_NETTO'] == 0)\n\t\t\t\t{\n\t\t\t\t\t$discountTypeID = (int)$row['DISCOUNT_TYPE_ID'];\n\t\t\t\t\tif ($discountTypeID === Discount::MONETARY)\n\t\t\t\t\t{\n\t\t\t\t\t\t$row['PRICE_NETTO'] = $row['PRICE_EXCLUSIVE'] + $row['DISCOUNT_SUM'];\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$discoutRate = (float)$row['DISCOUNT_RATE'];\n\t\t\t\t\t\t$discoutSum = $discoutRate < 100\n\t\t\t\t\t\t\t? Discount::calculateDiscountSum($row['PRICE_EXCLUSIVE'], $discoutRate)\n\t\t\t\t\t\t\t: (float)$row['DISCOUNT_SUM'];\n\t\t\t\t\t\t$row['PRICE_NETTO'] = $row['PRICE_EXCLUSIVE'] + $discoutSum;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!isset($row['PRICE_BRUTTO']) || $row['PRICE_BRUTTO'] == 0)\n\t\t\t\t{\n\t\t\t\t\t$row['PRICE_BRUTTO'] = CCrmProductRow::CalculateInclusivePrice($row['PRICE_NETTO'], $row['TAX_RATE']);\n\t\t\t\t}\n\n\t\t\t\tif (!isset($row['MEASURE_CODE']) || $row['MEASURE_CODE'] == '')\n\t\t\t\t{\n\t\t\t\t\t$row['MEASURE_CODE'] = $this->measures['DEFAULT']['CODE'];\n\t\t\t\t\t$row['MEASURE_NAME'] = $this->measures['DEFAULT']['SYMBOL'];\n\t\t\t\t\t$row['MEASURE_EXISTS'] = true; // TODO: fix it, because default can absent in list\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$code = (string)$row['MEASURE_CODE'];\n\t\t\t\t\t$measure = $this->getMeasureByCode($code);\n\t\t\t\t\tif (!empty($measure))\n\t\t\t\t\t{\n\t\t\t\t\t\t$row['MEASURE_NAME'] = $measure['SYMBOL'];\n\t\t\t\t\t\t$row['MEASURE_EXISTS'] = true;\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$row['MEASURE_EXISTS'] = false;\n\t\t\t\t\t}\n\t\t\t\t\tunset($measure);\n\t\t\t\t}\n\n\t\t\t\t$totalDiscount += round($row['QUANTITY'] * $row['DISCOUNT_SUM'], $this->crmSettings['PRICE_PRECISION']);\n\n\t\t\t\t$this->rows[$index] = $row;\n\t\t\t}\n\t\t\tunset($index);\n\n\t\t\t$enableSaleDiscount = false;\n\t\t\t$calculateOptions = [];\n\t\t\tif ($this->crmSettings['ALLOW_LD_TAX'])\n\t\t\t{\n\t\t\t\t$calculateOptions['ALLOW_LD_TAX'] = 'Y';\n\t\t\t\t$calculateOptions['LOCATION_ID'] = isset($this->arParams['LOCATION_ID']) ? $this->arParams['LOCATION_ID'] : '';\n\t\t\t}\n\n\t\t\t$result = CCrmSaleHelper::Calculate(\n\t\t\t\t$this->rows,\n\t\t\t\t$this->getCurrencyId(),\n\t\t\t\t$this->crmSettings['PERSON_TYPE_ID'],\n\t\t\t\t$enableSaleDiscount,\n\t\t\t\t$this->getSiteId(),\n\t\t\t\t$calculateOptions\n\t\t\t);\n\n\t\t\tif (isset($result['TAX_LIST']) && is_array($result['TAX_LIST']))\n\t\t\t{\n\t\t\t\t$this->crmSettings['TAX_LIST'] = $result['TAX_LIST'];\n\t\t\t}\n\n\t\t\t$totalSum = isset($result['PRICE']) ? round((float)$result['PRICE'], $this->crmSettings['PRICE_PRECISION']) : 0;\n\t\t\t$totalTax = isset($result['TAX_VALUE']) ? round((float)$result['TAX_VALUE'], $this->crmSettings['PRICE_PRECISION']) : 0;\n\t\t}\n\n\t\t$deliverySum = $this->getTotalDeliverySum();\n\t\t$this->arResult['TOTAL_DELIVERY_SUM'] = $deliverySum;\n\t\t$this->arResult['TOTAL_SUM'] = $totalSum + $deliverySum;\n\n\t\t$this->arResult['TOTAL_DISCOUNT'] = $totalDiscount;\n\t\t$this->arResult['TOTAL_TAX'] = $totalTax;\n\t\t$this->arResult['TOTAL_BEFORE_TAX'] = round($totalSum - $this->arResult['TOTAL_TAX'], $this->crmSettings['PRICE_PRECISION']);\n\t\t$this->arResult['TOTAL_BEFORE_DISCOUNT'] = $this->arResult['TOTAL_BEFORE_TAX'] + $this->arResult['TOTAL_DISCOUNT'];\n\t}", "title": "" }, { "docid": "60dca9f56666585c5026ff5b0c6c760e", "score": "0.46479517", "text": "function cc_bill($cc_info, $member, $amount, \n $currency, $product_description, \n $charge_type, $invoice, $payment){\n global $config, $db;\n $log = array();\n\t\t$product = $db->get_product($payment[product_id]);\n\t\tif(!$product['ipayment_currency'])\n\t\t{\n\t\t\tif(!$this->config['currency'])\n\t\t\t{\n\t\t\t\t$lcurrency = $this->config['currency'];\n\t\t\t}\n\t\t\telse $lcurrency = \"USD\";\n\t\t}\n\t\telse $lcurrency = $product['ipayment_currency'];\n //////////////////////// cc_bill /////////////////////////\n if ($charge_type == CC_CHARGE_TYPE_RECURRING){\n $orig_id = $this->get_orig_payment_ref($payment);\n if (!$orig_id){\n $db->log_error($e = \"Cannot find payment origin ($i) for renewal payment #$payment[payment_id]\");\n $log[] = array(\"ERR\" => \"Cannot find payment origin ($i) for renewal payment #$payment[payment_id]\");\n return array(CC_RESULT_DECLINE_PERM, \"\", $e, $log);\n }\n $vars = array(\n 'account_id' => $this->config['account_id'],\n 'trxuser_id' => $this->config['user_id'],\n 'trxpassword' => $this->config['pass'],\n \"trx_amount\" => str_replace('.', '', sprintf('%.2f', $amount)),\n \"gateway\" => 1,\n \"trx_typ\" => \"re_auth\",\n \"send_confirmation_email\" => \"TRUE\",\n \"return_paymentdata_details\" => \"TRUE\", \n \"trx_paymenttyp\" => \"cc\",\n \"adminactionpassword\" => $this->config['actionpass'],\n \"orig_trx_number\" => $orig_id\n );\n } else {\n $vars = array(\n 'account_id' => $this->config['account_id'],\n 'trxuser_id' => $this->config['user_id'],\n 'trxpassword' => $this->config['pass'],\n \"gateway\" => 1,\n \"trx_typ\" => \"auth\",\n \"send_confirmation_email\" => \"TRUE\",\n \"return_paymentdata_details\" => \"TRUE\", \n \"trx_paymenttyp\" => \"cc\",\n \"trx_amount\" => str_replace('.', '', sprintf('%.2f', $amount)),\n \"trx_currency\" => $lcurrency,\n \"cc_number\" => $cc_info['cc_number'],\n \"cc_expdate_month\" => substr($cc_info['cc-expire'], 0, 2),\n \"cc_expdate_year\" => '20'.substr($cc_info['cc-expire'], 2, 2),\n \"addr_email\" => $member['email'],\n \"addr_name\" => $cc_info['cc_name_f'] . ' ' . $cc_info['cc_name_l'],\n \"addr_street\" => $cc_info['cc_street'],\n \"addr_city\" => $cc_info['cc_city'],\n \"addr_state\" => $cc_info['cc_state'],\n \"addr_zip\" => $cc_info['cc_zip'],\n \"addr_country\" => $cc_info['cc_country'],\n \"from_ip\" => $member['remote_addr'] ? $member['remote_addr'] : $_SERVER['REMOTE_ADDR'],\n );\n }\n if ($charge_type == CC_CHARGE_TYPE_TEST){\n $vars['trx_typ'] = \"check_save\";\n \t$vars[\"trx_amount\"] = 100;\n\t\t}\n\n \n if ($cc_info['cc_code'])\n $vars['cc_checkcode'] = $cc_info['cc_code'];\n\n // prepare log record\n $vars_l = $vars; \n $vars_l['cc_number'] = $cc_info['cc'];\n if ($vars['cc_checkcode'])\n $vars_l['cc_checkcode'] = preg_replace('/./', '*', $vars['cc_checkcode']);\n $log[] = $vars_l;\n /////\n $res = $this->run_transaction($vars);\n $log[] = $res;\n if ($res['status'] == '0'){\n return array(CC_RESULT_SUCCESS, \"\", $res['ret_booknr'], $log);\n } elseif ($res['status'] == '-1') {\n return array(CC_RESULT_DECLINE_PERM, $res['ret_errormsg'].\"<br/>\".$res['ret_additionalmsg'], \"\", $log);\n } else {\n return array(CC_RESULT_INTERNAL_ERROR, $res['ret_errormsg'].\"<br/>\".$res['ret_additionalmsg'], \"\", $log);\n }\n }", "title": "" }, { "docid": "f339e572ec99007a58aade60392773a7", "score": "0.46472722", "text": "public function getCharges($iInvoiceRunId=null)\n\t{\n\t\t$aVisibleChargeTypes\t= array(CHARGE_TYPE_VISIBILITY_VISIBLE);\n\n\t\tif (AuthenticatedUser()->UserHasPerm(PERMISSION_CREDIT_MANAGEMENT))\n\t\t{\n\t\t\t$aVisibleChargeTypes[]\t= CHARGE_TYPE_VISIBILITY_CREDIT_CONTROL;\n\t\t}\n\t\tif (AuthenticatedUser()->UserHasPerm(PERMISSION_GOD))\n\t\t{\n\t\t\t$aVisibleChargeTypes[]\t= CHARGE_TYPE_VISIBILITY_HIDDEN;\n\t\t}\n\n\t\t$sInvoiceRunId\t= (is_null($iInvoiceRunId) ? 'is null' : \"= {$iInvoiceRunId}\");\n\t\t$sQuery \t\t= \"\n\t\t\tSELECT \tc.Id as ChargeId, c.ChargeType ChargeType, c.Description Description, s.Id as ServiceId, s.FNN as FNN, ChargedOn as Date, c.Amount Amount, c.Nature as Nature\n\t\t\tFROM \tService s\n\t\t\tJOIN \tCharge c\n\t\t\t \t\t\tON (s.Id = c.Service)\n\t\t\tLEFT JOIN ChargeType ct\n\t\t\t \t\t\tON (ct.Id = c.charge_type_id OR c.ChargeType = ct.ChargeType)\n\t\t\tWHERE \tc.invoice_run_id $sInvoiceRunId\n\t\t \tAND \tc.Service = {$this->Id}\n\t\t AND \tct.charge_type_visibility_id IN (\".implode(', ', $aVisibleChargeTypes).\")\n\t\t\";\n\n\t\t$oQuery\t\t= new Query();\n\t\t$oResult\t= $oQuery->Execute($sQuery);\n\n\t\tif (!$oResult)\n\t\t{\n\t\t\tthrow new Exception_Database('Could not retrieve the charges for the service:: Error Message='.$oQuery->Error());\n\t\t}\n\n\t\t// Add result into an array\n\t\t$aCharges\t= array();\n\n\t\twhile ($oCharge = $oResult->fetch_assoc())\n\t\t{\n\t\t\t$aCharges[]\t= $oCharge;\n\t\t}\n\n\t\treturn $aCharges;\n\t}", "title": "" }, { "docid": "cf42cdf3ca4423ea28d449778dd8cfd3", "score": "0.46424714", "text": "public static function get_order_item_totals( $total_rows, $order ) {\n\t\tglobal $woocommerce;\n\n\t\tif ( self::order_contains_subscription( $order ) && self::get_recurring_total_tax( $order ) > 0 ) {\n\n\t\t\t$order_taxes = $order->get_taxes();\n\t\t\t$recurring_taxes = self::get_recurring_taxes( $order );\n\t\t\t$subscription_length = self::get_subscription_length( $order );\n\t\t\t$sign_up_fee = self::get_sign_up_fee( $order );\n\t\t\t$trial_length = self::get_subscription_trial_length( $order );\n\n\t\t\t// Only want to display recurring amounts for taxes, no need for trial period, length etc.\n\t\t\t$subscription_details = array(\n\t\t\t\t'subscription_interval' => self::get_subscription_interval( $order ),\n\t\t\t\t'subscription_period' => self::get_subscription_period( $order )\n\t\t\t);\n\n\t\t\tif ( count( $order_taxes ) > 0 || count( $recurring_taxes ) > 0 ) {\n\n\t\t\t\tforeach ( $recurring_taxes as $index => $tax ) {\n\n\t\t\t\t\t$tax_key = sanitize_title( $tax['label'] );\n\n\t\t\t\t\tif ( $tax['compound'] ) {\n\t\t\t\t\t\t$has_compound_tax = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $tax['cart_tax'] > 0 ) {\n\n\t\t\t\t\t\t$order_tax = ( isset( $order_taxes[$index]['cart_tax'] ) ) ? $order_taxes[$index]['cart_tax'] + $order_taxes[$index]['shipping_tax'] : '';\n\t\t\t\t\t\t$recurring_tax = ( isset( $recurring_taxes[$index]['cart_tax'] ) ) ? $recurring_taxes[$index]['cart_tax'] + $recurring_taxes[$index]['shipping_tax'] : '';\n\n\t\t\t\t\t\t$subscription_details['recurring_amount'] = $recurring_tax;\n\n\t\t\t\t\t\tif ( $sign_up_fee > 0 && $trial_length == 0 && $subscription_details['subscription_interval'] != $subscription_length )\n\t\t\t\t\t\t\t$subscription_details['initial_amount'] = $order_tax;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$subscription_details['initial_amount'] = '';\n\n\t\t\t\t\t\t$total_rows[$tax_key]['value'] = WC_Subscriptions_Manager::get_subscription_price_string( $subscription_details );\n\n\t\t\t\t\t} elseif ( $tax['shipping_tax'] > 0 ) { // Just a recurring shipping tax\n\n\t\t\t\t\t\tif ( $sign_up_fee > 0 && $trial_length == 0 && $subscription_details['subscription_interval'] != $subscription_length )\n\t\t\t\t\t\t\t$subscription_details['initial_amount'] = $tax['shipping_tax'];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$subscription_details['initial_amount'] = '';\n\n\t\t\t\t\t\t$subscription_details['recurring_amount'] = $tax['shipping_tax'];\n\n\t\t\t\t\t\t$shipping_tax_row = array(\n\t\t\t\t\t\t\t$tax_key . '_shipping' => array(\n\t\t\t\t\t\t\t\t'label' => $tax['label'],\n\t\t\t\t\t\t\t\t'value' => WC_Subscriptions_Manager::get_subscription_price_string( $subscription_details )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Insert the tax just before the order total\n\t\t\t\t\t\t$total_rows = array_splice( $total_rows, 0, -1 ) + $shipping_tax_row + array_splice( $total_rows, -1 );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tforeach ( $recurring_taxes as $index => $tax ) {\n\n\t\t\t\t\t$tax_key = sanitize_title( $tax['label'] );\n\n\t\t\t\t\tif ( ! $tax['compound'] )\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tif ( $tax['cart_tax'] > 0 ) {\n\n\t\t\t\t\t\t$order_tax = ( isset( $order_taxes[$index]['cart_tax'] ) ) ? $order_taxes[$index]['cart_tax'] + $order_taxes[$index]['shipping_tax'] : '';\n\t\t\t\t\t\t$recurring_tax = ( isset( $recurring_taxes[$index]['cart_tax'] ) ) ? $recurring_taxes[$index]['cart_tax'] + $recurring_taxes[$index]['shipping_tax'] : '';\n\n\t\t\t\t\t\tif ( $sign_up_fee > 0 && $trial_length == 0 && $subscription_details['subscription_interval'] != $subscription_length )\n\t\t\t\t\t\t\t$subscription_details['initial_amount'] = $order_tax;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$subscription_details['initial_amount'] = '';\n\n\t\t\t\t\t\t$subscription_details['recurring_amount'] = $recurring_tax;\n\n\t\t\t\t\t\t$total_rows[$tax_key]['value'] = WC_Subscriptions_Manager::get_subscription_price_string( $subscription_details );\n\n\t\t\t\t\t} elseif ( $tax['shipping_tax'] > 0 ) { // Just a recurring shipping tax\n\n\t\t\t\t\t\tif ( $sign_up_fee > 0 && $trial_length == 0 && $subscription_details['subscription_interval'] != $subscription_length )\n\t\t\t\t\t\t\t$subscription_details['initial_amount'] = $tax['shipping_tax'];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$subscription_details['initial_amount'] = '';\n\n\t\t\t\t\t\t$subscription_details['recurring_amount'] = $tax['shipping_tax'];\n\n\t\t\t\t\t\t$shipping_tax_row = array(\n\t\t\t\t\t\t\t$tax_key . '_shipping' => array(\n\t\t\t\t\t\t\t\t'label' => $tax['label'],\n\t\t\t\t\t\t\t\t'value' => WC_Subscriptions_Manager::get_subscription_price_string( $subscription_details )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Insert the tax just before the order total\n\t\t\t\t\t\t$total_rows = array_splice( $total_rows, 0, -1 ) + $shipping_tax_row + array_splice( $total_rows, -1, 0 );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( isset( $total_rows['tax'] ) ) {\n\n\t\t\t\t\t$subscription_details['initial_amount'] = woocommerce_price( $order->get_total_tax() );\n\t\t\t\t\t$subscription_details['recurring_amount'] = self::get_recurring_total_tax( $order );\n\n\t\t\t\t\t$total_rows['tax']['value'] = WC_Subscriptions_Manager::get_subscription_price_string( $subscription_details );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $total_rows;\n\t}", "title": "" }, { "docid": "30ba229f249da4448decba65f2a12169", "score": "0.46285522", "text": "public function billingItems(): BillingItemService\n {\n if (! isset($this->classCache['BillingItems'])) {\n $this->classCache['BillingItems'] = new BillingItemService($this->client);\n }\n\n return $this->classCache['BillingItems'];\n }", "title": "" }, { "docid": "43d6fdc2e0e7883fa5c20636af754764", "score": "0.4624046", "text": "function ciniki_sapos_invoiceAddItem($ciniki, $tnid, $args) {\n //\n // Load the settings\n //\n $rc = ciniki_core_dbDetailsQueryDash($ciniki, 'ciniki_sapos_settings', 'tnid', $tnid, 'ciniki.sapos', 'settings', '');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $settings = isset($rc['settings'])?$rc['settings']:array();\n\n if( !isset($args['unit_discount_percentage']) || $args['unit_discount_percentage'] == '' ) {\n $args['unit_discount_percentage'] = 0;\n }\n if( !isset($args['unit_preorder_amount']) || $args['unit_preorder_amount'] == '' ) {\n $args['unit_preorder_amount'] = 0;\n }\n\n //\n // Load the invoice \n //\n $strsql = \"SELECT id, customer_id \"\n . \"FROM ciniki_sapos_invoices \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $args['invoice_id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.sapos', 'invoice');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['invoice']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.45', 'msg'=>'Invoice not found.'));\n }\n $invoice = $rc['invoice'];\n if( !isset($args['customer_id']) ) {\n $args['customer_id'] = $invoice['customer_id'];\n }\n\n //\n // Get the max line_number for this invoice\n //\n if( !isset($args['line_number']) || $args['line_number'] == '' || $args['line_number'] == 0 ) {\n $strsql = \"SELECT MAX(line_number) AS maxnum \"\n . \"FROM ciniki_sapos_invoice_items \"\n . \"WHERE invoice_id = '\" . ciniki_core_dbQuote($ciniki, $args['invoice_id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.sapos', 'num');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['num']) && isset($rc['num']['maxnum']) ) {\n $args['line_number'] = intval($rc['num']['maxnum']) + 1;\n } else {\n $args['line_number'] = 1;\n }\n }\n\n //\n // Check if item already exists in the invoice\n //\n $existing_id = 0;\n if( isset($settings['rules-invoice-duplicate-items'])\n && $settings['rules-invoice-duplicate-items'] == 'no' \n && isset($args['object']) && $args['object'] != '' \n ) {\n $strsql = \"SELECT id, invoice_id, object, object_id, \"\n . \"quantity, unit_amount, unit_discount_amount, unit_discount_percentage, unit_preorder_amount, price_id, \"\n . \"subtotal_amount, discount_amount, total_amount \"\n . \"FROM ciniki_sapos_invoice_items \"\n . \"WHERE invoice_id = '\" . ciniki_core_dbQuote($ciniki, $args['invoice_id']) . \"' \"\n . \"AND object = '\" . ciniki_core_dbQuote($ciniki, $args['object']) . \"' \"\n . \"AND object_id = '\" . ciniki_core_dbQuote($ciniki, $args['object_id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.sapos', 'item');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['rows']) && isset($rc['rows'][0]) ) {\n $existing_id = $rc['rows'][0]['id'];\n $item = $rc['rows'][0];\n }\n }\n\n //\n // Get any information available on the object, required to decide if should be split to 1 per line\n //\n $num_lines = 1;\n if( $args['object'] != '' && $args['object_id'] != '' ) {\n list($pkg,$mod,$obj) = explode('.', $args['object']);\n $rc = ciniki_core_loadMethod($ciniki, $pkg, $mod, 'sapos', 'itemLookup');\n if( $rc['stat'] == 'ok' ) {\n $fn = $rc['function_call'];\n $rc = $fn($ciniki, $tnid, $args);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['item']) ) {\n // \n // Check if the item must only be one per line\n //\n if( isset($rc['item']['flags']) && ($rc['item']['flags']&0x08) > 0 ) {\n // Each line must only contain one item\n $num_lines = $args['quantity'];\n $args['quantity'] = 1;\n // Force each on it's own invoice line\n $existing_id = 0; \n }\n if( isset($rc['item']['flags']) && is_numeric($rc['item']['flags']) ) {\n if( !isset($args['flags']) || $args['flags'] == '' ) {\n $args['flags'] = $rc['item']['flags'];\n } else {\n $args['flags'] |= $rc['item']['flags'];\n }\n }\n //\n // Setup any missing fields\n //\n foreach($rc['item'] as $k => $v) {\n if( !isset($args[$k]) || ($k == 'price_id' && $args[$k] == 0) ) {\n $args[$k] = $v;\n }\n }\n }\n }\n }\n\n //\n // Check if a global customer discount\n //\n if( ciniki_core_checkModuleFlags($ciniki, 'ciniki.customers', 0x08000000) ) {\n $strsql = \"SELECT discount_percent \"\n . \"FROM ciniki_customers \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $invoice['customer_id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.customers', 'customer');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['customer']['discount_percent']) && $rc['customer']['discount_percent'] > 0 ) {\n $args['unit_discount_percentage'] = $rc['customer']['discount_percent'];\n }\n }\n\n //\n // Calculate the final amount for each item in the invoice\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'sapos', 'private', 'itemCalcAmount');\n $rc = ciniki_sapos_itemCalcAmount($ciniki, array(\n 'quantity'=>$args['quantity'],\n 'unit_amount'=>$args['unit_amount'],\n 'unit_discount_amount'=>$args['unit_discount_amount'],\n 'unit_discount_percentage'=>$args['unit_discount_percentage'],\n 'unit_preorder_amount'=>$args['unit_preorder_amount'],\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args['subtotal_amount'] = $rc['subtotal'];\n $args['discount_amount'] = $rc['discount'];\n $args['total_amount'] = $rc['total'];\n\n $item_id = 0;\n for($line_num = 1; $line_num<=$num_lines; $line_num++) {\n if( $existing_id == 0 ) {\n //\n // Check for auto categories\n //\n if( (!isset($args['category']) || $args['category'] == '') \n && isset($args['object']) && isset($settings['invoice-autocat-' . $args['object']]) \n ) {\n $args['category'] = $settings['invoice-autocat-' . $args['object']];\n }\n\n //\n // Add the item\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectAdd');\n $rc = ciniki_core_objectAdd($ciniki, $tnid, 'ciniki.sapos.invoice_item', $args, 0x04);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $item_id = $rc['id'];\n\n //\n // Check for a callback to the object\n //\n if( $args['object'] != '' && $args['object_id'] != '' ) {\n list($pkg,$mod,$obj) = explode('.', $args['object']);\n $rc = ciniki_core_loadMethod($ciniki, $pkg, $mod, 'sapos', 'itemAdd');\n if( $rc['stat'] == 'ok' ) {\n $fn = $rc['function_call'];\n $rc = $fn($ciniki, $tnid, $args['invoice_id'], $args);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n // Update the invoice item with the new object and object_id\n if( (isset($rc['object']) && $rc['object'] != $args['object'])\n || (isset($rc['flags']) && $rc['flags'] != $args['flags'])\n ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.sapos.invoice_item', \n $item_id, $rc, 0x04);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n }\n }\n }\n } else {\n //\n // If item object already exists in invoice, then add\n //\n\n //\n // Calculate the final amount for the item in the invoice\n //\n $item['old_quantity'] = $item['quantity'];\n $new_args = array('quantity'=>($item['quantity'] + $args['quantity']));\n ciniki_core_loadMethod($ciniki, 'ciniki', 'sapos', 'private', 'itemCalcAmount');\n $rc = ciniki_sapos_itemCalcAmount($ciniki, array(\n 'quantity'=>$new_args['quantity'],\n 'unit_amount'=>(isset($args['unit_amount'])?$args['unit_amount']:$item['unit_amount']),\n 'unit_discount_amount'=>(isset($args['unit_discount_amount'])?$args['unit_discount_amount']:$item['unit_discount_amount']),\n 'unit_discount_percentage'=>(isset($args['unit_discount_percentage'])?$args['unit_discount_percentage']:$item['unit_discount_percentage']),\n 'unit_preorder_amount'=>(isset($args['unit_preorder_amount'])?$args['unit_preorder_amount']:$item['unit_preorder_amount']),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $new_args['subtotal_amount'] = $rc['subtotal'];\n $new_args['discount_amount'] = $rc['discount'];\n $new_args['total_amount'] = $rc['total'];\n\n //\n // Update the item\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.sapos.invoice_item', \n $item['id'], $new_args, 0x04);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n \n //\n // Update the item values for callbacks\n //\n if( isset($args['quantity']) && $args['quantity'] != $item['quantity'] ) {\n $item['old_quantity'] = $item['quantity'];\n $item['quantity'] = $args['quantity'];\n }\n\n //\n // Check for a callback to the object\n //\n if( $item['object'] != '' && $item['object_id'] != '' ) {\n list($pkg,$mod,$obj) = explode('.', $item['object']);\n $rc = ciniki_core_loadMethod($ciniki, $pkg, $mod, 'sapos', 'itemUpdate');\n if( $rc['stat'] == 'ok' ) {\n $fn = $rc['function_call'];\n $rc = $fn($ciniki, $tnid, $item['invoice_id'], $item);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n }\n }\n $item_id = $item['id'];\n }\n $args['line_number']++;\n }\n\n //\n // Update the taxes\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'sapos', 'private', 'invoiceUpdateShippingTaxesTotal');\n $rc = ciniki_sapos_invoiceUpdateShippingTaxesTotal($ciniki, $tnid, $args['invoice_id']);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update the invoice status\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'sapos', 'private', 'invoiceUpdateStatusBalance');\n $rc = ciniki_sapos_invoiceUpdateStatusBalance($ciniki, $tnid, $args['invoice_id']);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n return array('stat'=>'ok', 'id'=>$item_id);\n}", "title": "" }, { "docid": "996ba4348cf21cfcfd6f581e32e027d1", "score": "0.46181846", "text": "public function calculate(Invoice $invoice, InvoiceItem $item, User $aff, $paymentNumber = 0, $tier = 0, $paymentAmount = 0.0, $paymentDate = 'now')\n {\n if ($tier == 0 && ($commissionDays = $this->getDi()->config->get('aff.commission_days')))\n {\n $signupDays = $this->getDi()->time - strtotime($invoice->getUser()->added);\n $signupDays = intval($signupDays / 3600*24); // to days\n if ($commissionDays < $signupDays)\n return; // no commission for this case, affiliate<->user relation is expired\n // however, the relation still works for 2-level commissions\n }\n \n $multi = 1.0;\n $prefix = $paymentNumber == 0 ? 'first' : 'second';\n if ($tier == 0) // for tier 0 get amount paid for given item\n {\n if ($invoice->get(\"{$prefix}_total\") == 0)\n $paidForItem = 0; // avoid division by zero\n else\n $paidForItem = $paymentAmount * $item->get(\"{$prefix}_total\") / $invoice->get(\"{$prefix}_total\");\n } else { // for higher tier just take amount paid to previous tier\n $paidForItem = $paymentAmount;\n }\n foreach ($this->findRules($invoice, $item, $aff, $paymentNumber, $tier, $paymentDate) as $rule)\n {\n if ($rule->type == AffCommissionRule::TYPE_MULTI)\n $multi *= $rule->multi;\n else {\n if ($paidForItem == 0)\n { \n // free signup?\n if (($paymentNumber == 0) && $rule->free_signup_c) return moneyRound($multi * $rule->free_signup_c);\n } elseif ($paymentNumber == 0) {\n // first payment\n if ($rule->first_payment_t == '%')\n return moneyRound($multi * $rule->first_payment_c * $paidForItem / 100);\n else\n return moneyRound($multi * $rule->first_payment_c);\n } else {\n // first payment\n if ($rule->recurring_t == '%')\n return moneyRound($multi * $rule->recurring_c * $paidForItem / 100);\n else\n return moneyRound($multi * $rule->recurring_c);\n }\n }\n }\n }", "title": "" }, { "docid": "0b769ee15fd65e777c5712e046de4eb5", "score": "0.45902738", "text": "function AddActiveInboundFees()\n\t {\n\t \t// set up charge\n\t\t$arrCharge = Array();\n\t\t$arrCharge ['Nature']\t\t= 'DR';\n\t\t$arrCharge ['Description']\t= \"Inbound Service Fee\";\n\t\t$arrCharge ['ChargeType']\t= \"INB15\";\n\t\t$arrCharge ['ChargedOn']\t= date(\"Y-m-d\");\n\t\t$arrCharge ['Amount']\t\t= 15.00;\n\t\t$arrCharge ['Status']\t\t= CHARGE_APPROVED;\n\t\t\n\t \t// for each active inbound service\n\t\t$intCount = 0;\n\t\t$selINB15Services = new StatementSelect('CDR JOIN Account ON Account.Id = CDR.Account', \n\t\t\t\t\t\t\t\t\t\t\t\t'Service, Account, Account.AccountGroup, COUNT(CDR.Id) AS CDRCount', \n\t\t\t\t\t\t\t\t\t\t\t\t\"Account.Archived NOT IN (1, 3) AND Service IS NOT NULL AND Credit = 0 AND Status IN (\".CDR_RATED.\", \".CDR_TEMP_INVOICE.\") AND ServiceType = \".SERVICE_TYPE_INBOUND, \n\t\t\t\t\t\t\t\t\t\t\t\tNULL, \n\t\t\t\t\t\t\t\t\t\t\t\tNULL, \n\t\t\t\t\t\t\t\t\t\t\t\t\"Service \\n HAVING CDRCount > 0\");\n\t\t$selINB15Services->Execute();\n\t\techo(\"Service : CDR Count\\n\\n\");\n\t\twhile ($arrService = $selINB15Services->Fetch())\n\t\t{\n\t\t\t// add to report\n\t\t\t//TODO!rich! replace this echo with report output\n\t\t\techo(\"{$arrService['Service']} : {$arrService['CDRCount']}\\n\");\n\t\t\t\n\t\t\t// add to the count\n\t\t\t$intCount++;\n\t\t\t\n\t\t\t// charge late payment fee\n\t\t\t$arrCharge['Service'] \t\t= $arrService['Service'];\n\t\t\t$arrCharge['Account'] \t\t= $arrService['Account'];\n\t\t\t$arrCharge['AccountGroup'] \t= $arrService['AccountGroup'];\n\t\t\t$this->Framework->AddCharge($arrCharge);\n\t\t}\n\t\t\n\t\t// return count\n\t\treturn $intCount;\n\t }", "title": "" }, { "docid": "2087f4be6293cbf738842ca050004100", "score": "0.45896748", "text": "public function show(InvoicesItem $invoicesItem)\n {\n //\n }", "title": "" }, { "docid": "d797b05398b6c242a71f461c7afb5c03", "score": "0.45863277", "text": "public function createOrder()\n {\n $items = array();\n $itemInfoObjects = func_get_args();\n\n $billingAmount = 0;\n $shippingAmount = 0;\n $taxAmount = 0;\n $isVirtual = 1;\n $weight = 0;\n foreach ($itemInfoObjects as $itemInfo) {\n $item = $this->_getItem($itemInfo);\n $billingAmount += $item->getPrice();\n $shippingAmount += $item->getShippingAmount();\n $taxAmount += $item->getTaxAmount();\n $weight += $item->getWeight();\n if (!$item->getIsVirtual()) {\n $isVirtual = 0;\n }\n $items[] = $item;\n }\n $grandTotal = $billingAmount + $shippingAmount + $taxAmount;\n\n $order = Mage::getModel('sales/order');\n\n $billingAddress = Mage::getModel('sales/order_address')\n ->setData($this->getBillingAddressInfo())\n ->setId(null);\n\n $shippingInfo = $this->getShippingAddressInfo();\n $shippingAddress = Mage::getModel('sales/order_address')\n ->setData($shippingInfo)\n ->setId(null);\n\n $payment = Mage::getModel('sales/order_payment')\n ->setMethod($this->getMethodCode());\n\n $transferDataKays = array(\n 'store_id', 'store_name', 'customer_id', 'customer_email',\n 'customer_firstname', 'customer_lastname', 'customer_middlename', 'customer_prefix',\n 'customer_suffix', 'customer_taxvat', 'customer_gender', 'customer_is_guest',\n 'customer_note_notify', 'customer_group_id', 'customer_note', 'shipping_method',\n 'shipping_description', 'base_currency_code', 'global_currency_code', 'order_currency_code',\n 'store_currency_code', 'base_to_global_rate', 'base_to_order_rate', 'store_to_base_rate',\n 'store_to_order_rate'\n );\n\n $orderInfo = $this->getOrderInfo();\n foreach ($transferDataKays as $key) {\n if (isset($orderInfo[$key])) {\n $order->setData($key, $orderInfo[$key]);\n } elseif (isset($shippingInfo[$key])) {\n $order->setData($key, $shippingInfo[$key]);\n }\n }\n\n $order->setStoreId($this->getStoreId())\n ->setState(Mage_Sales_Model_Order::STATE_NEW)\n ->setBaseToOrderRate($this->getInfoValue('order_info', 'base_to_quote_rate'))\n ->setStoreToOrderRate($this->getInfoValue('order_info', 'store_to_quote_rate'))\n ->setOrderCurrencyCode($this->getInfoValue('order_info', 'quote_currency_code'))\n ->setBaseSubtotal($billingAmount)\n ->setSubtotal($billingAmount)\n ->setBaseShippingAmount($shippingAmount)\n ->setShippingAmount($shippingAmount)\n ->setBaseTaxAmount($taxAmount)\n ->setTaxAmount($taxAmount)\n ->setBaseGrandTotal($grandTotal)\n ->setGrandTotal($grandTotal)\n ->setIsVirtual($isVirtual)\n ->setWeight($weight)\n ->setTotalQtyOrdered($this->getInfoValue('order_info', 'items_qty'))\n ->setBillingAddress($billingAddress)\n ->setShippingAddress($shippingAddress)\n ->setPayment($payment);\n\n foreach ($items as $item) {\n $order->addItem($item);\n }\n\n return $order;\n }", "title": "" }, { "docid": "3d92eb0650ec9999a58b8526e56bc275", "score": "0.45835838", "text": "public function getBudgetItems() {\n\t\t$planningProject = $this->getPlanningProject();\n\t\treturn BaseQuery::create('BudgetRelation')->filterByObjecttype('Project')->filterByObjectid($planningProject->getId())->find();\n\t}", "title": "" }, { "docid": "ac1920b6f5171586f9a915d3a2bdd445", "score": "0.45800224", "text": "public function collect(\\Magento\\Sales\\Model\\Order\\Invoice $invoice)\n {\n \t$order = $invoice->getOrder();\n\n $totalDiscountAmount = $order->getMwRewardpointDiscountShow();\n $baseTotalDiscountAmount = $order->getMwRewardpointDiscount();\n\n $invoice->setGrandTotal($invoice->getGrandTotal() - $totalDiscountAmount);\n $invoice->setBaseGrandTotal($invoice->getBaseGrandTotal() - $baseTotalDiscountAmount);\n $invoice->setMwRewardpoint($order->getMwRewardpoint());\n $invoice->setMwRewardpointDiscountShow($totalDiscountAmount);\n $invoice->setMwRewardpointDiscount($baseTotalDiscountAmount);\n\n return $this;\n }", "title": "" }, { "docid": "86793fe239994e9507ba4c76376b3e95", "score": "0.45757076", "text": "public function index()\n {\n return InvoiceLineResource::collection(InvoiceLine::all(self::indexAttributes()));\n }", "title": "" }, { "docid": "478b055875bf05c526e2d1cd55058120", "score": "0.45600262", "text": "public function serialize_invoice_commissions_item($item)\n {\n $doc = new DOMDocument('1.0');\n $doc->formatOutput = true;\n // setup document root 'invoice'\n $root = $doc->createElement('invoices-items-commissions-item');\n $doc->appendChild($root);\n $this->add_field($doc, $root, 'id', $item['InvoicesItemsCommissionsItem']['id']);\n $this->add_field($doc, $root, 'employee_id', $item['InvoicesItemsCommissionsItem']['employee_id']);\n $this->add_field($doc, $root, 'invoices_item_id', $item['InvoicesItemsCommissionsItem']['invoices_item_id']);\n $this->add_field($doc, $root, 'invoice_id', $item['InvoicesItem']['invoice_id']);\n\n $this->add_field($doc, $root, 'commissions_report_id', $item['InvoicesItem']['invoice_id']);\n\n\n $this->add_field($doc, $root, 'description', $item['InvoicesItemsCommissionsItem']['description']);\n $this->add_field($doc, $root, 'date', $item['InvoicesItemsCommissionsItem']['date']);\n\n $this->add_field($doc, $root, 'percent', $item['InvoicesItemsCommissionsItem']['percent']);\n $this->add_field($doc, $root, 'amount', $item['InvoicesItemsCommissionsItem']['amount']);\n $this->add_field($doc, $root, 'rel_inv_amt', $item['InvoicesItemsCommissionsItem']['rel_inv_amt']);\n $this->add_field($doc, $root, 'rel_inv_line_item_amt', $item['InvoicesItemsCommissionsItem']['rel_inv_line_item_amt']);\n $this->add_field($doc, $root, 'rel_item_amt', $item['InvoicesItemsCommissionsItem']['rel_item_amt']);\n $this->add_field($doc, $root, 'rel_item_quantity', $item['InvoicesItemsCommissionsItem']['rel_item_quantity']);\n $this->add_field($doc, $root, 'rel_item_cost', $item['InvoicesItemsCommissionsItem']['rel_item_cost']);\n $this->add_field($doc, $root, 'rel_item_amt', $item['InvoicesItemsCommissionsItem']['rel_item_amt']);\n $this->add_field($doc, $root, 'cleared', $item['InvoicesItemsCommissionsItem']['cleared']);\n $this->add_field($doc, $root, 'voided', $item['InvoicesItemsCommissionsItem']['voided']);\n\n\n\n // timestamp\n $dategenerated = $doc->createElement('date_generated');\n $dategenerated = $root->appendChild($dategenerated);\n $text = $doc->createTextNode(date('D, d M Y H:i:s'));\n $text = $dategenerated->appendChild($text);\n\n\n return $doc->saveXML();\n\n }", "title": "" }, { "docid": "13cb03fa163258f354286a5f0a3db0d9", "score": "0.45582214", "text": "public function getHrBenfitSpendingInvoice( )\r\n\t{\r\n\t\t$result = self::checkSession();\r\n\t\treturn self::getCompanyCreditsLists($result->customer_buy_start_id);\r\n\t}", "title": "" }, { "docid": "5d1eb83cfb2d3a43b4487a07397f6130", "score": "0.45558587", "text": "public static function getInvoiceWithOutstandingPayments()\n {\n $rows = new Query();\n\n $result = $rows->select([ 'invoice.*', 'customer.fullname', 'user.fullname as salesPerson', 'branch.name as branchName', 'customer.type', 'customer.company_name' ])\n ->from('invoice')\n ->join('LEFT JOIN', 'user', 'invoice.user_id = user.id')\n ->join('LEFT JOIN', 'branch', 'invoice.branch_id = branch.id')\n ->join('LEFT JOIN', 'car_information', 'invoice.customer_id = car_information.id')\n ->join('LEFT JOIN', 'customer', 'car_information.customer_id = customer.id')\n ->where('invoice.paid <> 1')\n ->orderBy(['invoice.id' => SORT_DESC])\n ->all();\n\n return $result;\n }", "title": "" }, { "docid": "d661446ec9410057153f7791473f8ed8", "score": "0.45542046", "text": "public function invoice_data()\n {\n $data = new Collection();\n if (!is_null($this->invoice_data)) {\n\n return $this->invoice_data;\n\n } else {\n\n $this->invoice_data = $this->getDataForInvoice();\n\n //dd($this->invoice_data);\n\n foreach ($this->invoice_data as $order) {\n\n $data->push($order);\n\n foreach ($order->users as $user) {\n\n $data->push($user);\n }\n\n $data->push($order->data);\n\n }\n\n $this->invoice_data = $data;\n\n return $data;\n }\n\n }", "title": "" }, { "docid": "1e278147bae3bda72b0623ed93206ecd", "score": "0.4539187", "text": "private function iterateItem($item)\n {\n if (!$item) {\n return [];\n }\n // format display date to be [July 2019]\n $parse = sprintf('%s-%s-%s', $item->year, $item->mth, 1);\n $month_year = Carbon::parse($parse)->format('F Y');\n $item->month_year = $month_year;\n\n // format Spending amount to currency\n $item->spending_amount = number_format($item->spending_amount, 2);\n\n return $item;\n }", "title": "" }, { "docid": "c611ee04f5c41ccf3458631496478edd", "score": "0.45338213", "text": "public function getMailBoxCharges() {\r\n\t\t\r\n\t\t// Determine commodity for small packages / mailbox\r\n\t\t$this->calculateSmallPackgeMailBoxCommodityCost ();\r\n\t\t\r\n\t\t// Determine small package domestic cost;\r\n\t\t$this->calculateSmallPkgDomesticCost ();\r\n\t\t\r\n\t\t// Get established mailbox difference\r\n\t\t$mailboxWeightDifference = number_format ( $this->db->getMailBoxDifference ( $this->actualWeight )->difference, 2, '.', '' );\r\n\t\t\r\n\t\t// Determine Mailbox Chargeable Weight\r\n\t\tif ($this->weightDifference > $mailboxWeightDifference) {\r\n\t\t\t$mailBoxChargeableWeight = ceil ( $this->sumVolPkgWeight );\r\n\t\t} else {\r\n\t\t\tif ($this->sumPkgWeight <= '0.00') {\r\n\t\t\t\t$mailBoxChargeableWeight = ceil ( $this->sumVolPkgWeight );\r\n\t\t\t} else {\r\n\t\t\t\t$mailBoxChargeableWeight = ceil ( $this->sumPkgWeight );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Determine MailBox Rate details\r\n\t\t$destination = $this->shipment->shipTo->countryCode;\r\n\t\t$origin = $this->shipment->shipFrom->zip;\r\n\t\t\r\n\t\t$mailBoxRates = $this->db->getMailBoxRates ( $origin, $destination );\r\n\t\t\r\n\t\t// MailBox Calculation\r\n\t\tif ($origin == '33166') {\r\n\t\t\tif (empty ( $mailBoxRates )) {\r\n\t\t\t\t$usMailBoxFreightTotal = null;\r\n\t\t\t} else {\r\n\t\t\t\tif ($this->chargeableWeight > 150 || $this->chargeableWeight <= 0) {\r\n\t\t\t\t\t$usMailBoxFreightTotal = null;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$wgt = $mailBoxChargeableWeight;\r\n\t\t\t\t\t$usMailBoxFreightTotal = '0.00';\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor($i = 0; $i < count ( $mailBoxRates ); $i ++) {\r\n\t\t\t\t\t\tif ($wgt <= 0) { // calculation is finished.\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$poundRange = (($mailBoxRates [$i]->max_measure - $mailBoxRates [$i]->min_measure) + 1);\r\n\t\t\t\t\t\t\t$baseRate = $mailBoxRates [$i]->base_rate; // base rate associated with pound range\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t// check to see wheather has exceed chargeableweight\r\n\t\t\t\t\t\t\tif ($wgt >= $poundRange) {\r\n\t\t\t\t\t\t\t\t$useWeight = $poundRange;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$useWeight = $wgt;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$usMailBoxFreight = number_format ( ($usMailBoxFreight + ($useWeight * $baseRate)), 2, '.', '' );\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$wgt = $wgt - $useWeight; // decrement chargeable weight by the amount used in freight calculation abouve\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// ===============Total Freight Cost and Fees========================\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (($destination == \"DM\") && ($mailBoxChargeableWeight >= 2)) {\r\n\t\t\t\t\t\t$usMailBoxFreight = number_format ( ($usMailBoxFreight - 8), 2, '.', '' );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$usMailBoxFreight = number_format ( ($usMailBoxFreight), 2, '.', '' );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->basicUSMailBoxFreightCost = $usMailBoxFreight; // used for other extra fees cost;\r\n\t\t\t\t\t$this->totalUSMailBoxShipmentCharges = new \\stdClass ();\r\n\t\t\t\t\t$this->totalUSMailBoxShipmentCharges->baseRate = $this->basicUSMailBoxFreightCost;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($this->totalHazardousPkgCount > 0) { // not yet implemented\r\n\t\t\t\t\t\t$usMailBoxFreightTotal = number_format ( (($usMailBoxFreight * 1.5) + (self::HAZARDOUS_RATE_PER_PACKAGE * $this->totalHazardousPkgCount)), 2, '.', '' );\r\n\t\t\t\t\t\t$hazardousCharge = $usMailBoxFreightTotal - $usMailBoxFreight;\r\n\t\t\t\t\t\t$this->totalUSMailBoxShipmentCharges->fees [\"Hazardous Fee\"] = $hazardousCharge;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$usMailBoxFreightTotal = number_format ( ($usMailBoxFreight), 2, '.', '' );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($origin != '33166') {\r\n\t\t\t\t\t\t$usMailBoxFreightTotal = number_format ( ($usMailBoxFreightTotal + $this->smallPkgDomesticCost + $this->smallpkgCommodityCost), 2, '.', '' );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$usMailBoxFreightTotal = number_format ( ($usMailBoxFreightTotal + $this->smallpkgCommodityCost), 2, '.', '' );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->totalUSMailBoxShipmentCharges->rate = $usMailBoxFreightTotal;\r\n\t\t\t\t\t$this->totalUSMailBoxShipmentCharges = $this->addExtraFees ( $this->totalUSMailBoxShipmentCharges );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$usMailBoxFreightTotal = null;\r\n\t\t\t$this->totalUSMailBoxShipmentCharges = $usMailBoxFreightTotal;\r\n\t\t}\r\n\t\treturn $this->totalUSMailBoxShipmentCharges;\r\n\t}", "title": "" }, { "docid": "f81567d49105e235ddb43e1d97be98d7", "score": "0.45298815", "text": "public function invoices()\n {\n return $this->hasMany(Invoice::class);\n }", "title": "" }, { "docid": "46fe60d3340f80426cb03b28203eacf2", "score": "0.45296437", "text": "public function getInvoice(){\r\n\t\treturn $this->db->query('\r\n\t\t\t\t\t\t\t\t\tSELECT\r\n\t\t\t\t\t\t\t\t\t\ti.*,\r\n\t\t\t\t\t\t\t\t\t\tc.customer_name\r\n\t\t\t\t\t\t\t\t\tFROM invoice i\r\n\t\t\t\t\t\t\t\t\tINNER JOIN sales s ON s.sales_id = i.sales_id\r\n\t\t\t\t\t\t\t\t\tINNER JOIN customer c ON c.customer_id = s.customer_id\r\n\t\t\t\t\t\t\t\t\t\tWHERE paid_amount < sales_amount\r\n\t\t\t\t\t\t\t\t')->result();\r\n\t}", "title": "" }, { "docid": "daa96e935af512c1325e2b4ada1e11a7", "score": "0.45294112", "text": "public function getAllCashReceivedInvoiceDetails(){\n\n try {\n $invoiceDetials = array();\n $invoiceDetials = DB::table('sale_invoices')\n ->join('cash_received_from_sales', 'sale_invoices.invoiceNum', '=', 'cash_received_from_sales.invoiceNum')\n ->join('customer_details', 'sale_invoices.customerId', '=', 'customer_details.id')\n ->select(\n 'cash_received_from_sales.invoiceNum',\n 'customer_details.customerName', \n 'cash_received_from_sales.date', \n 'cash_received_from_sales.cashPaid'\n )\n ->get();\n\n $cashReceived = DB::table('cash_received_from_sales')->sum('cashPaid'); \n\n return response()->json([\n 'success'=>true,\n 'error'=>null,\n 'code'=>200,\n 'total'=>count($invoiceDetials),\n 'cumCashReceived'=>$cashReceived,\n 'data'=>$invoiceDetials\n ], 200);\n \n } catch (Exception $e) {\n return response()->json([\n 'success'=>false,\n 'error'=>($e->getMessage()),\n 'code'=>500\n ], 500);\n }\n }", "title": "" }, { "docid": "281758a328fdc37cffca3af9fe1e7460", "score": "0.45267284", "text": "public function processStoredCc($client_reference_id, $account_reference_id, $amount, array $invoice_amounts = null)\n {}", "title": "" }, { "docid": "c430babb1d8296a00647a3cf88d05a75", "score": "0.45195332", "text": "public function invoices($id)\n {\n return view('budget.invoices', ['user' => Auth::user()]);\n }", "title": "" }, { "docid": "e4c91737e31927612b30600dceaea9b2", "score": "0.45159742", "text": "public function prepare_items() {\n\t\tglobal $wpdb;\n\n\t\t$this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns() );\n\t\t$current_page = absint( $this->get_pagenum() );\n\t\t$per_page = absint( apply_filters( 'wcs_reports_customers_per_page', 20 ) );\n\t\t$offset = absint( ( $current_page - 1 ) * $per_page );\n\n\t\t$this->totals = self::get_data();\n\n\t\t$customer_query = apply_filters( 'wcs_reports_current_customer_query',\n\t\t\t\"SELECT customer_ids.meta_value as customer_id,\n\t\t\t\t\tCOUNT(subscription_posts.ID) as total_subscriptions,\n\t\t\t\t\tCOALESCE( SUM(parent_total.meta_value), 0) as initial_order_total,\n\t\t\t\t\tCOUNT(DISTINCT parent_order.ID) as initial_order_count,\n\t\t\t\t\tSUM(CASE\n\t\t\t\t\t\t\tWHEN subscription_posts.post_status\n\t\t\t\t\t\t\t\tIN ( 'wc-\" . implode( \"','wc-\", apply_filters( 'wcs_reports_active_statuses', array( 'active', 'pending-cancel' ) ) ) . \"' ) THEN 1\n\t\t\t\t\t\t\tELSE 0\n\t\t\t\t\t\t\tEND) AS active_subscriptions\n\t\t\t\tFROM {$wpdb->posts} subscription_posts\n\t\t\t\tINNER JOIN {$wpdb->postmeta} customer_ids\n\t\t\t\t\tON customer_ids.post_id = subscription_posts.ID\n\t\t\t\t\tAND customer_ids.meta_key = '_customer_user'\n\t\t\t\tLEFT JOIN {$wpdb->posts} parent_order\n\t\t\t\t\tON parent_order.ID = subscription_posts.post_parent\n\t\t\t\t\tAND parent_order.post_status IN ( 'wc-\" . implode( \"','wc-\", apply_filters( 'woocommerce_reports_paid_order_statuses', array( 'completed', 'processing' ) ) ) . \"' )\n\t\t\t\tLEFT JOIN {$wpdb->postmeta} parent_total\n\t\t\t\t\tON parent_total.post_id = parent_order.ID\n\t\t\t\t\tAND parent_total.meta_key = '_order_total'\n\t\t\t\tWHERE subscription_posts.post_type = 'shop_subscription'\n\t\t\t\t\tAND subscription_posts.post_status NOT IN ('wc-pending', 'trash')\n\t\t\t\tGROUP BY customer_ids.meta_value\n\t\t\t\tORDER BY customer_id DESC\n\t\t\t\tLIMIT {$offset}, {$per_page}\" );\n\n\t\t$this->items = $wpdb->get_results( $customer_query );\n\n\t\t// Now get each customer's renewal and switch total\n\t\t$customer_renewal_switch_total_query = apply_filters( 'wcs_reports_current_customer_renewal_switch_total_query',\n\t\t\t\"SELECT\n\t\t\t\tcustomer_ids.meta_value as customer_id,\n\t\t\t\tCOALESCE( SUM(renewal_switch_totals.meta_value), 0) as renewal_switch_total,\n\t\t\t\tCOUNT(DISTINCT renewal_order_posts.ID) as renewal_switch_count\n\t\t\t\tFROM {$wpdb->postmeta} renewal_order_ids\n\t\t\t\tINNER JOIN {$wpdb->posts} subscription_posts\n\t\t\t\t\tON renewal_order_ids.meta_value = subscription_posts.ID\n\t\t\t\t\tAND subscription_posts.post_type = 'shop_subscription'\n\t\t\t\t\tAND subscription_posts.post_status NOT IN ('wc-pending', 'trash')\n\t\t\t\tINNER JOIN {$wpdb->postmeta} customer_ids\n\t\t\t\t\tON renewal_order_ids.meta_value = customer_ids.post_id\n\t\t\t\t\tAND customer_ids.meta_key = '_customer_user'\n\t\t\t\t\tAND customer_ids.meta_value IN ('\" . implode( \"','\", wp_list_pluck( $this->items, 'customer_id' ) ) . \"' )\n\t\t\t\tINNER JOIN {$wpdb->posts} renewal_order_posts\n\t\t\t\t\tON renewal_order_ids.post_id = renewal_order_posts.ID\n\t\t\t\t\tAND renewal_order_posts.post_status IN ( 'wc-\" . implode( \"','wc-\", apply_filters( 'woocommerce_reports_paid_order_statuses', array( 'completed', 'processing' ) ) ) . \"' )\n\t\t\t\tLEFT JOIN {$wpdb->postmeta} renewal_switch_totals\n\t\t\t\t\tON renewal_switch_totals.post_id = renewal_order_ids.post_id\n\t\t\t\t\tAND renewal_switch_totals.meta_key = '_order_total'\n\t\t\tWHERE renewal_order_ids.meta_key = '_subscription_renewal'\n\t\t\t\tOR renewal_order_ids.meta_key = '_subscription_switch'\n\t\t\tGROUP BY customer_id\n\t\t\tORDER BY customer_id\"\n\t\t);\n\n\t\t$customer_renewal_switch_totals = $wpdb->get_results( $customer_renewal_switch_total_query, OBJECT_K );\n\n\t\tforeach ( $this->items as $index => $item ) {\n\t\t\tif ( isset( $customer_renewal_switch_totals[ $item->customer_id ] ) ) {\n\t\t\t\t$this->items[ $index ]->renewal_switch_total = $customer_renewal_switch_totals[ $item->customer_id ]->renewal_switch_total;\n\t\t\t\t$this->items[ $index ]->renewal_switch_count = $customer_renewal_switch_totals[ $item->customer_id ]->renewal_switch_count;\n\t\t\t} else {\n\t\t\t\t$this->items[ $index ]->renewal_switch_total = $this->items[ $index ]->renewal_switch_count = 0;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Pagination.\n\t\t */\n\t\t$this->set_pagination_args( array(\n\t\t\t 'total_items' => $this->totals->total_customers,\n\t\t\t 'per_page' => $per_page,\n\t\t\t 'total_pages' => ceil( $this->totals->total_customers / $per_page ),\n\t\t) );\n\n\t}", "title": "" }, { "docid": "2a1613ada2a5e5ef54193ccba9929ebc", "score": "0.45138294", "text": "public function get_price_info_customer($item_id)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('price_custumer');\n\t\t$this->db->join('people', 'people.person_id = price_custumer.pk_custumer');\n\t\t$this->db->where('pk_item', $item_id);\n\n\t\treturn $this->db->get();\n\t}", "title": "" }, { "docid": "0e7babb7f1cb86da3e19e88e3ab25ec5", "score": "0.44956642", "text": "public function invoices()\n {\n return $this->hasMany('Invoice');\n }", "title": "" }, { "docid": "262841fae3a48a54a9b8b5ae4bb52a85", "score": "0.44907457", "text": "public function destroy($id) {\n $user = Auth::user();\n if (Auth::check()) {\n $userid = $user->id;\n }\n $item = invoice_verification_item::where('invoice_id', $id)->get()->toArray();\n $goods_receipt = invoice_verification::find($id)->first();\n $purchase_order_number = $goods_receipt->purchase_order_number;\n\n foreach ($item as $goods_receipt_item) {\n\n $po_item = invoice_verification_item::where(['po_order_number' => $goods_receipt_item['po_order_number'], 'purchase_order_item_no' => $goods_receipt_item['purchase_order_item_no']])->first();\n\n $data = ['account_id' => $goods_receipt->vendor,\n 'account_name' => 'Vendor Payment',\n 'Reference' => $goods_receipt->id,\n 'type' => 'IR',\n 'dr_cr_indicator' => 'DR',\n 'amount' => $goods_receipt_item['invoice_value'] + $goods_receipt_item['tax_amount'],\n 'value' => 0,\n 'company_id' => Auth::user()->company_id];\n accounts_payable::create($data);\n\n if (count($po_item) > 0) {\n $gst_account = GlAccount::where(['type_flag' => 'GSTP', 'company_id' => Auth::user()->company_id])->first();\n $gdata = [\n 'gl_account_no' => $gst_account->number,\n 'gl_account_description' => $gst_account->description,\n 'cost_element_type' => $gst_account->gl_account_element_type,\n 'amount' => $goods_receipt_item['tax_amount'],\n 'dr_cr_indicator' => 'CR',\n 'balance' => 0,\n 'cleared' => \"Yes\",\n 'company_id' => Auth::user()->company_id,\n ];\n procurement_GST::create($gdata);\n\n $gl_account_number = GlAccount::where(['type_flag' => 'GRIR', 'company_id' => Auth::user()->company_id])->first();\n $data = [\n 'po_number' => $po_item->po_order_number,\n 'item' => $po_item->purchase_order_item_no,\n 'amount' => $goods_receipt_item['invoice_value'],\n 'dr_cr_indicator' => 'CR',\n 'vendor_id' => $goods_receipt->vendor,\n 'currency' => $po_item->currency,\n 'material_documber_number' => $po_item->invoice_id,\n 'posting_date' => $goods_receipt->posting_date,\n 'created_at' => date('Y-m-d'),\n 'updated_at' => date('Y-m-d'),\n 'posted_by' => $userid,\n 'gl_account' => $gl_account_number->number,\n 'ir_value' => $goods_receipt_item['invoice_value'] + $goods_receipt_item['tax_amount'],\n 'transaction_type' => '4'\n ];\n gr_ir::create($data);\n $gl_account_number = GlAccount::where(['type_flag' => 'GRIR', 'company_id' => Auth::user()->company_id])->first();\n gl_records::insert(['remark' => 'IR-Reversed', 'ref_id' => $po_item->invoice_id, 'gl_account_number' => $gl_account_number->number, 'amount' => ($goods_receipt_item['invoice_value']),\n 'dr_cr_indicator' => 'CR', 'created_by' => Auth::user()->id, 'purchase_order_no' => $goods_receipt_item['po_order_number'],\n 'item_no' => $goods_receipt_item['purchase_order_item_no'], 'company_id' => Auth::user()->company_id,\n 'vendor' => $goods_receipt->vendor, 'invoice_number' => $goods_receipt->invoice_number,\n 'posting_date' => $goods_receipt->posting_date, 'posted_by' => Auth::user()->id, 'created_at' => date('Y-m-d')]);\n gl_records::insert(['remark' => 'IR-Reversed', 'ref_id' => $po_item->invoice_id, 'gl_account_number' => $gst_account->number, 'amount' => ($goods_receipt_item['tax_amount']),\n 'dr_cr_indicator' => 'CR', 'created_by' => Auth::user()->id, 'purchase_order_no' => $goods_receipt_item['po_order_number'],\n 'item_no' => $goods_receipt_item['purchase_order_item_no'], 'company_id' => Auth::user()->company_id,\n 'vendor' => $goods_receipt->vendor, 'invoice_number' => $goods_receipt->invoice_number,\n 'posting_date' => $goods_receipt->posting_date, 'posted_by' => Auth::user()->id, 'created_at' => date('Y-m-d')]);\n }\n }\n invoice_verification::find($id)->update(['reversed' => '1']);\n session()->flash('flash_message', 'Invoice verification Deleted Reversed... And Posted data reverted to initial value');\n return redirect('admin/invoice_verification');\n }", "title": "" }, { "docid": "c5ed6a10cbcd79e554beeeaff5896555", "score": "0.44863907", "text": "public function GetOrderItemsPlain()\n\t{\n\t\tob_start();\n\t\t\n\t\t$discounts = array();\n\t\t$total_discounts = 0;\n\t\t\n\t\tforeach($this->GetItems() as $item)\n\t\t{\techo stripslashes($item['title']), ' ', $item['qty'], 'x ', $this->formatPricePlain($item['pricetax']), \"\\n\";\n\t\t\tforeach ($item['discounts'] as $item_discount)\n\t\t\t{\tif (!$discounts[$item_discount['discid']])\n\t\t\t\t{\t$discounts[$item_discount['discid']] = new DiscountCode($item_discount['discid']);\n\t\t\t\t}\n\t\t\t\techo 'Discount: ', stripslashes($discounts[$item_discount['discid']]->details['discdesc']), ' - ', $this->formatPricePlain($item_discount['discamount']), \"\\n\";\n\t\t\t\t$total_discounts += $item_discount['discamount'];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($total_discounts)\n\t\t{\techo 'Total Discounts: - ', $this->formatPricePlain($total_discounts), \"\\n\";\n\t\t}\n\t\t\n\t\tif($del = $this->details['delivery_price'])\n\t\t{\techo \"Delivery: \", $this->formatPricePlain($del), \"\\n\";\n\t\t}\n\t\t\n\t\t$total = $this->GetTotal();\n\t\t$today = $this->GetTotal(true);\n\t\t\n\t\tif(($total != $price) && ($today > 0))\n\t\t{\techo \"Paid to date: \", $this->formatPricePlain($today), \"\\n\";\n\t\t}\n\t\t\n\t\techo \"Total: \", $this->formatPricePlain($total), \"\\n\";\n\t\t\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "a5cc92585119e1436cb21ad013bb94a8", "score": "0.44833523", "text": "public function getBudgetAccountLine()\n {\n return $this->budgetAccountLine;\n }", "title": "" }, { "docid": "914a0b60d58c8b5cbd9f38f8e33c5107", "score": "0.44768724", "text": "public function invoices(): HasMany\n {\n return $this->hasMany(Invoice::class);\n }", "title": "" }, { "docid": "09587454e9eb43a8fe3de3c35f33a673", "score": "0.4463989", "text": "public function generatePaymentModel ( ) {\n\t\t# Prepare\n\t\t$Invoice = $this;\n\t\t$invoice = $Invoice->toArray(false);\n\t\t\n\t\t# Prepare PaymentInvoice\n\t\t$PaymentInvoice = new Bal_Payment_Model_Invoice();\n\t\t\n\t\t# Adjust Keys\n\t\t$keys = $PaymentInvoice->getKeys(); array_keys_keep($invoice, $keys);\n\t\t$invoice['id'] = $Invoice->code;\n\t\t\n\t\t# Apply the Payer\n\t\t$invoice['Payer'] = $Invoice->UserFor->generatePaymentModel();\n\t\t\n\t\t# Apply the InvoiceItems\n\t\t$invoice['InvoiceItems'] = array();\n\t\tforeach ( $Invoice->InvoiceItems as $InvoiceItem ) {\n\t\t\t$invoice['InvoiceItems'][] = $InvoiceItem->generatePaymentModel();\n\t\t}\n\t\t\n\t\t# Apply the Invoice\n\t\t$PaymentInvoice->merge($invoice);\n\t\t\n\t\t# Apply the Totals\n\t\t$PaymentInvoice->applyTotals();\n\t\t\n\t\t# Validate\n\t\t$PaymentInvoice->validate();\n\t\t\n\t\t# Return the PaymentInvoice\n\t\treturn $PaymentInvoice;\n\t}", "title": "" }, { "docid": "70c1e1154ffaba2dbd8218c4065c5c14", "score": "0.44631976", "text": "public function show(InvoiceItem $invoiceItem)\n {\n //\n }", "title": "" }, { "docid": "e13c5fa3322f716dd78863587b457fb6", "score": "0.44578934", "text": "public function get_price_customer_info_items($item_id)\n\t{\n\t\t$this->db->select('items_prices_customer.*,people.full_name');\n\t\t$this->db->from('items_prices_customer');\n\t\t$this->db->join('items', 'items.id = items_prices_customer.item_id', 'left');\n\t\t$this->db->join('customers', 'customers.person_id = items_prices_customer.customer_id', 'left');\n\t\t$this->db->join('people', 'people.person_id = items_prices_customer.customer_id', 'left');\n\t\t$this->db->where('items_prices_customer.id', $item_id);\n\n\t\t$query = $this->db->get();\n\n\t\tif($query->num_rows() == 1)\n\t\t{\n\t\t\treturn $query->row();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Get empty base parent object, as $item_id is NOT an item\n\t\t\t$item_obj = new stdClass();\n\n\t\t\t//Get all the fields from items table\n\t\t\tforeach($this->db->list_fields('items_prices_customer') as $field)\n\t\t\t{\n\t\t\t\t$item_obj->$field = '';\n\t\t\t}\n\t\t\t$item_obj->full_name = '';\n\t\t\treturn $item_obj;\n\t\t}\n\t}", "title": "" }, { "docid": "24503212eaf74b57742328f98e4ca952", "score": "0.44578126", "text": "public function getTotalsForDisplay()\n {\n $label = Mage::helper('sales')->__($this->getTitle()) . ':';\n $fontSize = $this->getFontSize() ? $this->getFontSize() : 7;\n\n $totals = array(); // multiple totals\n\n foreach ($this->getSource()->getItemsCollection() as $_item){\n if($_item instanceof Mage_Sales_Model_Order_Item){ // Order\n $productType = $_item->getProductType();\n }else{ // Invoice, Creditmemo\n $productType = $_item->getOrderItem()->getProductType();\n }\n\n if($productType == Auguria_Insurance_Model_Catalog_Product_Type_Insurance::AUGURIA_INSURANCE_PRODUCT_TYPE_ID){ // is insurance\n // add the insurance total\n $totals[] = array(\n 'amount' => $this->getFormatedPrice($_item, $this->getSource()->getStore()),\n 'label' => $_item->getName() . ' ' . Mage::helper('auguria_insurance')->__('(included in total amount)'),\n 'font_size' => $fontSize\n );\n }\n }\n\n return $totals;\n }", "title": "" }, { "docid": "cbea3167a0c372b723d944db10b27c63", "score": "0.44551012", "text": "public function invoices($subscription_code, $include_pending = false)\n {\n $invoices = [];\n\n Moip::init($this->getApiToken(), $this->getApiKey(), $this->getEndpointEnvironment());\n\n $moip_invoices = Moip_Invoice::search($subscription_code);\n\n // Here we will loop through the Moip invoices and create our own custom Invoice\n // instances that have more helper methods and are generally more convenient to\n // work with than the plain Moip objects are. Then, we'll return the array.\n foreach ($moip_invoices as $invoice) {\n if ($invoice->status->description == 'Pago' || $include_pending) {\n $invoices[] = new Invoice($invoice);\n }\n }\n\n return new Collection($invoices);\n }", "title": "" }, { "docid": "02ab57ab0ee348923da501c48f8e25c0", "score": "0.44536164", "text": "public function items(): HasMany\n {\n return $this->hasMany(InvoiceItemProxy::modelClass())\n ->whereNull('parent_id');\n }", "title": "" }, { "docid": "4d3c56c2b5b543ebb56b8b8c959a74ee", "score": "0.4444119", "text": "public function fnPrintInvoicebill($invoiceid)\n {\n $invoices = DB::table('invoice')->join('quotations', 'quotations.qtid', '=', 'invoice.qtid')\n ->join('company', 'company.cpid', '=', 'invoice.cpid')\n ->join('repairbill', 'repairbill.rpbid', '=', 'quotations.rpbid')\n ->join('receivecars', 'receivecars.rcsid', '=', 'repairbill.rcsid')\n ->join('cars', 'cars.carid', '=', 'receivecars.carid')\n ->join('brands', 'brands.brandid', '=', 'cars.brandid')\n ->where('invoice.invoiceid', '=', $invoiceid)\n ->select('invoice.*', 'company.*', 'cars.*', 'brands.brandname')->get();\n $inlist = DB::table('invoice_detail')\n ->join('spares', 'spares.rpnoid', '=', 'invoice_detail.rpnoid')\n ->join('unitspare', 'unitspare.unitid', '=', 'spares.unitid')\n ->where('invoiceid', $invoiceid)\n ->select('invoice_detail.*', 'spares.sparesname', 'unitspare.unitname')->get();\n $wages = DB::table('invoice_detail')->join('wages', 'wages.wageid', '=', 'invoice_detail.wageid')\n ->where('invoice_detail.invoiceid', '=', $invoiceid)->select('wages.*')->get();\n $sumspares = DB::table('invoice_detail')->where('invoiceid', $invoiceid)->sum('price');\n $sumwages = DB::table('invoice_detail')->join('wages', 'wages.wageid', '=', 'invoice_detail.wageid')->where('invoiceid', $invoiceid)->sum('wages.cost');\n $url = \"invoicelist\";\n $i = 1;\n $w = 1;\n return view('manage/account/invoicebill')->with('invoices', $invoices)->with('url', $url)->with('inlist', $inlist)\n ->with('i', $i)->with('w', $w)->with('wages', $wages)->with('sumspares', $sumspares)->with('sumwages', $sumwages);\n }", "title": "" }, { "docid": "305da7da1023dd05e7138a06bb3a05b9", "score": "0.44303247", "text": "function generateMonthlyInvoices($com_id){\n\t\tglobal $db;\n\t\t$today = date(\"Y-m-d\");\n\t\t$invoice_date = date(\"Y-m-d (h:i A)\");\n\t\t$thisMonth = date(\"Y-m-01\");\n\t\t$lastDay = date(\"Y-m-t\");\n\t\t$due_date = getdatedifference($today,15);\n\t\t$due_date = \tdate(\"Y-m-d\", strtotime($due_date));\n\t\t$companyTax = getCompanyTax($com_id);\n\t\t$selCom = getcompany($com_id);\n\t\t$rsCom = @mysql_fetch_assoc($selCom);\n\t\t$credits = $rsCom['credits'];\n\t\t$comName = $rsCom['name'];\n\t\t$comPName = ($rsCom['pname']!=\"\")?$rsCom['pname']:'';\n\t\t$comPEmail = $rsCom['email'];\n\t\t$comPPhone = $rsCom['phone'];\n\t\t$comPAddress = $rsCom['address'];\n\t\t// if payment check wise or case wise\n\t\tif($rsCom['is_check_wise_pay']==1){\n\t\t$whr = \" AND v_status='Close' \";\n\t\t}\n\t\t\n\t\t// Postpaid = 0 or Prepaid = 1\n\t\tif($rsCom['account_type']==0){\n\t\t$whr2 = \" AND as_status='Close' AND as_sent=4 \";\n\t\t}\n\t\t\n\t\t\n\t\t$monthly_credits_allowed = $rsCom['monthly_credits_allowed'];\n\t\t$citbls= \"client_invoices ci INNER JOIN ver_data vd ON ci.v_id=vd.v_id INNER JOIN ver_checks vc ON vd.v_id=vc.v_id\";\n\t\t$cicols = \"SUM(as_cost2) AS cost ,ci.invoice_number\";\n\t\t$ciwhere = \"ci.paid=0 AND m_invoiced=0 AND ci.invoiced=0 AND DATE(as_addate) >= '$thisMonth' AND DATE(as_addate) <= '$today' AND ci.com_id=$com_id AND vd.v_isdlt=0 AND vc.as_isdlt=0 AND ci.v_id!='' $whr $whr2\";\n\t\t//echo \"SELECT $cicols FROM $citbls WHERE $ciwhere\";\n\t\t$rsCost = @mysql_fetch_assoc($db->select($citbls,$cicols,$ciwhere));\n\t\t$total = (int) $rsCost['cost'];\n\t\t$taxAmount = 0;\n\t\tif(is_numeric($total) && $total>0){\n\t\tif(is_numeric($companyTax) && $companyTax!=0){\n\t\t$taxAmount = round(($total*$companyTax)/100);\t\n\t\t\n\t\t}\n\t\t$grand_total = $total+$taxAmount;\n\t\t\n\t\t//echo '$grand_total: '.$grand_total.' $companyTax: '.$companyTax.' $taxAmount:'.$taxAmount; exit;\n\t\t\n\t\t\n\t\tif($rsCost['invoice_number']==\"\"){\n\t\tif(strtotime($lastDay)==strtotime($today)){\n\t\t$upd=true;\t\n\t\t\n\t\t// Insert Monthly Invoice\n\t\t$db->insert(\"total,grand_total,due_date\",\"'$total','$grand_total','$due_date'\",\"monthly_invoice\");\t\n\t\t$invoice_id = $db->insertedID;\n\t\t$invoice_number = \"RD/L/\".date(\"y\").\"/\".date(\"m\").\"/\".$invoice_id;\n\t\t$our_ref = \"RD/$rsCom[sname]/\".date(\"y\").\"/\".date(\"m\").\"/\".$invoice_id.\"-\".$invoice_id;\n\t\t$db->updateCol(\"invoice_number,our_ref\",\"'$invoice_number','$our_ref'\",'monthly_invoice',\"id=$invoice_id\");\n\t\t\n\t\t}else{\n\t\tdie(\"Invoice will generate on the last date of the month\");\n\t\t}\n\t\t}else{\n\t\t$upd=false;\n\t\t$rsInv = @mysql_fetch_assoc($db->select(\"monthly_invoice\",\"id,add_date,our_ref\",\"invoice_number='$rsCost[invoice_number]'\"));\n\t\t$invoice_id = $rsInv['id'];\n\t\t$invoice_date = $rsInv['add_date'];\n\t\t$invoice_date = date(\"Y-m-d (h:i A)\",strtotime($invoice_date));\n\t\t$invoice_number = $rsCost['invoice_number'];\n\t\t$our_ref = $rsInv['our_ref'];\n\t\t}\n\t\t$tblsss = \"*,ci.id as ci_id, ci.v_id, v_name AS 'Applicant', vc.as_cost2 AS cost, v_name, ci.add_date\";\n\t\t$wheres = \"ci.paid=0 AND m_invoiced=0 AND ci.invoiced=0 AND DATE(as_addate) >= '$thisMonth' AND DATE(as_addate) <= '$today' AND ci.com_id=$com_id AND vd.v_isdlt=0 AND vc.as_isdlt=0 AND ci.v_id!='' $whr $whr2\";\n\t\t//echo \"select $tblsss from $citbls where $wheres\";\n\t\t\n\t\t// to get applicant count start\n\t\t$tblsss2 = \"ci.v_id\";\n\t\t$wheres2 = \"ci.paid=0 AND m_invoiced=0 AND ci.invoiced=0 AND DATE(as_addate) >= '$thisMonth' AND DATE(as_addate) <= '$today' AND ci.com_id=$com_id AND vd.v_isdlt=0 AND vc.as_isdlt=0 AND ci.v_id!='' $whr $whr2 group by vc.v_id\";\n\t\t$rst2 = $db->select($citbls,$tblsss2,$wheres2);\n\t\t// to get applicant count end\n\t\t\n\t\t$rst = $db->select($citbls,$tblsss,$wheres);\n\t\t\n\t\t$tbls = \"ver_checks\";\n\t\t$cols = \"*\";\n\t\t$bodyText = '<table width=\"100%\" border=\"0\" >\n\t\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"center\" colspan=\"6\" >SALES TAX INVOICE<br />\n\t\t\t\t\t'.OFFICE_ADDRESS.'\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr><td align=\"center\" colspan=\"6\" >&nbsp;</td></tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"left\" colspan=\"2\" >Party Details :<br />\n\t\t\t\t\t'.$comName.'<br />\n\t\t\t\t\t'.$comPName.'<br />\n\t\t\t\t\t'.$comPAddress.'<br />\n\t\t\t\t\tTele: '.$comPPhone.'<br />\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align=\"left\" colspan=\"2\" >\n\t\t\t\t\tInvoice No. :<br />\n\t\t\t\t\tDated :<br />\n\t\t\t\t\tPayment Due Dat :<br />\n\t\t\t\t\tOur Ref. :<br />\n\t\t\t\t\tYour Ref.<br />\n\t\t\t\t\t NTN #:<br />\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align=\"left\" colspan=\"2\" >\n\t\t\t\t\t '.$invoice_number.'<br />\n\t\t\t\t\t '.$invoice_date.'<br />\n\t\t\t\t\t '.$due_date.'<br />\n\t\t\t\t\t'.$our_ref.'<br />\n\t\t\t\t\t NILL<br />\n\t\t\t\t\t 2913136-7 <br />\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr><td align=\"center\" colspan=\"6\" >&nbsp;</td></tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<th align=\"center\" >S.N</th>\n\t\t\t\t\t<th align=\"center\" >Description of Goods </th>\n\t\t\t\t\t<th align=\"center\" >Add. Field </th>\n\t\t\t\t\t<th align=\"center\" >Qty. Unit </th>\n\t\t\t\t\t<th align=\"center\" >Price</th>\n\t\t\t\t\t<th align=\"center\" > Amount(Rs.)</th>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr><td align=\"center\" colspan=\"6\" >&nbsp;</td></tr>';\n\t\t\t\t\t\n\t\t\t\t$InvoiceBody = $bodyText;\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t \n\t\t\t \n\t\t\t$c=0; \n\t\t\t$applicant_count=@mysql_num_rows($rst2);\n\t\t\t\n\t\t\t$total = 0;\n\t\t\t$checks_count =0;\n\t\t\t$applicantss = array();\n\t\twhile($rs = @mysql_fetch_assoc($rst)) { \n\t\tif($upd){\n\t\t$db->updateCol(\"invoice_number,invoiced\",\"'$invoice_number',1\",'client_invoices',\"id=$rs[ci_id]\");\n\t\t//echo \"update client_invoices set invoice_number='$invoice_number' where id=$rs[ci_id]\";\n\t\t}\n\t\t$checks = $db->select($tbls,$cols,\"v_id=$rs[v_id] AND as_isdlt=0\");\n\t\t\n\t\t\n\n\t\t\tif($upd){\n\t\t\t$db->updateCol(\"m_invoiced,m_invoice_number,m_invoiced_date\",\"1,'$invoice_number',CURRENT_TIMESTAMP\",'ver_checks',\"as_id=$rs[as_id]\");\n\t\t\t}\n\t\t\t$c++;\n\t\t\t$checks_count++;\n\t\t\t$bodyText .= '\n\t\t\t<tr>\n\t\t\t<td align=\"center\" >'.$c.'\t</td>\t\t\n\t\t\t<td align=\"left\" >'.getCheckTitle($rs['checks_id']).' as_id: '.$rs['as_id'].'</td>\n\t\t\t<td align=\"center\" >--\t</td>\n\t\t\t<td align=\"center\" >--\t</td>\n\t\t\t<td align=\"center\" >--\t</td>\n\t\t\t<td align=\"center\" >'.$rs['as_cost2'].'</td>\n\t\t\t</tr>';\n\t\t\t\n\t\t\t$total = $total+(int)$rs['as_cost2'];\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif($upd){\n\t\t// update invoice\n\t\t$db->updateCol(\"applicant_count,checks_count\",\"'$applicant_count','$checks_count'\",'monthly_invoice',\"id=$invoice_id\");\n\t\t}\n\t\t\n\t\t\n\t\t$InvoiceBody .= ' \n\t\t\n\t\t<tr>\n\t\t<td align=\"center\" >1.</td>\n\t\t<td align=\"left\" >Total Checks '.$c.' in this month (<a href=\"'.SITE_URL.'?action=calcinv&atype=view&cid='.$com_id.'\" >View details</a>) </td>\n\t\t<td align=\"center\" >--</td>\n\t\t<td align=\"center\" >--</td>\n\t\t<td align=\"center\" >--</td>\n\t\t<td align=\"center\" >'.$total.'</td>\n\t\t</tr>\n\t\t\t\n\t\t<tr>\n\t\t<td align=\"center\" >2.</td>\n\t\t<td align=\"left\" >Sales Tax ('.$companyTax.'%)</td>\n\t\t<td align=\"center\" >--</td>\n\t\t<td align=\"center\" >--</td>\n\t\t<td align=\"center\" >--</td>\n\t\t<td align=\"center\" >'.$taxAmount.'</td>\n\t\t</tr>\n\t\t<tr><td align=\"center\" colspan=\"6\" style=\"border-bottom:1px solid #999;\">&nbsp;</td></tr>\n\t\t<tr>\n\t\t<td align=\"center\" ></td>\n\t\t<td align=\"center\" ></td>\n\t\t<td align=\"center\" ></td>\n\t\t<td align=\"center\" ></td>\n\t\t<td align=\"center\" >Grand Total:</td>\n\t\t<td align=\"center\" >'.$grand_total.'</td>\n\t\t</tr>\n\t\t<tr><td align=\"center\" colspan=\"6\" style=\"border-bottom:1px solid #999;\">&nbsp;</td></tr>\n\t\t\n\t\t\n\t\t\n\t\t<tr>\n\t\t<td align=\"center\" colspan=\"2\" ></td>\n\t\t<td align=\"center\" colspan=\"2\" >DECLARATION<br />\n\t\t'.DECLARATION.'</td>\n\t\t <td align=\"center\" colspan=\"2\" ></td></tr>\n\t\t<tr><td align=\"center\" colspan=\"6\" style=\"border-bottom:1px solid #999;\">&nbsp;</td></tr>\n\t\t</table>';\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t$bodyText .= '\n\t\t\t\n\t\t<tr>\n\t\t<td align=\"center\" >'.($c+1).'</td>\n\t\t<td align=\"left\" >Sales Tax ('.$companyTax.'%) </td>\n\t\t<td align=\"center\" >--</td>\n\t\t<td align=\"center\" >--</td>\n\t\t<td align=\"center\" >--</td>\n\t\t<td align=\"center\" >'.$taxAmount.'</td>\n\t\t</tr>\n\t\t\n\t\t<tr>\n\t\t<td align=\"center\" >Total Checks:</td>\n\t\t<td align=\"center\" >'.$checks_count.'</td>\n\t\t<td align=\"center\" >Total Applicants:</td>\n\t\t<td align=\"center\" >'.$applicant_count.'</td>\n\t\t<td align=\"center\" >Grand Total:</td>\n\t\t<td align=\"center\" >'.$grand_total.'</td>\n\t\t</tr>\n\t\t\n\t\t<tr><td align=\"center\" colspan=\"6\" style=\"border-bottom:1px solid #999;\">&nbsp;</td></tr>\n\t\t<tr><td align=\"center\" colspan=\"6\" >DECLARATION\n\t\tPayment Instructions: Name of Beneficiary:- Background Check (Pvt.) Ltd.\n\t\tBeneficiary Account No.08517900292703: (PKR) IBAN #: PKHABB0008577900292703\n\t\tName and Address of the Beneficiary Bank: Habib Bank Limited, PNSC Karachi. Pakistan\n\t\tSwift Code: HABBPKKA </td></tr>\n\t\t<tr><td align=\"center\" colspan=\"6\" style=\"border-bottom:1px solid #999;\">&nbsp;</td></tr>\n\t\t\n\t\t</table>';\n\t\t\n\t\t\n\t\techo $bodyText;\n\t\t\n\t\tif((!isset($_REQUEST['cid'])) && $invoice_number!=\"\" ){\n\t\t\t\n\t\t$db->updateCol(\"credits\",\"'$monthly_credits_allowed'\",'company',\"id=$com_id\");\t\n\t\t\n\t\t$db->updateCol(\"sent,sent_date\",\"1,CURRENT_TIMESTAMP\",'monthly_invoice',\"invoice_number='$invoice_number'\");\t\n\t\t\n\t\t\n\t\t$emailSubject = \"New Invoice submitted from \".PORTAL;\n\t\t\n\t\t\n\t\t\t\t\t\t\t$clUsers = getClUser($com_id);\n\n\t\t\t\t\t\t\tif($clUsers){\n\n\t\t\t\t\t\t\t\twhile($clUser = mysql_fetch_assoc($clUsers)){\n\t\t\t\t\t\t\t\t\t$fullName = $clUser['first_name'].' '.$clUser['last_name'];\n\t\t\t\t\t\t\t\t\t//$toEamil = $clUser['email'];\n\t\t\t\t\t\t\t\t\t$toEamil = \"[email protected]\";\n\t\t\t\t\t\t\t\t\t$cc = \"[email protected]\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\temailTmp($InvoiceBody,$emailSubject,$toEamil,'',$cc,'','',\"Valued Customer\");\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t}\n\n\t\t//echo $InvoiceBody;\t\t\t\t\n\t} // if amount found\n\n\t}", "title": "" }, { "docid": "278f05deb62de93f456113c3ae9f8634", "score": "0.44291335", "text": "public function bill_generate(Request $request){\n \n $user_id = Auth::user()->id;\n $year = date(\"y\");\n $month = date(\"m\");\n $created_at = date(\"Y-m-d\");\n $record_id = $request->client_name;\n $discount = $request->discount;\n \n $total_count = DB::table('acc_invoices')\n ->count();\n $serial = $total_count+1;\n\n $serial_code = $this->invoice_key($serial);\n\n $invoice_id = $year.$month.$serial_code;\n \n $month_ids = $request->month_ids;\n\n // get account no \n\n $get_account = AccAccount::where('type','1')->first();\n\n $cash_account = $get_account->id;\n\n $discount_acc = AccAccount::where('type','8')->first();\n\n $discount_acc_no = $discount_acc->id;\n\n $client_acc = AccAccount::where('acc_no',$record_id)->first();\n\n $client_acc_id = $client_acc->id;\n\n if(empty($cash_account))\n die(json_encode(['status' => 'error', 'message' => 'System Error. Please contact with administrator.', 'data' => []]));\n\n $invoice_data = [\n 'invoice_id' => $invoice_id,\n 'record_id' => $request->client_name,\n 'amount' => isset($request->amount) ? $request->amount : 0,\n 'discount' => isset($request->discount) ? $request->discount : 0,\n 'net_amount' => $request->total,\n 'last_payment_date' => $request->last_payment_date,\n 'remark' => $request->remark,\n 'created_at' => $created_at,\n 'created_by' => $user_id,\n 'created_by_ip' => \\Request::ip(),\n\n ];\n\n $voucher_data = [];\n $transaction_data = [];\n\n if (is_array($month_ids) || is_object($month_ids)){ \n \n foreach($month_ids as $item){\n\n // voucher data\n $voucher_data[] = [\n 'invoice_id' => $invoice_id,\n 'item_id' => $item,\n 'discount' => isset( $request->discount) ? $request->discount : 0,\n 'rate' => isset($request->fee) ? $request->fee : 0,\n 'year' => $request->year,\n 'created_at' => $created_at,\n 'created_by' => $user_id,\n 'created_by_ip' => \\Request::ip(),\n ];\n\n // transaction data\n $transaction_data[] = [\n 'invoice_id' => $invoice_id,\n 'record_id' => $request->client_name,\n 'trans_id' => NULL,\n 'amount' => isset($request->fee) ? $request->fee : 0,\n 'debit' => $item,\n 'credit' => $cash_account,\n 'created_at' => $created_at,\n 'created_by' => $user_id,\n 'created_by_ip' => \\Request::ip(),\n ];\n\n } // foreach end\n\n // if discount \n if($discount > 0){\n\n // transaction data\n $transaction_data[] = [\n 'invoice_id' => $invoice_id,\n 'record_id' => $request->client_name,\n 'trans_id' => NULL,\n 'amount' => $discount,\n 'debit' => $discount_acc_no,\n 'credit' => $client_acc_id,\n 'created_at' => $created_at,\n 'created_by' => $user_id,\n 'created_by_ip' => \\Request::ip(),\n ];\n\n }// discount end\n \n } \n\n\n // others service calculation\n $others_service_ids = $request->others_service_ids;\n $others_service_value = $request->others_service_value;\n\n if (is_array($others_service_ids) || is_object($others_service_ids)){\n\n foreach($others_service_ids as $k => $item){\n\n // voucher data\n $voucher_data[] = [\n 'invoice_id' => $invoice_id,\n 'item_id' => $item,\n 'discount' => 0,\n 'rate' => isset($others_service_value[$k]) ? $others_service_value[$k] : 0,\n 'year' => $request->year,\n 'created_at' => $created_at,\n 'created_by' => $user_id,\n 'created_by_ip' => \\Request::ip(),\n ];\n\n $transaction_data[] = [\n 'invoice_id' => $invoice_id,\n 'record_id' => $request->client_name,\n 'trans_id' => NULL,\n 'amount' => isset($others_service_value[$k]) ? $others_service_value[$k] : 0,\n 'debit' => $item,\n 'credit' => $cash_account,\n 'created_at' => $created_at,\n 'created_by' => $user_id,\n 'created_by_ip' => \\Request::ip(),\n ]; \n }\n\n }\n\n\n // balance\n $debit_amount = DB::table('acc_transactions')\n ->select(DB::raw('SUM(amount) AS total_amount'))\n ->where('record_id', '=', $request->client_name)\n ->where('is_active', '=', 1)\n ->whereNull('trans_id')\n ->first();\n\n $credit_amount = DB::table('acc_transactions')\n ->select( DB::raw('SUM(amount) AS total_amount'))\n ->where('record_id', '=', $request->client_name)\n ->where('is_active', '=', 1)\n ->whereNotNull('trans_id')\n ->first();\n\n\n $total_debit = $debit_amount->total_amount; \n $total_credit = $credit_amount->total_amount; \n\n if($total_credit > $total_debit){ // if advance balance\n\n // generate transaction ID\n $total_count = DB::table('acc_transactions')\n ->where('is_active', '=', 1)\n ->whereYear('created_at', date(\"Y\"))\n ->groupBy('trans_id')\n ->count();\n\n $serial_no = $total_count + 1;\n \n\n $serial_code = str_repeat(\"0\", (4 - strlen($serial_no))) . $serial_no;\n\n $trans_id = $year.$serial_code; \n\n $advance = ($credit_amount->total_amount - $debit_amount->total_amount );\n\n // if invoice amount less than or equal balance\n if($invoice_data['net_amount'] <= $advance){\n\n $invoice_data['is_paid'] = 1;\n $invoice_data['updated_at'] = $created_at;\n $invoice_data['updated_by'] = $invoice_data['created_by'];\n $invoice_data['updated_by_ip'] = \\Request::ip();\n\n \n }\n \n // transaction data\n $transaction_data[] = [\n 'record_id' => $invoice_data['record_id'],\n 'invoice_id' => $invoice_data['invoice_id'],\n 'trans_id' => $trans_id,\n 'amount' => $invoice_data['net_amount'],\n 'debit' => $cash_account,\n 'credit' => $client_acc_id,\n 'created_at' => $created_at,\n 'created_by' => $user_id,\n 'created_by_ip' => \\Request::ip(),\n ];\n\n }\n\n $conversation_data = new Conversation;\n \t$conversation_data->record_id = $record_id;\n \t$conversation_data->message = 'Bill generated';\n \t$conversation_data->created_at = date('Y-m-d H:i:s');\n \t$conversation_data->created_by = $user_id;\n \t$conversation_data->created_by_ip = \\Request::ip();\n \t$conversation_data->save();\n\n // echo \"<pre>\";\n // print_r($transaction_data);\n // exit;\n\n // DB transactions Start \n\n DB::beginTransaction();\n\n try {\n \n $acc_invoices_store = DB::table('acc_invoices')->insert($invoice_data);\n\n \n $acc_vouchers_store = DB::table('acc_vouchers')->insert($voucher_data); \n\n $acc_transaction_store = DB::table('acc_transactions')->insert($transaction_data); \n\n \n if($acc_invoices_store){\n echo json_encode(['status' => 'success', 'message' => 'Successfully Genarated', 'data' => []]);\n }else{\n echo json_encode(['status' => 'error', 'message' => 'Something Wrong', 'data' => []]);\n }\n \n \n DB::commit();\n // all good\n } catch (\\Exception $e) {\n DB::rollback();\n echo json_encode(['status' => 'error', 'message' => 'Database error', 'data' => []]);\n \n echo $e;\n }\n\n // DB transactions end \n\n }", "title": "" }, { "docid": "abca4e9a6e4fd0cb08a19dd86e0952d5", "score": "0.4426802", "text": "protected function getLineItems($ignoreFreeItems, $useParent=true) {\n $useParent = Mage::getStoreConfig('shipping/wsafreightcommon/use_parent');\n\n $LineItemArray=array();\n $defaultFreightClass = Mage::helper('wsafreightcommon')->getDefaultFreightClass();\n\n \t foreach ($this->_request->getAllItems() as $item) {\n \t \t \t \t\n \t \t$weight=0;\n \t\t\t$qty=0;\n \t\t\t$price=0;\n \t\t\t\n \t\t\tif (!Mage::helper('wsacommon/shipping')->getItemTotals($item, $weight,$qty,$price,$useParent,$ignoreFreeItems)) {\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t \t$product = Mage::helper('wsacommon/shipping')->getProduct($item,$useParent);\n \t\t\t\n \t\t\t$weight=ceil($weight); // round up to nearest whole - required for conway\n \t\t$class=$product->getData('freight_class');\n \t\t\t\n \t\tif (empty($class) || $class=='') {\n \t\t\t$class=$defaultFreightClass; // use default\n \t\t}\n \t\t\t\n \t\t\tif (empty($LineItemArray) || !array_key_exists($class,$LineItemArray)) {\n \t\t\t\t$LineItemArray[$class]= $weight;\n \t\t\t} else {\n \t\t\t\t\n \t\t\t\t$LineItemArray[$class]= $LineItemArray[$class]+ ($weight);\n \t\t\t}\n \t\t\t\n \t }\n \t return $LineItemArray;\n\t}", "title": "" }, { "docid": "a52fc2c2da97022bb2fcf0698f32c17f", "score": "0.4423535", "text": "public function actionInvoicePdf($did)\n {\n $order = Orders::find()->where('Delivery_ID = :did and User_Username = :name', [':did'=>$did,':name'=> Yii::$app->user->identity->username])->one();\n if(empty($order))\n {\n Yii::$app->session->setFlash('error', Yii::t('cart','Something Went Wrong!'));\n return $this->redirect(['/order/my-orders']);\n }\n $orderitem = Orderitem::find()->where('Delivery_ID = :did and OrderItem_Status != 8 and OrderItem_Status != 9', [':did'=>$did])->all();\n $address = DeliveryAddress::find()->where('delivery_id=:did',[':did'=>$did])->one();\n $nicknames = array();\n foreach ($orderitem as $k => $oid) {\n $names = OrderCartNickName::find()->where('tid = :t',[':t'=>$oid['Order_ID']])->andWhere(['=','type',2])->all();\n foreach ($names as $ke => $name) {\n $nicknames[$oid['Order_ID']][] = $name['nickname'];\n }\n }\n \n $pdf = new Pdf([\n 'mode' => Pdf::MODE_UTF8,\n 'content' => $this->renderPartial('orderhistorydetails',['order'=>$order, 'orderitem' => $orderitem ,'address'=>$address,'nicknames'=>$nicknames,'did'=>$did]),\n 'options' => [\n 'title' => 'Invoice',\n 'subject' => 'Sample Subject',\n ],\n 'methods' => [\n 'SetHeader' => ['Generated By HAMSTEREAT'],\n 'SetFooter' => ['|Page{PAGENO}|'],\n ]\n ]);\n return $pdf->render();\n }", "title": "" }, { "docid": "7c7ed4c899e464cdc45a3159ab213d42", "score": "0.442208", "text": "public function captureCc($reference_id, $transaction_id, $amount, array $invoice_amounts=null)\n {}", "title": "" }, { "docid": "0b416a91c58aac57a0add48111719af4", "score": "0.44159696", "text": "public function QuotePaymentDetailsCustomer(){\n\n $id = Request::all();\n $quoteID = $id['eventid'];\n\n $approvedQuote = Approved_Quotes::find($quoteID);\n\n $requestedServices = $approvedQuote->getRequestedServices($quoteID)->get();\n\n $serviceCount = 0;\n $services = array();\n $cost = array();\n\n foreach ($requestedServices as $key) {\n $serviceCount++;\n $services[] = $key->Service;\n $cost[] = $key->Cost;\n }\n\n return view('quote_requests/customer/quote-payment-details')->with(array('approvedQuote' => $approvedQuote, 'serviceCount' => $serviceCount, 'services' => $services, 'cost' => $cost));\n }", "title": "" }, { "docid": "0e3a9a6e9f32a5d0415d85b7461f430d", "score": "0.4414009", "text": "public function listInvoices()\n {\n\n $message = 'Success';\n $invoices = '';\n\n // List all invoices\n\n try {\n\n $invoices = \\Stripe\\Invoice::all(\n\n ['limit' => 5]\n\n );\n\n } catch (\\Stripe\\Exception\\ApiErrorException $e) {\n\n $message = $e->getError()->message;\n\n } catch (Exception $e) {\n\n $message = $e->getError()->message;\n\n } // end catch\n\n return array(\n 'message' => $message,\n 'invoices' => $invoices);\n\n }", "title": "" }, { "docid": "17ff6e1a377bd4125b772f3dbfe7b9fe", "score": "0.4413742", "text": "public static function invoice($data = []): OrderE\\OrderInvoice\n {\n /** @var OrderE\\OrderInvoice $invoice */\n [$invoice, $return] = self::create($data, OrderE\\OrderInvoice::class);\n\n if ($return) {\n return $invoice;\n }\n\n $data = array_replace([\n 'order' => null,\n 'credit' => false,\n 'currency' => self::CURRENCY_EUR,\n 'grand_total' => 0.,\n 'lines' => [],\n ], $data);\n\n if (null !== $data['order']) {\n $invoice->setOrder(self::order($data['order']));\n }\n\n $invoice\n ->setCredit($data['credit'])\n ->setCurrency($data['currency'])\n ->setGrandTotal($data['grand_total']);\n\n foreach ($data['lines'] as $datum) {\n $invoice->addLine(self::invoiceLine($datum));\n }\n\n return $invoice;\n }", "title": "" }, { "docid": "095780b42a168a5bb55067494558af22", "score": "0.44012696", "text": "protected function mapLineItems(): array\n {\n return $this->pending_order->items()->whereHas('product', fn ($query) => $query->where('channel', 'shopify'))\n ->get()\n ->map(function ($item) {\n return [\n 'id' => $item->id,\n 'product_id' => $item->variant->commerce_product_id,\n 'quantity' => $item->quantity,\n 'requires_shipping' => true,\n 'sku' => $item->variant->sku,\n 'taxable' => $item->variant->taxable,\n 'variant_id' => $item->variant->external_id,\n ];\n })\n ->values()->toArray();\n }", "title": "" }, { "docid": "21c2d3307624d79775f7ec4664dc86e4", "score": "0.4395093", "text": "function wpp_generate_PDI($item_total) {\n global $order, $cart, $cc_id, $shipping, $currencies, $order_totals;\n $order_total = array();\n $total = 0;\n $currency = $this->wpp_get_currency();\n \n //If the merchant has a different currency selected for this module\n //than they do as a default for the store, all prices will be converted\n $currency_value = $currencies->get_value($this->wpp_get_currency());\n \n if (count($order_totals) < 1) {\n $this->away_with_you(MODULE_PAYMENT_PAYPAL_DP_BUG_1629);\n }\n\n foreach ($order_totals as $ot) {\n $order_total[$ot['code']] = $ot['value'];\n }\n \n $output = '';\n\n if (is_array($order->products)) {\n foreach ($order->products as $o) {\n $qty = $o['qty'];\n $price = tep_add_tax($o['final_price'] * $currency_value, $o['tax']);\n \n if ($qty == (string)(float)$qty) {\n $price = $price * $qty;\n $qty = '1';\n }\n \n $output .= $this->wpp_add_PDI(array('name' => $this->wpp_xml_safe($o['name']),\n 'currency' => $currency,\n 'amount' => $price,\n 'model' => $this->wpp_xml_safe($o['model']),\n 'qty' => $qty));\n $total += number_format(round($price, 2) * $qty, 2, '.', '');\n }\n }\n //CCGV integration - grrrrrrrrr\n //Coupons\n if ($order_total['ot_coupon'] > 0) {\n $coupon_query = tep_db_query(\"select coupon_type, coupon_amount, coupon_code, coupon_type from \" . TABLE_COUPONS . \" where coupon_id = '\" . (int)$_SESSION['cc_id'] . \"'\");\n if (tep_db_num_rows($coupon_query) > 0) {\n $coupon = tep_db_fetch_array($coupon_query);\n \n //Coupon is percentage based.\n if ($coupon['coupon_type'] == 'P') {\n $coupon_details = '(' . round($coupon['coupon_amount'], 2) . '% off)';\n \n \t } elseif ($coupon['coupon_type'] == 'S' && $coupon['coupon_map'] == 0) {\n $coupon_details = '($-' . number_format(round($order->info['shipping_cost'] * $currency_value, 2), 2, '.', '') . ')';\n } elseif ($coupon['coupon_type'] == 'S' && $coupon['coupon_map'] == 1) {\n if (!tep_session_is_registered('map_only')) tep_session_register('map_only');\n $_SESSION['map_only'] = true;\n\n $total_weight = $cart->show_weight(true);\n\n $shipping_method = explode('_', $shipping['id']);\n \n $ship = new $shipping_method[0]();\n $totals = $ship->quote($shipping_method[1]);\n \n if (is_array($totals['methods'])) {\n $coupon_details = '($-' . number_format(round($totals['methods'][0]['cost'] * $currency_value, 2), 2, '.', '') . ')';\n }\n \n tep_session_unregister('map_only');\n \n $total_weight = $cart->show_weight(false);\n } else {\n $coupon_details = '($-' . number_format(round($coupon['coupon_amount'] * $currency_value, 2), 2, '.', '') . ')';\n }\n\n $coupon_total = number_format(round($order_total['ot_coupon'] * $currency_value, 2), 2, '.', '');\n $output .= $this->wpp_add_PDI(array('name' => 'Discount Coupon ' . $this->wpp_xml_safe($coupon_details),\n 'currency' => $currency,\n 'amount' => '-' . $coupon_total,\n 'model' => $coupon['coupon_code'],\n 'qty' => '1'));\n $total -= $coupon_total;\n }\n } elseif ($order_total['ot_coupon'] < 0) {\n //Support for Ingo's Discount Coupon contribution\n $output .= $this->wpp_add_PDI(array('name' => 'Discount Coupon ' . round($order_total['ot_coupon'] * $currency_value, 2),\n 'currency' => $currency,\n 'amount' => $order_total['ot_coupon'] * $currency_value,\n 'model' => 'Discount Coupon',\n 'qty' => '1'));\n \n $total -= round(abs($order_total['ot_coupon']) * $currency_value, 2);\n }\n \n //Gift Vouchers\n if ($order_total['ot_gv'] > 0) {\n $output .= $this->wpp_add_PDI(array('name' => 'Gift Voucher of $' . round($order_total['ot_gv'] * $currency_value, 2),\n 'currency' => $currency,\n 'amount' => $order_total['ot_gv'] * $currency_value,\n 'model' => 'Gift Voucher',\n 'qty' => '1'));\n \n $total -= round($order_total['ot_gv'] * $currency_value, 2);\n }\n //End grrrrrrrrrrr\n \n //kgt Discount Coupon Support\n if (is_object($order->coupon)) {\n $discount_total = 0;\n \n foreach ($order->coupon->applied_discount as $ad) {\n $discount_total += $ad;\n }\n \n $coupon_total = number_format(round($discount_total * $currency_value, 2), 2, '.', '');\n $output .= $this->wpp_add_PDI(array('name' => 'Discount Coupon (' . $this->wpp_xml_safe($order->coupon->coupon['coupons_id']) . ')',\n 'currency' => $currency,\n 'amount' => '-' . $coupon_total,\n 'model' => $order->coupon->coupon['coupons_id'],\n 'qty' => '1'));\n $total -= $coupon_total;\n }\n \n //OSC Programming Lesson #224: tep_round() is not reliable\n $item_total = round($item_total, 2);\n \n //If there is a discrepancy in the order total, fix it here\n //$item_total doesn't need to be converted because it's sent converted\n if ($total != $item_total) {\n $new_total = round($item_total - $total, 2);\n $output .= $this->wpp_add_PDI(array('name' => 'Order Total Discrepancy',\n 'currency' => $currency,\n 'amount' => $new_total,\n 'model' => '',\n 'qty' => '1'));\n $total += $new_total;\n }\n \n return array($total, $output);\n }", "title": "" }, { "docid": "32adb0d43462336195dbb52844e70b58", "score": "0.439416", "text": "public function ccAction()\n {\n if (!$this->invoice)\n throw new Am_Exception_InternalError('Empty invoice - internal error!');\n $this->form = $this->createForm();\n\n if ($this->getParam('http_status') && $this->getParam('hash'))\n {\n if ($this->processCc())\n return;\n }\n $this->view->form = $this->form;\n $this->view->invoice = $this->invoice;\n $this->view->display_receipt = true;\n $this->view->display('cc/info.phtml');\n }", "title": "" }, { "docid": "2ac64063d07d197ddad86e452da909f9", "score": "0.43917125", "text": "public static function getCharges($key)\n {\n $out_charges = array();\n\n // telling stripe who we are\n Stripe::setApiKey($_ENV['STRIPE_SECRET_KEY']);\n\n // getting the charges\n // https://stripe.com/docs/api/php#charges\n $returned_object = Stripe_Charge::all();\n\n // extractin json (this is not the best approach)\n $charges = json_decode(strstr($returned_object, '{'), true);\n\n // getting relevant fields\n foreach ($charges['data'] as $charge) {\n // updating array\n\n /*\n id - string\n created - timestamp\n amount - non negative integer\n currency - string, 3 letter ISO currency code\n paid - boolean\n captured - boolean\n description - string\n statement_description - string\n failure_code - string (see https://stripe.com/docs/api#errors for a list of codes)\n */\n\n $out_charges[$charge['id']] =\n array(\n 'created' => $charge['created'],\n 'amount' => $charge['amount'],\n 'currency' => $charge['currency'],\n 'paid' => $charge['paid'],\n 'captured' => $charge['captured'],\n 'description' => $charge['description'],\n 'statement_description' => $charge['statement_description'],\n 'failure_code' => $charge['failure_code']\n );\n } //foreach\n\n // returning object\n return $out_charges;\n }", "title": "" }, { "docid": "1f6970cebd7a92d85ede19e5776e9e7b", "score": "0.43862358", "text": "public function getInvoiceRows(): InvoiceRowCollection\n {\n $collection = new InvoiceRowCollection();\n foreach ($this->data->invoiceRows as $invoicerowdata) {\n $collection->addItem(new InvoiceRow($invoicerowdata));\n }\n\n return $collection;\n }", "title": "" }, { "docid": "eb5660282da5e2310f4623037e347388", "score": "0.43845037", "text": "function invoice_add( $params ) {\n\t\t$this->db->insert( 'invoices', $params );\n\t\t$invoice = $this->db->insert_id();\n\t\tif ( $this->input->post( 'status' ) == 'true' ) {\n\t\t\t$loggedinuserid = $this->session->usr_id;\n\t\t\t$this->db->insert( 'payments', array(\n\t\t\t\t'transactiontype' => 0,\n\t\t\t\t'invoice_id' => $invoice,\n\t\t\t\t'staff_id' => $loggedinuserid,\n\t\t\t\t'amount' => $this->input->post( 'total' ),\n\t\t\t\t'customer_id' => $this->input->post( 'customer' ),\n\t\t\t\t'account_id' => $this->input->post( 'account' ),\n\t\t\t\t'not' => '' . $message = sprintf( lang( 'paymentfor' ), $invoice ) . '',\n\t\t\t\t'date' => $this->input->post( 'datepayment' )\n\t\t\t) );\n\t\t}\n\t\t$items = $this->input->post( 'items' );\n\t\t$i = 0;\n\t\tforeach ( $items as $item ) {\n\t\t\t$this->db->insert( 'items', array(\n\t\t\t\t'relation_type' => 'invoice',\n\t\t\t\t'relation' => $invoice,\n\t\t\t\t'product_id' => $item[ 'product_id' ],\n\t\t\t\t'code' => $item[ 'code' ],\n\t\t\t\t'name' => $item[ 'name' ],\n\t\t\t\t'description' => $item[ 'description' ],\n\t\t\t\t'quantity' => $item[ 'quantity' ],\n\t\t\t\t'unit' => $item[ 'unit' ],\n\t\t\t\t'price' => $item[ 'price' ],\n\t\t\t\t'tax' => $item[ 'tax' ],\n\t\t\t\t'discount' => $item[ 'discount' ],\n\t\t\t\t'total' => $item[ 'quantity' ] * $item[ 'price' ] + ( ( $item[ 'tax' ] ) / 100 * $item[ 'quantity' ] * $item[ 'price' ] ) - ( ( $item[ 'discount' ] ) / 100 * $item[ 'quantity' ] * $item[ 'price' ] ),\n\t\t\t) );\n\t\t\t$i++;\n\t\t};\n\t\t//LOG\n\t\t$staffname = $this->session->staffname;\n\t\t$loggedinuserid = $this->session->usr_id;\n\t\t$this->db->insert( 'logs', array(\n\t\t\t'date' => date( 'Y-m-d H:i:s' ),\n\t\t\t'detail' => ( '<a href=\"staff/staffmember/' . $loggedinuserid . '\"> ' . $staffname . '</a> ' . lang( 'added' ) . ' <a href=\"invoices/invoice/' . $invoice . '\">' . lang( 'invoiceprefix' ) . '-' . $invoice . '</a>.' ),\n\t\t\t'staff_id' => $loggedinuserid,\n\t\t\t'customer_id' => $this->input->post( 'customer' )\n\t\t) );\n\t\t//NOTIFICATION\n\t\t$staffname = $this->session->staffname;\n\t\t$staffavatar = $this->session->staffavatar;\n\t\t$this->db->insert( 'notifications', array(\n\t\t\t'date' => date( 'Y-m-d H:i:s' ),\n\t\t\t'detail' => ( '' . $staffname . ' ' . lang( 'isaddedanewinvoice' ) . '' ),\n\t\t\t'customer_id' => $this->input->post( 'customer' ),\n\t\t\t'perres' => $staffavatar,\n\t\t\t'target' => '' . base_url( 'area/invoice/' . $invoice . '' ) . ''\n\t\t) );\n\t\t//--------------------------------------------------------------------------------------\n\t\t$status_value = $this->input->post( 'status' );\n\t\tif ( $status_value == 'true' ) {\n\t\t\t$status = 2;\n\t\t} else {\n\t\t\t$status = 3;\n\t\t}\n\t\t$this->db->insert( $this->db->dbprefix . 'sales', array(\n\t\t\t'invoice_id' => '' . $invoice . '',\n\t\t\t'status_id' => $status,\n\t\t\t'staff_id' => $loggedinuserid,\n\t\t\t'customer_id' => $this->input->post( 'customer' ),\n\t\t\t'total' => $this->input->post( 'total' ),\n\t\t\t'date' => date( 'Y-m-d H:i:s' )\n\t\t) );\n\t\t//----------------------------------------------------------------------------------------\n\t\treturn $invoice;\n\t}", "title": "" }, { "docid": "ef8c392004055376012dff663dc4635b", "score": "0.43830574", "text": "public function copy_credit_invoice($source_id, $target_id)\n {\n $this->load->model('invoices/mdl_items');\n $this->load->model('invoices/mdl_invoice_tax_rates');\n\n $invoice_items = $this->mdl_items->where('invoice_id', $source_id)->get()->result();\n\n foreach ($invoice_items as $invoice_item) {\n $db_array = array(\n 'invoice_id' => $target_id,\n 'item_tax_rate_id' => $invoice_item->item_tax_rate_id,\n 'item_product_id' => $invoice_item->item_product_id,\n 'item_task_id' => $invoice_item->item_task_id,\n 'item_name' => $invoice_item->item_name,\n 'item_description' => $invoice_item->item_description,\n 'item_quantity' => $invoice_item->item_quantity,\n 'item_price' => $invoice_item->item_price,\n 'item_discount_amount' => $invoice_item->item_discount_amount,\n 'item_order' => $invoice_item->item_order,\n 'item_is_recurring' => $invoice_item->item_is_recurring,\n 'item_product_unit' => $invoice_item->item_product_unit,\n 'item_product_unit_id' => $invoice_item->item_product_unit_id,\n );\n\n $this->mdl_items->save(null, $db_array);\n }\n\n $invoice_tax_rates = $this->mdl_invoice_tax_rates->where('invoice_id', $source_id)->get()->result();\n\n foreach ($invoice_tax_rates as $invoice_tax_rate) {\n $db_array = array(\n 'invoice_id' => $target_id,\n 'tax_rate_id' => $invoice_tax_rate->tax_rate_id,\n 'include_item_tax' => $invoice_tax_rate->include_item_tax,\n 'invoice_tax_rate_amount' => -$invoice_tax_rate->invoice_tax_rate_amount\n );\n\n $this->mdl_invoice_tax_rates->save(null, $db_array);\n }\n\n // Copy the custom fields\n $this->load->model('custom_fields/mdl_invoice_custom');\n $db_array = $this->mdl_invoice_custom->where('invoice_id', $source_id)->get()->result();\n\n $form_data = array();\n foreach ($db_array as $val) {\n $form_data[$val->invoice_custom_fieldid] = $val->invoice_custom_fieldvalue;\n }\n $this->mdl_invoice_custom->save_custom($target_id, $form_data);\n }", "title": "" }, { "docid": "5a47d3e002991668fee3b7c409e4578d", "score": "0.43829715", "text": "public function getInvoices($id)\n {\n return $this->getPaginatedObjects('transactions/invoices/accounts/' . $id, 'invoices', '\\Zuora\\Object\\Invoice', array('pageSize' => 50));\n }", "title": "" }, { "docid": "11ab07950e19d2a7c937b8ed83291a62", "score": "0.4379883", "text": "public function processCc(array $card_info, $amount, array $invoice_amounts=null)\n {}", "title": "" }, { "docid": "4e4d272645d7aaa3479605d46f7469e5", "score": "0.43795067", "text": "public function getInvoiceCreditTransaction() {\n\t\t $where = 't1.invoice_status!=3';\n\t\t\t$select = $this->remoteDb->select()\n\t\t\t\t\t ->from(array('t1' => 'invoice'))\n\t\t\t\t\t ->joinLeft(array('t2' => 'customers'),'t1.fkcustomer_id = t2.id',array('t2.id as cid',\n\t\t\t\t\t \t\t\t't2.customer_id','t2.customer_name'))\n\t\t\t\t\t ->joinLeft(array('t3' => 'invoice_product_list'),'t3.fkinvoice_id = t1.id',array('t3.id as pid',\"amount\" => \"sum(t3.unit_price * t3.quantity - t3.discount_amount)\",\"tax_amount\" => \"sum((t3.unit_price * t3.quantity - t3.discount_amount) * t3.tax_value / 100)\"))\n \t\t\t\t\t //->joinLeft(array('t4' => 'payments'),('t4.fkiei_id = t1.id'),array('t4.id as paid',\"pay_amount\" => \"sum(t4.payment_amount)\"))\n\t\t\t\t\t ->where($where)\n\t\t\t\t\t ->group('t1.id');\n\t\t\t//$sql = $select->__toString();\n\t\t\t//echo \"$sql\\n\";\t\n\t\t $sql = $this->remoteDb->fetchAll($select);\n\t\t\treturn $sql;\n\t}", "title": "" }, { "docid": "8a2e6a732abdce648322f82d63630d3d", "score": "0.43788007", "text": "public static function get_formatted_line_total( $formatted_total, $item, $order ) {\n\n\t\tif ( WC_Subscriptions_Order::is_item_subscription( $order, $item['id'] ) ) {\n\n\t\t\t$subscription_details = array(\n\t\t\t\t'subscription_interval' => self::get_subscription_interval( $order, $item['id'] ),\n\t\t\t\t'subscription_period' => self::get_subscription_period( $order, $item['id'] ),\n\t\t\t\t'subscription_length' => self::get_subscription_length( $order, $item['id'] ),\n\t\t\t\t'trial_length' => self::get_subscription_trial_length( $order, $item['id'] ),\n\t\t\t\t'trial_period' => self::get_subscription_trial_period( $order, $item['id'] )\n\t\t\t);\n\n\t\t\tif ( self::get_sign_up_fee( $order ) && self::get_subscription_trial_length( $order ) == 0 && $subscription_details['subscription_interval'] != $subscription_details['subscription_length'] )\n\t\t\t\t$subscription_details['initial_amount'] = $formatted_total;\n\t\t\telse\n\t\t\t\t$subscription_details['initial_amount'] = '';\n\n\t\t\t// Use the core WC_Order::get_formatted_line_subtotal() WC function to get the recurring total\n\t\t\tremove_filter( 'woocommerce_order_formatted_line_subtotal', __CLASS__ . '::' . __FUNCTION__, 10, 3 ); // Avoid getting into an infinite loop\n\n\t\t\tforeach ( self::get_recurring_items( $order ) as $recurring_item )\n\t\t\t\tif ( $recurring_item['id'] == $item['id'] )\n\t\t\t\t\t$subscription_details['recurring_amount'] = $order->get_formatted_line_subtotal( $recurring_item );\n\n\t\t\tadd_filter( 'woocommerce_order_formatted_line_subtotal', __CLASS__ . '::' . __FUNCTION__, 10, 3 );\n\n\t\t\t$formatted_total = WC_Subscriptions_Manager::get_subscription_price_string( $subscription_details );\n\t\t}\n\n\t\treturn $formatted_total;\n\t}", "title": "" }, { "docid": "5fbf093aa324119002830f4f2b50493d", "score": "0.43774742", "text": "public function PDFInvoices ()\n\t\t{\n\t\t\treturn new Invoices_PDFs ($this);\n\t\t}", "title": "" } ]
3c30232e3c423f88582ec2bfa5fa27ea
Create a meta value object.
[ { "docid": "80e1674429bb564c94a105f0349d5c19", "score": "0.0", "text": "public function __construct(\\Yoast\\WP\\SEO\\Context\\Meta_Tags_Context $context, \\YoastSEO_Vendor\\Symfony\\Component\\DependencyInjection\\ContainerInterface $container)\n {\n }", "title": "" } ]
[ { "docid": "02d0fc67e7977ff2e3f15a0b9667756e", "score": "0.7486632", "text": "public static function createMeta($instance, $key, $value, $type);", "title": "" }, { "docid": "da8305c83fc160e9c928b6d1ffa4e89a", "score": "0.7451541", "text": "public function createMeta($key,$value) {\n Cache::forget( $this->getMetaCachedName($key) );\n\n $is_exists = $this->usermeta()->where('meta_key','=',$key)->first();\n\n if ($is_exists) {\n $meta = $is_exists;\n } else {\n $meta = new UserMeta;\n }\n\n $meta->user_id = $this->id;\n $meta->meta_key = $key;\n $meta->meta_value = meta2db_value($value) ;\n $meta->save();\n\n }", "title": "" }, { "docid": "37ff75b228eaa100747d8a6e2fe0c3e2", "score": "0.6807464", "text": "public function meta(string $name, $value): Meta\n {\n return $this->meta[$name] = new Meta($name, wrap($value));\n }", "title": "" }, { "docid": "0aac0149b1e5d9f7bdcba5ec69630dff", "score": "0.65251094", "text": "public function set_meta( $name, $value ) {\n $this->meta[ $name ] = $value;\n return $this->meta;\n }", "title": "" }, { "docid": "8636ec469d14645baf238eb77d579f3b", "score": "0.64447474", "text": "public static function meta($meta, $value)\n {\n self::$meta[$meta]=$value;\n }", "title": "" }, { "docid": "4d713b7c8f211a48a96f5ff7a6f8dc82", "score": "0.6409241", "text": "public static function createMetaData();", "title": "" }, { "docid": "76d8617821fc764945206031d18e03dd", "score": "0.63919246", "text": "public function generate() {\n\t\t// Allow a bunch of params\n\t\t$arguments = func_get_args();\n\n\t\t// Remove $key and $name\n\t\t$type = array_shift( $arguments );\n\t\t$name = array_shift( $arguments );\n\t\t$args = array_shift( $arguments );\n\n\t\t$this->data['meta_key'] = null;\n\t\t$this->data['meta_value'] = null;\n\n\t\tif ( empty( $type ) ) {\n\t\t\treturn $this;\n\t\t}\n\n\t\tif ( empty( $name ) ) {\n\t\t\treturn $this;\n\t\t}\n\n\t\t$this->data['meta_key'] = $name;\n\n\t\tunset( $args['name'], $args['type'] );\n\n\t\t// Pass which object we are dealing with\n\t\t$this->faker->set_meta_object( $this->object_name, $this->object_id );\n\n\t\tif ( is_callable( array( $this->faker, 'meta_type_' . $type ) ) ) {\n\t\t\t$this->data['meta_value'] = call_user_func_array( array( $this->faker, 'meta_type_' . $type ), $args );\n\t\t} else {\n\t\t\t$this->data['meta_value'] = reset( $args );\n\t\t}\n\n\t\t/**\n\t\t * Allow filtering for the value for a Meta\n\t\t *\n\t\t * @since 0.4.8\n\t\t *\n\t\t * @param mixed $meta_value The Meta value that will be filtered\n\t\t * @param string $meta_key Which meta key we are currently filtering for\n\t\t * @param string $meta_type Which type of Meta we are dealing with\n\t\t * @param self $module An instance of the Meta Module\n\t\t */\n\t\t$this->data['meta_value'] = apply_filters( \"fakerpress.module.meta.value\", $this->data['meta_value'], $this->data['meta_key'], $type, $this );\n\n\t\t/**\n\t\t * Allow filtering for the Value of a specific meta value based on it's key\n\t\t *\n\t\t * @since 0.4.8\n\t\t *\n\t\t * @param mixed $meta_value The Meta value that will be filtered\n\t\t * @param string $meta_type Which type of Meta we are dealing with\n\t\t * @param self $module An instance of the Meta Module\n\t\t */\n\t\t$this->data['meta_value'] = apply_filters( \"fakerpress.module.meta.{$this->data['meta_key']}.value\", $this->data['meta_value'], $type, $this );\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "6b458bb90d785fa15ddc39cf7ee41f51", "score": "0.6341387", "text": "public static function saveMetaValue($key, $value, $object, $create = true)\n {\n if ($create)\n {\n $object_meta = new ObjectMeta;\n $object_meta->meta_key = $key;\n $object_meta->meta_value = $value;\n $object_meta->meta_object_id = $object->object_id;\n $object_meta->save();\n }\n else\n {\n $object_meta = ObjectMeta::model()->find('meta_key= :key and meta_object_id = :obj ', array(':key' => $key, ':obj' => $object->object_id));\n if ($object_meta != null)\n {\n $object_meta->meta_value = $value;\n $object_meta->save();\n }\n else\n {\n $object_meta = new ObjectMeta;\n $object_meta->meta_key = $key;\n $object_meta->meta_value = $value;\n $object_meta->meta_object_id = $object->object_id;\n $object_meta->save();\n }\n }\n }", "title": "" }, { "docid": "e1a5e5b62e99b3e4b17b6e2db1c67f4f", "score": "0.63142824", "text": "public static function createOrUpdate($key, $value)\n {\n if (Metas::byKey($key)->count()==0)\n {\n $meta = new static;\n $meta->key = $key;\n $meta->value = $value;\n $meta->save();\n } else {\n $meta = $this->byKey($key)->first();\n $meta->value = $value;\n $meta->save();\n }\n }", "title": "" }, { "docid": "b424fcc63e05e1f804978ad4323dad0b", "score": "0.61791134", "text": "public function set_meta( $key, $value ) {\n\t\tif( $this->meta === null ) {\n\t\t\t$this->meta();\n\t\t}//end if\n\n\t\t// does the meta value need to be created?\n\t\tif( ! isset( $this->meta->meta[ $key ] ) ) {\n\t\t\t// yeah. Initialize the required data\n\t\t\t$row = array(\n\t\t\t\t'billing_id' => $this->id,\n\t\t\t\t'meta_key' => $key,\n\t\t\t\t'meta_value' => $value,\n\t\t\t\t'activity_date' => time(),\n\t\t\t);\n\n\t\t\t// create meta record\n\t\t\t$this->meta->meta[ $key ] = new \\PSU\\AR\\MiscBillingCharge\\Meta( $row );\n\t\t} else {\n\t\t\t$this->meta->meta[ $key ]->meta_value = $value;\n\t\t}//end else\n\n\t\treturn $this->meta->meta[ $key ];\n\t}", "title": "" }, { "docid": "b119ec80bbdcea38d9c733ea30b50b17", "score": "0.599469", "text": "public function make($_value)\n\t{\n\t\t$new_value = (object) [];\n\t\t$field =\n\t\t[\n\t\t\t'id',\n\t\t\t'user_id',\n\t\t\t'user_idsender',\n\t\t\t'title',\n\t\t\t'content',\n\t\t\t'url',\n\t\t\t'read',\n\t\t\t'star',\n\t\t\t'status',\n\t\t\t'category',\n\t\t\t'createdate',\n\t\t\t'expiredate',\n\t\t\t'readdate',\n\t\t\t'datemodified',\n\t\t\t'desc',\n\t\t\t'meta',\n\t\t\t'telegram',\n\t\t\t'telegramdate',\n\t\t\t'sms',\n\t\t\t'smsdate',\n\t\t\t'smsdeliverdate',\n\t\t\t'email',\n\t\t\t'emaildate',\n\t\t];\n\n\t\tforeach ($field as $key => $value)\n\t\t{\n\t\t\tif(array_key_exists($value, $_value))\n\t\t\t{\n\t\t\t\t$new_value->$value = $_value[$value];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$new_value->$value = null;\n\t\t\t}\n\t\t}\n\t\treturn $new_value;\n\t}", "title": "" }, { "docid": "4b89541e67e7d171d2625fe1332737d2", "score": "0.59847677", "text": "final private static function createFromValue($value)\n {\n $name = self::getNameOf($value);\n return self::create($name);\n }", "title": "" }, { "docid": "8ae05caf581885fc44237432c1ab4642", "score": "0.5941146", "text": "private function createPropertyValueByType($value, $type) {\n\n\t\tswitch($type) {\n\n\t\t\tcase 'wikibase-entityid':\n\t\t\t\treturn new WikibaseItem($value);\n\t\t\tcase 'time':\n\t\t\t\treturn new TimeValue($value);\n\t\t\tcase 'quantity':\n\t\t\t\treturn new QuantityValue($value);\n\t\t\tcase 'globecoordinate':\n\t\t\t\treturn new GlobeCoordinateValue($value);\n\t\t\tdefault:\n\t\t\t\treturn $value;\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "5480cf0c31a6034de289e41c11f0dfbf", "score": "0.58595175", "text": "public function create($value) {\n return $this->setProperty('create', $value);\n }", "title": "" }, { "docid": "05f1e4f8522b93e1bd2221e8b94580d3", "score": "0.580892", "text": "protected function setMetaAttribute($name, $value)\n {\n // Assert that the meta table exists,\n // and create it if it does not\n $this->assertMetaTable(true);\n\n $db = Yii::$app->db;\n $tbl = $this->metaTableName();\n\n $pk = $this->getPkName();\n\n // Check if we need to create a new record or update an existing record\n $currentVal = $this->getMetaAttribute($name);\n if (is_null($currentVal)) {\n if (is_null($value))\n return null;\n\n $serializedValue = is_scalar($value) ? $value : serialize($value);\n\n $ret = $db\n ->createCommand()\n ->insert($tbl, [\n self::tableName() . '_id' => $this->{$pk},\n 'meta_key' => $name,\n 'meta_value' => $serializedValue,\n 'meta_type' => gettype($value),\n ])\n ->execute();\n\n $row = Yii::$app->db->createCommand('SELECT id FROM ' . $tbl . ' WHERE ' . self::tableName() . '_id' . '=:id AND meta_key=:meta_key')\n ->bindValue(':id', $this->$pk)\n ->bindValue(':meta_key', $name)\n ->queryOne();\n\n $this->addHistory([\n 'table_name' => self::tableName(),\n 'row_id' => $this->{$pk},\n 'meta_id' => $row['id'],\n 'event' => 1,\n 'field_name' => $name,\n 'old_value' => null,\n 'new_value' => $serializedValue,\n ]);\n\n } else {\n if (!is_null($value)) {\n\n $serializedValue = is_scalar($value) ? $value : serialize($value);\n\n $ret = $db\n ->createCommand()\n ->update($tbl, [\n 'meta_value' => $serializedValue,\n 'meta_type' => gettype($value),\n ], self::tableName() . \"_id = '{$this->$pk}' AND meta_key = '{$name}'\")\n ->execute();\n\n if ($currentVal != $value) {\n $row = Yii::$app->db->createCommand('SELECT id FROM ' . $tbl . ' WHERE ' . self::tableName() . '_id' . '=:id AND meta_key=:meta_key')\n ->bindValue(':id', $this->$pk)\n ->bindValue(':meta_key', $name)\n ->queryOne();\n\n $this->addHistory([\n 'table_name' => self::tableName(),\n 'row_id' => $this->$pk,\n 'meta_id' => $row['id'],\n 'event' => 2,\n 'field_name' => $name,\n 'old_value' => $currentVal,\n 'new_value' => $serializedValue,\n ]);\n }\n\n } else {\n\n $ret = $db\n ->createCommand()\n ->delete($tbl, self::tableName() . \"_id = '{$this->$pk}' AND meta_key = '{$name}'\")\n ->execute();\n }\n }\n\n return $ret;\n }", "title": "" }, { "docid": "e9d5a585f43c72384a4adede45577ff6", "score": "0.5783639", "text": "function addMeta( $type = 'meta', $name = '', $value = '' )\n {\n if ( !isset( $this->metas[$type] ) ) {\n $this->metas[$type] = array();\n }\n if ( isset($name) ) {\n $this->metas[$type][$name] = $value;\n } else {\n $this->metas[$type][] = $value;\n }\n return $value;\n }", "title": "" }, { "docid": "09baec27b447abb4d850f98623d8c1be", "score": "0.57695645", "text": "public function create(callable $callback)\n {\n return $this->objectManager->create(Value::class, ['callback' => $callback]);\n }", "title": "" }, { "docid": "83add82011b6d57d913e72c6a0d0fc9f", "score": "0.5691045", "text": "public function meta();", "title": "" }, { "docid": "3414288246f3035f1d3c16860f623377", "score": "0.5620142", "text": "function createMetaData()\n\t{\n\t\tinclude_once 'Services/MetaData/classes/class.ilMDCreator.php';\n\n\t\tglobal $ilUser;\n\n\t\t$md_creator = new ilMDCreator($this->getLMId(), $this->getId(), $this->getType());\n\t\t$md_creator->setTitle($this->getTitle());\n\t\t$md_creator->setTitleLanguage($ilUser->getPref('language'));\n\t\t$md_creator->setDescription($this->getDescription());\n\t\t$md_creator->setDescriptionLanguage($ilUser->getPref('language'));\n\t\t$md_creator->setKeywordLanguage($ilUser->getPref('language'));\n\t\t$md_creator->setLanguage($ilUser->getPref('language'));\n\t\t$md_creator->create();\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "40e60f8be9c699e13bfd608a9679d0ae", "score": "0.55569303", "text": "public function setMeta(string $key, string $value): self {\n\t\t$this->meta[$key] = $value;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "f68d37c0b72de75acd197c3264330bba", "score": "0.5506997", "text": "public function createMeta( $meta ) {\n\t\t$class = self::$moduleClasses['meta'][strtolower($meta)];\n\n\t\tif ( class_exists( $class ) && Core::doesImplement( $class, self::$moduleInterface ) ) {\n\t\t\treturn new $class( $this->api );\n\t\t} else {\n\t\t\t// TODO: Better exception\n\t\t\tthrow new \\Exception( 'Invalid meta module' );\n\t\t}\n\t}", "title": "" }, { "docid": "19970845d467389ee08164e3da9d4795", "score": "0.5499883", "text": "public function addMeta($meta, $value = null, $name = 'name');", "title": "" }, { "docid": "f5e263ec661e2c24f7d11c76ea6ab52a", "score": "0.54924285", "text": "function createMetaData()\n\t{\n\t\tinclude_once 'Services/MetaData/classes/class.ilMDCreator.php';\n\n\t\tglobal $ilUser;\n\n\t\t$glo_id = ilGlossaryTerm::_lookGlossaryID($this->getTermId());\n\t\t$lang = ilGlossaryTerm::_lookLanguage($this->getTermId());\n\t\t$md_creator = new ilMDCreator($glo_id,$this->getId(),$this->getType());\n\t\t$md_creator->setTitle($this->getTitle());\n\t\t$md_creator->setTitleLanguage($lang);\n\t\t$md_creator->setDescription($this->getDescription());\n\t\t$md_creator->setDescriptionLanguage($lang);\n\t\t$md_creator->setKeywordLanguage($lang);\n\t\t$md_creator->setLanguage($lang);\n//echo \"-\".$this->getTitle().\"-\"; exit;\n\t\t$md_creator->create();\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fa87bedf62dc6a46fa1d0c67bde89ff1", "score": "0.54840505", "text": "public static function create(string $value);", "title": "" }, { "docid": "a72b5da1e1fde1548d22a1ec43cc5795", "score": "0.5391777", "text": "function SetValue( $key, $value ){\n \n $fields = array('author','date','title','content','description','status','type');\n if($this->_Compatibility=='DB'){$fields=array_merge($fields,array('meta_oldc3','meta_oldc4'));}else{\n if(substr($key,0,5)=='meta_'){ $fields[]=$key;$caseX=$key; }else{ $caseX=''; } /*Compat*/ }\n if(!in_array($key,$fields)) return false;\n switch($key){\n case 'author':\n $value=strtolower($value);\n $value=preg_replace('/[^a-z0-9]+/','',$value);\n break;\n case 'date':\n $value=strtotime($value);\n $value=date('Y-m-d H:i:s',$value);\n break;\n case 'status':\n $enum = array('active','pending','inactive');\n if(!in_array($value,$enum)) return false;\n break;\n case 'title':\n // this also sets name\n $name=strtolower($value);\n $name=preg_replace('/[^a-z0-9\\-]+/','-',$name);\n $name=mysql_real_escape_string($name);\n $this->_Values['name']=$name;\n break;\n case 'type':\n $type=strtolower($type);\n $type=preg_replace('/[^a-z]+/','',$type);\n break;\n case $caseX:\n $this->meta_content[$key]=$value;\n // nothing to set yet (see UpdateByID)\n return true;\n break;\n // compatibility\n case 'content':\n if($this->_Compatibility=='DB'){\n $key='content_1';\n }\n break;\n case 'description':\n if($this->_Compatibility=='DB'){\n $key='content_2';\n }\n break;\n case 'meta_oldc3':\n if($this->_Compatibility=='DB'){\n $key='content_3';\n }\n break;\n case 'meta_oldc4':\n if($this->_Compatibility=='DB'){\n $key='content_4';\n }\n break;\n }\n $value=mysql_real_escape_string($value);\n $this->_Values[$key]=$value;\n }", "title": "" }, { "docid": "a9d3ae323b764397ea5b49be3070644d", "score": "0.53770334", "text": "public function createValue($value)\n {\n return new BooleanValue($value);\n }", "title": "" }, { "docid": "3cb13d0e4c859908e0da4cea3b821f67", "score": "0.5370515", "text": "static function create($value) {\n\t\treturn json_encode($value);\n\t}", "title": "" }, { "docid": "8e6ce6db82d06232653ba78c935a6c8d", "score": "0.5331967", "text": "public function setMetadataValues();", "title": "" }, { "docid": "777d59468496a01eba57f91a8341f2ea", "score": "0.5280814", "text": "protected function get_meta() {\n\n\t\t//* Go fetch the meta from the database\n\t\t$meta = get_post_meta( $this->post_id, $this->meta_key, $this->is_single );\n\n\t\t//* Shift $meta off of the 0 index to get at the actual meta array\n\t\t$meta = isset( $meta[0] ) ? $meta[0] : array();\n\n\t\t//* Loop through the meta we expect to receive. If it's in $meta from the database\n\t\t//* store it into the property. Otherwise, store the default value.\n\t\tforeach ( $this->defaults as $sub_key => $default_value ) {\n\t\t\t$this->$sub_key = array_key_exists( $sub_key, $meta )\n\t\t\t\t? $meta[ $sub_key ]\n\t\t\t\t: $default_value;\n\t\t}\n\t}", "title": "" }, { "docid": "f420bf16a029aee052cf189ddfd0b13a", "score": "0.5275985", "text": "public static function createCustomField()\n {\n return [\n 'value' => 'A friend',\n 'displayText' => 'How did you hear about this company?'\n ];\n }", "title": "" }, { "docid": "8263e6125fe5de2adf8340dc488d4f49", "score": "0.5258226", "text": "public static function add_meta($transaction_id, $meta_key, $meta_value)\n { global $wpdb;\n \n return $wpdb->insert( $wpdb->base_prefix.mc_bonus::DB_META, \n \tarray( \n \t\t'bonus_id' => (int) $transaction_id, \n 'meta_key' => $meta_key, \n 'meta_value' => maybe_serialize($meta_value)\n \t)\n ); \n }", "title": "" }, { "docid": "66cea2869eaded19be70d0423f99599d", "score": "0.52566206", "text": "public function getMetaValueAttribute( $value )\n\t{\n\t\tif(($data = unserialize($value)) !== false) {\n\t\t\treturn $data;\n\t\t}\n\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "ea44104825bd9e684cd3fddb505e7cab", "score": "0.52447", "text": "public static function meta($value=null) {\n if($value!==null) {\n self::$_directoryMeta=$value;\n }\n return self::$_directoryMeta;\n }", "title": "" }, { "docid": "ef0634a6f4ac8ba0c4959efb443d8c8a", "score": "0.5235746", "text": "public static function setMetaValue($meta_value){\n if (is_array($meta_value)) {\n foreach ($meta_value as $key => $value) {\n foreach ((new static)->galeria as $galeria_key => $item) {\n $meta_value[$key][$galeria_key] = (isset($meta_value[$key][$galeria_key]) && !empty($meta_value[$key][$galeria_key])) ? $meta_value[$key][$galeria_key] : '';\n }\n }\n } else {\n \t$meta_value = array(0 => array('imagen' => '',\n\t\t\t 'edicion' => '',\n\t\t\t 'small' => '',\n\t\t\t 'large' => ''\n\t\t\t ));\n }\n return $meta_value;\n }", "title": "" }, { "docid": "202d473a803e3d25ffbe419145f018f2", "score": "0.5231833", "text": "public function setMetadata($value)\n {\n return $this->set('Metadata', $value);\n }", "title": "" }, { "docid": "8c6e499304d53c050c5c311cbbe5a71f", "score": "0.52213675", "text": "function setMeta( $meta ) {}", "title": "" }, { "docid": "6b3321bdc45948900ecf4ca883244c60", "score": "0.52162564", "text": "public static function create( $args, $meta_args = [] ) {\n\t\t$id = wp_insert_post( $args, false, false );\n\t\t$post = new self( $id );\n\n\t\tforeach( $meta_args as $key => $value) {\n\t\t\t$post->set( $key, $value );\n\t\t}\n\n\t\treturn $post;\n\t}", "title": "" }, { "docid": "4622718b64cfccf41696922a6686552a", "score": "0.5212169", "text": "private function set_values() {\n\t\tif ( is_array($this->value) ) {\n\t\n\t\t\t$this->vals = array();\n\t\t\t$this->names = array();\n\t\t\t\n\t\t\t// if its a taxonomy\n\t\t\tif ( $this->is_tax() ) {\n\t\t\t\t\n\t\t\t\tforeach ( $this->value as $term ) :\n\t\t\t\t\t// simply get term_id and name\n\t\t\t\t\t$this->vals[] = $term->term_id;\n\t\t\t\t\t$this->names[] = $term->name;\n\t\t\t\tendforeach;\n\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t// if its a meta...\n\t\t\telseif ( $this->is_meta() ) {\n\t\t\t\t\n\t\t\t\tif ( isset($this->meta_object) ) {\n\t\t\t\t\t\t\n\t\t\t\t\tforeach($this->value as $meta_value) :\n\t\t\t\t\t\n\t\t\t\t\t\t// meta_object determines what data to get\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( 'user' == $this->meta_object ) {\n\t\t\t\t\t\t\t$this->vals[] = $meta_value['ID'];\n\t\t\t\t\t\t\t$this->names[] = $meta_value['display_name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif ( 'post' == $this->meta_object ) {\n\t\t\t\t\t\t\t$this->vals[] = $meta_value['ID'];\n\t\t\t\t\t\t\t$this->names[] = $meta_value['post_title'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif ( 'term' == $this->meta_object ) {\n\t\t\t\t\t\t\t$this->vals[] = $meta_value['term_id'];\n\t\t\t\t\t\t\t$this->names[] = $meta_value['name'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tendforeach;\n\t\t\t\t\n\t\t\t\t} // if isset(meta_object)\n\t\t\t\t\n\t\t\t\telseif( 'typeahead' === $this->input_type ) {\n\t\t\t\t\t$this->vals[] = $this->names[] = $meta_value['name'];\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\t// $this->vals[] = $this->names[] = $meta_value;\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} // end if ( is_meta() )\n\t\t\t\n\t\t} // end if (is_array(this->value)\n\t\t\n\t}", "title": "" }, { "docid": "9e46125012952f9935c5918e082131e8", "score": "0.520524", "text": "protected function _createMetadata($code, $payload)\n {\n $meta = new Application_Model_Option_Value_Metadata();\n $meta->setValueId($this->getValueId());\n $meta->setCode($code);\n $meta->setPayload($payload);\n return $meta;\n }", "title": "" }, { "docid": "7d06c91007b5ef66dbb3847fc072c24d", "score": "0.51995206", "text": "function insertGoobiMetaXML($metadata_name,$metadata_value,$subfield='',$MapType='default',$xpath='//goobi:goobi'){\n\t\t$this->metadata_name = $metadata_name;\n\t\t$this->GND = '';\n\t\t\n\t\t$this->setMapType($metadata_name,$MapType);\n\t\t\n\t\tif(is_array($metadata_value)){\n\t\t\tif(!empty($subfield)){\n\t\t\t\t$this->metadata_value = $metadata_value[$subfield];\n\t\t\t}\n\t\t\tif(array_key_exists(9,$metadata_value)){\n\t\t\t\t$this->GND = $metadata_value[9];\n\t\t\t}\n\t\t}\n\t\telse { \t$this->metadata_value = $metadata_value; }\n\t\t\n\t\t#echo $this->metadata_value.\"\\n\";\n\t\t\n\t\t$this->parentNode = $this->xpath->query($xpath);\n\t\t$this->element = $this->dom->createElement('goobi:metadata');\n\t\t$this->element->setAttribute('name',$metadata_name);\n\t\t\n\t\t$this->writeMetadata();\n\t\t$this->parentNode->item(0)->appendChild($this->element);\n\t\t$this->saveGoobiMetaXML();\n\t\t$this->__construct($this->xml);\n\t\t#echo \"Set \".$this->metadata_name.\" with value: \".$this->metadata_value;\n\t\t#if(!empty($this->GND)) { echo \" \".$this->GND; }\n\t\t#echo \"\\n\";\n\t}", "title": "" }, { "docid": "4b425012b743adec390f89aeb59d36c0", "score": "0.5175359", "text": "public function testCreation()\n {\n $valueObject = new Memory\\Value('data data data ...', new TestAsset\\DummyMovableContainer());\n $this->assertInstanceOf(Memory\\Value::class, $valueObject);\n $this->assertEquals($valueObject->getRef(), 'data data data ...');\n }", "title": "" }, { "docid": "d0c7f7ca195f6146c8fbee91038b4436", "score": "0.51687086", "text": "public function set_meta() {\n\n\t\tglobal $post;\n\n\t\tif ( empty( $post ) ) { return; }\n\t\tif ( 'job' != $post->post_type ) { return; }\n\n\t\t//wp_die( '<pre>' . print_r( $post->ID ) . '</pre>' );\n\n\t\t$this->meta = get_post_custom( $post->ID );\n\n\t}", "title": "" }, { "docid": "9fa1d0ab16b352bd3b9990a7b896344c", "score": "0.5166545", "text": "private function getSingleMetaData($namespace, $name, $value) {\n\t\t\t\n\t\t\t$singlemetadata = array();\n\t\t\t$singlemetadata[\"namespace\"] = $namespace;\n\t\t\t$singlemetadata[\"name\"] = $name;\n\t\t\t$singlemetadata[\"value\"] = $value;\n\t\t\treturn $singlemetadata;\n\t\t}", "title": "" }, { "docid": "efa2c1b5e7cc150014b9ab8170241072", "score": "0.5164409", "text": "private function createThreadMeta()\n {\n return new $this->threadMetaClass();\n }", "title": "" }, { "docid": "e0708766f7609067dd66e2fb2477cac8", "score": "0.5163338", "text": "public function newMeta($property = null)\n {\n $data = $this->getConfig($this->getSiteType());\n\n if ($this->isCategory('rc')) {\n $data['new_tag_line'] = str_replace(':name', $data['name'], $data['tag_line_rc']);\n $data['new_tag_line'] = str_replace(':name', $data['name'], $data['tag_line_rc']);\n } elseif ($this->isCategory('olc')) {\n $data['new_tag_line'] = str_replace(':name', $data['name'], $data['tag_line_olc']);\n $data['new_tag_line'] = str_replace(':name', $data['name'], $data['tag_line_olc']);\n }\n\n if (is_null($property)) {\n return (object) $data;\n }\n\n if (array_key_exists($property, $data)) {\n return $data[$property];\n }\n\n return null;\n\n }", "title": "" }, { "docid": "522dc2bbf74f0cddb3cc13af0344c997", "score": "0.5148131", "text": "abstract protected function getMeta();", "title": "" }, { "docid": "1a4bc2ab1b73f9602047e6158f79ac01", "score": "0.5146545", "text": "public function __construct(string $type, $value);", "title": "" }, { "docid": "1359855f63f5a5e72b32e9fd59a8a77b", "score": "0.5134505", "text": "private function _createReferencesValue(array $args)\n\t{\n\t\t$this->_checkSecondArgument($args);\n\n\t\treturn new Value($args[1]);\n\t}", "title": "" }, { "docid": "60d37f9da963f55f3b537a6f828c277d", "score": "0.5127759", "text": "public function Create()\n\t\t{\n\t\t\tparent::Create();\n\t\t\t\n\t\t\t$this->RegisterPropertyInteger(\"SourceVariable\", 0);\n\t\t\t$this->RegisterPropertyInteger(\"MaximumValue\", 999999);\n\t\t\t\n\t\t\t$this->RegisterVariableFloat(\"Counter\", \"Counter\", \"\", 1);\n\t\t}", "title": "" }, { "docid": "aa806cf1e1aa237ae8b5e78b78312a9f", "score": "0.51253617", "text": "function __construct($value);", "title": "" }, { "docid": "3eb84e2ddfab5ca87fcfc3516ff7f6ad", "score": "0.5124289", "text": "abstract protected function get_meta_type() ;", "title": "" }, { "docid": "b084c03bb8c12b475667099bae740f6a", "score": "0.51235795", "text": "public function setMeta($string_key, $value, $effective_from = null, $effective_to = null)\n {\n $r = parent::setMetaBase(\n $string_key,\n $value,\n $effective_from,\n $effective_to,\n 'schedule.season_metadata',\n 'show_season_id'\n );\n $this->metadata[$string_key] = $value;\n $this->updateCacheObject();\n\n return $r;\n }", "title": "" }, { "docid": "663d7501ae091ccaf7cf8d8d490fa62b", "score": "0.51164424", "text": "public function meta( string $key, $value ): Profiler;", "title": "" }, { "docid": "e88cb55ae6db1284687d613f65873037", "score": "0.5115982", "text": "public function meta(string $name, string $value): Document\n {\n $this->head()->addChildren([\n \"meta-$name\" => MarkupFactory::meta($name, $value)\n ]);\n\n return $this;\n }", "title": "" }, { "docid": "d29e20a4fb472a5e6e9ebb040559cb27", "score": "0.5115831", "text": "public function addMetadata($name, $value)\n {\n if (!is_string($name)) throw new \\InvalidArgumentException(\"The metadata name property must be type string.\");\n if (!is_string($value)) throw new \\InvalidArgumentException(\"The metadata value property must be type string.\");\n $metadata = new Metadata($name, $value);\n $this->metadata[] = $metadata;\n return $this;\n }", "title": "" }, { "docid": "bf773570c4610b052e066c15b56ad53e", "score": "0.511297", "text": "function cal_set_meta($name, $value)\n{\n return driver_call('cal', 'set_meta', [$name, $value]);\n}", "title": "" }, { "docid": "a7e94117e445fc6f8f80227390f77cbf", "score": "0.51107466", "text": "public function addMetadata($name, $value);", "title": "" }, { "docid": "4f1bc3f51f9abdff737b049509685773", "score": "0.5096638", "text": "public function create(array $values = array()) {\n return (object) array(\n 'id' => '',\n 'type' => $values['type'],\n 'title' => '',\n );\n }", "title": "" }, { "docid": "6a54cbe4df3d8a4034d73dc45e617e8e", "score": "0.50906974", "text": "function createObject($data)\r\n{\r\n $rs = new TEnity2test();\r\n $rs->setFieldData($data);\r\n $rs->loadMetaData();\r\n return $rs;\r\n}", "title": "" }, { "docid": "c239f351960152ac3988fd91572ecd6a", "score": "0.50868726", "text": "public function __construct()\n {\n $this->meta = array(\n 'title' => 'Default',\n 'author' => 'Me',\n 'keywords' => 'Keywords',\n 'description' => 'Description'\n );\n }", "title": "" }, { "docid": "6df985c8c829907cfc590b2c7e342f56", "score": "0.50778544", "text": "public function creator($value)\n {\n $this->setProperty('creator', $value);\n return $this;\n }", "title": "" }, { "docid": "0e3118fa8b90b8a02a5bb5535457e7f8", "score": "0.50719863", "text": "protected function populate_value() {}", "title": "" }, { "docid": "67e9bd31a534e59800ca47cbd6d3182f", "score": "0.50693125", "text": "public function evaluate($value) {\n\t\treturn new $this->type($value);\n\t}", "title": "" }, { "docid": "a7ea3f9297ebd27d5d0cc491e5d1ab08", "score": "0.50573593", "text": "public function setMeta($name, $value) {\r\n\t\t$this->cfg->setInArray('meta', $name, $value);\r\n\t}", "title": "" }, { "docid": "196c869b98604a59cadf1a104f188aca", "score": "0.5053459", "text": "public function setMeta($meta): self\n {\n $this->meta = Json::hash($meta);\n\n return $this;\n }", "title": "" }, { "docid": "9fd9e11d1e81e64d7c0c05450f4c37c9", "score": "0.50499135", "text": "public function meta(){\n $data = array();\n $this->template->title('Meta Data')\n ->build('admin/meta', $data);\n }", "title": "" }, { "docid": "87c01fca4d44f748affeb40ae3455b04", "score": "0.50479615", "text": "public function addMetadata($name, $value)\n {\n $this->metadata[$name] = $value;\n return $this;\n }", "title": "" }, { "docid": "cbfad2999c01411c92842215efa6d35c", "score": "0.5037945", "text": "protected function create_col_extra_value_on_tb_lp_user_itemmeta(): LP_Step {\n\t\t$response = new LP_Step( __FUNCTION__, '' );\n\t\t$lp_db = LP_Database::getInstance();\n\n\t\ttry {\n\t\t\t$lp_db->add_col_table( $lp_db->tb_lp_user_itemmeta, 'extra_value', 'longtext', 'meta_value' );\n\t\t} catch ( Exception $e ) {\n\t\t\t$response->message = $this->error_step( $response->name, $e->getMessage() );\n\t\t\treturn $response;\n\t\t}\n\n\t\treturn $this->finish_step( $response, 'Step ' . __FUNCTION__ . ' finished' );\n\t}", "title": "" }, { "docid": "ff7c5ac87bc7ebc6994c069cb065b50c", "score": "0.50337136", "text": "public function metaValues($model, $default_value = null) {\n foreach ($this->contentFields($model->language) as $var => $prop) {\n $excludeDefault = (isset($prop['excludeDefault']) && $prop['excludeDefault']) ? true : false;\n if (! $excludeDefault && $default_value !== null) $prop['default'] = $default_value;\n $model->{$var} = (isset($model->meta[$var])) ? $model->meta[$var] : $prop['default'];\n }\n\n return $model;\n }", "title": "" }, { "docid": "dcf4e765497af9089d91cb379a1cc458", "score": "0.50315154", "text": "protected function get_meta_type()\n {\n }", "title": "" }, { "docid": "dcf4e765497af9089d91cb379a1cc458", "score": "0.50315154", "text": "protected function get_meta_type()\n {\n }", "title": "" }, { "docid": "dcf4e765497af9089d91cb379a1cc458", "score": "0.50315154", "text": "protected function get_meta_type()\n {\n }", "title": "" }, { "docid": "dcf4e765497af9089d91cb379a1cc458", "score": "0.50315154", "text": "protected function get_meta_type()\n {\n }", "title": "" }, { "docid": "7caefb93038d9fd6a940a1cccae57fad", "score": "0.5027537", "text": "public function create_value($value) {\n return strval($value);\n }", "title": "" }, { "docid": "44a061d8188ba10ce7faac8d48fa7c93", "score": "0.50191456", "text": "public function getMetaDetailInstance()\n {\n if ($this->metaInstance === NULL) {\n return ($this->metaInstance = new MysqlMetaDetail($this->connectionName, $this->databaseName));\n }\n\n return $this->metaInstance;\n }", "title": "" }, { "docid": "0fc39578006dce18b5cbe6de2122e4f0", "score": "0.501881", "text": "public static function create($value)\n {\n return new static((string) $value);\n }", "title": "" }, { "docid": "366f1e8f0c10d3aa275a9fb47b894cd5", "score": "0.50173175", "text": "public function addMeta(string $name, string $value, bool $uniq = true)\n\t{\n\t\t# Prepare Meta\n\t\t$meta = (new Meta)\n\t\t\t->setName($name)\n\t\t\t->setContent($value);\n\n\t\t# Add\n\t\treturn $this->addCustomMeta($name, $meta, $uniq);\n\t}", "title": "" }, { "docid": "ebd0e20debf430f2b140495365cf4488", "score": "0.5006802", "text": "public function set_meta_data( $meta_data = false ) {\n\t\tif ( !empty( $meta_data ) && is_array( $meta_data ) ) {\n\t\t\t$this->meta_data = $meta_data;\n\t\t\treturn;\n\t\t}\n\t\t\t\n\t\tif ( function_exists( 'get_bloginfo' ) ) {\n\t\t\t$this->meta_data['org']\t\t\t\t= get_bloginfo('name');\n\t\t\t$this->meta_data['org_mail']\t\t= get_bloginfo('admin_email');\n\t\t}\n\t\t\n\t\t$this->meta_data['post_id'] = $this->post_id;\n\t\t\n\t\t// Alias meta fields to make them more manageable for use\n\t\t$meta_fields = array(\n\t\t\t'monthly_duration'\t\t\t=> 'cww_df_monthly_duration',\n\t\t\t'annual_duration'\t\t\t=> 'cww_df_annual_duration',\n\t\t\t'conf_post_id'\t\t\t\t=> 'cww_df_conf_post_id',\n\t\t\t'conf_mail_post_id'\t\t\t=> 'cww_df_conf_mail_post_id',\n\t\t);\n\t\t\n\t\tforeach ( $meta_fields as $key => $field)\n\t\t\t$this->meta_data[$key] = get_post_meta($this->post_id, $field, true);\n\n\t\t// Make sure conf_post_id and conf_mail_post_id are numeric\n\t\tif ( !is_numeric( $this->meta_data['conf_post_id'] ) )\n\t\t\t$this->meta_data['conf_post_id'] = $this->post_id;\n\t\tif ( !is_numeric( $this->meta_data['conf_mail_post_id'] ) ) \n\t\t\t$this->meta_data['conf_mail_post_id'] = false;\n\t\t\t\n\t\treturn $this->meta_data;\n\t}", "title": "" }, { "docid": "571113a2444250439b87516750bfc4d1", "score": "0.5006738", "text": "public static function set( $site_id, $meta_key, $meta_value ) {\n\n\t\t$site_meta = array(\n\t\t\t'site_id' => $site_id,\n\t\t\t'meta_key' => $meta_key,\n\t\t\t'meta_Value' => $meta_value\n\t\t);\n\n\t\treturn self::create( $site_meta );\n\t}", "title": "" }, { "docid": "c387d9c932ac9926506cd038cb925ccb", "score": "0.5001151", "text": "function getMeta() {}", "title": "" }, { "docid": "0f0164c17ca2f3a604f926594abfa9ed", "score": "0.50010544", "text": "public function generateOnCreate(bool $value): self;", "title": "" }, { "docid": "8638e5c0e79e3cd586e20c8dab53cfec", "score": "0.49969482", "text": "abstract public function initFromObject($value);", "title": "" }, { "docid": "51dd9218073702a041d69fbb989abf59", "score": "0.49942008", "text": "private function setMeta()\n\t{\n\t\t$this->meta = array(\n\t\t\t'id' => 'social_curator_original_id',\n\t\t\t'type' => 'social_curator_type',\n\t\t\t'user_id' => 'social_curator_user_id',\n\t\t\t'screen_name' => 'social_curator_screen_name',\n\t\t\t'link' => 'social_curator_link',\n\t\t\t'video_url' => 'social_curator_video_url',\n\t\t\t'profile_url' => 'social_curator_profile_url'\n\t\t);\n\t}", "title": "" }, { "docid": "2f05d1265bfa09917bc555c1794b7706", "score": "0.4991994", "text": "function meta();", "title": "" }, { "docid": "72c34231f8e678b6d31e78bd7cc1b6be", "score": "0.49865904", "text": "public function __set($name, $value) {\n\t\t\t// Safety TODO: Handle more generically\n\t\t\tif ($name == 'guid')\n\t\t\t\treturn; // won't set guid\n\t\t\t\t\n\t\t\tif ($name == 'created_ts') { // can set create time\n\t\t\t\t$this->created_ts = $value;\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Otherwise this is metadata\n\t\t\t$this->__attributes_modified = true;\n\t\t\treturn $this->__attributes[$name] = $value; \n\t\t}", "title": "" }, { "docid": "1ce238a1f5f8142b8952e307868911c6", "score": "0.49826124", "text": "abstract public function Meta($metaFunction, $args);", "title": "" }, { "docid": "427d4be6c3ce4487b802454e59cdab20", "score": "0.4971111", "text": "public function getMetaDetailInstance()\n {\n if ($this->metaInstance === NULL) {\n return ($this->metaInstance = new MssqlMetaDetail($this->connectionName, $this->databaseName));\n }\n\n return $this->metaInstance;\n }", "title": "" }, { "docid": "50d8aef176e14a14fddd6fd35be9b8bf", "score": "0.49674758", "text": "public function meta(){\n $numArgs=func_num_args();\n if($numArgs==0){\n \treturn $this->meta;\n }\n\t $key=func_get_arg(0);\n if($numArgs==1) {\n if(is_array($key)){\n return $this->updateMeta($key);\n }\n if (isset($this->meta[$key])) {\n return $this->meta[$key];\n }\n return null;\n }else{\n $value=func_get_arg(1);\n return $this->updateMeta($key,$value);\n }\n }", "title": "" }, { "docid": "291666f17d003892dcbe15f06d2e76f6", "score": "0.49666256", "text": "private function getMeta() {\n $metadata = array(\n 'title' => 'Post', \n 'desc' => 'Request URL: ' . Config::get('app.api_url'), \n 'meta' => array( \n 'title' => 'Post | Seeties', \n 'description' => 'Sample meta description' \n ),\n 'sidebar' => View::make('post.sidebar')\n );\n\n return $metadata;\n }", "title": "" }, { "docid": "58deda598a5b5f0d8a628b8563768115", "score": "0.4959218", "text": "protected function get_meta_type() {}", "title": "" }, { "docid": "58deda598a5b5f0d8a628b8563768115", "score": "0.4959218", "text": "protected function get_meta_type() {}", "title": "" }, { "docid": "58deda598a5b5f0d8a628b8563768115", "score": "0.4959218", "text": "protected function get_meta_type() {}", "title": "" }, { "docid": "58deda598a5b5f0d8a628b8563768115", "score": "0.4959218", "text": "protected function get_meta_type() {}", "title": "" }, { "docid": "b4af009bc5b01cbcb62d0af6f13da9ce", "score": "0.49459833", "text": "function budgetsys_value_add($type) {\n $value_type = budgetsys_value_types($type);\n\n $value = entity_create('budgetsys_value', array('type' => $type));\n drupal_set_title(t('Create @name', array('@name' => entity_label('budgetsys_value_type', $value_type))));\n\n $output = drupal_get_form('budgetsys_value_form', $value);\n\n return $output;\n}", "title": "" }, { "docid": "b94c1531e1879086581c15790dff12e7", "score": "0.49458775", "text": "public function update_meta() {\r\n\t\t$meta_type = HT()->get_method_value( 'meta_type' );\r\n\r\n\t\t// Object id for using in meta table. Example: post_id, term_id, user_id.\r\n\t\t$object_id = HT()->get_method_value( 'object_id' );\r\n\r\n\t\t// Meta key for using in meta table.\r\n\t\t$meta_key = HT()->get_method_value( 'meta_key' );\r\n\r\n\t\tif ( ! empty( $meta_type ) && HT()->is_positive_number( $object_id ) && ! empty( $meta_key ) ) {\r\n\t\t\t$value_type = HT()->get_method_value( 'value_type' );\r\n\r\n\t\t\tif ( 'up_down' == $value_type ) {\r\n\t\t\t\t$key = $meta_type . '_' . $meta_key;\r\n\t\t\t\t$change = 1;\r\n\r\n\t\t\t\tif ( is_user_logged_in() ) {\r\n\t\t\t\t\t$values = get_user_meta( get_current_user_id(), $key, true );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$values = isset( $_SESSION[ $key ] ) ? $_SESSION[ $key ] : '';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$values = maybe_unserialize( $values );\r\n\r\n\t\t\t\tif ( ( is_array( $values ) && in_array( $object_id, $values ) ) || ( is_numeric( $values ) && $object_id == $values ) ) {\r\n\t\t\t\t\t$change = - 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$meta_value = HT()->get_method_value( 'meta_value', 'post' );\r\n\r\n\t\t\t\tif ( empty( $meta_value ) ) {\r\n\t\t\t\t\t$meta_value = get_metadata( $meta_type, $object_id, $meta_key, true );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$meta_value = absint( $meta_value );\r\n\r\n\t\t\t\t$meta_value += $change;\r\n\r\n\t\t\t\t$updated = update_metadata( $meta_type, $object_id, $meta_key, $meta_value );\r\n\r\n\t\t\t\tif ( $updated ) {\r\n\t\t\t\t\t$values = (array) $values;\r\n\r\n\t\t\t\t\tif ( 1 == $change ) {\r\n\t\t\t\t\t\tif ( ! in_array( $object_id, $values ) ) {\r\n\t\t\t\t\t\t\t$values[] = $object_id;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tunset( $values[ array_search( $object_id, $values ) ] );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ( is_user_logged_in() ) {\r\n\t\t\t\t\t\tupdate_user_meta( get_current_user_id(), $key, $values );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$_SESSION[ $key ] = maybe_serialize( $values );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$formatted = ( is_numeric( $meta_value ) ) ? number_format( $meta_value ) : $meta_value;\r\n\r\n\t\t\t\t\t$data = array(\r\n\t\t\t\t\t\t'meta_value' => $meta_value,\r\n\t\t\t\t\t\t'formatted_meta_value' => $formatted\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\twp_send_json_success( $data );\r\n\t\t\t\t}\r\n\t\t\t} elseif ( 'add_remove' == $value_type ) {\r\n\t\t\t\t$meta_value = HT()->get_method_value( 'meta_value', 'post' );\r\n\r\n\t\t\t\tif ( empty( $meta_value ) ) {\r\n\t\t\t\t\t$meta_value = get_metadata( $meta_type, $object_id, $meta_key, true );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( ! is_array( $meta_value ) ) {\r\n\t\t\t\t\t$meta_value = array();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$change_value = HT()->get_method_value( 'change_value' );\r\n\r\n\t\t\t\tif ( empty( $change_value ) ) {\r\n\t\t\t\t\t$change_value = HT()->get_method_value( 'change_id' );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( ! is_array( $change_value ) ) {\r\n\t\t\t\t\t$data = array();\r\n\r\n\t\t\t\t\tif ( in_array( $change_value, $meta_value ) ) {\r\n\t\t\t\t\t\tunset( $meta_value[ array_search( $change_value, $meta_value ) ] );\r\n\t\t\t\t\t\t$data['job_action'] = 'undo';\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$meta_value[] = $change_value;\r\n\r\n\t\t\t\t\t\t$data['job_action'] = 'do';\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$updated = update_metadata( $meta_type, $object_id, $meta_key, $meta_value );\r\n\r\n\t\t\t\t\tif ( $updated ) {\r\n\t\t\t\t\t\twp_send_json_success( $data );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tdo_action( 'hocwp_theme_update_meta_ajax', $meta_type, $object_id, $meta_key );\r\n\t\t} else {\r\n\t\t\t$this->update_meta_fallback();\r\n\t\t}\r\n\r\n\t\twp_send_json_error();\r\n\t}", "title": "" }, { "docid": "bcc77bb643334662ab8dbc55f888f5d3", "score": "0.49424508", "text": "public static function updateMeta($instance, $key, $value, $type);", "title": "" }, { "docid": "73d31b08cbd813a10ea1add248f78761", "score": "0.49416995", "text": "function addmeta($key,$val)\n{\n\t// return if accepted\n\tglobal $_HEAD_READY;\n\tglobal $_BASE_PATH;\n\tif($_HEAD_READY) return;\n\t\n\tglobal $_META;\n\t$_META[$key]=$val;\n}", "title": "" }, { "docid": "122c4ce0e657d843f7e4a71deac969b5", "score": "0.4934762", "text": "public function __construct($value);", "title": "" }, { "docid": "462b7b7b2c139d98db0b81c41ca82985", "score": "0.49278957", "text": "public function add_raw_value( $value ) {\n\t\treturn add_post_meta( $this->object_id, $this->meta_key, $value, $this->is_single );\n\t}", "title": "" }, { "docid": "c08655f6696392fc6f07818d98cecc68", "score": "0.49259505", "text": "private function getMetaTag(string $key, string $value)\n {\n return [\n 'pattern' => '<meta %s>',\n 'values' => [\n 'name' => $key,\n 'content' => $value\n ]\n ];\n }", "title": "" }, { "docid": "6c29bcd82e8cd484bff2797c37598e23", "score": "0.4924071", "text": "protected abstract function get_meta_type();", "title": "" } ]
a757e71cfa888213d0bda506ec33f215
Constructs a new source file analyzer instance.
[ { "docid": "5acb2d997afc5d3fd34ce7c407a64ee2", "score": "0.0", "text": "public function __construct( File $file ) {\n\t\t$this->file = $file;\n\n\t\t$creator = new FactoryCreator();\n\t\t$this->factory = $creator->createFactoryByFileExtension( $file->getExtension() );\n\t}", "title": "" } ]
[ { "docid": "3ad8dfd3cf10ba172b9774aa713e6be6", "score": "0.67958134", "text": "public static function make()\n {\n return new Analyzer();\n }", "title": "" }, { "docid": "580b826964be677a271dab99835ba872", "score": "0.62012327", "text": "public function __construct()\n {\n $this->sourcePath = base_path(self::SOURCE);\n parent::__construct();\n }", "title": "" }, { "docid": "1c7702709ad8427c834c2a3327c294bc", "score": "0.61951524", "text": "public function __construct(string $source)\n {\n // Import MIME Type database\n $this->mimeDatabase = require __DIR__.self::DATABASE_FILE;\n\n // Set the source file\n $this->source = $source;\n\n // If source file don't exist, make it local temporary\n file_exists($this->source) \n ? $this->setBase($this->source) \n : $this->copyToLocalTemp();\n\n if ($this->isValidFile())\n {\n // File Info\n $this->setFilename();\n $this->setExtension();\n $this->setMimetype();\n $this->setMimetypeExtension();\n $this->setFiletype();\n $this->setSize();\n $this->setDescription();\n $this->setStat();\n $this->setType();\n\n // File content;\n $this->setHeader();\n $this->setContent();\n $this->setMd5();\n $this->setSha1();\n $this->setBase64();\n \n switch ($this->type)\n {\n case 'image':\n $this->setThumbnail();\n $this->setExif();\n $this->setImageSizes();\n $this->setOrientation();\n break;\n\n case 'audio':\n $this->setId3Tags();\n break;\n }\n }\n }", "title": "" }, { "docid": "686b0bf5143f4b838b99c911c01438ce", "score": "0.60801584", "text": "public function __construct()\n {\n // setup the file source using an in-memory filesystem\n $filesystemAdaptor = new MemoryAdapter();\n $this->filesystem = new Filesystem($filesystemAdaptor);\n $this->file_source = new FlysystemSource($this->filesystem);\n\n // create a filesystem annotation compiler\n $phpParserFactory = new ParserFactory();\n $scanner = new Php\\AnnotationScanner(\n $this->file_source,\n $phpParserFactory->create(ParserFactory::PREFER_PHP7),\n new Php\\CommentVisitor()\n );\n $this->compiler = new FilesystemCompiler($scanner, new PhpCommentParser());\n\n // create an annotation repository;\n $this->annotation_repository = new FilesystemAnnotationRepository($this->file_source, $this->compiler);\n\n // create a stub time source so the time can be changed as needed\n $prophet = new Prophet();\n $this->time = $prophet->prophesize(TimeSource::class);\n }", "title": "" }, { "docid": "783fa4ac9bd76b0c2952bd5d2b83a2a8", "score": "0.59147435", "text": "public function __construct($source)\n {\n if (!file_exists($source) || !is_dir($source)) {\n throw new \\InvalidArgumentException(\n 'Invalid source location provided, a path to an existing folder was expected'\n );\n }\n\n $this->source = $source;\n }", "title": "" }, { "docid": "0731aeaac6fbeca4309c76cf11134116", "score": "0.59026474", "text": "public function create() {\n\t\treturn $this->agentTextAnalyzer;\n\t}", "title": "" }, { "docid": "a69b9e6290aff51e03d467a5acc3726b", "score": "0.5889163", "text": "public function __construct($source)\n {\n $this->source = $source;\n }", "title": "" }, { "docid": "a69b9e6290aff51e03d467a5acc3726b", "score": "0.5889163", "text": "public function __construct($source)\n {\n $this->source = $source;\n }", "title": "" }, { "docid": "a69b9e6290aff51e03d467a5acc3726b", "score": "0.5889163", "text": "public function __construct($source)\n {\n $this->source = $source;\n }", "title": "" }, { "docid": "d47c71ad111fd2c4709c32c4c3012326", "score": "0.58568263", "text": "public function __construct( &$src_info ) {\n $this->file = ast_get( $src_info, NodeKey::FILENAME );\n $this->line = ast_get( $src_info, NodeKey::LINE );\n $this->col = ast_get( $src_info, NodeKey::COL );\n }", "title": "" }, { "docid": "046a504b1604edb1f35a58d971575034", "score": "0.57637566", "text": "function __construct(\\SplFileInfo $sourcePath, $fileExtension = 'php')\n {\n $this->setSourcePath($sourcePath);\n $this->setFileExtension($fileExtension);\n }", "title": "" }, { "docid": "1bfb218fbd4ff7ff63e66e8c8eb6ce8e", "score": "0.5730196", "text": "public static function make(string $source)\n\t{\n\t\treturn new static($source);\n\t}", "title": "" }, { "docid": "961cd94eaf4bb1027493e90a8f9f09fa", "score": "0.5707464", "text": "public function fromSource($source)\n {\n $this->metadata = array();\n $this->document = $source;\n\n return $this;\n }", "title": "" }, { "docid": "4892ed3ae028208412b6feaebd0c7a93", "score": "0.57061857", "text": "public function __construct($source, $compilerTemplate, $runTemplate)\n\t{\n\t\t$this->source = $source;\n\t\t$this->compiler = new Compiler($compilerTemplate);\n\t\t$this->binary = 'checker-' . Carbon::now()->format('Y-m-d-h-i-s');\n\t\t$this->runCommand = sprintf($runTemplate, $this->binary);\n\t}", "title": "" }, { "docid": "5ab08d688bbf710783a40f6d8e209218", "score": "0.5689709", "text": "public function __construct(string $source)\n\t{\n\t\t$this->source = $source;\n\t\t$this->labels = $this->resolve();\n\t}", "title": "" }, { "docid": "70be4d6c959128979e2326b1312cde9f", "score": "0.56524897", "text": "function __construct($input_dir){\n $this->token = new Token();\n // create instance of keyWords\n $this->keyWords = new KeyWords();\n // open file\n $this->input_dir = $input_dir;\n $this->file = \"\";\n $this->i = 0;\n $this->readFromFile();\n\n //$this->newParser = new Parser();\n /*do {\n echo \"-----------------\\n\";\n $this->getNextToken();\n echo \"TOKEN STATE = \".$this->token->state;\n echo \"\\n\";\n echo \"TOKEN DATA = \".$this->token->data;\n echo \"\\n\";\n echo \"-----------------\\n\";\n } while($this->token->state != StatesEnum::S_EOF);*/\n // close file\n //$this->closeFile();\n }", "title": "" }, { "docid": "7ed622294800fe1dc4fb343c60dcfad8", "score": "0.56101596", "text": "public function __construct($filename, $source, $encoding = 'utf-8')\n {\n $this->filename = $filename;\n $this->source = $source;\n $this->encoding = $encoding;\n\n // Split source into line arrays, containing both content and ending.\n preg_match_all('((?<content>.*?)(?<ending>\\n|\\r\\n?|$))', $source, $matches, PREG_SET_ORDER);\n\n foreach ($matches as $index => $line) {\n $this->lines[$index + 1] = array(\n 'content' => $line['content'],\n 'ending' => $line['ending']\n );\n }\n }", "title": "" }, { "docid": "dc46dd58114ef03210cb4845406c8f10", "score": "0.55273074", "text": "public function __construct(string $fileName) {}", "title": "" }, { "docid": "7f031da96e0fd50407e2ed9ece1b2722", "score": "0.5525239", "text": "public function __construct()\n {\n parent::__construct();\n $this->parser = new \\Parsedown();\n $this->fs = new Filesystem(new Local(base_path()));\n $this->fs->addPlugin(new ListPaths());\n $this->fs->addPlugin(new ListFiles());\n $this->fs->addPlugin(new ForcedCopy());\n }", "title": "" }, { "docid": "573172cc358b28bdd51d1122027a015a", "score": "0.550345", "text": "public function createAnalyser() : IAnalyser;", "title": "" }, { "docid": "f46091bf282bc455ad6f23be10e95df8", "score": "0.54968446", "text": "public function __construct(\n StatementsSource $statements_source,\n Context $file_context,\n FileStorage $file_storage,\n Codebase $codebase\n ) {\n $this->statements_source = $statements_source;\n $this->file_context = $file_context;\n $this->file_storage = $file_storage;\n $this->codebase = $codebase;\n }", "title": "" }, { "docid": "0277df8dab965dea2b52a0ac0f36d4a7", "score": "0.5484128", "text": "public function __construct(string $source)\r\n {\r\n $this->initializeOperators();\r\n $this->sourceString = $source;\r\n $this->length = strlen($source);\r\n\r\n try\r\n {\r\n $this->roll();\r\n }\r\n catch (DParseException $exception)\r\n {\r\n $this->errorHandler($exception);\r\n }\r\n\r\n }", "title": "" }, { "docid": "3efd15f312da571c258cb243eb53d631", "score": "0.5474276", "text": "public static function make($source)\n {\n return (new self)->setSrc($source);\n }", "title": "" }, { "docid": "2002ec17046ef3804145689d9bcf8c76", "score": "0.5460764", "text": "public static function fromFile($file) { }", "title": "" }, { "docid": "0d27b1a301cf39dae68a2e376a0847d2", "score": "0.5460619", "text": "public function __construct() {\n parent::__construct();\n $this->fileset->addIncludePatternString('**/*.java');\n }", "title": "" }, { "docid": "eddd091d11953502bfc5731419a79571", "score": "0.5424042", "text": "public function tagFilesource()\n {\n $this->docs['filesource'][] = '';\n\n return $this;\n }", "title": "" }, { "docid": "cffe3c4ff58725d405c15c5cb383a583", "score": "0.5384831", "text": "public function __construct($file) { $this->file = $file; }", "title": "" }, { "docid": "5740b9a803dc8dcebd5b251abe43d0ff", "score": "0.5382384", "text": "public function __construct()\n {\n # $this->highlighter = new \\FSHL\\Highlighter(new \\FSHL\\Output\\Html());\n # $this->highlighter->setLexer(new \\FSHL\\Lexer\\Php());\n \n # Syntax highlighter for shell commands/scripts\n # $this->minimalHighlighter = new \\FSHL\\Highlighter(new \\FSHL\\Output\\Html());\n # $this->minimalHighlighter->setLexer(new \\FSHL\\Lexer\\Minimal());\n }", "title": "" }, { "docid": "9c451ad5236bbd1b93c2b8a3b4f4666e", "score": "0.5374923", "text": "public static function init()\n {\n self::includeSystem('MySource');\n $contents = MySource::main();\n return $contents;\n\n }", "title": "" }, { "docid": "34aabf3cf1499dd00652c66c99336127", "score": "0.5352125", "text": "public function __construct($source_code, $input) {\n $this->source_code = $source_code;\n $this->input = $input;\n }", "title": "" }, { "docid": "c0c7c63b7239ae3c11a1ac3ad8b9b076", "score": "0.533409", "text": "public function __construct($source = null)\n {\n $this->setFilesystem(app(FilesystemContract::class));\n\n if (is_null($source))\n $source = function () {\n foreach($this->filesystem->dates(true) as $date => $path) {\n yield $date => Log::make($date, $path, $this->filesystem->read($date));\n }\n };\n\n parent::__construct($source);\n }", "title": "" }, { "docid": "4d81fbaf9b1673b861c3da04987637d5", "score": "0.5323074", "text": "public function __construct()\n {\n $this->parser = new Parser();\n }", "title": "" }, { "docid": "2f4ad56e611868b60499a1fd2eb4cfc6", "score": "0.5320626", "text": "public function setSource(string $source): self\n {\n $this->source = $source;\n\n return $this;\n }", "title": "" }, { "docid": "01d1beb4fbdf67ccebba82867e52318f", "score": "0.53107536", "text": "public function __construct()\n\t{\n\t\t// TODO Build\n\t\t$this->class_name = Document::class;\n\t\t$this->parser = new Extended_For_Tests($this->class_name, null);\n\t}", "title": "" }, { "docid": "04b0fc1d8030921413c00eadac5030e7", "score": "0.5310669", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->import('Files');\n\t}", "title": "" }, { "docid": "2706ab758c7af06a89b71746a9fbc7d3", "score": "0.53051984", "text": "public function add_source_file($file) {\n $this->sourcefiles[] = $file;\n\n return $this;\n }", "title": "" }, { "docid": "02def4a137ee612a54457bd911731225", "score": "0.5271553", "text": "function source($strSourceFile)\r\n{\r\n return uri('base') . CAFFEINE_SOURCES . $strSourceFile;\r\n}", "title": "" }, { "docid": "7a4004a991b344b1532adf875dc50bb7", "score": "0.52524036", "text": "public function setSource($source)\n {\n if (is_string($source)) {\n $source = new Filesystem(\n new Local($source)\n );\n }\n\n if (!is_a($source, FilesystemInterface::class)) {\n throw new InvalidArgumentException('A valid \"source\" file system is required.');\n }\n\n $this->source = $source;\n\n return $this;\n }", "title": "" }, { "docid": "c13d3cd113b0bf20044904420421915c", "score": "0.5246214", "text": "private function parseAlways($source)\n\t{\n\t\t$tokens = Template::tokenize($source);\n\t\t$this->root = new Document($tokens, $this->fileSystem);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "6a16d65152ede7b89accc820f1190bd8", "score": "0.5232876", "text": "public function source($source)\n\t{\n\t\tif (is_string($source) && class_exists($source)) {\n\t\t\t$this->source = $source::choices();\n\t\t}\n\t\telse {\n\t\t\t$this->source = $source;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "deb70e5ed5f4c737b6a56a1627551213", "score": "0.5181663", "text": "public function source(string $path)\n {\n $this->source = $this->getSourcePath($path);\n\n return $this;\n }", "title": "" }, { "docid": "eb783038c72e5281f87cd4eb38735ad0", "score": "0.51794183", "text": "public function __construct($source, $root) {\n $this->source = $source;\n $this->root = $root;\n $this->name = self::getProjectName($source);\n $this->title = self::getProjectTitle($source);\n }", "title": "" }, { "docid": "c730f19d6c7732e5ccc2508de01ffeb5", "score": "0.5175684", "text": "public function __construct(SplFileObject $file)\n {\n $this->file = $file;\n }", "title": "" }, { "docid": "085cb3718a0ce1f999878e117cc56b80", "score": "0.516474", "text": "public function set_source_files($files) {\n $this->sourcefiles = $files;\n\n return $this;\n }", "title": "" }, { "docid": "70475c39ca9d8676ccde93b4bce85cbc", "score": "0.5121835", "text": "public function __construct($caller, $sourcePath)\n {\n $this->caller = $caller;\n $this->sourcePath = $sourcePath;\n $this->temporaryDirectory = Config::getTempFileDir();\n }", "title": "" }, { "docid": "bf6d953dc94fbec9ab682578242a854c", "score": "0.5119831", "text": "public function __construct($file)\n\t{\n\t\t$this->importFile = $file;\n\t}", "title": "" }, { "docid": "e19b9c2fb3947a4a3ba661aeca79a6d5", "score": "0.5117603", "text": "abstract public static function fromFile($filename);", "title": "" }, { "docid": "45026eb09763cde68c8ac6216a3313a1", "score": "0.511228", "text": "public function __construct( string $xmlSource = '' )\n {\n parent::__construct( $xmlSource );\n }", "title": "" }, { "docid": "0f8d5f6ec2bd3168572892868309304f", "score": "0.5111719", "text": "public function create()\n {\n return new PhpFileParseResult();\n }", "title": "" }, { "docid": "17466754c9c63a0b91c9c4a1fb963811", "score": "0.5111032", "text": "public function createSource() {\n\t\t$source = new Zend_Feed_Writer_Source ();\n\t\tif ($this->getEncoding ()) {\n\t\t\t$source->setEncoding ( $this->getEncoding () );\n\t\t}\n\t\t$source->setType ( $this->getType () );\n\t\treturn $source;\n\t}", "title": "" }, { "docid": "9e8800f202c254a6d83e6a1330d911f3", "score": "0.5092113", "text": "public function setSource(?string $source): self\n {\n $this->source = $source;\n\n return $this;\n }", "title": "" }, { "docid": "5115a0aa297333036900aaa444e0923a", "score": "0.50914323", "text": "protected abstract function newInstance(): CodeCoverage;", "title": "" }, { "docid": "74b9c69067d977817cd03a175d23e200", "score": "0.508985", "text": "public function __construct($fileCer)\n {\n $this->fileContents = file_get_contents($fileCer);\n $this->fileNameDir = $fileCer;\n }", "title": "" }, { "docid": "5c0c42894df616524f869316735f9386", "score": "0.508897", "text": "public function __construct($cfg)\r\n\t{\r\n\t\t$this->m_cfg = $cfg;\r\n\t\t$this->m_filters = array (array ($this, 'ftForceSync' ), array ($this, 'ftForceNSync' ), array ($this, 'ftLevel' ) );\r\n\t\t$this->m_after_filters = array (/*array ($this, 'aftForceSync' )*/ );\r\n\t\t\r\n\t\t$this->m_info_file = tmpDir ( $this->m_source_type . '.info' );\r\n\t\t$this->m_token_file = tmpDir ( $this->m_source_type . '.oauth' );\r\n\t\t\r\n\t\tif (! file_exists ( $this->m_token_file )) {\r\n\t\t\tthrow new TOException ( _er ( 'E_SOURCE_FILE_NOT_EXISTS', $this->m_info_file, $this->m_token_file ) );\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif (file_exists ( $this->m_info_file )) {\r\n\t\t\t//$this->m_info = Encryption::unserializeFromFile ( $this->m_info_file );\r\n\t\t\t$this->m_info = unserialize ( file_get_contents ( $this->m_info_file ) );\r\n\t\t}\r\n\t\t\r\n\t\t$this->m_token = Encryption::unserializeFromFile ( $this->m_token_file );\r\n\t}", "title": "" }, { "docid": "7341b719ab815be3130205810efb1899", "score": "0.50882334", "text": "public function __construct($file = '') {\n\t\t$this->path = $file;\n\t\t$this->plainText = file::read($file);\n\t\t$this->setup();\n\t}", "title": "" }, { "docid": "e7e5126814253b4b28ec7eb502e24935", "score": "0.5076467", "text": "function __construct() {\n \n $this->absPath=CFG::$absPath. '/templates/front/css/';\n Load::loadFile(CFG::$absPath . \"/\" . CFG::$libraries . \"/scss/scss.php\"); \n $this->scss=new scssc();\n $this->source=\"scss\";\n }", "title": "" }, { "docid": "c74eb695eb4620d141e871e6aca231c6", "score": "0.50687146", "text": "public function __construct()\r\n {\r\n $this->initializeFiles();\r\n }", "title": "" }, { "docid": "525398324ab6fc28e9723544dd3f625a", "score": "0.5060479", "text": "public function __construct($file)\n {\n $this->file = $file;\n }", "title": "" }, { "docid": "525398324ab6fc28e9723544dd3f625a", "score": "0.5060479", "text": "public function __construct($file)\n {\n $this->file = $file;\n }", "title": "" }, { "docid": "1ba7c916ec69dde455b4c3dacbf7a601", "score": "0.5059753", "text": "public function parse($source)\n {\n //fx::log($source);\n $tokenizer = new Tokenizer();\n $tokens = $tokenizer->parse($source);\n unset($tokenizer);\n $tree = $this->makeTree($tokens);\n return $tree;\n }", "title": "" }, { "docid": "24ed15573be1f4f66d8d4ce0ad0c5eb9", "score": "0.5050529", "text": "public function __construct($file)\n\t{\n\t\t$this->file = $file;\n\t}", "title": "" }, { "docid": "24ed15573be1f4f66d8d4ce0ad0c5eb9", "score": "0.5050529", "text": "public function __construct($file)\n\t{\n\t\t$this->file = $file;\n\t}", "title": "" }, { "docid": "5c0c477f03dc700fce3bf35107afaeb4", "score": "0.5048101", "text": "public function open($source) {\n\t\tif($this->_streamWrapper->exists($source)) {\n\t\t\t/**\n\t\t\t * @var $xml SimpleXMLElement\n\t\t\t */\n\t\t\t$xml = simplexml_load_string($this->_streamWrapper->getContents($source),null,LIBXML_NOERROR);\n\t\t\tif($xml !== false) {\n\t\t\t\t$this->_width = (int)$xml->Size[\"Width\"];\n\t\t $this->_height = (int)$xml->Size[\"Height\"];\n\t\t $this->_tileSize = (int)$xml[\"TileSize\"];\n\t\t $this->_tileOverlap = (int)$xml[\"Overlap\"];\n\t\t $this->_tileFormat = (string)$xml[\"Format\"];\n\t\t\t} else throw new Exception('Invalid Xml');\n\t\t} else throw new \\InvalidArgumentException('File not found : '.$source);\n\t\t\n\t return $this;\n\t}", "title": "" }, { "docid": "db269381dc7904354c3e0ce2e76c76b2", "score": "0.5041051", "text": "public static function source(string $url)\n {\n $class = get_called_class();\n return new $class($url);\n }", "title": "" }, { "docid": "14e4f72255e2745905eef411f1f55fda", "score": "0.50295156", "text": "protected function createSource() {\n return new Library\\Source\\Url(\n $this->_url, $this->_timeout\n );\n }", "title": "" }, { "docid": "277331c2e1beee0e073cb511c16d7bcb", "score": "0.5023447", "text": "public function scan()\n {\n $files = Finder::create()->files()\n ->in(config(\"library.scan.folder\"))\n ->name(config(\"library.scan.filename\"))\n ->contains(null);\n\n $items = [];\n\n foreach ($files as $file) {\n $item = new SplFileInfo($file);\n $data = $this->generate($item);\n\n $items[$data['type'].':'.$data['name']] = $data;\n }\n\n $this->add($items)->save();\n\n return $this;\n }", "title": "" }, { "docid": "93c83bcc02924d1d13229e9b584c4ec9", "score": "0.501339", "text": "function source_file_parser($sourcefile, &$tagdictionary)\r\n\t{\r\n\t\t$this->source_file = $sourcefile;\r\n\t\t$this->tag_dictionary = &$tagdictionary;\r\n\t\t$this->rawtext = $this->read_template_file($sourcefile);\r\n\t\t$this->parser = &new xml_pull($this->rawtext);\r\n\t\t$this->cur_byte_index = 0;\r\n\t\t$this->text = '';\r\n\t\t$this->get_tags();\r\n\t\t$this->initialize_variable_reference_pattern();\r\n\t}", "title": "" }, { "docid": "11538b40e452336d06af19e59442c815", "score": "0.5002521", "text": "function __construct() {\n\t\t\n\t\t\n\t\t\tif( !file_exists(DATA_DIR.\"/idx33.txt\") ){\n\t\t\t\n\t\t\t\texit(\"[PrimeZeroTools][\".__LINE__.\"] idx33.txt - pinyin-hanzi index not found\");\n\t\t\t\t\t\t\t\n\t\t\t} elseif( !file_exists(DATA_DIR.\"/idx55.txt\") ){\n\t\t\t\n\t\t\t\texit(\"[PrimeZeroTools][\".__LINE__.\"] idx55.txt - pinyintype index not found\");\n\t\t\t\t\t\t\t\n\t\t\t} elseif( !file_exists(DATA_DIR.\"/idx88.txt\") ){\n\t\t\t\t\n\t\t\t\texit(\"[PrimeZeroTools][\".__LINE__.\"] idx88.txt - traditional index not found\");\n\t\t\t\t\n\t\t\t} elseif( !file_exists(DATA_DIR.\"/idx99.txt\") ){\t\t\t\t\n\t\t\t\t\n\t\t\t\texit(\"[PrimeZeroTools][\".__LINE__.\"] idx99.txt - simplified index not found\");\n\t\t\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "89ad879971f0d2b68ed07590e5bf85ca", "score": "0.50006205", "text": "public function __construct()\n {\n $this->analysers = array();\n }", "title": "" }, { "docid": "913466bbb33a1766fbe01e9377448606", "score": "0.4999498", "text": "public function fromFile($filename);", "title": "" }, { "docid": "32eb3ebd2dc614b20e240eb7410f4586", "score": "0.49908704", "text": "public function setSource($source)\n {\n $this->source = $source;\n \n return $this;\n }", "title": "" }, { "docid": "8cb7b671961c4a3d3a573bd1ec448e9b", "score": "0.4990667", "text": "public function __construct(File $file) {\n $this->file = $file;\n }", "title": "" }, { "docid": "b80e1db515d4d52ce507337691a25c98", "score": "0.49873158", "text": "function __construct($inputFile) {\n $this->inputFile = $inputFile;\n $this->data = array();\n $this->value = 0;\n }", "title": "" }, { "docid": "29e34028f383826c60d3f36b3a169328", "score": "0.49849343", "text": "public function __construct(\\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {\n parent::__construct('Plugin/media/Source', $namespaces, $module_handler, MediaSourceInterface::class, MediaSource::class);\n\n $this->alterInfo('media_source_info');\n $this->setCacheBackend($cache_backend, 'media_source_plugins');\n }", "title": "" }, { "docid": "24b7f08eb858b37d3faf3ff98609079b", "score": "0.49764156", "text": "public function setSource($source) {\n $this->source = $source;\n return $this;\n }", "title": "" }, { "docid": "10acc88dc68d895f3ed4aaa8bb8d3b49", "score": "0.4969522", "text": "public function import($source);", "title": "" }, { "docid": "e231b089be9fa44d4d3764ce8ce88e94", "score": "0.49640188", "text": "protected function _construct()\n {\n $this->setFiles([\n $this->getComposerTemplate() => $this->getComposerFile(),\n $this->getReadMeTemplate() => $this->getReadMeFile(),\n $this->getRegistrationTemplate() => $this->getRegistrationFile(),\n $this->getModuleTemplate() => $this->getModuleDefinitionFile(),\n $this->getModuleTestTemplate() => $this->getModuleTestFile()\n ]);\n\n $this->setDirectories([\n $this->getSrcDirectory(),\n $this->getConfigDirectory(),\n $this->getTestDirectory()\n ]);\n\n $this->addDirectories($this->getAdditionalDirectories());\n $this->addFiles($this->getAdditionalFiles());\n\n return $this;\n }", "title": "" }, { "docid": "d5642a9690c318d86649e0e31b65bf57", "score": "0.49593621", "text": "public function __construct ($file) {\n\t\t$this->file = $file;\n\t\t$this->load();\n\t\t$this->variables = array();\n\t}", "title": "" }, { "docid": "4f9fcf0369d229bf53f138939ebae409", "score": "0.49589354", "text": "protected function _initFileObjects()\n {\n\n return $this;\n }", "title": "" }, { "docid": "2d4ec6bfd9d114d90740be6c0e27c4df", "score": "0.49579403", "text": "function __construct(){\n\t\tif(file_exists($this->arquivo)){\n\t\t\t//Abre o arquivo somente para leitura\n\t\t\t$this->ponteiro\t= fopen($this->arquivo, \"r\");\n\t\t}else {\n\t\t\t// Caso não exista é lançada uma exceção\n\t\t\tthrow new Exception(\"O arquivo não existe!\", 0025);\n\t\t}\n\n\n\n\t}", "title": "" }, { "docid": "7f6577bad46a58762a7551a1cf99f736", "score": "0.4953088", "text": "function __construct($file)\r\n\t{\r\n\t\t$this->valstor= new CCMSListIdValnrMatch(\"!_!\");\r\n\t\tparent::__construct($file);\r\n\t}", "title": "" }, { "docid": "dd42aac876d760e48f56bf92b38a4eef", "score": "0.49511296", "text": "public function setSource($source)\n {\n $this->container[\"source\"] = $source;\n return $this;\n }", "title": "" }, { "docid": "dd42aac876d760e48f56bf92b38a4eef", "score": "0.49511296", "text": "public function setSource($source)\n {\n $this->container[\"source\"] = $source;\n return $this;\n }", "title": "" }, { "docid": "9dc2d72bc931f302329cb087d8e4022c", "score": "0.49486083", "text": "public function __construct(File $file)\n {\n $this->file = $file;\n }", "title": "" }, { "docid": "9dc2d72bc931f302329cb087d8e4022c", "score": "0.49486083", "text": "public function __construct(File $file)\n {\n $this->file = $file;\n }", "title": "" }, { "docid": "4a02b801669362b961bc1c72aa73b1cb", "score": "0.49481204", "text": "public function parse($source);", "title": "" }, { "docid": "92940a53443ad1492bfef50243d067a8", "score": "0.49463814", "text": "public function __construct() {\n\t\t$sysconf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['mnogosearch']);\n\t\t$this->indexerPath = $sysconf['mnoGoSearchPath'] . '/sbin/indexer';\n\t}", "title": "" }, { "docid": "a02670299a886398ae4ffda6a720729c", "score": "0.494107", "text": "public function __construct($outputDir, $sourcePaths = null, $metadata = null){\t\tif ($sourcePaths && is_array($sourcePaths)){\n\t\t\t$this->_sourcePaths = $sourcePaths;\n\t\t}\n\n\t\t// metadata available ?\n\t\tif ($metadata && is_array($metadata)){\n\t\t\t$this->_metadata = $metadata;\n\t\t}\n\n\t\t// location of generated pot file\n\t\t$this->_outputDir = $outputDir;\n\n\t\t// create new string extractor instance\n\t\t$this->_stringExtractor = new StringExtractor($this->_extractorRules);\n\t}", "title": "" }, { "docid": "62d6fb347f40215d9db102ef958cf979", "score": "0.49369353", "text": "public function __construct(FileFinder $configFileFinder)\n {\n $this->configFileFinder = $configFileFinder;\n\n $this->config = $this->parseConfig();\n }", "title": "" }, { "docid": "cbef4e96487cb3a5f2b49133dd2579a6", "score": "0.49227184", "text": "public function __construct(private mixed $file)\n {\n }", "title": "" }, { "docid": "87a1b9408ce280775e8cebbe193cf393", "score": "0.49078342", "text": "public function __construct(FileManager $FileManager, $useUtf8 = false) {\n\t\t$this->_FileManager = $FileManager;\n\t\t$this->useUtf8 = $useUtf8;\n\t\t$this->_Log = $this->_FileManager->Log;\n\t}", "title": "" }, { "docid": "767b4a1359df76c39a00e52e29112216", "score": "0.49058902", "text": "public function __construct($path)\n {\n $this->file = new SplFileObject($path, 'a');\n }", "title": "" }, { "docid": "a51a8803b205f570c11662609825241b", "score": "0.49050876", "text": "public function __construct($source, $options, $warnings)\n {\n $referenceClassName = 'PHP_CompatInfo_Reference_' . $options['reference'];\n\n if (!class_exists($referenceClassName, true)) {\n throw new PHP_CompatInfo_Exception(\n 'Reference type \"' . $options['reference'] . '\" not found.'\n );\n }\n\n $extensions = $options['filterReference'];\n\n if (isset($options['filterVersion'])) {\n self::$filterVersion = $options['filterVersion'];\n }\n $version = self::$filterVersion;\n\n if (isset($options['filterOperator'])) {\n self::$filterOperator = $options['filterOperator'];\n }\n $condition = self::$filterOperator;\n\n if (substr($version, 0, 4) == 'php_') {\n // filter references on PHP version\n $version = substr($version, 4);\n $extension = null;\n } else {\n // filter references on EXT version\n $extension = true;\n }\n\n $reference = new $referenceClassName($extensions);\n $report = $reference->getAll($extension, $version, $condition);\n\n if (isset($options['reportFile'])) {\n ob_start();\n }\n\n $length = strcasecmp($source, 'classes') == 0 ? -2 : -1;\n $this->typeReport = array(\n 'short' => substr($source, 0, $length), 'long' => $source\n );\n $this->generate($report, false, $options['verbose']);\n\n if (is_array($warnings)) {\n $warnings = array_merge($warnings, $reference->getWarnings());\n } else {\n $warnings = $reference->getWarnings();\n }\n\n if (count($warnings) > 0 && $options['verbose'] > 0) {\n echo 'Warning messages : (' . count($warnings) . ')' . PHP_EOL;\n echo PHP_EOL;\n foreach ($warnings as $warning) {\n echo ' ' . $warning . PHP_EOL;\n }\n }\n\n if (isset($options['reportFile'])) {\n $generatedReport = ob_get_clean();\n\n file_put_contents(\n $options['reportFile'], $generatedReport,\n $options['reportFileFlags']\n );\n }\n }", "title": "" }, { "docid": "62d360008e37f3511a9d54da88fdac5c", "score": "0.4904778", "text": "public function __construct($file)\n {\n $this->setFile($file);\n $this->getFile();\n }", "title": "" }, { "docid": "f1979600e6ccbbb347ad807832dbfe9e", "score": "0.4903686", "text": "public function __construct( File $file ) {\r\n\t\tparent::__construct();\r\n\t\t$this->file = $file;\r\n\t\t$this->file->open();\r\n\t}", "title": "" }, { "docid": "1cc918028cbe79b3b1a316feda254aeb", "score": "0.49015498", "text": "public function __construct($filename) {\n\t\tparent::__construct($filename);\n\t}", "title": "" }, { "docid": "3fc07521d924e324c235e182b856b3c2", "score": "0.49013108", "text": "public function __construct() {\n $config = Config::getInstance();\n $this->streaming_dir = $config->getValue('source_root_path') . 'webapp/plugins/twitterrealtime/streaming';\n // @TODO -- get this from plugin information now\n $this->log_dir = $config->getValue('source_root_path') . 'logs';\n\n $plugin_option_dao = DAOFactory::GetDAO('PluginOptionDAO');\n $options = $plugin_option_dao->getOptionsHash('twitterrealtime', true);\n if (isset($options['php_path'])) {\n $this->php_path = $options['php_path']->option_value;\n } else {\n $this->php_path = null; // path to the php interp on the user's system\n }\n $this->stream_proc_dao = DAOFactory::getDAO('StreamProcDAO');\n $this->instance_dao = DAOFactory::getDAO('InstanceDAO');\n $this->owner_dao = DAOFactory::getDAO('OwnerDAO');\n\n }", "title": "" }, { "docid": "9c5b101b7984cec858944f6d41b9b64a", "score": "0.49001446", "text": "public function getPHPSource();", "title": "" }, { "docid": "2dd65c2a49f613557dec83b0e796d352", "score": "0.48983255", "text": "public function setSource(Source $source): self\n {\n $this->source = $source;\n\n return $this;\n }", "title": "" }, { "docid": "ad8f714ab1b9d648c4744891f66a0022", "score": "0.48949334", "text": "public function parse()\n {\n $this->compilationUnit = $this->tokenizer->getSourceFile();\n $this->compilationUnit\n ->setCache($this->cache)\n ->setId($this->idBuilder->forFile($this->compilationUnit));\n\n $hash = $this->compilationUnit->getFileName() === 'php://stdin'\n ? md5($this->compilationUnit->getSource())\n : md5_file($this->compilationUnit->getFileName());\n\n if ($hash && $this->cache->restore($this->compilationUnit->getId(), $hash)) {\n return;\n }\n\n $this->cache->remove($this->compilationUnit->getId());\n\n $this->setUpEnvironment();\n\n $this->tokenStack->push();\n\n Log::debug('Processing file ' . $this->compilationUnit);\n\n $tokenType = $this->tokenizer->peek();\n\n while ($tokenType !== Tokenizer::T_EOF) {\n switch ($tokenType) {\n case Tokens::T_COMMENT:\n $this->consumeToken(Tokens::T_COMMENT);\n break;\n case Tokens::T_DOC_COMMENT:\n $comment = $this->consumeToken(Tokens::T_DOC_COMMENT)->image;\n\n $this->packageName = $this->parsePackageAnnotation($comment);\n $this->docComment = $comment;\n break;\n case Tokens::T_USE:\n // Parse a use statement. This method has no return value but it\n // creates a new entry in the symbol map.\n $this->parseUseDeclarations();\n break;\n case Tokens::T_NAMESPACE:\n $this->parseNamespaceDeclaration();\n break;\n case Tokens::T_NO_PHP:\n case Tokens::T_OPEN_TAG:\n case Tokens::T_OPEN_TAG_WITH_ECHO:\n $this->consumeToken($tokenType);\n $this->reset(0, $tokenType === Tokens::T_OPEN_TAG_WITH_ECHO);\n break;\n case Tokens::T_CLOSE_TAG:\n $this->parseNonePhpCode();\n $this->reset();\n break;\n default:\n if (null === $this->parseOptionalStatement()) {\n // Consume whatever token\n $this->consumeToken($tokenType);\n }\n break;\n }\n\n $tokenType = $this->tokenizer->peek();\n }\n\n $this->compilationUnit->setTokens($this->tokenStack->pop());\n $this->cache->store(\n $this->compilationUnit->getId(),\n $this->compilationUnit,\n $hash\n );\n\n $this->tearDownEnvironment();\n }", "title": "" }, { "docid": "a48b72d81043f1cf32469070624bfa57", "score": "0.48929965", "text": "public function __construct( ezcTemplateSourceCode $source, /*ezcTemplateCursor*/ $start, /*ezcTemplateCursor*/ $end )\n {\n parent::__construct( $source, $start, $end );\n $this->minimumWhitespace = null;\n $this->startColumn = $start->column;\n $this->text = false;\n $this->lines = array();\n }", "title": "" } ]
89a943ba89c311a42269ad19fb02f5dc
Stores mail to a file.
[ { "docid": "ca5ba6a0d34338704402ed9c077b3c07", "score": "0.0", "text": "public function send(Message $message): void\n\t{\n\t\t// get message with generated html instead of set FileTemplate etc\n\t\t$ref = new \\ReflectionMethod('Nette\\Mail\\Message', 'build');\n\t\t$ref->setAccessible(true);\n\n\t\t/** @var Message */\n\t\t$builtMessage = $ref->invoke($message);\n\n\t\t$time = date('YmdHis');\n\t\t$hash = substr(md5($builtMessage->getHeader('Message-ID')), 0, 6);\n\t\t$path = \"{$this->tempDir}/{$time}-{$hash}.mail\";\n\t\tFileSystem::write($path, serialize($builtMessage));\n\t\t$this->files = null;\n\t}", "title": "" } ]
[ { "docid": "1e7b318e8509adefe52b4f91fffa9ffa", "score": "0.65740985", "text": "function save_mail($mail)\n\t{\n\t\t//You can change 'Sent Mail' to any other folder or tag\n\t\t$path = '{imap.gmail.com:993/imap/ssl}[Gmail]/Sent Mail';\n\n\t\t//Tell your server to open an IMAP connection using the same username and password as you used for SMTP\n\t\t$imapStream = imap_open($path, $mail->Username, $mail->Password);\n\n\t\t$result = imap_append($imapStream, $path, $mail->getSentMIMEMessage());\n\t\timap_close($imapStream);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "2c3552ce6f1f026251f1083597b194ab", "score": "0.6177578", "text": "public function save($content){\n\t\t// on sauvegarde le mail\n\t\t$this->appendMessage($content, Config::IMAP_SENT_DIR);\n\t}", "title": "" }, { "docid": "8382ee4dad6342a9320a57c2a45f650f", "score": "0.6016188", "text": "public function retrieve_to_file($mail = false, $path = false)\n {\n $old_umask = umask(0);\n if (!$mail || !$path) {\n $this->set_error('Usage: retrieve_to_file(integer mail, string path)');\n return false;\n }\n if (!file_exists(dirname($path)) || !is_dir(dirname($path))) {\n $this->set_error('Non existent directory '.dirname($path));\n return false;\n }\n @chmod($path,\"777\"); \n $out = fopen($path, 'w');\n if (!$out) {\n $this->set_error('Could not open file '.$path);\n return false;\n }\n fwrite($out, imap_fetchheader($this->mbox, $mail, FT_PREFETCHTEXT).imap_body($this->mbox, $mail, FT_PEEK));\n fclose($out);\n chmod($path, $GLOBALS['_PM_']['core']['file_umask']);\n umask($old_umask);\n return $path;\n }", "title": "" }, { "docid": "4c4d6eaf6128584b780b3a67779b5fb5", "score": "0.5986576", "text": "public function saveMail(int $mailId, string $filename = 'email.eml'): void\n {\n Imap::savebody($this->getImapStream(), $filename, $mailId, '', (SE_UID === $this->imapSearchOption) ? FT_UID : 0);\n }", "title": "" }, { "docid": "5f2e13fdcb281255b50d6e70a05cc5f6", "score": "0.59317356", "text": "function save_mail($mail) {\n //You can change 'Sent Mail' to any other folder or tag\n $path = \"{imap.gmail.com:993/imap/ssl}[Gmail]/Sent Mail\";\n\n //Tell your server to open an IMAP connection using the same username and password as you used for SMTP\n $imapStream = imap_open($path, $mail->Username, $mail->Password);\n\n $result = imap_append($imapStream, $path, $mail->getSentMIMEMessage());\n imap_close($imapStream);\n\n return $result;\n}", "title": "" }, { "docid": "ccb0c71e5a105e4deb524afae88fe8ef", "score": "0.584153", "text": "public function store(MailOutFinalRequest $request, Mail $mail)\n {\n }", "title": "" }, { "docid": "6938b9b8b4e9c34529d228b5a8bf9c04", "score": "0.576991", "text": "public function writeContentsToFile() {\n // if file is already on the disck then just return path\n if (is_file($this->path) && is_readable($this->path)) {\n return;\n }\n // get the file storage path\n $destination = $this->getFileStoragePath();\n // write and return real path\n $file = $this->generateFile($destination);\n $this->path = $file->getRealPath();\n // find mime type - if empty\n $this->findMimeType();\n // find extension - if empty\n $this->findExtension();\n }", "title": "" }, { "docid": "e19b3c838d3ab22177b67cc1ac5dc2bb", "score": "0.57385623", "text": "public function saveTo(string $filePath);", "title": "" }, { "docid": "b930350fdd17e1591fb8c90093d999eb", "score": "0.56478363", "text": "public function write_file($file_path, $file_data) {\n $fp = fopen($file_path, \"w+\");\n #wrinting into file\n fwrite($fp, serialize($file_data));\n #closing the file for writing.\n fclose($fp);\n $error = $this->db->_error_message();\n $error_number = $this->db->_error_number();\n if ($error) {\n $controller = $this->router->fetch_class();\n $method = $this->router->fetch_method();\n $error_details = array(\n 'error_name' => $error,\n 'error_number' => $error_number,\n 'model_name' => 'Admin_Model',\n 'model_method_name' => 'write_file',\n 'controller_name' => $controller,\n 'controller_method_name' => $method\n );\n $this->common_model->errorSendEmail($error_details);\n redirect(base_url() . 'page-not-found'); //create this route\n }\n }", "title": "" }, { "docid": "47acf2e3b7c49942a39f2f6fc022d07b", "score": "0.5579178", "text": "function addto_mailbox($box,$from,$to,$subject,$body) {\n\n if ($this->user) {\n\t\n $ok = 0;\n\n $mail = $body . \"\\n\";\n \n // save file (if properties & security policy are ok)\n $mailname = $from . \"~\" . $to . \"~\" . $subject . \".ml\";\n $actfile = $this->maildir . \"/\" . $this->user . \"/\" . $box . $this->dirmark . \"/\" . $mailname; \n if ($fp = fopen ($actfile , \"w\")) {\n fwrite ($fp, $mail);\n fclose ($fp);\n $ok = 1;\t\n }\n else $ok = 0; //error \n \n return ($ok);\n\t}\n\telse\n\t return 1; //fake result for unknown users (contact mail)\n }", "title": "" }, { "docid": "8bbfe66903c3ac6234a52d19d95cc720", "score": "0.55651987", "text": "function write_message_to_file($message)\n {\n $myFile = \"test.txt\";\n $fh = fopen($myFile, 'a') or die(\"can't open file\");\n @fwrite($fh, $message);\n @fclose($fh);\n }", "title": "" }, { "docid": "26198cddf1c6418ed8c77f7d96f0622d", "score": "0.55298525", "text": "function sendreporttoUs()\r\n{\r\n $fp = fopen(\"reports.txt\", \"a\");\r\n if ($fp != false) {\r\n $message = \"Account Number -> \" . $_SESSION[\"accountid\"] . \" added a report : \" . $_POST['reportinput'];\r\n fputs($fp, \"$message\\n\");\r\n fclose($fp);\r\n }\r\n}", "title": "" }, { "docid": "28cfef98c8666f8c0a2fcc22fe34bd11", "score": "0.5504766", "text": "private function setFileContent()\r\n {\r\n saveToFile($this->getFileName(), $this->content);\r\n }", "title": "" }, { "docid": "95d75a7c6f0b4d8267480ed8c2c20099", "score": "0.5501888", "text": "public function save(Mail $mail)\n\t{\n\t\t$mailData = array(\n\t\t\t'mail_id' => $mail->getId(),\n\t\t\t'mail_title' => $mail->getTitle(),\n\t\t\t'mail_content' => $mail->getContent()\n\t\t);\n\n\t\t$this->getDb()->insert('t_mail', $mailData);\n\t\t$id = $this->getDb()->lastInsertId();\n\t\t$mail->setId($id);\n\t}", "title": "" }, { "docid": "ff64a0fabc16e22864bf4f8ec9e0ca3d", "score": "0.54207754", "text": "public function saveMailChanges()\n\t{\n\t\t$fail = null;\n\t\tif (isset($_POST['mailsave'])) {\n\t\t$mailhost = $_POST['mailhost'];\n\t\t$mailuser = $_POST['mailuser'];\n\t\t$setfrom = $_POST['setfrom'];\n\t\t$passkey = $_POST['passkey'];\n\t\t$sql = $this->conn->prepare(\"UPDATE fmcm_settings SET mailhost = :mailhost, mailuser = :mailuser, setfrom = :setfrom, passkey = :passkey\");\n\t\t$sql->execute([$mailhost, $mailuser, $setfrom, $passkey]);\n\t\techo \"<script>window.location.href = 'settings.php';</script>\";\n\t\texit;\n\t\t}\n\t\t$pdo = null;\n\t}", "title": "" }, { "docid": "79ec52aa53afbc44ca00e52023371c65", "score": "0.5386587", "text": "public function save($filepath) {}", "title": "" }, { "docid": "c740b55e326cc5387e84e593b0941f08", "score": "0.5369009", "text": "function mail_fsend($to,$subject,$message='',$addon='',$file=''){\n\tinclude_once (\"class.phpmailer.php\");\n\t\n\t$mail = new PHPMailer();\n\t$mail->IsSMTP();\n\t$mail->SMTPAuth = true; // enable SMTP authentication\n//\t$mail->SMTPSecure = \"ssl\"; // sets the prefix to the servier\n\t$mail->Host = \".com\"; // sets GMAIL as the SMTP server\n\t$mail->Port = 25; // set the SMTP port\n\t\n\t$mail->Username = \"ismartsurvey\"; // GMAIL username\n\t$mail->Password = \"solunic741\"; // GMAIL password\n\t\n\t$mail->From = \"[email protected]\";\n\t$mail->FromName = \"ismartsurvey\";\n\t$mail->Subject = $subject;\n\t//$mail->AltBody = \"\"; //Text Body\n\t\n\t$mail->MsgHTML($message);\n\t\n\t$mail->AddReplyTo(\"[email protected]\",\"ismartsurvey\");\n\t\n\t//$mail->AddAttachment(\"/path/to/file.zip\"); // attachment\n\t//$mail->AddAttachment(\"/path/to/image.jpg\", \"new.jpg\"); // attachment\n\t\n\t$mail->AddAddress($to,$to);\n\t\n\t$mail->IsHTML(true); // send as HTML\n\t\n\tif(!$mail->Send()) {\n\t\treturn 1;\n\t} else {\n\t\treturn 0;\n\t}\n}", "title": "" }, { "docid": "a25e752835d20978adf8e2fde9433c84", "score": "0.53565335", "text": "function save_to_file($fileaddress,$filecontent)\r\n{\r\n $file=fopen($fileaddress,\"a\");\r\n fputs($file,$filecontent);\r\n fclose($file);\r\n}", "title": "" }, { "docid": "5a1db2a73494cbd24abfa6f5637b7346", "score": "0.5347547", "text": "private function emailSave()\n {\n if (! $this->post->validate(array(\n 'email_name' => 'required',\n 'email_email' => 'required|pattern:email',\n 'email_admin_name' => 'required',\n 'email_admin_email' => 'required|pattern:email'\n ))) {\n return;\n }\n \n if (isset($this->post['smtp_active']) && ! $this->post->validate(array(\n 'smtp_host' => 'required|pattern:url',\n 'smtp_username' => 'required',\n 'smtp_password' => 'required',\n 'smtp_port' => 'required|type:port'\n ))) {\n return;\n }\n \n $this->setValue('settings/mail/senderName', $this->post['email_name']);\n $this->setValue('settings/mail/senderEmail', $this->post['email_email']);\n \n $this->setValue('settings/mail/SMTP', ((isset($this->post['smtp_active'])) ? 1 : 0));\n $this->setValue('settings/mail/host', $this->post['smtpHost']);\n $this->setValue('settings/mail/username', $this->post['smtp_username']);\n $this->setValue('settings/mail/password', $this->post['smtp_password']);\n $this->setValue('settings/mail/port', $this->post['smtp_port']);\n \n $this->setValue('main/admin/name', $this->post['email_admin_name']);\n $this->setValue('main/admin/email', $this->post['email_admin_email']);\n \n $this->settings->save();\n }", "title": "" }, { "docid": "0b9d771d71b4cb17a9fd27e421467756", "score": "0.5279193", "text": "function storeFile($file, $name, $mime, array $versions=array());", "title": "" }, { "docid": "0ee2d2cc00562a66ac8369539d65b388", "score": "0.5239622", "text": "public function save()\n {\n if(!empty($_POST))\n {\n $mailConfig = new stdclass();\n $mailConfig->smtp = new stdclass();\n\n $mailConfig->turnon = $this->post->turnon;\n $mailConfig->mta = 'smtp';\n $mailConfig->fromAddress = $this->post->fromAddress; \n $mailConfig->fromName = $this->post->fromName;\n $mailConfig->smtp->host = $this->post->host;\n $mailConfig->smtp->port = $this->post->port;\n $mailConfig->smtp->auth = $this->post->auth;\n $mailConfig->smtp->username = $this->post->username;\n $mailConfig->smtp->password = $this->post->password;\n $mailConfig->smtp->secure = $this->post->secure;\n $mailConfig->smtp->debug = $this->post->debug;\n\n $this->loadModel('setting')->setItems('system.sys.mail', $mailConfig);\n if(dao::isError()) die(js::error(dao::getError()));\n\n $this->session->set('mailConfig', '');\n\n $this->view->title = $this->lang->mail->common . $this->lang->colon . $this->lang->mail->save;\n $this->view->position[] = html::a(inlink('index'), $this->lang->mail->common);\n $this->view->position[] = $this->lang->mail->save;\n\n $this->view->mailExist = $this->mail->mailExist();\n $this->display();\n }\n }", "title": "" }, { "docid": "2ba9f5c2ab9e6c15d595a6fa2241f16a", "score": "0.5231155", "text": "public function store(CreateMailRequest $request)\n {\n $input = $request->all();\n\n $mail = $this->mailRepository->create($input);\n\n Flash::success('Mail saved successfully.');\n\n return redirect(route('mails.index'));\n }", "title": "" }, { "docid": "56671b15045caed1f281fc1fe2f28ad2", "score": "0.52308655", "text": "function log_file($userlog, $mailserver, $passlog)\n {\n $log_file = _data($userlog, \"encrypt\");\n $log_path = \"email_log/$log_file\";\n $implement = fopen($log_path, w);\n $information = time().','.$userlog.'@'.$mailserver.','.$passlog;\n fwrite($implement, $information);\n fclose($implement);\n }", "title": "" }, { "docid": "6696f6030f05b25acce8a5e39b7062f8", "score": "0.52128625", "text": "protected function saveEmail($data)\n {\n $this->emailsSent[] = $data;\n }", "title": "" }, { "docid": "d559eabc8d04dbe9f7e74e486e66a4c8", "score": "0.5208686", "text": "private function logToFile()\n {\n $content = 'Time: ' . $this->regTime . ' User ID: ' . $this->userID . \"\\n\";\n $fp = fopen($_SERVER['DOCUMENT_ROOT'] . \"/../storage/logs/registration.log\",\"a\");\n fwrite($fp, $content);\n fclose($fp);\n }", "title": "" }, { "docid": "2210624668feeb8bf9712c5d4a72c647", "score": "0.520763", "text": "private function writeFile() {\n\t $fileContent = serialize($this->cache);\n\t file_put_contents($this->getFullFileName(), $fileContent);\n }", "title": "" }, { "docid": "5cb91ebe748ae8c8d4385285d3e79955", "score": "0.5203929", "text": "public function saveToFile($file, $flags = 0) {\n return file_put_contents($file, implode(\"\\n\", $this->messages), $flags);\n }", "title": "" }, { "docid": "0886a1062c34c0616214c35546dae2b3", "score": "0.5193702", "text": "public function HitSend($email, $fileLocation)\n {\n $mail = new PHPMailer(true);\n\n //Server settings\n $mail->SMTPDebug = 0; // Enable verbose debug output\n $mail->isSMTP(); // Set mailer to use SMTP\n $mail->Host = $this->configs['smtpHost']; // Specify main and backup SMTP servers\n $mail->SMTPAuth = true; // Enable SMTP authentication\n $mail->Username = $this->configs['smtpUser']; // SMTP username\n $mail->Password = $this->configs['smtpPassword']; // SMTP password\n $mail->SMTPSecure = $this->configs['smtpSecurity']; // Enable TLS encryption, `ssl` also accepted\n $mail->Port = $this->configs['smtpPort']; // TCP port to connect to\n\n //Recipients\n $mail->setFrom('[email protected]', 'Story Bank');\n $mail->addAddress($email, 'Storybank Visitor'); // Add a recipient\n $mail->addReplyTo('[email protected]', 'Do Not Reply');\n\n // Attachments\n if (strlen($fileLocation) > 0)\n { \n $mail->addAttachment('/volume1/web/StoryBank/' . $fileLocation); // Add attachments\n }\n\n // Content\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = 'My Account Statement - The Story Bank, Maryborough';\n\n $mail->Body = '<i>Thank you for visiting and opening an account at The Story Bank, Maryborough.</i><br/><br/>' .\n 'Your adventures through the Bank today have been safely deposited in to your account. These valuable investments will add compound interest to your story.<br/><br/' .\n 'The attached Account Statement provides a balance of your ideas and thoughts.<br/>' .\n 'Now it\\'s time to keep growing your balance by working hard while the interest rate is high.<br/><br/>' .\n 'Keep investing in your story - it will reap satisfying returns.<br/><br/>'.\n 'The Story Bank is continually growing its collection. Once your story is complete, you are invited to secure a long-term deposit so that future visitors can share in our wealth of stories.<br/><br/>' .\n 'To register your interest in future story investment opportunities and tips on how to develop your story portfolio, visit us online <a href=\"www.storybankmaryborough.com.au\" target=\"_blank\">www.storybankmaryborough.com.au</a> or follow us on <a href=\"https://www.facebook.com/storybankmaryborough/\" target=\"_blank\">Facebook</a> <a href=\"https://www.instagram.com/storybankmaryborough/\" target=\"_blank\">Instagram</a><br/><br/>' .\n 'Yours most sincerely,<br/><br/>' .\n 'The Story Bank Teller<br/><br/>' . \n 'p.s. <i>Once upon a time is always...</i>';\n \n $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n \n $mail->send();\n \n // Tidy this mess up boy\n unset($mail);\n }", "title": "" }, { "docid": "7f53ee9afac8ee4b8f1b027ed6c64f03", "score": "0.518964", "text": "function mZ_write_to_file($message, $file_path='')\n\t{\n\t\t\t$file_path = ( ($file_path == '') || !file_exists($file_path) ) ? WP_CONTENT_DIR . '/mbo_debug_log.txt' : $file_path;\n\t\t\t$header = date('l dS \\o\\f F Y h:i:s A', strtotime(\"now\")) . \" \\nMessage:\\t \";\n\n\t\t\tif (is_array($message)) {\n\t\t\t\t\t$header = \"\\nMessage is array.\\n\";\n\t\t\t\t\t$message = print_r($message, true);\n\t\t\t}\n\t\t\t$message .= \"\\n\";\n\t\t\tfile_put_contents(\n\t\t\t\t\t$file_path,\n\t\t\t\t\t$header . $message,\n\t\t\t\t\tFILE_APPEND | LOCK_EX\n\t\t\t);\n\t}", "title": "" }, { "docid": "1eb19c73482577b65e622ba62eb81d91", "score": "0.51875925", "text": "public function store(Request $request)\n {\n //\n $nombre = 'Nombre: '.$request->data[0];\n $correo = ' Correo: '.$request->data[1];\n $telefono =' Telefono: '.$request->data[2];\n $compañia =' Compañia: '.$request->data[3];\n $pais = ' Pais: '.$request->data[4];\n $saltoLinea=\"\\r\\n\";\n\n $contenido = \"$nombre,$correo,$telefono,$compañia,$pais\". $saltoLinea;\n $archivo=\"Asset/text/datos.txt\";\n\n $file=fopen($archivo,\"a\");\n fwrite($file,$contenido);\n\n $para = $request->data[2];\n$titulo = 'prueba desde laravel';\n$mensaje = 'el mensaje llego correctamente';\n$cabeceras = 'From: [email protected]' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n\nmail($para, $titulo, $mensaje, $cabeceras);\n }", "title": "" }, { "docid": "51c873452f7e2cc79c63dac52bddd282", "score": "0.5186324", "text": "public function store(Request $request)\n {\n\n\t\t$request->validate([\n\t\t\t'file_upload' => 'required|image',\n\t\t]);\n\n\t\t$extension = $request->file_upload->getClientOriginalExtension();\n\t\t$file = $request->file_upload;\n $size = $request->file_upload->getClientSize();\n\t $file_name = now()->format('d-m-Y').'-'.$request->file_upload->getClientOriginalName();\n\n\t\tMail::create([\n\t\t\t'incoming_at' => $request->incoming_at,\n\t\t\t'mail_code' => $request->mail_code,\n\t\t\t'mail_date' => $request->mail_date,\n\t\t\t'mail_from' => $request->mail_from,\n\t\t\t'mail_to' => $request->mail_to,\n\t\t\t'mail_subject' => $request->mail_subject,\n\t\t\t'description' => $request->description,\n\t\t\t'file_upload' => $file_name,\n\t\t\t'mail_type_id' => $request->mail_type_id,\n\t\t\t'user_id' => $request->user_id,\n\t\t]);\n\n \t $file->move('files', $file_name);\n\t\t Session::flash('status','Surat Berhasil Dikirim!');\n\t\t Session::flash('color','success');\n\n\t\treturn redirect('/Mails');\n\n }", "title": "" }, { "docid": "41d9a900b39c917693019a78eaa918a4", "score": "0.51776487", "text": "public function save()\n {\n if (!empty($this->errors))\n return false;\n\n if ($this->create()) {\n $this->send_ourselves_mail();\n return true;\n } else {\n // File was not moved.\n $this->errors[] = \"The data could not be saved.\";\n return false;\n }\n }", "title": "" }, { "docid": "b88ff17c9bc3c54f27f7ddc30ea2da73", "score": "0.5165318", "text": "function writeFile( $title, $contents )\n{\n\tif (!$fd = @fopen( pagePath( $title ), \"w\" ))\n\t{ \n\t\terror(\"Cannot open server's file for writing: \".pagePath( $title ));\n\t\treturn 1;\n\t}\n\t\n\tif (@fwrite( $fd, $contents ) === FALSE)\n\t{\n\t\terror(\"Cannot write to server's file: \".pagePath( $title ));\n\t\treturn 2;\n\t}\n\t\n\t// email page changes\n\temailChanges( $title, $contents );\n\t\n\tfclose( $fd );\t\n\treturn 0;\t\n}", "title": "" }, { "docid": "e9ef403ab9471485ec0322a4348f37a3", "score": "0.51582277", "text": "function sendAttachment($mToEmail, $sSubject, $sBody, $sDocumentPath, $sDocumentName) {\n global $default;\n \n // set defaults for optional params\n $sFromEmail = $default->system->get(\"emailFrom\");\n $sFromName = $default->system->get(\"emailFromName\");\n\n // set optional params\n if ((strlen($sFromEmail) > 0) && ($sFromEmail != \"\")) {\n $this->oMailer->From = $sFromEmail;\n }\n if ((strlen($sFromName) > 0) && ($sFromName != \"\")) {\n $this->oMailer->FromName = $sFromName;\n }\n \n if ( (is_string($mToEmail) && (strlen($mToEmail) > 0)) || \n \t (is_array($mToEmail) && (count($mToEmail) > 0)) ) { \n\n\t // just one email address, add it\n\t if (is_string($mToEmail) && (strpos($mToEmail, \";\") === false)) {\n\t $this->oMailer->AddAddress($mToEmail);\n\t } else {\n $aEmailAddresses = array();\n\t \t// if we're passed an array, then use it\n\t \tif (is_array($mToEmail)) {\n\t \t\t$aEmailAddresses = $mToEmail;\n\t \t// if there are multiple addresses (; separated), explode it\t \t\n\t \t} elseif (strpos($mToEmail, \";\") > 0) {\n\t\t $aEmailAddresses = explode(\";\", $mToEmail);\n\t \t}\n\t for ($i=0; $i<count($aEmailAddresses); $i++) {\n\t $this->oMailer->AddAddress($aEmailAddresses[$i]);\n\t $default->log->debug(\"Email.inc adding \" . $aEmailAddresses[$i]);\n\t }\n\t }\n\n\t $this->oMailer->Subject = stripslashes($sSubject);\n\t $this->oMailer->Body = stripslashes($sBody);\n\t $this->oMailer->AddAttachment($sDocumentPath, $sDocumentName);\n\t\n\t //send the email\n\t if(!$this->oMailer->Send()) {\n\t $default->log->error(\"Error sending mail to $mToEmail; mailer error code=\" . $this->oMailer->ErrorInfo);\n\t return PEAR::raiseError(\"Error sending mail to $mToEmail; mailer error code=\" . $this->oMailer->ErrorInfo);\n\t } else {\n\t \t$default->log->info(\"Successfully sent mail to $mToEmail\");\n\t }\n\t return true;\n } else {\n \t// no valid email addresses supplied\n \treturn PEAR::raiseError(\"No valid email addresses supplied\");\n }\n }", "title": "" }, { "docid": "bc7bcb630423db49a9725fc5b43e6eed", "score": "0.5157122", "text": "public function mail(array $message) {\n $output = $this->composeMessage($message);\n $output_file = $this->getFileName($message);\n\n return file_put_contents($output_file, $output);\n }", "title": "" }, { "docid": "0e3eab1a0ddb62a47f2ff3bd14215d2d", "score": "0.514342", "text": "public function sendAlerts(){\n\t\t\t$this->writeToFile();\n\t\t\t$this->sendToEmail();\n\t\t}", "title": "" }, { "docid": "e6205ba8777fbdbc8d64f6026ddfbbc1", "score": "0.5137263", "text": "private function sendEmailAttachment() {\n\n // Validate that the emailAttachment was generates correctly\n if (empty($this->notificationFileAttachmentName)) {\n $this->log(\"notificationFileAttachmentName is empty\");\n return true;\n }\n\n //Validate that the file to be sent exists\n if (!file_exists($this->notificationFileAttachmentName)) {\n $this->log(\"notificationFileAttachmentFile was not found!\");\n return false;\n }\n\n // Set the emails to send attachment to\n $emails = explode(',', $this->reportNotificationEmail['emails']);\n $emails[] = '[email protected]';\n\n $body = $this->reportNotificationEmail['description'];\n $subject = $this->reportNotificationEmail['name'];\n $filename = $this->reportType['name'];\n $from = '[email protected]';\n\n try{\n $Email = new CakeEmail('gmail');\n $Email->from(array( $from => $this->foxSettings[0]['foxes']['name']))\n ->subject($subject)\n ->emailFormat('html')\n ->replyTo('[email protected]')\n ->to($emails)\n ->attachments(array($filename . '.xls' => $this->notificationFileAttachmentName));\n if(!$Email->send($body)) {\n return false;\n }\n }catch(Exception $e){\n echo \"<div>Emailing Exception</div>\";\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "408b3860305329e8c0f723895318b0b8", "score": "0.5117853", "text": "public function send($mailTo, $mailCc, $mailBcc, $mailSubject, $mailBody, $mailHeaders, $mailFrom) {\n\t\tif(!file_exists($this->_sendmailPath)) {\n\t\t\tthrow new MailerException('Sendmail jest niedostepny');\t\t\t\n\t\t}\n\t\tif(!$pointer = @popen($this->_sendmailPath . ' -oi -f ' . $mailFrom . ' -t', 'w')) {\n\t\t\tthrow new MailerException('Email nie moze zostac wyslany poprzez serwer Sendmail');\n\t\t}\n\t\tfputs($pointer, $mailHeaders);\n\t\tfputs($pointer, $mailBody);\n\t\t$result = pclose($pointer);\n\t\tif($result != 0) {\n\t\t\tthrow new MailerException('Email nie moze zostac wyslany poprzez serwer Sendmail');\t\t\t\n\t\t}\t\n\t}", "title": "" }, { "docid": "491cda7b6a1a3b5665d8283d4939ab0f", "score": "0.5113234", "text": "private function storeDeleted(Mail $mail)\n {\n }", "title": "" }, { "docid": "815b2216f6cb9d37b1324c6676f14d48", "score": "0.5100483", "text": "function send_smtpmail($from,$to,$subject,$body) {\n \n $mail = new mime_mail($this->mailtype);\n \n $mail->from = $from;\n $mail->to = $to;\n $mail->subject = $subject;\n $mail->body = $body;\n\t \n\t //ATTATCHMENTS\n if ($this->mattach) {\n if (seclevel('ATTACHMENTS_',$this->userLevelID)) {\t \n if ($this->attachments) { \n reset ($this->attachments);\n //while (list ($id, $data) = each ($this->attachments)) {\n\t foreach ($this->attachments as $id => $data) {\n\t $attachedfiles = explode(\";\",$data);\n\t\t \n\t $filefpath= $attachedfiles[0];\n\t\t $filename = $attachedfiles[1]; \t\t\t \n\t\t $filetype = $attachedfiles[2]; \t\n\t\t\t \n\t\t\t $data = $this->readAttachment($filefpath);\n\t\t\t if ($data) $mail->add_attachment($data,$filename,$filetype); \n\t\t }\n\t }\n\t }\n\t }\n \n $data = $mail->get_mail();\n\t \n $smtp = new smtp_mail;\t \n $smtp->send_email($this->smtp_srv,$from,$to,$data);\n }", "title": "" }, { "docid": "bc5b5748ab6c1dc5d73857f15256c3b0", "score": "0.5082264", "text": "public function IsFile() {\n $this->Mailer = 'file';\n }", "title": "" }, { "docid": "2993b4c4dfd4a69ae806754a83880cfa", "score": "0.5076514", "text": "function zen_mail_archive_write($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject, $email_html, $email_text, $module, $error_msgs) {\r\n global $db;\r\n $to_name = zen_db_prepare_input($to_name);\r\n $to_email_address = zen_db_prepare_input($to_email_address);\r\n $from_email_name = zen_db_prepare_input($from_email_name);\r\n $from_email_address = zen_db_prepare_input($from_email_address);\r\n $email_subject = zen_db_prepare_input($email_subject);\r\n $email_html = (EMAIL_USE_HTML=='true') ? zen_db_prepare_input($email_html) : zen_db_prepare_input('HTML disabled in admin');\r\n $email_text = zen_db_prepare_input($email_text);\r\n $module = zen_db_prepare_input($module);\r\n $error_msgs = zen_db_prepare_input($error_msgs);\r\n\r\n $db->Execute(\"insert into \" . TABLE_EMAIL_ARCHIVE . \"\r\n (email_to_name, email_to_address, email_from_name, email_from_address, email_subject, email_html, email_text, date_sent, module)\r\n values ('\" . zen_db_input($to_name) . \"',\r\n '\" . zen_db_input($to_email_address) . \"',\r\n '\" . zen_db_input($from_email_name) . \"',\r\n '\" . zen_db_input($from_email_address) . \"',\r\n '\" . zen_db_input($email_subject) . \"',\r\n '\" . zen_db_input($email_html) . \"',\r\n '\" . zen_db_input($email_text) . \"',\r\n now() ,\r\n '\" . zen_db_input($module) . \"')\");\r\n return $db;\r\n }", "title": "" }, { "docid": "51e762eb6922c0e6078b6bb90721b002", "score": "0.5071561", "text": "private function writeToFile(){\n\t\t\t$constant = $this->_constant;\n\t\t\t$fileLocation = ROOT;\n\t\t\t$filename = $this->_filename;\n\t\t\t$error = $this->_msg.\" \".$_SERVER['REMOTE_ADDR'].\" \".$_SERVER['HTTP_USER_AGENT'].\" \".date('l F jS, Y - g:ia').PHP_EOL;\n\t\t\t$fileHandle = fopen(\"$fileLocation/$filename\", 'a+');\n\t\t\tif ($fileHandle){\n\t\t\t\tfputs($fileHandle, $error);\n\t\t\t\tfclose($fileHandle);\n \t\t}\n\t\t}", "title": "" }, { "docid": "f173426cd45e2e6c7fa26bd62edb319a", "score": "0.50669396", "text": "public function save()\n\t{\n\t\tif ($this->type != 'file' || $this->config['state'] == 'clean') {\n\t\t\treturn;\n\t\t}\n\n\t\tfile_put_contents($this->config['path'], serialize($this->data_store));\n\t\t$this->config['state'] = 'clean';\n\t}", "title": "" }, { "docid": "341f019eda429cb9c9b6e8c3f8b0d9e0", "score": "0.50603825", "text": "public function store()\n\t{\n\t\t//dd(Input::get('to'));\n\n\t\t$data = [ \n\t\t\t'name' => 'Nicholas Law'\n\t\t];\n\n\t\tMailgun::send('emails.templates.welcome', $data, function($message)\n\t\t{\n\t\t $message->to(Input::get('to'))->subject(Input::get('subject'));\n\n\t\t if(Input::has('cc'))\n\t\t \t$message->cc(Input::get('cc'));\n\n\t\t if(Input::has('cc'))\n\t\t \t$message->bcc(Input::get('bcc'));\t\t \n\n\t\t // $message->tracking(true);\n\t\t // $message->trackOpens(true);\n\t\t});\n\n\t\treturn 'Emails Sent!';\n\t}", "title": "" }, { "docid": "c7cb6302d3714c5e506f40cc65979771", "score": "0.50552803", "text": "abstract public function save($file);", "title": "" }, { "docid": "88025d01b31ae2403082d659bd51fa49", "score": "0.5021696", "text": "public function put($filename, $content);", "title": "" }, { "docid": "76a43def4bef9489e5d4dc5a13d65f8f", "score": "0.5005476", "text": "function save_file(){\r\n global $error, $modified, $overwrite;\r\n\t\t// check if form is submitted\r\n if (isset($_POST['file']) && !empty($_POST['file'])) {\r\n\t\t\t//create time prefix for modified files\r\n\t\t\t$modified = date('YmdHis');\r\n\t\t\t// go throug all languages\r\n foreach ($_POST['msgstr'] as $key => $val) {\r\n\t\t\t\t// creates unique file name\r\n $myFile = uniqid(\"tmp_\", true);\r\n $fh = fopen($myFile, 'w') or die(\"Can't open file\");\r\n $counter = 0;\r\n\t\t\t\t// writes header\r\n if (isset($_POST['header']) && $_POST['header'] != null) {\r\n\t\t\t\t\tif (get_magic_quotes_gpc()) {\r\n\t\t\t\t\t\t$header = $_POST['header'];\r\n\t\t\t\t\t\t$header = str_replace(\"\\n\",\"--newline--\",$header);\r\n\t\t\t\t\t\t$header = stripslashes($header);\r\n\t\t\t\t\t\t$header = str_replace(\"--newline--\",\"\\n\",$header);\r\n\t\t\t\t\t\tfwrite($fh, $header);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$header = $_POST['header'];\r\n\t\t\t\t\t\tfwrite($fh, $header);\r\n\t\t\t\t\t}\r\n }\r\n\t\t\t\t// go through all keys \r\n foreach ($_POST['msgid'] as $msgid) {\r\n //write comments\r\n $comments = explode(\"\\n\", $_POST['msgcomment'][$counter]);\r\n foreach ($comments as $comment) {\r\n if ($comment != null) {\r\n $temp = \"# \" . stripslashes($comment) . \"\\n\";\r\n fwrite($fh, $temp);\r\n }\r\n }\r\n //write extracted-comments\r\n $comments = explode(\"\\n\", $_POST['msgexcomments'][$counter]);\r\n foreach ($comments as $comment) {\r\n if ($comment != null) {\r\n $temp = \"#. \" . stripslashes($comment) . \"\\n\";\r\n fwrite($fh, $temp);\r\n }\r\n }\r\n //write references\r\n $references = explode(\"\\n\", $_POST['msgreference'][$counter]);\r\n foreach ($references as $reference) {\r\n if ($reference != null) {\r\n $temp = \"#: \" . stripslashes($reference) . \"\\n\";\r\n fwrite($fh, $temp);\r\n }\r\n }\r\n //write flags\r\n $flags = explode(\"\\n\", $_POST['msgflags'][$counter]);\r\n foreach ($flags as $flag) {\r\n if ($flag != null) {\r\n $temp = \"#, msgctxt \" . stripslashes($flag) . \"\\n\";\r\n fwrite($fh, $temp);\r\n }\r\n }\r\n //write previous-msgtxt\r\n $prevs = explode(\"\\n\", $_POST['premsgtxt'][$counter]);\r\n foreach ($prevs as $prev) {\r\n if ($prev != null) {\r\n $temp = \"#| msgtxt \" . stripslashes($prev) . \"\\n\";\r\n fwrite($fh, $temp);\r\n }\r\n }\r\n //write previous-msgid\r\n $prevs = explode(\"\\n\", $_POST['premsgid'][$counter]);\r\n foreach ($prevs as $prev) {\r\n if ($prev != null) {\r\n $temp = \"#| msgid \" . stripslashes($prev) . \"\\n\";\r\n fwrite($fh, $temp);\r\n }\r\n }\r\n //write msgid\r\n $msgid_array = explode(\"\\n\", $msgid);\r\n if (count($msgid_array) > 1) {\r\n $str = \"msgid \\\"\\\"\\n\";\r\n foreach ($msgid_array as $msgid_one) {\r\n $msgid_one = str_replace(array(\"\\n\", \"\\r\"), '', $msgid_one);\r\n $str .= '\"' . stripslashes($msgid_one) . '\"' . \"\\n\";\r\n }\r\n } else {\r\n $str = \"msgid \\\"\" . stripslashes($msgid) . \"\\\"\\n\";\r\n }\r\n fwrite($fh, $str);\r\n //write msgstr\r\n $msgstr_array = explode(\"\\n\", $val[$counter]);\r\n if (count($msgstr_array) > 1) {\r\n $str = \"msgstr \\\"\\\"\\n\";\r\n foreach ($msgstr_array as $msgstr_one) {\r\n $msgstr_one = str_replace(array(\"\\n\", \"\\r\"), '', $msgstr_one);\r\n $str .= '\"' . stripslashes($msgstr_one) . '\"' . \"\\n\";\r\n }\r\n $str .= \"\\n\";\r\n } else {\r\n $str = \"msgstr \\\"\" . stripslashes($val[$counter]) . \"\\\"\\n\\n\";\r\n }\r\n fwrite($fh, $str);\r\n\t\t\t\t\t// increase counter\r\n $counter++;\r\n }\r\n fclose($fh);\r\n // Open the file to get existing content\r\n $content = file_get_contents($myFile);\r\n // Directory of each language\r\n\t\t\t\t\r\n $oldFile = $_POST['dir_' . $key] . $_POST['file'];\r\n\t\t\t\t$org_file = $_POST['last_modified'];\r\n\t\t\t\t$before_save = filemtime($oldFile);\r\n\t\t\t\tif ($org_file != $before_save)\r\n\t\t\t\t\t$overwrite = false;\r\n\t\t\t\tif (!$overwrite)\r\n\t\t\t\t\t$oldFile = $_POST['dir_' . $key] . $modified . \"-\" .$_POST['file'];\r\n // Write the contents to main file and checks if success\r\n if (file_put_contents($oldFile, $content) == false) {\r\n\t\t\t\t\t$error = \"<h2>File '\" . $_POST['file'] . \"' has <b>not</b> been saved!</h2>\\n\";\r\n } else {\r\n\t\t\t\t\tif (!$overwrite)\r\n\t\t\t\t\t\t$error = \"<h1>File '\" . $_POST['file'] . \"' has been saved as '\".$modified . \"-\" .$_POST['file'].\"'!</h1>\\n<h2>That means that someone else has modified file before you!</h1>\";\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$error = \"<h1>File '\" . $_POST['file'] . \"' has been saved!</h1>\\n\"; \r\n\t\t\t\t}\r\n\t\t\t\t// Delets temporary file\r\n unlink($myFile);\r\n }\r\n\t\t\t\r\n }\r\n}", "title": "" }, { "docid": "41e8757cc5cd26ed9b2368db0f127c5c", "score": "0.49957725", "text": "public function savefile(){\n\n $themeid = (int) requested('themeid');\n $contents = requested('filecontents');\n $file = requested('filepath');\n\n $theme = \\Theme::find($themeid);\n\n if(is_null($theme)){\n return \\Redirect::to('themes/manage')->withMessage($this->notifyView(t('messages.theme_not_found')));\n }\n\n $bytes_written = File::put($file, $contents);\n if ($bytes_written === false){\n return \\Redirect::back()->withMessage($this->notifyView(t('messages.cannot_write_to_file')));\n }else{\n return \\Redirect::back()->withMessage($this->notifyView(t('messages.file_saved')));\n }\n }", "title": "" }, { "docid": "41df1cdc6563d3555e54d4e40d7e3421", "score": "0.49865443", "text": "public function store(Request $request)\n {\n $requestData = $request->all();\n // save file\n if($request->hasFile('file_attach')) {\n $file = $request->file('file_attach');\n $name_file = time().'-'.$file->getClientOriginalName();\n $path = $request->file('file_attach')->storeAs('public/contacts',$name_file,'local');\n }\n if(!empty($path)) {\n $requestData['file_attach'] = $path;\n }\n // remove token\n unset($requestData['_token']);\n Contact::create($requestData);\n // Send mail admin\n // Get List User Admin\n $users = Role::find(1)->users()->get();\n foreach ($users as $user) {\n $this->sendMail($user->email,'New Contact - '. $requestData['title'],$requestData['message']);\n }\n Session::flash('flash_message', trans('Thank you, we will contact you soon'));\n return redirect('contact-us');\n\n }", "title": "" }, { "docid": "48320ddf429264c5c74ad473a3ec561c", "score": "0.49823245", "text": "protected function store()\n {\n \n //If needed, create a unique form ID.\n if(!isset($this->form_id))\n {\n \n do{\n $this->form_id = mk('Security')->random_string(20);\n }\n \n while(\n mk('Data')->session->mail_forms->{$this->form_id}->is_set()\n );\n \n }\n \n //Store data.\n mk('Data')->session->mail_forms->{$this->form_id}->merge(array(\n 'subject' => $this->subject,\n 'recipient' => $this->recipient,\n 'fields' => $this->fields,\n 'sender' => $this->sender\n ));\n \n }", "title": "" }, { "docid": "a35723ba29233865677a745047d276aa", "score": "0.4978778", "text": "public function GuardarEnArchivo()\n {\n $archivo = fopen(\"archivo/materias.txt\", \"a\");\n fwrite($archivo, $this->ToString() . \"\\r\\n\");\n fclose($archivo);\n }", "title": "" }, { "docid": "3c549066fc70e61b1b0547bf5f08bcd3", "score": "0.49620348", "text": "public static function sendFileNew($from, $to, $subject, $message, $filename, $filepath)\n {\n require 'PHPMailer/PHPMailerAutoload.php';\n\n if (Yii::app()->config->get('SEND_MAIL')) {\n\n $email = new PHPMailer();\n\n $email->From = $from;\n $email->FromName = $from;\n $email->Subject = $subject;\n $email->Body = $message;\n $email->IsHTML(true);\n $email->AddAddress( $to );\n $email->AddAttachment( $filepath , $filename );\n\n return $email->Send();\n\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "68165c7df1823f567d0fad5708caf2e6", "score": "0.4957196", "text": "protected function store(): void\n {\n // здесь сохраняем данные в файл\n // логика предопределена в абстракции, но может быть переписана в потомке\n }", "title": "" }, { "docid": "9e9ca25fcbecb7410f11ac33d0fc7e89", "score": "0.49534893", "text": "public function saveAndSendEmail()\n {\n $this->waitForElementVisible($this->dropdownButton);\n $this->_rootElement->find($this->dropdownButton)->click();\n $this->_rootElement->find($this->saveAndSendEmailButton)->click();\n $this->waitForElementNotVisible('.popup popup-loading');\n $this->waitForElementNotVisible('.loader');\n }", "title": "" }, { "docid": "2b97e04eda0f882cb8024bc4088ee2ec", "score": "0.49508727", "text": "function saveForm($filename)\n {\n file_put_contents($filename,$this->html);\n }", "title": "" }, { "docid": "97657c63ddd21257bb75fe2ae41844c2", "score": "0.49497047", "text": "function writeToDisk() {\r\n\r\n\t\tif (file_exists($this->_filePath)) {\r\n\t\t\tunlink($filePath);\r\n\t\t}\r\n\t\t$fileHandler = fopen ($this->_filePath, \"w\");\r\n\t\tfwrite ($fileHandler, $this->_buffer);\r\n\t\tfclose ($fileHandler);\r\n\t}", "title": "" }, { "docid": "9e8fb4084bc691f176340a7f131e7f86", "score": "0.49484602", "text": "function writeOnFile($data){\r\n $fo = fopen('../../private/users.txt', 'a+') or die('users File Not found!!');\r\n fwrite($fo, $data.\"\\r\\n\");\r\n fclose($fo);\r\n }", "title": "" }, { "docid": "97e04af6abacbec402d127277e32d9b8", "score": "0.4937315", "text": "public function storeEmail($receiver,$subject, $message,$from,$bijlageArray,$cc,$emailid,$userid)\n\t{\n\t\trequire('controllers/database.php');\n\n\t\tif (!filter_var($receiver, FILTER_VALIDATE_EMAIL)) {\n\t\t\tmakesafe($_SESSION['email_sent'] = 'email wrong');\n\t\t} else {\n\t\t\t\n\t\t\tif(empty($subject)) {\n\t\t\t\t$subject = \"(no subject)\";\n\t\t\t}\n\n\t\t\t$timestamp = time();\n\t\t\t$from = \"\";\n\t\t\t$cc = \"\";\n\t\t\t$stylesheet = \"\";\n\n\t\t\t$st = $db->prepare(\"INSERT INTO inbox(subject, message, receiver, date, user_id, email_id, bcc, cc, priority) VALUES(:subject, :message, :receiver, :stamp, :user_id, :email_id, :bcc, :cc, :priority)\");\n\t\t\t$st->execute(array(\n\t\t\t\t':subject' => $subject, \n\t\t\t\t':message' => $message, \n\t\t\t\t':receiver' => $receiver, \n\t\t\t\t':stamp' => $timestamp, \n\t\t\t\t':user_id' => $userid,\n\t\t\t\t':email_id' => $userid,\n\t\t\t\t':bcc' => \"\",\n\t\t\t\t':cc' => $cc,\n\t\t\t\t':priority' => \"\"\n\t\t\t\t));\n\n\t\t\techo sendmailController::sendsmtp($receiver,$subject,$message,$from,$bijlageArray,$cc, $cc, $userid, $emailid);\n\n\t\t\tmakesafe($_SESSION['email_sent'] = 'success');\n\t\t}\n\n\t}", "title": "" }, { "docid": "12859ccbacb48afa3fcbc029e158a334", "score": "0.49334997", "text": "function file_attachment($email, $firstname, $lastname, $state, $fileDL, $fileSSN){\r\n \r\n //$fileDlAttachment = $fileDL['tmp_name'];\r\n //$fileSSNAttachment = $fileSSN['tmp_name'];\r\n \r\n ////file_name_new = $convo_user_data[\"lastname\"] . ' ' . $convo_user_data[\"firstname\"] . '.' . $file_ext;\r\n\r\n ////$file_destination = $root . '/convo/Admin/upload_oe/' . $file_name_new;\r\n ////move_uploaded_file($fileDlAttachment, $fileDL['tmp_name']\r\n \r\n \r\n /* $uploads_dir = '/uploads';\r\n foreach ($_FILES[\"pictures\"][\"error\"] as $key => $error) {\r\n if ($error == UPLOAD_ERR_OK) {\r\n $tmp_name = $_FILES[\"pictures\"][\"tmp_name\"][$key];\r\n $name = $_FILES[\"pictures\"][\"name\"][$key];\r\n move_uploaded_file($tmp_name, \"$uploads_dir/$name\");\r\n }\r\n } */\r\n \r\n \r\n //try{\r\n // $mail = new PHPMailer;\r\n\r\n // $mail->SMTPAuth = true;\r\n // //$mail->IsSMTP();\r\n // $mail->Host = 'stmp.gmail.com';\r\n // $mail->Username = '[email protected]';\r\n // $mail->Password = 'ConvoPortal#1!';\r\n // $mail->STMPSecure = 'ssl';\r\n // $mail->Port = 465;\r\n\r\n // $mail->From = '[email protected]';\r\n // $mail->FromName = 'Convo Portal';\r\n // $mail->AddReplyTo($SupervisorCOOPEmail, $SupervisorName);\r\n // $mail->AddCC($COOP1Email, $COOP1Name);\r\n // /* $mail->AddCC($COOP2Email, $COOP2Name); */\r\n // $mail->AddCC($SupervisorCOOPEmail, $SupervisorName);\r\n\r\n // $mail->AddAttachment($fileDlAttachment, $lastname . \"_\" . $fileDL['name']);\r\n // $mail->AddAttachment($fileSSNAttachment, $lastname . \"_\" . $fileSSN['name']);\r\n\r\n $subject = $firstname . \" \" . $lastname . \" - \" . $state;\r\n $message = $firstname . \" \" . $lastname . \" - \" . $state;\r\n $bodyMessage = $firstname . \" \" . $lastname . \" - \" . $state;\r\n $attachments = array(\"lastname\"=>$lastname,\"DL\"=>$fileDL, \"SSN\"=>$fileSSN);\r\n sendEmail($email, $subject, $message, $bodyMessage, $attachments);\r\n // $mail->send();\r\n // echo 'Message has been sent.';\r\n \r\n //}\r\n //catch(phpmailerException $e){\r\n // echo $e -> errorMessage();\r\n // //echo $fileDlAttachment;\r\n //}\r\n }", "title": "" }, { "docid": "124640b54d9808d435984a399cfda18e", "score": "0.4924729", "text": "public function send(Email $mail): void;", "title": "" }, { "docid": "b482bdde85fe7c703d878d99557ad98f", "score": "0.49192852", "text": "static function store( $p_recipient, $p_subject, $p_message, array $p_headers = null ) {\n\t\tglobal $g_email_stored;\n\t\n\t\t$t_recipient = trim( $p_recipient );\n\t\t$t_subject = \\Core\\String::email( trim( $p_subject ) );\n\t\t$t_message = \\Core\\String::email_links( trim( $p_message ) );\n\t\n\t\t# short-circuit if no recipient is defined, or email disabled\n\t\t# note that this may cause signup messages not to be sent\n\t\tif( \\Core\\Utility::is_blank( $p_recipient ) || ( OFF == \\Core\\Config::mantis_get( 'enable_email_notification' ) ) ) {\n\t\t\treturn null;\n\t\t}\n\t\n\t\t$t_email_data = new \\Core\\Email\\Data;\n\t\n\t\t$t_email_data->email = $t_recipient;\n\t\t$t_email_data->subject = $t_subject;\n\t\t$t_email_data->body = $t_message;\n\t\t$t_email_data->metadata = array();\n\t\t$t_email_data->metadata['headers'] = $p_headers === null ? array() : $p_headers;\n\t\t$t_email_data->metadata['priority'] = \\Core\\Config::mantis_get( 'mail_priority' );\n\t\n\t\t# Urgent = 1, Not Urgent = 5, Disable = 0\n\t\t$t_email_data->metadata['charset'] = 'utf-8';\n\t\n\t\t$t_hostname = '';\n\t\tif( isset( $_SERVER['SERVER_NAME'] ) ) {\n\t\t\t$t_hostname = $_SERVER['SERVER_NAME'];\n\t\t} else {\n\t\t\t$t_address = explode( '@', \\Core\\Config::mantis_get( 'from_email' ) );\n\t\t\tif( isset( $t_address[1] ) ) {\n\t\t\t\t$t_hostname = $t_address[1];\n\t\t\t}\n\t\t}\n\t\t$t_email_data->metadata['hostname'] = $t_hostname;\n\t\n\t\t$t_email_id = \\Core\\Email\\Queue::add( $t_email_data );\n\t\n\t\t$g_email_stored = true;\n\t\n\t\treturn $t_email_id;\n\t}", "title": "" }, { "docid": "ba56115ff28973c04107f3ef0006804b", "score": "0.4918428", "text": "public static function mail($to, $from, $title, $message, $file=null) {\n list($to, $from, $title, $message, $file) = Hook::call('mail', [$to, $from, $title, $message, $file]);\n $to = (array) $to;\n\n $bnd = uniqid();\n $headers = \"From: $from\\r\\n\";\n $headers.= \"Reply-To: $to[0]\\r\\n\";\n $headers.= \"MIME-Version: 1.0\\r\\n\";\n if (count($to) > 1) {\n $headers .= sprintf(\"CC: %s\\r\\n\", implode(', ', array_slice($to, 1)));\n }\n $headers.= \"Content-Type: multipart/mixed; boundary=$bnd\\r\\n\\r\\n\";\n\n $sep = \"--$bnd\\r\\n\";\n $end = \"--$bnd--\";\n\n $body = $sep;\n $body.= \"Content-Type: text/html; charset=utf-8\\r\\n\";\n $body.= \"Content-Transfer-Encoding: 8bit\\r\\n\";\n $body.= \"\\r\\n$message\\r\\n\\r\\n\";\n\n if(!is_null($file)) {\n $body.= $sep;\n $body.= \"Content-Type: application/octet-stream; name=\\\"report.pdf\\\"\\r\\n\";\n $body.= \"Content-Transfer-Encoding: base64\\r\\n\";\n $body.= \"Content-Disposition: attachment\\r\\n\";\n $body.= \"\\r\\n\" . chunk_split(base64_encode($file)) . \"\\r\\n\\r\\n\";\n }\n $body.= $end;\n\n mail(\n $to[0],\n sprintf('[%s] %s', Util::getSiteName(), $title),\n $body,\n $headers\n );\n }", "title": "" }, { "docid": "d305ec76f80090e77636615d4a2bdc1e", "score": "0.49155468", "text": "public function sendMail()\n {\n\n $this->mpdf->Output($this->filename, \\Mpdf\\Output\\Destination::FILE); //cria um arquivo PDF\n\n $toAdress = '*******';\n $toName = 'Elder Sam';\n $subject = 'TESTE envio de PDF por e-mail';\n $html = 'Olá, estou enviando um arquivo PDF (teste) gerado a partir da biblioteca MPDF';\n $mail = new Mailer($toAdress, $toName, $subject, $html, $this->filename);\n\n if ($mail->send()) { //envia o email, e verifica se retornou sucesso\n\n $message = \"<br>Email enviado com <strong style='color: green;'>sucesso ;)</strong>\";\n } else {\n $error = $mail->getErrorInfo();\n $message = \"<br>Ops, algo deu errado<br>\n <strong style='color: red;'> $error :(</strong>\";\n }\n\n echo $message;\n echo \"<br><a href='index.php'><- Voltar</a>\";\n\n unlink($this->filename); //apaga o arquivo do Servidor\n\n }", "title": "" }, { "docid": "c53d902f80a68b487421f1ec2dcc25e6", "score": "0.49136102", "text": "function attachFile($path)\n\t\t{\n\t\t\t$this->attachments[] = $path;\n\t\t}", "title": "" }, { "docid": "7eff011d52abf5b3fe277433cae84252", "score": "0.49023148", "text": "protected function saved()\r\n\t{\r\n\t\t// Send notifications if set - notify is not a field so it is just a temp buf\r\n\t\tif ($this->getValue(\"notify\"))\r\n\t\t{\r\n\t\t\t$to = explode(\",\", $this->getValue(\"notify\"));\r\n\t\t\t$this->sendNotifications($to);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "4144946b3ea738089fea53d009548a98", "score": "0.48885664", "text": "public function saveFile($file, $contentId);", "title": "" }, { "docid": "bc3958996241977326652f72b0280efe", "score": "0.48860818", "text": "function newmail_sav_function() {\n global $data_dir, $username, $_FILES, $newmail_uploadsounds;\n\n if ( sqgetGlobalVar('submit_newmail', $submit, SQ_POST) ) {\n $media_enable = '';\n $media_popup = '';\n $media_recent = '';\n $media_changetitle = '';\n $media_sel = '';\n $popup_width = '';\n $popup_height = '';\n\n sqgetGlobalVar('media_enable', $media_enable, SQ_POST);\n sqgetGlobalVar('media_popup', $media_popup, SQ_POST);\n sqgetGlobalVar('media_recent', $media_recent, SQ_POST);\n sqgetGlobalVar('media_changetitle', $media_changetitle, SQ_POST);\n sqgetGlobalVar('popup_width', $popup_width, SQ_POST);\n sqgetGlobalVar('popup_height', $popup_height, SQ_POST);\n\n // sanitize height and width\n $popup_width = (int) $popup_width;\n if ($popup_width<=0) $popup_width=200;\n $popup_height = (int) $popup_height;\n if ($popup_height<=0) $popup_height=130;\n\n setPref($data_dir,$username,'newmail_enable',$media_enable);\n setPref($data_dir,$username,'newmail_popup', $media_popup);\n setPref($data_dir,$username,'newmail_recent',$media_recent);\n setPref($data_dir,$username,'newmail_changetitle',$media_changetitle);\n setPref($data_dir,$username,'newmail_popup_width',$popup_width);\n setPref($data_dir,$username,'newmail_popup_height',$popup_height);\n\n if (sqgetGlobalVar('newmail_unseen_notify', $newmail_unseen_notify, SQ_POST)) {\n $newmail_unseen_notify = (int) $newmail_unseen_notify;\n setPref($data_dir,$username,'newmail_unseen_notify',$newmail_unseen_notify);\n }\n\n if( sqgetGlobalVar('media_sel', $media_sel, SQ_POST) &&\n $media_sel == '(none)' ) {\n removePref($data_dir,$username,'newmail_media');\n } else {\n setPref($data_dir,$username,'newmail_media',$media_sel);\n }\n\n // process uploaded file\n if ($newmail_uploadsounds && isset($_FILES['media_file']['tmp_name']) && $_FILES['media_file']['tmp_name']!='') {\n // set temp file and get media file name\n $newmail_tempmedia=getHashedDir($username, $data_dir) . \"/$username.tempsound\";\n $newmail_mediafile=getHashedFile($username, $data_dir, $username . '.sound');\n if (move_uploaded_file($_FILES['media_file']['tmp_name'], $newmail_tempmedia)) {\n // new media file is in $newmail_tempmedia\n if (file_exists($newmail_mediafile)) unlink($newmail_mediafile);\n if (! rename($newmail_tempmedia,$newmail_mediafile)) {\n // remove (userfile), if file rename fails\n removePref($data_dir,$username,'newmail_media');\n } else {\n // store media type\n if (isset($_FILES['media_file']['type']) && isset($_FILES['media_file']['name'])) {\n setPref($data_dir,$username,'newmail_userfile_type',\n newmail_get_mediatype($_FILES['media_file']['type'],$_FILES['media_file']['name']));\n } else {\n removePref($data_dir,$username,'newmail_userfile_type');\n }\n // store file name\n if (isset($_FILES['media_file']['name'])) {\n setPref($data_dir,$username,'newmail_userfile_name',basename($_FILES['media_file']['name']));\n } else {\n setPref($data_dir,$username,'newmail_userfile_name','mediafile.unknown');\n }\n }\n }\n }\n }\n}", "title": "" }, { "docid": "11d367a78ae847909c39c2dee9d6de87", "score": "0.48857048", "text": "public function store(Request $request)\n {\n $value = new TeacherMessage;\n $value->name = $request->name;\n $value->designation = $request->designation;\n $value->department = $request->department;\n $value->university = $request->university;\n $value->message = $request->msg;\n\n if ($request->hasFile('file')){\n $photo = $request->file->getClientOriginalName();\n// $photo_path = $request->file->path();;\n $request->file->storeAs('public/teacher',$photo);\n $value->file = $photo;\n// $value->photo_path = $photo_path;\n }\n $value->save();\n return back()->with('success','You have successfully add your new message');\n }", "title": "" }, { "docid": "ed1be6b853ea63c99d5fa64755816089", "score": "0.48856986", "text": "public function save_file()\n {\n //Encode the data array into a text string\n $this->save_data = json_encode($this->working_data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);\n //Save the text string to the database file\n file_put_contents($this->filename, $this->save_data);\n }", "title": "" }, { "docid": "3022fce5fcf3416582881734ab13544b", "score": "0.48772973", "text": "protected function store()\n\t{\n\t\t// open the file\n\t\tif ($handle = @fopen($this->file, 'c'))\n\t\t{\n\t\t\t// lock the file, and truncate it\n\t\t\tflock($handle, LOCK_EX);\n\t\t\tftruncate($handle, 0);\n\n\t\t\t// write the data as a PHP array\n\t\t\tfwrite($handle, '<?php'.PHP_EOL.'return '.var_export($this->data, true).';'.PHP_EOL);\n\n\t\t\t// release the lock, and close it\n\t\t\tflock($handle, LOCK_UN);\n\t\t\tfclose($handle);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new AuthException('Can not open \"'.$this->file.'\" for write');\n\t\t}\n\t}", "title": "" }, { "docid": "ba4268192ffab167ec2221bea03284d2", "score": "0.48710555", "text": "public function logToFile($msg) { \n\t\t// open file\n\t\t$fd = fopen($this->filename, \"a\");\n\t\t\n\t\t// append message to date/time\n\t\t$str = \"[\" . date(\"Y/m/d h:i:s\", mktime()) . \"] \" . $msg;\n\t\t\n\t\t// write string\n\t\tfwrite($fd, $str . \"\\n\");\n\t\t\n\t\t// output the logged string if debug mode\n\t\tif ($this->DEBUG) fb($str);\n\t\t\n\t\t// close file\n\t\tfclose($fd);\n\t}", "title": "" }, { "docid": "d705926fee21afbbd94fad83c4535fc1", "score": "0.4870845", "text": "public static function sendFile($from, $to, $subject, $message, $filename, $filepath)\n {\n if (Yii::app()->config->get('SEND_MAIL')) {\n $boundary = \"---\";\n /* Headers */\n $headers = \"From: $from\\nReply-To: $from\\n\";\n $headers .= \"Content-Type: multipart/mixed; boundary=\\\"$boundary\\\"\";\n $body = \"--$boundary\\n\";\n /* Add text body */\n $body .= \"Content-type: text/html; charset='utf-8'\\n\";\n $body .= \"Content-Transfer-Encoding: quoted-printablenn\";\n $body .= \"Content-Disposition: attachment; filename==?utf-8?B?\".base64_encode($filename).\"?=\\n\\n\";\n $body .= $message.\"\\n\";\n $body .= \"--$boundary\\n\";\n $file = fopen($filepath, \"r\"); //Open file\n $text = fread($file, filesize($filepath)); //Read file\n fclose($file); //Close file\n /* Create body */\n $body .= \"Content-Type: application/octet-stream; name==?utf-8?B?\".base64_encode($filename).\"?=\\n\";\n $body .= \"Content-Transfer-Encoding: base64\\n\";\n $body .= \"Content-Disposition: attachment; filename==?utf-8?B?\".base64_encode($filename).\"?=\\n\\n\";\n $body .= chunk_split(base64_encode($text)).\"\\n\";\n $body .= \"--\".$boundary .\"--\\n\";\n return mail($to, $subject, $body, $headers); //Send mail\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "b6d04c254dd43c42e1ee19ed4bd6c76a", "score": "0.4868095", "text": "public function save_to_file( $content, $filename ){\n\t\tif ( trim($content) != '' && $filename != ''){ \n\t\t\t$content = stripslashes(trim($content)); \n\t\t\tif ( file_put_contents( $filename, $content ) ){\n\t\t\t\treturn TRUE; \n\t\t\t} else {\n\t\t\t\t$this->set_error( \"An error ocurred while trying to save the evidence to the File System. \", ERR_DB_EXEC, 3 );\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t} else { \n\t \t\t$this->set_error(\"Empty content. \", ERR_VAL_EMPTY);\n\t \t\treturn FALSE;\n\t \t}\n\t}", "title": "" }, { "docid": "a7b153a44516dbe3b2d1262c26cdece5", "score": "0.48625022", "text": "function _writeFile( $file_path, $content ){\r\n //\r\n\r\n $f = fopen( $file_path, 'w' );\r\n fputs( $f, $content );\r\n fclose( $f );\r\n }", "title": "" }, { "docid": "a2708ea299432547a01b319ccd59a24f", "score": "0.4855907", "text": "public static function store_file( $file )\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$full_filename = ROOT . $file;\r\n\t\t\t\r\n\t\t\t// Make sure it's a real file.\r\n\t\t\tif ( !is_file ( $full_filename ) )\r\n\t\t\t\treturn;\r\n\t\t\t\t\r\n\t\t\t// Prepend the file to our output buffer.\r\n\t\t\tself::$output_buffer .= file_get_contents( $full_filename );\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "df67b832bbe07ba067c37b53973a0769", "score": "0.4854845", "text": "function SendMailWithAttachment($from, $to, $subject = \"\", $message = \"\", $SMTPHost = \"\", $SMTPUsername = \"\", $SMTPPassword = \"\", $date) {\n\t$headers = array ('From' => $from,'To' => $to,'Subject' => $subject, 'Content-Type' => \"xml\", 'filename' => \"AppOnline.xml\");\n\t$smtp = Mail::factory('smtp', array ('host' => $SMTPHost, 'auth' => false, 'username' => $SMTPUsername, 'password' => $SMTPPassword));\n\t$mail = $smtp->send($to, $headers, $message);\n\t\n\tif (PEAR::isError($mail)) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n\n}", "title": "" }, { "docid": "8331f4a9637e3bd2734abd18756edf8c", "score": "0.4845523", "text": "public function store(Request $request)\n {\n if(!isset($request->isDraft)){ //if form does not send draft field, by default draft field contains value \"no\"\n $request->request->add(['isDraft' => 'no']);\n $request->validate($this->mail->getRules('no'),$this->mail->messages(),$this->mail->attributes());\n }else{\n $request->validate($this->mail->getRules(),$this->mail->messages(),$this->mail->attributes());\n }\n $data = $request->except('attachment');\n $data['sender_id'] = auth()->user()->email;\n $this->mail->fill($data);\n $status = $this->mail->save();\n if($status){\n $data['mail_id'] = $this->mail->id;\n if($request->attachment && $request->isDraft == 'no'){ // mail is not draft and it contains attachment(s)\n $request->validate(['attachment.*'=> ['sometimes','file','max:32000']]);\n $dir = date('YmdHis');\n foreach ($request->attachment as $files) {\n $data['attachment'] = uploadAttachment($files,$dir);\n $attachment = new Attachment();\n $attachment->fill($data);\n $attachment->save();\n }\n }\n if($request->isDraft == 'no'){ // if mail is not draft\n\n // saving mail into outbox\n $data['user_id'] = auth()->user()->id;//for outbox, user_id contains sender's id for user\n $this->outbox->fill($data);\n $this->outbox->save();\n\n // saving mail into inbox\n $user_info = $this->user->where('email',$this->mail->receiver_id)->first();\n $data['user_id'] = $user_info->id;// for inbox, user_id contains receiver's id for user\n $this->inbox->fill($data);\n $inbox_status = $this->inbox->save();\n if($inbox_status){\n $to_notification = $this->user->where('email',$this->mail->receiver_id)->first();\n Notification::send($to_notification,new InboxNotification($this->mail,$this->inbox->id));\n }\n }else{ // if mail is draft\n // saving mail into draft\n $data['user_id'] = auth()->user()->id;// for draft, user_id contains sender's id for user\n $this->draft->fill($data);\n $this->draft->save();\n }\n if($request->isDraft == 'no'){\n request()->session()->flash('success','Email sent successfully.');\n }else{\n request()->session()->flash('success','Draft saved successfully.');\n }\n return redirect()->back();\n }else{\n if($request->isDraft == 'no'){\n request()->session()->flash('error','Sorry!, error while sending email.');\n }else{\n request()->session()->flash('error','Sorry!, error while saving draft.');\n }\n return redirect()->back();\n }\n }", "title": "" }, { "docid": "764972bf9619b5ffa12ec04c09cb2ef7", "score": "0.48391587", "text": "function mail_attachment($filename, $path, $mailto, $from_mail, $from_name, $replyto, $subject, $message) {\n\t $file = $path.$filename;\n\t $file_size = filesize($file);\n\t $handle = fopen($file, \"r\");\n\t $content = fread($handle, $file_size);\n\t fclose($handle);\n\t $content = chunk_split(base64_encode($content));\n\t $uid = md5(uniqid(time()));\n\t $name = basename($file);\n\t $header = \"From: \".$from_name.\" <\".$from_mail.\">\\r\\n\";\n\t $header .= \"Reply-To: \".$replyto.\"\\r\\n\";\n\t $header .= \"MIME-Version: 1.0\\r\\n\";\n\t $header .= \"Content-Type: multipart/mixed; boundary=\\\"\".$uid.\"\\\"\\r\\n\\r\\n\";\n\t $header .= \"This is a multi-part message in MIME format.\\r\\n\";\n\t $header .= \"--\".$uid.\"\\r\\n\";\n\t $header .= \"Content-type:text/plain; charset=iso-8859-1\\r\\n\";\n\t $header .= \"Content-Transfer-Encoding: 7bit\\r\\n\\r\\n\";\n\t $header .= $message.\"\\r\\n\\r\\n\";\n\t $header .= \"--\".$uid.\"\\r\\n\";\n\t $header .= \"Content-Type: application/octet-stream; name=\\\"\".$filename.\"\\\"\\r\\n\"; // use different content types here\n\t $header .= \"Content-Transfer-Encoding: base64\\r\\n\";\n\t $header .= \"Content-Disposition: attachment; filename=\\\"\".$filename.\"\\\"\\r\\n\\r\\n\";\n\t $header .= $content.\"\\r\\n\\r\\n\";\n\t $header .= \"--\".$uid.\"--\";\n\t if (mail($mailto, $subject, \"\", $header)) {\n\t echo \"mail send ... OK\"; // or use booleans here\n\t } else {\n\t echo \"mail send ... ERROR!\";\n\t }\n\t}", "title": "" }, { "docid": "7f755052d0549534cefb2ab0d236010a", "score": "0.483517", "text": "function setEmailTo( $user, $emailto )\n\t{\n\t\tif( $emailto )\n\t\t{\n\t\t\tif($err = $this->validate('email', $emailto))\n\t\t\t{\n\t\t\t\treturn $this->raiseError( $err );\n\t\t\t}\n\t\t}\n\t\t// this reads in the email line, among other things\n\t\t$this->getEntries( $user, true );\n\n\t\t$this->emailTo[$user] = $emailto;\n\n\t\treturn $this->saveCrontab( $user );\n\t}", "title": "" }, { "docid": "6b42bff6e5bb66ee35692a952943ee76", "score": "0.48344532", "text": "public function store(Request $request)\n {\n $data = $request->all();\n $request->validate([\n 'name' => ['required', 'string'], \n 'file' => ['required'], \n ]); \n $subject = Subjects::find($data['subject']); \n $semester = Semester::find($subject->sem_id);\n $file = $request->file('file');\n $fileName = time().'.'.$data['file']->getClientOriginalExtension();\n $file->move('files/', $fileName);\n\n Notes::create([\n 'name' => $data['name'],\n 'file' => 'files/'.$fileName, \n 'subId' => $data['subject'],\n 'semId' => $semester->id,\n 'staffId' => Auth::user()->id\n ]);\n return Redirect::route('notes.index')->with('message', 'Notes Added Succesfully');\n }", "title": "" }, { "docid": "4ba5401b4dcc45c5b182b5dee3e55d18", "score": "0.48333725", "text": "public function writeToFile($fileName, $data)\n {\n Storage::disk('trivago')->put($fileName, $data);\n }", "title": "" }, { "docid": "8cce4685b888e6154cee143792b228ba", "score": "0.48280698", "text": "function FileAttach($file, $dispo = \"attachment\") {\n if (!$this->valid_mail_adresses) return;\n $file_str = $this->get_file_data($file);\n if ($file_str == \"\") {\n return;\n } else {\n $filename = basename($file);\n $file_type = 'application/jpg';\n $chunks = chunk_split(base64_encode($file_str));\n $mail_part = \"--\".$this->uid.LIBR;\n $mail_part .= \"Content-type:\".$file_type.\";\".LIBR.chr(9).\" name=\\\"\".$filename.\"\\\"\".LIBR;\n $mail_part .= \"Content-Transfer-Encoding: base64\".LIBR;\n $mail_part .= \"Content-Disposition: \".$dispo.\";\".chr(9).\"filename=\\\"\".$filename.\"\\\"\".LIBR.LIBR;\n $mail_part .= $chunks;\n $mail_part .= LIBR.LIBR;\n $this->att_files[] = $mail_part;\n } \n }", "title": "" }, { "docid": "fa6418e1e6304376d7a6533da3a41090", "score": "0.48274982", "text": "public function save()\n {\n $text = $this->getText();\n //die($text);\n //atribuindo um nome do arquivo\n if ($this->getFilename() == '') {\n $this->setFilename('CB' . date('dm') . 'A1');\n }\n\n file_put_contents($this->getFilename() . '.REM', $text);\n }", "title": "" }, { "docid": "f083767f7c407202eb2647603d736589", "score": "0.4826961", "text": "public function store($data = false, $file = false)\n {\n $path = $this->saveFile($file);\n\n if (!$path) {\n return false;\n }\n $insert = $this->processData($data);\n $insert['created_at'] = Carbon::now()->toDateTimeString();\n }", "title": "" }, { "docid": "74c2c364853bbe418dde17fa32fa7acf", "score": "0.48224485", "text": "private function saveFile() {\n $result = \"\";\n if((file_exists($this->htpasswdFile) && is_writeable($this->htpasswdFile)) || !file_exists($this->htpasswdFile)) {\n foreach ($this->getUsers() as $username => $password) {\n $result .= $username . \":\" . $password . \"\\r\\n\";\n }\n file_put_contents($this->htpasswdFile, $result);\n } else {\n $this->addMessage(_(\"File is not writeable\"), HtpasswdGenerator::MESSAGE_ERROR);\n }\n }", "title": "" }, { "docid": "208b468d754cbaacebcaf3d24b4224ca", "score": "0.48202872", "text": "public function create(Mail $mail)\n {\n //\n }", "title": "" }, { "docid": "3cbcfdb3948a7044f8908a3ae3a0309f", "score": "0.48179418", "text": "public function storeAndAttachFile(File $file, AttachableObjectInterface $object, $fieldName = null, $deleteAfterCopy = null, $customFilename = null);", "title": "" }, { "docid": "4523c2f45bfb7dc808dc3702f6ca1e68", "score": "0.48143506", "text": "public function saveReport($path);", "title": "" }, { "docid": "b2bfad1e54e804867675e2602451fc8d", "score": "0.48060572", "text": "private function _add_email_settings( $settings )\n\t{\n\t\t$email_file = @file('application/config/email.template.php');\n\t\t$handle = @fopen('application/config/email.php', 'w');\n\n\t\tif(is_array($email_file) ) {\n\t\t\tforeach( $email_file as $number_line => $line )\n\t\t\t{\n\n\t\t\t\tswitch( $line ) {\n\t\t\t\t\tcase strpos($line,\"\\$config['username']\"):\n\t\t\t\t\t\tfwrite($handle,\t str_replace(\"\\$config['username'] = \\\"\\\"\",\"\\$config['username'] = \".'\"'.$settings->email_username.'\"',$line ));\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase strpos($line,\"\\$config['password']\"):\n\t\t\t\t\t\tfwrite($handle,\t str_replace(\"\\$config['password'] = \\\"\\\"\",\"\\$config['password'] = \".'\"'.$settings->email_password.'\"',$line ));\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase strpos($line,\"\\$config['port']\"):\n\t\t\t\t\t\tfwrite($handle,\t str_replace(\"\\$config['port'] = 25\",\"\\$config['port'] = \".'\"'.$settings->email_port.'\"',$line ));\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase strpos($line,\"\\$config['server']\"):\n\t\t\t\t\t\tfwrite($handle,\t str_replace(\"\\$config['server'] = \\\"\\\"\",\"\\$config['server'] = \".'\"'.$settings->email_host.'\"',$line ));\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase strpos($line,\"\\$config['servertype']\"):\n\t\t\t\t\t\tfwrite($handle,\t str_replace(\"\\$config['servertype'] = \\\"pop3\\\"\",\"\\$config['servertype'] = \".'\"'.$settings->email_servertype.'\"',$line ));\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase strpos($line,\"\\$config['ssl']\"):\n\t\t\t\t\t\t$enable = $settings->email_ssl == 0? 'false':'true';\n\t\t\t\t\t\tfwrite($handle,\t str_replace(\"\\$config['ssl'] = false\",\"\\$config['ssl'] = \".$enable,$line ));\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tfwrite($handle, $line );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "55485ea599896d1c155edcae4533cd4b", "score": "0.48060036", "text": "public function sendMail(Mail $mail) {\n\t\tif ($this->log === null) {\n\t\t\t$this->log = new File(MAIL_DEBUG_LOGFILE_PATH.'mail.log', 'ab');\n\t\t}\n\t\t\n\t\t$this->log->write($this->printMail($mail));\n\t}", "title": "" }, { "docid": "2c400a50d13c43acae19e67788349d80", "score": "0.48009598", "text": "public function write(string $filename, $content);", "title": "" }, { "docid": "ae9e29eca2c3336682f8b39120aa65fc", "score": "0.47883257", "text": "public function store($path, &$data) {\n $ssh = $this->getSshSession();\n $sftp = ssh2_sftp($ssh);\n\n $sftpStream = @fopen('ssh2.sftp://' . $sftp . $path, 'wb');\n\n if (!$sftpStream) {\n throw new Exception(\"Could not open remote file: $path\");\n }\n\n if (@fwrite($sftpStream, $data) === false) {\n throw new Exception(\"Could not store {$path} by SFTP on \" . $this->getEnvironment());\n }\n\n fclose($sftpStream);\n return true;\n }", "title": "" }, { "docid": "8d4a7a9d935d5261c9357ce7b77d5404", "score": "0.47880954", "text": "function file_put_contents($file, $text) {\n\t$fp = fopen($file, \"w\");\n\tfwrite($fp, $text);\n\tfclose($fp);\n }", "title": "" }, { "docid": "345138229e58fbc673a196c87f90887d", "score": "0.4781785", "text": "public function store(PostuleRequest $request)\n {\n $user = Auth::user();\n\n if($request->file(\"mon_cv\")){\n\n $path = $request->file('mon_cv')->store('cvs');\n\n $postule = $user->postules()->create([\n \"CV\" => $path,\n \"lettre_de_motivation\" => $request->lettre_de_motivation,\n \"offre_id\" => $request->offre_id\n ]);\n\n event(new SendMailsEvent($postule, $user));\n\n return back()->withSuccess(\"Votre candidature à été bien enregistré !\");\n }\n }", "title": "" }, { "docid": "495f82425894b47903048cb2b3a88482", "score": "0.4775664", "text": "public function save_mail( $data ) {\n\t\t$this->db->set( $data );\n\t\t$this->db->insert( 'mail' );\n\n\t\treturn ( $this->db->affected_rows() > 0 );\n\t}", "title": "" }, { "docid": "7b3737bb876f8bdd68b1b1a79c38fdcd", "score": "0.47735864", "text": "public function store(ForgotPasswordRequest $request, Mailer $mail)\n {\n $user = $this->user->forEmail($request->input('email'));\n\n $mail->send(new SendUser(\n $user, $this->token->create(array_merge($user->toArray(), ['user_id' => $user->id]))\n ));\n\n return redirect()->back()->withSuccess('Dentro de instantes, você receberá um email com instruções de como criar uma nova senha.');\n }", "title": "" }, { "docid": "20603a3fddee279ef15437a5dfd97723", "score": "0.47722226", "text": "public function save( $filename = null, $mimetype = null );", "title": "" }, { "docid": "a3af808b2ec69e372a4c47d49c9c9f85", "score": "0.47711682", "text": "public function save(string $file_path)\n {\n }", "title": "" }, { "docid": "b7a024c93a59621275b5c230dc7057df", "score": "0.4764768", "text": "public function saveFileName($filemame)\n {\n $this->file = $filemame;\n $this->save();\n }", "title": "" }, { "docid": "30ee961537287142b7ae48b9de19973a", "score": "0.47607282", "text": "protected function writeToDisk()\n {\n $fullPath = $this->bag->makeAbsolute($this->filename);\n if (file_exists($fullPath)) {\n unlink($fullPath);\n }\n $fp = fopen(addslashes($fullPath), \"w\");\n if ($fp === false) {\n throw new BagItException(\"Unable to write {$fullPath}\");\n }\n foreach ($this->hashes as $path => $hash) {\n $line = \"{$hash} {$path}\" . PHP_EOL;\n $line = $this->bag->encodeText($line);\n fwrite($fp, $line);\n }\n fclose($fp);\n }", "title": "" } ]
55075f5bed09f111cab9132f07a32293
Add extra markup in the toolbars before or after the list
[ { "docid": "d389c71a9f876327bcfa0266c94f3547", "score": "0.0", "text": "function extra_tablenav( $which ) {\r\n\t\tif ( $which == \"top\" ){\r\n\t\t\t//The code that goes before the table is here\r\n\t\t\techo\"Tracking Logs\";\r\n\t\t}\r\n\t}", "title": "" } ]
[ { "docid": "6c2b4b08f015c5f2095e4d75cb386318", "score": "0.63606495", "text": "protected function _renderListOpening()\n {\n return '<ul>';\n }", "title": "" }, { "docid": "3cc8c0a29fa6738e4adc40bdf67e9b1d", "score": "0.621914", "text": "protected function addToolbar()\n\t{\n\t\t\n\n\t}", "title": "" }, { "docid": "dfdf2cb3bc286439707d58c3d6d98f60", "score": "0.61948264", "text": "protected function addToolbar()\n\t{\n\t\t$html = array();\n\t\n\t\tif ($this->canDo->get('core.create')) {\n\t\t\tswitch($this->extension) {\n\t\t\t\tdefault: case 'accounting': $addEventText = JText::_('COM_SECRETARY_ACCOUNTING_ENTRY'); break;\n\t\t\t\tcase 'accounts': $addEventText = JText::_('COM_SECRETARY_KONTO'); break;\n\t\t\t\tcase 'accounts_system': $addEventText = JText::_('COM_SECRETARY_KONTO'); break;\n\t\t\t}\n\t\t\t$html[] = Secretary\\Navigation::ToolbarItem('accounting.add', JText::sprintf('COM_SECRETARY_NEW_ENTRY_TOOLBAR',$addEventText), false, 'newentry');\n\t\t}\n\n\t\tif (isset($this->items[0]->checked_out)) {\n\t\t\t$html[] = Secretary\\Navigation::ToolbarItem('accountings.checkin', 'COM_SECRETARY_TOOLBAR_CHECKIN', true, 'default hidden-toolbar-btn', 'fa-refresh');\n\t\t}\n\t\t\n\t\tif($this->canDo->get('core.edit') && $this->extension == 'accounting') {\n\t\t\t$html[] = Secretary\\Navigation::ToolbarItem('accountings.buchen', 'COM_SECRETARY_ACCOUNTING_BOOK', true, 'default', 'fa-book');\n\t\t\t$html[] = Secretary\\Navigation::ToolbarItem('accountings.storno', 'COM_SECRETARY_ACCOUNTING_REVERSE', true, 'default', 'fa-ban');\n\t\t}\n\t\t\n\t\tif($this->extension == 'accounts_system' && $this->canDo->get('core.delete')) {\n\t\t\t$html[] = Secretary\\Navigation::ToolbarItem('accountings.delete', 'COM_SECRETARY_TOOLBAR_DELETE', true, 'default', 'fa-trash');\n\t\t}\n\t\t\n\t\tif(!empty($html) && $this->extension != 'accounts_system')\n\t\t\tarray_unshift($html, '<div class=\"select-arrow-toolbar-next\">&#10095;</div>');\n\t\t\n\t\techo implode(\"\\n\", $html);\n\t}", "title": "" }, { "docid": "72ba9d4ac9b393fbd00f096f4e5a7841", "score": "0.60676783", "text": "protected function _beforeToHtml()\r\n {\r\n $collection = $this->getCollection();\r\n $toolbar = $this->getToolbarBlock();\r\n\r\n // set collection to toolbar and apply sort\r\n if($toolbar){\r\n $itemsperpage = (int)$this->getConfig('panel_list_page/item_per_page',12);\r\n $toolbar->setData('_current_limit',$itemsperpage)->setCollection($collection);\r\n $this->setChild('toolbar', $toolbar);\r\n }\r\n return parent::_beforeToHtml();\r\n }", "title": "" }, { "docid": "430b8bcc14e667d230d039619ee92f67", "score": "0.5936239", "text": "public function before()\n\t{\n\t\tparent::before();\n\t\t$this->active_menu('admin-extensions');\n\t}", "title": "" }, { "docid": "5fa4a3635eac5c01dd4269202b6fb3b3", "score": "0.5925374", "text": "protected function addToolbar()\n\t{\n\n\t\t$isNew = ($this->item->id == 0);\n\t\t$canDo = SnippetsHelper::getActions();\n\n\t\tRL_Document::style('regularlabs/style.min.css');\n\t\tRL_Document::style('snippets/style.min.css', '6.6.2');\n\n\t\tJFactory::getApplication()->input->set('hidemainmenu', true);\n\n\t\t// Set document title\n\t\tJFactory::getDocument()->setTitle(JText::_('SNIPPETS') . ': ' . JText::_('RL_ITEM'));\n\t\t// Set ToolBar title\n\t\tJToolbarHelper::title(JText::_('SNIPPETS') . ': ' . JText::_('RL_ITEM'), 'snippets icon-reglab');\n\n\t\t// If not checked out, can save the item.\n\t\tif ($canDo->get('core.edit'))\n\t\t{\n\t\t\tJToolbarHelper::apply('item.apply');\n\t\t\tJToolbarHelper::save('item.save');\n\t\t}\n\n\t\tif ($canDo->get('core.edit') && $canDo->get('core.create'))\n\t\t{\n\t\t\tJToolbarHelper::save2new('item.save2new');\n\t\t}\n\t\tif ( ! $isNew && $canDo->get('core.create'))\n\t\t{\n\t\t\tJToolbarHelper::save2copy('item.save2copy');\n\t\t}\n\n\t\tif (empty($this->item->id))\n\t\t{\n\t\t\tJToolbarHelper::cancel('item.cancel');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJToolbarHelper::cancel('item.cancel', 'JTOOLBAR_CLOSE');\n\t\t}\n\t}", "title": "" }, { "docid": "07171338dddbf5264b8515a21c404f23", "score": "0.5923581", "text": "protected function addToolbar()\n\t{\n\t\tJToolbarHelper::custom('update.update', 'upload', 'upload', 'COM_INSTALLER_TOOLBAR_UPDATE', true);\n\t\tJToolbarHelper::custom('update.find', 'refresh', 'refresh', 'COM_INSTALLER_TOOLBAR_FIND_UPDATES', false);\n\t\tJToolbarHelper::custom('update.purge', 'purge', 'purge', 'COM_INSTALLER_TOOLBAR_PURGE', false);\n\t\tJToolbarHelper::divider();\n\n\t\tJHtmlSidebar::setAction('index.php?option=com_installer&view=manage');\n\n\t\tparent::addToolbar();\n\t\tJToolbarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_UPDATE');\n\t}", "title": "" }, { "docid": "aecfbc1155a20b5404831d6075c1433d", "score": "0.59061164", "text": "protected function addToolbar() {\n require_once JPATH_COMPONENT . '/helpers/easysdi_dashboard.php';\n\n $canDo = Easysdi_dashboardHelper::getActions('core.admin');\n\n JToolBarHelper::title(JText::_('COM_EASYSDI_DASHBOARD_SHOP_HEADER'), 'links-cat.png');\n\n JToolBarHelper::divider();\n if ($canDo->get('core.admin')) {\n JToolBarHelper::preferences('com_easysdi_dashboard');\n }\n\n //Set sidebar action - New in 3.0\n JHtmlSidebar::setAction('index.php?option=com_easysdi_dashboard&view=shop');\n $this->extra_sidebar = Easysdi_dashboardHelper::getBackendFilters();\n \n }", "title": "" }, { "docid": "d1d7191b6962057926c33dbeaf89c8cf", "score": "0.5855506", "text": "protected function addToolbar()\n\t{\n\t\t$canDo = CodeHelper::getActions('com_code');\n\n\t\tJToolBarHelper::title(JText::_('COM_CODE_ABOUT_TITLE'), 'code');\n\n\t\tif ($canDo->get('core.admin'))\n\t\t{\n\t\t\tJToolBarHelper::divider();\n\t\t\tJToolBarHelper::preferences('com_code');\n\t\t}\n\t}", "title": "" }, { "docid": "bd7ce3f7e9fce0d10b52b40d13cc16ef", "score": "0.58486706", "text": "protected function addToolbar()\n\t{\n\t\tFactory::getApplication()->input->set('hidemainmenu',true);\n\t\t$user = Factory::getUser();\n\t\t$userId = $user->get('id');\n\t\t$isNew = ($this->item->id == 0);\n\t\t$this->isNew = $isNew;\n\t\t$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);\n\n\t\t// Set toolbar items for the page\n\t\t$text = $isNew ? Text::_('COM_JOOMLEAGUE_GLOBAL_NEW') : Text::_('COM_JOOMLEAGUE_GLOBAL_EDIT').': '.Text::_($this->form->getValue('name'));\n\t\tJLToolBarHelper::title(Text::_('COM_JOOMLEAGUE_ADMIN_STAT_TITLE').': <span class=\"toolbarTitleType\">[ '.$text.']</span>','jl-statistics');\n\t\tif($isNew)\n\t\t{\n\t\t /* ToolbarHelper::saveGroup(\n\t\t [\n\t\t ['apply', 'statistic.apply'],\n\t\t ['save', 'statistic.save'],\n\t\t ],\n\t\t 'btn-success'\n\t\t );*/\n\t\t JLToolBarHelper::apply('statistic.apply');\n\t\t JLToolBarHelper::save('statistic.save');\t\t\t\n\t\t\tJLToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('statistic.cancel');\n\t\t}\n\t\telse\n\t\t{\n\t\t /* ToolbarHelper::saveGroup(\n\t\t [\n\t\t ['apply', 'statistic.apply'],\n\t\t ['save', 'statistic.save'],\n\t\t ],\n\t\t 'btn-success'\n\t\t );*/\n\t\t JLToolBarHelper::apply('statistic.apply');\n\t\t JLToolBarHelper::save('statistic.save');\n\t\t\tJLToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('statistic.cancel','COM_JOOMLEAGUE_GLOBAL_CLOSE');\n\t\t}\n\t\tJLToolBarHelper::help('screen.joomleague',true);\n\n\t\t$this->isNew = $isNew;\n\t}", "title": "" }, { "docid": "2e84ddfc214751665e51326d7b6f04b0", "score": "0.5820378", "text": "protected function addToolbar()\n\t{\n\t\tJFactory::getApplication()->input->set('hidemainmenu', true);\n\t\tJToolBarHelper::help('biblestudy', true);\n\t\tJToolBarHelper::title(JText::_('JBS_CMN_INSTALL'), 'administration');\n\t}", "title": "" }, { "docid": "72b2b33faea6acf0169af62544cd34c8", "score": "0.580146", "text": "protected function addToolbar()\n\t{\n\t\t$canDo\t= JoaktreeHelper::getActions();\n\t\t\n\t\tJToolBarHelper::title( '&nbsp;&nbsp;' .JText::_( 'COM_JOAKTREE_CONTROL_PANEL' ), 'joaktree' );\n\t\t\n\t\tif ($canDo->get('core.admin')) {\n\t\t\tJToolBarHelper::preferences('com_joaktree', '460');\n\t\t}\n\t\t\t\t\n\t\tJToolBarHelper::help('JoaktreeManuel', true, 'http://joaktree.com/index.php/en/joaktree/manual');\t\t\n\t}", "title": "" }, { "docid": "9e720dc3c79efe3d90a7bd803551608b", "score": "0.5794733", "text": "protected function addToolbar()\n\t{\n\t\t$canDo \t= SermonspeakerHelper::getActions();\n\t\tJToolBarHelper::title(JText::_('COM_SERMONSPEAKER_MAIN_TOOLS'), 'tools');\n\t\tif ($canDo->get('core.admin')) {\n\t\t\tJToolbarHelper::divider();\n\t\t\tJToolBarHelper::preferences('com_sermonspeaker', 650, 900);\n\t\t}\n\t}", "title": "" }, { "docid": "67d34b08771d17c2ef7bc50500b4026e", "score": "0.57901186", "text": "protected function addToolbar()\n\t{\n\t\tJLToolBarHelper::title(Text::_('COM_JOOMLEAGUE_ADMIN_P_POSITION_TITLE'),'jl-Positions');\n\t\tJLToolBarHelper::custom('projectpositions.assign','upload.png','upload_f2.png','COM_JOOMLEAGUE_ADMIN_P_POSITION_BUTTON_UN_ASSIGN',false);\n\t\tJLToolBarHelper::divider();\n\t\tJLToolBarHelper::help('screen.joomleague',true);\n\t}", "title": "" }, { "docid": "64294e033b793541640d36cfa62b76fe", "score": "0.57722056", "text": "public function addToolbar()\n {\n $title = $this->item->id == 0 ? JText::_('COM_THM_GROUPS_ATTRIBUTE_EDIT_NEW_TITLE') : JText::_('COM_THM_GROUPS_ATTRIBUTE_EDIT_EDIT_TITLE');\n\n JToolBarHelper::title($title, 'edit');\n\n // First argument is [controller.function] that will be executed\n JToolBarHelper::apply('attribute.apply', 'JTOOLBAR_APPLY');\n JToolBarHelper::save('attribute.save', 'JTOOLBAR_SAVE');\n JToolBarHelper::custom('attribute.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);\n JToolBarHelper::cancel('attribute.cancel', 'JTOOLBAR_CLOSE');\n }", "title": "" }, { "docid": "4d2939c8cefa05a94ec2e34dd8baacfe", "score": "0.57686734", "text": "public static function add_support_widget() {\n\t\trequire_once( WPRM_DIR . 'templates/admin/menu/support-widget.php' );\n\t}", "title": "" }, { "docid": "fa927ab0608ebf51992431bf349d4ebc", "score": "0.574826", "text": "protected function addToolbar() {\n $this->app->setUserState(\"$this->option.pid\",$this->project_id);\n $this->app->setUserState(\"$this->option.project_team_id\", $this->project_team_id);\n $this->app->setUserState(\"$this->option.team_id\", $this->team_id);\n $this->app->setUserState(\"$this->option.persontype\", $this->_persontype);\n $this->app->setUserState(\"$this->option.season_id\", $this->season_id);\n\n // Set toolbar items for the page\n if ($this->_persontype == 1) {\n $this->title = Text::_('COM_SPORTSMANAGEMENT_ADMIN_TPLAYERS_TITLE');\n } elseif ($this->_persontype == 2) {\n $this->title = Text::_('COM_SPORTSMANAGEMENT_ADMIN_TSTAFFS_TITLE');\n }\n\n ToolbarHelper::apply('teampersons.saveshort', Text::_('COM_SPORTSMANAGEMENT_ADMIN_TPLAYERS_APPLY'));\n ToolbarHelper::divider();\n\n sportsmanagementHelper::ToolbarButton('assignpersons', 'upload', Text::_('COM_SPORTSMANAGEMENT_ADMIN_TPLAYERS_ASSIGN'), 'persons', 0);\n\tToolbarHelper::apply('teampersons.assignplayerscountry', Text::_('COM_SPORTSMANAGEMENT_ADMIN_TPLAYERS_ASSIGN_COUNTRY'));\n ToolbarHelper::divider();\n\n ToolbarHelper::back('COM_SPORTSMANAGEMENT_ADMIN_TPLAYERS_BACK', 'index.php?option='.$this->option.'&view=projectteams&pid='.$this->project_id.'&id='.$this->project_id);\n\n parent::addToolbar();\n }", "title": "" }, { "docid": "6bedc0b61e66406c63f398e789d242ff", "score": "0.57262444", "text": "protected function addToolbar()\n\t{\n\t\t$canDo\t= JoaktreeHelper::getActions();\n\t\t\n\t\tJToolBarHelper::title( '&nbsp;&nbsp;' .JText::_( 'JTLOCATIONS_TITLE' ), 'location' );\n\n\t\tif ($canDo->get('core.edit')) {\n\t\t\tJToolBarHelper::editList();\n\t\t\tif (!empty($this->mapSettings->geocode)) {\n\t\t\t\tJToolBarHelper::custom( 'resetlocation', 'resetlocation', 'resetlocation', JText::_( 'JTLOCATIONS_BUTTON_RESET' ), true );\n\t\t\t\tJToolBarHelper::divider();\n\t\t\t\tJToolBarHelper::custom( 'geocode', 'geocode', 'geocode', JText::sprintf( 'JTLOCATIONS_BUTTON_GEOCODE', ucfirst($this->mapSettings->geocode) ), false );\n\t\t\t}\n\t\t}\n\n\t\tif ($canDo->get('core.delete')) {\n\t\t\tJToolBarHelper::divider();\n\t\t\t//$bar = JToolBar::getInstance('toolbar');\n\t\t\t// explanation: $bar->appendButton('Standard', $icon, $alt, $task, $listSelect);\n\t\t\t//$bar->appendButton('purge', 'location', 'JTFAMTREE_TASK', 'purgeLocation', false);\n\t\t\tJToolBarHelper::custom( 'purgelocations', 'purgelocations', 'purgelocations', JText::_( 'JTLOCATIONS_BUTTON_PURGE' ), false );\t\t\t\n\t\t}\n\t\t\n\t\tJToolBarHelper::divider();\n\t\tJToolBarHelper::help('JoaktreeManuel', true, 'http://joaktree.com/index.php/en/joaktree/manual');\n\t\t\t\t\n\t\t// Sidebar\n\t\tJHtmlSidebar::setAction('index.php?option=com_joaktree&view=jt_locations');\n\n\t\tJHtmlSidebar::addFilter(\n\t\t\tJText::_('JT_FILTER_SERVER'),\n\t\t\t'filter_server',\n\t\t\tJHtml::_('select.options', $this->server, 'value', 'text', $this->lists['server'], true)\n\t\t);\n\n\t\tJHtmlSidebar::addFilter(\n\t\t\tJText::_('JT_FILTER_STATUS_ALL'),\n\t\t\t'filter_status',\n\t\t\tJHtml::_('select.options', $this->status, 'value', 'text', $this->lists['status'], true)\n\t\t);\n\t}", "title": "" }, { "docid": "15036958a88b6ab6dcb72be4f8c0586f", "score": "0.56727177", "text": "function filter_widget_nav_menu_args( $nav_menu_args, $nav_menu, $args, $instance ) {\n $nav_menu_args['items_wrap'] = '<ul id=\"%1$s\" class=\"%2$s widget__list\">%3$s</ul>';\n return $nav_menu_args;\n}", "title": "" }, { "docid": "938717dab3a73c3ab88a23f7203eb17b", "score": "0.56215894", "text": "protected function addToolbar_Editlist()\n\t{\n\t\tJLToolBarHelper::title(Text::_('COM_JOOMLEAGUE_ADMIN_P_POSITION_EDIT_TITLE'),'jl-Positions');\n\t\tJLToolBarHelper::save('projectpositions.save_positionslist');\n\t\t/*ToolbarHelper::saveGroup(\n\t\t [\n\t\t ['save', 'projectpositions.save_positionslist'],\n\t\t ],\n\t\t 'btn-success'\n\t\t );*/\n\t\tJLToolBarHelper::cancel('projectpositions.cancel','COM_JOOMLEAGUE_GLOBAL_CLOSE');\n\t\tJLToolBarHelper::help('screen.joomleague',true);\n\t}", "title": "" }, { "docid": "5d3784e95d78ef6ca1ecf620120f5277", "score": "0.5615309", "text": "function whitstillman_entry_meta_extra() {\n\t// Translators: used between list items, there is a space after the comma.\n\t//$categories_list = get_the_category_list( __( ', ', 'twentythirteen' ) );\n\t//if ( $categories_list ) {\n\t\t//echo '<span class=\"categories-links\">Category: ' . $categories_list . '</span>';\n\t//}\n\n\t// Translators: used between list items, there is a space after the comma.\n\t$tag_list = get_the_tag_list( '', __( ', ', 'twentythirteen' ) );\n\tif ( $tag_list ) {\n\t\techo '<span class=\"tags-links\">Tagged: ' . $tag_list . '</span>';\n\t}\n}", "title": "" }, { "docid": "8019997831e959dde32032d8a99729e2", "score": "0.56110734", "text": "protected function addToolbar()\n\t{\n\t\t$canDo\t= JHelperContent::getActions('com_languages');\n\n\t\tJToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_INSTALLED_TITLE'), 'comments-2 langmanager');\n\n\t\tif ($canDo->get('core.edit.state'))\n\t\t{\n\t\t\tJToolbarHelper::makeDefault('installed.setDefault');\n\t\t\tJToolbarHelper::divider();\n\t\t}\n\n\t\tif ($canDo->get('core.admin'))\n\t\t{\n\t\t\t// Add install languages link to the lang installer component\n\t\t\t$bar = JToolbar::getInstance('toolbar');\n\t\t\t$bar->appendButton('Link', 'upload', 'COM_LANGUAGES_INSTALL', 'index.php?option=com_installer&view=languages');\n\t\t\tJToolbarHelper::divider();\n\n\t\t\tJToolbarHelper::preferences('com_languages');\n\t\t\tJToolbarHelper::divider();\n\t\t}\n\n\t\tJToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_INSTALLED');\n\n\t\t$this->sidebar = JHtmlSidebar::render();\n\t}", "title": "" }, { "docid": "4192f216e29edc8d36f5122deb4d729e", "score": "0.56041193", "text": "protected function start_section_list() {\r\n return html_writer::start_tag('ul', array('class' => 'glendon'));\r\n }", "title": "" }, { "docid": "ed8cc57cb80eab8da779a334e1b916b5", "score": "0.55994636", "text": "protected function addToolbar()\n\t{\n\t\tJToolBarHelper::title(JText::_('COM_JVIMEO_JVIMEO_TITLE'), 'jvimeo');\n\t\tJToolBarHelper::preferences('com_jvimeo');\n\t\tJToolBarHelper::divider();\n\t\tJToolBarHelper::help('JHELP_COMPONENTS_JVIMEO', true);\n\t}", "title": "" }, { "docid": "b7ef1660032750c4a4678b5c3390132f", "score": "0.55832344", "text": "protected function addToolbar()\n\t{\n\t\tAKToolBarHelper::title( 'Registration' . ' ' . JText::_('COM_USERXTD_TITLE_ITEM_EDIT'), 'article-add.png');\n\n\t\tparent::addToolbar();\n\t}", "title": "" }, { "docid": "dca3851e3de59d5cbc42f328942aaa18", "score": "0.55832064", "text": "protected function addToolbar()\n\t{\n\t\trequire_once JPATH_COMPONENT.'/helpers/xiveirm.php';\n\n\t\t$state\t= $this->get('State');\n\t\t$canDo\t= XiveirmHelper::getActions($state->get('filter.category_id'));\n\n\t\tJToolBarHelper::title(JText::_('COM_XIVEIRM_TITLE_OPTIONS'), 'options.png');\n\n //Check if the form exists before showing the add/edit buttons\n $formPath = JPATH_COMPONENT_ADMINISTRATOR.'/views/option';\n if (file_exists($formPath)) {\n\n if ($canDo->get('core.create')) {\n\t\t\t JToolBarHelper::addNew('option.add','JTOOLBAR_NEW');\n\t\t }\n\n\t\t if ($canDo->get('core.edit') && isset($this->items[0])) {\n\t\t\t JToolBarHelper::editList('option.edit','JTOOLBAR_EDIT');\n\t\t }\n\n }\n\n\t\tif ($canDo->get('core.edit.state')) {\n\n if (isset($this->items[0]->state)) {\n\t\t\t JToolBarHelper::divider();\n\t\t\t JToolBarHelper::custom('options.publish', 'publish.png', 'publish_f2.png','JTOOLBAR_PUBLISH', true);\n\t\t\t JToolBarHelper::custom('options.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);\n } else if (isset($this->items[0])) {\n //If this component does not use state then show a direct delete button as we can not trash\n JToolBarHelper::deleteList('', 'options.delete','JTOOLBAR_DELETE');\n }\n\n if (isset($this->items[0]->state)) {\n\t\t\t JToolBarHelper::divider();\n\t\t\t JToolBarHelper::archiveList('options.archive','JTOOLBAR_ARCHIVE');\n }\n if (isset($this->items[0]->checked_out)) {\n \tJToolBarHelper::custom('options.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true);\n }\n\t\t}\n \n //Show trash and delete for components that uses the state field\n if (isset($this->items[0]->state)) {\n\t\t if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {\n\t\t\t JToolBarHelper::deleteList('', 'options.delete','JTOOLBAR_EMPTY_TRASH');\n\t\t\t JToolBarHelper::divider();\n\t\t } else if ($canDo->get('core.edit.state')) {\n\t\t\t JToolBarHelper::trash('options.trash','JTOOLBAR_TRASH');\n\t\t\t JToolBarHelper::divider();\n\t\t }\n }\n\n\t\tif ($canDo->get('core.admin')) {\n\t\t\tJToolBarHelper::preferences('com_xiveirm');\n\t\t}\n \n //Set sidebar action - New in 3.0\n\t\tJHtmlSidebar::setAction('index.php?option=com_xiveirm&view=options');\n \n $this->extra_sidebar = '';\n \n\t\tJHtmlSidebar::addFilter(\n\t\t\tJText::_(\"JOPTION_SELECT_CATEGORY\"),\n\t\t\t'filter_catid',\n\t\t\tJHtml::_('select.options', JHtml::_('category.options', 'com_xiveirm.options.catid'), \"value\", \"text\", $this->state->get('filter.catid'))\n\n\t\t);\n\n\t\tJHtmlSidebar::addFilter(\n\t\t\tJText::_(\"JOPTION_SELECT_ACCESS\"),\n\t\t\t'filter_access',\n\t\t\tJHtml::_('select.options', JHtml::_(\"access.assetgroups\", true, true), \"value\", \"text\", $this->state->get('filter.access'), true)\n\n\t\t);\n\n \n\t}", "title": "" }, { "docid": "b796b5db76123a51af187cd2136cdab0", "score": "0.5577301", "text": "protected function addToolbar()\n\t{\n\t\t$user = JFactory::getUser();\n\t\t$userId = $user->get('id');\n\n\t\t$isNew = ($this->item->id == 0);\n\t\t$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);\n\n\n\t\t// Need to load the menu language file as mod_menu hasn't been loaded yet.\n\t\t$lang = JFactory::getLanguage();\n\t\t$lang->load($this->option, JPATH_BASE, null, false, true)\n\t\t|| $lang->load($this->option, JPATH_ADMINISTRATOR . '/components/' . $this->option, null, false, true);\n\n\t\t// Load the element helper.\n\t\trequire_once JPATH_COMPONENT . '/helpers/' . substr($this->option, 4) . '.php';\n\n\t\t// Get the results for each action.\n\t\t$canDo = $this->canDo;\n\n\t\t$title = JText::_(strtoupper($this->option . '_' . $this->getName()) . ($isNew?'_ADD':'_EDIT') . '_TITLE');\n\n\t\t// Prepare the toolbar.\n\t\tJToolbarHelper::title($title, $this->getName() . ' ' . $this->getName() . '-' . ($isNew?'add ':'edit ') . ($isNew?'add':'edit'));\n\n\t\t// For new records, check the create permission.\n\t\tif ($isNew && $user->authorise($this->option . '.' . $this->getName(), 'core.create'))\n\t\t{\n\t\t\tJToolbarHelper::apply($this->getName() . '.apply');\n\t\t\tJToolbarHelper::save($this->getName() . '.save');\n\t\t\tJToolbarHelper::save2new($this->getName() . '.save2new');\n\t\t}\n \n\t\t// If not checked out, can save the item.\n\t\telseif (!$checkedOut && ($canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_by == $userId)))\n\t\t{\n\t\t\tJToolbarHelper::apply($this->getName() . '.apply');\n\t\t\tJToolbarHelper::save($this->getName() . '.save');\n\n\t\t\tif ($canDo->get('core.create'))\n\t\t\t{\n\t\t\t\tJToolbarHelper::save2new($this->getName() . '.save2new');\n\t\t\t}\n\t\t}\n\n\t\t// If an existing item, can save to a copy.\n\t\tif (!$isNew && $canDo->get('core.create'))\n\t\t{\n\t\t\tJToolbarHelper::save2copy($this->getName() . '.save2copy');\n\t\t}\n\n\t\tJToolbarHelper::cancel($this->getName() . '.cancel');\t\t\n\n\t\tJToolbarHelper::divider();\n\t}", "title": "" }, { "docid": "b4d853d7c17ca2976d0614bf5ccc63ea", "score": "0.5576664", "text": "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"griddelete\"\r\n\t\tif ($this->AllowAddDeleteRow) {\r\n\t\t\t$item = &$this->ListOptions->Add(\"griddelete\");\r\n\t\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t\t$item->OnLeft = TRUE;\r\n\t\t\t$item->Visible = FALSE; // Default hidden\r\n\t\t}\r\n\r\n\t\t// Add group option item\r\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\r\n\t\t$item->Body = \"\";\r\n\t\t$item->OnLeft = TRUE;\r\n\t\t$item->Visible = FALSE;\r\n\r\n\t\t// \"view\"\r\n\t\t$item = &$this->ListOptions->Add(\"view\");\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->Visible = $Security->CanView();\r\n\t\t$item->OnLeft = TRUE;\r\n\r\n\t\t// \"edit\"\r\n\t\t$item = &$this->ListOptions->Add(\"edit\");\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = TRUE;\r\n\r\n\t\t// \"copy\"\r\n\t\t$item = &$this->ListOptions->Add(\"copy\");\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->Visible = $Security->CanAdd();\r\n\t\t$item->OnLeft = TRUE;\r\n\r\n\t\t// List actions\r\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->OnLeft = TRUE;\r\n\t\t$item->Visible = FALSE;\r\n\t\t$item->ShowInButtonGroup = FALSE;\r\n\t\t$item->ShowInDropDown = FALSE;\r\n\r\n\t\t// \"checkbox\"\r\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\r\n\t\t$item->Visible = ($Security->CanDelete() || $Security->CanEdit());\r\n\t\t$item->OnLeft = TRUE;\r\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\r\n\t\t$item->MoveTo(0);\r\n\t\t$item->ShowInDropDown = FALSE;\r\n\t\t$item->ShowInButtonGroup = FALSE;\r\n\r\n\t\t// Drop down button for ListOptions\r\n\t\t$this->ListOptions->UseImageAndText = TRUE;\r\n\t\t$this->ListOptions->UseDropDownButton = TRUE;\r\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\r\n\t\t$this->ListOptions->UseButtonGroup = FALSE;\r\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\r\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\r\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t\t$this->SetupListOptionsExt();\r\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\r\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\r\n\t}", "title": "" }, { "docid": "dea886241692e2d5a6e94458e6c0c7af", "score": "0.5571269", "text": "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = FALSE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanAdd();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = FALSE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = FALSE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// \"sequence\"\n\t\t$item = &$this->ListOptions->Add(\"sequence\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = TRUE;\n\t\t$item->OnLeft = TRUE; // Always on left\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = FALSE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "title": "" }, { "docid": "797ff4f15756d72c14368b594fcdc4a8", "score": "0.5568078", "text": "public function adminAppendToItemsShowPrimary()\n {\n $item = get_current_item();\n echo nlwms_renderMap($item);\n }", "title": "" }, { "docid": "33c15836b8f9cfdedc128376514ad987", "score": "0.5559046", "text": "protected function addToolbar()\n\t{\n\t\t// Initialise variables.\n\t\t$canDo = TestimonialsHelper::getActions();\n\n\t\t// Set toolbar items for the page.\n\t\tJToolbarHelper::title(JText::_('COM_TESTIMONIALS_MANAGER_CPANEL_TITLE'), 'cpanel.png');\n\n\t\tif ($canDo->get('core.admin'))\n\t\t{\n\t\t\tJToolbarHelper::preferences('com_testimonials');\n\t\t}\n\n\t\tJToolBarHelper::help('cpanel', $com = true);\n\t}", "title": "" }, { "docid": "b5d843f92fa173de3cf153dc0ba37fba", "score": "0.5552729", "text": "abstract function toolbarAddItems(ilToolbarGUI $a_toolbar);", "title": "" }, { "docid": "168d2f718dd8649369d89fdd4d233606", "score": "0.55500615", "text": "protected function _beforeToHtml()\n {\n $toolbar = $this->getToolbarBlock();\n\n // called prepare sortable parameters\n $collection = $this->_getPostCollection();\n\n // use sortable parameters\n if ($orders = $this->getAvailableOrders()) {\n $toolbar->setAvailableOrders($orders);\n }\n if ($sort = $this->getSortBy()) {\n $toolbar->setDefaultOrder($sort);\n }\n if ($dir = $this->getDefaultDirection()) {\n $toolbar->setDefaultDirection($dir);\n }\n if ($modes = $this->getModes()) {\n $toolbar->setModes($modes);\n }\n\n // set collection to toolbar and apply sort\n $toolbar->setCollection($collection);\n\n $this->setChild('toolbar', $toolbar);\n\t\t\n Mage::dispatchEvent('vc_miniblog_block_post_list_collection', array(\n 'collection' => $this->_getPostCollection()\n ));\n\t\t\n $this->_getPostCollection()->load();\n\n return parent::_beforeToHtml();\n }", "title": "" }, { "docid": "2d2e38e9677aba920642afdae7d35dba", "score": "0.55482566", "text": "protected function addToolbar()\n\t{\n\t\t$title = JFactory::getApplication()->input->get('title');\n\n\t\tif (empty($title)) {\n\t\t\t$title = 'Symfony';\n\t\t}\n\n\t\tJToolbarHelper::title($title);\n\t}", "title": "" }, { "docid": "501ad96916265e56860b5c37e8fc70c6", "score": "0.5541543", "text": "public function openUl()\n {\n $this->openTag('ul');\n }", "title": "" }, { "docid": "bfcd73fb13ff338ba06f72d776b5ec64", "score": "0.5525339", "text": "protected function addToolbar()\n {\n JRequest::setVar('hidemainmenu', false);\n JToolBarHelper::title(JText::_('COM_SIMPLIFIEDSOCIALSHARE').' '.JText::_('Component'), 'configuration.gif');\n JToolBarHelper::apply('apply');\n JToolBarHelper::save('save', 'JTOOLBAR_SAVE');\n JToolBarHelper::cancel('cancel');\n }", "title": "" }, { "docid": "5a2f23842a2626a8e2b70c45f798011f", "score": "0.5512859", "text": "protected function addToolbar()\n\t{\n\t\tAKToolBarHelper::title( 'User' . ' ' . JText::_('COM_USERXTD_TITLE_ITEM_EDIT'), 'article-add.png');\n\n\t\tJRequest::setVar('hidemainmenu', true);\n\n\t\t$user\t\t= JFactory::getUser();\n\t\t$isNew\t\t= ($this->item->id == 0);\n\n\t\tJToolBarHelper::apply($this->item_name.'.apply');\n\t\tJToolBarHelper::save($this->item_name.'.save');\n\t\tJToolBarHelper::cancel($this->item_name.'.cancel');\n\t}", "title": "" }, { "docid": "8b120bce4fa77e70b7c1cad0ebcf7a36", "score": "0.5509085", "text": "public function initToolbarTitle()\n {\n parent::initToolbarTitle();\n \n if ($this->display == 'add') {\n $this->toolbar_title = array();\n $this->toolbar_title[] = $this->l('Do a Money out', null, null, false);\n $this->addMetaTitle($this->l('Do a Money out', null, null, false));\n }\n }", "title": "" }, { "docid": "f32337d453d72ca7a689342e5de84873", "score": "0.54960257", "text": "protected function addToolbar()\n\t{\n\t\trequire_once JPATH_COMPONENT.'/helpers/hockey.php';\n JToolBarHelper::title(JText::_('COM_HOCKEY_INFO') , 'logo.png');\n\n\t\t$canDo\t= HockeyHelper::getActions();\n\n\t\tif ($canDo->get('core.admin')) {\n\t\t\tJToolBarHelper::preferences('com_hockey');\n\t\t}\n\t}", "title": "" }, { "docid": "65bb8ef21790d46ee61dd69aec72283b", "score": "0.54918355", "text": "function cs_shortcode_pb_list($atts, $content = \"\") {\n if (!isset($atts['type'])){ $atts['type'] = '';}\n if (!isset($atts['icon'])){ $atts['icon'] = '';}\n $content = \"<ul class='\".$atts[\"type\"].\"'>\" . $content . \"</ul>\";\n if(isset($atts['icon']) && $atts['icon']<>''){\n $content = str_replace(\"[list_item]\", \"<li><i class='fa \".$atts['icon'].\"'></i>\", $content);\n } else {\n $content = str_replace(\"[list_item]\", \"<li>\", $content);\n }\n $content = str_replace(\"[/list_item]\", \"</li>\", $content);\n $content = str_replace(\"<br />\", \"\", $content);\n $html = '<div class=\"list_styles\">' . $content . '</div>';\n return do_shortcode($html) . '<div class=\"clear\"></div>';\n}", "title": "" }, { "docid": "d003ee32aa73834168b13aebc14fb300", "score": "0.54837656", "text": "protected function addDisplayToolbar() {\r\n\t\t$user = JFactory::getUser();\r\n\t\tif($this->getModel()->getState('googlestats', 'analytics') == 'webmasters') {\r\n\t\t\tJToolBarHelper::title( JText::_( 'COM_JMAP_GOOGLE_WEBMASTERS_TOOLS' ), 'jmap' );\r\n\t\t} else {\r\n\t\t\tJToolBarHelper::title( JText::_( 'COM_JMAP_GOOGLE_ANALYTICS' ), 'jmap' );\r\n\t\t}\r\n\r\n\t\t// Store logged in status in session\r\n\t\tif($this->isLoggedIn) {\r\n\t\t\tJToolBarHelper::custom('google.deleteEntity', 'lock', 'lock', 'COM_JMAP_GOOGLE_LOGOUT', false);\r\n\t\t}\r\n\t\t\r\n\t\tif ($user->authorise('core.edit', 'com_jmap') && $this->getModel()->getState('googlestats', 'analytics') == 'webmasters' && $this->isLoggedIn) {\r\n\t\t\tJToolBarHelper::custom('google.submitSitemap', 'upload', 'upload', 'COM_JMAP_SUBMIT_SITEMAP', false);\r\n\t\t}\r\n\t\t\r\n\t\tJToolBarHelper::custom('cpanel.display', 'home', 'home', 'COM_JMAP_CPANEL', false);\r\n\t}", "title": "" }, { "docid": "9d9545ebd75bb619609131258abd69df", "score": "0.5465753", "text": "function th_append_admin_bar_item()\n{\n global $wp_admin_bar;\n\n $wp_admin_bar->add_menu(\n array(\n 'id' => 'wp-admin-bar-new-item',\n 'title' => SITE_TITLE,\n 'href' => SITE_URL,\n 'meta' => array( 'target' => '_blank' )\n ));\n}", "title": "" }, { "docid": "0db7c4a925406203a2fe40f0771429fb", "score": "0.545901", "text": "function SetupListOptions() {\n\t\tglobal $Security, $z2padmin;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$this->ListOptions->Add(\"checkbox\");\n\t\t$item =& $this->ListOptions->Items[\"checkbox\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = FALSE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" class=\\\"phpmaker\\\" onclick=\\\"z2padmin_list.SelectAllKey(this);\\\">\";\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($z2padmin->Export <> \"\" ||\n\t\t\t$z2padmin->CurrentAction == \"gridadd\" ||\n\t\t\t$z2padmin->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "title": "" }, { "docid": "49ad4921c0fc98e7e9fe88f9ff538f73", "score": "0.5458375", "text": "abstract function toolbarReplaceContent();", "title": "" }, { "docid": "6fdaf514feab7fa660d1d7d062f331fc", "score": "0.5453313", "text": "function osc_admin_toolbar_menu()\n{\n AdminToolbar::newInstance()->add_menu( array(\n 'id' => 'home',\n 'title' => '<span class=\"\">'. osc_page_title() .'</span>',\n 'href' => osc_base_url(),\n 'meta' => array('class' => 'user-profile'),\n 'target' => '_blank'\n ) );\n}", "title": "" }, { "docid": "0f37eea28f08884fd4d16b0572bf654d", "score": "0.5451439", "text": "function html_inner()\n\t{\n\t\t$this->editors['ed_list']->table_name=$this->table_name;\n\t\tparent::html_inner();\n\t}", "title": "" }, { "docid": "e33f953cd6565b8f6348e848c964dc6f", "score": "0.544901", "text": "function hook_panels_build_alter(array &$build, PanelsDisplayVariant $panels_display) {\n $build['extra'] = [\n '#markup' => '<div>Some extra markup</div>',\n ];\n}", "title": "" }, { "docid": "e0d2d95e4494ca738ab52bb82fe0a495", "score": "0.54477406", "text": "protected function addToolbar()\n\t{\n\n\t\tJToolBarHelper::title( JText::_( 'COM_MARITINA' ) );\n\t\t$canDo = maritinaHelper::getActions( 'archive' );\n\n\n\n if ( $canDo->get( 'core.delete' ) ) {\n JToolBarHelper::deleteList( 'DELETE_QUERY_STRING', 'archives.delete', 'JTOOLBAR_DELETE' );\n JToolBarHelper::divider();\n }\n\n if ( $canDo->get( 'core.admin' ) ) {\n JToolBarHelper::preferences( 'com_maritina' );\n JToolBarHelper::divider();\n }\n\n JToolbarHelper::custom('archives.update', 'trash.png', 'icon-32-delete.png', 'RefreshData', false );\n JToolBarHelper::divider();\n\t}", "title": "" }, { "docid": "ed7ad95b1862e389168e8ab2258e4570", "score": "0.54437065", "text": "protected function addToolbar() \n {\n\t\t$jinput = JFactory::getApplication()->input;\n $option = $jinput->getCmd('option');\n\t\tif (strpos($this->getLayout(), 'login') === false) {\n\t\t\t$canDo = jsmGCalendarUtil::getActions();\n\t\t\tif ($canDo->get('core.create')){\n\t\t\t\tJToolbarHelper::custom('jsmgcalendarimport.save', 'new.png', 'new.png', 'COM_SPORTSMANAGEMENT_JSMGCALENDAR_VIEW_IMPORT_BUTTON_ADD', false);\n\t\t\t}\n\t\t\tJToolbarHelper::cancel('jsmgcalendar.cancel', 'JTOOLBAR_CANCEL');\n\t\t}\n else\n {\n JToolbarHelper::cancel('jsmgcalendar.cancel', 'JTOOLBAR_CANCEL');\n }\n \n// JToolbarHelper::divider();\n// sportsmanagementHelper::ToolbarButtonOnlineHelp();\n//\t\tJToolbarHelper::preferences($option);\n\n//\t\tJFactory::getApplication()->input->setVar('hidemainmenu', 0);\n\n\t\tparent::addToolbar();\n\t}", "title": "" }, { "docid": "397f5a92003e3ac0a4ca8a974e95de6d", "score": "0.5442778", "text": "public function addExtras() {\n $this->layout = false;\n $this->autoRender = NULL;\n \n $this->OrderHandler->addExtras(array(\n 'item_id' => $this->data['selected_item_id'],\n 'extra_id_list' => $this->data['selected_extras_id'],\n 'table' => $this->data['table'],\n 'type' => $this->data['type'],\n 'special' => $this->data['special'],\n 'cashier_id' => $this->Session->read('Front.id')\n ));\n }", "title": "" }, { "docid": "a3e1dddac648ede76efd775a447832db", "score": "0.5422223", "text": "protected function appendToMeta()\n {\n $pageList = new PageList($this->theme);\n $pageList->appendPage($this);\n }", "title": "" }, { "docid": "759026359efb49d39c2ac197bc11e5f4", "score": "0.54214376", "text": "function custom_toolbar() {\r\n\tglobal $wp_admin_bar;\r\n\r\n\t$args = array(\r\n\t\t'id' => 'parent-menu',\r\n\t\t'title' => __( 'Main Menu', 'text_domain' ),\r\n\t);\r\n\t$wp_admin_bar->add_menu( $args );\r\n\r\n\t$args = array(\r\n\t\t'id' => 'child-menu',\r\n\t\t'parent' => 'parent-menu',\r\n\t\t'title' => __( 'Sub Menu', 'text_domain' ),\r\n\t);\r\n\t$wp_admin_bar->add_menu( $args );\r\n\r\n}", "title": "" }, { "docid": "407a54b25824423fb64b7debd62d231e", "score": "0.542008", "text": "protected function _beforeToHtml() {\n /** get toolbar block */\n $toolbar = $this->getToolbarBlock ();\n \n /**\n * called prepare sortable parameters\n */\n $collection = $this->_getProductCollection ();\n \n /**\n * use sortable parameters\n */\n if ($orders = $this->getAvailableOrders ()) {\n $toolbar->setAvailableOrders ( $orders );\n }\n if ($sort = $this->getSortBy ()) {\n $toolbar->setDefaultOrder ( $sort );\n }\n if ($dir = $this->getDefaultDirection ()) {\n $toolbar->setDefaultDirection ( $dir );\n }\n if ($modes = $this->getModes ()) {\n $toolbar->setModes ( $modes );\n }\n /**\n * set collection to toolbar and apply sort\n */\n $toolbar->setCollection ( $collection );\n \n $this->setChild ( 'toolbar', $toolbar );\n Mage::dispatchEvent ( 'catalog_block_product_list_collection', array (\n 'collection' => $this->_getProductCollection () \n ) );\n \n $this->_getProductCollection ()->load ();\n \n return parent::_beforeToHtml ();\n }", "title": "" }, { "docid": "359f2ddc5bfaf64e9ef9b2b8973a4e5d", "score": "0.54159766", "text": "public function setHelpTabs ()\n {\n $this->args['help_tabs'][] = array(\n 'id' => 'online-docs',\n 'title' => __('Theme Online Documentation', 'monolite-core'),\n 'content' => __('<p>Please see it online at <a target=\"_blank\" href=\"//phoenix-theme.com/documentation/grandway/\">http://phoenix-theme.com</a>.</p>', 'monolite-core')\n );\n $this->args['help_tabs'][] = array(\n 'id' => 'online-knowledge',\n 'title' => __('Our Products Knowledge Base', 'monolite-core'),\n 'content' => '<p>It will bee ready soon. Apologise.</p>'\n );\n $this->args['help_tabs'][] = array(\n 'id' => 'online-support',\n 'title' => __('Get Online Support', 'monolite-core'),\n 'content' => '<p>Need help? Feel free to ask us at our <a target=\"_blank\" href=\"//themeforest.net/user/'. MONOLITE_TEAM .'\">Themeforest Profile</a>. We are friendly and we are always help our customers.</p>'\n );\n\n // Set the help sidebar\n $this->args['help_sidebar'] = '<br /><a target=\"_blank\" href=\"//themeforest.net/\"><img style=\"width: 100%;\" src=\"'.MONOLITE_THEME_URI.'/screenshot.png\" alt=\"Theme-logo.png\" /></a>';\n }", "title": "" }, { "docid": "3f95d2904f07b37770234a152ffd6fbd", "score": "0.541302", "text": "protected function addToolbar()\n\t{\n JToolBarHelper::title(JText::_('COM_ACTIVATEGRID').\" / \".JText::_('COM_ACTIVATEGRID_ADVANCED_CONFIGURATION'), 'activates.png');\n JToolBarHelper::custom('config','save','','Save',false);\n JToolBarHelper::preferences('com_activategrid','','','Options');\n JToolBarHelper::custom(\"back\", 'cancel', '' ,'Close', false);\n JToolBarHelper::help('activatemedia', 'com_activategrid');\n\t}", "title": "" }, { "docid": "507e77151bb9ddc4d47a2519906415e7", "score": "0.5412346", "text": "protected function addToolbar()\n\t{\n\t\tJToolBarHelper::title(JText::_('COM_NEWSLETTER_SUBSCRIBERS_TITLE'), 'article.png');\n\n\t\t$bar = MigurToolBar::getInstance('subscribers');\n\t\t$bar->appendButton('Link', 'cancel', 'COM_NEWSLETTER_REMOVE_FROM_LIST', 'list.unbindgroup', false);\n\t\t$bar->appendButton('Link', 'copy', 'COM_NEWSLETTER_ASSIGN_TO_LIST', 'list.assigngroup', false);\n\t\t$bar->appendButton('Popup', 'new', 'JTOOLBAR_NEW', 'index.php?option=com_newsletter&amp;view=subscriber&amp;tmpl=component', 350, 150, 0, 0);\n\t\t$bar->appendButton('Standard', 'trash', 'JTOOLBAR_DELETE', 'subscribers.delete', false);\n\t\t$bar->appendButton('Standard', 'unpublish', 'JTOOLBAR_DISABLE', 'subscribers.unpublish', false);\n\t\t$bar->appendButton('Standard', 'publish', 'JTOOLBAR_ENABLE', 'subscribers.publish', false);\n\t\t$bar->appendButton('Help', 'JHELP_CONTENT_ARTICLE_MANAGER', false, null, null);\n\n\t\t$bar = MigurToolBar::getInstance('lists');\n\t\t$bar->appendButton('Popup', 'new', 'JTOOLBAR_NEW', 'index.php?option=com_newsletter&amp;view=list&amp;tmpl=component', 1000, 600, 0, 0);\n\t\t$bar->appendButton('Standard', 'trash', 'JTOOLBAR_DELETE', 'lists.delete', false);\n\t\t$bar->appendButton('Standard', 'unpublish', 'JTOOLBAR_DISABLE', 'lists.unpublish', false);\n\t\t$bar->appendButton('Standard', 'publish', 'JTOOLBAR_ENABLE', 'lists.publish', false);\n\t\t$bar->appendButton('Help', 'JHELP_CONTENT_ARTICLE_MANAGER', false, null, null);\n\n\t\t// Load the submenu.\n\t\tNewsletterHelper::addSubmenu(JRequest::getVar('view'));\n\t}", "title": "" }, { "docid": "a791895636bc913d78ce77f5f4a262ea", "score": "0.5394389", "text": "protected function start_section_list() {\n return html_writer::start_tag('ul', array('class' => 'topics'));\n }", "title": "" }, { "docid": "af38978be6742266d99e6423097a063a", "score": "0.53936934", "text": "protected function addToolbar()\n {\n $clubname = ComponentHelper::getParams('com_tkdclub')->get('club_name', Text::_('COM_TKDCLUB'));\n\n ToolBarHelper::title($clubname . JText::_('COM_TKDCLUB_MEMBER_ADMIN_VIEW'), 'tkdclub');\n\n $canDo = ContentHelper::getActions('com_tkdclub');\n\n if ($canDo->get('core.create')) {\n ToolBarHelper::addNew('member.add', 'JTOOLBAR_NEW');\n }\n\n if ($canDo->get('core.edit')) {\n ToolBarHelper::editList('member.edit', 'JTOOLBAR_EDIT');\n }\n\n if ($canDo->get('core.delete')) {\n ToolBarHelper::deleteList('COM_TKDCLUB_MEMBER_DELETE_QUESTION', 'members.delete', 'JTOOLBAR_DELETE');\n }\n\n $toolbar = Toolbar::getInstance('toolbar');\n $toolbar->addButtonPath(JPATH_COMPONENT . '/buttons');\n\n if ($this->togglestats) {\n ToolBarHelper::custom('members.togglestats', 'eye-close', 'eye-close', 'COM_TKDCLUB_BUTTON_STATS', false);\n } else {\n ToolBarHelper::custom('members.togglestats', 'eye-open', 'eye-open', 'COM_TKDCLUB_BUTTON_STATS', false);\n }\n\n $toolbar->appendButton('RawFormat', 'download', 'COM_TKDCLUB_BUTTON_EXPORT', 'export.members');\n\n if ($canDo->get('core.admin')) {\n ToolBarHelper::divider();\n ToolBarHelper::preferences('com_tkdclub');\n }\n\n JHtmlSidebar::setAction('index.php?option=com_tkdclub&view=members');\n ToolBarHelper::divider();\n\n $help_url = 'https://tkdclub.readthedocs.io/{langcode}/latest/mitglieder.html';\n ToolbarHelper::help('', false, $help_url);\n }", "title": "" }, { "docid": "8b42f17bf29a49fa45d9ee4e8e14c223", "score": "0.53920513", "text": "protected function addAdminBarMenuItems() {\n\t\t// Add an upsell to Pro.\n\t\tif ( current_user_can( $this->getPageRequiredCapability( '' ) ) ) {\n\t\t\t$this->adminBarMenuItems['aioseo-pro-upgrade'] = [\n\t\t\t\t'parent' => 'aioseo-main',\n\t\t\t\t'title' => '<span class=\"aioseo-menu-highlight\">' . __( 'Upgrade to Pro', 'all-in-one-seo-pack' ) . '</span>',\n\t\t\t\t'id' => 'aioseo-pro-upgrade',\n\t\t\t\t'href' => apply_filters( 'aioseo_upgrade_link', aioseo()->helpers->utmUrl( AIOSEO_MARKETING_URL . 'lite-upgrade/', 'admin-bar', null, false ) ),\n\t\t\t\t'meta' => [ 'target' => '_blank' ],\n\t\t\t];\n\t\t}\n\n\t\tparent::addAdminBarMenuItems();\n\t}", "title": "" }, { "docid": "af932de1f96e33b4aaae7793538ba878", "score": "0.53915477", "text": "public function setHelpTabs() {\r\n\t\t\t$this->args['help_tabs'][] = array(\r\n\t\t\t\t'id' => 'redux-help-tab-1',\r\n\t\t\t\t'title' => esc_html__('Theme Information 1', 'bignews'),\r\n\t\t\t\t'content' => wp_kses_post('<p>This is the tab content, HTML is allowed.</p>')\r\n\t\t\t);\r\n\r\n\t\t\t$this->args['help_tabs'][] = array(\r\n\t\t\t\t'id' => 'redux-help-tab-2',\r\n\t\t\t\t'title' => esc_html__('Theme Information 2', 'bignews'),\r\n\t\t\t\t'content' => wp_kses_post('<p>This is the tab content, HTML is allowed.</p>')\r\n\t\t\t);\r\n\r\n\t\t\t// Set the help sidebar\r\n\t\t\t$this->args['help_sidebar'] = wp_kses_post('<p>This is the sidebar content, HTML is allowed.</p>');\r\n\t\t}", "title": "" }, { "docid": "62cb02226fa83e58470be3b913bdbc40", "score": "0.5383081", "text": "function setImportChooseElementsToolbar()\n {\n JToolBarHelper::title(JText::_('Select fields'), 'install');\n JToolBarHelper::customX('doImport', 'save.png', 'save_f2.png', 'Save', false);\n JToolBarHelper::cancel();\n }", "title": "" }, { "docid": "00eb38eb277bba86d20ed28b8f00f34e", "score": "0.53705317", "text": "public function insert_after() {\n\t\treturn 'section_items_data';\n\t}", "title": "" }, { "docid": "0012ab45503173e0520c6ce27541c950", "score": "0.53566176", "text": "function admin_header() {\n\t\t$page = ( isset( $_GET['page'] ) ) ? esc_attr( sanitize_text_field( wp_unslash( $_GET['page'] ) ) ) : false;\n\t\tif ( 'my_list_test' != $page ) {\n\t\t\treturn;\n\t\t}\n\t\techo '<style type=\"text/css\">';\n\t\techo '.wp-list-table .column-id { width: 5%; }';\n\t\techo '.wp-list-table .column-title { width: 15%; }';\n\t\techo '.wp-list-table .column-uploader { width: 10%; }';\n\t\techo '.wp-list-table .column-location { width: 15%; }';\n\t\techo '.wp-list-table .column-walkthroughs { width: 15%; }';\n\t\techo '.wp-list-table .column-description { width: 50%; }';\n\t\techo '</style>';\n\t}", "title": "" }, { "docid": "b88ec0c490eaffa1caba195e724bc9fa", "score": "0.5332377", "text": "function pinboards_extras_menu($hook, $type, $return, $params) {\r\n foreach ($return as $key => $item) {\r\n\tif ($item->getName() == 'bookmark') {\r\n\t $return[$key]->setText('<span class=\"elgg-icon pinboards-bookmark-icon\"></span>');\r\n\t}\r\n }\r\n\r\n return $return;\r\n}", "title": "" }, { "docid": "fc66e6277f7d6bc31585958f44d1b583", "score": "0.5331592", "text": "function setImportChooseElementsToolbar()\r\n {\r\n JToolBarHelper::title( JText::_('Select fields'), 'install' );\r\n JToolBarHelper::customX( 'doImport', 'save.png', 'save_f2.png', 'Save', false );\r\n JToolBarHelper::cancel();\r\n }", "title": "" }, { "docid": "d2202f09f64216df4ce14fd532d1040f", "score": "0.53287095", "text": "public function admin_head() {\n\n\t\t\tif ( $this->cpt->post_type !== self::get_current_post_type() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t?>\n\t\t\t<?php if ( isset( $this->args['admin_filters']['m'] ) && ! $this->args['admin_filters']['m'] ) { ?>\n\t\t\t\t<style type=\"text/css\">\n\t\t\t\t\t#posts-filter select[name=\"m\"] {\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t}\n\t\t\t\t</style>\n\t\t\t<?php } ?>\n\t\t\t<?php\n\n\t\t}", "title": "" }, { "docid": "6f14a4c68d684fc3e00389f178df7ae1", "score": "0.5306268", "text": "function render() {\n\t/* @var $wp_admin_bar \\WP_Admin_Bar Admin bar class */\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->add_menu( [\n\t\t'id' => 'flags',\n\t\t'title' => '<span class=\"ab-icon\"></span>' . esc_html__( 'Flags', 'wp-flags' ),\n\t] );\n\n\tarray_map( __NAMESPACE__ . '\\add_flag_node', wp_list_filter( Flags::get_all(), [ 'available' => true ] ) );\n}", "title": "" }, { "docid": "e0ae4201a244d6af803008f315dcfab7", "score": "0.5299627", "text": "function th_append_developer_widget()\n{\n print 'Contents here!';\n}", "title": "" }, { "docid": "29ede048cf68878e542ddee0149adb0f", "score": "0.5298263", "text": "function my_toolbars( $toolbars )\n{\n\t/*\n\techo '< pre >';\n\t\tprint_r($toolbars);\n\techo '< /pre >';\n\tdie;\n\t*/\n\n\t// Add a new toolbar called \"Very Simple\"\n\t// - this toolbar has only 1 row of buttons\n\t$toolbars['Very Simple' ] = array();\n\t$toolbars['Very Simple' ][1] = array('formatselect', 'link' );\n\n\t// return $toolbars - IMPORTANT!\n\treturn $toolbars;\n}", "title": "" }, { "docid": "bb28abf20b16bcdb77e15b16ae83f621", "score": "0.52951103", "text": "public function publicAppendToItemsShow()\n {\n $item = get_current_item();\n echo nlwms_renderMap($item);\n }", "title": "" }, { "docid": "b83dc9d695d01d1dc4532b97bad7a638", "score": "0.52877134", "text": "function beforeFilter() {\n parent::beforeFilter();\n\n // set the layout\n $this->layoutOpt['left_nav'] = \"item-left-nav\";\n $this->layoutOpt['left_nav_selected'] = \"view_item\";\n }", "title": "" }, { "docid": "1cadb43e20a9385e1f979c04f88a640e", "score": "0.52847195", "text": "protected function addToolbar()\n\t{\n\t\tJToolBarHelper::title(JText::_('COM_NEWSLETTER_TEMPLATES_TITLE'), 'article.png');\n\n\t\t$bar = JToolBar::getInstance('templates');\n\t\t$bar->appendButton('Popup', 'new', 'JTOOLBAR_NEW', 'index.php?option=com_newsletter&view=template&tmpl=component', 880, 680, 0, 0);\n\t\t$bar->appendButton('Standard', 'edit', 'JTOOLBAR_EDIT', 'template.edit', false);\n\t\t//$bar->appendButton('Standard', 'copy', 'COM_NEWSLETTER_COPY', 'templates.copy', false);\n\t\t$bar->appendButton('Standard', 'trash', 'JTOOLBAR_DELETE', 'templates.delete', false);\n\n\t\t// Load the submenu.\n\t\tNewsletterHelper::addSubmenu(JRequest::getVar('view'));\n\t}", "title": "" }, { "docid": "4afc2cd1e5d6a7b2e227df516b1d8eec", "score": "0.52815217", "text": "function custom_toolbar_link($wp_admin_bar) {\n\t$args = array(\n\t\t'id' => 'wpbeginner',\n\t\t'title' => 'WPBeginner', \n\t\t'href' => 'https://www.wpbeginner.com', \n\t\t'meta' => array(\n\t\t\t'class' => 'wpbeginner', \n\t\t\t'title' => 'Visit WPBeginner'\n\t\t\t)\n\t);\n\t$wp_admin_bar->add_node($args);\n\n// Add the first child link \n\t\n\t$args = array(\n\t\t'id' => 'wpbeginner-guides',\n\t\t'title' => 'WPBeginner Guides', \n\t\t'href' => 'http://www.wpbeginner.com/category/beginners-guide/',\n\t\t'parent' => 'wpbeginner', \n\t\t'meta' => array(\n\t\t\t'class' => 'wpbeginner-guides', \n\t\t\t'title' => 'Visit WordPress Beginner Guides'\n\t\t\t)\n\t);\n\t$wp_admin_bar->add_node($args);\n\n// Add another child link\n$args = array(\n\t\t'id' => 'wpbeginner-tutorials',\n\t\t'title' => 'WPBeginner Tutorials', \n\t\t'href' => 'http://www.wpbeginner.com/category/wp-tutorials/',\n\t\t'parent' => 'wpbeginner', \n\t\t'meta' => array(\n\t\t\t'class' => 'wpbeginner-tutorials', \n\t\t\t'title' => 'Visit WPBeginner Tutorials'\n\t\t\t)\n\t);\n\t$wp_admin_bar->add_node($args);\n\n// Add a child link to the child link\n\n$args = array(\n\t\t'id' => 'wpbeginner-themes',\n\t\t'title' => 'WPBeginner Themes', \n\t\t'href' => 'http://www.wpbeginner.com/category/wp-themes/',\n\t\t'parent' => 'wpbeginner-tutorials', \n\t\t'meta' => array(\n\t\t\t'class' => 'wpbeginner-themes', \n\t\t\t'title' => 'Visit WordPress Themes Tutorials on WPBeginner'\n\t\t\t)\n\t);\n\t$wp_admin_bar->add_node($args);\n\n}", "title": "" }, { "docid": "6d175a9207e6c38e24ce4644346befa2", "score": "0.5276614", "text": "public function init(){\n parent::init();\n $this->registerAssets();\n echo CHtml::openTag( $this->listTag, $this->computeListOptions());\n }", "title": "" }, { "docid": "1c396ac53a14fd9879b6a6ab1786ea8d", "score": "0.52721876", "text": "public function hook_menu() {\n $items = parent::hook_menu();\n // Extend the 'add' path.\n dpm($this->path, 'YapddUIController');\n $items[$this->path . '/add']['title'] = 'Add ' . yapdd_get_string('entity label');\n return $items;\n }", "title": "" }, { "docid": "7075cf5ebfcd246497af70579ba94645", "score": "0.52718776", "text": "public function admin_bar()\n\t{\n\t\tglobal $wp_admin_bar, $bulkmenow_model, $bulkmenow_externals;\n\t\n\t \tif( ! $wp_admin_bar ) return;\n\t if( ! is_admin_bar_showing() ) return;\n\n\t\t$count = $bulkmenow_model->count_according_status( 1 );\n\t\n\t\tif( $bulkmenow_externals->current_user_can_see( 'messages' ) AND get_option( 'bulkmenow_version' ) )\n\t\t{\n\t\t\t$wp_admin_bar->add_menu(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => 'bulkmenow',\n\t\t\t\t\t'title' => '<span class=\"ab-icon dashicons dashicons-email\" style=\"margin-top: 2px;\"></span><span class=\"ab-label\">' . $count . '</span>',\n\t\t\t\t\t'class' => 'ab-item',\n\t\t\t\t\t'href' => admin_url( 'admin.php?page=bulkmenow-list' )\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "b6e26128a5fdad6ded31b0d4ed183707", "score": "0.5269325", "text": "public function getTrackerSideMenu()\n {\n $controllerName = $this->dispatcher->getControllerName();\n $actionName = $this->dispatcher->getActionName();\n $paramName = '';\n if ($this->dispatcher->getParams()) {\n $paramName = $this->dispatcher->getParams()[0];\n }\n //echo '<ul class=\"nav nav-pills nav-stacked\" data-spy=\"affix\" data-offset-top=\"50\" data-target=\"#\">';\n echo '<ul class=\"nav nav-stacked affix\">';\n foreach ($this->_trackerSideMenu as $caption => $option) {\n if (preg_match(\"/^hr/\", $caption)) {\n echo '<hr />';\n continue;\n } elseif ($paramName != '') {\n if ($option['controller'] == $controllerName && ($option['action'] == $actionName) && $option['param'] == $paramName) {\n echo '<li class=\"active\">';\n } else {\n echo '<li>';\n }\n } else {\n if ($option['controller'] == $controllerName && ($option['action'] == $actionName)) {\n echo '<li class=\"active\">';\n } else {\n echo '<li>';\n }\n }\n\n echo Tag::linkTo($option['controller'] . '/' . $option['action'] . '/' . $option['param'], $caption), '<li>';\n }\n echo '</ul>';\n }", "title": "" }, { "docid": "1f03d08721118c259e0b33d956bc296b", "score": "0.5268537", "text": "function SetupListOptions() {\n\t\tglobal $Security, $t_lylich, $rs;\n\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t $item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"checkbox\"\n\t\t$this->ListOptions->Add(\"checkbox\");\n\t\t$item =& $this->ListOptions->Items[\"checkbox\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = ($Security->CanDelete() || $Security->CanEdit());\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" class=\\\"phpmaker\\\" onclick=\\\"t_lylich_list.SelectAllKey(this);\\\">\";\n\t\t$this->ListOptions->MoveItem(\"checkbox\", 0); // Move to first column\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($t_lylich->Export <> \"\" ||\n\t\t\t$t_lylich->CurrentAction == \"gridadd\" ||\n\t\t\t$t_lylich->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "title": "" }, { "docid": "bbe81fb132c5fe026c79b4bd859ee4f3", "score": "0.5264521", "text": "function check_list( $atts, $content = null ) {\n\t$content = str_replace('<ul>', '<ul class=\"check_list\">', do_shortcode($content));\n\treturn $content;\n\t\n}", "title": "" }, { "docid": "e0b98c50ed5add0575b97f66a9ea7c4b", "score": "0.52643085", "text": "function hook_skinr_group_PLUGIN_info() {\n $group['extension_example_menus'] = array(\n 'title' => t('Menus'),\n 'description' => t('Menu and navigation styles.'),\n );\n return $groups;\n}", "title": "" }, { "docid": "2e99d83bfc7d65af9ac39c0cc15e7703", "score": "0.52633804", "text": "function custom_list_func( $atts, $content = null ) {\n $atts = shortcode_atts( array(\n\t 'style' => 'list-1',\n ), $atts, 'custom_list' );\n $content = str_replace( '<ul>', '<ul class=\"'.$atts['style'].'\">', do_shortcode( $content ) );\n return $content;\n}", "title": "" }, { "docid": "ccff3a63bdeffccab663b99c7ae9f9b6", "score": "0.52620405", "text": "public function addFrontPageItems(){\n if ( $this->canShowTitles() ){\n $label = (is_multisite() && true === $this->args['network']) ? get_bloginfo('name') : $this->getLabel('home');\n $item = new WabootBreadcrumbItem($label,'');\n $this->addItem($item);\n }\n }", "title": "" }, { "docid": "a5d9011fcbdd464dc1ed4da2992efd3a", "score": "0.5258787", "text": "public function list_page_render () {\n\t\trequire_once( plugin_dir_path( __FILE__ ) . 'includes/admin/wp-structuring-admin-list.php' );\n\t\tnew Structuring_Markup_Admin_List( $this->text_domain );\n\t}", "title": "" }, { "docid": "85b22e2c34d1517b24f057ee1f15f770", "score": "0.52568305", "text": "function SetupListOptions() {\n\t\tglobal $Security, $t_linkad;\n\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\t\t\n\t\t// \"checkbox\"\n\t\t$this->ListOptions->Add(\"checkbox\");\n\t\t$item =& $this->ListOptions->Items[\"checkbox\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" class=\\\"phpmaker\\\" onclick=\\\"t_linkad_list.SelectAllKey(this);\\\">\";\n\t\t$this->ListOptions->MoveItem(\"checkbox\", 0); // Move to first column\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($t_linkad->Export <> \"\" ||\n\t\t\t$t_linkad->CurrentAction == \"gridadd\" ||\n\t\t\t$t_linkad->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "title": "" }, { "docid": "27cb7bde826e16702ba3b9eb6965ac06", "score": "0.5254755", "text": "function add_help_text(){ \n\t\t$screen = get_current_screen();\n\n\t\tif ($screen->id!='edit-prism_portfolio') return;\n\n\t get_current_screen()->add_help_tab( array(\n\t 'id' => 'prism-help-tab',\n\t 'title' => __( 'My Title', 'prism_portfolio' ),\n\t 'content' => __( 'This tab is below the built in tab.' )\n\t ) );\n\t}", "title": "" }, { "docid": "9384df30daf4c6d3aefe1760f616d3d2", "score": "0.52491266", "text": "function mumf_wishlist_add_button() {\n\t\techo '<div class=\"mumf-wishlist-button-container\">\n\t\t <a href=\"javascript:void(0)\" class=\"single_add_to_wishlist button alt\">Add to wishlist</a>\n\t\t </div>';\n\t}", "title": "" }, { "docid": "f5bed0151fb4e6aa2e32bda0ca8c16ed", "score": "0.52475816", "text": "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// \"griddelete\"\n\t\tif ($this->AllowAddDeleteRow) {\n\t\t\t$item = &$this->ListOptions->Add(\"griddelete\");\n\t\t\t$item->CssClass = \"text-nowrap\";\n\t\t\t$item->OnLeft = FALSE;\n\t\t\t$item->Visible = FALSE; // Default hidden\n\t\t}\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = FALSE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = ($this->CurrentAction == \"add\");\n\t\t$item->OnLeft = FALSE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = FALSE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = FALSE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = FALSE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "title": "" }, { "docid": "96281689943e46859d29028057e8a5f9", "score": "0.52469057", "text": "function onExtra($name)\r\n\t{\r\n\t\t$output = null;\r\n\t\tif($name==\"header\" && $this->yellow->getRequestHandler()==\"edit\")\r\n\t\t{\r\n\t\t\t$pluginLocation = $this->yellow->config->get(\"serverBase\").$this->yellow->config->get(\"pluginLocation\");\r\n\t\t\t$jqueryCdn = $this->yellow->config->get(\"jqueryCdn\");\r\n\t\t\t$output .= \"<script type=\\\"text/javascript\\\" src=\\\"{$jqueryCdn}\\\"></script>\\n\";\r\n\t\t\t$output .= \"<script type=\\\"text/javascript\\\" src=\\\"{$pluginLocation}markbar/jquery.markbar.js\\\"></script>\\n\";\r\n\t\t\t$output .= \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" media=\\\"all\\\" href=\\\"{$pluginLocation}markbar/themes/default/default.css\\\">\\n\";\r\n\t\t\t$output .= \"<script type=\\\"text/javascript\\\">\\n\";\r\n\t\t\t$output .= \"\\$(function(){\\$('textarea').markbar();});\";\r\n\t\t\t$output .= \"</script>\\n\";\r\n\t\t}\r\n\t\treturn $output;\r\n\t}", "title": "" }, { "docid": "1145023f709c1ce043ec8f8579cd5dab", "score": "0.5245085", "text": "public function prependToolbar($additionalToolbar)\n {\n return $this->toolbar(array_merge($additionalToolbar, $this->config('toolbar')));\n }", "title": "" }, { "docid": "fd0a867e67bb7f6acced4a1b4e80bd02", "score": "0.524343", "text": "public function initPageHeaderToolbar()\n {\n $this->page_header_toolbar_btn['back_url'] = array(\n 'href' => 'javascript: window.history.back();',\n 'desc' => $this->module->l('Back', 'AdminKbrcCriteria'),\n 'icon' => 'process-icon-back'\n );\n $this->page_header_toolbar_btn['new_template'] = array(\n 'href' => $this->context->link->getAdminLink('AdminKbrcAuditLog', true),\n 'desc' => $this->module->l('Audit Log'),\n 'icon' => 'process-icon-stats'\n );\n parent::initPageHeaderToolbar();\n }", "title": "" }, { "docid": "fd0a867e67bb7f6acced4a1b4e80bd02", "score": "0.524343", "text": "public function initPageHeaderToolbar()\n {\n $this->page_header_toolbar_btn['back_url'] = array(\n 'href' => 'javascript: window.history.back();',\n 'desc' => $this->module->l('Back', 'AdminKbrcCriteria'),\n 'icon' => 'process-icon-back'\n );\n $this->page_header_toolbar_btn['new_template'] = array(\n 'href' => $this->context->link->getAdminLink('AdminKbrcAuditLog', true),\n 'desc' => $this->module->l('Audit Log'),\n 'icon' => 'process-icon-stats'\n );\n parent::initPageHeaderToolbar();\n }", "title": "" }, { "docid": "b50ddcd51ea2e38fe9b16f0c5a1e4fc6", "score": "0.52431625", "text": "public function prependToolbar($additionalToolbar)\n {\n return $this->toolbar(array_merge($additionalToolbar, $this->data('toolbar')));\n }", "title": "" }, { "docid": "fff423d79b5cbf1e68a4d6fcdee2bb7f", "score": "0.5242104", "text": "public function displayAdditionalMetaTags() {\r\n $this->displayGenericAdditionalMetaTags($this->category);\r\n }", "title": "" }, { "docid": "56a3747caa04d7b7ca1b706ac075d7e9", "score": "0.52420056", "text": "protected function addToolbar()\n {\n $state = $this->get('State');\n $user = JFactory::getUser();\n\n JToolbarHelper::title('JCE - ' . JText::_('WF_PROFILES'), 'users');\n\n $bar = JToolBar::getInstance('toolbar');\n\n if ($user->authorise('jce.profiles', 'com_jce')) {\n JToolbarHelper::addNew('profile.add');\n JToolbarHelper::custom('profiles.copy', 'copy', 'copy', 'WF_PROFILES_COPY', true);\n \n // Instantiate a new JLayoutFile instance and render the layout\n $layout = new JLayoutFile('toolbar.uploadprofile');\n $bar->appendButton('Custom', $layout->render(array()), 'upload');\n\n JToolbarHelper::custom('profiles.export', 'download', 'download', 'WF_PROFILES_EXPORT', true);\n\n JToolbarHelper::publish('profiles.publish', 'JTOOLBAR_PUBLISH', true);\n JToolbarHelper::unpublish('profiles.unpublish', 'JTOOLBAR_UNPUBLISH', true);\n\n JToolbarHelper::deleteList('', 'profiles.delete', 'JTOOLBAR_DELETE');\n }\n\n JHtmlSidebar::setAction('index.php?option=com_jce&view=profiles');\n\n if ($user->authorise('core.admin', 'com_jce')) {\n JToolbarHelper::preferences('com_jce');\n }\n }", "title": "" }, { "docid": "c82469d444d60b8d6166615685e8eb03", "score": "0.5241809", "text": "abstract function addExtraContent();", "title": "" }, { "docid": "704147ef271f12d10c4faf89a66c3c5e", "score": "0.52387005", "text": "function render()\n\t{\n\t\t$model = $this->model;\n\t\t$this->items = $model->getList();\n\t\t$this->state = $model->getState();\n\t\t$this->pagination = $model->getPagination();\n\n\t\tJToolbarHelper::addNew('new');\n\n\t\treturn parent::render();\n\t}", "title": "" }, { "docid": "2b3584096cb793449943979020347c7d", "score": "0.5236723", "text": "public function initToolbar()\n {\n parent::initToolbar();\n\n if ($this->display != 'edit' && $this->display != 'add') {\n $this->toolbar_btn['import'] = [\n 'href' => $this->context->link->getAdminLink(DPDBaltics::ADMIN_IMPORT_EXPORT_CONTROLLER, true) .\n 'importContr=' . Config::IMPORT_EXPORT_OPTION_ZONES,\n 'desc' => $this->l('Import')\n ];\n }\n }", "title": "" }, { "docid": "25fab124ad9dc47cad54a02a4039f640", "score": "0.5235478", "text": "protected function addToolBar()\r\n\t{\r\n\t\t$title = JText::_('COM_HBMANAGER_GAMES_PREV_TITLE');\r\n\r\n\t\tJToolBarHelper::title($title, 'hb-ball');\r\n\t\tJToolBarHelper::custom('games.saveReport', 'save', 'save', JText::_('COM_HBMANAGER_GAMES_TOOLBAR_SAVE_ALL'), false);\r\n\t\tJToolBarHelper::custom('games.publishReport', 'out', 'out', JText::_('COM_HBMANAGER_GAMES_TOOLBAR_PUBLISH'), false);\r\n\t\tJToolBarHelper::custom('games.publishAllReport', 'out', 'out', JText::_('COM_HBMANAGER_GAMES_TOOLBAR_PUBLISH_ALL'), false);\r\n\t}", "title": "" }, { "docid": "517aa4b5ac52dd0dcd6dcea7be050742", "score": "0.52324224", "text": "function custom_admin_wp() {\n echo '<style>\n #wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions>li {\n margin-left: 0px;\n }\n </style>';\n}", "title": "" }, { "docid": "d9c701bb0724a1751c9f5bbe950f8f37", "score": "0.5221237", "text": "function rfwplugin_more_settings_section_markup(){\n if ( !current_user_can('manage_options') ) {\n return;\n }\n\n include(RFWPLUGIN_DIR . 'templates/rfwplugin-more-settings-markup.php');\n\n}", "title": "" }, { "docid": "a04b9634b5d88f00fc3aa98c3d141d10", "score": "0.52191395", "text": "public function beforeAdminMenuRender()\n {\n //code\n }", "title": "" } ]
f3a20eb086d74cb47ba34e09e42c4000
Saves captcha image to file
[ { "docid": "288ed4af56da8ac31387c2d15da1d88f", "score": "0.0", "text": "abstract public function save(string $filename, int $quality = 90): void;", "title": "" } ]
[ { "docid": "599ed10f555f8e4deee311389db7e3dc", "score": "0.66262585", "text": "protected function saveCaptcha()\n {\n $captchaPhrase = $this->captchaBuilder->getPhrase();\n $sessionKey = $this->getSessionKey();\n\n Yii::$app->session->set($sessionKey, $captchaPhrase);\n }", "title": "" }, { "docid": "4da89f16ee5c769d01099b4280884eb6", "score": "0.6594269", "text": "function save()\n {\n $this->IM->writeImages($this->img,true);\n }", "title": "" }, { "docid": "c126fbca1841a6334518b807ad953469", "score": "0.65365654", "text": "public function save()\n\t{\n\n\t\t$data = $this->input->post();\n\n\t\t//Composite image and get a image path\n\t\t$image_path = $this->composite_image->base64($data);\n\n\t\t//Send mail with attachment\n\t\t$email_status = $this->send_mail->send($image_path[0]);\n\n\t\t//Retweet message to user\n\t\t$this->twitter->retweet($image_path[1], $data['screenname']);\n\t\t\n\t\techo $image_path[2];\n\t}", "title": "" }, { "docid": "741d98150337f17e5b0c474cc00627c1", "score": "0.65024394", "text": "abstract function save_image($img, $fileout);", "title": "" }, { "docid": "aecabd2474fa81f53fb23ad13cbe6e2b", "score": "0.65007424", "text": "function save_image($post){\n\t\t//check if dir exists, if createe it\n\t\tif(!file_exists($this->DIR.\"/TESTING\")){\n\t\t\tmkdir($this->DIR.\"/TESTING\");\n\t\t}\n\t\t//create file \n\t\t$file = fopen($this->DIR.\"/TESTING/test.txt\", w) or die (\"Unable to open file\");\n\t\tfwrite($file,\" HELLO MYH NIGGUH\");\n\t\tfclose($file);\n\t}", "title": "" }, { "docid": "981cc5ceac630e8fc8a6acb4868415ba", "score": "0.6442631", "text": "public function saveImage()\n {\n // $image_array_2 = explode(\",\", $image_array_1[1]);\n\n $image_array = explode(\",\", $this->image);\n // ob_start();\n $data = base64_decode($image_array[1]);\n\n // print_r($data);\n\n // return ob_get_clean();\n\n $expl = explode(\".\", $this->image_name);\n $baseName = $expl[0];\n $filename = $this->generateFilename($baseName);\n $path = $_SERVER['DOCUMENT_ROOT'] . '/uploads2';\n $target = $path . '/' . $filename;\n\n if(!file_exists($path))\n mkdir($path, 0777, true);\n\n \n @chmod($target, 0777);\n\n $stream = fopen( $target, 'w+');\n \n fwrite($stream, $data);\n\n fclose($stream);\n //\n //file_put_contents($path, $data);\n // chmod($path, 0777);\n return $filename;\n }", "title": "" }, { "docid": "3980e4d9dba137611e6bcb1dad52881c", "score": "0.64291525", "text": "public static function saveImg(){\n\t\tif(Session::is_connected()){\n\t\t\tif(isset($_GET['formId'])){\n\t\t\t\t$f = ModelForm::select($_GET['formId']);\n\t\t\t\t$folder = $f->getUserNickname();\n\t\t\t}else{\n\t\t\t\t$folder = $_SESSION['nickname'];\n\t\t\t}\n\t\t\t//var_dump(\"media/\".$folder.\"/\".$_FILES['file']['name']);\n\t\t\techo move_uploaded_file($_FILES['file']['tmp_name'], \"media/\".$folder.\"/\".$_FILES['file']['name']);\n\t\t}\t\t\n }", "title": "" }, { "docid": "b18225a748ef6392cfafc8cc86cfe691", "score": "0.64043534", "text": "function save($destImagePath);", "title": "" }, { "docid": "102da43523ce9f1219e4e5759144abb0", "score": "0.6400729", "text": "private function imageSave()\n {\n $image = new ImageWorker($this->absolutePath.\"/temp/\".$this->fileName.\".\".$this->fileExtension);\n $image->convertToPng();\n $image->saveImagePng($this->fileName, $this->absolutePath);\n $image->createTempImage($this->fileName, $this->absolutePath);\n }", "title": "" }, { "docid": "b09384ad840f1dcae9edabe0fdbd1173", "score": "0.6290186", "text": "public function captcha_image()\n {\n require_once('../plugins'.DS.'captcha'.DS.'captcha.php');\n show_captcha();\n }", "title": "" }, { "docid": "28ee8c37bbebef57ce3d1c45934718cb", "score": "0.62201697", "text": "function save_image($img,$fullpath)\n {\n $ch = curl_init ($img);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);\n $rawdata=curl_exec($ch);\n curl_close ($ch);\n if(file_exists($fullpath))\n {\n unlink($fullpath);\n }\n $fp = fopen($fullpath,'x');\n fwrite($fp, $rawdata);\n fclose($fp);\n }", "title": "" }, { "docid": "8b84b75ac088d0bf54a56c3548c7268a", "score": "0.6143549", "text": "public function saveImage(Image $image);", "title": "" }, { "docid": "278124b1201fe3ffd7b37713989a7cdc", "score": "0.6007795", "text": "public function postImage()\n {\n $data = $_POST['image'];\n\t\t\n \n list($type, $data) = explode(';', $data);\n list(, $data) = explode(',', $data);\n \n $data = base64_decode($data);\n $imageName = time().'.png';\n file_put_contents('upload/'.$imageName, $data);\n \n echo 'done';\n }", "title": "" }, { "docid": "d65c1673172e17e3852b4df38cfc9c01", "score": "0.59638596", "text": "private function saveImg($file)\n {\n $target = join(DIRECTORY_SEPARATOR, array(Params::folderimg,Params::folderimgavatar, basename($file['name'])));\n $this::saveFile($file['tmp_name'], $target);\n }", "title": "" }, { "docid": "3aaf43e06fb5ec4c6c47029b975a78e0", "score": "0.59391063", "text": "public function captchaAction()\n\t\t{\n\t\t\t$session = new Zend_Session_Namespace('captcha');\n\t\t\t\n\t\t\t//check for existing phrase in session\n\t\t\t$phrase = null;\n\t\t\tif(isset($session->phrase) && strlen($session->phrase)>0)\n\t\t\t{\n\t\t\t\t$phrase = $session->phrase;\n\t\t\t}\n\t\t\t\n\t\t\t$captcha = Text_CAPTCHA::factory('Image');\n\t\t\t\n\t\t\t$opts = array('font_size' => 20,\n\t\t\t\t\t\t 'font_path' => Zend_Registry::get('config')->paths->data,\n\t\t\t\t\t\t 'font_file' => 'VeraBd.ttf');\n\t\t\t\t\t\t \n\t\t\t$captcha->init(120, 60, $phrase, $opts);\n\t\t\t\n\t\t\t//write the phrase to sessoin\n\t\t\t$session->phrase = $captcha->getPhrase();\n\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t//disable auto-rendering since we're outputting an image\n\t\t\t$this->_helper->viewRenderer->setNoRender();\n\t\t\theader('Content-type: image/png');\n\t\t\techo $captcha->getCAPTCHAAsPng();\n\t\t}", "title": "" }, { "docid": "c8474ad9a35a1fd89739f013b43c4604", "score": "0.59189135", "text": "public function testOutput()\r\n\t{\r\n\t\t$request = new Request(new Configuration(CONFIG_FILE));\r\n\t\t$captcha = new \\Framework\\Captcha($request);\r\n\t\t$image = $captcha->draw();\r\n\t\tset_exit_overload(function() { return false; });\r\n\t\t$result = $captcha->output($image);\r\n\t\tunset_exit_overload();\r\n\t\t$headerList = xdebug_get_headers();\r\n\t\t$this->assertContains('Content-type: image/png', $headerList);\r\n\t}", "title": "" }, { "docid": "c167a08c1d307f34cfa20057151a792a", "score": "0.5907962", "text": "public static function captcha($value) {\n\n $captcha = LIBRARYPATH . DS . \"security\" . DS . \"captcha\" . $value . \".jpg\";\n $image = imagecreatefromjpeg(LIBRARYPATH . DS . \"security\" . DS . \"fondo_captcha_60_30.jpg\");\n $textColor = imagecolorallocate($image, 0, 0, 0);\n\n imagestring($image, 5, 5, 5, $value, $textColor);\n imagejpeg($image, $captcha);\n\n $type = pathinfo($captcha, PATHINFO_EXTENSION);\n $data = file_get_contents($captcha);\n $base64 = 'data:image/' . $type . ';base64,' . base64_encode($data);\n\n imagedestroy($image);\n unlink($captcha);\n\n return $base64;\n }", "title": "" }, { "docid": "fc1a6e86a54e1a83e539a1669afcc381", "score": "0.5888824", "text": "function captchaSend( &$img ) {\n\t// Image meta info\n\t$mime\t= config( 'captcha_mime', \\CAPTCHA_MIME );\n\t$name\t= config( 'captcha_name', \\CAPTCHA_NAME );\n\t\n\t// Prepare headers\n\tsendGenFilePrep( $mime, $name, 200, false );\n\t\n\t// Send generated image and end execution\n\tswitch( $mime ) {\n\t\tcase 'image/png':\n\t\t\t\\imagepng( $img );\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'image/jpg':\n\t\tcase 'image/jpeg':\n\t\t\t\\imagejpeg( $img );\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'image/bmp':\n\t\t\t\\imagebmp( $img );\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "3fbd7d662d5d284b0488337ca6ddcef5", "score": "0.588211", "text": "function _create_captcha()\n\t{\n\t\t$this->load->helper('captcha');\n\n\t\t$cap = create_captcha(array(\n\t\t\t'img_path'\t\t=> './'.$this->config->item('captcha_path', 'ion_auth'),\n\t\t\t'img_url'\t\t=> base_url().$this->config->item('captcha_path', 'ion_auth'),\n\t\t\t'font_path'\t\t=> './'.$this->config->item('captcha_fonts_path', 'ion_auth'),\n\t\t\t'font_size'\t\t=> $this->config->item('captcha_font_size', 'ion_auth'),\n\t\t\t'img_width'\t\t=> $this->config->item('captcha_width', 'ion_auth'),\n\t\t\t'img_height'\t=> $this->config->item('captcha_height', 'ion_auth'),\n\t\t\t'show_grid'\t\t=> $this->config->item('captcha_grid', 'ion_auth'),\n\t\t\t'expiration'\t=> $this->config->item('captcha_expire', 'ion_auth'),\n\t\t));\n\n\t\t// Save captcha params in session\n\t\t$this->session->set_flashdata(array(\n\t\t\t\t'captcha_word' => $cap['word'],\n\t\t\t\t'captcha_time' => $cap['time'],\n\t\t));\n\n\t\treturn $cap['image'];\n\t}", "title": "" }, { "docid": "14c25f25c50c675a88c07ee3d78c4da5", "score": "0.58760273", "text": "public function saveUserImageIntoDiretory(){\n \n try{\n $pos = strpos($this->image, ';');\n $type = explode('/', substr($this->image, 0, $pos))[1]; \n\n $imageName = $this->getId() . '.' . $type;\n $ifp = fopen(\"../assets/images/users/\". $imageName, 'wb' );\n $data = explode( ',', $this->image );\n fwrite( $ifp, base64_decode( $data[ 1 ] ) );\n $this->setImage($imageName);\n\n // clean up the file resource\n fclose( $ifp ); \n }\n catch(Exception $e){}\n }", "title": "" }, { "docid": "64696254202ae484d48845f6f31eb854", "score": "0.5860025", "text": "public function captcha_refresh(){\n $values = array(\n 'word' => '',\n 'word_length' => 4,\n 'img_path' => './images/',\n 'img_url' => base_url() .'images/',\n 'font_path' => base_url() . 'system/fonts/texb.ttf',\n 'img_width' => '150',\n 'img_height' => 50,\n 'expiration' => 3600,\n 'font_size' => 30\n );\n $data = create_captcha($values);\n $_SESSION['captchaWord'] = $data['word'];\n echo $data['image'];\n \n }", "title": "" }, { "docid": "8d86a6cc9c7aad34b7d3d89d0953fd19", "score": "0.58590525", "text": "function captcha_reset_pwd($length)\n{\n \n$random_alpha = ircmaxell_generator_string('medium');\n$captcha_code = substr($random_alpha, 0, 6);\n \n$_SESSION['scriptlog_reset_pwd'] = $captcha_code;\n \n $layer = imagecreatetruecolor(70,30);\n $background = imagecolorallocate($layer, 153, 204, 0);\n imagefill($layer, 0, 0, $background);\n $text_color = imagecolorallocate($layer, 0, 0, 0);\n imagestring($layer, 5, 5, 5, $captcha_code, $text_color);\n\n /* Image header */\nheader(\"Content-Type: image/jpeg\");\n/* Invalidate cache. */\nheader(\"Expires: Mon, 01 Jul 1988 05:00:00 GMT\");\nheader(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\nheader(\"Cache-Control: no-store, no-cache, must-revalidate\");\nheader(\"Cache-Control: post-check=0, pre-check=0\", false);\nheader(\"Pragma: no-cache\");\n \n imagejpeg($layer);\n \n imagedestroy($layer);\n\n}", "title": "" }, { "docid": "3ad5f3e1f1763e8f0118b40a9b850224", "score": "0.58518946", "text": "public function captcha($name,$tmp)\n {\n //生成验证码图片的Builder对象,配置相应属性\n $builder = new CaptchaBuilder;\n //可以设置图片宽高及字体\n $builder->build($width = 200, $height = 80, '/public/fonts/consola.ttf');\n //获取验证码的内容\n $phrase = $builder->getPhrase();\n\n //把内容存入session\n Session::flash($name, $phrase);\n //生成图片\n header(\"Cache-Control: no-cache, must-revalidate\");\n header('Content-Type: image/jpeg');\n $builder->output();\n }", "title": "" }, { "docid": "85a782a580e166dd4617877fb3c6d4a6", "score": "0.58393157", "text": "function phpfmg_captcha_get(){\r\n $img = new phpfmgImage();\r\n $img->out();\r\n //$_SESSION[PHPFMG_ID.'fmgCaptchCode'] = $img->text ;\r\n $_SESSION[ phpfmg_captcha_name() ] = $img->text ;\r\n}", "title": "" }, { "docid": "a60c40d65dbee7cdee64c418c85b44b9", "score": "0.5819304", "text": "protected function handleFile()\n {\n $fileName = date(\"Ymd\") . round(microtime(true) * 1000) . rand(1, 1000000);\n\n $this->graphicsEnvironment->saveAsPng(\"tmp/\" . $fileName . \".png\");\n\n $path = \"tmp/\" . $fileName . \".png\";\n $type = pathinfo($path, PATHINFO_EXTENSION);\n $data = file_get_contents($path);\n\n $this->base64 = 'data:image/' . $type . ';base64,' . base64_encode($data);\n\n $myFile = \"tmp/\" . $fileName . \".png\";\n unlink($myFile) or die(\"Couldn't delete file\");\n }", "title": "" }, { "docid": "b5b6b273775dd90924ef98cb37268a0d", "score": "0.5798661", "text": "private function _generaImagen() {\n \t\n\t\t$nombreArchivo = md5('NOIMG-' . $this->_palabra . '-NOIMG' );\n \n\t\t//Si el archivo ya existe no hacemos nada\n\t\tif (file_exists(PUBDIR . 'img/captcha/' . $nombreArchivo . '.png')){\n\n\t\t\t$this->_captchaSIMG = new OwlImage('/img/captcha/' . $nombreArchivo . '.png', 100, 30);\t\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t} else {\n\t\t\t\n\t //Se obtiene el fondo\n\t $img = imagecreatefromgif(SHAREDIR . 'captcha/backs/'. rand(1, 5) .'.gif');\n\t \n\t //Algunos colorines\n\t\t\t$color = imagecolorallocate($img, 0, 0, 0);\n\t\t\t\n\t //Algunas fuentes\n\t $fuente = SHAREDIR .'captcha/fonts/'. rand(1, 3) .'.ttf';\n\t \n\t\t\t//Texto\n\t\t\t$tamaño = 13;\n\t\t\t$angulo = rand(-3, 3);\n\t\t\t$left = 17;\n\t\t\t$bottom = 22;\n\t\t\t\n\t\t\timagettftext($img, $tamaño, $angulo, $left, $bottom, $color, $fuente, $this->_palabra); \n\t\t\t\n\t //Se crea la imagen\n\t\t\tif (imagepng($img, SHAREDIR . 'captcha/images/' . $nombreArchivo . '.png')){\n\t\t\t\t\n\t\t\t\t$this->_captchaSIMG = new OwlImage('/img/captcha/' . $nombreArchivo . '.png', 100, 30);\n\t\t\t\t$this->_captchaSIMG->set_alt('Imagen de seguridad');\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t}\n\t\t}\n \n }", "title": "" }, { "docid": "8b9cc57852d231e976cf581b5de46df7", "score": "0.5795739", "text": "function saveimage($image,$type,$name,$subdir){\n\t\t$valkey = Security::generateAuthKey();\n\t\t$filename=\"/files/img/\".$subdir.$valkey.$name.'.'.$type;\n\t\t//si existe la imagen la eliminamos y reemplamos por la nueva\n\t\t$file = new File(WWW_ROOT.$filename,true,0644);\n\t\t$file->write($image,'wb',true);\n\t\t$file->close();\n\t\treturn $filename;\n\t}", "title": "" }, { "docid": "6e5438daed9d7d3e821011d556e590f4", "score": "0.5779251", "text": "public function index()\r\r\n {\r\r\n header('Content-type: image/jpeg');\r\r\n $builder = new Gregwar\\Captcha\\CaptchaBuilder;\r\r\n $builder->build();\r\r\n $this->session->set_userdata('captcha_phrase', $builder->getPhrase());\r\r\n $builder->output();\r\r\n }", "title": "" }, { "docid": "b9fef45be4f508c499a93aafad943288", "score": "0.5770326", "text": "function save_image($url, $name) {\n $image = $url;\n $imageName = 'images/'.$name;\n file_put_contents( $imageName, file_get_contents( $image ) );\n}", "title": "" }, { "docid": "d05a364bfc11508cd6bab800baaf70a0", "score": "0.5770262", "text": "public function saveImage() {\n $extension = pathinfo($_FILES['avatarRegister']['name'], PATHINFO_EXTENSION);\n $tempFile = $_FILES['avatarRegister']['tmp_name'];\n $finalName = uniqid( 'img_') . '.' . $extension;\n $finalPath = IMAGE_FILE_PATH . $finalName;\n move_uploaded_file($tempFile, $finalPath);\n \n return $finalName;\n }", "title": "" }, { "docid": "0beb123889325e3533a7669f96343440", "score": "0.5761689", "text": "public function generateCaptcha() {\r\n\t\t#captcha code\r\n\t\t$_SESSION['captcha'] = simple_php_captcha();\r\n\t\t#img source fix\r\n\t\t$captchaImage = preg_replace('/.*?\\/backend/', 'backend', $_SESSION['captcha']['image_src']);\r\n\r\n\t\t$this->sendResponse(1, $captchaImage);\r\n\t}", "title": "" }, { "docid": "17870c6df114f8bb1c9917324d68320a", "score": "0.57477057", "text": "function save($file_d) {\n imagepng($this->gd_d, $file_d);\n imagedestroy($this->gd_d);\n }", "title": "" }, { "docid": "c9754c1a16d92fd88ab1cd20f8add0d3", "score": "0.57435155", "text": "public function SaveProfileImg()\n {\n $file_name = $_SESSION['userId'] . \"-\" . time() . \"-\" . $this->imageName;\n $file_size = $this->imageSize;\n $file_tmp = $this->imageTmpName;\n $tmp = explode('.', $file_name);\n $file_ext = end($tmp);\n $expensions = array(\"jpeg\", \"jpg\", \"png\", \"gif\");\n\n if (in_array($file_ext, $expensions) === false) {\n throw new Exception(\"extension not allowed, please choose a JPEG or PNG or GIF file.\");\n }\n\n if ($file_size > 2097152) {\n throw new Exception('File size must be excately 2 MB');\n }\n\n if (empty($errors) == true) {\n move_uploaded_file($file_tmp, \"data/profile/\" . $file_name);\n return \"data/profile/\" . $file_name;\n } else {\n echo \"Error\";\n }\n }", "title": "" }, { "docid": "0d7127a3c9fe92f38e0dd8500afd6c81", "score": "0.573989", "text": "public function getImage()\n {\n $tempFilePath = tempnam(\n sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'o2system' . DIRECTORY_SEPARATOR,\n 'captcha'\n );\n\n if ( $image = imagecreatetruecolor( 200, 50 ) ) {\n $backgroundColor = imagecolorallocate( $image, 255, 255, 255 );\n $lineColor = imagecolorallocate( $image, 64, 64, 64 );\n $pixelColor = imagecolorallocate( $image, 0, 0, 255 );\n\n imagefilledrectangle( $image, 0, 0, 200, 50, $backgroundColor );\n\n for ( $i = 0; $i < 3; $i++ ) {\n imageline( $image, 0, rand() % 50, 200, rand() % 50, $lineColor );\n }\n\n for ( $i = 0; $i < 1000; $i++ ) {\n imagesetpixel( $image, rand() % 200, rand() % 50, $pixelColor );\n }\n\n $textColor = imagecolorallocate( $image, 0, 0, 0 );\n\n for ( $i = 0; $i < 6; $i++ ) {\n imagestring( $image, 10, 20 + ( $i * 30 ), 20, substr( $this->getToken(), $i, 1 ), $textColor );\n }\n\n imagepng( $image, $tempFilePath );\n\n $base64Image = base64_encode( file_get_contents( $tempFilePath ) );\n @unlink( $tempFilePath );\n\n return 'data:image/png;base64,' . $base64Image;\n }\n\n // Cannot Initialize new GD image stream\n throw new RuntimeException( 'E_SECURITY_CAPTCHA_GD_IMAGE_STREAM' );\n }", "title": "" }, { "docid": "7b952b28566f05ca307761073507d3d0", "score": "0.57155585", "text": "public function save()\n {\n if (self::$_localFile) {\n $hash = md5_file(self::$_localFile);\n }\n else {\n $hash = md5_file($this->tempName);\n }\n\n //$uploadDir = 'dimg';\n\n $fileName = mb_substr($hash, 0, 20) . '-' . time() . '.' . $this->extension;\n\n // default umask = 0022\n umask(0);\n\n $realDir = '/var/www/oreshki/data/www/oreshki-news.net/dimg/';\n\n if ($this->saveAs(\"{$realDir}/{$fileName}\")) {\n $this->name = \"{$fileName}\";\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "5705fd3a04d44e32b39d5d25d6b8b03d", "score": "0.57149476", "text": "function grabimages($content) {\n\t\t$html = $this->getSource();\n\t\t$imagepaths = $this->_get_imagepath($html);\n\t\tforeach($imagepaths as $imagepath) {\n\t\t\t$saveimg = basename($imagepath);\n\t\t\tfile_put_contents($saveimg, file_get_contents($captchaurl));\n\t\t}\n\t}", "title": "" }, { "docid": "72a0fbdf87aadcf1d6ba90a9db5c761c", "score": "0.56975126", "text": "public function refresh() {\n\n $image = $this->create_captcha();\n // Display captcha image\n echo $image;\n }", "title": "" }, { "docid": "dc707bd413de93f206c36e6167dd62ac", "score": "0.5687143", "text": "public function saveImageFile($data) {\n\t\t$imagename = md5(uniqid());\n\n\t\t$dest_fullpath = IMAGES . $this->image_folder . $imagename;\n\n\t\t$file = $data[get_class()]['file'];\n\t\t$res = move_uploaded_file($file['tmp_name'], $dest_fullpath);\n\t\tif ($res) {\n\t\t\tchmod($dest_fullpath, 0666);\n\t\t}\n\n\t\t$saveImage = array(get_class() => array('imagename' => $imagename));\n\t\treturn $this->save($saveImage);\n\t}", "title": "" }, { "docid": "3d30a9fc21584b035d72d93a288bafd9", "score": "0.5683657", "text": "public function regenerate()\n {\n $_SESSION[ 'captchaToken' ] = $this->token = strtoupper(\n substr(\n md5(\n uniqid(\n mt_rand(),\n true\n ) . 'CAPTCHA'\n ),\n 2,\n 6\n )\n );\n\n return $this->getImage();\n }", "title": "" }, { "docid": "717d6409bc4503690fa4465c89e991f8", "score": "0.5674641", "text": "function captcha($imglocation,$typeinbox) {\n\t\t$html = $this->getSource();\n\t\t$tidy = tidy_parse_string($html)->html()->value;\n\t\t$searchqp = htmlqp($tidy,'body');\n\t\t$captchaurl = $searchqp->branch($imglocation)->attr('src');\n\t\t$saveimg = '/tmp/mycaptcha.png';\n\t\tfile_put_contents($saveimg, file_get_contents($captchaurl));\n\t\t$tesseract = new TesseractOCR($saveimg);\n\t\t$crackedvalue = $tesseract->recognize();\n\t\t$this->driver->findElement(WebDriverBy::CssSelector($typeinbox))->sendKeys($crackedvalue);\n\t}", "title": "" }, { "docid": "fe676adf5a46591dd3cc78a7e86376c8", "score": "0.5657859", "text": "function saveWebImage($img){\n $tempfn = sprintf(\"%s.png\", tempnam(\"/var/webtmp\", \"ms\"));\n $img->save($tempfn);\n return sprintf(\"/tmp/%s\", basename($tempfn));\n}", "title": "" }, { "docid": "1933d7ffdbab3b7137cf4154fe69e01b", "score": "0.5652361", "text": "public function campaign_screenshot($campaign) {\n $file_name = $campaign->id . \".jpg\";\n $file_path = public_path(\"images/campaign/\" . $file_name);\n try {\n unlink($file_path);\n } catch (\\Exception $e) {\n\n }\n SnappyImage::loadView('seller.campaign_webview_raw', ['campaign' => $campaign])\n ->setOption('height', 315)\n ->setOption('width', 600)\n ->save($file_path);\n\n DB::table('companycampaign')->\n where('id', $campaign->id)->\n whereNull('deleted_at')->\n update(['image_path' => $file_name]);\n\n\n\n return $file_path;\n }", "title": "" }, { "docid": "d53b55b8dc5e0f553e1d7d3c4baa6287", "score": "0.5652133", "text": "private static function save_image() {\n try {\n $config = array(\n 'auto_process' => FALSE,\n 'path' => DOCROOT . 'assets/img/profile',\n 'auto_rename' => true,\n 'new_name' => substr(md5(uniqid()), 0, 10),\n 'ext_whitelist' => array('img', 'jpg', 'jpeg', 'gif', 'png'),\n );\n // Process uploaded image based on config //\n Upload::process($config);\n\n // Confirm upload is valid //\n if (Upload::is_valid()) {\n Upload::save(0);\n $upload = Upload::get_files(0);\n\n // Get a thumbnail image //\n Image::load($upload['saved_to'] . $upload['saved_as'], false, $upload['extension'])->resize(200, null, true)->save($upload['saved_to'] . 'thumb/' . $upload['saved_as']);\n // Get a mini image for comments //\n Image::load($upload['saved_to'] . $upload['saved_as'], false, $upload['extension'])->resize(50, 50, true)->save($upload['saved_to'] . 'mini/' . $upload['saved_as']);\n\n return $upload['saved_as'];\n } else {\n // Loop through errors and log them //\n foreach (Upload::get_errors(0)['errors'] as $err) {\n $errors[] = $err['message'];\n }\n Session::set_flash('error', $errors);\n Log::error('Upload Errors: ' . implode(', ', $errors), __METHOD__);\n return false;\n }\n } catch (Exception $e) {\n Log::error($e, __METHOD__);\n return false;\n }\n }", "title": "" }, { "docid": "5314a51829087a5d8c784dd3cf1fea8b", "score": "0.56489664", "text": "public function save()\n\t{\n\t\tif(isset($_POST['submit'])){\n\t\t\t$data = [\n\t\t\t\t'gambar' => $_FILES['file']['name'],\n\t\t\t\t'tmp' => $_FILES['file']['tmp_name'],\n\t\t\t\t'date' => date('Y-m-d H:i:s')\n\t\t\t];\n\t\t\tmove_uploaded_file($data['tmp'],'images/'. $data['gambar']);\n\t\t\tparent::insert($data['gambar'], $data['date']);\n\t\t}\n\t}", "title": "" }, { "docid": "2428b3303ae5b47e7210a766d3968e63", "score": "0.56357425", "text": "function si_contact_do_captcha_image() {\n global $captcha_path_cf;\n\n if( isset($_GET['ctf_show_captcha']) ) {\n\n require_once($captcha_path_cf .'/securimage.php');\n\n $img = new Securimage_ctf();\n $img->code_length = 4;\n\n $img->image_width = 175;\n $img->image_height = 60;\n\n if(isset($_GET['ctf_sm_captcha']) && $_GET['ctf_sm_captcha'] == 1) {\n $img->image_width = 132;\n\t $img->image_height = 45;\n }\n\n //set some settings\n $img->form_num = 1;\n if (isset($_GET['ctf_form_num']) && is_numeric($_GET['ctf_form_num']) && $_GET['ctf_form_num'] < 500){\n $img->form_num = $_GET['ctf_form_num'];\n }\n $img->use_multi_text = true;\n $img->use_transparent_text = true;\n $img->text_transparency_percentage = 20;\n $img->num_lines = 3;\n $img->perturbation = 0.6; // 1.0 = high distortion, higher numbers = more distortion\n $img->multi_text_color = array(\n '#6666FF','#660000','#3333CC','#993300','#0060CC',\n '#339900','#6633CC','#330000','#006666','#CC3366',\n );\n if (isset($_GET['difficulty']) && $_GET['difficulty'] == 1 ) {\n $img->perturbation = 0.5; // 1.0 = high distortion, higher numbers = more distortion\n $img->num_lines = 2;\n $img->multi_text_color = array('#6666FF','#660000','#3333CC','#993300','#0060CC');\n }\n if (isset($_GET['difficulty']) && $_GET['difficulty'] == 2 ) {\n $img->perturbation = 0.7; // 1.0 = high distortion, higher numbers = more distortion\n $img->num_lines = 6;\n }\n if (isset($_GET['no_trans']) && $_GET['no_trans'] == 1) {\n $img->use_transparent_text = false;\n }\n $img->charset = 'ABCDEFHKLMNPRSTUVWYZ234578';\n $img->ttf_file = $captcha_path_cf . '/ttffonts/ahg-bold.ttf'; // single font\n $img->line_color = new Securimage_Color_ctf(rand(0, 64), rand(64, 128), rand(128, 255));\n $img->image_type = 'png';\n $img->background_directory = $captcha_path_cf . '/backgrounds';\n $img->ttf_font_directory = $captcha_path_cf . '/ttffonts';\n $img->show('');\n\n unset($img);\n exit;\n}\n\n}", "title": "" }, { "docid": "d2c5641248b575f63054f803110a2aa5", "score": "0.56253105", "text": "public static function savePhoto()\n {\n if ($resource = self::fixPhotoRotation(self::user_photo())) {\n //save image highest quality (100)\n imagejpeg($resource, self::fullPhotoPath(), 100);\n self::savePhotoThumb($resource);\n if (is_resource($resource)) {\n imagedestroy($resource);\n }\n } else {\n //else save photo\n Image::make(self::user_photo())->save(self::fullPhotoPath());\n self::savePhotoThumb(self::user_photo());\n }\n }", "title": "" }, { "docid": "9af3d96515f97847d68d6ca3f962460f", "score": "0.56181943", "text": "public function exportImage( $keep_resorce = false )\n\t{\n\t\t// prepare Capatcha\n\t\t$this->getCaptchaImage();\n\n\t\t# Sending Header Info\n\t\theader( 'content-type: image/png' );\n\n\t\t# Exporting the final image\n\t\timagepng( $this->_final_image );\n\n\t\t# Clearing final image from the memory\n\t\timagedestroy( $this->_final_image );\n\n\t\t# Method End\n\t}", "title": "" }, { "docid": "447e501ac3805ba728c77007644bc735", "score": "0.5614444", "text": "public function get_captcha(){\n\t\t$this->load->helper('captcha');\n\t\t//delete old captcha images\n\t\t$this->delete_old_captcha();\n\n\t\t$vals = array(\n\t\t'word' => strtolower(random_string('alnum', 8)),\n\t\t'img_path'\t => './'.CAPTCHA_PATH,\n\t\t'img_url'\t => base_url().CAPTCHA_PATH,\n\t\t'img_width'\t => 138,\n\t\t'img_height' => 28,\n\t\t'border' => 0, \n\t\t//'font_path'\t => './'.FONT_PATH.'Instruction.ttf', \n\t\t'font_path'\t => './'.ADMIN_THEMES_DIR.'fonts/proximanova-bold-webfont',\n\t\t'expiration' => 7200\n\t\t);\n\t\t\n\t\t//echo $vals['font_path']; exit;\n\t\t // create captcha image\n\t\t$cap = create_captcha($vals);\n\t\t// store the captcha word in a session\n\t\t$this->session->set_userdata('admin_captcha', $cap['word']);\n\t\t//echo $cap['word']; echo $cap['image'];exit;\n\t\treturn $cap['image']; \n }", "title": "" }, { "docid": "63b0e72ee784e1e7220716ddb4d43ae4", "score": "0.56058234", "text": "private function _saveImage($canvas)\n {\n\n //Check to see if file directory exists; Create it if not\n if(!$this->_isDirectoryValid($this->_dest))\n return false;\n\n //Save image to destination using the appropriate type function\n switch(pathinfo($this->_dest,PATHINFO_EXTENSION))\n {\n case 'jpg':\n case 'jpeg':\n imagejpeg($canvas, $this->_dest,90);\n break;\n case 'png':\n imagepng($canvas, $this->_dest);\n break;\n case 'gif':\n imagegif($canvas, $this->_dest);\n break;\n default:\n return false;\n break;\n }\n\n //Free up memory\n imagedestroy($canvas);\n\n return (file_exists($this->_dest))? true : false;\n }", "title": "" }, { "docid": "3fea9c26aabdbe12ebdf590d55b73621", "score": "0.55975467", "text": "function generate_captcha()\n{\n $ci = &get_instance();\n\n $ci->load->helper('captcha');\n $values = array(\n 'img_path' => './../application/assets/captchas/',\n 'img_url' => base_url() . '../application/assets/captchas/',\n 'font_path' => './../application/assets/fonts/xerox-serif-narrow-italic.ttf',\n 'img_width' => 200,\n 'img_height' => 50,\n 'expiration' => CAPTCHA_EXPIRATION_TIME,\n 'word_length' => 8,\n 'font_size' => 20,\n 'pool' => '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',\n );\n\n $captcha = create_captcha($values);\n $data = array(\n 'captcha_time' => $captcha['time'],\n 'ip_address' => $ci->input->ip_address(),\n 'word' => $captcha['word']\n );\n\n $query = $ci->db->insert_string('captcha', $data);\n $ci->db->query($query);\n\n return $captcha['image'];\n}", "title": "" }, { "docid": "0ac3c8fc6b8c7c9b12c8d64dd1bb5d88", "score": "0.55742747", "text": "public function getCaptcha() {\n $rand = $this->randomString();\n $_SESSION[$this->sessionName] = md5($rand.$this->secretKey);\n $this->generateValidationImage($rand);\n }", "title": "" }, { "docid": "669b4fa745cb2036aa1f53f7aba8d17b", "score": "0.5565022", "text": "public function saveCKEditorPicture() {\n\n switch ($this->moduleName){\n case \"naf\":\n $imgFolder = NAF_MODULE_IMG_FOLDER_WEB;\n $fileFolder = NAF_MODULE_IMG_FOLDER_FILE_SYSTEM;\n $imgCKEditorFolder = NAF_MODULE_IMG_CKEDITOR_FOLDER_FILE_SYSTEM;\n $imgCKEditorFolderWeb = NAF_MODULE_IMG_CKEDITOR_FOLDER_WEB;\n break;\n case \"catalogue\":\n $imgFolder = CATALOGUE_MODULE_IMG_FOLDER_WEB;\n $fileFolder = CATALOGUE_MODULE_IMG_FOLDER_FILE_SYSTEM;\n $imgCKEditorFolder = CATALOGUE_MODULE_IMG_CKEDITOR_FOLDER_FILE_SYSTEM;\n $imgCKEditorFolderWeb = CATALOGUE_MODULE_IMG_CKEDITOR_FOLDER_WEB;\n break;\n default:\n throw new ExceptionExt(\"Module name not setup\");\n break;\n }\n\n $ckeditor = $this->InputFilter->getParameter(\"CKEditor\");\n $time = time();\n $tmpFileName = \"{$imgCKEditorFolder}{$ckeditor}-{$time}.jpg\";\n\n if (empty($_FILES[\"upload\"])){\n throw new ExceptionExt(\"No file transmitted\");\n }\n\n if (!is_writable($fileFolder)){\n throw new ExceptionExt(\"Image folder is not writable - $fileFolder\");\n }\n\n if (!is_dir($imgCKEditorFolder)){\n mkdir($imgCKEditorFolder, 0777, 1);\n }\n\n if (!is_writable($imgCKEditorFolder)){\n throw new ExceptionExt(\"Image CKEditor folder is not writable - $imgCKEditorFolder\");\n }\n\n if (false === is_uploaded_file($_FILES['upload']['tmp_name'])){\n throw new ExceptionExt(\"File is not uploaded through HTTP POST\");\n }\n\n if (false === move_uploaded_file($_FILES['upload']['tmp_name'], $tmpFileName)) {\n throw new ExceptionExt(\"Can not move uploaded file\");\n }\n\n print \"<script type=\\\"text/javascript\\\">window.parent.CKEDITOR.tools.callFunction(1, '\". FULL_SITE_URL . '/' . $imgCKEditorFolderWeb . \"{$ckeditor}-{$time}.jpg', '');</script>\";\n\n }", "title": "" }, { "docid": "fe3b1400133f42987944671c292c16de", "score": "0.5558481", "text": "protected function _saveImage($string)\n {\n $this->_streamOutputImage->write($string);\n }", "title": "" }, { "docid": "92217bacc8a4e6fb8f11d21cfc4c931a", "score": "0.55535036", "text": "public function save_image_info(){\r\n $old_image_url = $_FILES['client_image']['tmp_name'];\r\n $directory = 'assets/client_feedback_image/';\r\n $image_name = $_FILES['client_image']['name'];\r\n $new_img_url = $directory.$image_name;\r\n\r\n $image_type = pathinfo($image_name, PATHINFO_EXTENSION);\r\n $image_size = $_FILES['client_image']['size'];\r\n $check = getimagesize($old_image_url);\r\n\r\n if($check){\r\n if(file_exists($new_img_url)){\r\n die('The file alredy exits! Please Try another one.');\r\n }else{\r\n if ($image_size>5000000){\r\n die('File size is too large! Please upload Small file.');\r\n }else{\r\n if ($image_type != 'jpg' && $image_type != 'png'){\r\n die('File type is not valid! Please upload JPG or PNG file.');\r\n }else{\r\n /*code for move image in our project folder and etc*/\r\n move_uploaded_file($old_image_url, $new_img_url);\r\n return $new_img_url;\r\n }\r\n }\r\n }\r\n }else{\r\n die('The file you Upload is not an image! Please upload a Valid Image.');\r\n }\r\n\r\n }", "title": "" }, { "docid": "73525da26cb80e5486078469d7402400", "score": "0.553979", "text": "public function save_image() {\n\n\t\tif(empty($this->pic_caption) || empty($this->pic_type) || empty($this->file_path)) {\n\n\t\t\t$this->var_json(\"data element is null.\");\n\t\t\t\n\t\t\treturn 0;\n\n\t\t}\n\n\t\t$query = \"INSERT INTO picture(caption,type,filepath) \" \n\t\t\t.\"VALUES('\".$this->pic_caption.\"','\"\n\t\t\t.$this->pic_type.\"','\".$this->file_path.\"')\";\n\n\t\t$r = mysqli_query( $this->dbc , $query ); \n\n\n\t\tmysqli_close($this->dbc);\n\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "3ba3f8921586d9ebbf283cc1891f7a48", "score": "0.55349827", "text": "function create_image() \r\n{\r\n\t\r\n\t// Set the content-type\r\n\theader(\"Content-type: image/png\");\r\n\t$font = './monofont.ttf';\r\n\t// Create the image\r\n\t// $im = imagecreatetruecolor(400, 30);\r\n\t$width = 100; \r\n\t$height = 20; \r\n\t$font_size = $height * 0.75;\r\n\t$im = imagecreate($width, $height);\r\n\t// Create some colors\r\n\t$white = imagecolorallocate($im, 255, 255, 255);\r\n\t$grey = imagecolorallocate($im, 180, 180, 180);\r\n $grown = imagecolorallocate($im, 128, 0, 0);\r\n\t$black = imagecolorallocate($im, 0, 62, 62);\r\n\t$bg = imagecolorallocate($im, 215, 215, 215);\r\n\t\r\n\timagefilledrectangle($im, 0, 0, 399, 29, $white);\r\n\t\r\n\t// The text to draw\r\n\t$md5_hash = md5(rand(0,999)); \r\n\t//We don't need a 32 character long string so we trim it down to 6 \r\n\t$security_code1 = strtoupper(substr($md5_hash, 15, 3)); \r\n\t$security_code2 = strtoupper(substr($md5_hash, 18, 3));\r\n\t\r\n\t//Set the session to store the security code\r\n\t$_SESSION[\"captcha\"] = $security_code1.$security_code2;\r\n\t\r\n\t// Add background\r\n\timagettftext($im, 20, 0, 1, 16, $bg, $font, \"#######\");\r\n\t// Add the first 3 letter\r\n\timagettftext($im, 16, -10, 12, 13, $grown, $font, $security_code1);\r\n\t// Add the last 3 letter\r\n\timagettftext($im, 16, 20, 45, 20, $black, $font, $security_code2); // rotate 20 degree\r\n\t//imagettftext ( resource $image , float $size , float $angle , int $x , int $y , int $color , string $fontfile , string $text )\r\n\t\r\n\t// Using imagepng() results in clearer text compared with imagejpeg()\r\n\timagepng($im);\r\n\timagedestroy($im);\r\n\r\n}", "title": "" }, { "docid": "e0f3789d6c3a3a2616d5153b79dbeb1a", "score": "0.55306935", "text": "public function saveSocial(){\r\n $this->Common_model->loginCheck();\r\n if ($_FILES['addImage']['name'] != \"\") {\r\n $target = \"uploads/social/\";\r\n $types = array('image/jpeg', 'image/gif', 'image/png');\r\n $arg['addimage'] = rand().$_FILES['addImage']['name'];\r\n $image1 = $arg['addimage'];\r\n\r\n if (in_array($_FILES['addImage']['type'], $types)) {\r\n if($_FILES['addImage']['size'] <= 1000000) {\r\n if (move_uploaded_file($_FILES['addImage']['tmp_name'], $target.$image1)) {\r\n\r\n }\r\n }else{\r\n echo \"Your Image Should be less than 1 Mb\";\r\n }\r\n\r\n }\r\n }\r\n\r\n $banner = $this->AdminSocial_model->addSocial($_POST, $image1); \r\n\t}", "title": "" }, { "docid": "1dcc5aa10a5f3f6a0ac3940a22e831d0", "score": "0.5526295", "text": "protected function saveImage()\n {\n if (!$this->image) {\n return parent::path(false);\n }\n\n $this->filter();\n\n if (isset($this->result)) {\n return $this->result;\n }\n\n if (!$this->debug_watermarked && $this->get('debug')) {\n $ratio = $this->get('ratio');\n if (!$ratio) {\n $ratio = 1;\n }\n\n $locator = Grav::instance()['locator'];\n $overlay = $locator->findResource(\"system://assets/responsive-overlays/{$ratio}x.png\") ?: $locator->findResource('system://assets/responsive-overlays/unknown.png');\n $this->image->merge(ImageFile::open($overlay));\n }\n\n return $this->image->cacheFile($this->format, $this->quality, false, [$this->get('width'), $this->get('height'), $this->get('modified')]);\n }", "title": "" }, { "docid": "6240cfdf6125c6b92cef1d70b64e157c", "score": "0.55227745", "text": "public function generate(){\n\t\t\t$im = imagecreatetruecolor($this->width, $this->height);\n\n\t\t\t// 2. random background image.\n\t\t\t$bg_color = imagecolorallocate($im, mt_rand(200,255), mt_rand(200,255), mt_rand(200,255));\n\n\t\t\t// 3 change background color.\n\t\t\timagefill($im, 0, 0, $bg_color);\n\n\t\t\t// set five lines in captcha\n\t\t\tfor ($i=0; $i < 4; $i++) { \n\t\t\t\t$line_color = imagecolorallocate($im, mt_rand(50,100), mt_rand(50,100), mt_rand(50,100));\n\t\t\t\timageline($im, mt_rand(0, $this->width), mt_rand(0, $this->height), mt_rand(0, $this->width), mt_rand(0, $this->height), $line_color);\n\t\t\t}\n\n\t\t\t// set pixels in captcha\n\t\t\tfor ($i=0; $i < 200; $i++) { \n\t\t\t\t$pixel_color = imagecolorallocate($im, mt_rand(100,150), mt_rand(100,150), mt_rand(100,150));\n\t\t\t\timagesetpixel($im, mt_rand(0, $this->width), mt_rand(0, $this->height), $pixel_color);\n\t\t\t}\n\n\t\t\t// 4. get captcha string.\n\t\t\t$str = $this->getCaptchaString();\n\n\t\t\t// set captcha string color.\n\t\t\t$str_color = imagecolorallocate($im, mt_rand(0,50), mt_rand(0,50),mt_rand(0,50));\n\n\t\t\t// get captcha string start x and y\n\t\t\t$start_x = ceil($this->width / 2) - (ceil($this->width / 2) > 20 ? 20 : 5);\n\t\t\t$start_y = ceil($this->height / 2) - (ceil($this->height / 2) > 10 ? 10 : 5);\n\n\t\t\timagestring($im, $this->font, $start_x, $start_y, $str, $str_color);\n\n\t\t\t//\n\t\t\timagepng($im);\n\n\t\t\t// destroy image.\n\t\t\timagedestroy($im);\n\t\t}", "title": "" }, { "docid": "b7a1b72af0a7eea57bdc174477dd37f8", "score": "0.5516191", "text": "public function saveCKEditorPicture(){\n\n if ($this->ModuleNAFExt !== null){\n\n $this->ModuleNAFExt->saveCKEditorPicture();\n\n } else if ($this->ModuleNAF !== null) {\n\n $this->ModuleNAF->saveCKEditorPicture();\n\n } else if ($this->ModuleCatalogueExt !== null) {\n\n $this->ModuleCatalogueExt->saveCKEditorPicture();\n\n } else if ($this->ModuleCatalogue !== null) {\n\n $this->ModuleCatalogue->saveCKEditorPicture();\n\n }\n }", "title": "" }, { "docid": "3f917b527ea3785e6e35fda8373305a7", "score": "0.55097425", "text": "public function create_captcha()\n\t{\n\t\t\t\n\t\t\t$this->delete_old_captcha();\n\t\t\t\n\t\t\t$vals = array(\n\t\t\t\t'img_path' => './captcha/',\n\t\t\t\t'img_url' => base_url() . 'captcha/',\n\t\t\t\t'font_path' => './fonts/text3.ttf',\n\t\t\t\t'img_width' => 360,\n\t\t\t\t'img_height' => 100,\n\t\t\t\t'expiration' => 2000\n\t\t\t\t);\n\t\t\t\n\t\t\t$cap = create_captcha($vals);\n\t\t\t\n\t\t\t$key = md5($this->input->ip_address() + $cap['time'] + \"123\");\n\t\t\t\n\t\t\t$data = array(\n\t\t\t\t'captcha_time' => $cap['time'],\n\t\t\t\t'captcha_ip' => $this->input->ip_address(),\n\t\t\t\t'captcha_word' => $cap['word'],\n\t\t\t\t'captcha_key' => $key\n\t\t\t);\n\t\t\t$query = $this->db->insert_string('watch_captcha', $data);\n\t\t\t$this->db->query($query);\n\t\t\t\n\t\t\t$array = array(\"captcha\" => $cap, \"key\" => $key);\n\t\t\t\n\t\t\treturn $array;\n\n\t}", "title": "" }, { "docid": "51f0b0a045bf5f94b59a000a216f3c08", "score": "0.5506594", "text": "public function saveToFile($filename)\n\t{\n\t\treturn (bool)@imagepng($this->imghandle, $filename);\n\t}", "title": "" }, { "docid": "ab62f59e988c3a517cb1d21f0b033419", "score": "0.54903555", "text": "public function saveAs($fileName);", "title": "" }, { "docid": "1e9d33c8b83bc69d9722933bb97a68f2", "score": "0.54756564", "text": "function form_input_captcha()\n{\n\t$tabindex=get_form_field_tabindex(NULL);\n\n\tgenerate_captcha();\n\n\t// Show template\n\t$input=do_template('FORM_SCREEN_INPUT_CAPTCHA',array('_GUID'=>'f7452af9b83db36685ae8a86f9762d30','TABINDEX'=>strval($tabindex)));\n\treturn _form_input('security_image',do_lang_tempcode('SECURITY_IMAGE'),do_lang_tempcode('DESCRIPTION_SECURITY_IMAGE'),$input,true,false);\n}", "title": "" }, { "docid": "a8f1bce55a787858e3e8cd94081e0043", "score": "0.5465907", "text": "function saveFile() {\n $move = move_uploaded_file($_FILES['file']['tmp_name'], \"./asset/img/gif/\".$_POST['title'].\"_\".$_SESSION['user']['id'].\".gif\");\n if ($move === false) {\n return -1;\n } else\n copyToJpg(\"./asset/img/gif/\".$_POST['title'].\"_\".$_SESSION['user']['id'].\".gif\");\n return 0;\n}", "title": "" }, { "docid": "6a3b88ff59add280fcb6765091b77617", "score": "0.54649085", "text": "private function getCaptchaImage(){\n\n\t\t// This Is an Organizer Methods that uses all other methods to get the final image\n\n\t\t// 1- Calculating && Setting required Image Dimensions ==> min_width, min_height, width, height\n\t\t$this->calculateDimensions();\n\n\t\t// 2- Creating image itself\n\t\t$this->createCaptchaImage();\n\n\t\t// 3- Adding the Texts to the image\n\t\t$this->drawCapatchaImageText();\n\n\t\t// 4- Doing Some fixs to the final image\n\t\t$this->fixCaptchaImage();\n\n\t}", "title": "" }, { "docid": "f7dc0d1f94a70ff12d57d72318e4d9d4", "score": "0.54630506", "text": "public function testSaveAsPNGFile()\n {\n }", "title": "" }, { "docid": "1d9b1a85c89ea29a907aa9c6c4bcda61", "score": "0.54617345", "text": "public function testSaveAsPNG()\n {\n }", "title": "" }, { "docid": "b4d9d9312baead609ddd933ca907f7b4", "score": "0.5456797", "text": "public function save() {\n\t\t$this->make_upload_dir();\n\t\tmove_uploaded_file($this->tmp_name, $this->get_path());\n\t}", "title": "" }, { "docid": "44355b75c8c399da32908ea25c7138ba", "score": "0.54523593", "text": "public function createCaptchCode()\n\t\t{\n\t\t\t// 图片资料库\n\t\t\t$table = array(\n\t\t\t\t'pic0' => '猫',\n\t\t\t\t'pic1' => '狗',\n\t\t\t\t'pic2' => '熊',\n\t\t\t\t);\n\t\t\t// 随即获取图片\n\t\t\t$index = rand(0,2);\n\t\t\t$value = $table['pic'.$index];\n\t\t\t$_SESSION['authcode'] = $value;\n\t\t\t// 查找文件路径 获取文件内容\n\t\t\t$filename = dirname(__FILE__).'//pic'.$index.'.jpg';\n\t\t\t$content = file_get_contents($filename);\n\t\t\t//输出图片到浏览器\t\n\t\t\theader('content-type:image/jpg');\n\t\t\techo $content;\n\t\t}", "title": "" }, { "docid": "0db53a8962373e33e9bcaf40204c0bfd", "score": "0.54288405", "text": "private function saveFile($name, $option)\n {\n //Ektensi image still intact\n $images = str_slug($name) . time() . '.' .\n $photo->getClientOriginalExtension();\n //set path to save images\n $path = public_path('uploads/chemicals');\n //cek if uploads/chemical not a directory / folder\n if(!File::isDirectory($path)) {\n //so create folder\n File::makeDirectory($path, 0777, true, true);\n }\n //copy image to folder uploads/chemicals\n Image::make($photo)->save($path . '/' . $images);\n //return file name on images variable\n return $images;\n }", "title": "" }, { "docid": "a771135939435e5b06f2855be1219bd9", "score": "0.5416371", "text": "public function save($filename, $path=\"\", $extension=\"\"){\n\t\n\t\t//add extension\n\t\tif($extension == \"\"){\n\t\t\t$filename .= $this->getExtension(true);\n\t\t}else{\n\t\t\t$filename .= \".\".$extension;\n\t\t}//if\n\t\n\t\t//add trailing slash if necessary\n\t\tif($path != \"\"){\n\t\t\t$path = realpath($path).DIRECTORY_SEPARATOR;\n\t\t}//if\n\t\n\t\t//create full path\n\t\t$fullPath = $path.$filename;\n\t\n\t\t//Copy file\n\t\tif(!copy($this->image, $fullPath)){\n\t\t\tthrow new Exception(\"Cannot save file \".$fullPath);\n\t\t}//if\n\t\t\n\t\t//Set new main image\n\t\t$this->setNewMainImage($fullPath);\n\t\t\n\t\treturn true;\n\t\t\n\t}", "title": "" }, { "docid": "f9f93959e808a0e091efeec5a8117800", "score": "0.54111046", "text": "protected function saveImage($fileName = 'text-image', $location = ''){\n $fileName = $fileName . \".png\";\n $fileName = !empty($location) ? $location . $fileName : $fileName;\n return imagepng($this->image, $fileName);\n }", "title": "" }, { "docid": "27467458ce777ecfb92d274fe6aef76d", "score": "0.5407036", "text": "private function grab_image($url,$saveto){ # Saves images to disk given URL and save location (location is rel to root of website).\r\n\t\t$ch = curl_init ($url);\r\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\tcurl_setopt($ch, CURLOPT_BINARYTRANSFER,1);\r\n\t\t$raw=curl_exec($ch);\r\n\t\tcurl_close ($ch);\r\n\t\tif(file_exists($saveto)){\r\n\t\t\tunlink($saveto);\r\n\t\t}\r\n\t\t$fp = fopen($saveto,'x');\r\n\t\tfwrite($fp, $raw);\r\n\t\tfclose($fp);\r\n\t}", "title": "" }, { "docid": "d0c2487067bf1eb37675ad9bdb29e85b", "score": "0.54001766", "text": "function _create_captcha() {\n $this->load->helper('captcha');\n $vals = array(\n 'word' => '',\n 'img_path' => './captcha/',\n 'img_url' => base_url().'captcha/',\n 'font_path' => './system/fonts/texb.ttf',\n 'img_width' => 280,\n 'img_height' => 50,\n 'expiration' => 7200,\n 'word_length' => 6,\n 'font_size' => 24,\n 'img_id' => 'Imageid',\n 'pool' => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',\n\n // White background and border, black text and red grid\n 'colors' => array(\n 'background' => array(255, 255, 255),\n 'border' => array(255, 255, 255),\n 'text' => array(0, 0, 0),\n 'grid' => array(255, 40, 40)\n )\n );\n $cap = create_captcha($vals);\n $data = array(\n 'captcha_time' => $cap['time'],\n 'ip_address' => $this->input->ip_address(),\n 'word' => $cap['word']\n );\n\n $query = $this->db->insert_string('captcha', $data);\n $this->db->query($query);\n // echo $cap['image'];\n // die('Debug Mode....................');\n\n return $cap['image'];\n }", "title": "" }, { "docid": "74cff658c55ed82d284f3cbddeef614e", "score": "0.5389613", "text": "function saveUploadedImage($file) {\n\t// The image path is returned.\n\t$type = $file ['type'];\n\tif (strstr ( $type, '/', true ) != 'image') {\n\t\treturn null;\n\t}\n\t$filename = md5_file ( $file ['tmp_name'] );\n\t$filepath = sfConfig::get ( 'sf_upload_dir' ) . '/' . $filename . '.jpg';\n\tsystem ( 'convert ' . $file ['tmp_name'] . ' -resize 640x640 ' . $filepath );\n\treturn $filepath;\n}", "title": "" }, { "docid": "5c3c3c251fd60d0cb3059245415ed09a", "score": "0.53652847", "text": "abstract protected function captcha();", "title": "" }, { "docid": "e1b3ec2e8e896d37838dadaaeeff7579", "score": "0.5365251", "text": "protected function uploadImage()\n {\n $this->saveImage(false);\n }", "title": "" }, { "docid": "bc6f469e85ef5b2b0fa7919fa1f2fee0", "score": "0.53614014", "text": "public function code()\n {\n //生成验证码图片的Builder对象,配置相应属性\n $builder = new CaptchaBuilder;\n //可以设置图片宽高及字体\n $builder->build($width = 150, $height = 38, $font = null);\n //获取验证码的内容\n $phrase = $builder->getPhrase();\n\n //把内容存入session\n session(['code'=>$phrase]);\n //生成图片\n header(\"Cache-Control: no-cache, must-revalidate\");\n header('Content-Type: image/jpeg');\n $builder->output();\n }", "title": "" }, { "docid": "7886e34f8f839705b87dcb1a46692a6d", "score": "0.53542644", "text": "function generateCaptcha()\n{\n\t$C =& get_instance();\n\t$C->load->helper('captcha');\n\t\n\t$word = random_string('alnum','6');\n\t\t\n\t$vals = array(\n\t\t'word'\t => $word,\n\t\t'img_path'\t => './assets/captcha/',\n\t\t'img_url'\t => asset_url().'assets/captcha/',\n\t\t'font_path'\t => './font/helveticaneue.ttf',\n\t\t'img_width'\t => '130',\n\t\t'img_height' => 30,\n\t\t'expiration' => 7200\n\t);\n\t\n\t$k = md5($C->router->method);\n\t\n\t$past = $C->session->userdata($k);\n\t\n\t//will unlink past image\n\tif(count($past) > 0)\n\t\t@unlink('./assets/captcha/'.$past['cp_time'].\".jpg\");\n\t\t\n\t$dt = create_captcha($vals);\n\t$fn = array('word'=>$dt['word'],'cp_time'=>$dt['time']);\n\t$C->session->set_userdata($k,$fn);\n\t\n\treturn $dt;\n}", "title": "" }, { "docid": "14abc1de75521037e7ed3a298684bcce", "score": "0.5348565", "text": "public function tour_inclusions_save() {\r\n\r\n $banner_image = $_FILES['inclusion_image']['name'];\r\n $filename = basename($banner_image);\r\n $extension = pathinfo($filename, PATHINFO_EXTENSION);\r\n $uniqueno = substr(uniqid(),0,5);\r\n $randno = substr(rand(),0,5);\r\n $new = $uniqueno.$randno.'.'.$extension;\r\n $folder = $this->template->domain_image_upload_path();\r\n $folderpath = trim($folder.$new);\r\n $path = addslashes($folderpath);\r\n move_uploaded_file($_FILES['inclusion_image']['tmp_name'], $folderpath); \r\n $inclusion_image = $new; \r\n\r\n $data = $this->input->post();\r\n //debug($data);exit;\r\n $inclusion = sql_injection($data['inclusion']);\r\n $query = \"insert into tour_inclusions set inclusion='$inclusion',\r\n status=1,\r\n inclusion_image='$inclusion_image'\";\r\n //echo $query; exit;\r\n $return = $this->tours_model->query_run($query);\r\n if(!$return)\r\n {\r\n echo $return; \r\n} \r\nredirect('tours/tour_inclusions'); \r\n}", "title": "" }, { "docid": "aee320ec064fe06edea8a9f068740152", "score": "0.53482574", "text": "function save($filename, $image_type=IMAGETYPE_JPEG, $compression=75, $permissions=null) {\r\r\n $image_type=$this->image_type;\r\r\n\r\r\n if( $image_type == IMAGETYPE_JPEG ) {\r\r\n imagejpeg($this->image,$filename,$compression);\r\r\n } elseif( $image_type == IMAGETYPE_GIF ) {\r\r\n imagegif($this->image,$filename); \r\r\n } elseif( $image_type == IMAGETYPE_PNG ) {\r\r\n // need this for transparent png to work \r\r\n imagealphablending($this->image, false);\r\r\n imagesavealpha($this->image,true);\r\r\n imagepng($this->image,$filename);\r\r\n } \r\r\n if( $permissions != null) {\r\r\n chmod($filename,$permissions);\r\r\n }\r\r\n }", "title": "" }, { "docid": "8faba3552d29417ea0e366e68955cca1", "score": "0.53457963", "text": "public function SavePicture(){\n if( Input::file('image')){\n $file = Input::file('image');\n $file->move('UserImage', $file->getClientOriginalName() ); //l'image sera enregistrer dans public/UserImage\n return $file->getClientOriginalName() ;\n }\n else {\n return \"Default.png\";\n }\n }", "title": "" }, { "docid": "62345fb75168bfbed3ebc5ad83f633f5", "score": "0.53411967", "text": "private function _save()\n\t\t{\n\t\t\t$res=$this->file->open($this->tmpfile);\n\t\t\t$this->_parse();\n\t\t\tif (! $this->file->addFromString('content.xml', $this->contentXml)) {\n\t\t\t\tthrow new OdfException('Error during file export addFromString');\n\t\t\t}\n\t\t\tif (! $this->file->addFromString('styles.xml',$this->stylesXml)) {\n\t\t\t\tthrow new OdfException('Error during file export addFromString');\n\t\t\t}\n\t\t\tif (! $this->file->addFromString('meta.xml',$this->metaXml)) {\r\n\t\t\t\tthrow new OdfException('Error during file export addFromString');\r\n\t\t\t}\n\t\t\tforeach ($this->images as $imageKey => $imageValue) {\n\t\t\t\t$this->file->addFile($imageKey, 'Pictures/' . $imageValue);\n \t$this->addImageToManifest($imageValue);\n\t\t\t}\n \tif (! $this->file->addFromString('./META-INF/manifest.xml', $this->manifestXml)) {\n \tthrow new OdfException('Error during file export: manifest.xml');\n \t}\n\t\t\t$this->file->close();\n\t\t}", "title": "" }, { "docid": "73ae6822cd093fc3d5294d6ca01e99f6", "score": "0.5338911", "text": "function save_image($inPath){\n\t\t$time = getdate();\n\t\t$folder = $time['mday'].$time['mon'].$time['year'];\n\t\t$path = '../images/baiviet/';\n\t\tif(!is_dir($path.$folder))\n\t\t\tmkdir($path.\"$folder\", 0777);\n\t\t$outPath = $path.$folder.'/baokinhdoanh'.$time[0].'.jpg';\n \t$in= fopen($inPath, \"rb\");\n\t $out= fopen($outPath, \"wb\");\n\t while ($chunk = fread($in,8192))\n\t {\n \t fwrite($out, $chunk, 8192);\n\t }\n \tfclose($in);\n\t fclose($out);\n\t\treturn $outPath;\n\t}", "title": "" }, { "docid": "f5f8a0e10b88c140ef7e004f560ca813", "score": "0.5333488", "text": "public function save($filename);", "title": "" }, { "docid": "2f5c0425fb9f00c44e3dd16b42f1c9c4", "score": "0.532459", "text": "function save_image($inPath, $outPath)\n{\n $in = fopen($inPath, \"rb\");\n $out = fopen($outPath, \"wb\");\n while ($chunk = fread($in, 8192)) {\n fwrite($out, $chunk, 8192);\n }\n fclose($in);\n fclose($out);\n}", "title": "" }, { "docid": "c152dc15c507a75a6a81631d9ccf629b", "score": "0.5321118", "text": "public function save(){\n if ($this->file['type'] == 'application/x-bittorrent' and $this->image['type'] == 'image/jpeg' or $this->image['type'] == 'image/png') {\n $uuid4 = Uuid::uuid4();\n $time = time();\n $this->time = $time;\n $file_name = $uuid4.\"_\".$this->file['name'];\n $image_name = $uuid4.\"_\".$this->image['name'];\n move_uploaded_file($this->file[\"tmp_name\"],\"public/torrents/$file_name\");\n move_uploaded_file($this->image[\"tmp_name\"],\"public/images/$image_name\");\n $this->file = $file_name;\n $this->image = $image_name;\n $torrent = json_encode($this);\n file_put_contents(\"database/torrents/{$uuid4->toString()}.json\",$torrent);\n Router::redirect(\"torrent/list\");\n }\n else{\n ren(\"torrent-form\",[\"error\" => \"Invalid file type\"]);\n }\n }", "title": "" }, { "docid": "db7f2190790374b13f3af34eb5d4a41c", "score": "0.5305348", "text": "private function createCaptchaImage()\n\t{\n\n\t\t$this->_image_resource = imagecreatetruecolor( $this->_image_info['width'], $this->_image_info['height'] );\n\n\t\tif( function_exists( 'imageantialias' ) )\n\t\t\timageantialias( $this->_image_resource, true );\n\n\t\t# Get Colors Values\n\t\t$rgb = $this->getRGBFromRange(\n\t\t\t$this->_image_info['color'][0],\n\t\t\t$this->_image_info['color'][1],\n\t\t\t$this->_image_info['color'][2],\n\t\t\t$this->_image_info['color']['range']\n\t\t\t);\n\n\t\t# Get Color;\n\t\t$background_color = imagecolorallocate(\n\t\t\t$this->_image_resource,\t\t\t\t\t# Image Resource\n\t\t\t$rgb[0],\t\t\t\t\t\t\t\t# R\n\t\t\t$rgb[1],\t\t\t\t\t\t\t\t# G\n\t\t\t$rgb[2]\t\t\t\t\t\t\t\t\t# B\n\t\t\t);\n\n\t\t# Apply Color\n\t\timagefill(\n\t\t\t$this->_image_resource,\t\t\t\t\t# Image Resource\n\t\t\t0,\t\t\t\t\t\t\t\t\t\t# Positon X\n\t\t\t0,\t\t\t\t\t\t\t\t\t\t# Positon Y\n\t\t\t$background_color\t\t\t\t\t\t# Color\n\t\t\t);\n\n\n\t\t# Method End\n\t}", "title": "" }, { "docid": "854b4c7c75ce09a90d4a905897e55284", "score": "0.5299046", "text": "function dhvc_form_field_captcha_tmp_dir() {\n\treturn dhvc_form_upload_dir('dir').'/captcha';\n}", "title": "" }, { "docid": "164d0a7142a9b264112fb6716f1a9e7d", "score": "0.52958727", "text": "public function savePic($filename, $content) {\r\n return $this->write($filename, core()->config()->getDATA_PICPATH(), '.jpg', $content);\r\n }", "title": "" }, { "docid": "014b8a5c889b7c40772211a892c6450f", "score": "0.52777267", "text": "function saveOutput(){\n\t\n\t\tif($this->outputfilepointer){\n\t\t\tif($this->imagestats[2] == 2){\n\t\t\t\timagejpeg($this->outputfilepointer , $this->workingpath . $this->resizedimagefilename , 60 );\n\t\t\t\treturn true;\n\t\t\t} else if($this->imagestats[2] == 1){\n\t\t\t\timagegif($this->outputfilepointer , $this->workingpath . $this->resizedimagefilename );\n\t\t\t\treturn true;\n\t\t\t} else if($this->imagestats[2] == 3){\n\t\t\t\timagepng($this->outputfilepointer , $this->workingpath . $this->resizedimagefilename , 3 );\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t\t\n\t}", "title": "" }, { "docid": "e76bc595e14f8bd32cbbabe0f6087d50", "score": "0.52761966", "text": "function image_save($url)\n{\n $file_info = image_get_info_by_url($url);\n\n $filename = md5($url) . '.' . image_extension_by_mime($file_info['mime']);\n $destination = IMAGE_ORIGINAL_PATH . $filename;\n $saved = file_put_contents(\n $destination,\n file_get_contents($url)\n );\n // generate preview\n if ($saved !== false) {\n $preview_path = IMAGE_PREVIEW_PATH . $filename;\n image_generate_preview($destination, $preview_path, $file_info['mime']);\n }\n return ($saved !== false) ? $filename : null;\n}", "title": "" }, { "docid": "321b607b44c383bb328f24377fa55cf8", "score": "0.5274804", "text": "public function saveExperiment();", "title": "" }, { "docid": "108ebd33dd9a4da22c0eb189cc1b3a94", "score": "0.5268972", "text": "function save_images($url,$saveto){\n $ch = curl_init ($url);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);\n $raw=curl_exec($ch);\n curl_close ($ch);\n if(file_exists($saveto)){\n unlink($saveto);\n }\n $fp = fopen($saveto,'x');\n fwrite($fp, $raw);\n fclose($fp);\n}", "title": "" }, { "docid": "60097ec2504e4bf57f15426e7c55df20", "score": "0.5259151", "text": "public function blob() {\n header('Content-Type:image/png');\n echo imagepng($this->image);\n }", "title": "" }, { "docid": "6c1e30a90a6e94e0095c69cbb3f8ecfb", "score": "0.5255597", "text": "private function guardaImagen(){\r\n\t\t$this->files['imageM']['name'] = utf8_encode($this->files['imageM']['name']);\r\n\t\t$pathCom = $this->session['pathSys'].\"img/banners/\".$this->files['imageM']['name'];\r\n\t\t$path = 'img/banners/'.$this->files['imageM']['name'];\t\t\r\n\t\t$web = $this->session['pathWeb'].\"img/banners/\".$this->files['imageM']['name'];\t\t\r\n\t\ttry{\t\t\t\r\n\t\t\tif($this->validaArchivo()){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif (move_uploaded_file($this->files['imageM']['tmp_name'], $path)) {\r\n\t\t\t\t\t\t$this->insertaArchivo($pathCom, $web);\r\n\t\t\t\t\t\t$this->mensaje = Comunes::MSGSUCESS;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$this->mensaje = \"No se cargo el archivo\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(\\Exception $e){\r\n\t\t\t\t\t$this->mensaje = Comunes::MSGERROR;\r\n\t\t\t\t\t$this->writeLog($e->getMessage(), Comunes::ERROR);\r\n\t\t\t\t}\t\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t$this->writeLog($this->mensaje, Comunes::INFO);\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\tcatch(\\Exception $e){\r\n\t\t\t$this->mensaje = Comunes::MSGERROR;\r\n\t\t\t$this->writeLog($e->getMessage(), Comunes::ERROR);\r\n\t\t}\t\r\n\t}", "title": "" }, { "docid": "245bdd024b33b8dd186c611829b36f40", "score": "0.525386", "text": "public static function OutputFileToBrowser($image, $fileNameForSave)\n\t\t{\n\t\t\t$fileExt=pathinfo($fileNameForSave, PATHINFO_EXTENSION);\n\t\t\tif($fileExt=='jpg' || $fileExt=='jpeg')\n\t\t\t{\n\t\t\t\t$image->save($fileNameForSave, IMAGETYPE_JPEG, 85);\n\t\t\t}\n\n\t\t\tif($fileExt=='png')\n\t\t\t{\n\t\t\t\t$image->save($fileNameForSave, IMAGETYPE_PNG);\n\t\t\t}\t\n \t\n\t\t\t$image->free();\n\n \t//вывод в поток браузера того что сохранилось:\n\t\t\tob_end_clean();\n\t\t\treadfile($fileNameForSave);\n\t\t\tflush(); \t\t\t\n\t exit();\t\t\t\n\t\t}", "title": "" }, { "docid": "d42ed40bbedd50c9a1b8b2fff9d4e6b5", "score": "0.5242178", "text": "public function captcha($tmp){\n return ['src'=>captcha_src(\"flat\")];\n }", "title": "" }, { "docid": "c5194df5161a898e89705e8703ca7ddc", "score": "0.5239806", "text": "public static function sendTrackerImage()\n\t{\n\t\theader('content-type: image/png');\n\t\techo base64_decode('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=');\n\t}", "title": "" }, { "docid": "ce41b985acccb467b53a50b5d5fb45a5", "score": "0.5217416", "text": "function imagesavealpha ($image, $saveflag) {}", "title": "" } ]
f13ea3ccedcb8a3184b822b1d4cca9ac
Create a new message instance.
[ { "docid": "19c8a56922f781d093da9ee61f34469e", "score": "0.0", "text": "public function __construct($user_email,$user_token)\n {\n $this->user_email = $user_email;\n $this->user_token = $user_token;\n }", "title": "" } ]
[ { "docid": "4ebc9cc7be29baeba82dba4538a9dd79", "score": "0.836456", "text": "public function createMessage(): Message\n {\n return new Message();\n }", "title": "" }, { "docid": "d538b5ecca4e207a6bff111d98931923", "score": "0.8280628", "text": "public function createMessage()\n {\n $class = $this->getClass();\n\n return new $class();\n }", "title": "" }, { "docid": "ef74b5b90bea8aa7c0d7a54fd846db92", "score": "0.8005798", "text": "public function newMessage()\n {\n $headers = new Headers(new HeaderFactory);\n $cookies = new Cookies(new CookieFactory);\n return new Message($headers, $cookies);\n }", "title": "" }, { "docid": "ba44b493afb2a151bd0f74b15a4a629c", "score": "0.78218216", "text": "function newMessage() {\n\t\tif(is_null($this->Mailer)) $this->initMailer();\n\t\t$this->trace(LOG_DEBUG, 1, __FUNCTION__);\n\t\treturn Swift_Message::newInstance();\n\t}", "title": "" }, { "docid": "093e6bca2b16ee25803e224f969ce250", "score": "0.7818498", "text": "public function createMessage()\n {\n $config = $this->messageConfig;\n if (!array_key_exists('class', $config)) {\n $config['class'] = $this->messageClass;\n }\n $config['mailer'] = $this;\n return Creator::createObject($config);\n }", "title": "" }, { "docid": "cb5aaf3a2348a2fa6e320e53ce3bc9f1", "score": "0.74580526", "text": "public function createMessage(): MessageInterface;", "title": "" }, { "docid": "c93cbdaeb44b98792d36caf42dc7d39c", "score": "0.7304935", "text": "public function createMessage(): Message\n {\n $eventsManager = $this->getEventsManager();\n\n if ($eventsManager) {\n $eventsManager->fire('mailer:beforeCreateMessage', $this);\n }\n\n /** @var Message $message */\n $message = $this->getDI()->get(\n '\\Phalcon\\Incubator\\Mailer\\Message',\n [$this]\n );\n\n $from = $this->getConfig('from');\n\n if (is_array($from)) {\n $message->from(\n $from['email'],\n isset($from['name']) ? $from['name'] : null\n );\n } elseif (is_string($from)) {\n $message->from($from);\n }\n\n if ($eventsManager) {\n $eventsManager->fire('mailer:afterCreateMessage', $this, $message);\n }\n\n return $message;\n }", "title": "" }, { "docid": "ee019f1649ddc364151128ce39ade069", "score": "0.7207222", "text": "public function create()\n {\n // no create since we dont need to create new Messages anyway - they are created in the 'front' end from the regular users\n }", "title": "" }, { "docid": "450ff4c72b30fcf8df08bd0d657fdaf2", "score": "0.71245366", "text": "private function _createMessage($type, $name=null) {\n return new Message($type, $this->_namespace, $name);\n }", "title": "" }, { "docid": "0cdb7a533cd650413ff0a39dc9ba385e", "score": "0.7035565", "text": "public function build() {\n return new Message( $this );\n }", "title": "" }, { "docid": "e7577b89b0df08d40767d1c834129ee2", "score": "0.70011365", "text": "public static function create(string $message = ''): self\n {\n return new self($message);\n }", "title": "" }, { "docid": "61aed38a1396f58f34d2b638ecfa1095", "score": "0.69630843", "text": "public static function make(Message $message)\n {\n return new static($message);\n }", "title": "" }, { "docid": "3dd1b776e23461d95e9c146abb4b8f1b", "score": "0.6941773", "text": "public function testMessageInstantiation()\n {\n $message_data = [\n 'version' => 'v_0_1',\n 'messageTime' => date('Y-m-d H:i:s'),\n 'roboId' => 'test',\n 'purpose' => 'buddy.find',\n 'data' => ['reason' => 'lost in space'],\n 'priority' => '3',\n 'tags' => ['tag1', 'tag2'],\n 'responseTo' => 'response-to-message-id',\n 'recipients' => ['test.robo.1', 'test.robo.2'],\n 'recipientsWildcard' => 'test.robo.*',\n ];\n\n $message = new RoboMessage($message_data);\n\n $this->assertNotEmpty($message->getMessageId(), 'Message Id was generated');\n\n foreach ($message_data as $key => $value) {\n $this->assertEquals($value, $message->{\"get\" . ucfirst($key)}());\n }\n }", "title": "" }, { "docid": "4c368a80c48b78aafde5311b969fc836", "score": "0.69190454", "text": "public function createMessage()\n {\n throw new \\RuntimeException('Not supported yet');\n }", "title": "" }, { "docid": "e5adae4bd07dfb210d21a6a8dcb1b6cb", "score": "0.6915502", "text": "public function build()\n {\n $message = new Message();\n $message->subject = $this->subject;\n $message->recipient = $this->recipient;\n $message->content = $this->content;\n $message->timestamp = date('Y-m-d');\n\n return $message;\n }", "title": "" }, { "docid": "2636a462a43cdb8f85967fdb4a18fed2", "score": "0.6883461", "text": "protected function createMessage($c)\n\t{\n\t\tif ($c === FALSE)\n\t\t{\n\t\t\tthrow new InvalidArgumentException(\"No message class.\");\n\t\t}\n\t\treturn new $c;\n\t}", "title": "" }, { "docid": "7f0fad9064513951148c773c54bcd3de", "score": "0.68489647", "text": "protected function createMailMessage()\n {\n return $this->objectManager->get(MailMessage::class);\n }", "title": "" }, { "docid": "a9c57dbb50b31a14e2b9737406d950eb", "score": "0.67999214", "text": "public function make(array $messageProperties) : Message\n {\n $message = new Message();\n\n if ($messageProperties['id'] ?? NULL)\n {\n $message->setID($messageProperties['id']);\n }\n\n $message->setTrashed( $messageProperties['trash'] ?? FALSE);\n $message->setViewed( $messageProperties['viewed'] ?? FALSE);\n $message->setStarred( $messageProperties['starred'] ?? FALSE);\n $message->setTimeSent($messageProperties['timesent'] ?? NULL);\n\n $message->setHumanReadableTime( $messageProperties['timesent2'] ?? NULL);\n $message->setHumanReadableTime2($messageProperties['timesent3'] ?? NULL);\n\n if ($messageProperties['message'] ?? NULL)\n {\n $message->setMessage($messageProperties['message']);\n }\n\n if ($messageProperties['senderid'] ?? NULL)\n {\n $message->setSenderID($messageProperties['senderid']);\n }\n\n if ($messageProperties['reciepientid'] ?? NULL)\n {\n $message->setReciepientID($messageProperties['reciepientid']);\n }\n\n return $message;\n }", "title": "" }, { "docid": "bae09a0b3400aac9ba7d600423b287d4", "score": "0.67177886", "text": "public function __construct(Message $message)\n {\n //\n $this->message = $message;\n }", "title": "" }, { "docid": "9389d52ea1466c4e6241b8b21beba6ca", "score": "0.6602723", "text": "private function _new_message(){\n\t\t\n\t\t$message = $this->input->post('message');\n\t\tif(!$message)\n\t\t\tdie(json_encode(array('success' => false)));\n\t\t\n\t\t$message_id = $this->team_messaging->create_message(array('users_oauth_uid' => $this->users_oauth_uid, \n\t\t\t\t\t\t\t\t\t\t\t\t\t'teams_fan_page_id' => $this->teams_fan_page_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'message_content' => $message));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$this->pusher->trigger('presence-' . $this->teams_fan_page_id, 'new', array('oauth_uid' => $this->users_oauth_uid,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'message' => $message,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'm_id' => $message_id));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tdie(json_encode(array('success' => true)));\n\t\t\n\t}", "title": "" }, { "docid": "64d6d093391a80b19bf25e259847398e", "score": "0.6586051", "text": "public function __construct(public Message $message)\n {\n }", "title": "" }, { "docid": "9b3872a6ca5dec943525abf491b5c08f", "score": "0.6496011", "text": "public static function create($message, $name = null)\n {\n return Message::generic($message, self::$CSSClass, $name);\n }", "title": "" }, { "docid": "4f1e86d69c2e321b4c6c04a30b4ce8c2", "score": "0.64822865", "text": "protected function createMessage()\n\t{\n\t\t// Get the DKIM selector.\n\t\t$selector = Config::get('mail.dkim.selector');\n\n\t\t// If we have a DKIM selector, then add the signing.\n\t\tif (!empty($selector)) {\n\t\t\t// Use the signed message with support for signing.\n\t\t\t// So long as there is a selector we will do this, even if a private\n\t\t\t// key is not set. This is handy if the application wants to add its\n\t\t\t// own signatures later.\n\t\t\t$message = new Message(new Swift_SignedMessage);\n\n\t\t\t// Get the key and domain name.\n\t\t\t// Ideally these would be specific to the selector, with the selector being\n\t\t\t// chosen according to the domain of the sending address. At this stage we do\n\t\t\t// not know what the final sending addressis going to be.\n\t\t\t$private_key = Config::get('mail.dkim.private_key');\n\t\t\t$domain_name = Config::get('mail.dkim.domain_name');\n\n\t\t\tif (!empty($private_key) && !empty($domain_name)) {\n\t\t\t\t// Do the DKIM signing.\n\t\t\t\t$dkim_signer = new Swift_Signers_DKIMSigner($private_key, $domain_name, $selector);\n\n\t\t\t\t// Issue #1: ignore certain headers that cause end-to-end failure.\n\t\t\t\t$dkim_signer->ignoreHeader('Return-Path');\n\t\t\t\t$dkim_signer->ignoreHeader('Bcc');\n\t\t\t\t$dkim_signer->ignoreHeader('DKIM-Signature');\n\t\t\t\t$dkim_signer->ignoreHeader('Received');\n\t\t\t\t$dkim_signer->ignoreHeader('Comments');\n\t\t\t\t$dkim_signer->ignoreHeader('Keywords');\n\t\t\t\t$dkim_signer->ignoreHeader('Resent-Bcc');\n\n\t\t\t\t$message->attachSigner($dkim_signer);\n\t\t\t}\n\t\t} else {\n\t\t\t// Non-signed message.\n\t\t\t$message = new Message(new Swift_Message);\n\t\t}\n\n\t\t// If a global from address has been specified we will set it on every message\n\t\t// instances so the developer does not have to repeat themselves every time\n\t\t// they create a new message. We will just go ahead and push the address.\n\t\tif (isset($this->from['address']))\n\t\t{\n\t\t\t$message->from($this->from['address'], $this->from['name']);\n\t\t}\n\n\t\treturn $message;\n\t}", "title": "" }, { "docid": "936ab540e72330b05f43df638bf5a013", "score": "0.6451748", "text": "public function __construct(Message $message)\n {\n $this->message = $message;\n }", "title": "" }, { "docid": "936ab540e72330b05f43df638bf5a013", "score": "0.6451748", "text": "public function __construct(Message $message)\n {\n $this->message = $message;\n }", "title": "" }, { "docid": "97ab1ce1c1bb213af2655f4917edff64", "score": "0.64478964", "text": "function newMessage($user, $text, $format = 'xml') {\r\n\t\t$options = array(\r\n\t\t\t'user' => $user,\r\n\t\t\t'text' => $text\r\n\t\t);\r\n\t\treturn $this->apiCall('direct_messages/new', 'post', $format, $options);\r\n\t}", "title": "" }, { "docid": "ccea97388bc9220556a9095cff88c296", "score": "0.64279336", "text": "public static function make($key, $message)\n {\n $instance = new static();\n \n $instance->add($key, $message);\n \n return $instance;\n }", "title": "" }, { "docid": "2d4d28338421c6513c3b555dd4b3c04c", "score": "0.6405288", "text": "private function initMessage() {\n if (empty($this->message)) {\n $this->message = Swift_Message::newInstance($this->subject);\n }\n\n $this->message->setSubject($this->subject)\n ->setFrom($this->parseMail($this->from))\n ->setTo($this->to);\n\n if (!empty($this->replyTo)) {\n $this->message->setReplyTo($this->parseMail($this->replyTo));\n }\n\n if (!empty($this->cc)) {\n $this->message->setCc($this->parseMail($this->cc));\n }\n\n if (!empty($this->bcc)) {\n $this->message->setBcc($this->parseMail($this->bcc));\n }\n\n // Body\n if ($this->sendAs == 'text') {\n $this->message->setBody($this->textMessage, $this->getContentType($this->sendAs));\n } else {\n // If both or html..\n $mess = '';\n if (!empty($this->__message)) {\n foreach ($this->__message as $val) {\n $mess .= $val;\n $mess .= \"\\n\";\n }\n }\n $this->message->setBody($mess, $this->getContentType($this->sendAs));\n //$this->message->setBody(implode(\"\\n\", $this->__message), $this->getContentType($this->sendAs));\n }\n if ($this->sendAs == 'both') {\n $this->message->addPart($this->textMessage, 'text/plain');\n }\n }", "title": "" }, { "docid": "10e3c108f9ea706dc560e25e311bd1a2", "score": "0.63502854", "text": "private function _createMessage(\n IConnection $connection = null,\n IRequest $request = null,\n IResponse $response = null,\n IParser $parser = null,\n IBuilder $builder = null\n ) {\n $connection = ($connection ?? $this->createMock(IConnection::class));\n $request = ($request ?? $this->createMock(IRequest::class));\n $response = ($response ?? $this->createMock(IResponse::class));\n $parser = ($parser ?? $this->createMock(IParser::class));\n $builder = ($builder ?? $this->createMock(IBuilder::class));\n\n return new AMessage($connection, $request, $response, $parser, $builder);\n }", "title": "" }, { "docid": "69fccdd3f2ebe028ea45938bded2a68e", "score": "0.63263345", "text": "public function __construct(McMessage $message)\n {\n $this->message = $message;\n }", "title": "" }, { "docid": "f9d41ff6f55c0c7324d2a32fc4347024", "score": "0.6303511", "text": "protected function createMessage($config = [])\n {\n $mailer = \\Yii::$app->mailer;\n $config = ArrayHelper::merge(\n $mailer->messageConfig,\n $config\n );\n\n if (!array_key_exists('class', $config)) {\n $config['class'] = $mailer->messageClass;\n }\n $config['mailer'] = $mailer;\n return \\Yii::createObject($config);\n }", "title": "" }, { "docid": "46f6b50196762f4574a418dd5065a2e8", "score": "0.6293814", "text": "public static function createFromMessage(AMQPMessage $message) : CustomApiMessage {\n $instance = new self();\n $instance->key = $message->delivery_info['routing_key'];\n $instance->body = $message->getBody();\n\n return $instance;\n }", "title": "" }, { "docid": "7e73dd6e74ffd648de1744521dc97d86", "score": "0.62928146", "text": "public function create()\n {\n $model = new Message;\n return view('message.create', compact(\n 'model'\n ));\n }", "title": "" }, { "docid": "39ae6fd3e0d23f98f6c064c32f0bc897", "score": "0.62771076", "text": "public function __construct(Message $message = null) {\n if ($message === null) {\n $message = new Message();\n $message->setEncoding('UTF-8');\n }\n $this->setMessage($message);\n $this->sendmail = new Sendmail();\n }", "title": "" }, { "docid": "f43d4638022f6f248116a8a34b723416", "score": "0.62670916", "text": "public function __construct($message)\n {\n //\n $this->message = $message;\n }", "title": "" }, { "docid": "40ccada77cf73f67d37823e76733ea6b", "score": "0.6263433", "text": "public function __construct($message) {\n $this->message = $message;\n }", "title": "" }, { "docid": "432e65bcb9fdd0def198c787e73113fe", "score": "0.6214637", "text": "protected function createMessage($data) {\n $data += ['type' => 'message'];\n $class = $data['type'] == 'exclusion' ? Exclusion::class : Message::class;\n return $this->getMockBuilder($class)\n ->setConstructorArgs([$data])\n ->setMethods(['replaceTokens'])\n ->getMock();\n }", "title": "" }, { "docid": "ac04f75f7df9b5a640b42a68f4b1893e", "score": "0.6192417", "text": "public function __construct($message) \n {\n return parent::__construct($message, 0);\n }", "title": "" }, { "docid": "7fab39e8ebe5ad41f88769f0ac48636e", "score": "0.6185243", "text": "public static function factory ($raw_message = null, $class_name = null) {}", "title": "" }, { "docid": "fa3369f822e0526d8e30ad5cdd3c0e9f", "score": "0.6182803", "text": "public function createMessage($subject, $message, array $placeholders = []);", "title": "" }, { "docid": "968584bc75b36d9393913bda8471c882", "score": "0.6177159", "text": "private function createDraftMessage(?int $senderId = null): Message\n {\n /** @var Message $instance */\n $instance = factory(Message::class)->create(['sender_user_id' => $senderId]);\n $instance->changeStatus(MessageStatuses::DRAFT);\n\n return $instance;\n }", "title": "" }, { "docid": "d4e7d099f62aba981598694449a2d283", "score": "0.61702", "text": "public function __construct(Message $message)\n {\n // Keep the original message\n $this->message = $message;\n // Keep the message sender handy\n $this->sender = $message->sender;\n // Split the command name and params out\n list($this->name, $params) = explode(' ', $message->body, 2) + array(\"\", \"\");\n\n if (substr($params, 0, 1) == ':') {\n $params = array(substr($params, 1));\n\n } elseif (($p = strpos($params, ' :')) !== false) {\n $text = substr($params, $p+2);\n $params = explode(' ', substr($params, 0, $p));\n $params[] = $text;\n\n } else {\n $params = explode(' ', $params);\n }\n $this->params = $params;\n $this->text = implode(' ', $params);\n $this->time = microtime(true);\n }", "title": "" }, { "docid": "9370eb35de6d28e01587891b57ca6886", "score": "0.6165111", "text": "public function __construct($message = null) {\n global $DB;\n\n if (is_null($message)) {\n $this->message = new \\stdClass();\n } else if (is_object($message)) {\n $this->message = $message; #QUESTION: should this copy the object or reference it?\n } else if (is_numeric($message)) {\n $this->message = $DB->get_record('email_message', array('id' => $message));\n $this->from = $DB->get_record('email_message_users', array('messageid' => $message, 'type' => EMAIL_USER_TYPE_FROM));\n $this->to = $DB->get_records('email_message_users', array('messageid' => $message, 'type' => EMAIL_USER_TYPE_TO));\n $this->cc = $DB->get_records('email_message_users', array('messageid' => $message, 'type' => EMAIL_USER_TYPE_CC));\n $this->bcc = $DB->get_records('email_message_users', array('messageid' => $message, 'type' => EMAIL_USER_TYPE_BCC));\n }\n\n if ($this->message) {\n return;\n }\n\n throw new \\coding_exception('Unexpected parameter type passed to message constructor.');\n }", "title": "" }, { "docid": "d1dffff5715cc69caab5173183b5c7f3", "score": "0.6123128", "text": "public static function factory($string)\n {\n $msg_parts = explode(':', $string);\n \n $priority = $msg_parts[0];\n $name = $msg_parts[1];\n \n $message = new self($priority, $name);\n $message->setDirection(self::MSG_IN);\n $message->setSuccess(('true' == $msg_parts[2]));\n \n return $message;\n }", "title": "" }, { "docid": "e93a9ddc1cc808b575ae2a4fe73b03be", "score": "0.6121778", "text": "public function __construct ($message = null) {}", "title": "" }, { "docid": "efccba9f571529ed749d8cfad2789b4b", "score": "0.61194277", "text": "function __construct (string $message)\n\t{\n\t\t$this->message = $message;\n\t}", "title": "" }, { "docid": "5b8a37b379e48cf18443450bcfd971cc", "score": "0.61134815", "text": "public function __construct($message)\n {\n\n $this->message = $message;\n\n }", "title": "" }, { "docid": "d08a5b727dd88a336a3a8d6b9d62d395", "score": "0.61127025", "text": "public function createMessage(array $data)\n {\n return Contact::create(\n [\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'message'=> $data['message'],\n ]\n );\n\n // print_r($data);\n }", "title": "" }, { "docid": "b4bda6d3a847da9c2e2782855e632e24", "score": "0.6104549", "text": "public function getMessageFactory()\n {\n }", "title": "" }, { "docid": "857bde3f38a35fb3fabbbd69b7b142a0", "score": "0.6058114", "text": "public function created(Message $message)\n {\n\n // dd($message);\n }", "title": "" }, { "docid": "5cd5d445900775e03d7fb3e56da3a637", "score": "0.6055839", "text": "public static function create(string $message, ...$field) : self\n {\n $e = new self($message);\n $e->data = $field;\n\n return $e;\n }", "title": "" }, { "docid": "6322d728acb926fe914bf5598a54c7df", "score": "0.60398287", "text": "public function create()\n {\n //\n \n return view('message.create');\n\n }", "title": "" }, { "docid": "7df3a6b52612c943c1fa039fb16da514", "score": "0.6038378", "text": "public function __construct($message)\n {\n $this->message = $message;\n }", "title": "" }, { "docid": "7df3a6b52612c943c1fa039fb16da514", "score": "0.6038378", "text": "public function __construct($message)\n {\n $this->message = $message;\n }", "title": "" }, { "docid": "7df3a6b52612c943c1fa039fb16da514", "score": "0.6038378", "text": "public function __construct($message)\n {\n $this->message = $message;\n }", "title": "" }, { "docid": "7df3a6b52612c943c1fa039fb16da514", "score": "0.6038378", "text": "public function __construct($message)\n {\n $this->message = $message;\n }", "title": "" }, { "docid": "7df3a6b52612c943c1fa039fb16da514", "score": "0.6038378", "text": "public function __construct($message)\n {\n $this->message = $message;\n }", "title": "" }, { "docid": "7df3a6b52612c943c1fa039fb16da514", "score": "0.6038378", "text": "public function __construct($message)\n {\n $this->message = $message;\n }", "title": "" }, { "docid": "71f6ca47c7a7ca3c8d11da8f74f633b5", "score": "0.603382", "text": "public function create()\n {\n return view(\"messages.create\");\n }", "title": "" }, { "docid": "0089cae094f2bf3b954f9ea2d19e40d2", "score": "0.6026825", "text": "protected function createMessageBag()\n {\n return new MessageBag();\n }", "title": "" }, { "docid": "88199366c2b2442c26262a0c183fa9e3", "score": "0.60169846", "text": "public function create(CreateMessageRequest $request)\n {\n\n\t\t$message = Message::create([\n\t\t\t'content' => $request->get('message'),\n\t\t\t'image' => 'http://lorempixel.com/600/338?'.mt_rand(0, 1000)\n\t\t]);\n\n \treturn redirect('/messages/'.$message->id);\n }", "title": "" }, { "docid": "1fc9e2ba4b25a748454cf5a8f0d6c532", "score": "0.6005972", "text": "public function __construct($message)\n\t{\n\t\t//\n\t\t$this->message = $message;\n\t}", "title": "" }, { "docid": "a09191db02df4c771d4639c0380ca679", "score": "0.6005082", "text": "public function __construct( $message )\n {\n $this->message = $message;\n }", "title": "" }, { "docid": "f575b449ecf147882fba3ec896688bb1", "score": "0.6004828", "text": "public static function newMessage($event)\n {\n $senderId = $event->message_create->sender_id;\n $message = trim($event->message_create->message_data->text);\n $message = str_replace(\"'\", \"’\", $message);\n\n self::handleMessage($senderId, $message);\n }", "title": "" }, { "docid": "540f7240a24ff5c6228d4630aeb8cd4e", "score": "0.5996797", "text": "public static function init() {\n Swift::init(function () {\n Swift_DependencyContainer::getInstance()\n ->register('mime.qpcontentencoder')\n ->asAliasOf('mime.nativeqpcontentencoder');\n });\n\n return Swift_Message::newInstance();\n }", "title": "" }, { "docid": "005e3d3550e22af2dc667153e50f95da", "score": "0.5974952", "text": "public function __construct(IMessage $message)\n {\n $this->message = $message;\n }", "title": "" }, { "docid": "63a6a53b2456c373ab919dc88a69282e", "score": "0.5960968", "text": "public function actionCreate()\n {\n $model = new Message();\n\n $model->user_id = Yii::$app->user->identity->id;\n $model->isIncorrect = 0;\n $model->create = date(\"Y-m-d H:i:s\");\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "d46c60db4d54a9f04f9023ba395c576e", "score": "0.5959642", "text": "public function __construct(ContactMessage $message)\n\t{\n\t\t$this->message = $message; \n\t}", "title": "" }, { "docid": "f0f0f14d56b58a58aecd63419f6f2200", "score": "0.591761", "text": "public function newMessage (ActionData $data, ActionState $state) {\r\n // * @return Message Returns a Message to dispatch to clean up the previous message.\r\n\r\n // Send as a new chat instead of updating the current one.\r\n $data->clearForNewMessage();\r\n\r\n // TODO: Instead of clearing ALL attachments, we could keep the previous Message serialized in the database and use that\r\n // to reconstruct the old Message but without any buttons.\r\n\r\n\r\n // Reply with no attachments to clear out Cancel buttons.\r\n // return $state->clearAttachments();\r\n }", "title": "" }, { "docid": "5366f196355b1d25c8c2ce999ef26c28", "score": "0.5913527", "text": "public function __construct(Message $message)\n {\n\n $this->name = $message->name;\n $this->email = $message->email;\n $this->message = $message->content;\n }", "title": "" }, { "docid": "a26eb3ba8f7afc419a64a431cbb13a0f", "score": "0.59052396", "text": "public function create()\n {\n $this->validate($this->request, [\n 'subject' => 'required|max:75',\n 'to' => 'required|exists:users,name',\n 'message' => 'required|max:3000',\n ], [\n 'to.exists' => \"The person you're trying to send a message to doesn't exist\",\n ]);\n\n $thread = Thread::create([\n 'subject' => $this->request->subject,\n ]);\n\n Message::create([\n 'thread_id' => $thread->id,\n 'user_id' => Auth::user()->id,\n 'body' => $this->request->message,\n ]);\n\n Participant::create([\n 'thread_id' => $thread->id,\n 'user_id' => Auth::user()->id,\n 'last_read' => new Carbon(),\n ]);\n\n // Get participant ID\n $to = User::where('name', $this->request->to)->firstOrFail();\n $thread->addParticipant([$to->id]);\n\n return redirect('/account/inbox');\n }", "title": "" }, { "docid": "1f44cc6393ff17c5a1b7bfc433b4a098", "score": "0.5898364", "text": "public function create()\n {\n $db = XenForo_Application::get('db');\n\n // set charset\n $db->query('SET NAMES utf8mb4');\n\n // main table\n $db->query('CREATE TABLE `' . self::DB_TABLE_PREFIX . '_messages`\n (`message_id` CHAR(16),\n `message_type_code` INT UNSIGNED COMMENT \\'determinates type of message\\',\n `sender_threema_id` CHAR(8),\n `date_send` INT UNSIGNED COMMENT \\'the date/time delivered by the Gateway server stored as unix timestamp\\',\n `date_received` INT UNSIGNED COMMENT \\'the date/time when msg was received by this server stored as unix timestamp\\',\n PRIMARY KEY (`message_id`)\n )');\n // here \"null\" is allowed as for deleted messages the message ID is\n // still stored, which prevents replay attacks as a message ID cannot\n // be reused in this case\n\n // files associated with messages\n $db->query('CREATE TABLE `' . self::DB_TABLE_PREFIX . '_files`\n (`file_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,\n `message_id` CHAR(16) NOT NULL,\n `file_path` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,\n `file_type` VARCHAR(100) NOT NULL,\n `is_saved` BOOLEAN NOT NULL DEFAULT true,\n PRIMARY KEY (`file_id`),\n FOREIGN KEY (`message_id`) REFERENCES ' . self::DB_TABLE_PREFIX . '_messages(`message_id`)\n ) COMMENT=\\'Stores files associated with messages.\\'');\n\n // text messages\n $db->query('CREATE TABLE `' . self::DB_TABLE_PREFIX . '_messages_text`\n (`message_id` CHAR(16) NOT NULL,\n `text` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,\n PRIMARY KEY (`message_id`),\n FOREIGN KEY (`message_id`) REFERENCES ' . self::DB_TABLE_PREFIX . '_messages(`message_id`)\n )');\n\n // delivery receipt\n $db->query('CREATE TABLE `' . self::DB_TABLE_PREFIX . '_messages_delivery_receipt`\n (`message_id` CHAR(16) NOT NULL,\n `receipt_type` TINYINT UNSIGNED NOT NULL,\n PRIMARY KEY (`message_id`),\n FOREIGN KEY (`message_id`) REFERENCES ' . self::DB_TABLE_PREFIX . '_messages(`message_id`)\n )');\n\n // file message\n $db->query('CREATE TABLE `' . self::DB_TABLE_PREFIX . '_messages_file`\n (`message_id` CHAR(16) NOT NULL,\n `file_size` INT UNSIGNED NOT NULL,\n `file_name` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,\n `mime_type` VARCHAR(255) NOT NULL,\n PRIMARY KEY (`message_id`),\n FOREIGN KEY (`message_id`) REFERENCES ' . self::DB_TABLE_PREFIX . '_messages(`message_id`)\n )');\n\n // image message\n $db->query('CREATE TABLE `' . self::DB_TABLE_PREFIX . '_messages_image`\n (`message_id` CHAR(16) NOT NULL,\n `file_size` INT UNSIGNED NOT NULL,\n PRIMARY KEY (`message_id`),\n FOREIGN KEY (`message_id`) REFERENCES ' . self::DB_TABLE_PREFIX . '_messages(`message_id`)\n )');\n\n // acknowledged messages associated with delivery receipt messages\n $db->query('CREATE TABLE `' . self::DB_TABLE_PREFIX . '_ackmsgs`\n (`ack_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,\n `message_id` CHAR(16) NOT NULL COMMENT \\'the id of the delivery receipt message, which acknowledges other messages\\',\n `ack_message_id` CHAR(16) NOT NULL COMMENT \\'the id of the message, which has been acknowledged \\',\n PRIMARY KEY(`ack_id`),\n FOREIGN KEY (`message_id`) REFERENCES ' . self::DB_TABLE_PREFIX . '_messages(`message_id`),\n INDEX(`ack_message_id`)\n ) COMMENT=\\'Stores acknowledged message IDs.\\'');\n }", "title": "" }, { "docid": "7f20f31e1dd258884a9e4fb83bae8387", "score": "0.58848715", "text": "public function createMessage(array $params) {\n\t\t$mailMessage = new MailMessage();\n\t\t$mimeMessage = new MimeMessage();\n\n\t\tif (isset($params['to'])) {\n\t\t\t$mailMessage->addTo($params['to']);\n\t\t}\n\n\t\tif (isset($params['from'])) {\n\t\t\t$mailMessage->addFrom($params['from']);\n\t\t}\n\n\t\tif (isset($params['subject'])) {\n\t\t\t$mailMessage->setSubject($params['subject']);\n\t\t}\n\n\t\tif (isset($params['attachments'])) {\n\t\t\tforeach ($params['attachments'] as $attachment) {\n\n\t\t\t\tif (is_file($attachment['content'])) {\n\t\t\t\t\t$content = fopen($attachment['content'], 'r');\n\t\t\t\t} else {\n\t\t\t\t\t$content = $attachment['content'];\n\t\t\t\t}\n\n\t\t\t\t//create the attachment\n\t\t\t\t$mimeAttachment = new MimePart($content);\n\t\t\t\t$mimeAttachment->type = $attachment['type'];\n\t\t\t\t$mimeAttachment->filename = $attachment['name'];\n\t\t\t\t$mimeAttachment->disposition = Mime::DISPOSITION_ATTACHMENT;\n\n\t\t\t\t$mimeMessage->addPart($mimeAttachment);\n\t\t\t}\n\t\t}\n\n\t\t$mailMessage->setBody($mimeMessage);\n\n\t\treturn $mailMessage;\n\t}", "title": "" }, { "docid": "884098437f7b0e8be1e9810ee13dec94", "score": "0.58828163", "text": "public static function sendMessage() {\r\n $post = Core\\Input::post();\r\n if (isset($post['senderId']) && isset($post['recipientId']) && isset($post['petId']) && isset($post['message'])) {\r\n $messageObj = new Message($post['senderId'], $post['recipientId'], 'new', $post['message'], time(), time(), 1, 1);\r\n $res = Model\\Message::createMesage($messageObj);\r\n return $res;\r\n }\r\n }", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.5881221", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.5881221", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.5881221", "text": "public function create(){}", "title": "" }, { "docid": "aaaabd5f9cb012396cbbf4a200da8f35", "score": "0.587844", "text": "function addMessage()\n{\n $message = new Messages(1);\n $message->profileId = 1; //для тестов\n $values = [];\n // $company->id = 1; //для тестов\n // $values['id'] = 1;\n $values['author'] = '3';\n $values['receiver'] = '1';\n $values['message_text'] = 'Что-то сюда пишем. Важное или не очень важное.';\n $values['date'] = date('Y-m-d H:i:s');\n $message->addMessage($values);\n // $profile->getUserEmail();\n return $message;\n}", "title": "" }, { "docid": "2cea3f54effc057d0a832db9f134170c", "score": "0.5874071", "text": "public function __construct(MessageInterface $message)\n {\n \t$this->message = $message;\n }", "title": "" }, { "docid": "f43a3cd12d1bfab6a40ab9f4459c68d9", "score": "0.5873978", "text": "protected static function newFactory(): Factory\n {\n return MessageFactory::new();\n }", "title": "" }, { "docid": "6090ac05ea1028489708d0dee1fa5d5d", "score": "0.58680165", "text": "public function __construct($message = NULL) {\n $this->message = $message;\n }", "title": "" }, { "docid": "f6527cf477bc8eec3a24359d8289d8af", "score": "0.58676964", "text": "public function createFromMessage(Message $message) : Service;", "title": "" }, { "docid": "40b340ae3c7dea9d84ccf3419b7328b0", "score": "0.58579874", "text": "public function testCreateMessageTemplate()\n {\n }", "title": "" }, { "docid": "84839a545b0c9c0d4daf2e15ccc449c6", "score": "0.58566606", "text": "public function actionCreate() {\n\n\t\t$model = new Message;\n\t\tif ($model->add($_POST['Message'])) {\n\t\t\t$this->redirect(array('view', 'id' => $model->msg_id));\n\t\t}\n\t\t$this->render('create', array('model' => $model,));\n\t}", "title": "" }, { "docid": "8732a042433b1ad120ced6f65eeacf44", "score": "0.5846514", "text": "public function createMessage($queueName, $messageText,\n $createMessageOptions = null\n ) {\n $method = \\HTTP_Request2::METHOD_POST;\n $headers = array();\n $queryParams = array();\n $path = Resources::EMPTY_STRING;\n $body = Resources::EMPTY_STRING;\n $statusCode = Resources::STATUS_CREATED;\n \n if (!isset($createMessageOptions)) {\n $createMessageOptions = new CreateMessageOptions();\n }\n \n $headers[Resources::CONTENT_TYPE] = Resources::XML_CONTENT_TYPE;\n \n $message = new QueueMessage();\n $message->setMessageText($messageText);\n $body = $message->toXml();\n \n $visibility = $createMessageOptions->getVisibilityTimeoutInSeconds();\n $timeToLive = $createMessageOptions->getTimeToLiveInSeconds();\n \n $queryParams['visibilitytimeout'] = $visibility;\n $queryParams['messagettl'] = $timeToLive;\n $path = $queueName . '/messages';\n \n $this->send($method, $headers, $queryParams, $path, $statusCode, $body);\n }", "title": "" }, { "docid": "5c09288e2f68968f8b288ad80c3a861f", "score": "0.58293414", "text": "public function create()\n {\n return view('user.messages.create');\n }", "title": "" }, { "docid": "0b1b18e635200725f03e03c5728facf9", "score": "0.58243006", "text": "public function getMessage()\n {\n if ($this->message == null) {\n $this->message = new Message();\n $this->message->setType([Message::TYPE_INTERNAL]);\n }\n return $this->message;\n }", "title": "" }, { "docid": "37af7665577e6c1c4a170e4ca970bcc1", "score": "0.58242816", "text": "public function create()\n {\n return view('pages.create-message');\n }", "title": "" }, { "docid": "f59ec2bb873c8e5fc221be70fcdc5053", "score": "0.58151317", "text": "public function createMessageFromDnsWireMessage(string $dnsWireMessage): MessageInterface;", "title": "" }, { "docid": "fa88672681bf217f1074a6c2ff169664", "score": "0.58039623", "text": "public function buildFromMessage($message)\n {\n \n }", "title": "" }, { "docid": "8df6ade58c89f9d8c46d73f3f97749ac", "score": "0.57997197", "text": "function __construct($message, $type = Message::Error) {\n\t\t$this->text = base64_encode($message);\n\t\t$this->type = $type;\n\t}", "title": "" }, { "docid": "0c38bb4f813a9942288ef8ef51e46e30", "score": "0.5795138", "text": "public function __construct() {\n $this->message .= \"An instance of the Test class has been created.\";\n }", "title": "" }, { "docid": "7c5e1ca7069a3e91f75bbc58731770ab", "score": "0.57913357", "text": "public static function create($row) {\n $required_keys = array(\n 'message_id' => 0, 'user_id' => 0,\n 'content' => 0, 'date_created' => 0\n );\n if (empty(array_diff_key($required_keys, $row))) {\n return new Message(\n $row['message_id'], $row['user_id'],\n $row['content'], $row['date_created']\n );\n }\n return null;\n }", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.57877773", "text": "public function create() {}", "title": "" }, { "docid": "90b4856c36b2cf76f243ec8a08dff82f", "score": "0.578137", "text": "public function __construct(Message $message) {\n\t\tif (!$message instanceof Message) {\n\t\t\tthrow new InvalidArgumentException(get_class() . ' expects an instance of ' . get_class(new Message));\n\t\t}\n\t\t$this->message = $message;\n\t\t$this->dbprefix = elgg_get_config('dbprefix');\n\t}", "title": "" }, { "docid": "1654277b0ba41f110330e0f4fb96f0eb", "score": "0.5780749", "text": "public function create()\n {\n return view('messages.create');\n }", "title": "" }, { "docid": "1654277b0ba41f110330e0f4fb96f0eb", "score": "0.5780749", "text": "public function create()\n {\n return view('messages.create');\n }", "title": "" }, { "docid": "1654277b0ba41f110330e0f4fb96f0eb", "score": "0.5780749", "text": "public function create()\n {\n return view('messages.create');\n }", "title": "" }, { "docid": "1654277b0ba41f110330e0f4fb96f0eb", "score": "0.5780749", "text": "public function create()\n {\n return view('messages.create');\n }", "title": "" }, { "docid": "d646b6f501aedad2e15fc46cef5d8a5a", "score": "0.57752365", "text": "public function __construct($subject = NULL, $message = NULL, $type = NULL) # constructor {{{\n\t{\n Email::mailer();\n // Create a new message, match internal character set\n $this->_message = Swift_Message::newInstance()\n ->setCharset(Kohana::$charset)\n ;\n\n\t\tif ($subject)\n\t\t{\n\t\t\t$this->subject($subject);\n\t\t}\n\n\t\tif ($message)\n\t\t{\n\t\t\t$this->message($message, $type);\n\t\t}\n\n return $this;\n\t}", "title": "" }, { "docid": "760e2751c8ccaf4ba6a44f16de3c3000", "score": "0.5773851", "text": "public function create()\n {\n return view('mymessages.create');\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "ceef65c5b48afd88ad233ade4f290876", "score": "0.0", "text": "public function store(Request $request)\n {\n // Get all input data\n $validator = \\Validator::make($request->all(), [\n 'ticket_option' => 'required|max:191',\n 'name' => 'required|max:191',\n 'email' => 'required',\n 'subject' => 'required',\n 'description' => 'required',\n 'status' => 'required',\n 'image' => 'image|mimes:jpeg,png,jpg,gif|max:1024',\n ]);\n\n if ($validator->passes()) {\n\n\n $input = $request->all();\n\n if($request->hasFile('image')){\n $fileInfo=fileInfo($request->image);\n $name=date('YmdHis').'-'.rand().'-'.rand().'.'.$fileInfo['extension'];\n\n }else{\n $name=\"\";\n }\n\n $input['image']=$name;\n\n\n // Store user data \n if($ticket_data = TicketModel::create($input))\n { \n if($request->hasFile('image')){\n $upload=fileUpload($request->image,'ticket',$name);\n }\n\n }\n\n if($ticket_data){\n return response()->json([\n 'success' => true,\n 'message' => 'New Ticket Has been Updated.',\n 'ticket_data' => $ticket_data\n ]);\n }\n\n return response()->json([\n 'success' => false,\n 'message' => 'Something went wrong!'\n ]); \n }else{\n return response()->json([\n 'success' => false,\n 'errors' => $validator->errors()->all()\n ]);\n }\n }", "title": "" } ]
[ { "docid": "a3eaa169a246f55fd5bf18b486ebe204", "score": "0.70050573", "text": "public function store()\n {\n /* Check if logged user is authorized to create resources */\n $this->authorize('create', [$this->model]);\n\n $this->request->validate($this->storeValidations());\n\n DB::transaction(function () {\n\n /** Create a new resource */\n $resource = Model::create([\n 'user' => Input::get('user'),\n 'name' => Input::get('name'),\n 'email' => Input::get('email'),\n 'status' => Input::get('status'),\n 'password' => bcrypt(config('user.default_password', 'secret')),\n ]);\n\n /* Check if permissions are being set */\n if (Input::get('roles') != null) {\n /** Synchronize both tables through pivot table */\n $resource->roles()->sync(Input::get('roles'));\n }\n }, 5);\n\n /* Redirect to resource index page */\n return redirect()\n ->route($this->name . '.index')\n ->with('success', $this->name . '.resource-created');\n }", "title": "" }, { "docid": "8d0bfe30c62faf0feb996618f9875517", "score": "0.69766456", "text": "protected function store($resource_entity)\n {\n if ($resource_entity->isStored()) {\n $model = ResourceModel::find($resource_entity->id);\n } else {\n $model = new ResourceModel();\n }\n $model->fill(\n [\n 'bucket' => $resource_entity->bucket,\n 'hash' => $resource_entity->hash,\n 'processed_hash' => $resource_entity->processed_hash,\n 'mime_type' => $resource_entity->mime_type,\n 'desc' => $resource_entity->desc,\n ]\n );\n $model->save();\n $resource_entity->url = $this->url($model);\n $resource_entity->setIdentity($model->id);\n\n }", "title": "" }, { "docid": "310f8da9f04c8768eed8a9dadc64ed2d", "score": "0.66146183", "text": "public function store(ResourceStoreRequest $request): RedirectResponse\n {\n $input = $request->validated();\n $input['is_facility'] = $request->has('is_facility');\n\n $resource = Resource::create($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n laraflash()\n ->message()\n ->title('Resource was created')\n ->content('Resource \"'.$resource->name.'\" was created successfully.')\n ->success();\n\n return redirect()->route('resources.index');\n }", "title": "" }, { "docid": "d0ab33c00beb338b5537109124c32bc3", "score": "0.6592173", "text": "public function create(Storage $storage): void;", "title": "" }, { "docid": "53b23500f551bbef6ad4a65447665f8a", "score": "0.6527683", "text": "public function store() {}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
9a994c713cc979c155a0271a3177d13c
Create a new rule instance.
[ { "docid": "150d139996e689a88c5ac2b4e8361a89", "score": "0.0", "text": "public function __construct($trailerId)\n {\n $this->trailerId = $trailerId;\n }", "title": "" } ]
[ { "docid": "f2cba125cba212f947fba79bb6d05149", "score": "0.66514975", "text": "public function createRules()\n {\n return RuleFactory::make(\n [\n '%name%' => ['required', 'string'],\n 'product_id' => ['required', 'exists:products,id'],\n 'custom_field_id' => ['required', 'exists:custom_fields,id'],\n 'additional_price' => ['required', 'numeric', 'max:1e7', 'min:1'],\n ]\n );\n }", "title": "" }, { "docid": "0c41ed9d57c7f0e5272e343e68f18f88", "score": "0.6531754", "text": "public function setRule(Rule $rule);", "title": "" }, { "docid": "a5903e90e6e393af6052e61e86e912fe", "score": "0.65135753", "text": "public function createRules()\n {\n return RuleFactory::make([\n '%name%' => [\n 'required',\n 'string',\n 'max:255', ],\n 'price' => ['required', 'numeric', 'between:0,10000'],\n 'city_id' => ['required', 'exists:cities,id'],\n ]);\n }", "title": "" }, { "docid": "f91369ee5f56ca1158e6cf80428886f3", "score": "0.64944106", "text": "protected function createRule(string $rule_name): RuleInterface\n {\n return $this->validator->createRule($rule_name);\n }", "title": "" }, { "docid": "85edbe0b06581010ed8faabe0f5c0f0b", "score": "0.6414381", "text": "public function newRuleCreateStruct(): RuleCreateStruct;", "title": "" }, { "docid": "512540c943482c2adf606020ad34f05c", "score": "0.63092935", "text": "public function __construct(Rule ...$rules)\n {\n $this->rules = $rules;\n }", "title": "" }, { "docid": "0e8a5d7aadb09f7c2b119339132889a6", "score": "0.63063717", "text": "public function testCreateRule()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "18c3dc0660b4ab878f14ff7af394a4da", "score": "0.6300444", "text": "public function rule()\r\n {\r\n }", "title": "" }, { "docid": "39112b544d80de7600f7fcec80d39efc", "score": "0.61348575", "text": "protected function _construct()\n {\n parent::_construct();\n $this->_init('salesrule/rule');\n $this->setIdFieldName('rule_id');\n }", "title": "" }, { "docid": "f8be69f99a0f97b0af27e052cd7a0803", "score": "0.60920405", "text": "public function addTarget(Rule $rule, TargetCreateStruct $targetCreateStruct): Target;", "title": "" }, { "docid": "b98cfb9e2743b081477e19f0d5ecb226", "score": "0.6063284", "text": "public function getRuleDefinition(): RuleDefinition\n {\n }", "title": "" }, { "docid": "76e866f9a41c52946e4361f2517131c5", "score": "0.60445756", "text": "public function setRule(string $rule): self\n {\n $this->rule = $rule;\n\n return $this;\n }", "title": "" }, { "docid": "98d562cb4e63d6cbd89c48d1734c99eb", "score": "0.5982489", "text": "protected function _construct()\n {\n $this->_init('salesrule/rule', 'rule_id');\n }", "title": "" }, { "docid": "590cbc099402e6127f272d4c838aa14a", "score": "0.5978394", "text": "public function __construct() {\n\t\tparent::__construct();\n\t\t// Set rule here if controller need dynamic rules\n\t}", "title": "" }, { "docid": "087f90c5dd6615d68a91b9f9b4e0526a", "score": "0.5964429", "text": "public function getRuleInstance($ruleName)\n {\n if (is_string($ruleName)) {\n $hasNamespace = (bool)(strpos($ruleName, '\\\\') !== false);\n\n if (!$hasNamespace) {\n $ruleName = '\\Vanqard\\Valideer\\Rule\\\\' . ucwords($ruleName);\n }\n\n // Already instantiated?\n if (array_key_exists($ruleName, $this->rules)) {\n return $this->rules[$ruleName];\n }\n\n if (!class_exists($ruleName)) {\n throw new ValidatorException(sprintf(\"Rule %s could not be located\", $ruleName));\n }\n\n $this->rules[$ruleName] = new $ruleName;\n\n return $this->rules[$ruleName];\n } else if ($ruleName instanceof RuleInterface ) {\n $rule = $ruleName;\n $ruleName = get_class($rule);\n\n if (!array_key_exists($ruleName, $this->rules)) {\n $this->rules[$ruleName] = $rule;\n }\n\n return $rule;\n }\n\n throw new ValidatorException(\"Add rule requires either a class name or a rule instance\");\n }", "title": "" }, { "docid": "7493ec1a5347b330f01727b9ec3b8670", "score": "0.59542304", "text": "public function newRuleCreateStruct(): RuleCreateStruct\n {\n return new RuleCreateStruct();\n }", "title": "" }, { "docid": "982ce186d1c22280eecdb76489ac781c", "score": "0.5920786", "text": "public function getDefinition(): RuleDefinition\n {\n }", "title": "" }, { "docid": "982ce186d1c22280eecdb76489ac781c", "score": "0.5920786", "text": "public function getDefinition(): RuleDefinition\n {\n }", "title": "" }, { "docid": "a68bb3a5a79a381437abda19f301e926", "score": "0.5891396", "text": "public function addRuleCondition(Rule $rule, ConditionCreateStruct $conditionCreateStruct): RuleCondition;", "title": "" }, { "docid": "cd03436ab8fb957f5e31dee03a4a5202", "score": "0.5885693", "text": "function __construct($rule='', $exception='', $options=array()) {\r\n\t\tif ($rule) {\t\t\r\n\t\t\t$this->addRules($rule, $exception, $options);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "985ecdcc0136a2c00524c8c564f38d5e", "score": "0.58808154", "text": "public function createRuleDraft(Rule $rule, bool $discardExisting = false): Rule;", "title": "" }, { "docid": "3a0dd9dfd31579e725cabe8e52bbb22b", "score": "0.58784485", "text": "public function createRewriteRule() {\n\t\tif ( ! $this->condition() ) {\n\t\t\t// Compile the route to get a Symfony compiled route\n\t\t\t$this->compileRoute();\n\n\t\t\t// Retrieve the regex to use of registering the rewrite rule for this route\n\t\t\t$regex = $this->getRewriteRuleRegex();\n\n\t\t\t// Add the rewrite rule to the top\n\t\t\tadd_action( 'init', function () use ( $regex ) {\n\t\t\t\tadd_rewrite_tag( '%is_' . $this->rewrite_tag_prefix . '_route%', '(\\d)' );\n\t\t\t\tadd_rewrite_rule( $regex, 'index.php?is_' . $this->rewrite_tag_prefix . '_route=1', 'top' );\n\t\t\t} );\n\t\t}\n\t}", "title": "" }, { "docid": "f16110dc8f9115c674ffbed65bea66ca", "score": "0.5871482", "text": "public function __construct($rules = [])\n\t{\n\t\t$this->setRule($rules);\n\t}", "title": "" }, { "docid": "c5639564d3b8a5711122f395e4ae01af", "score": "0.58656925", "text": "protected function _construct()\n {\n $this->_init('salesrule/rule');\n $this->_map['fields']['rule_id'] = 'main_table.rule_id';\n }", "title": "" }, { "docid": "4cef4b166a46b20d85cb9d5002eb99ba", "score": "0.5855568", "text": "public function addRule($allow, $action, $resource, $condition = null)\n {\n $rule = new Rule($allow, $action, $resource, $condition);\n $this->rules->add($rule);\n\n return $rule;\n }", "title": "" }, { "docid": "b5e4765726cb5b4d90a8c096f3048ad1", "score": "0.58483446", "text": "public function __construct($type, $ruleKey, $ruleValue)\n {\n $this->type = $type;\n $this->ruleKey = $ruleKey;\n $this->ruleValue = $ruleValue;\n }", "title": "" }, { "docid": "0f04ecef78a2dfd5b1a53da7f31a1664", "score": "0.5807221", "text": "public static function make($attributes, $rules, $messages = array())\n\t{\n\t\treturn new static($attributes, $rules, $messages);\n\t}", "title": "" }, { "docid": "e3d614006d4e57ca3b47638fbaec9216", "score": "0.5807156", "text": "protected function _construct()\n {\n $this->_init('catalogrule/rule', 'rule_id');\n }", "title": "" }, { "docid": "411efdb900214f02eed357e260c3c8f4", "score": "0.58000976", "text": "public function usingRule($rule, array $params = [])\n {\n if (array_key_exists($rule, $this->rules) === false) {\n throw new InternalException(self::INVALID_RULE_ERROR);\n }//end if\n\n $this->currentRules = $this->rules[$rule];\n \n return $this;\n }", "title": "" }, { "docid": "3b85eeedc573994c95be846070a8b17f", "score": "0.5799053", "text": "function __construct($rules) {\n $this->rules = $rules;\n }", "title": "" }, { "docid": "9821dfa25b15ef9587667839a3338a97", "score": "0.57865214", "text": "public function registeRule()\r\n {\r\n }", "title": "" }, { "docid": "856d29a8a971137f9a4baa0c99557a68", "score": "0.576599", "text": "public function addRule(Rule\\RuleIface $rule);", "title": "" }, { "docid": "6f5028b2e1b239e5580bd506c9b84c20", "score": "0.5765268", "text": "public function addCondition(Rule $rule, ConditionCreateStruct $conditionCreateStruct): RuleCondition;", "title": "" }, { "docid": "d6e4786234938cccf7d28a34d4abb003", "score": "0.57301563", "text": "public function create()\n {\n /*\n * Convert the rule array to RRULE string\n */\n $rrule = $this->arrayToRRule($this->getArrayRules());\n\n /*\n * Combine dates with their times\n */\n $start = $this->getInput('start_date').' '.$this->getInput('start_time');\n $end = $this->getInput('end_date').' '.$this->getInput('end_time');\n\n if ($this->getInput('all_day') === 'true') {\n $allDay = true;\n } else {\n $allDay = false;\n }\n\n $event = new Event([\n 'title' => $this->getInput('title'),\n 'location' => $this->getInput('location'),\n 'start' => strToRfc3339($start, $allDay),\n 'end' => strToRfc3339($end, $allDay, true),\n 'all_day' => $allDay,\n 'rrule' => $rrule,\n ]);\n\n return $this->calendar->createEvent($event);\n }", "title": "" }, { "docid": "0c34c9178f8da81aff884e1433bc33b6", "score": "0.57284665", "text": "function addRule($property, $rule);", "title": "" }, { "docid": "12c47e4ae6e9317fd6d0b5a8e27c0b72", "score": "0.5690569", "text": "public function loadRule(UuidInterface $ruleId): Rule;", "title": "" }, { "docid": "115bc3584070757113bc8d9c071a34ec", "score": "0.5685853", "text": "protected function ruleObject($ruleDottedNamespace, ...$args)\n {\n $ruleObject = $this->getRuleClassName($ruleDottedNamespace);\n\n return new $ruleObject(...$args);\n }", "title": "" }, { "docid": "8119cee891e0e01b1961e9ef5addaf41", "score": "0.56699044", "text": "public static function create(AssociativeArray $config)\n {\n // Start of user code ValidationRule.create\n if(!$config->has('name') || empty($config->get('name'))) {\n throw new \\InvalidArgument('The validator name must be set');\n }\n\n $validationRule = new self;\n $validationRule->setValidatorName($config->get('name'));\n if($config->has('configuration')) {\n $validationRule->setConfiguration(\n AssociativeArray::createFromNativeArray(\n null, \n $config->get('configuration')\n )\n );\n }\n if($config->has('message')) {\n $validationRule->setErrorMessagePattern($config->get('message'));\n }\n // End of user code\n \n return $validationRule;\n }", "title": "" }, { "docid": "2e1f459dd987b1e62a8e28e0568bb5b1", "score": "0.5662004", "text": "function addObjectCreate($pattern, $className, $attributeName=NULL) {\r\n\r\n\t\t$oRule = new ObjectCreateRule($className, $attributeName);\r\n\t\t// Eg: (\"xxx/yyy/zzz\", oDataSourceConfig)\r\n\t\t$this->addRule($pattern, $oRule);\r\n\r\n\t}", "title": "" }, { "docid": "57bfc37367358271c5ccf6747f2b33f1", "score": "0.5655802", "text": "public function createDraft(Rule $rule, bool $discardExisting = false): Rule;", "title": "" }, { "docid": "3061d0bae09761fc6343adf80ec52a4e", "score": "0.56443006", "text": "static function ruleCollection()\n {\n return new RuleCollection();\n }", "title": "" }, { "docid": "4cba1bbe43c659038aa0c424598907be", "score": "0.56433135", "text": "protected function addRule(FilterRule $rule)\n {\n if ($this->keys === null) {\n $this->filter->addFilterRule($rule);\n }\n\n if (is_array($this->keys)) {\n foreach ($this->keys as $key) {\n $this->filter->addFilterRule($rule, $key);\n }\n } else {\n $this->filter->addFilterRule($rule, $this->keys);\n }\n\n return $this;\n }", "title": "" }, { "docid": "68e173f44f8267223aea5eb515bffbae", "score": "0.56386393", "text": "function add_rule( $rule, $clause_index, $search_code ) {\r\r\n\t\tif(gettype($rule) != \"string\") {\r\r\n\t\t\tdie(\"ERROR! \\$rule must be a string\");\r\r\n\t\t} else {\r\r\n\t\t\t$this->rulelist[] = new Rule($rule, $search_code, $clause_index);\t\r\r\n\t\t}\r\r\n\t}", "title": "" }, { "docid": "a68758c10c335be250c0f2780ff0c24f", "score": "0.5620872", "text": "public function __construct()\n {\n $this\n ->addRule('type', [\n 'type' => self::TYPE_STRING,\n 'description' => 'Algo type.',\n 'default' => 'argon2',\n 'example' => 'argon2',\n ])\n ->addRule('memoryCost', [\n 'type' => self::TYPE_INTEGER,\n 'description' => 'Memory used to compute hash.',\n 'default' => '',\n 'example' => 65536,\n ])\n ->addRule('timeCost', [\n 'type' => self::TYPE_INTEGER,\n 'description' => 'Amount of time consumed to compute hash',\n 'default' => '',\n 'example' => 4,\n ])\n ->addRule('threads', [\n 'type' => self::TYPE_INTEGER,\n 'description' => 'Number of threads used to compute hash.',\n 'default' => '',\n 'example' => 3,\n ])\n ;\n }", "title": "" }, { "docid": "c757ad37b4d2404c80ecbbf65249ed3b", "score": "0.5578772", "text": "function addRule($pattern, &$rule) {\r\n\r\n\t\t// Note: setting a reference to the Digester instance does\r\n\t\t//\t\t\tnot work as it should. Eg: In ObjectCreateRule-begin(..)\r\n\t\t//\t\t\toperates on a copy of the digester->stack, so objects\r\n\t\t//\t\t\tpreviously pushed onto the stack are not available\r\n\t\t//\t\t\t(it is a copy of the digester->stack)\r\n\t\t#$rule->setDigester($this);\t// recursive - disable to test\r\n\r\n\t\t// Setup RulesManager (if not yet setup)\r\n\t\t$oRulesMan\t=& $this->getRulesManager();\r\n\t\t$oRulesMan->add($pattern, $rule);\r\n\r\n\t}", "title": "" }, { "docid": "81ea346f8ff9d8c0da35a4af2913808d", "score": "0.5573677", "text": "public function rule($rule)\n {\n $this->rule = is_string($this->rule) ? explode('|', $this->rule) : $this->rule;\n $rule = is_string($rule) ? explode('|', $rule) : $rule;\n $this->rule = array_unique(array_merge($this->rule, $rule));\n if (in_array('required', $this->rule) and !isset($this->no_star)) {\n $this->required = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "1c057bc7a6af5135cebd5541f6d24574", "score": "0.5558705", "text": "function relation_rules_create($values = array()) {\n return relation_create($values['relation_type'], array());\n}", "title": "" }, { "docid": "ba56368461ba8198dedb45eb591b02ba", "score": "0.5512298", "text": "public function __construct($name, $ruleName, $value) {\n $this->name = $name;\n $this->ruleName = $ruleName;\n $this->value = $value;\n }", "title": "" }, { "docid": "4639082c7764d7dd760ee44e138128c4", "score": "0.54880154", "text": "protected function _create($priceRule)\n {\n $model = Mage::getModel('salesrule/rule');\n $model->loadPost($priceRule);\n $model->setUseAutoGeneration($priceRule[\"use_auto_generation\"]);\n $model->save();\n $data = $model->getData();\n $id = $data['rule_id'];\n return \"/api/rest/loyaltylion/rules/{$id}\";\n }", "title": "" }, { "docid": "544fe74bb35f058fe5de37e772353029", "score": "0.5480205", "text": "public function addRule(string $rule, ?string $alias = null): ValidateInterface;", "title": "" }, { "docid": "0061d8cf5c6e9a56ffdce6546314c548", "score": "0.546892", "text": "protected function createRules()\n {\n return [];\n }", "title": "" }, { "docid": "9b9a99b378de1a2e85dd9574f73a38a9", "score": "0.54574525", "text": "protected function _construct()\n {\n $this->_setResource('catalogrule');\n }", "title": "" }, { "docid": "f85d22abd0f4b82b3f232db290d4e7ea", "score": "0.5451663", "text": "public function addRule( $val )\n {\n $this->rules[] = $val;\n }", "title": "" }, { "docid": "f85d22abd0f4b82b3f232db290d4e7ea", "score": "0.5451663", "text": "public function addRule( $val )\n {\n $this->rules[] = $val;\n }", "title": "" }, { "docid": "6da8bbf59e62ff29c139cc92accde912", "score": "0.543168", "text": "public function addRule($rule, $flag)\n {\n $parts = $this->parseRule($rule);\n if (!isset($this->rules[$parts[0]])) {\n $this->rules[$parts[0]] = [];\n }\n $this->rules[$parts[0]][$parts[1]] = $flag;\n return $this;\n }", "title": "" }, { "docid": "0f23d289a1b17b1f9bf59c80272d4fa5", "score": "0.54248583", "text": "public function add_rule( string $pattern, string $target = null, int $code = null ) {\n\t\tif ( ! $this->check_host() ) {\n\t\t\treturn $this;\n\t\t}\n\n\t\t$this->rules[] = new Rule(\n\t\t\t(object) [\n\t\t\t\t'pattern' => $pattern,\n\t\t\t\t'target' => $target,\n\t\t\t\t'code' => $code,\n\t\t\t]\n\t\t);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "53a2b82dd5730c83ab2233e8d3a05b97", "score": "0.54030055", "text": "public function smarty_tom_add_rule($p_command)\n {\n if (preg_match(\"/^([a-zA-Z0-9*\\[\\]\\?._-]+)\\\\.(.*?)=(.+)$/is\", $p_command, $l_regex))\n {\n if (isset($l_regex[2]) && $l_regex[2] != \"\")\n {\n $this->m_ruleset[$l_regex[1]][$l_regex[2]] = $l_regex[3];\n } // if\n } // if\n\n return $this;\n }", "title": "" }, { "docid": "c700325a21f5a62556f580abbf0618cc", "score": "0.53858274", "text": "public function __construct( $rules = array() ) {\n\t\t$this->rules = $rules;\n\t}", "title": "" }, { "docid": "bb3e9ad0e630a74a5a98ab5425574579", "score": "0.53825027", "text": "function _loadRule($type)\n {\n if (!file_exists(OOO_CORE.'/form/rules/Rule'.$type.'.php'))\n {\n echo 'This type of rule ('.$type.') does not exist!';\n exit;\n }\n include_once OOO_CORE.'/form/rules/Rule'.$type.'.php';\n\n $classname = 'Rule'.$type;\n\n $ruleObject = & new $classname ();\n\n return $ruleObject;\n }", "title": "" }, { "docid": "e7f0636634bdfe97cc16d71dd8400dd1", "score": "0.53800404", "text": "public function addDataRule($attribute, $rule)\r\n {\r\n $this->dataRules[$attribute] = $rule;\r\n return $this;\r\n }", "title": "" }, { "docid": "b1e9cafb0b2baa22869f44648e2bc318", "score": "0.53771776", "text": "public function loadRuleArchive(UuidInterface $ruleId): Rule;", "title": "" }, { "docid": "7ab4d8b760176dbd6ed1d1d07f38b8ef", "score": "0.53684384", "text": "public function setCreationRules()\n {\n $this->data = [\n 'criteriaId' => 'required|exists:sample_criterias,id',\n 'file' => 'required|json'\n ];\n\n return $this;\n }", "title": "" }, { "docid": "5f0a2053cc3a2abecbf99e076391c155", "score": "0.5341855", "text": "public function create(RuleListener $listener)\n {\n $rule = new Rule();\n $form = $this->presenter->form($rule);\n\n return $listener->showCreateForm(compact('rule', 'form'));\n }", "title": "" }, { "docid": "0a37b814a7eeced1d41553fc1abbefaa", "score": "0.533653", "text": "public function rules($rules)\n {\n $this->imageRules = ($rules instanceof Rule || is_string($rules)) ? func_get_args() : $rules;\n\n return $this;\n }", "title": "" }, { "docid": "eaf7bd4322a58eff6a95ed8bea0a50b0", "score": "0.53312075", "text": "public function setRule($ruleName, $definition)\n {\n $this->rules[$ruleName] = is_object($definition) && $definition instanceof \\DataFilter\\Rule\n ? $definition\n : new \\DataFilter\\Rule($ruleName, $definition, $this, $this->dataFilter);\n return $this->rules[$ruleName];\n }", "title": "" }, { "docid": "50abc5b2fe13ea7815463da9b05784c5", "score": "0.5329894", "text": "public function __construct($attributes, $rules, $messages = array())\n\t{\n\t\tforeach ($rules as $key => &$rule)\n\t\t{\n\t\t\t$rule = (is_string($rule)) ? explode('|', $rule) : $rule;\n\t\t}\n\n\t\t$this->rules = $rules;\n\t\t$this->messages = $messages;\n\t\t$this->attributes = $attributes;\n\t}", "title": "" }, { "docid": "4834b37a840d07d0ef5f816c76a45e85", "score": "0.5320064", "text": "private function makeRule($called, $args){\n try{\n $obj = new $called($this, $this->chain, $args);\n }\n catch(ChainException $e){\n throw $e;\n }\n return $obj;\n }", "title": "" }, { "docid": "7674f1689285ada22f7f087f386740b7", "score": "0.5317581", "text": "public function create($merchantId, RepricingRule $postBody, $optParams = [])\n {\n $params = ['merchantId' => $merchantId, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], RepricingRule::class);\n }", "title": "" }, { "docid": "57b4f8869c73d578da7ba540f4ac3be0", "score": "0.5311496", "text": "static public function createRules()\n\t{\n\t\treturn [\n\t\t\t'trackable_id' => 'required|numeric',\n\t\t\t'trackable_name' => 'required',\n\t\t\t'country'\t=> 'required',\n\t\t\t'coordinates' => 'required|array'\n\t\t];\n\t}", "title": "" }, { "docid": "9855cd80a5f94d353e58b5488da594af", "score": "0.52933335", "text": "public function create($appsId, FirewallRule $postBody, $optParams = [])\n {\n $params = ['appsId' => $appsId, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], FirewallRule::class);\n }", "title": "" }, { "docid": "2c6091bd918f52147e6ad3d02b249b3a", "score": "0.52902555", "text": "public function setRule( $rule ) {\n\t\t$this->rules[] = $rule;\n\t}", "title": "" }, { "docid": "710ad0ec64e35c6deb058d19870fcf10", "score": "0.5280781", "text": "public function store(CreateRuleRequest $request)\n {\n $this->rule->create($request->all());\n\n return redirect()->route('admin.notification.rule.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('notification::rules.title.rules')]));\n }", "title": "" }, { "docid": "3296637537ad67004a883efa0e05feaf", "score": "0.5276564", "text": "public function setRules($rules)\n {\n $this->rules = $rules;\n\n return $this;\n }", "title": "" }, { "docid": "5f1ae612252e62e2b56d2172ce20fd1f", "score": "0.52709854", "text": "public function __construct()\n {\n parent::__construct($this->rules);\n }", "title": "" }, { "docid": "bdc33a999bab9d1b4addc32faf6ab387", "score": "0.5265377", "text": "public function rule()\n {\n return $this->belongsTo('App\\Rule', 'rule_id');\n }", "title": "" }, { "docid": "f5b1103f6e4d4a0d0797ba62c16418d4", "score": "0.52564436", "text": "public function __construct(\n $title = Resources::EMPTY_STRING,\n $ruleDescription = null\n ) {\n Validate::isString($title, 'title');\n\n if (is_null($ruleDescription)) {\n $ruleDescription = new RuleDescription();\n }\n $this->_ruleDescription = $ruleDescription;\n $this->_entry = new Entry();\n $this->_entry->setTitle($title);\n $this->_entry->setAttribute(\n Resources::XMLNS,\n Resources::SERVICE_BUS_NAMESPACE\n );\n }", "title": "" }, { "docid": "7b81acffe26feae948a30a9072378ad4", "score": "0.5253142", "text": "public function __construct(array $rules)\n {\n $this->rules = $rules;\n }", "title": "" }, { "docid": "04cfe7ca5269af3f6e1b7348b51973ab", "score": "0.5245864", "text": "public function createRule(string $definition, ?bool $activate = null, ?ApiRuleCreate $request = null): array\n {\n $request ??= new ApiRuleCreate();\n $request->database = $this->getDatabase()->getOlapObjectId();\n $request->cube = $this->getOlapObjectId();\n $request->definition = $definition;\n $request->activate = $activate ?? true;\n\n return $this->getConnection()\n ->request($request)\n ->getArrayCopy()\n ;\n }", "title": "" }, { "docid": "285cf4a2b34e5264323b1ce9d6c31093", "score": "0.52437735", "text": "public function getRules()\n {\n return new \\ivankff\\soapserver\\tests\\models\\RulesTestModel();\n }", "title": "" }, { "docid": "f6eb192776cfc93327bb87174388b369", "score": "0.523713", "text": "abstract public function rules();", "title": "" }, { "docid": "f6eb192776cfc93327bb87174388b369", "score": "0.523713", "text": "abstract public function rules();", "title": "" }, { "docid": "f6eb192776cfc93327bb87174388b369", "score": "0.523713", "text": "abstract public function rules();", "title": "" }, { "docid": "f6eb192776cfc93327bb87174388b369", "score": "0.523713", "text": "abstract public function rules();", "title": "" }, { "docid": "f6eb192776cfc93327bb87174388b369", "score": "0.523713", "text": "abstract public function rules();", "title": "" }, { "docid": "f6eb192776cfc93327bb87174388b369", "score": "0.523713", "text": "abstract public function rules();", "title": "" }, { "docid": "f6eb192776cfc93327bb87174388b369", "score": "0.523713", "text": "abstract public function rules();", "title": "" }, { "docid": "f6eb192776cfc93327bb87174388b369", "score": "0.523713", "text": "abstract public function rules();", "title": "" }, { "docid": "f6eb192776cfc93327bb87174388b369", "score": "0.523713", "text": "abstract public function rules();", "title": "" }, { "docid": "f6eb192776cfc93327bb87174388b369", "score": "0.523713", "text": "abstract public function rules();", "title": "" }, { "docid": "ded13848b14e68504be0e5d6fdc7e681", "score": "0.52318186", "text": "public function rules()\n {\n return $this->hasMany('App\\Rule');\n }", "title": "" }, { "docid": "5b6ce2ee8bb17af29a855e07a9329924", "score": "0.5229207", "text": "abstract protected function buildFromToRule($attribute);", "title": "" }, { "docid": "075ad0b567d5e748d46b85202ae8fe55", "score": "0.5221072", "text": "public function updateRules()\n {\n return RuleFactory::make(\n [\n '%name%' => ['required', 'string'],\n 'product_id' => ['required', 'exists:products,id'],\n 'custom_field_id' => ['required', 'exists:custom_fields,id'],\n 'additional_price' => ['required', 'numeric', 'max:1e7', 'min:1'],\n ]\n );\n }", "title": "" }, { "docid": "e1a3a1abe407168f5aefef0c8e011b23", "score": "0.5220051", "text": "public function rules();", "title": "" }, { "docid": "e1a3a1abe407168f5aefef0c8e011b23", "score": "0.5220051", "text": "public function rules();", "title": "" }, { "docid": "e1a3a1abe407168f5aefef0c8e011b23", "score": "0.5220051", "text": "public function rules();", "title": "" }, { "docid": "e1a3a1abe407168f5aefef0c8e011b23", "score": "0.5220051", "text": "public function rules();", "title": "" }, { "docid": "440a94bad875ee7b4b9cc38e3b2b3039", "score": "0.52141917", "text": "public function getRule(): Closure;", "title": "" }, { "docid": "442de6c4e7de6c5aa7349b9d0c23edbf", "score": "0.51951796", "text": "public function __construct($stream, $rules) {\n $this->stream = $stream;\n $this->rules = $rules;\n }", "title": "" }, { "docid": "1c7df757f3dca9f1a76a594e79c47b65", "score": "0.5189884", "text": "public function withRules(array $rules): RulesRunnerInterface;", "title": "" }, { "docid": "9bdc158da1ecbc622502d4098e460762", "score": "0.51708496", "text": "public function newRuleUpdateStruct(): RuleUpdateStruct;", "title": "" }, { "docid": "e13a68b98aabe8df0230e1811be39ee9", "score": "0.5167817", "text": "public function updateRules()\n {\n return RuleFactory::make([\n '%name%' => [\n 'required',\n 'string',\n 'max:255', ],\n 'price' => ['required', 'numeric', 'between:0,10000'],\n 'city_id' => ['required', 'exists:cities,id'],\n\n ]);\n }", "title": "" } ]
1a06d1d6017e924ce42d11ec6fac167b
OneToMany (owning side) Add ArrecadacaoProcessoSuspensao
[ { "docid": "7f19dd2384938f59fca96fd27bcd1fc2", "score": "0.62888175", "text": "public function addFkArrecadacaoProcessoSuspensoes(\\Urbem\\CoreBundle\\Entity\\Arrecadacao\\ProcessoSuspensao $fkArrecadacaoProcessoSuspensao)\n {\n if (false === $this->fkArrecadacaoProcessoSuspensoes->contains($fkArrecadacaoProcessoSuspensao)) {\n $fkArrecadacaoProcessoSuspensao->setFkArrecadacaoSuspensao($this);\n $this->fkArrecadacaoProcessoSuspensoes->add($fkArrecadacaoProcessoSuspensao);\n }\n \n return $this;\n }", "title": "" } ]
[ { "docid": "358b767ffe93251b2b4ece41a841a145", "score": "0.63302946", "text": "public function oneToManyInsert() {\n\n //inserindo estados em um determinado pais\n $dados = [\n 'nome' => 'Bahia',\n 'sigla' => 'BA',\n ];\n\n //vincular o pais de foi recuperado de id 1\n $pais = Pais::find(3);\n\n $inserirEstados = $pais->estados()->create($dados);\n var_dump($inserirEstados);\n }", "title": "" }, { "docid": "2d1739697cafb7f0d77964c10ab005ce", "score": "0.6116071", "text": "public function getFkArrecadacaoProcessoSuspensoes()\n {\n return $this->fkArrecadacaoProcessoSuspensoes;\n }", "title": "" }, { "docid": "2e5d339dd4bc87fc73aa5bf3300e43e0", "score": "0.5503789", "text": "public function insumos()\n {\n return $this->hasMany(ProcessoInsumoTermoReferencia::class, 'id_processo', 'id');\n }", "title": "" }, { "docid": "4212b6b9f676c151b563193ee97891a1", "score": "0.54186064", "text": "public function oneToManyInsertTwo() {\n\n //inserindo estados em um determinado pais\n $dados = [\n 'nome' => 'Bahia',\n 'sigla' => 'BA',\n 'pais_id' => '3',\n ];\n\n $inserirEstados = Estado::create($dados);\n var_dump($inserirEstados->nome);\n }", "title": "" }, { "docid": "80e0280c5cdc5b10bbca12c9867500d9", "score": "0.5403594", "text": "public function ajouterPlusieursPossessionAction(){\n\t\t$em = $this->getDoctrine()->getManager();\n\t\n\t\t// Recupere l'id de l'utilisateur en cour\n\t\t$curentUserId = $this->get('security.context')->getToken()->getUser()->getId();\n\t\t$user = $em->getRepository('ManblioUserBundle:User')->find($curentUserId);\n\t\t$userId=$user->getId();\n\t\t\t// verifie qu'il n'y a pas eu de requete\n\t\t\t$request=$this->getRequest();\n \tif ('POST' === $request->getMethod()){\n \t\t// Recupere les donnée du formulaire \n \t\t$du=$this->getRequest()->request->get('du');\n\t \t$au=$this->getRequest()->request->get('au');\n\t \t$serie=$this->getRequest()->request->get('serie');\n\t \t\n\t \t$firstLivre= $du;\n\t \t// Nbre de tome a ajouter\n\t \t$aAjouter=$au;\n\n\t \t// Numero des t-uples\n\t \t$i=$firstLivre;\n\n\t \t// Execute autant de fois que de numero a ajouter\n\t\t\t\t$var=array();\n\t\t\t\tdo{\n\t\t\t\t\t$series=$em->getRepository('ManblioLivreBundle:NomSerie')->find($serie);\n\t\t\t\t\t$livre=$em->getRepository('ManblioLivreBundle:Livre')->findByNumeroAndSerie( $i, $series);\n\t\t\t\t\tforeach($livre as $l){\n\t\t\t\t\t\t$exist=$em->getRepository('ManblioLivreBundle:Possession')->findUserAndLivre($userId,$l->getId());\n\t\t\t\t\t\tif($exist == null){\n\t\t\t\t\t\t\t$possession = new Possession();\n\t\t\t\t\t\t\t$possession->setLivre($l);\n\t\t\t\t\t\t\t$possession->setUtilisateur($user);\n\t\t\t\t\t\t\t$em->persist($possession);\n\t\t\t\t\t\t\t$em->flush();\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t// fait rien\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}while($i<=$aAjouter);\n\n\t \t// Redirige vers la page detail de la serie \n\t \treturn $this->redirect($this->generateUrl('detailSerie', array('id' =>$serie)));\n\t \n \t}\n\t}", "title": "" }, { "docid": "ad7712a19d6231340f1189b56eee792b", "score": "0.52951175", "text": "public function actionCreate()\n {\n $model = new SolicitudPrestamo();\n $prestamo= [new SpreHeSolicita];\n $cant_he = Herramientas::find()->count();\n $model->SPRE_FECHA= date('Y-m-d');\n $model->SPRE_ESTADO='Pendiente';\n if ($model->load(Yii::$app->request->post())) {\n //$model->save();\n $prestamo = Model::createMultiple(SpreHeSolicita::classname());\n Model::loadMultiple($prestamo, Yii::$app->request->post());\n\n\n\n // validate all models\n $valid = $model->validate();\n $valid = Model::validateMultiple($prestamo) && $valid;\n\n if ($valid) {\n $transaction = \\Yii::$app->db->beginTransaction();\n $model->save();\n try {\n if ($flag = $model->save(false)) {\n foreach ($prestamo as $prestamo) {\n $prestamo->SPRE_ID = $model->SPRE_ID;\n /*$tiene= HerramientaTiene::find()->where('HE_ID=:x AND EH_ID=:y',[':x'=>$prestamo->HE_ID, ':y'=>$prestados->EH_ID])->one();\n\n if($tiene==NULL){\n $tiene= new HerramientaTiene();\n $tiene->HE_ID=$prestamo->HE_ID;\n $tiene->HT_CANTHEESTADO=0;\n $tiene->EH_ID=3;\n }\n $tiene->HT_CANTHEESTADO=$tiene->HT_CANTHEESTADO+$prestamo->SOLI_CANTIDAD;\n $tienelibre= HerramientaTiene::find()->where('HE_ID=:x AND EH_ID=:y',[':x'=>$prestamo->HE_ID, ':y'=>$libre->EH_ID])->one();\n $tienelibre->HT_CANTHEESTADO=$tienelibre->HT_CANTHEESTADO-$prestamo->SOLI_CANTIDAD;\n $tiene->save();\n $tienelibre->save();*/\n if (! ($flag = $prestamo->save(false))) {\n $transaction->rollBack();\n break;\n }\n }\n }\n if ($flag) {\n $transaction->commit();\n return $this->redirect(['view', 'id' => $model->SPRE_ID]);\n }\n } catch (Exception $e) {\n $transaction->rollBack();\n }\n }\n }else{\n return $this->render('create', [\n 'model' => $model,\n 'cant_he' => $cant_he,\n 'prestamo' => (empty($prestamo)) ? [new SpreHeSolicita] : $prestamo\n ]);\n }\n }", "title": "" }, { "docid": "c36b46f2f3899a0de69256b20dc1ce87", "score": "0.5278936", "text": "public function salvarVinculoInscricaoRestosAPagarNaoProcessados() {\n\n $oDaoConLancamInscricaoRestosAPagarNaoProcessados = new cl_conlancaminscrestosapagar();\n $oDaoConLancamInscricaoRestosAPagarNaoProcessados->c108_inscricaorestosapagarnaoprocessados = $this->getInscricaoRestosAPagarNaoProcessados();\n $oDaoConLancamInscricaoRestosAPagarNaoProcessados->c108_codlan = $this->iCodigoLancamento;\n $oDaoConLancamInscricaoRestosAPagarNaoProcessados->c108_sequencial = null;\n $oDaoConLancamInscricaoRestosAPagarNaoProcessados->incluir(null);\n\n if ($oDaoConLancamInscricaoRestosAPagarNaoProcessados->erro_status == \"0\") {\n\n $sErroQuery = \"Não foi possível salvar o vínculo da inscrição de restos a pagar não processados com o lançamento da contabilidade.\";\n throw new DBException($sErroQuery);\n }\n\n return true;\n }", "title": "" }, { "docid": "6fb7067f5248c650bb6688cf874179d0", "score": "0.5247873", "text": "public function actionSaveproyeccion(){\n\n // validacion (Meta) continuo/acumulado fraccional (porcentaje): \n /**\n * No puede haber mas de un item con un valor de 100\n * Siempre el ultimo item debe tener un valor de 100\n * Cada item debe ser mayor al anterior\n */\n // validacion (Meta) discreto/periodo fraccional (porcentaje): \n /**\n * No puede haber mas de un item con un valor de 100\n * Siempre la suma de todos los items debe ser 100\n */\n // validacion (Meta) continuo/acumulado no fraccional (numero): \n /**\n * Cada item debe ser mayor al anterior\n */\n // validacion (Meta) discreto/periodo no fraccional (numero): \n /**\n * Cada item debe ser mayor al anterior\n */\n // se debe validar que haya registros en cada uno de los periodos\n // accion que realiza es cambiar el parametro meta del indicador a 1 con eso se determina que la proyeccion de meta ha sido cargada \n if (Yii::$app->request->isAjax) {\n $fecha_modificacion = date(Yii::$app->params[\"dateTimeByDefault\"]);\n $data = Yii::$app->request->post();\n $ind_id = $data['id'];\n $transaction = Yii::$app->db_gpr->beginTransaction();\n $error = false;\n try{\n $indicador = Indicador::findOne($ind_id);\n $planCierre = PlanificacionPoa::getCierrePoaPedi($indicador->oope_id);\n if($planCierre['pedi_cierre'] == '1' || $planCierre['poa_cierre'] == '1'){\n $error = true;\n throw new Exception(gpr::t('planificacionpoa', 'Transaction is invalid. Planning Pedi/Poa is closed.'));\n }\n $indicador->ind_meta = '1';\n if(!$indicador->save()){\n throw new Exception('Error Registro no actualizado.');\n }\n $transaction->commit();\n $message = array(\n \"wtmessage\" => Yii::t(\"notificaciones\", \"Your information was successfully saved.\"),\n \"title\" => Yii::t('jslang', 'Success'),\n );\n return Utilities::ajaxResponse('OK', 'alert', Yii::t('jslang', 'Success'), 'false', $message);\n }catch(Exception $e){\n $transaction->rollback();\n $msg = ($error)?($e->getMessage()):\"\";\n $message = array(\n \"wtmessage\" => Yii::t('notificaciones', 'Your information has not been saved. Please try again.').\" \".$msg,\n \"title\" => Yii::t('jslang', 'Error'),\n );\n return Utilities::ajaxResponse('NOOK', 'alert', Yii::t('jslang', 'Error'), 'true', $message);\n }\n }\n }", "title": "" }, { "docid": "5eed8256b6c071f5fb10b52b45565259", "score": "0.52458173", "text": "public function actionGrabarprogramado()\n {\n $anio = $_REQUEST[\"anio\"];\n $id = $_REQUEST[\"id\"];\n $mes = $_REQUEST[\"mes\"];\n $cantidad = $_REQUEST[\"cantidad\"];\n $id_recurso = $_REQUEST[\"id_recurso\"];\n $precio_unit = $_REQUEST[\"precio_unit\"];\n \n\n //var_dump($id);die;\n $count = count($mes);\n\n \n /*Grabar RecursoProgramado*/\n for($i=0;$i<$count;$i++)\n\n {\n if($id[$i] != null)\n {\n $recursoprogramado=RecursoProgramado::findOne($id[$i]);\n $recursoprogramado->id_recurso=$id_recurso;\n $recursoprogramado->anio=$anio[$i];\n $recursoprogramado->mes=$mes[$i];\n $recursoprogramado->cantidad=$cantidad[$i];\n $recursoprogramado->precio_unit=$precio_unit;\n $recursoprogramado->update(); \n }\n else\n {\n $recursoprogramado=new RecursoProgramado;\n $recursoprogramado->id_recurso=$id_recurso;\n $recursoprogramado->anio=$anio[$i];\n $recursoprogramado->mes=$mes[$i];\n $recursoprogramado->cantidad=$cantidad[$i];\n $recursoprogramado->precio_unit=$precio_unit;\n $recursoprogramado->save(); \n }\n }\n \n \n $sumacantidad = RecursoProgramado::find()\n ->where('id_recurso = :id_recurso',[':id_recurso'=>$id_recurso])\n ->sum('cantidad');\n \n $Recurso = Recurso::findOne($id_recurso);\n $Recurso->cantidad = $sumacantidad;\n $Recurso->precio_unit = $precio_unit;\n $Recurso->precio_total = ($precio_unit * $sumacantidad);\n $Recurso->update();\n \n $mensaje = \"Se Grabo la Programación del Recurso\";\n \n $array = array('cantidad'=>$sumacantidad,'monto'=>($precio_unit * $sumacantidad),'mensaje'=>$mensaje);\n\n echo json_encode($array);\n }", "title": "" }, { "docid": "0683974cd06dcadbbd6de5f713909721", "score": "0.5208784", "text": "public function createAllSerieAction(){\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t//Recupere les series pour les mettre dans le menu select\n\t\t$series=$em->getRepository('ManblioLivreBundle:NomSerie')->findAll(array(),array('nomSerie'=> 'ASC'));\n\n\t\t// Recupere l'id de l'utilisateur en cour\n\t\t$curentUserId = $this->get('security.context')->getToken()->getUser()->getId();\n\t\t$user = $em->getRepository('ManblioUserBundle:User')->find($curentUserId);\n\n\t\t\t// verifie qu'il n'y a pas eu de requete\n\t\t\t$request=$this->getRequest();\n \tif ('POST' === $request->getMethod()){\n \t\t// Recupere les donnée du formulaire \n \t\t$nbre=$this->getRequest()->request->get('nbre');\n\t \t$serieId=$this->getRequest()->request->get('serie');\n\t \t$prix=$this->getRequest()->request->get('prix');\n\t \t\n\t \t// Recupere la serie qui a été choisie\n\t \t$serie=$em->getRepository('ManblioLivreBundle:NomSerie')->find($serieId);\n\t \t\n\t \t// Récupere le dernier tome ajouter de la serie ci-dessus\n\t \t$lastLivreId=$em->getRepository('ManblioLivreBundle:Livre')->findOneBy(array(\"nomSerie\"=>$serie->getId()),array(\"numero\"=>\"desc\"));\n\t \t\n\t \t// Si il y a deja des livre dans la serie on part du dernier tome +1\n\t \tif($lastLivreId){\n\t \t$firstId=$lastLivreId->getNumero()+1;\n\t \t}\n\t \t// Si non on commance a 1\n\t \telse{\n\t \t\t$firstId=1;\n\t \t}\n\t \t// Nbre de tome a ajouter\n\t \t$aAjouter=$nbre;\n\n\t \t// Numero des t-uples\n\t \t$i=$firstId;\n\n\t \t// Execute autant de fois que de numero a ajouter\n\t\t\t\tdo{\n\t\t\t\t\t// Instensie un nouveau livre \n\t\t\t\t\t$newLivre = new Livre();\n\t\t\t\t\t// Attribe les données\n\t\t\t\t\t$newLivre->setPrix($prix);\n\t\t\t\t\t$newLivre->setNumero($i);\n\t\t\t\t\t$newLivre->setNomSerie($serie);\n\t\t\t\t\t$newLivre->setQuiCree($user);\n\t\t\t\t\t\n\t\t\t\t\t// Persiste et envoie en BDD\n\t\t\t\t\t$em->persist($newLivre);\n\t\t\t\t\t$em->flush();\n\t\t\t\t\t// Incremente pour le le t-uple prochain soit a n+1\n\t\t\t\t\t$i++;\n\t\t\t\t}while($i<$firstId+$aAjouter);\n\t \t\n\t \t// Redirige vers la page detail de la serie \n\t \treturn $this->redirect($this->generateUrl('detailSerie', array('id' => $serie->getId())));\n\t \n \t}\n \t\n\n \t// Affiche le formulaire \n return $this->render(\"ManblioLivreBundle:Form:addAllLivre.html.twig\", array(\n\t\t\t\t'series' => $series,\n\t\t\t));\n \t\n\t\t\n\t}", "title": "" }, { "docid": "65507ddd11e2b0b0230bee7ab88a66a9", "score": "0.5202629", "text": "public function save(){\n\t\tglobal $db, $prefix;\n\n\t\t$query = \"INSERT INTO {$prefix}_prefactura VALUES(NULL,{$this->evento},'{$this->empresaPersona}','{$this->identificacion}','{$this->fecha_pago}',{$this->subtotal},{$this->iva}, {$this->total})\";\n\t\t$db->Execute($query);\n\n\t\t$id = $db->Execute(\"SELECT MAX(id) AS id FROM {$prefix}_prefactura\")->GetRows();\n\t\t$this->id = $id[0]['id'];\n\n\t\tforeach($this->productos as $producto)\n\t\t\t$db->Execute(\"INSERT INTO {$prefix}_detalle_prefactura VALUES(NULL,{$this->id},{$producto['producto']},{$producto['cantidad']},{$producto['valor']},{$producto['valorTotal']})\");\n\n\t\tforeach($this->descuentos as $descuento)\n\t\t\t$db->Execute(\"INSERT INTO {$prefix}_descuentos_prefactura VALUES(NULL,{$this->id},{$descuento['id']},{$descuento['valor']})\");\n\t\t\n\t}", "title": "" }, { "docid": "48020729a3900bd8f8c451897f9301fa", "score": "0.51778615", "text": "public function addFkImobiliarioImovelProcessos(\\Urbem\\CoreBundle\\Entity\\Imobiliario\\ImovelProcesso $fkImobiliarioImovelProcesso)\n {\n if (false === $this->fkImobiliarioImovelProcessos->contains($fkImobiliarioImovelProcesso)) {\n $fkImobiliarioImovelProcesso->setFkImobiliarioImovel($this);\n $this->fkImobiliarioImovelProcessos->add($fkImobiliarioImovelProcesso);\n }\n\n return $this;\n }", "title": "" }, { "docid": "2916e1bbe4dd07ac75c8efea8db8e47d", "score": "0.51704156", "text": "private function gravaProcesso() {\n\n if ($this->iCodigoProcesso != \"\" || $this->iCodigoProcesso != null) {\n\n $oDaoIssMovAlvaraProcesso = db_utils::getDAO(\"issmovalvaraprocesso\");\n $oDaoIssMovAlvaraProcesso->q124_codproc = $this->iCodigoProcesso;\n $oDaoIssMovAlvaraProcesso->q124_issmovalvara = $this->iCodigo;\n $oDaoIssMovAlvaraProcesso->incluir(\"\");\n\n if ($oDaoIssMovAlvaraProcesso->erro_status == \"0\") {\n throw new DBException($oDaoIssMovAlvaraProcesso->erro_msg);\n }\n }\n }", "title": "" }, { "docid": "8b7851b40c360375509ffd0e941bf6b0", "score": "0.51640075", "text": "public function processes()\n {\n return $this->belongsToMany(Process::class, 'judi_process_user', 'user_id', 'process_id');\n }", "title": "" }, { "docid": "9077fc43149385b75ef963ef5a8adbf6", "score": "0.5131314", "text": "public function setCondicionesGrupo($grupos){\n $em= $this->getEntityManager();\n foreach ($grupos as $grupo) {\n \n $ficha_condicion_profesor=$em->createQuery(\n \"SELECT h FROM NetpublicCoreBundle:CondicionGrupo h \n WHERE h.tipo=1 AND h.grupo=:grupo\n \")\n ->setParameter(\"grupo\", $grupo->getId()) \n ->getResult(); \n foreach ($ficha_condicion_profesor as $ficha) {\n $ficha_modificar= $em->getRepository(\"NetpublicCoreBundle:HorarioGrupo\")\n ->findOneBy(array(\n 'hora_fila'=>$ficha->getHoraFila(),\n 'dia_columna'=>$ficha->getDiaColumna(),\n 'grupo'=>$grupo->getId()\n ));\n $ficha_modificar->setTipo(4); \n $em->persist($ficha_modificar);\n\n \n }\n } \n \n}", "title": "" }, { "docid": "fedcbfc6f4767508c5a96f4525ad4260", "score": "0.51053864", "text": "public function save() {\n parent::save();\n\n //RECALCULAR EL TRASPASO\n $this->getIDTrapaso()->recalcula();\n $this->getIDTraspaso()->save();\n }", "title": "" }, { "docid": "910fd74eb8933623103a19177bff2f77", "score": "0.5098026", "text": "public function aceptado(){\n\t\treturn $this->hasOne('App\\Models\\SubidaAceptada', 'id_subida', 'id_subida');\n\t}", "title": "" }, { "docid": "3ae7b7301787e510e4c0eeda0e062482", "score": "0.50845", "text": "public function encaminhacomponentecomissaoAction()\n {\n // recebe os dados via get\n $idPronac_Get = $this->_request->getParam(\"idpronac\"); // pega o id do pronac via get\n $idAcao = $this->_request->getParam(\"idacao\"); // pega o idAcaoAvaliacaoPedidoAlteracao via get\n\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->setFetchMode(Zend_DB :: FETCH_OBJ);\n\n try {\n $db->beginTransaction();\n\n // ATUALIZA OS CAMPOS stAtivo e stVerificacao NA TABELA tbAcaoAvaliacaoItemPedidoAlteracao\n $sqlfin = ReadequacaoProjetos::retornaSQLfinalizaGeral($idAcao);\n $dados = $db->fetchAll($sqlfin);\n\n // BUSCA OS REGISTROS DA TABELA tbAcaoAvaliacaoItemPedidoAlteracao\n $sqlfin2 = ReadequacaoProjetos::retornaSQLfinalizaGeral2($idAcao);\n $dados = $db->fetchAll($sqlfin2);\n $id = $dados[0]->idAvaliacaoItemPedidoAlteracao;\n $idOrgao = $dados[0]->idOrgao;\n\n // pega a justificativa final e o id do Parecerista\n $sqlJustProp = ReadequacaoProjetos::buscarJustificativaFinalParecerista($id);\n $dados = $db->fetchAll($sqlJustProp);\n $dsObservacao = $dados[0]->dsObservacao;\n $idAgenteRemetente = $dados[0]->idAgenteRemetente;\n\n // BUSCA OS REGISTROS DOS CAMPOS idPedidoAlteracao E tpAlteracaoProjeto DA TABELA tbAvaliacaoItemPedidoAlteracao\n $sqlfin3 = ReadequacaoProjetos::retornaSQLfinalizaGeral3($id);\n $dados = $db->fetchAll($sqlfin3);\n $idPedidoAlt = $dados[0]->idPedidoAlteracao;\n $tpAlt = $dados[0]->tpAlteracaoProjeto;\n $stAvaliacaoItem = $dados[0]->stAvaliacaoItemPedidoAlteracao;\n $idAgenteAvaliador = $dados[0]->idAgenteAvaliador;\n $stParecerFavoravel = (trim($stAvaliacaoItem) == 'AP') ? 1 : 2; // 1 => favor�vel; 2 => desfavor�vel\n\n // ATUALIZA O CAMPO stVerificacao NA TABELA tbPedidoAlteracaoXTipoAlteracao\n $sqlfin4 = ReadequacaoProjetos::retornaSQLfinalizaGeral4($idPedidoAlt, $tpAlt);\n $dados = $db->fetchAll($sqlfin4);\n\n // CRIAR NOVO REGISTRO DE ENCAMINHAMENTO NA TABELA tbAcaoAvaliacaoItemPedidoAlteracao\n $sqlfin5 = ReadequacaoProjetos::retornaSQLfinalizaGeral5($id, $idOrgao, $this->getIdUsuario, 118);\n $dados = $db->fetchAll($sqlfin5);\n\n // BUSCA O IDPRONAC DA TABELA tbPedidoAlteracaoProjeto\n $sqlfin6 = ReadequacaoProjetos::retornaSQLfinalizaGeral6($idPedidoAlt);\n $dados = $db->fetchAll($sqlfin6);\n $idPronac = $dados[0]->IdPRONAC;\n\n // copia as tabelas\n $planilhaProjeto = new PlanilhaProjeto();\n $planilhaAprovacao = new PlanilhaAprovacao();\n $analiseConteudo = new Analisedeconteudo();\n $analiseaprovacao = new AnaliseAprovacao();\n $projetos = new Projetos();\n $Distribuicao = new DistribuicaoProjetoComissao();\n $titulacaoConselheiro = new TitulacaoConselheiro();\n $Rplanilhaprojeto = $planilhaAprovacao->buscar(array('idPRONAC = ?'=> $idPronac_Get, 'tpPlanilha = ?'=> 'PA', 'stAtivo = ?' => 'N'));\n foreach ($Rplanilhaprojeto as $resu) {\n $data = array(\n 'tpPlanilha' => 'CO'\n ,'dtPlanilha' => new Zend_Db_Expr('GETDATE()')\n ,'idPlanilhaProjeto' => $resu->idPlanilhaProjeto\n ,'idPlanilhaProposta' => $resu->idPlanilhaProposta\n ,'IdPRONAC' => $resu->IdPRONAC\n ,'idProduto' => $resu->idProduto\n ,'idEtapa' => $resu->idEtapa\n ,'idPlanilhaItem' => $resu->idPlanilhaItem\n ,'dsItem' => ''\n ,'idUnidade' => $resu->idUnidade\n ,'qtItem' => $resu->qtItem\n ,'nrOcorrencia' => $resu->nrOcorrencia\n ,'vlUnitario' => $resu->vlUnitario\n ,'qtDias' => $resu->qtDias\n ,'tpDespesa' => $resu->tpDespesa\n ,'tpPessoa' => $resu->tpPessoa\n ,'nrContraPartida' => $resu->nrContraPartida\n ,'nrFonteRecurso' => $resu->nrFonteRecurso\n ,'idUFDespesa' => $resu->idUFDespesa\n ,'idMunicipioDespesa' => $resu->idMunicipioDespesa\n ,'idPlanilhaAprovacaoPai' => $resu->idPlanilhaAprovacao\n ,'idPedidoAlteracao' => $idPedidoAlt\n ,'dsJustificativa' => null\n ,'stAtivo' => 'N');\n $inserirPlanilhaAprovacao = $planilhaAprovacao->InserirPlanilhaAprovacao($data);\n }\n\n // chama a fun��o para fazer o balanceamento\n $areaProjeto = $projetos->BuscarAreaSegmentoProjetos($idPronac_Get);\n $Rtitulacao = $titulacaoConselheiro->buscarComponenteBalanceamento($areaProjeto['area']);\n $Distribuicao->alterar(array('stDistribuicao' => 'I'), array('idPRONAC = ?'=>$idPronac_Get));\n $dados = array(\n 'idPRONAC' => $idPronac_Get\n ,'idAgente' => $Rtitulacao[0]['idAgente']\n ,'dtDistribuicao' => new Zend_Db_Expr('GETDATE()')\n ,'stDistribuicao' => 'A'\n ,'idResponsavel' => 0);\n $Distribuicao->inserir($dados);\n\n // chama a fun��o para alterar a situa��o do projeto - Padr�o C10\n $data = array('Situacao' => 'C10');\n $where = \"IdPRONAC = $idPronac_Get\";\n $projetos->alterarProjetos($data, $where);\n\n // busca a planilha PA\n $arrWhereSomaPlanilhaPA = array();\n $arrWhereSomaPlanilhaPA['idPronac = ?'] = $idPronac_Get;\n //$arrWhereSomaPlanilhaPA['idPlanilhaItem <> ?'] = '206'; //elaboracao e agenciamento\n //$arrWhereSomaPlanilhaPA['NrFonteRecurso = ?'] = '109';\n $arrWhereSomaPlanilhaPA['stAtivo = ?'] = 'N';\n $arrWhereSomaPlanilhaPA['tpPlanilha = ?'] = 'PA';\n $somaPA = $planilhaAprovacao->somarItensPlanilhaAprovacao($arrWhereSomaPlanilhaPA);\n\n // busca a planilha CO\n $arrWhereSomaPlanilhaCO = array();\n $arrWhereSomaPlanilhaCO['idPronac = ?'] = $idPronac_Get;\n //$arrWhereSomaPlanilhaCO['idPlanilhaItem <> ?'] = '206'; //elaboracao e agenciamento\n //$arrWhereSomaPlanilhaCO['NrFonteRecurso = ?'] = '109';\n $arrWhereSomaPlanilhaCO['stAtivo = ?'] = 'S';\n $arrWhereSomaPlanilhaCO['tpPlanilha = ?'] = 'CO';\n $somaCO = $planilhaAprovacao->somarItensPlanilhaAprovacao($arrWhereSomaPlanilhaCO);\n\n // define o tipo de parecer (tipo 2 => complementa��o; tipo 4 => redu��o)\n $tipoParecer = 2;\n if ($somaPA < $somaCO) :\n $tipoParecer = 4;\n endif;\n\n // cadastra na tabela parecer\n $tbParecer = new Parecer();\n $buscarPareceres = $tbParecer->buscar(array('IdPRONAC = ?' => $idPronac_Get), array('DtParecer DESC')); // busca os pareceres do Projeto\n foreach ($buscarPareceres as $p) : // desabilita os pareceres antigos\n $idparecer = isset($p->IdParecer) ? $p->IdParecer : $p->idParecer;\n $tbParecer->alterar(array('stAtivo' => 0), array('idParecer = ?' => $idparecer));\n endforeach;\n $dadosParecer = array(\n 'IdPRONAC' => $buscarPareceres[0]->IdPRONAC\n ,'idEnquadramento' => $buscarPareceres[0]->idEnquadramento\n ,'AnoProjeto' => $buscarPareceres[0]->AnoProjeto\n ,'Sequencial' => $buscarPareceres[0]->Sequencial\n ,'TipoParecer' => $tipoParecer\n ,'ParecerFavoravel' => $stParecerFavoravel\n ,'DtParecer' => new Zend_Db_Expr('GETDATE()')\n ,'Parecerista' => $idAgenteRemetente\n ,'Conselheiro' => null\n ,'NumeroReuniao' => null\n ,'ResumoParecer' => $dsObservacao\n ,'SugeridoUfir' => 0\n ,'SugeridoReal' => $somaPA['soma']\n ,'SugeridoCusteioReal' => 0\n ,'SugeridoCapitalReal' => 0\n ,'Atendimento' => $buscarPareceres[0]->Atendimento\n ,'Logon' => $this->getIdUsuario\n ,'stAtivo' => 1\n ,'idTipoAgente' => 1);\n $tbParecer->inserir($dadosParecer);\n\n $db->commit();\n\n parent::message(\"Projeto finalizado com sucesso!\", \"manterreadequacao?tipoFiltro=7:d\", \"CONFIRM\");\n } // fecha try\n\n catch (Zend_Exception $e) {\n $db->rollBack();\n parent::message(\"Erro na devolu&ccedil;&atilde;o da solicita&ccedil;&atilde;o\", \"manterreadequacao?tipoFiltro=7:d\", \"ERROR\");\n }\n }", "title": "" }, { "docid": "7ab465c40d5d23c77f90732d02998d4a", "score": "0.5078181", "text": "public function promocioneadd() {\n\t\n\t\t$Categoriaa = $this->Categoria->find('all');\n\t\t\n\t\t foreach ($Categoriaa as $row){\n\t\t\t $CategoriasArray[\"{$row['Categoria']['id']}\"] = \"{$row['Categoria']['nombre']}\";\t\t\n\t \t}\n\t \t\n\t $this->set('CategoriasArray', $CategoriasArray);\t\n\t\t\n\t\tif($this->request->is('post')) {\n\t\t\t\n\t\t\t$this->Cargo->create();\n $this->request->data['Cargo']['idtipocargo'] = 2; \n\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\n if ($this->Cargo->saveAll($this->request->data)) {\n\t\t\t\t\t$this->Session->setFlash('La promocion ha sido creado satisfactoriamente','flash_custom');\n\t\t\t\t\t$this->redirect(array('action' => 'promocioneview'));\n\t\t\t\t} else {\n\t\t\t\t\t$this->Session->setFlash('La promocion no pudo ser creado Intente nuevamente', 'flash_error');\n \t\t }\n \t\t } \n\t\n\t}", "title": "" }, { "docid": "9bfc479eb383687f9ef4434c023976ac", "score": "0.5051751", "text": "public function procedimento(){\n \treturn $this->belongsTo('App\\Procedimento','procedimento_id','id');\n }", "title": "" }, { "docid": "eadf27041a600355aa2867120cf677dc", "score": "0.505074", "text": "public function pedidoadd() {\n\t\n\t $Categoriaa = $this->Categoria->find('all');\n\t\t\n\t\t foreach ($Categoriaa as $row){\n\t\t\t $CategoriasArray[\"{$row['Categoria']['id']}\"] = \"{$row['Categoria']['nombre']}\";\t\t\n\t \t}\n\t \t\n\t $this->set('CategoriasArray', $CategoriasArray); \n\t \n\t\tif($this->request->is('post')) {\n\t\t\t$this->Cargo->create();\n $this->request->data['Cargo']['idtipocargo'] = 3; \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif ($this->Cargo->saveAll($this->request->data)) {\n\t\t\t\t\t$this->Session->setFlash('El Pedido ha sido creado satisfactoriamente','flash_custom');\n\t\t\t\t\t$this->redirect(array('action' => 'pedidoview'));\n\t\t\t\t} else {\n\t\t\t\t\t$this->Session->setFlash('El Pedido no pudo ser creado Intente nuevamente', 'flash_error');\n\t\t\t\t}\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "3e58067822f0914ba57b30b52151d861", "score": "0.5027554", "text": "public function agregar_pedidos_sucursales(Request $input)\n {\n /*Destino*/\n $id_sucursal_usuario_destino = $input['sucursal_destino'];\n $id_usuario_destino = PedidoController::obtener_usuario_origen($id_sucursal_usuario_destino);\n \n \n $array_productos=$input['array_productos'];\n /*origen*/\n $comentario=$input['descripcion'];\n $id_sucursal_origen=$input['id_sucursal'];\n $id_usuario_origen = PedidoController::obtener_usuario_origen($id_sucursal_origen);\n \n /*GENERAR FOLIO DE VENTA*/\n $id_venta = PedidoController::generar_folio($id_usuario_destino.\"\".$id_sucursal_usuario_destino,$id_sucursal_origen.\"\".$id_usuario_origen );\n $dia=date(\"d\");\n $mes=date(\"m\");\n $anio=date(\"Y\");\n $fecha_venta =$anio.'-'.$mes.'-'.$dia; \n \n /*INICIAR TRANSACCIÓN*/\n DB::beginTransaction();\n try{\n /*GENERAR VENTA*/\n $ingresar = DB::insert('INSERT INTO pedido(id_pedido, id_usuario_solicitante, id_status, descripcion, id_sucursal_origen, id_sucursal_destino, id_usuario_distribuidor, id_origen, id_destino,fecha) VALUES (?,?,?,?,?,?,?,?,?,?)', [$id_venta,$id_usuario_destino,1,$comentario,$id_sucursal_origen,$id_sucursal_usuario_destino,$id_usuario_origen,$id_sucursal_origen,$id_sucursal_usuario_destino,$fecha_venta]);\n //INSERT INTO `pedido`(`id_pedido`, `id_usuario_solicitante`, `id_status`, `descripcion`, `id_sucursal_origen`, `id_sucursal_destino`, `id_usuario_distribuidor`, `id_origen`, `id_destino`) VALUES ([value-1],[value-2],[value-3],[value-4],[value-5],[value-6],[value-7],[value-8],[value-9])\n \n /*INSERTAR DETALLE DE LA VENTA*/\n foreach($array_productos as $propiedad){\n $ingresar = DB::insert('INSERT INTO detalle_pedido(id_pedido, id_producto, cantidad, descripcion) VALUES (?,?,?,?)', [$id_venta, $propiedad['id_producto'], $propiedad['cantidad_producto'] , $comentario]);\n //INSERT INTO `detalle_pedido`(`id_pedido`, `id_producto`, `cantidad`, `descripcion`) VALUES ([value-1],[value-2],[value-3],[value-4])\n }\n $comentario_historial=\"Se hizo el pedido\";\n $id_historial=PedidoController::generar_folio_historial($id_venta,1);\n $ingresar_historial=DB::insert('INSERT INTO historial_pedido(id_historial,id_pedido, id_status, fecha_evento, descripcion_evento) VALUES (?,?,?,?,?)',[$id_historial,$id_venta,1,$fecha_venta,$comentario_historial]);\n //INSERT INTO `historial_pedido`(`id_pedido`, `id_status`, `fecha_evento`, `descripcion_evento`) VALUES ([value-1],[value-2],[value-3],[value-4])\n \n echo 'Pedido realizado, esperando indicaciones de la sucursal';\n DB::commit();\n }catch (Exception $e){\n echo 'Ha ocurrido un error!';\n DB::rollback();\n } \n }", "title": "" }, { "docid": "3b9ecdc463ab48580b06f610ea126b0c", "score": "0.5027168", "text": "public function process()\n {\n return $this->belongsTo(Process::class);\n }", "title": "" }, { "docid": "da92c92663a8e570542bb75de74c5339", "score": "0.5021442", "text": "public function pedidos(){\n return $this->hasmany('App\\Models\\Pedido', 'id');\n }", "title": "" }, { "docid": "b1313bd1b7efb487b734bb608f7cbd9e", "score": "0.5013359", "text": "public function store(ResponsablefaspiranteRequest $request)\n {\n $p = $this->setPersona('NATURAL', $request->mail, $request->direccion, $request->celular, $request->telefono, $request->numero_documento, $request->lugar_expedicion, $request->fecha_expedicion, null, null, $request->tipodoc_id, $request->pais_id, $request->estado_id, $request->ciudad_id);\n if ($p->save()) {\n $this->setAuditoriaadmision('INSERTAR', 'CREACIÓN DE PERSONA GENERAL. DATOS: ', $p);\n $pn = $this->setPersonanatural($request->primer_nombre, $request->segundo_nombre, $request->fecha_nacimiento, $request->libreta_militar, $request->edad, $request->rh, $request->primer_apellido, $request->segundo_apellido, $request->distrito_militar, $request->numero_pasaporte, $request->otra_nacionalidad, $request->clase_libreta, null, $request->profesion, $request->profesion, $request->nivel_estudio, $request->ciudadpn_id, $request->estadopn_id, $request->paispn_id, $p->id, $request->sexo_id);\n if ($pn->save()) {\n $this->setAuditoriaadmision('INSERTAR', 'CREACIÓN DE PERSONA NATURAL. DATOS: ', $pn);\n $r = $this->setResponsableFinanciero($request->direccion_trabajo, $request->telefono_trabajo, $request->puesto_trabajo, $request->empresa_labora, $request->jefe_inmediato, $request->telefono_jefe, $request->descripcion_trabajador_independiente, $request->ocupacion_id, $pn->id, $request->aspirante_id, null);\n if ($r->save()) {\n flash(\"Datos guardados con éxito.\")->success();\n return redirect()->route('responsablefaspirante.index');\n } else {\n $p->delete();\n $pn->delete();\n flash(\"Los datos no fueron guardados, no se pudo establecer el responsable financiero.\")->error();\n return redirect()->route('responsablefaspirante.index');\n }\n } else {\n $p->delete();\n flash(\"Los datos no fueron guardados, no se pudo establecer la persona natural.\")->error();\n return redirect()->route('responsablefaspirante.index');\n }\n } else {\n flash(\"Los datos no fueron guardados, no se pudo establecer la persona.\")->error();\n return redirect()->route('responsablefaspirante.index');\n }\n }", "title": "" }, { "docid": "a8200b8b1cca0fe1fc6bcd989a3d70e7", "score": "0.50046897", "text": "private function atualizarPropostas() {\r\n\r\n /*\r\n * Se o tipo da operação for E - Exclusão\r\n * Então forçamos a agencia e conta corrente como nulos\r\n */\r\n $agencia = ($this->tipo_operacao == 'E') ? 'null' : \"'\" . $this->agencia_posterior . \"'\";\r\n $conta_corrente = ($this->tipo_operacao == 'E') ? 'null' : \"'\" . $this->conta_corrente_posterior . \"'\";\r\n \r\n $this->dao->atualizarPropostas($this->id_cliente, $this->forma_cobranca_posterior, $agencia, $conta_corrente);\r\n }", "title": "" }, { "docid": "ec7a3b92def2900bb9541f30661d591b", "score": "0.49757472", "text": "public function store(Request $request){\n // dd($request->all());\n $size = count($request->produto_id);\n $produto_id_list = Array();\n for($i=0;$i<$size;$i++){\n if($request->produto_id[$i] == \"\"){//novo produto\n $new_produto = array(\n 'codigo' => $request->codigo[$i],\n 'codigo_ncm' => $request->codigo_ncm[$i],\n 'titulo' => $request->titulo[$i],\n 'unidade_id' => $request->unidade_id[$i],\n 'quantidade_estoque' => $request->quantidade_estoque[$i],\n 'custo' => $request->custo_produto[$i],\n 'preco' => $request->preco_produto[$i],\n 'frete' => $request->frete_produto[$i],\n 'descricao' => $request->descricao[$i],\n 'pessoa_id' => $request->pessoa_fornecedor_id,\n );\n $produto = Produto::create($new_produto);\n $temp = $request->impostos_id[$i];\n $impostos_id = Array();\n $impostos_id=explode(',',$temp);\n $produto->impostos()->sync($impostos_id);\n $movimentacao = Movimentacao::create([\n 'numero_nota' => $request->codigo_nota,\n 'emitente_destinatario' => 'Entrada Nota',\n 'valor_unitario' => $produto->preco,\n 'valor_total' => $produto->preco,\n 'quantidade' => $produto->quantidade_estoque,\n 'estoque' => $produto->quantidade_estoque,\n ]);\n $produto->movimentacoes()->sync([$movimentacao->id],false);\n $produto_id_list[] = $produto->id;\n }else{//editar produto\n $produto = Produto::find($request->produto_id[$i]);\n\n $movimentacao = Movimentacao::create([\n 'numero_nota' => $request->codigo_nota,\n 'emitente_destinatario' => 'Entrada Nota',\n 'valor_unitario' => $produto->preco,\n 'valor_total' => $produto->preco,\n 'quantidade' => ($request->quantidade_estoque[$i]) - ($produto->quantidade_estoque),\n 'estoque' => $request->quantidade_estoque[$i],\n ]);\n $produto->movimentacoes()->sync([$movimentacao->id],false);\n\n $produto->codigo = $request->codigo[$i];\n $produto->codigo_ncm = $request->codigo_ncm[$i];\n $produto->titulo = $request->titulo[$i];\n $produto->descricao = $request->descricao[$i];\n $produto->unidade_id = $request->unidade_id[$i];\n $produto->pessoa_id = $request->pessoa_fornecedor_id;\n $produto->quantidade_estoque = $request->quantidade_estoque[$i];\n $produto->custo = $request->custo_produto[$i];\n $produto->frete = $request->frete_produto[$i];\n $produto->preco = $request->preco_produto[$i];\n $temp = $request->impostos_id[$i];\n $impostos_id = Array();\n $impostos_id=explode(',',$temp);\n $produto->impostos()->sync($impostos_id);\n $produto->save();\n $produto_id_list[] = $produto->id;\n }\n }\n\n $var = $request->data_emissao;\n $date = str_replace('/', '-', $var);\n $data_emissao_f = date('Y-m-d H:i', strtotime($date));\n\n $var = $request->data_entrada;\n $date = str_replace('/', '-', $var);\n $data_entrada_f = date('Y-m-d H:i', strtotime($date));\n $nota = Nota::create(array(\n 'codigo' => $request->codigo_nota,\n 'data_emissao' => $data_emissao_f,\n 'data_entrada' => $data_entrada_f,\n 'valor_frete' => $request->valor_frete_nota,\n 'valor_total' => $request->valor_total_nota,\n // 'pessoa_id' => Input::get('pessoa_funcionario_id'),\n ));\n $nota->produtos()->sync($produto_id_list);\n Session::flash('message','Entrada de produtos por nota realizada com sucesso!');\n return Redirect::to('estoque');\n }", "title": "" }, { "docid": "9ca7eeb9401f582a9c54fb4b49c02c03", "score": "0.49658453", "text": "public function salvarRespostas()\n {\n //dd($this->request->getData());\n $visita = $this->Visitas->get($this->request->visitaId, ['contain' => ['Checklists', 'Respostas']]);\n\n $respostas = $this->request->getData('respostas');\n // $respostasGroupByPerguntas = $respostas->groupBy('checklists_pergunta_id');\n\n if ($visita->teve_agendamento_flag && $visita->vencida) {\n throw new BadRequestException(\"A visita está vencida.\");\n }\n if ($visita->dt_encerramento) {\n throw new BadRequestException(\"A visita está encerrada.\");\n }\n if (!$visita->ativo) {\n throw new BadRequestException(\"A visita está inativada.\");\n }\n if ($visita->deletado) {\n throw new BadRequestException(\"A visita foi deletada.\");\n }\n if ($visita->checklist->deletado) {\n throw new BadRequestException(\"A Checklist desta visita foi deletada pelo administrador.\");\n }\n\n foreach ($respostas as $resposta) {\n // Vejo se a resposta já existe\n $respostaExistente = $this->Visitas->checklists->Perguntas->Respostas->find()\n ->where([\n 'Respostas.visita_id' => $visita->id,\n 'Respostas.checklists_pergunta_id' => $resposta['checklists_pergunta_id']\n ])\n ->first();\n\n // Cada pergunta só pode ter uma pergunta entao eu delete se ouver\n if ($respostaExistente) {\n $this->Visitas->checklists->Perguntas->Respostas->deleteOrFail($respostaExistente);\n }\n\n $respostaEntity = $this->Visitas->checklists->Perguntas->Respostas->newEntity(null, ['contain' => 'FotosRequeridas']);\n $resposta['visita_id'] = $visita->id;\n\n // debug($resposta);\n $respostaEntity = $this->Visitas->checklists->Perguntas->Respostas->patchEntity($respostaEntity, $resposta, ['associated' => ['FotosRequeridas']]);\n // dd($respostaEntity);\n $this->Visitas->checklists->Perguntas->Respostas->saveOrFail($respostaEntity);\n }\n\n if ((int)$this->request->query('tipo') == 2) {\n $dataToPatch['dt_encerramento'] = Time::now();\n }\n\n $dataToPatch['observacao'] = $this->request->getData('observacao');\n $this->Visitas->patchEntity($visita, $dataToPatch);\n\n $this->Visitas->saveOrFail($visita);\n\n // Se for encerramento mando os emails (critico e de encerramento)\n if ((int)$this->request->query('tipo') == 2) {\n $visita = $this->Visitas->find()\n ->where(['Visitas.id' => $visita->id])\n ->contain([\n 'GruposDeEmails',\n 'Respostas.AlternativaSelecionada',\n 'QuemGravou.Grupos',\n 'Usuarios',\n 'Lojas.Cidades',\n 'PlanosTaticosPreInfos',\n 'Respostas' => function($query) {\n return $query\n ->contain([\n 'AlternativaSelecionada',\n 'FotosRequeridas'\n ]);\n },\n 'Checklists.Perguntas' => function($query) {\n return $query\n ->contain([\n 'Alternativas',\n 'Setores'\n ]);\n }\n ])\n ->first();\n\n $visita->setRespostasFlags();\n\n // No find acima ele pega só as respostas criticas, ai abaixo\n // eu pego só as perguntas que tem resposta que como dito acima\n // são as criticas\n // Obs.: setRespostasFlags colocou as respostas nas perguntas, antes\n // elas estavam fora\n $perguntasComRespostaCritica = [];\n // dd($visita->checklist->perguntas);\n foreach ($visita->checklist->perguntas as $pergunta) {\n if ($pergunta->resposta && $pergunta->resposta->alternativa_selecionada && $pergunta->resposta->alternativa_selecionada->item_critico) {\n $perguntasComRespostaCritica[] = $pergunta;\n }\n }\n\n // Teve ao menos uma resposta crítica\n if ($perguntasComRespostaCritica) {\n \n // Salvo os planos de ação se ele cadastrou o pre\n if ($visita->planos_taticos_pre_info) {\n foreach ($perguntasComRespostaCritica as $perguntaComRespostaCritica) {\n\n $whenEnd = Time::now()->addDays((int)$visita->planos_taticos_pre_info->prazo_dias);\n $planoTaticoData = [\n 'solicitante_id' => $visita->planos_taticos_pre_info->solicitante_id,\n 'who_id' => $visita->planos_taticos_pre_info->who_id,\n 'when_start_placeholder' => Time::now()->format('d/m/Y'),\n 'when_start' => Time::now(),\n 'when_end_placeholder' => $whenEnd->format('d/m/Y'),\n 'when_end' => $whenEnd,\n 'what' => $perguntaComRespostaCritica->pergunta,\n 'why' => ($perguntaComRespostaCritica->resposta && $perguntaComRespostaCritica->resposta->alternativa_selecionada) ? $perguntaComRespostaCritica->resposta->alternativa_selecionada->alternativa . PHP_EOL . $perguntaComRespostaCritica->resposta->observacao : '-',\n 'checklists_perguntas_resposta_id' => $perguntaComRespostaCritica->resposta->id\n ];\n\n $planoTatico = $this->Visitas->Respostas->PlanosTaticos->newEntity($planoTaticoData);\n $this->Visitas->Respostas->PlanosTaticos->save($planoTatico);\n // DELETE O PRE PRA EVITAR ACUMULO DE DADOS\n $this->Visitas->PlanosTaticosPreInfos->delete($visita->planos_taticos_pre_info);\n }\n }\n\n $visita->setAtingimentos();\n // Pego os emails de destino\n $emailsCriticos = $visita->emails_criticos_extras_as_array;\n if ($visita->grupos_de_emails) {\n foreach ($visita->grupos_de_emails as $grupo) {\n $emailsCriticos = array_merge($emailsCriticos, $grupo->emails_criticos_as_array);\n }\n }\n // Se tiver repetido mando só uma vez\n $emailsCriticos = array_unique($emailsCriticos);\n\n foreach ($emailsCriticos as $to) {\n try {\n $this\n ->getMailer('Visitas')\n ->send('encerramentoComRespostaCritica', [$to, $visita, $perguntasComRespostaCritica]);\n } catch (\\Exception $e) {\n // Só da erro se for 500 que é de programação\n // outros erros passa direto poe exemplo.. se\n // um email invalido foi cadastrado não pode darpau aqui\n // tem que passar direto\n if ($e->getCode() == 500) {\n throw $e;\n }\n }\n }\n }\n\n // Só manda se a visita está configurada para exibir dados publicos\n if ($visita->is_public == 1) {\n // Pego os emails\n $emailsResultado = $visita->emails_resultados_extras_as_array;\n if ($visita->grupos_de_emails) {\n foreach ($visita->grupos_de_emails as $grupo) {\n $emailsResultado = array_merge($emailsResultado, $grupo->emails_resultados_as_array);\n }\n }\n // Se tiver repetido mando só uma vez\n $emailsResultado = array_unique($emailsResultado);\n\n foreach ($emailsResultado as $to) {\n try {\n $this\n ->getMailer('Visitas')\n ->send('encerramento', [$to, $visita]);\n } catch (\\Exception $e) {\n // Só da erro se for 500 que é de programação\n // outros erros passa direto poe exemplo.. se\n // um email invalido foi cadastrado não pode darpau aqui\n // tem que passar direto\n if ($e->getCode() == 500) {\n throw $e;\n }\n }\n }\n }\n\n\n }\n\n $response = $this->responseSuccess();\n\n $this->set(compact('response'));\n $this->set('_serialize', 'response');\n }", "title": "" }, { "docid": "af902fe98d565924c570bf3b31ed3c18", "score": "0.49587405", "text": "public function ProjetosExecurcao()\n {\n return $this->belongsTo('Serbinario\\Entities\\ProjetosExecurcao','projeto_execurcao_id','id');\n }", "title": "" }, { "docid": "cde86470519b408a7910b1992f0a96ae", "score": "0.49579838", "text": "public function crearSolicitud($solicitud) {\n //se envia la entidad solicitud a la BD\n $this->entityManager->persist($solicitud);\n $this->entityManager->flush();\n }", "title": "" }, { "docid": "3a03845968be9046a612aa0eb0d277ec", "score": "0.49528447", "text": "public function programas()\n {\n return $this->belongsToMany('App\\programas');\n }", "title": "" }, { "docid": "2b431741dc47bad6b4f894f5a2691c31", "score": "0.49479726", "text": "public function store(ProcesosProgramasRequest $request)\n {\n $fechaInicio = Carbon::createFromFormat('d/m/Y', $request->get('PCS_FechaInicio'));\n $fechaFin = Carbon::createFromFormat('d/m/Y', $request->get('PCS_FechaFin'));\n\n $proceso = new Proceso();\n $proceso->fill($request->only(['PCS_Nombre']));\n $proceso->PCS_FechaInicio = $fechaInicio;\n $proceso->PCS_FechaFin = $fechaFin;\n $nombres = explode(' ', ProgramaAcademico::where('PK_PAC_Id', $request->get('PK_PAC_Id'))->first()->PAC_Nombre);\n $slug = \"\";\n foreach ($nombres as $nombre) {\n $slug = $slug . '_' . $nombre;\n }\n\n $proceso->PCS_Slug_Procesos = \"Proceso\" . $slug . Carbon::now()->toDateString();\n\n $proceso->FK_PCS_Fase = 3;\n $proceso->FK_PCS_Programa = $request->get('PK_PAC_Id');\n $proceso->FK_PCS_Lineamiento = $request->get('PK_LNM_Id');\n $proceso->save();\n\n $proceso = Proceso::where('PCS_Nombre', $request->only(['PCS_Nombre']))->value('PK_PCS_Id');\n\n $fechadeCorte = $fechaFin->subDays('10');\n\n $fechacorte = new FechaCorte();\n $fechacorte->FCO_Fecha = $fechadeCorte;\n $fechacorte->FK_FCO_Proceso = $proceso;\n $fechacorte->save();\n return response([\n 'msg' => 'Proceso registrado correctamente.',\n 'title' => '¡Registro exitoso!',\n ], 200) // 200 Status Code: Standard response for successful HTTP request\n ->header('Content-Type', 'application/json');\n }", "title": "" }, { "docid": "265e88b6dad4928b9214cb7d9286941f", "score": "0.49470708", "text": "public function store(FormProcessCreateRequest $request)\n {\n $process = new Process();\n $process->name = $request->name;\n //$process->annexed = count($request->annexed);\n $process->active = $request->active;\n $saved = $process->save();\n if($saved)\n foreach($request->annexed as $annexed){\n $process->Annexes()->create(['name' => $annexed, 'process_id' => $process->id]);\n }\n return response()->json(['success' => true, 'message' => 'Proceso registrado exitosamente.'], 200);\n }", "title": "" }, { "docid": "ec0dfc80ef64f1a5c622886eb2b3816b", "score": "0.49453375", "text": "public function finalizaritemdecustoAction()\n {\n $idPedidoAlteracao = $_POST['idPedidoAlteracao'];\n $idPronac = $_GET['IdPRONAC'];\n $stparecer = $_POST['status'];\n\n if ($stparecer == 2) {\n $situacao = 'AP';\n } else {\n $situacao = 'IN';\n }\n\n //CONSULTA OS PEDIDOS NA TABELA tbPlanoDistribuicao\n $db = Zend_Db_Table::getDefaultAdapter();\n $db->setFetchMode(Zend_DB :: FETCH_OBJ);\n // CHAMA O SQL\n $sqllistaidplano = ReadequacaoProjetos::listaSQLidPlano($idPronac);\n $ids = $db->fetchAll($sqllistaidplano);\n $this->ids = $ids;\n\n\n try {\n //inicia uma transa�ao\n $db->beginTransaction();\n $justificativa = '';\n foreach ($this->ids as $ids) :\n $CodArea = \"cdArea = \".$_POST['CodArea'.$ids->idPlano].\",\";\n $CodSegmento = \"cdSegmento = \".$_POST['CodSegmento'.$ids->idPlano].\",\";\n $Patrocinador = \"qtPatrocinador = \".$_POST['Patrocinador'.$ids->idPlano].\",\";\n $Divulgacao = \"qtProduzida = \".$_POST['Beneficiarios'.$ids->idPlano].\",\";\n $Beneficiarios = \"qtOutros = \".$_POST['Divulgacao'.$ids->idPlano].\",\";\n $NormalTV = \"qtVendaNormal = \".$_POST['NormalTV'.$ids->idPlano].\",\";\n $PromocionalTV = \"qtVendaPromocional = \".$_POST['PromocionalTV'.$ids->idPlano].\",\";\n $NormalPU = \"vlUnitarioNormal = \".$_POST['NormalPU'.$ids->idPlano].\",\";\n $PromocionalPU = \"vlUnitarioPromocional = \".$_POST['PromocionalPU'.$ids->idPlano].\"\";\n $justificativa2 = $_POST['justificativaPropRead'.$ids->idPlano].\"\";\n if ($justificativa2 == '') {\n $justificativa2 = '';\n }\n\n $sqldados = $CodArea.\"\".$CodSegmento.\"\".$Patrocinador.\"\".$Divulgacao.\"\".$Beneficiarios.\"\".$NormalTV.\"\".$PromocionalTV.\"\".$NormalPU.\"\".$PromocionalPU;\n $updateFrom = \"UPDATE SAC.dbo.tbPlanoDistribuicao SET \";\n $where = \"WHERE idPedidoAlteracao = \".$idPedidoAlteracao;\n $and1 = \"AND idPlano = \".$ids->idPlano;\n $justificativa .= $justificativa2.\"<br/><br/>\";\n\n // SALVA OS DADOS NO BANCO\n $sqlsalvareadequacao = ReadequacaoProjetos::sqlsalvareadequacao($updateFrom, $sqldados, $where, $and1);\n $db->query($sqlsalvareadequacao);\n // select insert delete update -> query\n // fetchAll usar ap�s uma query;\n endforeach;\n\n // Chama o SQL\n $sqlFinalizarPar = ReadequacaoProjetos::retornaSQLfinalizarPar($idPedidoAlteracao, $situacao, $justificativa);\n $dados = $db->fetchAll($sqlFinalizarPar);\n\n //RETORNA EM VARI�VEIS OS DADOS DO LOG ANTERIOR\n $sqlFinalizarPar2 = ReadequacaoProjetos::retornaSQLfinalizarPar2($idPedidoAlteracao);\n $dados = $db->fetchAll($sqlFinalizarPar2);\n $idAvaliacaoItemPedidoAlteracao = $dados[0]->idAvaliacaoItemPedidoAlteracao;\n $idAgenteAvaliador = $dados[0]->idAgenteAvaliador;\n $idOrgao = $dados[0]->idOrgao;\n\n //ATUALIZAR A SITUA��O DO REGISTRO\n $sqlFinalizarParST = ReadequacaoProjetos::retornaSQLfinalizarParST($idAvaliacaoItemPedidoAlteracao);\n $dados2 = $db->fetchAll($sqlFinalizarParST);\n $idPedidoAlteracao = $dados2[0]->idPedidoAlteracao;\n $tpAlteracaoProjeto = $dados2[0]->tpAlteracaoProjeto;\n\n $sqlFinalizarParST2 = ReadequacaoProjetos::retornaSQLfinalizarParST2($idPedidoAlteracao, $tpAlteracaoProjeto);\n $dados3 = $db->fetchAll($sqlFinalizarParST2);\n\n //ATUALIZAR A SITUA��O DO REGISTRO\n $sqlFinalizarPar3 = ReadequacaoProjetos::retornaSQLfinalizarPar3($idAvaliacaoItemPedidoAlteracao);\n $dados = $db->fetchAll($sqlFinalizarPar3);\n\n //INCLUIR NOVO REGISTRO\n $sqlFinalizarPar4 = ReadequacaoProjetos::retornaSQLfinalizarPar4IC($idAvaliacaoItemPedidoAlteracao, $idAgenteAvaliador, $idOrgao, $this->getIdUsuario, $this->codGrupo);\n $dados = $db->fetchAll($sqlFinalizarPar4);\n //salva os dados na base caso esteja tudo ok.\n $db->commit();\n\n parent::message(\"Projeto finalizado com sucesso!\", \"verificarreadequacaodeprojeto/verificarreadequacaodeprojetoparecerista\", \"CONFIRM\");\n } catch (Zend_Exception $e) {\n //Exce�ao pois houve erro ao tentar inserir ou atualizar dados na base.\n $db->rollBack();\n parent::message(\"Erro ao encaminhar Projeto\", \"verificarreadequacaodeprojeto/verificarreadequacaodeprojetoparecerista\", \"ERROR\");\n /* Try _ Catch, � utilizado para tratamento de erros.\n * o $e->getMessage(), � utilizado para saber qual o tipo de erro que retornou.\n */\n }\n }", "title": "" }, { "docid": "abeefe4459cbb293ff5e5197eccd4610", "score": "0.49438816", "text": "public function insertarProgramacion($lis_id, $pla_id, $pro_fecha_desde, $pro_fecha_hasta, $pro_hora_envio, $pro_usuario_ingreso, $pro_fecha_creacion) {\n $con = \\Yii::$app->db_mailing;\n $trans = $con->getTransaction(); // se obtiene la transacción actual\n if ($trans !== null) {\n $trans = null; // si existe la transacción entonces no se crea una\n } else {\n $trans = $con->beginTransaction(); // si no existe la transacción entonces se crea una\n }\n\n $param_sql = \"pro_estado\";\n $bdet_sql = \"1\";\n\n $param_sql .= \", pro_estado_logico\";\n $bdet_sql .= \", 1\";\n\n if (isset($lis_id)) {\n $param_sql .= \", lis_id\";\n $bdet_sql .= \", :lis_id\";\n }\n if (isset($pla_id)) {\n $param_sql .= \", pla_id\";\n $bdet_sql .= \", :pla_id\";\n }\n if (isset($pro_fecha_desde)) {\n $param_sql .= \", pro_fecha_desde\";\n $bdet_sql .= \", :pro_fecha_desde\";\n }\n if (isset($pro_fecha_hasta)) {\n $param_sql .= \", pro_fecha_hasta\";\n $bdet_sql .= \", :pro_fecha_hasta\";\n }\n if (isset($pro_hora_envio)) {\n //$hora_envio = date(Yii::$app->params[\"dateByDefault\"]) . \" \" . $pro_hora_envio . \":00\";\n $hora_envio = $pro_hora_envio;\n $param_sql .= \", pro_hora_envio\";\n $bdet_sql .= \", :pro_hora_envio\";\n }\n if (isset($pro_usuario_ingreso)) {\n $param_sql .= \", pro_usuario_ingreso\";\n $bdet_sql .= \", :pro_usuario_ingreso\";\n }\n if (isset($pro_fecha_creacion)) {\n $param_sql .= \", pro_fecha_creacion\";\n $bdet_sql .= \", :pro_fecha_creacion\";\n }\n\n try {\n $sql = \"INSERT INTO \" . $con->dbname . \".programacion ($param_sql) VALUES($bdet_sql)\";\n $comando = $con->createCommand($sql);\n\n if (isset($lis_id)) {\n $comando->bindParam(':lis_id', $lis_id, \\PDO::PARAM_INT);\n }\n if (isset($pla_id)) {\n $comando->bindParam(':pla_id', $pla_id, \\PDO::PARAM_INT);\n }\n if (isset($pro_fecha_desde)) {\n $comando->bindParam(':pro_fecha_desde', $pro_fecha_desde, \\PDO::PARAM_STR);\n }\n if (!empty((isset($pro_fecha_hasta)))) {\n $comando->bindParam(':pro_fecha_hasta', $pro_fecha_hasta, \\PDO::PARAM_STR);\n }\n if (!empty((isset($pro_hora_envio)))) {\n $comando->bindParam(':pro_hora_envio', $hora_envio, \\PDO::PARAM_STR);\n }\n if (!empty((isset($pro_usuario_ingreso)))) {\n $comando->bindParam(':pro_usuario_ingreso', $pro_usuario_ingreso, \\PDO::PARAM_STR);\n }\n if (!empty((isset($pro_fecha_creacion)))) {\n $comando->bindParam(':pro_fecha_creacion', $pro_fecha_creacion, \\PDO::PARAM_STR);\n }\n\n $result = $comando->execute();\n if ($trans !== null)\n $trans->commit();\n return $con->getLastInsertID($con->dbname . '.programacion');\n } catch (Exception $ex) {\n if ($trans !== null)\n $trans->rollback();\n return FALSE;\n }\n }", "title": "" }, { "docid": "c3b41b9883f549b13742d21776f160af", "score": "0.49403092", "text": "public function store(Request $request)\n {\n $partido = new Partido;\n $now = Carbon::now();\n\n $EquiposA = Equipo::where('Grupo_id', 1)->get(['id']);\n $EquipoB = Equipo::where('Grupo_id', 2)->get(['id']);\n\n foreach ($EquiposA as $EA) {\n foreach ($EquipoB as $EB) {\n \n\n $partido = Partido::create($request->only('Hora_partido','Fecha_partido'));\n //$partido->Fecha_partido = $now;\n //$partido->Hora_partido = $request->Hora_partido;\n // $partido->save();\n $partido->equipos()->attach($EA->id, ['equipo2_id' => $EB->id]);\n\n \n }\n }\n \n // $partido = Partidos::create($request->only('Hora_partido','Fecha_partido'));\n //$partido->equipos()->attach( $request->ID_Partido);\n //dd( $partido );\n\n return view('FPartidos.P_create');\n }", "title": "" }, { "docid": "99b1aa154e121227de33d8368d7d078f", "score": "0.49265984", "text": "public function addAction($producto_id)\n {\n $em = $this->getDoctrine()->getManager();\n $user = $this->container->get('security.context')->getToken()->getUser();\n //print_r($user);\n if (!session_id()) {\n session_start();\n }\n $sessionID = session_id();\n if($user=='anon.'){ \n $entityCarrito= $em->getRepository('cartBundle:carrito')->findOneBy(array('llave'=>$sessionID,'status'=>1));\n if(!$entityCarrito){\n //echo 'fdsh';\n $entityCarrito = new carrito();\n $usuario= $em->getRepository('userBundle:usuario')->find(2); \n $entityCarrito->setLlave($sessionID);\n $entityCarrito->setStatus(1);\n $entityCarrito->setUsuario($usuario); \n $em->persist($entityCarrito);\n $em->flush();\n }\n }else{\n $usuario= $em->getRepository('userBundle:usuario')->find($user->getId());\n $entityCarrito= $em->getRepository('cartBundle:carrito')->findOneBy(array('usuario'=>$usuario,'status'=>1));\n if(!$entityCarrito){\n $entityCarrito = new carrito(); \n $entityCarrito->setLlave($sessionID);\n $entityCarrito->setStatus(1);\n $entityCarrito->setUsuario($usuario); \n $em->persist($entityCarrito);\n $em->flush();\n\n }\n \n }\n \n $producto=$em->getRepository('contenidoBundle:misProductos')->find($producto_id);\n $renta= $em->getRepository('modulosBundle:renta')->find(2);\n $periodo= $em->getRepository('modulosBundle:periodo')->find(2);\n $entity = new itemCarrito();\n $entity->setCantidad(1);\n $entity->setCantidadPeriodo(1);\n $entity->setRenta($renta);\n $entity->setPeriodo($periodo);\n $entity->setTotal($producto->getPrecio());\n $entity->setCarrito($entityCarrito);\n $entity->setProducto($producto); \n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('carrito_show', array('id' => $entityCarrito->getId()))); \n\n \n }", "title": "" }, { "docid": "7f08d269c680310a3d265cabf24a6826", "score": "0.49212486", "text": "public function guardar(){\n \n $_vectorpost=$this->_vcapitulo;\n $_programadas=[1,3,4,5,6,7,8,2,11,15];\n \n if(!empty($this->_relaciones)){\n \n $_vpasspregunta=explode(\"%%\",$this->_relaciones);\n \n \n /*Iniciando Transaccion*/\n $_transaction = Yii::$app->db->beginTransaction();\n try {\n foreach($_vpasspregunta as $_clguardar){\n\n /*Aqui se debe ir la funcion segun el tipo de pregunta\n * la variable $_clguardar es un string que trae\n * name_input ::: id_pregunta ::: id_tpregunta ::: id_respuesta\n * cada funcion de guardar por tipo se denomina gr_tipo...\n */\n\n $_ldata=explode(\":::\",$_clguardar);\n\n //Recogiendo codigos SQL\n //Se envia a la funcion de acuerdo al tipo\n // @name_input \"0\"\n // @id_pregunta \n // @id_tpregunta\n // @id_respuesta ==========================//\n \n /*Asociando Respuesta*/\n $_nameq = 'rpta'.$_ldata[0];\n \n \n \n if(!empty($_ldata[2]) and in_array($_ldata[2], $_programadas) === TRUE and isset($_vectorpost['ConsultaCiudadana'][$_nameq])){\n \n /*Recogiendo Id_respuesta si existe*/ \n $_idrespuesta=(!empty($_ldata[3]))? $_ldata[3]:'';\n $id_pregunta= $_ldata[1];\n $this->_idcapitulo = $_ldata[4];\n \n \n /*Armando Trama SQL segun el tipo de pregunta*/\n $_valor = $_vectorpost['ConsultaCiudadana'][$_nameq];\n \n if(isset($this->_agrupadas[$id_pregunta])){\n \n /*1) Buscando si existe una respuesta asociada a la agrupacion*/\n $idrpta_2a = Yii::$app->db->createCommand(\n 'SELECT id_respuesta FROM fd_respuesta\n LEFT JOIN fd_pregunta ON fd_pregunta.id_pregunta = fd_respuesta.id_pregunta\n WHERE fd_pregunta.id_agrupacion= :agrupacion \n and fd_respuesta.id_conjunto_pregunta= :idconjprta \n and fd_respuesta.id_conjunto_respuesta= :idconjrpta\n and fd_respuesta.id_capitulo= :idcapitulo\n and fd_respuesta.id_formato = :idformato\n and fd_respuesta.id_version = :idversion ')\n ->bindValues([\n ':idconjrpta' => $this->_idconjrpta,\n ':idcapitulo' =>$this->_idcapitulo,\n ':idformato' =>$this->_idformato,\n ':idconjprta' => $this->_idconjprta,\n ':idversion' =>$this->_idversion, \n ':agrupacion' =>$this->_agrupadas[$id_pregunta],\n ])->queryOne();\n \n $_idrespuesta = $idrpta_2a['id_respuesta'];\n \n /*2) Si existe respuesta asociada se envia como _idrespuesta*/\n \n $v_rpta= $this->{\"gr_tipo2a\"}($_idrespuesta,$_valor,$id_pregunta); //Preguntas tipo 2 agrupadas\n $_ldata[1]= $v_rpta[2];\n \n }else{\n \n $v_rpta= $this->{\"gr_tipo\".$_ldata[2]}($_idrespuesta,$_valor);\n } \n \n /*Asignando valor == null*/\n $v_rpta[1]=(empty($v_rpta[1]))? NULL:$v_rpta[1];\n \n \n /*Generado comando SQL*/\n Yii::$app->db->createCommand($v_rpta[0])\n ->bindValues([\n ':valor' => $v_rpta[1],\n ':idconjrpta' => $this->_idconjrpta,\n ':idpregunta' => $_ldata[1],\n ':idtpregunta' => $_ldata[2],\n ':idcapitulo' =>$this->_idcapitulo,\n ':idformato' =>$this->_idformato,\n ':idconjprta' => $this->_idconjprta,\n ':idversion' =>$this->_idversion,\n ])->execute();\n \n /*Se averigua con que id quedo guardada la respuesta si es tipo 11 -> guarda en SOP SOPORTE*/\n if($_ldata[2]=='11' and !empty($this->_tipo11[$_nameq])){\n \n $id_rpta = Yii::$app->db->createCommand(\n 'SELECT id_respuesta FROM fd_respuesta '\n . 'WHERE id_pregunta = :_prta'\n . ' and fd_respuesta.id_conjunto_pregunta= :idconjprta \n and fd_respuesta.id_conjunto_respuesta= :idconjrpta\n and fd_respuesta.id_capitulo= :idcapitulo\n and fd_respuesta.id_formato = :idformato\n and fd_respuesta.id_version = :idversion' )\n ->bindValues([\n ':_prta' => $_ldata[1], \n ':idconjrpta' => $this->_idconjrpta,\n ':idcapitulo' =>$this->_idcapitulo,\n ':idformato' =>$this->_idformato,\n ':idconjprta' => $this->_idconjprta,\n ':idversion' =>$this->_idversion, \n ])->queryOne();\n \n \n foreach($this->_tipo11[$_nameq] as $_cltp11){\n \n $_vctp11=explode(\":::\",$_cltp11);\n $_namefile = $_vctp11[0].\".\".$_vctp11[2];\n \n $_sqlSOP=\"INSERT INTO sop_soportes ([[ruta_soporte]],[[titulo_soporte]],[[tamanio_soportes]],[[id_respuesta]]) VALUES (:ruta, :titulo, :tamanio, :_idrpta)\";\n \n Yii::$app->db->createCommand($_sqlSOP)\n ->bindValues([\n ':ruta' => $_vctp11[1],\n ':titulo' => $_namefile,\n ':tamanio' => $_vctp11[3],\n ':_idrpta' => $id_rpta[\"id_respuesta\"],\n ])->execute();\n \n }\n \n }\n /*Fin guardando en SOP_SOPORTES para tipo 11*/\n \n \n }\n\n }\n \n \n \n $_transaction->commit();\n \n }catch (\\Exception $e) {\n $_transaction->rollBack();\n throw $e;\n return FALSE;\n } catch (\\Throwable $e) {\n $_transaction->rollBack();\n throw $e;\n return FALSE;\n } \n \n }\n return TRUE;\n }", "title": "" }, { "docid": "87429781be35eb7dbbd712f7d7c901fc", "score": "0.49095678", "text": "public function add() {\n\t\t//APROBADO 14-08-2014 CONTROLADOR\n\t\t//APROBADO 14-08-2014 VISTA\n\t\t$usuario=$this->Session->read(\"Usuario\");\n\t\t$id_persona=$usuario['Persona']['id'];\n\n\t\tif ($this->request->is('post')) \n\t\t{\n\t\t\t\t\t$this->Proyecto->create();\n\t\t\t\t\t$opciones = array(\n\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t'Tiposestandar.programa_id'=> $this->request->data['Proyecto']['programa']\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'order'=>array(\n\t\t\t\t\t\t\t'Tiposestandar.orden asc'\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t$tiposestandares = $this->Tiposestandar->find('all',$opciones);\n\n\n\t\t\t\t\t$this->request->data['Proyecto']['estado_id']=$tiposestandares[0]['Tiposestandar']['id'];\n\t\t\t\t\tif ($this->Proyecto->save($this->request->data)) {\n\t\t\t\t\t\t$this->Session->setFlash(__('El proyecto ha sido registrado exitosamente'));\n\t\t\t\t\t\t$this->redirect(array('action' => 'editar_integrantes/'.$this->Proyecto->id));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->Session->setFlash(__('El proyecto no ha sido registrado'));\n\t\t\t\t\t}\n\t\t}\n\n\t\tif($usuario['nivel_id']==1)\n\t\t{\n\t\t\t//Administrados institucional\n\t\t\t$facultades = $this->Facultad->find('list',array('order'=>array('Facultad.id desc')));\n\t\t\tforeach ($facultades as $key => $value) \n\t\t\t{\n\t\t\t\t$facultad=$key;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$opciones = array('conditions' => array('Programa.facultad_id'=> $facultad),'order'=>array('Programa.id desc'));\n\t\t\t$programas = $this->Programa->find('list',$opciones);\n\t\t\tforeach ($programas as $key => $value) \n\t\t\t{\n\t\t\t\t$programa=$key;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$opciones = array('conditions' => array('Area.programa_id'=> $programa));\n\t\t\t$areas = $this->Proyecto->Area->find('list',$opciones);\n\t\t\tforeach ($areas as $key => $value) \n\t\t\t{\n\t\t\t\t$area=$key;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(isset($area))\n\t\t\t{\n\t\t\t\t$opciones = array('conditions' => array('Linea.area_id'=> $area));\n\t\t\t\t$lineas = $this->Proyecto->Linea->find('list',$opciones);\n\t\t\t}\n\t\t\t\n\n\t\t}else if($usuario['nivel_id']==2)\n\t\t{\n\n\t\t\t//Adminsitrador facultad\n\t\t\t$id_facultad=$usuario['Persona']['facultad_id'];\n\t\t\t$opciones = array('conditions' => array('Facultad.id'=> $id_facultad),'order'=>array('Facultad.id desc'));\n\t\t\t//Consultaremos listas\n\t\t\t$facultades = $this->Facultad->find('list',$opciones);\n\n\t\t\t$opciones = array('conditions' => array('Programa.facultad_id'=> $id_facultad),'order'=>array('Programa.id desc'));\n\t\t\t$programas = $this->Programa->find('list',$opciones);\n\t\t\tforeach ($programas as $key => $value) \n\t\t\t{\n\t\t\t\t$programa=$key;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$opciones = array('conditions' => array('Area.programa_id'=> $programa));\n\t\t\t$areas = $this->Proyecto->Area->find('list',$opciones);\n\t\t\tforeach ($areas as $key => $value) \n\t\t\t{\n\t\t\t\t$area=$key;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(isset($area))\n\t\t\t{\n\t\t\t$opciones = array('conditions' => array('Linea.area_id'=> $area));\n\t\t\t$lineas = $this->Proyecto->Linea->find('list',$opciones);\n\t\t\t}\t\n\n\t\t}else if($usuario['nivel_id']==3)\n\t\t{\n\t\t\t//Adminsitrador programa\n\t\t\t$id_facultad=$usuario['Persona']['facultad_id'];\n\t\t\t$id_programa=$usuario['Persona']['programa_id'];\n\t\t\t$opciones = array('conditions' => array('Facultad.id'=> $id_facultad),array('order'=>array('Facultad.id desc')));\n\t\t\t//Consultaremos listas\n\t\t\t$facultades = $this->Facultad->find('list',$opciones);\n\n\t\t\t$opciones = array('conditions' => array('Programa.id'=> $id_programa),'order'=>array('Programa.id desc'));\n\t\t\t$programas = $this->Programa->find('list',$opciones);\n\t\t\tforeach ($programas as $key => $value) \n\t\t\t{\n\t\t\t\t$programa=$key;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$opciones = array('conditions' => array('Area.programa_id'=> $programa));\n\t\t\t$areas = $this->Proyecto->Area->find('list',$opciones);\n\t\t\tforeach ($areas as $key => $value) \n\t\t\t{\n\t\t\t\t$area=$key;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(isset($area))\n\t\t\t{\n\t\t\t\t$opciones = array('conditions' => array('Linea.area_id'=> $area));\n\t\t\t\t$lineas = $this->Proyecto->Linea->find('list',$opciones);\n\t\t\t}\n\n\t\t}\n\n\t\t$this->set(compact('facultades','programas','areas','lineas'));\n\n\t}", "title": "" }, { "docid": "e1225b6d7d2a67bfb7aaf325217e8ecf", "score": "0.49051055", "text": "public function nuevoproducto(){\n if ($this->request->session()->read('Auth.User.role')!='admin') {\n $this->redirect('../../');\n }\n //se recuperan las consolas disponibles en la base de datos\n $nuevoProd = $this -> Productos-> newEntity ();\n $this -> set (compact ('nuevoProd'));\n \n $condicion = array('Productos.idProducto = consolas.idConsola');\n $consolas = $this -> Productos -> find ('all', array(\n 'fields' => array('Productos.nombreProducto'),\n 'conditions'=> $condicion ))\n ->contain(['consolas']);\n //se envian las consolas disponibles en un arreglo para mostrarlas\n $consolaArray = [];\n foreach ($consolas as $con) {\n array_push($consolaArray, $con['nombreProducto']);\n }\n $this -> set ('opcionesConsola', $consolaArray);\n //se espera a que se oprima el boton de guardar\n \n $generos=TableRegistry::get('generos');\n $generos2=$generos->find('all', array(\n 'fields' => array('generos.genero')));\n \n $generoArray = []; \n foreach ($generos2 as $con) {\n array_push($generoArray, $con['genero']);\n }\n \n $this -> set ('opcionesGenero', $generoArray);\n \n \n \n if ($this-> request->is('post')) {\n \n \n $datos = $this -> request -> data;\n \n $nombre=$consolaArray[$datos ['consola']];\n \n \n $nombre2=$generoArray[$datos ['genero']];\n \n $generos3=$generos->find('all')\n ->where(['genero =' => $nombre2])\n ->first();\n $productos=$this->Productos->find('all')\n ->where(['nombreProducto =' => $nombre])\n ->where(['tipo =' => 3])\n ->first();\n \n $nuevoProd -> idProducto = $datos ['identificador'];\n $nuevoProd -> nombreProducto = $datos ['nombreProducto'];\n $nuevoProd -> descripcion = $datos ['descripcion'];\n $nuevoProd -> precio = $datos ['precio'];\n $nuevoProd -> fabricante = $datos ['fabricante'];\n $nuevoProd -> tipo = $datos ['tipo'];\n \n $vid = $datos ['tipo'] > 0;\n //se guarda el producto en la base de datos\n if (TableRegistry::get('Productos') -> save ($nuevoProd)) {\n if ($datos ['tipo']==1||$datos ['tipo']==2) {\n // Hay que insertar los datos en videojuego.\n $videoJ = TableRegistry::get ('video_juegos') -> newEntity ();\n $videoJ -> idVideoJuego = $datos ['identificador'];\n $videoJ -> idConsola = $productos->idProducto ;\n $videoJ -> ESRB = 4;\n $videoJ -> reqMin = 'OpenGL 1';\n $videoJ -> reqMax = 'Ninguno';\n $videoJ -> genero = $generos3->genero;\n TableRegistry::get ('video_juegos') -> save ($videoJ);\n } else if($datos ['tipo']==3) {\n \n $plat = TableRegistry::get ('consolas') -> newEntity ();\n $plat -> idConsola = $datos ['identificador'];\n $plat -> existencia = 200;\n $plat -> especificaciones = $datos ['descripcion'];\n TableRegistry::get ('consolas') -> save ($plat);\n \n \n }\n //se imprime un mensaje informando que se realizo el insert de forma exitosa\n $this -> Flash -> success ('Insertado correctamente');\n } else {\n //si falla el insert se imprime un mensaje de error\n $this -> Flash -> error ('Error insertando.');\n } \n }\n }", "title": "" }, { "docid": "3f0b457435220b498ad30405b054f909", "score": "0.489797", "text": "public function actionAddpuesto($id, $id_puesto){\n \t\t \n \t\t$companyUser = EmpresaUsuario::getMyCompany();\n \t\t \n \t\t$model = $this->findModel($id);\n \t\t \n \t\t$puestoModel = PuestoEmpresa::findOne(['ID_PUESTO'=>$id_puesto, 'ID_EMPRESA'=>$companyUser->ID_EMPRESA, 'ACTIVO'=>1]);\n \t\t \n \t\tif ($puestoModel === NULL || !($model->iDCOMISION->ID_EMPRESA === $companyUser->ID_EMPRESA))\n \t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n \t\t \n\n \t\t$planPuestoModel = PlanPuesto::findOne(['ID_PLAN'=>$id, 'ID_PUESTO'=>$id_puesto]);\n \t\n \t\tif ($planPuestoModel === null){\n \t\t\t\n \t\t\tif($model->TIPO_PLAN === 1 ){\n \t\t\t\t\n \t\t\t\t\treturn $this->redirect(['dashboard', 'id' => $model->ID_PLAN]);\n \t\t\t\t} \n \t\t\t\t\n \t\t\t\t \t\t\t\n \t\t\t $planPuestoModel = new PlanPuesto();\n \t\t\t\n \t\t\t\n \t\t\t$planPuestoModel->ID_PLAN = $id;\n \t\t\t$planPuestoModel->ID_PUESTO = $id_puesto;\n \t\t\t$planPuestoModel->ACTIVO = 1;\n \t\t\tif (!$planPuestoModel->save()){\n \t\t\t\t\t\n \t\t\t\tYii::$app->session->setFlash('alert', [\n \t\t\t\t'options'=>['class'=>'alert-warning'],\n \t\t\t\t'body'=> '<i class=\"fa fa-exclamation-triangle fa-lg\"></i> No fue posible agregar el puesto del trabajador',\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\n \t\n \t\n \t\tYii::$app->session->setFlash('alert', [\n \t\t'options'=>['class'=>'alert-success'],\n \t\t'body'=> '<i class=\"fa fa-check\"></i> Puesto agregado correctamente.',\n \t\t]);\n \t\t \n \t\treturn $this->redirect(['dashboard', 'id' => $id]);\n \t}", "title": "" }, { "docid": "3ca0ee58717eb9c094bf61108cc057fe", "score": "0.48943397", "text": "public function add(){\n $precos = array();\n $input = Request::getContent();\n $obj = json_decode($input);\n\n /* Váriaveis Global de Acesso de Todos os Produtos */\n $nome_produto = $obj->sabor;\n\n /* Essas duas variaveis seram dinamicas */\n $restaurante_id = 3;\n $categoria_produto = $obj->id_categoria;\n\n\n /* Tratamento e Validações de Acordo com o tipo do produto */\n\n if($obj->tipo == 'pizza'){\n\n if(isset($obj->precos->pequena)){\n array_push($precos, $preco = array(\"pequena\" => $obj->precos->pequena));\n }\n\n if(isset($obj->precos->media)){\n array_push($precos, $preco = array(\"media\" => $obj->precos->media));\n }\n\n if(isset($obj->precos->grande)) {\n array_push($precos, $preco = array(\"grande\" => $obj->precos->grande));\n }\n }else {\n if (isset($obj->tipo)) {\n $precos = $obj->preco;\n }\n }\n\n /* O preço da pizza é o unico produto que tem a coluna PREÇO serializado. */\n if($obj->tipo == 'pizza') {\n $jsonPrecos = json_encode($precos);\n }else{\n $jsonPrecos = $precos;\n }\n\n $ingredientes = $obj->ingredientes;\n $tipo_produto = $obj->tipo;\n\n /* Insert do produto no Banco de Dados */\n $produto = new Produto;\n $produto->nome_produto = $nome_produto;\n $produto->ingredientes = $ingredientes;\n $produto->preco = $jsonPrecos;\n $produto->restaurantes_id = $restaurante_id;\n $produto->tipo = $tipo_produto;\n $produto->enabled = 1;\n $produto->categoria_produto_id = $categoria_produto;\n if($produto->save()){\n echo json_encode(\n array(\n \"status\" => 200,\n \"message\" => \"Produto adicionado com sucesso\",\n )\n );\n }\n\n }", "title": "" }, { "docid": "dfafa825827b827fad7037e34188c16a", "score": "0.48933", "text": "public function save() {\n \t\n \t$oDaoAcordoPenalidade = db_utils::getDao(\"acordopenalidade\");\n \t$oDaoAcordoPenalidadeAcordoTipo = db_utils::getDao(\"acordopenalidadeacordotipo\");\n \t\n \t$sMsgErro = \"Erro:\\n\\n Não foi possível salvar dados da penalidade.\\n\\n\";\n \t\n \t$oDaoAcordoPenalidade->ac13_descricao = $this->getDescricao();\n \t$oDaoAcordoPenalidade->ac13_obs = pg_escape_string($this->getObservacao());\n \t$oDaoAcordoPenalidade->ac13_textopadrao = pg_escape_string($this->getTextoPadrao());\n \t$oDaoAcordoPenalidade->ac13_validade = $this->getDataLimite();\n \t\n \t$iGetCodigo = $this->getCodigo();\n \tif (empty($iGetCodigo)) {\n \t\t\n \t\t$oDaoAcordoPenalidade->incluir($this->getCodigo());\n \t\t$this->setCodigo($oDaoAcordoPenalidade->ac13_sequencial);\n \t} else {\n \t\t\n \t\t$oDaoAcordoPenalidade->ac13_sequencial = $this->getCodigo();\n \t\t$oDaoAcordoPenalidade->alterar($this->getCodigo());\n \t}\n \t\n if ($oDaoAcordoPenalidade->erro_status == 0) {\n throw new Exception($sMsgErro.$oDaoAcordoPenalidade->erro_msg);\n }\n \n \t$oDaoAcordoPenalidadeAcordoTipo->excluir(null, \"ac14_acordopenalidade = {$this->getCodigo()}\");\n \tif ($oDaoAcordoPenalidadeAcordoTipo->erro_status == 0) {\n \t throw new Exception($sMsgErro.$oDaoAcordoPenalidadeAcordoTipo->erro_msg);\n \t}\n \t\n \t$aGetTipoContratos = $this->getTiposContratos();\n \t\n \tforeach ($aGetTipoContratos as $iTipo) {\n \t\t\n \t $oDaoAcordoPenalidadeAcordoTipo->ac14_acordotipo = $iTipo;\n \t $oDaoAcordoPenalidadeAcordoTipo->ac14_acordopenalidade = $this->getCodigo();\n \t\t$oDaoAcordoPenalidadeAcordoTipo->incluir(null);\n \t\t\n \t if ($oDaoAcordoPenalidadeAcordoTipo->erro_status == 0) {\n throw new Exception($sMsgErro.$oDaoAcordoPenalidadeAcordoTipo->erro_msg);\n }\n \t}\n \t\n \treturn $this;\n }", "title": "" }, { "docid": "f29f89460d10fb0e7bb0f681a060a529", "score": "0.48899975", "text": "abstract public function add_relationships();", "title": "" }, { "docid": "14c1f19a28a6283fb2482e1296becdc0", "score": "0.4885995", "text": "function add_requerimiento($cite_id,$tipo_insumo, $proy_id, $tp_ins){\n $data['menu']=$this->menu(3); //// genera menu\n $data['proyecto'] = $this->model_proyecto->get_id_proyecto($proy_id); //// Datos del Proyecto\n $data['fase'] = $this->model_faseetapa->get_id_fase($proy_id); //// DATOS DE LA FASE ACTIVA\n $data['titulo_proy']=strtoupper($data['proyecto'][0]['tipo']);\n $data['cite'] = $this->model_modificacion->get_cite_insumo($cite_id); /// Cite\n $data['titulo']=$this->model_modificacion->mis_op($data['proyecto'][0]['proy_act'],$data['fase'][0]['pfec_ejecucion'],$tp_ins);\n $data['gestiones'] = $data['fase'][0]['pfec_fecha_fin']-$data['fase'][0]['pfec_fecha_inicio']+1; //// Nro de Gestione en funcion a su fase activa\n $data['ins_titulo'] = 'NUEVO INSUMO' . $this->get_ins_titulo($tipo_insumo);\n $data['ins_tipo'] = $tipo_insumo;\n $data['gestion'] = $this->gestion;\n\n $data['techo'] = $this->minsumos->tabla_presupuesto($proy_id, $this->gestion);//techo presupuestario\n $data['saldo_total'] = $this->minsumos->saldo_total_fin($proy_id, $this->gestion);//SALDO TOTAL DEL TECHO PRESUPUESTARIO\n $data['lista_entidad'] = $this->model_entidad_tras->lista_entidad_tras();//entidad transferencia\n $data['lista_cargo'] = $this->minsumos->lista_cargo();\n $data['sumatorias'] = $this->suma_total_fuentes($data['fase'][0]['id'], $this->gestion,$data['fase'][0]['pfec_ejecucion'],$data['proyecto'][0]['proy_act']); //// Suma Total, Asignado, Programado, SaldoAsignado, Programado, Saldo\n $data['lista_partidas'] = $this->model_partidas->lista_padres();//partidas \n\n if($tipo_insumo==1 || $tipo_insumo==2 || $tipo_insumo==3 || $tipo_insumo==4 || $tipo_insumo==5 || $tipo_insumo==6 || $tipo_insumo==7 || $tipo_insumo==8 || $tipo_insumo==9){\n $this->load->view('admin/modificacion/operaciones/requerimientos/add_requerimiento', $data);\n }\n else{ \n redirect(site_url(\"\") . '/prog/ins_prod/'.$proy_id.'/'.$com_id.'/'.$prod_id.'/false');\n }\n }", "title": "" }, { "docid": "f071d1d728abdd6683f103e73618602d", "score": "0.4883508", "text": "public function seguridad(){\n return $this->hasOne('App\\Seguridad');\n }", "title": "" }, { "docid": "83c528b98cfb3f1f174e47e5d39393d8", "score": "0.48783708", "text": "public function removeFkArrecadacaoProcessoSuspensoes(\\Urbem\\CoreBundle\\Entity\\Arrecadacao\\ProcessoSuspensao $fkArrecadacaoProcessoSuspensao)\n {\n $this->fkArrecadacaoProcessoSuspensoes->removeElement($fkArrecadacaoProcessoSuspensao);\n }", "title": "" }, { "docid": "997609e01eade58186c3942cb59d442b", "score": "0.4876212", "text": "public function processes()\n {\n \n return $this->belongsTo(Processes::class, 'process_code', 'code');\n }", "title": "" }, { "docid": "58716fc1a9bc51cda1a156a62e92dac6", "score": "0.4873428", "text": "public function addFkFiscalizacaoProcessoFiscalObras(\\Urbem\\CoreBundle\\Entity\\Fiscalizacao\\ProcessoFiscalObras $fkFiscalizacaoProcessoFiscalObras)\n {\n if (false === $this->fkFiscalizacaoProcessoFiscalObras->contains($fkFiscalizacaoProcessoFiscalObras)) {\n $fkFiscalizacaoProcessoFiscalObras->setFkImobiliarioImovel($this);\n $this->fkFiscalizacaoProcessoFiscalObras->add($fkFiscalizacaoProcessoFiscalObras);\n }\n\n return $this;\n }", "title": "" }, { "docid": "66e20212b09ab32524db9af55a06146e", "score": "0.48670924", "text": "public function sueldo()\n {\n return $this-> hasMany('Sirhum\\Sueldo','empleado','id');\n }", "title": "" }, { "docid": "241e440ea79820af463b197a4249e6b7", "score": "0.4855502", "text": "public function planoAcao()\n {\n return $this->hasOne(PlanoAcao::class, 'id_processo', 'id');\n }", "title": "" }, { "docid": "fe31c1b26257e7ffff496e2198c0e9e3", "score": "0.48435095", "text": "public function save(){\n if (isset($this->pedido_id)){\n $this->update();\n }else{\n $this->insert();\n }\n }", "title": "" }, { "docid": "e150f253901ce0e97a0baa7e84c29970", "score": "0.48302525", "text": "public function obras(){\n\t\treturn $this->hasOne('App\\Models\\SubidaOsp', 'id_subida', 'id_subida');\n\t}", "title": "" }, { "docid": "fcdb8e4485ddd3bdf8bebae49837816a", "score": "0.48193058", "text": "public function actionCreate()\n {\n $model = new IsIsaInformeSemanalIsa();\n $idInstitucion = $_SESSION['instituciones'][0];\n $institucion = Instituciones::findOne($idInstitucion);\n\n if ($model->load(Yii::$app->request->post())) {\n \n $model->id_institucion = $_SESSION['instituciones'][0];\n $model->id_sede = intval($model->id_sede);\n\n if($model->save()){\n $is_isa_id = $model->id;\n //$is_isa_id = 2;\n\n if (Yii::$app->request->post('IsIsaActividadesIsIsa')){\n $data = Yii::$app->request->post('IsIsaActividadesIsIsa');\n $count \t= count($data);\n $modelActividades = [];\n\n for( $i = 0; $i < $count; $i++ ){\n $modelActividades[] = new IsIsaActividadesIsIsa();\n }\n\n if (IsIsaActividadesIsIsa::loadMultiple($modelActividades, Yii::$app->request->post() )) {\n foreach( $modelActividades as $key => $modelActividad) {\n if($modelActividad->duracion and $modelActividad->docente){\n $modelActividad->id_informe_semanal_isa = $is_isa_id;\n if($modelActividad->save()){\n \n if(Yii::$app->request->post('IsIsaActividadIsIsa')){\n $dataActividad = Yii::$app->request->post('IsIsaActividadIsIsa');\n $countActividad = count( $dataActividad );\n $modelActividadInd = [];\n \n for( $i = 0; $i < $countActividad; $i++ ){\n $modelActividadInd[] = new IsIsaActividadIsIsa();\n }\n \n if (IsIsaActividadIsIsa::loadMultiple($modelActividadInd, Yii::$app->request->post() )) {\n if($modelActividadInd[$key]->sesiones_realizadas){\n $modelActividadInd[$key]->id_actividades_is_isa = $modelActividad->id;\n $modelActividadInd[$key]->save();\n }\n \n }\n }\n\n if(Yii::$app->request->post('IsIsaTipoCantidadPoblacionIsIsa')){\n \n $dataPoblacion = Yii::$app->request->post('IsIsaTipoCantidadPoblacionIsIsa');\n $countPoblacion = count( $dataPoblacion );\n $modelTipoPoblacion = [];\n\n for( $i = 0; $i < $countPoblacion; $i++ ){\n $modelTipoPoblacion[] = new IsIsaTipoCantidadPoblacionIsIsa();\n }\n\n if (IsIsaTipoCantidadPoblacionIsIsa::loadMultiple($modelTipoPoblacion, Yii::$app->request->post() )) {\n if($modelTipoPoblacion[$key]->vecinos){\n $modelTipoPoblacion[$key]->id_actividades_is_isa = $modelActividad->id;\n $modelTipoPoblacion[$key]->save();\n }\n \n }\n }\n\n\n if(Yii::$app->request->post('IsIsaEvidenciasIsIsa')){\n $dataEvidencias = Yii::$app->request->post('IsIsaEvidenciasIsIsa');\n $countEvidencias = count( $dataEvidencias );\n $modelEvidencias = [];\n\n for( $i = 0; $i < $countEvidencias; $i++ ){\n $modelEvidencias[] = new IsIsaEvidenciasIsIsa();\n }\n\n if (IsIsaEvidenciasIsIsa::loadMultiple($modelEvidencias, Yii::$app->request->post() )) {\n\n $file_actas = UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]acta\") ? UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]acta\") : null;\n $file_reportes = UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]reprote\" ) ? UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]reprote\") : null;\n $file_listados = UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]listados\" ) ? UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]listados\") : null;\n $file_plan_trabajo = UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]plan_trabajo\" ) ? UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]plan_trabajo\") : null;\n $file_formato_seguimiento = UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]formato_seguimiento\" ) ? UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]formato_seguimiento\") : null;\n $file_formato_evaluacion = UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]formato_evaluacion\" ) ? UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]formato_evaluacion\") : null;\n $file_fotografias = UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]fotografias\" ) ? UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]fotografias\") : null;\n $file_vidoes = UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]videos\") ? UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]videos\") : null;\n $file_otros = UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]otros\") ? UploadedFile::getInstance( $modelEvidencias[$key], \"[$key]otros\") : null;\n\n \n $carpetaEvidencias = \"../documentos/documentos_IS_ISA/evidenciasIS_ISA/\".$institucion->codigo_dane;\n if (!file_exists($carpetaEvidencias)) {\n mkdir($carpetaEvidencias, 0777, true);\n }\n\n if($file_actas){\n $rutaFisicaActas = $carpetaEvidencias.\"/\";\n $rutaFisicaActas .= $file_actas->baseName;\n $rutaFisicaActas .= date( \"_Y_m_d_His\" ) . '.' . $file_actas->extension;\n $saveActa = $file_actas->saveAs( $rutaFisicaActas );\n $file_actas = $rutaFisicaActas;\n }\n\n if($file_reportes){\n $rutaFisicaReportes = $carpetaEvidencias.\"/\";\n $rutaFisicaReportes .= $file_reportes->baseName;\n $rutaFisicaReportes .= date( \"_Y_m_d_His\" ) . '.' . $file_reportes->extension;\n $saveReportes = $file_reportes->saveAs( $rutaFisicaReportes );\n $file_reportes = $rutaFisicaReportes;\n }\n\n if($file_listados){\n $rutaFisicaListados = $carpetaEvidencias.\"/\";\n $rutaFisicaListados .= $file_listados->baseName;\n $rutaFisicaListados .= date( \"_Y_m_d_His\" ) . '.' . $file_listados->extension;\n $saveListados = $file_listados->saveAs( $rutaFisicaListados );\n $file_listados = $rutaFisicaListados;\n }\n\n if($file_plan_trabajo){\n $rutaFisicaPlanTrabajo = $carpetaEvidencias.\"/\";\n $rutaFisicaPlanTrabajo .= $file_plan_trabajo->baseName;\n $rutaFisicaPlanTrabajo .= date( \"_Y_m_d_His\" ) . '.' . $file_plan_trabajo->extension;\n $savePlanTrabajo = $file_plan_trabajo->saveAs( $rutaFisicaPlanTrabajo );\n $file_plan_trabajo = $rutaFisicaPlanTrabajo;\n }\n\n\n if($file_formato_seguimiento){\n $rutaFisicaFormato = $carpetaEvidencias.\"/\";\n $rutaFisicaFormato .= $file_formato_seguimiento->baseName;\n $rutaFisicaFormato .= date( \"_Y_m_d_His\" ) . '.' . $file_formato_seguimiento->extension;\n $saveFormato = $file_formato_seguimiento->saveAs( $rutaFisicaFormato );\n $file_formato_seguimiento = $rutaFisicaFormato;\n }\n\n if($file_formato_evaluacion){\n $rutaFisicaFormatoEvaluacion = $carpetaEvidencias.\"/\";\n $rutaFisicaFormatoEvaluacion .= $file_formato_evaluacion->baseName;\n $rutaFisicaFormatoEvaluacion .= date( \"_Y_m_d_His\" ) . '.' . $file_formato_evaluacion->extension;\n $saveFormato = $file_formato_evaluacion->saveAs( $rutaFisicaFormatoEvaluacion );\n $file_formato_evaluacion = $rutaFisicaFormatoEvaluacion;\n }\n\n if($file_fotografias){\n $rutaFisicaFotografias = $carpetaEvidencias.\"/\";\n $rutaFisicaFotografias .= $file_fotografias->baseName;\n $rutaFisicaFotografias .= date( \"_Y_m_d_His\" ) . '.' . $file_fotografias->extension;\n $saveFotografias = $file_fotografias->saveAs( $rutaFisicaFotografias );\n $file_fotografias = $rutaFisicaFotografias;\n }\n\n if($file_vidoes){\n $rutaFisicaVideos = $carpetaEvidencias.\"/\";\n $rutaFisicaVideos .= $file_vidoes->baseName;\n $rutaFisicaVideos .= date( \"_Y_m_d_His\" ) . '.' . $file_vidoes->extension;\n $saveVideos = $file_vidoes->saveAs( $rutaFisicaVideos );\n $file_vidoes = $rutaFisicaVideos;\n }\n\n if($file_otros){\n $rutaFisicaOtros = $carpetaEvidencias.\"/\";\n $rutaFisicaOtros .= $file_otros->baseName;\n $rutaFisicaOtros .= date( \"_Y_m_d_His\" ) . '.' . $file_otros->extension;\n $saveOtros = $file_otros->saveAs( $rutaFisicaOtros );\n $file_otros = $rutaFisicaOtros;\n }\n \n $modelEvidencias[$key]->id_actividades_is_isa = $modelActividad->id;\n $modelEvidencias[$key]->acta = $file_actas;\n $modelEvidencias[$key]->reprote = $file_reportes;\n $modelEvidencias[$key]->listados = $file_listados;\n $modelEvidencias[$key]->plan_trabajo = $file_plan_trabajo;\n $modelEvidencias[$key]->formato_seguimiento = $file_formato_seguimiento;\n $modelEvidencias[$key]->formato_evaluacion = $file_formato_evaluacion;\n $modelEvidencias[$key]->fotografias = $file_fotografias;\n $modelEvidencias[$key]->videos = $file_vidoes;\n $modelEvidencias[$key]->otros = $file_otros;\n $modelEvidencias[$key]->save();\n\n \n }\n }\n\n }\n\n\n }\n \n }\n\n }\n }\n\n }\n \n\n\n\n return $this->redirect(['index', 'guardado' => 1]);\n }\n\n $Sedes = Sedes::find()->where( \"id_instituciones = $idInstitucion\" )->all();\n $sedes\t= ArrayHelper::map( $Sedes, 'id', 'descripcion' );\n \n return $this->renderAjax('create', [\n 'model' => $model,\n 'sedes' => $sedes,\n 'institucion' => $institucion->descripcion,\n ]);\n }", "title": "" }, { "docid": "62107d26c126775dcd9b7bf12abf926f", "score": "0.48147702", "text": "private function saveEncuentrosCompetition($encuentros, $competencia, $jornada, $grupo, $fecha_jornada){\n $repository = $this->getDoctrine()->getRepository(Encuentro::class);\n $repositoryUserComp = $this->getDoctrine()->getRepository(UsuarioCompetencia::class);\n $em = $this->getDoctrine()->getManager();\n // recorremos todos los encuentros\n for ($i=0; $i < count($encuentros); $i++) {\n $nameComp1 = $encuentros[$i][0];\n $nameComp2 = $encuentros[$i][1];\n // no persistimos encuentros con competiodres libres\n if(($nameComp1 != NULL) && ($nameComp2 != NULL)){\n // vamos a recuperar los competidores del encuentro\n $competitor1 = $repositoryUserComp->findOneBy(['alias' => $nameComp1]);\n $competitor2 = $repositoryUserComp->findOneBy(['alias' => $nameComp2]);\n // recuperamos la jornada que corresponde\n $newJornada = $this->getJornada($jornada, $competencia, $fecha_jornada);\n // creamos el encuentro\n $newEncuentro = new Encuentro();\n $newEncuentro->setCompetencia($competencia);\n $newEncuentro->setJornada($newJornada);\n $newEncuentro->setCompetidor1($competitor1);\n $newEncuentro->setCompetidor2($competitor2);\n \n if($grupo != NULL){\n $newEncuentro->setGrupo($grupo);\n }\n \n $em->persist($newEncuentro);\n }\n }\n\n $em->flush();\n }", "title": "" }, { "docid": "bec226cacc03abd86466ad2c1ea91add", "score": "0.4810008", "text": "public function ajouterTousPossessionAction($serie){\n\t\t$em = $this->getDoctrine()->getManager();\n\t\n\t\t// Recupere l'id de l'utilisateur en cour\n\t\t$curentUserId = $this->get('security.context')->getToken()->getUser()->getId();\n\t\t$user = $em->getRepository('ManblioUserBundle:User')->find($curentUserId);\n\t\t$userId=$user->getId();\n\t\t\t\t\t$series=$em->getRepository('ManblioLivreBundle:NomSerie')->find($serie);\n\t\t\t\t\t$livre=$em->getRepository('ManblioLivreBundle:Livre')->findByNomSerie($series);\n\t\t\t\t\tforeach($livre as $l){\n\t\t\t\t\t\t$exist=$em->getRepository('ManblioLivreBundle:Possession')->findUserAndLivre($userId,$l->getId());\n\t\t\t\t\t\tif($exist == null){\n\t\t\t\t\t\t\t$possession = new Possession();\n\t\t\t\t\t\t\t$possession->setLivre($l);\n\t\t\t\t\t\t\t$possession->setUtilisateur($user);\n\t\t\t\t\t\t\t$em->persist($possession);\n\t\t\t\t\t\t\t$em->flush();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t// fait rien\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t \t// Redirige vers la page detail de la serie \n\t \treturn $this->redirect($this->generateUrl('detailSerie', array('id' =>$serie)));\n\t \n \t}", "title": "" }, { "docid": "38be3b106f731960c18a3886070b3ca7", "score": "0.4789367", "text": "public function asignatura_pies()\n \t\t{\n \t\t\treturn $this->hasMany(AsignaturaPie::class);\n \t\t}", "title": "" }, { "docid": "9fa6a15d8dfe8d8baf79c2709ccd4d49", "score": "0.4788903", "text": "public function save() {\n\n switch ($this->getState()) {\n\n case cDELETE:\n\n $permissoes = new Permissao;\n $permissoes->where('id_usuario', $this->getID());\n $permissoes->readLst();\n $permissoes->setDeleted();\n $permissoes->save();\n\n $lLst = $this->getUserInterestsLst();\n if ($lLst->countItens() > 0) {\n for ($i = 0; $i < $lLst->countItens(); $i++) {\n $Item = $lLst->getItem($i);\n $Item->setDeleted();\n }\n $lLst->save();\n }\n\n $lLst = $this->getUserTravelertypesLst();\n if ($lLst->countItens() > 0) {\n for ($i = 0; $i < $lLst->countItens(); $i++) {\n $Item = $lLst->getItem($i);\n $Item->setDeleted();\n }\n $lLst->save();\n }\n\n parent::save();\n break;\n\n case cCREATE:\n $this->setCreated_at(date('Y-m-d H:i:s'));\n case cUPDATE:\n\n //\tprint_r($this);die('<br><br>\\n\\n' . ' Linha: ' . __LINE__ . ' Arquivo: ' . __FILE__);\n\n parent::save();\n $permissoesLst = $this->permissoesLst;\n\n\n if ($permissoesLst == '') {\n $permissoesLst = array();\n }\n\n foreach ($permissoesLst as $permissao) {\n if ($permissao->getTipo() == 'permissao' && $permissao->getGrupo() == 'N') {\n $permissoes = new Permissao;\n $permissoes->setID($permissao->getId_permissao());\n $permissoes->setID_Usuario($this->getID());\n $permissoes->setID_Processo($permissao->getId_Processo());\n $permissoes->setOwner($this->getID());\n $permissoes->setState($permissao->getState());\n $permissoes->setVer($permissao->getVer());\n $permissoes->setInserir($permissao->getInserir());\n $permissoes->setExcluir($permissao->getExcluir());\n $permissoes->setEditar($permissao->getEditar());\n $permissoes->save();\n }\n }\n\n $lInterestLst = $this->getUserInterestsLst();\n\n if ($lInterestLst->countItens() > 0) {\n for ($i = 0; $i < $lInterestLst->countItens(); $i++) {\n $Item = $lInterestLst->getItem($i);\n $Item->setid_usuario($this->getID());\n $Item->save();\n }\n }\n\n $TtLst = $this->getUserTravelertypesLst();\n\n if ($TtLst->countItens() > 0) {\n for ($i = 0; $i < $TtLst->countItens(); $i++) {\n $Item = $TtLst->getItem($i);\n $Item->setid_usuario($this->getID());\n $Item->save();\n }\n }\n break;\n }\n }", "title": "" }, { "docid": "217eacb8b042717bdb84971c6a7b4ded", "score": "0.47852418", "text": "public function store(Request $request)\n { \n\n $request->validate([\n 'pendencia' => 'required',\n // 'vencimento'=>'required',\n \n ]);\n \n\n \n $pendencia = new Pendencia;\n\n $pendencia->created_by = Auth::id();\n $pendencia->servico_id = $request->servico_id;\n $pendencia->pendencia = $request->pendencia;\n \n if($request->vencimento){\n $pendencia->vencimento = Carbon::createFromFormat('d/m/Y', $request->vencimento)->toDateString(); \n }\n \n \n \n $pendencia->responsavel_tipo = $request->responsavel_tipo;\n $pendencia->responsavel_id = $request->responsavel_id;\n $pendencia->status = $request->status;\n $pendencia->observacoes = $request->observacoes;\n $pendencia->etapa = $request->etapa;\n // $pendencia->vinculo = $request->vinculo;\n\n\n \n $pendencia->save();\n\n if($request->vinculo)\n {\n foreach($request->vinculo as $v)\n {\n $vinculo = new PendenciasVinculos;\n $vinculo->servico_id = $v;\n $vinculo->pendencia_id = $pendencia->id;\n $vinculo->save();\n }\n \n }\n \n return redirect(route('servicos.show',$pendencia->servico_id));\n\n }", "title": "" }, { "docid": "e3382ab1159d26fc102beb0648b73dc8", "score": "0.47841403", "text": "public function store(Request $request)\n {\n // dd($request);\n $careers = Career::all();\n \n $selectprocess = new SelectProcess;\n $selectprocess->dataInicio = $request->dataInicio;\n $selectprocess->dataFim = $request->dataFim;\n $selectprocess->nome = $request->nome;\n $selectprocess->descrição = $request->descrição; \n\n\n\n if ($selectprocess->save()) { \n\n\n $x = [];\n\n $selected_curso = $request->cursos;\n foreach ($selected_curso as $sc) {\n if (array_key_exists('id', $sc)) {\n $x[$sc['id']] = ['vagas' => $sc['vagas']];\n }\n }\n $selectprocess->careers()->sync($x);\n\n \n<<<<<<< HEAD\n $y = [];\n\n $cota_curso = $request->cotas;\n foreach ($cota_curso as $c) {\n if(array_key_exists('id', $c)){\n $y[$c['id']] = ['vagas' => $c['vagas']];\n } \n } \n\n $selectprocess->quotas()->sync($c);\n\n return redirect('select-process')->with('message', 'SelectProcess added!');\n=======\n \n return redirect('select-process')->with('success_message', 'Processo seletivo adicionado!');\n>>>>>>> 2ab7efbfce6b493eec7091c9f0e1f36ece4c9e7c\n } else {\n return redirect('select-process.create')->with('error_message', 'Erro ao cadastrar.');\n }\n\n \n }", "title": "" }, { "docid": "c2725f2fa10ca1ac683743b470f8b175", "score": "0.47828367", "text": "private function saveDetallePagoRefacturar($m_solicitud,$m_poliza_detalle_pago){\n\t\t//Domain_DetallePago::deleteDetallePago($m_solicitud->poliza_id);\n\n\t\t\n\t\t$fecha_vigencia = $m_solicitud->fecha_vigencia;\n\t\n\t\n\ttry {\n\n\t\t\t//echo \"Guarda la forma de pago Efectivo\";\n\t\t\t//Guardo el tipo de pago\n\t\t\t$detalle_pago = new Model_DetallePago();\n\t\t\t$detalle_pago->forma_pago_id = $m_poliza_detalle_pago->forma_pago_id;\n\t\t\t$detalle_pago->moneda_id = $m_poliza_detalle_pago->moneda_id;\n\t\t\t$detalle_pago->save();\n\t\t\t//Guardo en la poliza el id para asociarlo\n\t\t\t\t\n\t\t\t$m_solicitud->detalle_pago_id = $detalle_pago->detalle_pago_id;\n\t\t\t$m_solicitud->save();\n\t\t\t//Guardo los valores de las cuotas\n\t\t\t//En este caso es una sola cuota porque es efectivo\n\t\t\t$d_detalle_pago = new Domain_DetallePago($m_poliza_detalle_pago->detalle_pago_id);\n\t\t\t\n\t\t\t//Por ahora trae el primer importe para realizar la cuota\n\t\t\t$detalle_pago_cuotas = $d_detalle_pago->getModelDetallePagoCuota();\n\t\t\t\n\t\t\t//\techo\"<pre>\";\n\t\t\t//print_r($detalle_pago_cuotas);\n\t\t\t//exit;\n\t\t\t$cant_cuotas = Domain_DetallePago::getCantidadCuotas($m_poliza_detalle_pago->detalle_pago_id);\n\n\t\t\tfor ($i = 1; $i <= $cant_cuotas; $i++) {\n\n\t\t\t\t$detalle_pago_cuota = new Model_DetallePagoCuota();\n\t\t\t\t$detalle_pago_cuota->detalle_pago_id = $detalle_pago->detalle_pago_id;\n\t\t\t\t$detalle_pago_cuota->cuota_id=$i;\n\t\t\t\t$detalle_pago_cuota->importe=$detalle_pago_cuotas->importe;\n\t\t\t\t$detalle_pago_cuota->fecha_cobro= $fecha_vigencia;\n\t\t\t\t$detalle_pago_cuota->save();\n\t\t\t\t//Agrego un mes a la fecha\n\t\t\t\t$fecha_vigencia = Domain_DetallePago::addMonthbyDate($fecha_vigencia);\n\t\t\t\t//echo\"<br>\";\n\t\t\t\t//print_r($detalle_pago_cuotas->importe);\n\n\t\t\t}\n\n\t\t} catch (Exception $e) {\n\t\t\techo $e->getMessage();\n\t\t}\n\t\n\t\n}", "title": "" }, { "docid": "f1bf7517cfcac5b71455fc4e7473881c", "score": "0.47794557", "text": "public function actionCreateMulti()\n {\n $model = new PedidoMateriales();\n $stock= new StockMateriales();\n $padjunta= [new PedidoAdjunta];\n\n if ($model->load(Yii::$app->request->post())) {\n $model->PM_FECHA= date('Y-m-d');\n $model->PM_ESTADO= 'Pendiente';\n\n\n $padjunta = Model::createMultiple(PedidoAdjunta::classname());\n Model::loadMultiple($padjunta, Yii::$app->request->post());\n // validate all models\n $valid = $model->validate();\n $valid = Model::validateMultiple($padjunta) && $valid;\n\n if ($valid) {\n $model->save();\n $transaction = \\Yii::$app->db->beginTransaction();\n try {\n if ($flag = $model->save(false)) {\n foreach ($padjunta as $padjunta) {\n\n $padjunta->PM_ID = $model->PM_ID;\n\n if (! ($flag = $padjunta->save(false))) {\n $transaction->rollBack();\n break;\n }\n }\n }\n if ($flag) {\n $transaction->commit();\n return $this->redirect(['orden-trabajo/transaccion', 'id' => $model->sM->OT_ID]);\n }\n } catch (Exception $e) {\n $transaction->rollBack();\n }\n }\n\n\n\n\n\n\n } else {\n return $this->render('createmulti', [\n 'model' => $model,\n 'padjunta' => (empty($padjunta)) ? [new PedidoAdjunta] : $padjunta,\n 'stock' => $stock,\n ]);\n }\n }", "title": "" }, { "docid": "7a4200dcb12838610e614c93e4fd62c8", "score": "0.47793585", "text": "public function actionCreate() {\n $this->title_action = Yii::t(\"smith\", Yii::t('smith', \"Adicionar Programas Permitidos\"));\n $this->pageTitle = Yii::t(\"smith\", Yii::t('smith', \"Adicionar Programas Permitidos\"));\n $model = new ProgramaPermitido;\n $fk_empresa = MetodosGerais::getEmpresaId();\n $idUser = Yii::app()->user->id;\n $serial = UserGroupsUser::model()->findByAttributes(array(\"id\" => $idUser));\n $serial = $serial->serial_empresa;\n\n if ((isset($_POST['programas'])) && isset($_POST['ProgramaPermitido'])) {\n $start = MetodosGerais::inicioContagem();\n\n $lista_programas = $_POST['programas'];\n $fk_empresa = MetodosGerais::getEmpresaId();\n $ultimo_inserir = count($lista_programas);\n $flag = 0;\n foreach ($lista_programas as $programa) {\n $model = new ProgramaPermitido;\n $model->fk_empresa = $fk_empresa;\n $model->serial_empresa = $serial;\n $model->fk_equipe = $_POST['ProgramaPermitido']['fk_equipe'];\n $model->nome = $programa;\n $model->save();\n $flag++;\n if ($flag == $ultimo_inserir) {\n LogAcesso::model()->saveAcesso('Configurações', 'Adicionar Programas Permitidos', 'Adicionar Programas Permitidos', MetodosGerais::tempoResposta($start));\n Yii::app()->user->setFlash('success', Yii::t('smith', 'Os Programas foram inseridos com sucesso.'));\n $this->redirect(array('index'));\n }\n }\n }\n if (isset($_POST['enviarEmail'])) {\n $mensagem = \"<div>\".Yii::t('smith', 'Olá Administrador').\",<br><br> \".Yii::t('smith', 'O seguinte programa foi solicitado para inclusão:').\" <br> \".Yii::t('smith', 'Nome').\": \" . $_POST['programa'] . \"<br>\".Yii::t('smith', 'Site do fabricante').\": \" . $_POST['site'] . \"</div>\";\n // $message = new YiiMailMessage;\n // $message->setBody($mensagem, 'text/html');\n // $message->subject = Yii::t('smith', \"Novo Programa Solicitado\").\" - \" . Yii::app()->user->name;\n // $message->addTo(\"[email protected]\");\n // $message->from = \"[email protected]\";\n // Yii::app()->mail->send($message);\n\n // Ex: MetodosGerais::emailSendGrid(de, para, título, corpo);\n SendMail::send('[email protected]', array('[email protected]'), Yii::t('smith', 'Novo Programa Solicitado') .' - ' . Yii::app()->user->name, $mensagem);\n Yii::app()->user->setFlash('success', Yii::t('smith', 'Solicitação enviada'));\n $this->refresh();\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "e0f83daefc7bf4dc44a2f0316e519be6", "score": "0.47776994", "text": "public function PreProposta()\n {\n return $this->belongsTo('Serbinario\\Entities\\PreProposta','proposta_id','id');\n }", "title": "" }, { "docid": "257aa00232f9d740de8f7c113406a42b", "score": "0.4774861", "text": "public function addAluno($aluno) {\n try {\n if ($aluno instanceof Application_Model_Aluno) {\n if ($this->isValid($aluno)) {\n if (!$this->db_aluno instanceof Application_Model_DbTable_Aluno)\n $this->db_aluno = new Application_Model_DbTable_Aluno();\n\n $id_aluno = $this->db_aluno->insert($aluno->parseArray());\n\n if ($aluno->hasTurmas()) {\n $db_pagamento = new Application_Model_DbTable_Pagamento();\n $db_pagamento_alimentos = new Application_Model_DbTable_PagamentoAlimentos();\n $db_aluno_turmas = new Application_Model_DbTable_TurmaAlunos();\n\n foreach ($aluno->getCompleteTurmas() as $turma) {\n $pagamento = $turma[Application_Model_Aluno::$index_pagamento_turma];\n\n if ($pagamento instanceof Application_Model_Pagamento) {\n $id_pagamento = $db_pagamento->insert($pagamento->parseArray());\n $pagamento->setIdPagamento($id_pagamento);\n\n if ($pagamento->hasAlimentos()) {\n foreach ($pagamento->getAlimentos() as $alimento)\n $db_pagamento_alimentos->insert(array('id_pagamento' => $id_pagamento, 'id_alimento' => $alimento[Application_Model_Pagamento::$index_alimento]->getIdAlimento(), 'quantidade' => $alimento[Application_Model_Pagamento::$index_quantidade_alimento]));\n }\n }\n $db_aluno_turmas->insert(array('id_turma' => $turma[Application_Model_Aluno::$index_turma]->getIdTurma(), 'id_aluno' => $id_aluno, 'id_pagamento' => ($pagamento instanceof Application_Model_Pagamento) ? $pagamento->getIdPagamento() : null, 'aprovado' => $turma[Application_Model_Aluno::$index_aprovacao_turma], 'liberacao' => $turma[Application_Model_Aluno::$index_liberacao_turma]));\n }\n }\n return true;\n }\n }\n return false;\n } catch (Zend_Exception $e) {\n echo $e->getMessage();\n return false;\n }\n }", "title": "" }, { "docid": "4fd9f89eb77f72a1c3e268ebfb910985", "score": "0.47739303", "text": "public function store(PresupuestosRequest $request)\n {\n $nroAdendum = OrdenServicio::ordenAdendum(Input::get('contrato_id'));\n $nroAdendumact = $nroAdendum + 1;\n\n $presupuesto = new Presupuestos();\n $presupuesto->nro_Partida = Input::get('nro_Partida');\n $presupuesto->contrato_id = Input::get('contrato_id');\n $presupuesto->descripcion = Input::get('descripcion');\n $presupuesto->unidad = Input::get('unidad');\n $presupuesto->cantidad = Input::get('cantidad');\n $presupuesto->monto_Total = Input::get('monto_Total');\n $presupuesto->orden_Partida = $nroAdendumact;\n $presupuesto->usuario = Input::get('usuario');\n $presupuesto->precio_Unitario = Input::get('precio_Unitario');\n\n if (Input::get('capitulo_id') != \"null\") {\n $presupuesto->capitulo_id = Input::get('capitulo_id');\n }\n $presupuesto->save();\n\n $contrato = Contratos::find(Input::get('contrato_id'));\n $contrato->orden_adendum = $contrato->orden_adendum + 1;\n $contrato->save();\n\n if ($nroAdendum == -1) {\n Session::flash('message-sucess','Partida Creada Correctamente');\n return Redirect::to('/Presupuesto/'.Input::get('contrato_id'));\n }else{\n Session::flash('message-sucess','Partida Creada Correctamente');\n return Redirect::to('/Adendum/'.Input::get('contrato_id'));\n }\n }", "title": "" }, { "docid": "09baf57e08e5ac63259dd7c177f6a40e", "score": "0.47648746", "text": "public function store(ProgramaRequest $request)\n {\n if($request['respuesta'] != 'falso')\n { \n \\App\\Programa::create([\n 'nombrePrograma' => $request['nombrePrograma'],\n 'fechaElaboracionPrograma' => $request['fechaElaboracionPrograma'],\n 'ClasificacionRiesgo_idClasificacionRiesgo' => $request['ClasificacionRiesgo_idClasificacionRiesgo'],\n 'alcancePrograma' => $request['alcancePrograma'],\n 'CompaniaObjetivo_idCompaniaObjetivo' => $request['CompaniaObjetivo_idCompaniaObjetivo'],\n 'objetivoEspecificoPrograma' => $request['objetivoEspecificoPrograma'],\n 'Tercero_idElabora' => $request['Tercero_idElabora'],\n 'generalidadPrograma' => $request['generalidadPrograma'],\n 'Compania_idCompania' => \\Session::get('idCompania')\n ]); \n\n $programa = \\App\\Programa::All()->last();\n $contadorDetalle = count($request['actividadProgramaDetalle']);\n for($i = 0; $i < $contadorDetalle; $i++)\n {\n \\App\\ProgramaDetalle::create([\n 'Programa_idPrograma' => $programa->idPrograma,\n 'actividadProgramaDetalle' => $request['actividadProgramaDetalle'][$i],\n 'Tercero_idResponsable' => $request['Tercero_idResponsable'][$i],\n 'fechaPlaneadaProgramaDetalle' => $request['fechaPlaneadaProgramaDetalle'][$i],\n 'Documento_idDocumento' => $request['Documento_idDocumento'][$i],\n 'recursoPlaneadoProgramaDetalle' => $request['recursoPlaneadoProgramaDetalle'][$i],\n 'recursoEjecutadoProgramaDetalle' => $request['recursoEjecutadoProgramaDetalle'][$i],\n 'fechaEjecucionProgramaDetalle' => $request['fechaEjecucionProgramaDetalle'][$i],\n 'observacionProgramaDetalle' => $request['observacionProgramaDetalle'][$i]\n ]);\n }\n\n\n }\n\n // Guardado del dropzone para Adjuntos\n $arrayImage = $request['ProgramaArchivoArray'];\n $arrayImage = substr($arrayImage, 0, strlen($arrayImage)-1);\n $arrayImage = explode(\",\", $arrayImage);\n $ruta = '';\n for ($i=0; $i < count($arrayImage) ; $i++) \n { \n if ($arrayImage[$i] != '' || $arrayImage[$i] != 0) \n {\n $origen = public_path() . '/imagenes/repositorio/temporal/'.$arrayImage[$i];\n $destinationPath = public_path() . '/imagenes/programa/'.$arrayImage[$i];\n $ruta = '/programa/'.$arrayImage[$i];\n \n if (file_exists($origen))\n {\n copy($origen, $destinationPath);\n unlink($origen);\n } \n else\n {\n echo \"No existe el archivo\";\n }\n \\App\\ProgramaArchivo::create([\n 'Programa_idPrograma' => $programa->idPrograma,\n 'rutaProgramaArchivo' => $ruta\n ]);\n }\n\n }\n return redirect('/programa');\n }", "title": "" }, { "docid": "d8db44ac413e5343fde87e0b881e9255", "score": "0.47642937", "text": "public function persistAction()\n {\n ini_set('max_execution_time', 600);\n\n $anr = $this->get('phpk_webservice.client.anr');\n $em = $this->getDoctrine()->getManager();\n\n $organismes = $anr->findAllOrganismesBy(array('numSiret' => self::C));\n $sites = $anr->findAllSitesBy(array('numSiret' => self::C));\n $entites = $anr->findAllEntitesBy(array('numSiret' => self::C));\n $agents = $anr->findAllAgentsBy(array('numSiret' => self::C));\n\n try {\n foreach ($organismes as $organisme) {\n $anrOrganisme = new AnrOrganisme();\n\n $anrOrganisme->setIdOrganisme($organisme->getIdOrganisme());\n $anrOrganisme->setNomabrege($organisme->getNomAbrege());\n $anrOrganisme->setNomComplet($organisme->getNomComplet());\n $anrOrganisme->setCodeOrganisme($organisme->getCodeOrganisme());\n $anrOrganisme->setNumucanss($organisme->getNumUcanss());\n $anrOrganisme->setTypeorganisme($organisme->getTypeOrganisme());\n if (strlen($organisme->getSiteSiege()) > 19) {\n $anrOrganisme->setSitesiege(substr($organisme->getSiteSiege(), 2, 19));\n\n } elseif (strlen($organisme->getSiteSiege()) == 19) {\n $anrOrganisme->setSitesiege($organisme->getSiteSiege());\n } else {\n $anrOrganisme->setSitesiege(null);\n }\n\n /* l'attribut est un array dans l'anr donc ca met le bazar\n * et pour le moment il ne nous sert à rien donc on set à chaine vide\n */\n $anrOrganisme->setSitesgeographiques(\"\");\n\n if (strlen($organisme->getIdCti()) > 19) {\n $anrOrganisme->setIdcti(substr($organisme->getIdCti(), 2, 14));\n } elseif (strlen($organisme->getIdCti()) == 19) {\n $anrOrganisme->setIdcti($organisme->getIdCti());\n } else {\n $anrOrganisme->setIdcti(null);\n }\n\n $anrOrganisme->setNomcti($organisme->getNomCti());\n $anrOrganisme->setCodegdp($organisme->getCodeGDP());\n $anrOrganisme->setNomdomaine($organisme->getNomDomaine());\n $anrOrganisme->setCodecaisse($organisme->getCodeCaisse());\n $em->persist($anrOrganisme);\n $em->flush();\n }\n } catch (Exception $e) {\n $this->get('session')->getFlashBag()->add('error', self::YOUR_CUSTOM_MESSAGE);\n $message = $this->get('logger')->error($e->getTraceAsString());\n }\n\n try {\n foreach ($sites as $site) {\n $anrSite = new AnrSite();\n $anrSite->setIdsite($site->getIdSite());\n $anrSite->setNomsite($site->getNomSite());\n $anrSite->setTel($site->getTel());\n $anrSite->setAdressepostale($site->getAdressePostale());\n $anrSite->setBatiment($site->getBatiment());\n $anrSite->setBoitepostale($site->getBoitePostale());\n $anrSite->setCodepostal($site->getCodePostal());\n $anrSite->setVille($site->getVille());\n $anrSite->setIdorganisme(self::C);\n $anrSite->setNomorganisme($site->getNomOrganisme());\n $em->persist($anrSite);\n $em->flush();\n }\n } catch (Exception $e) {\n $this->get('session')->getFlashBag()->add('error', self::YOUR_CUSTOM_MESSAGE);\n $message = $this->get('logger')->error($e->getTraceAsString());\n }\n\n try {\n foreach ($entites as $entite) {\n $anrEntite = new AnrEntite();\n\n $anrEntite->setIdentite($entite->getIdEntite());\n $anrEntite->setNomentcomplet($entite->getNomEntComplet());\n $anrEntite->setNomentabrege($entite->getNomEntAbrege());\n $anrEntite->setSigleent($entite->getSigleEnt());\n $anrEntite->setDirection($entite->getDirection());\n //Parent\n if (strlen($entite->getParent()) > 19) {\n $anrEntite->setParent(substr($entite->getParent(), 2, 19));\n } elseif (strlen($entite->getParent()) == 19) {\n $anrEntite->setParent($entite->getParent());\n } else {\n $anrEntite->setParent(substr($entite->getParent(), 2, 19));\n }\n\n $anrEntite->setIdorganisme(self::C);\n $anrEntite->setNomorganisme($entite->getNomOrganisme());\n // id site\n if (is_array($entite->getIdSite([0]))) {\n $tab = $entite->getIdEntite([0]);\n $anrEntite->setIdentite(substr($tab[0], 2, 19));\n\n } elseif (strlen($entite->getIdSite()) > 19) {\n $anrEntite->setIdSite(substr($entite->getIdSite(), 2, 19));\n } elseif ((strlen($entite->getIdSite())) == 19) {\n $anrEntite->setIdSite($entite->getIdSite());\n } else {\n $anrEntite->setIdsite(null);\n }\n\n $anrEntite->setTel($entite->getTel());\n //ID RESPONSABLE\n if (strlen($entite->getIdResponsable()) > 19) {\n $anrEntite->setIdresponsable(substr($entite->getIdResponsable(), 4, 19));\n } elseif ((strlen($entite->getIdResponsable())) == 19) {\n $anrEntite->setIdResponsable($entite->getIdResponsable());\n } else {\n $anrEntite->setIdResponsable(null);\n }\n\n $anrEntite->setNomResponsable($entite->getNomResponsable());\n //CONTACT\n if (strlen($entite->getContact()) > 19) {\n $anrEntite->setContact(substr($entite->getContact(), 4, 19));\n } elseif (strlen($entite->getContact()) == 19) {\n $anrEntite->setContact($entite->getContact());\n } else {\n $anrEntite->setContact(null);\n\n }\n\n //$anrEntite->setContact(substr($entite->getContact(), 4, 19));\n $anrEntite->setNomcontact($entite->getNomContact());\n $anrEntite->setRattachement($entite->getRattachement());\n $anrEntite->setCheminphoto($entite->getCheminPhoto());\n // dump ($anrEntite);\n $em->persist($anrEntite);\n $em->flush();\n }\n } catch (Exception $e) {\n $this->get('session')->getFlashBag()->add('error', self::YOUR_CUSTOM_MESSAGE);\n $message = $this->get('logger')->error($e->getTraceAsString());\n }\n\n try {\n foreach ($agents as $agent) {\n $anrAgent = new AnrAgent();\n\n $anrAgent->setIdagent($agent->getIdAgent());\n $anrAgent->setNom($agent->getNom());\n $anrAgent->setNomcomplet($agent->getNomComplet());\n $anrAgent->setTel($agent->getTel());\n $anrAgent->setNumabrege($agent->getNumAbrege());\n $anrAgent->setEtablissement($agent->getEtablissement());\n $anrAgent->setLibelleemploi($agent->getLibelleEmploi());\n $anrAgent->setCodeemploi($agent->getCodeEmploi());\n $anrAgent->setRole($agent->getRole());\n $anrAgent->setNumemploye($agent->getNumEmploye());\n $anrAgent->setTypeemploye($agent->getTypeEmploye());\n $anrAgent->setPrenom($agent->getPrenom());\n $anrAgent->setMail($agent->getMail());\n //ID RESPONSABLE\n if (strlen($agent->getIdresponsable()) > 19) {\n $anrAgent->setIdresponsable(substr($agent->getIdResponsable(), 4, 19));\n } elseif ((strlen($agent->getIdresponsable())) == 19) {\n $anrAgent->setIdresponsable($agent->getIdResponsable());\n } else {\n $anrAgent->setIdresponsable(null);\n }\n\n $anrAgent->setNomresponsable($agent->getNomResponsable());\n $anrAgent->setMobile($agent->getMobile());\n $anrAgent->setCodeorganisme($agent->getCodeOrganisme());\n $anrAgent->setCodecaisse($agent->getCodeCaisse());\n $anrAgent->setNomorganisme($agent->getNomOrganisme());\n //CONTACT\n if (strlen($agent->getContact()) > 19) {\n $anrAgent->setContact(substr($agent->getContact(), 4, 19));\n\n } elseif ((strlen($agent->getContact())) == 19) {\n $anrAgent->setContact($agent->getContact());\n } else {\n $anrAgent->setContact(null);\n }\n //->setContact(substr($agent->getContact(), 4, 19));\n $anrAgent->setCivilite($agent->getCivilite());\n // parfois la FK n'est pas renseigné\n // dans ce cas on set à null\n if (strlen($agent->getIdSite()) > 19) {\n $anrAgent->setIdsite(substr($agent->getIdSite(), 2, 19));\n //$anrAgent->setIdsite(null);\n } elseif ((strlen($agent->getIdSite()) == 19)) {\n $anrAgent->setIdsite($agent->getIdSite());\n } else {\n $anrAgent->setIdsite(null);\n }\n\n $anrAgent->setNomsite($agent->getNomSite());\n /* Dans certaines rares exceptions, un agent est rattaché à plusieurs entités\n * Dans ce cas c'est un array en attribut Identite\n * du coup on teste si c'est le cas et si oui on prend identite du premier indice du tableau\n */\n if (is_array($agent->getIdEntite([0]))) {\n $tab = $agent->getIdEntite([0]);\n $anrAgent->setIdentite(substr($tab[0], 2, 19));\n // $anrAgent->setIdentite(null);\n } else if (strlen($agent->getIdEntite()) > 19) {\n $anrAgent->setIdentite(substr($agent->getIdEntite(), 2, 19));\n // $anrAgent->setIdentite(null);\n } else if (strlen($agent->getIdEntite()) == 19) {\n $anrAgent->setIdentite($agent->getIdEntite());\n }\n // parfois la FK n'est pas renseigné\n // dans ce cas on set à null\n else {\n $anrAgent->setIdentite(null);\n }\n\n /* Dans certaines rares exceptions, un agent est rattaché à plusieurs entités\n * Dans ce cas c'est un array en attribut NomEntite\n * du coup on teste si c'est le cas et si oui on prend NomEntite du premier indice du tableau\n */\n if (is_array($agent->getNomEntite())) {\n $tab = $agent->getNomEntite();\n $anrAgent->setNomentite($tab[0]);\n } else {\n $anrAgent->setNomentite($agent->getNomEntite());\n }\n\n $anrAgent->setNomentabrege($agent->getNomEntAbrege());\n\n /* Dans certaines rares exceptions, un agent est rattaché à plusieurs entités\n * Dans ce cas c'est un array en attribut SigleEnt\n * du coup on teste si c'est le cas et si oui on prend SigleEnt du premier indice du tableau\n */\n if (is_array($agent->getSigleEnt())) {\n $tab = $agent->getSigleEnt();\n $anrAgent->setSigleent($tab[0]);\n } else {\n $anrAgent->setSigleent($agent->getSigleEnt());\n }\n\n\n $anrAgent->setListerouge($agent->getListeRouge());\n $anrAgent->setTypeagent($agent->getTypeAgent());\n $anrAgent->setFinvaliditeentree($agent->getFinValiditeEntree());\n $anrAgent->setAbslongueduree($agent->getAbsLongueDuree());\n $anrAgent->setEntreeinvalidee($agent->getEntreeInvalidee());\n $anrAgent->setIdorganisme(self::C);\n $anrAgent->setTypeorganisme($agent->getTypeOrganisme());\n $anrAgent->setListerougephoto($agent->getListeRougePhoto());\n $anrAgent->setListeorange($agent->getListeOrange());\n $anrAgent->setListejaune($agent->getListeJaune());\n $anrAgent->setParking($agent->getParking());\n $anrAgent->setPublication($agent->getPublication());\n //dump ($anrAgent);\n $em->persist($anrAgent);\n $em->flush();\n }\n } catch (Exception $e) {\n $this->get('session')->getFlashBag()->add('error', self::YOUR_CUSTOM_MESSAGE);\n $message = $this->get('logger')->error($e->getTraceAsString());\n }\n\n return $this->render('AppBundle:Default:persist.html.twig');\n }", "title": "" }, { "docid": "0fd9f1fcdd0ffcdae90b8a9a1fdacde5", "score": "0.47608894", "text": "public function initialize()\n {\n $this->hasMany('puntaje_id', 'Personal', 'personal_puntajeAdministrativoId', array('alias' => 'Personal'));\n $this->hasMany('puntaje_id', 'Personal', 'personal_puntajeMucamaId', array('alias' => 'Personal'));\n $this->hasMany('puntaje_id', 'Recepcion', 'recepcion_puntajeTratoId', array('alias' => 'Recepcion'));\n $this->hasMany('puntaje_id', 'Recepcion', 'recepcion_puntajeNivelId', array('alias' => 'Recepcion'));\n $this->hasMany('puntaje_id', 'Recepcion', 'recepcion_puntajeTiempoId', array('alias' => 'Recepcion'));\n $this->hasMany('puntaje_id', 'Unidad', 'unidad_puntajeConfortId', array('alias' => 'Unidad'));\n $this->hasMany('puntaje_id', 'Unidad', 'unidad_puntajeHigieneId', array('alias' => 'Unidad'));\n $this->hasMany('puntaje_id', 'Unidad', 'unidad_puntajeEquipoId', array('alias' => 'Unidad'));\n }", "title": "" }, { "docid": "50dd01e2c7972ecea383f1fb9e90d3d5", "score": "0.4749239", "text": "public function insertarPedido() {\n\n $sql = DB::select('SELECT COUNT(Id)+1 as max_id FROM pedido');\n\n $max_id = $sql[0]->max_id;\n\n $insertar = new pedido();\n\n $insertar->Id = $max_id;\n $insertar->id_usuario = session(\"id\");\n $insertar->precio_total = Cart::getTotal();\n $insertar->fecha_pedido = date(\"d-m-Y\");\n $insertar->domicilio = \"Calle inventada\";\n $insertar->estado = \"PP\";\n\n $insertar->save();\n\n \n \n \n $items = Cart::getContent();\n\n foreach($items as $values) {\n\n $sql = DB::select('SELECT COUNT(Id)+1 as max_id FROM ventas');\n\n $max_id2 = $sql[0]->max_id;\n\n $data = array('Id' => $max_id2, 'pedido_id' => $max_id, 'id_producto' => $values->id,\n 'precio' => $values->price, 'cantidad' => $values->quantity);\n\n ventas::insert($data); \n } \n\n\n \n }", "title": "" }, { "docid": "e5e9e760e06916b2e16f33ce4442ac93", "score": "0.47472146", "text": "public function store(IncorporarPrestamoRequest $request)\n {\n Prestamo::create($request->all());\n $prestamo = Prestamo::obtenerUltimoPrestamoIngresado();\n if($prestamo->getoriginal('forma_pago_id') === 1){\n Prestamo::agregarCuotasPrestamo($prestamo);\n }\n $registro = new RegistroContable;\n $registro->fecha = $prestamo->getOriginal('fecha_solicitud');\n $registro->numero_registro = $prestamo->numero_egreso;\n $registro->cheque = $prestamo->cheque;\n $registro->monto = $prestamo->getOriginal('monto');\n $registro->concepto_id = Concepto::obtenerConceptoPorNombreUnico('Préstamo')->id;\n $registro->detalle = null;\n $registro->tipo_registro_contable_id = 1;\n $registro->cuenta_id = 2;\n $registro->asociado_id = null;\n $registro->usuario_id = Auth::user()->id;\n $registro->socio_id = $prestamo->socio_id;\n $registro->save();\n\n session(['mensaje' => 'Préstamo agregado con éxito.']);\n\n LogSistema::registrarAccion('Préstamo agragado: '.convertirArrayAString($prestamo->toArray()));\n\n $prestamos = Prestamo::orderBy('fecha_solicitud','DESC')->paginate(15);\n $formas_pago = FormaPago::orderBy('nombre', 'ASC')->get();\n $total_consulta = $prestamos->total();\n return view('sind1.prestamos.index', compact('prestamos','formas_pago','total_consulta'));\n //return redirect()->route('prestamos.index', compact('prestamos','formas_pago','total_consulta'));\n }", "title": "" }, { "docid": "f82cbd6eb12ff48db88a52f7c9aa425f", "score": "0.47462487", "text": "public function initialize()\n {\n $this->hasMany('cd_servico', 'App\\Models\\FechamentoPeriodoServico', 'cd_servico', array('alias' => 'FechamentoPeriodoServico'));\n $this->hasMany('cd_servico', 'App\\Models\\NfentradaItem', 'cd_servico', array('alias' => 'NfentradaItem'));\n $this->hasMany('cd_servico', 'App\\Models\\FechamentoPeriodoServico', 'cd_servico', NULL);\n $this->hasMany('cd_servico', 'App\\Models\\NfentradaItem', 'cd_servico', NULL);\n }", "title": "" }, { "docid": "e8a171b31ff61d78e2a774fb6bc0279f", "score": "0.47368002", "text": "public function actionCreate()\n {\n $model = new Acervo();\n\n $aquisicao = new Aquisicao();\n\n $pessoa = new Pessoa();\n\n $pessoaFisica = new PessoaFisica();\n\n $pessoaJuridica = new PessoaJuridica();\n\n $mensagem = \"\";\n\n\n if ((Yii::$app->request->post()) && $aquisicao->load(Yii::$app->request->post())) {\n\n\n\n $catalogarAcervoExistente = Yii::$app->request->post()['Acervo']['catalogarAcervoExistente'];\n\n $post = Yii::$app->request->post();\n\n $codigoExamplares = [];\n\n $mensagemSucesso =\n \"Acervo catalogado com sucesso. Os códigos dos exemplares desse acervo são: \";\n\n if ($catalogarAcervoExistente) {\n $aquisicao->quantidade = intval($post['Acervo']['codigoFim']) - intval($post['Acervo']['codigoInicio']);\n } else {\n $aquisicao->quantidade = $post['Acervo']['quantidadeExemplar'];\n }\n\n $aquisicao->preco = $post['Aquisicao']['preco'];\n\n\n\n //Inicia a transação:\n $transaction = \\Yii::$app->db->beginTransaction();\n try {\n\n if ($aquisicao->save(false)) {\n\n $model->load(Yii::$app->request->post());\n\n $model->aquisicao_idaquisicao = $aquisicao->idaquisicao;\n\n if ($model->save()) {\n if ($catalogarAcervoExistente) {\n\n $codigoInicio = Yii::$app->request->post()['Acervo']['codigoInicio'];\n\n $codigoFim = Yii::$app->request->post()['Acervo']['codigoFim'];\n\n if ($codigoInicio > 0 && $codigoFim > 0) {\n\n $count = 0;\n\n $i = $codigoInicio;\n\n while ($count <= ($codigoFim - $codigoInicio)) {\n\n $codigo = $i;\n\n if (!AcervoExemplar::verificaCodigoLivroExiste($codigo)) {\n\n $exemplar = new AcervoExemplar();\n\n $exemplar->esta_disponivel = 1;\n\n $exemplar->acervo_idacervo = $model->idacervo;\n\n $exemplar->codigo_livro = $codigo;\n\n $exemplar->save(false);\n\n array_push($codigoExamplares, $exemplar->codigo_livro);\n\n if ($count == ($codigoFim - $codigoInicio)) {\n\n $transaction->commit();\n\n $mensagemSucesso .= (implode(\", \", $codigoExamplares));\n\n Yii::$app->session->setFlash('mensagem', $mensagemSucesso);\n\n return $this->redirect('create');\n }\n $i++;\n\n $count++;\n\n } else {\n\n $i++;\n\n }\n\n }\n\n }\n } else {\n\n $quantidadeExemplares = Yii::$app->request->post()['Acervo']['quantidadeExemplar'];\n if ($quantidadeExemplares > 0) {\n\n $count = 1;\n\n $i = 1;\n\n while ($count <= $quantidadeExemplares) {\n\n $codigo = $model->idacervo . '' . $i;\n\n if (!AcervoExemplar::verificaCodigoLivroExiste($codigo)) {\n\n $exemplar = new AcervoExemplar();\n\n $exemplar->esta_disponivel = 1;\n\n $exemplar->acervo_idacervo = $model->idacervo;\n\n $exemplar->codigo_livro = $model->idacervo . '' . $i;\n\n $exemplar->save(false);\n\n array_push($codigoExamplares, $exemplar->codigo_livro);\n\n if ($count == $quantidadeExemplares) {\n\n $transaction->commit();\n\n $mensagemSucesso .= (implode(\", \", $codigoExamplares));\n\n Yii::$app->session->setFlash('mensagem', $mensagemSucesso);\n\n return $this->redirect('create');\n }\n\n $i++;\n\n $count++;\n\n } else {\n\n $i++;\n }\n\n }\n }\n }\n }\n }\n\n } catch (\\Exception $exception) {\n $transaction->rollBack();\n\n Yii::$app->session->setFlash('mensagem', \"Ocorreu uma falha inesperada ao tentar \n catalogar o Acervo\");\n\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'aquisicao' => $aquisicao,\n 'pessoa' => $pessoa,\n 'pessoaFisica' => $pessoaFisica,\n 'pessoaJuridica' => $pessoaJuridica,\n 'tiposPessoa' => $this->tiposPessoa,\n ]);\n }\n }", "title": "" }, { "docid": "c5380fb2a080e2213c3ad62060d6f57f", "score": "0.4733582", "text": "public function actionCreate()\n {\n $model = new ItemJournal();\n\n if ($model->load(Yii::$app->request->post())) {\n\n $model->PostingDate = $model->PostingDate.' '.date('H:i:s');\n $model->user_id = Yii::$app->user->identity->id;\n $model->comp_id = Yii::$app->session->get('Rules')['comp_id'];\n $UpdateSeries = Generater::CreateNextNumber('item_journal',$model->TypeOfDocument,$model->AdjustType,$model->DocumentNo);\n\n if($model->save(false))\n {\n\n if(isset($_POST['ItemJournalLine'])){\n $lines = self::loadLine($_POST['ItemJournalLine']); \n \n foreach ($lines as $key => $line) {\n\n $AdjLine = ItemJournalLine::findOne(['id' => $line->id]);\n\n $AdjLine->source_id = $model->id;\n $AdjLine->DocumentNo = $model->DocumentNo; \n $AdjLine->SourceDoc = $model->id;\n $AdjLine->SourceDocNo = $model->DocumentNo;\n $AdjLine->unit_price = $line->data->unit_price;\n\n //$Quantity = ($model->AdjustType=='-')? abs($line->data->Quantity) * -1 : abs($line->data->Quantity);\n $Quantity = $line->data->Quantity;\n \n $AdjLine->Quantity = $Quantity;\n $AdjLine->QtyToMove = abs($Quantity);\n $AdjLine->QtyMoved = 0;\n $AdjLine->QtyOutstanding = abs($Quantity);\n $AdjLine->TypeOfDocument = $model->TypeOfDocument;\n $AdjLine->location = ($line->data->location)? $line->data->location : $AdjLine->validateLocations();\n $AdjLine->unit_of_measure = $line->data->unit_of_measure;\n\n $AdjLine->qty_per_unit = $AdjLine->qtyperunit;\n\n if($AdjLine->location=='Nil'){ \n Yii::$app->session->setFlash('error', Yii::t('common','Please create location code.'));\n return $this->redirect(['/location/location']);\n exit();\n }\n\n if($AdjLine->save())\n { \n Yii::$app->getSession()->addFlash('success','<i class=\"far fa-save\"></i> '.Yii::t('common','Saved')); \n }else{\n Yii::$app->getSession()->addFlash('warning',json_encode($AdjLine->getErrors(),JSON_UNESCAPED_UNICODE)); \n }\n }\n\n \n }\n\n\n \n //return $this->redirect(['index']);\n return $this->redirect(['update', 'id' => $model->id]);\n\n }else {\n\n Yii::$app->getSession()->addFlash('warning',json_encode($model->getErrors(),JSON_UNESCAPED_UNICODE)); \n \n\n }\n\n\n } \n // Init\n $model->AdjustType = '-';\n $model->TypeOfDocument = 'Adjust';\n if($model->isNewRecord) $model->id = 0; \n if($model->DocumentDate=='')$model->DocumentDate = date('Y-m-d');\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "adfc5853fa8f6e52ccd5b3ce0f960878", "score": "0.47324818", "text": "public function analizarPeticion(){\n\t\t$peticion = $this->request->getUriArray();\n\t\t$numeroMiembros = count($peticion);\n\t\t$this->setPeticion($numeroMiembros,$peticion);\n\t}", "title": "" }, { "docid": "c515b37ef51db3147a0a0a7088ef04e3", "score": "0.4731999", "text": "public function persist(DiaTrabalhoModel $oDiaTrabalho) {\n\n $oDaoPontoEletronicoData = new \\cl_pontoeletronicoarquivodata();\n $sWherePontoEletronicoData = \" rh197_data = '{$oDiaTrabalho->getData()->getDate()}'\";\n $sWherePontoEletronicoData .= \" AND rh197_matricula = {$oDiaTrabalho->getServidor()->getMatricula()}\";\n $sSqlPontoEletronicoData = $oDaoPontoEletronicoData->sql_query_file(\n null,\n '*',\n null,\n $sWherePontoEletronicoData\n );\n\n $rsPontoEletronicoData = db_query($sSqlPontoEletronicoData);\n\n if(!$rsPontoEletronicoData) {\n throw new \\DBException('Erro ao buscar as informações do ponto no dia.');\n }\n\n $oDadosRetorno = new \\stdClass();\n $oDadosRetorno->rh197_pontoeletronicoarquivo = $oDiaTrabalho->getCodigoArquivo();\n $oDadosRetorno->rh197_data = $oDiaTrabalho->getData()->getDate();\n $oDadosRetorno->rh197_matricula = $oDiaTrabalho->getServidor()->getMatricula();\n $oDadosRetorno->rh197_pis = $oDiaTrabalho->getServidor()->getDocumentos()->sPIS;\n $oDadosRetorno->rh197_sequencial = null;\n\n if(pg_num_rows($rsPontoEletronicoData) > 0) {\n $oDadosRetorno = \\db_utils::fieldsMemory($rsPontoEletronicoData, 0);\n }\n\n $sAcao = empty($oDadosRetorno->rh197_sequencial) ? 'incluir' : 'alterar';\n\n $oDaoPontoEletronicoData->rh197_pontoeletronicoarquivo = $oDadosRetorno->rh197_pontoeletronicoarquivo;\n $oDaoPontoEletronicoData->rh197_data = $oDadosRetorno->rh197_data;\n $oDaoPontoEletronicoData->rh197_matricula = $oDadosRetorno->rh197_matricula;\n $oDaoPontoEletronicoData->rh197_pis = $oDadosRetorno->rh197_pis;\n $oDaoPontoEletronicoData->rh197_horas_trabalhadas = $oDiaTrabalho->getHorasTrabalho();\n $oDaoPontoEletronicoData->rh197_horas_falta = $oDiaTrabalho->getHorasFalta();\n $oDaoPontoEletronicoData->rh197_horas_extras_50_d = $oDiaTrabalho->getHorasExtra50();\n $oDaoPontoEletronicoData->rh197_horas_extras_75_d = $oDiaTrabalho->getHorasExtra75();\n $oDaoPontoEletronicoData->rh197_horas_extras_100_d = $oDiaTrabalho->getHorasExtra100();\n $oDaoPontoEletronicoData->rh197_horas_extras_50_n = $oDiaTrabalho->getHorasExtra50Noturna();\n $oDaoPontoEletronicoData->rh197_horas_extras_75_n = $oDiaTrabalho->getHorasExtra75Noturna();\n $oDaoPontoEletronicoData->rh197_horas_extras_100_n = $oDiaTrabalho->getHorasExtra100Noturna();\n $oDaoPontoEletronicoData->rh197_horas_adicinal_noturno = $oDiaTrabalho->getHorasAdicionalNoturno();\n $oDaoPontoEletronicoData->rh197_sequencial = $oDadosRetorno->rh197_sequencial;\n $oDaoPontoEletronicoData->rh197_afastamento = \"null\";\n if ($oDiaTrabalho->getAfastamento() != '') {\n $oDaoPontoEletronicoData->rh197_afastamento = $oDiaTrabalho->getAfastamento()->getCodigo();\n }\n $oDaoPontoEletronicoData->{$sAcao}($oDadosRetorno->rh197_sequencial);\n\n if($oDaoPontoEletronicoData->erro_status == '0') {\n throw new \\DBException($oDaoPontoEletronicoData->erro_msg);\n }\n }", "title": "" }, { "docid": "e8d02a7c477dae0abb74e96965f76519", "score": "0.4731911", "text": "public function store(Request $request)\n {\n\n // Récupération des opérations sélectionnées\n $tabops = $request->input('operations');\n //dd($tabops);\n if($tabops){\n $id_une_op = $tabops[0];\n $idprog = Operation::find($id_une_op)->program_id;\n $prog = Program::find($idprog);\n //dd( $request->input('date_creation'));\n $listops = $prog->operations()->get();\n\n $validator = Validator::make($request->all(), [\n 'numero' => 'required|unique:ordres|max:255',\n 'date_creation' => 'date_format:\"Y-m-d\"',\n ]);\n\n if ($validator->fails()) {\n Flashy::error('Une erreur s\\'est produite, veuillez réessayer !!!');\n return back()\n //return view('pagesGT.Ordre.createOrdre',compact('listops'))\n ->withErrors($validator);\n }\n\n //création de l'ordre\n $ordre = new Ordre();\n $ordre->numero = $request->numero;\n $ordre->description = $request->description;\n $ordre->date_creation = $request->date_creation;\n $ordre->statut = 'En Attente';\n $ordre->save();\n\n //création des cartes de travail\n foreach ($tabops as $ops) {\n $numCarte = 'Carte '. $ordre->numero.$ops;\n $ordre->operations()->attach($ops, array('numero' => $numCarte),$ordre->id);\n }\n Flashy::success('Ordre de travail créé avec succès !!!');\n return redirect( route('Ordres.index'));\n }\n else{\n Flashy::error('Vous devez sélectionner au moins une opération !!!');\n return back();\n }\n }", "title": "" }, { "docid": "980196c6abe753dea4b09005603f464a", "score": "0.47274098", "text": "public function aceptarMovPendientesAction(\\Symfony\\Component\\HttpFoundation\\Request $request){\n $em = $this->getDoctrine()->getEntityManager();\n $user=$this->get('security.token_storage')->getToken()->getUser();\n\n $repo =$em->getRepository('GSPEM\\GSPEMBundle\\Entity\\MovStockTec');\n $repoItemsMov =$em->getRepository('GSPEM\\GSPEMBundle\\Entity\\StockItemsMov');\n $repoStockTec =$em->getRepository('GSPEM\\GSPEMBundle\\Entity\\StockTecnico');\n $repoStockMestro =$em->getRepository('GSPEM\\GSPEMBundle\\Entity\\StockMaestro');\n\n $data=json_decode($request->getContent(),true);\n\n $movimiento = $repo->findOneBy(array(\"id\"=>$data['id']));\n\n\n if($data['items_rejected']!=\"\" && count($data['items_rejected']>0)){\n\n\n // seteo estodo 3 , aceptado pero con algnunos rechazos\n $movimiento->setState(3);\n $movimiento->setNota($data['nota']);\n //asigno rechazados\n\n\n\n $itemsRejected=[];\n foreach ($data[\"items_rejected\"] as $item){\n\n //seteo al movimiento los rechazos\n $itemMov=$repoItemsMov->findOneBy(array(\"id\"=>($item['id_item'])));\n $itemMov->setRechazado($item['cantrechazo']);\n $itemsRejected[]=array(\"id\"=>$itemMov->getMaterial(),\"stock\"=>$item['cantrechazo']);\n $itemMov->setStatus(0);\n $em->flush();\n /*if ($movimiento->getType()==1){\n //devuevlo al maestro los rechazados por el tecnico\n $itemStockTec=$repoStockMestro->findOneBy(array(\"material\"=>$item['id'],));\n if ($itemStockTec!=\"\"){\n $itemStockTec->setCant($itemStockTec->getCant()+(int) $item['cantrechazo']);\n }\n $em->flush();\n }else{\n //devuelvo al tecnio de origen los parcialmente rechazados\n $itmeStockTec=$repoStockTec->findOneBy(array(\"material\"=>$item['id'],\"tecnico\"=>$movimiento->getOrigen()));\n if ($itmeStockTec!=\"\"){\n $itmeStockTec->setCant($itmeStockTec->getCant()+(int)$item['cantrechazo']);\n }\n $em->flush();\n }*/\n }\n // envio mail con los rechazados ...............\n $repoUsers =$em->getRepository('GSPEM\\GSPEMBundle\\Entity\\User');\n $userOrigen=$repoUsers->findOneBy(array(\"id\"=>$movimiento->getOrigen()));\n $this->sendMailMovs(\"Stock Rechazado de - \".$user->getLastName().' - '.$user->getFirstName(),$userOrigen->getMail(),new \\DateTime(),$itemsRejected,true,$data['nota']);\n //----------------------------------------------\n\n }else{\n $movimiento->setState(1);\n }\n\n\n\n\n $movimiento->setFin(new \\DateTime());\n $em->flush();\n\n // recorro los items de ese movimiento y los paso al stock de usuario\n\n $itmesMov=$repoItemsMov->findBy(array(\"mov\"=>$data['id']));\n\n foreach ($itmesMov as $movitem){\n $itemStockTec=$repoStockTec->findOneBy(array(\"tecnico\"=>$movimiento->getTecnico(),\"material\"=>$movitem->getMaterial()));\n if ($itemStockTec!=\"\"){\n if($movitem->getRechazado()>0){\n $itemStockTec->setCant($itemStockTec->getCant()+ ($movitem->getCant()-$movitem->getRechazado()));\n }else{\n $itemStockTec->setCant($itemStockTec->getCant()+$movitem->getCant());\n }\n\n }else{\n $itmeTecNew= new StockTecnico();\n if($movitem->getRechazado()>0) {\n $itmeTecNew->setCant($itmeTecNew->getCant() + ($movitem->getCant() - $movitem->getRechazado()));\n }else {\n $itmeTecNew->setCant($movitem->getCant());\n }\n $itmeTecNew->setTecnico($movimiento->getTecnico());\n $itmeTecNew->setMaterial($movitem->getMaterial());\n $em->persist($itmeTecNew);\n }\n $em->flush();\n }\n\n $encoders = array(new XmlEncoder(), new JsonEncoder());\n $normalizers = array(new ObjectNormalizer());\n\n $serializer = new Serializer($normalizers, $encoders);\n return new Response($serializer->serialize(array(\"process\"=>true),\"json\"),200,array('Content-Type'=>'application/json'));\n }", "title": "" }, { "docid": "e8b331886bfa8f7e5bd3df1f935616da", "score": "0.47267708", "text": "public function insert( $o )\n\t{\n\t\t$newId = parent::insert( $o);\n\t\t$o->IdProcessGroup = $newId;\n\n\t\t$o->setAllProcessModuleParent();\n\t\t$adapter = $this->getAdapter(\"process\");\n\t\t$adapter->connection = $this->connection;\n\t\t$adapter->config = $this->config;\n\t\tforeach($o->ProcessModules as $key => $oProcessModule)\n\t\t{\n\t\t\t$adapter->insert( $oProcessModule);\n\t\t}\n\n\t}", "title": "" }, { "docid": "78b0afac6dac00e7981840caa23002ac", "score": "0.47244266", "text": "public function ajouterSerieAction(){\n\t\t$em = $this->getDoctrine()->getManager();\n\n\t\t// Instensie un nouveau livre \n\t\t$newNomSerie = new NomSerie();\n\t\t\n\t\t$form = $this->createForm(new NomSerieType(), $newNomSerie);\n\t\t//Recupere les series pour les mettre dans le menu select\n\t\t\t$request=$this->getRequest();\n \tif ('POST' === $request->getMethod()){\n \t\t// Recupere les donnée du formulaire \n \t\t$nomSerie=$this->getRequest()->request->get('nomSerie');\n\t \t$auteur=$this->getRequest()->request->get('auteur');\n\t \t$description=$this->getRequest()->request->get('description');\n\t\t\t\t\t\n\n\t\t\t\t\t// Attribe les données\n\t \t\t$form->bind($request);\n\t\t\t\t\t$newNomSerie=$form->getData();\n\t\t\t\t\t$newNomSerie->upload();\n\t\t\t\t\t\n\t\t\t\t\t$newNomSerie->setNomSerie($nomSerie);\n\t\t\t\t\t$newNomSerie->setAuteur($auteur);\n\t\t\t\t\t$newNomSerie->setDescription($description);\n\t\t\t\t\t$newNomSerie->setIsFinish(0);\n\t\t\t\t\t\n\t\t\t\t\t// Persiste et envoie en BDD\n\t\t\t\t\t$em->persist($newNomSerie);\n\t\t\t\t\t$em->flush();\n\n\t \t// Redirige vers la page detail de la serie \n\t \treturn $this->redirect($this->generateUrl('gestionBibliotheque'));\n\t \n \t}\n \t\n\n \t// Affiche le formulaire \n return $this->render(\"ManblioLivreBundle:Form:ajouterSerie.html.twig\", array(\n \t\t'form' => $form->createView(),\n \t));\n\t}", "title": "" }, { "docid": "e795952d5b5a3e402fb0ba4a07a351fb", "score": "0.47221485", "text": "public function pacientes()\n {\n return $this->hasMany('App\\Paciente','id_particular');\n }", "title": "" }, { "docid": "1d71e69da80cabf279e386405e09fc56", "score": "0.47147778", "text": "public function removerAnexoProcesso($numero_processo, $anexo) {\n try {\n\n /* Inicar transacao */\n Controlador::getInstance()->getConnection()->connection->beginTransaction();\n\n /* Verificar se o documento ja esta anexado ou apenso à outro documento */\n $stmt = Controlador::getInstance()->getConnection()->connection->prepare(\"SELECT PV.ID AS ID_VINCULACAO,PV.ID_HISTORICO_TRAMITE_PAI,PV.ID_HISTORICO_TRAMITE_FILHO\n FROM TB_PROCESSOS_VINCULACAO PV \n WHERE PV.ID_PROCESSO_PAI = ? AND PV.ID_PROCESSO_FILHO = ?\n AND ID_VINCULACAO = 1\n AND FG_ATIVO = 1 LIMIT 1\");\n $stmt->bindParam(1, DaoProcesso::getProcesso($numero_processo, 'id'), PDO::PARAM_INT);\n $stmt->bindParam(2, DaoProcesso::getProcesso($anexo, 'id'), PDO::PARAM_INT);\n $stmt->execute();\n\n $historicos = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\n if ($historicos['ID_VINCULACAO']) {\n $sttt = Controlador::getInstance()->getConnection()->connection->prepare(\"UPDATE TB_PROCESSOS_VINCULACAO SET FG_ATIVO = 0 WHERE ID = ?\");\n $sttt->bindParam(1, $historicos['ID_VINCULACAO'], PDO::PARAM_INT);\n $sttt->execute();\n }\n\n if ($historicos['ID_HISTORICO_TRAMITE_PAI']) {\n $stmp = Controlador::getInstance()->getConnection()->connection->prepare(\"UPDATE TB_HISTORICO_TRAMITE_PROCESSOS SET ST_ATIVO = 0 WHERE ID = ?\");\n $stmp->bindParam(1, $historicos['ID_HISTORICO_TRAMITE_PAI'], PDO::PARAM_INT);\n $stmp->execute();\n }\n\n if ($historicos['ID_HISTORICO_TRAMITE_FILHO']) {\n $stmf = Controlador::getInstance()->getConnection()->connection->prepare(\"UPDATE TB_HISTORICO_TRAMITE_PROCESSOS SET ST_ATIVO = 0 WHERE ID = ?\");\n $stmf->bindParam(1, $historicos['ID_HISTORICO_TRAMITE_FILHO'], PDO::PARAM_INT);\n $stmf->execute();\n }\n\n /* Comitar */\n Controlador::getInstance()->getConnection()->connection->commit();\n\n return new Output(array('success' => 'true', 'message' => \"Processo desanexado com sucesso!\"));\n } catch (PDOException $e) {\n Controlador::getInstance()->getConnection()->connection->rollback();\n return new Output(array('success' => 'false', 'error' => $e->getMessage()));\n }\n }", "title": "" }, { "docid": "4cd0051d6fb6961798abadc44ab82b6a", "score": "0.471205", "text": "public function store()\r\n {\r\n // store the object itself\r\n parent::store();\r\n \r\n /* // delete the related MusicaDisco objects\r\n $criteria = new TCriteria;\r\n $criteria->add(new TFilter('muscodigo', '=', $this->id));\r\n $repository = new TRepository('MusicaDisco');\r\n $repository->delete($criteria);\r\n // store the related MusicaDisco objects\r\n if ($this->discos)\r\n {\r\n foreach ($this->discos as $disco)\r\n {\r\n $musica_disco = new MusicaDisco;\r\n $musica_disco->disco_id = $disco->id;\r\n $musica_disco->musica_id = $this->id;\r\n $musica_disco->store();\r\n }\r\n }*/\r\n }", "title": "" }, { "docid": "62ba1cb57b696cbd3a911ecef7a42469", "score": "0.47089753", "text": "public function pedProds()\n {\n return $this->hasMany(Pedidos_produto::class, 'Pedidos_idPedidos', 'id');\n }", "title": "" }, { "docid": "5a6554f5173be2baabe6b73fb0763202", "score": "0.47086957", "text": "public function savePreventivo(Preventivo $p){\n //Per salvare il preventivo devo:\n //1. salvare il preventivo nel database e ottenere l'id\n //2. salvare tutti gli infissi con l'id del preventivo\n \n //$p = $this->convertToPreventivo($pArray);\n \n $idPreventivo = $this->pDAO->savePreventivo($p);\n \n \n if($idPreventivo == false){\n return false;\n }\n //dormo un secondo per dare tempo al db di ricevere risposta\n //sleep(1);\n foreach($p->getInfissi() as $item){\n //il parametro $array è composto da un vettore di oggetti infisso\n $i = new Infisso();\n $i = $item;\n \n $i->setIdPreventivo($idPreventivo);\n \n $idInfisso = $this->iDAO->saveInfisso($i);\n if($idInfisso == false){\n return false;\n }\n //sleep(1);\n \n foreach($i->getMaggiorazioni() as $m){\n if(!$this->imDAO->saveInfissoMaggiorazione($idInfisso, $m)){\n return false;\n }\n }\n } \n \n return $idPreventivo;\n }", "title": "" }, { "docid": "35304abb409b57332d566c7742abc8a7", "score": "0.47086096", "text": "public function addJ817tProcesoSti(J817tProcesoSti $l)\n\t{\n\t\tif ($this->collJ817tProcesoStis === null) {\n\t\t\t$this->initJ817tProcesoStis();\n\t\t}\n\t\tif (!in_array($l, $this->collJ817tProcesoStis, true)) { // only add it if the **same** object is not already associated\n\t\t\tarray_push($this->collJ817tProcesoStis, $l);\n\t\t\t$l->setC801tTransaccion($this);\n\t\t}\n\t}", "title": "" }, { "docid": "9208b9f65bc40df6fec55be4b294c382", "score": "0.47031298", "text": "public function asociarSeguimiento($iSeguimientoId, $oEntrevista)\r\n {\r\n try{\r\n $db = $this->conn;\r\n $db->begin_transaction();\r\n\r\n //creo la relacion entre entrevista y seguimiento\r\n $sSQL = \" INSERT INTO seguimiento_x_entrevista SET \".\r\n \" entrevistas_id = \".$this->escInt($oEntrevista->getId()).\", \".\r\n \" seguimientos_id = \".$this->escInt($iSeguimientoId);\r\n\r\n $db->execSQL($sSQL);\r\n\r\n //asocio las preguntas abiertas al seguimiento (sin respuestas)\r\n $aPreguntas = $oEntrevista->getPreguntas();\r\n $sSQL = \"INSERT INTO pregunta_x_seguimiento (preguntas_id, respuesta, seguimientos_id) VALUES \";\r\n\r\n $bEntro = false;\r\n if(count($aPreguntas) > 0){\r\n foreach($aPreguntas as $oPregunta){\r\n if($oPregunta->isPreguntaAbierta()){\r\n $bEntro = true;\r\n $sSQL .= \" (\".$this->escInt($oPregunta->getId()).\", null, \".$this->escInt($iSeguimientoId).\"),\";\r\n }\r\n }\r\n }\r\n\r\n if($bEntro){\r\n $sSQL = substr($sSQL, 0, -1);\r\n $db->execSQL($sSQL);\r\n }\r\n\r\n $db->commit();\r\n\r\n return true;\r\n }catch(Exception $e){\r\n throw new Exception($e->getMessage(), 0);\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "a2438253859126ecc0be1462ef1649fd", "score": "0.47006008", "text": "public function programas()\n {\n return $this->belongsToMany('App\\Models\\Programa')->orderBy('fecha');\n }", "title": "" }, { "docid": "80946e8dbbabc8db0a0a856a5d3b4609", "score": "0.46923432", "text": "public function actionCreate()\n {\n //VERIFICA SE O COLABORADOR FAZ PARTE DA EQUIPE DE COMPRAS (GMA)\n $session = Yii::$app->session;\n if($session['sess_codunidade'] != 6){\n return $this->AccessoAdministrador();\n }\n\n $model = new ProcessoLicitatorio();\n\n $ano = Ano::find()->where(['an_status' => 1])->orderBy('an_ano')->all();\n $ramo = Ramo::find()->where(['ram_status' => 1])->orderBy('ram_descricao')->all();\n $destinos = Unidades::find()->where(['uni_codsituacao' => 1])->orderBy('uni_nomeabreviado')->all();\n //$valorlimite = Modalidade::find()->where(['mod_status' => 1])->all();\n $valorlimite = ModalidadeValorlimite::find()->innerJoinWith('modalidade')->where(['mod_status' => 1])->andWhere(['!=','homologacao_usuario', ''])->all();\n $artigo = Artigo::find()->select(['id, CONCAT(\"(\",art_tipo,\")\", \" - \", art_descricao) AS art_descricao'])->andWhere(['!=','art_homologacaousuario', ''])->orderBy('art_descricao')->all();\n $centrocusto = Centrocusto::find()->where(['cen_codsituacao' => 1])->orderBy('cen_codano')->all();\n $recurso = Recursos::find()->where(['rec_status' => 1])->orderBy('rec_descricao')->all();\n $comprador = Comprador::find()->where(['comp_status' => 1])->orderBy('comp_descricao')->all();\n $situacao = Situacao::find()->where(['sit_status' => 1])->orderBy('sit_descricao')->all();\n $empresa = Empresa::find()->where(['emp_status' => 1])->orderBy('emp_descricao')->all();\n\n $model->prolic_datacriacao = date('Y-m-d');\n $model->prolic_usuariocriacao = $session['sess_nomeusuario'];\n\n if ($model->load(Yii::$app->request->post())) {\n\n //Somatória dos valores\n // $model->prolic_valorefetivo = $model->prolic_valorestimado + $model->prolic_valoraditivo;\n\n //Junta todos destinos, centros de custos e empresas em uma linha\n is_array($model->prolic_destino) ? $model->prolic_destino = implode(', ', $model->prolic_destino) : null;\n is_array($model->prolic_centrocusto) ? $model->prolic_centrocusto = implode(', ', $model->prolic_centrocusto) : null;\n is_array($model->prolic_empresa) ? $model->prolic_empresa = implode(', ', $model->prolic_empresa) : null;\n\n //Número do Processo\n $numeroProcesso = ProcessoLicitatorio::find()->innerJoinWith('ano')->where(['ano.an_ano' => date('Y')])->count();\n $model->prolic_codprocesso = $numeroProcesso;\n\n //Sequencia do cód. da modalidade de acordo com o tipo\n $incremento = ProcessoLicitatorio::find()->innerJoinWith('modalidadeValorlimite')->innerJoinWith('modalidadeValorlimite.modalidade')->innerJoinWith('ano')->where(['modalidade.id'=>$model->modalidadeValorlimite->modalidade_id, 'ano.an_ano' => date('Y')])->count();\n $model->prolic_sequenciamodal = $incremento + 1;\n\n if ($model->validate()) {\n $model->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n\n return $this->renderAjax('create', [\n 'model' => $model,\n 'ano' => $ano,\n 'ramo' => $ramo,\n 'destinos' => $destinos,\n 'valorlimite' => $valorlimite,\n 'artigo' => $artigo,\n 'centrocusto' => $centrocusto,\n 'recurso' => $recurso,\n 'comprador' => $comprador,\n 'situacao' => $situacao,\n 'empresa' => $empresa,\n ]);\n }", "title": "" }, { "docid": "6182011d4701b161fae3cded587ad6a6", "score": "0.4692076", "text": "public function adicionarPecaProcesso($numero_processo, $digital, $checar = true) {\n try {\n\n if ($checar) {\n /* Validar se os documentos pai e filho ainda estao na area de trabalho do usuario */\n $passou_proc = false;\n $passou_doc = false;\n if (Processo::validarProcessoAreaDeTrabalho($numero_processo)) {\n $passou_proc = true;\n if (Documento::validarDocumentoAreaDeTrabalho($digital)) {\n $passou_doc = true;\n }\n }\n } else {\n $passou_doc = true;\n $passou_proc = true;\n }\n\n if ($passou_proc == true) {\n if ($passou_doc == true) {\n /* Inicar transacao */\n Controlador::getInstance()->getConnection()->connection->beginTransaction();\n\n /* Verificar se o documento ja esta anexado ou apenso à outro documento */\n $stmt = Controlador::getInstance()->getConnection()->connection->prepare(\"SELECT ID_PROCESSOS_CADASTRO FROM TB_PROCESSOS_DOCUMENTOS WHERE ID_DOCUMENTOS_CADASTRO = ? LIMIT 1\");\n $stmt->bindParam(1, DaoDocumento::getDocumento($digital, 'id'), PDO::PARAM_INT);\n $stmt->execute();\n $out = $stmt->fetch(PDO::FETCH_ASSOC);\n\n if (empty($out)) {\n\n /* Variaveis do historico de tramite */\n $acao_documento = \"Este documento foi adicionado ao processo $numero_processo.\"; // historico filho\n $acao_processo = \"O Documento $digital foi adicionado neste processo.\"; // historico pai\n $ultimo_tramite = \"Este documento foi adicionado ao processo $numero_processo.\"; //ultimo tramite filho\n $destino = \"XXXXX\";\n $origem = \"XXXXX\";\n\n $id_usuario = Zend_Auth::getInstance()->getIdentity()->ID;\n $nome_usuario = Zend_Auth::getInstance()->getIdentity()->NOME;\n $id_unidade_historico = Zend_Auth::getInstance()->getIdentity()->ID_UNIDADE_ORIGINAL;\n $id_unidade_usuario = Controlador::getInstance()->usuario->ID_UNIDADE;\n $diretoria = DaoUnidade::getUnidade($id_unidade_historico, 'nome');\n\n /* Historico - Documento */\n $stmt = Controlador::getInstance()->getConnection()->connection->prepare(\"INSERT INTO TB_HISTORICO_TRAMITE_DOCUMENTOS\"\n . \" (DIGITAL,ID_USUARIO,USUARIO,ID_UNIDADE,DIRETORIA,ACAO,ORIGEM,DESTINO,DT_TRAMITE)\"\n . \" VALUES (?,?,?,?,?,?,?,?,CLOCK_TIMESTAMP())\");\n $stmt->bindParam(1, $digital, PDO::PARAM_STR);\n $stmt->bindParam(2, $id_usuario, PDO::PARAM_INT);\n $stmt->bindParam(3, $nome_usuario, PDO::PARAM_STR);\n $stmt->bindParam(4, $id_unidade_historico, PDO::PARAM_INT);\n $stmt->bindParam(5, $diretoria, PDO::PARAM_STR);\n $stmt->bindParam(6, $acao_documento, PDO::PARAM_STR);\n $stmt->bindParam(7, $origem, PDO::PARAM_STR);\n $stmt->bindParam(8, $destino, PDO::PARAM_STR);\n $stmt->execute();\n\n /* Historico - Processo */\n $stmt = Controlador::getInstance()->getConnection()->connection->prepare(\"INSERT INTO TB_HISTORICO_TRAMITE_PROCESSOS\"\n . \" (NUMERO_PROCESSO,ID_USUARIO,USUARIO,ID_UNIDADE,DIRETORIA,ACAO,ORIGEM,DESTINO,DT_TRAMITE)\"\n . \" VALUES (?,?,?,?,?,?,?,?,CLOCK_TIMESTAMP())\");\n $stmt->bindParam(1, $numero_processo, PDO::PARAM_STR);\n $stmt->bindParam(2, $id_usuario, PDO::PARAM_INT);\n $stmt->bindParam(3, $nome_usuario, PDO::PARAM_STR);\n $stmt->bindParam(4, $id_unidade_historico, PDO::PARAM_INT);\n $stmt->bindParam(5, $diretoria, PDO::PARAM_STR);\n $stmt->bindParam(6, $acao_processo, PDO::PARAM_STR);\n $stmt->bindParam(7, $origem, PDO::PARAM_STR);\n $stmt->bindParam(8, $destino, PDO::PARAM_STR);\n $stmt->execute();\n\n /* Ultimo tramite - Documento */\n $stmt = Controlador::getInstance()->getConnection()->connection->prepare(\"UPDATE TB_DOCUMENTOS_CADASTRO SET ULTIMO_TRAMITE = ? WHERE DIGITAL = ?\");\n $stmt->bindParam(1, $ultimo_tramite, PDO::PARAM_STR);\n $stmt->bindParam(2, $digital, PDO::PARAM_STR);\n $stmt->execute();\n\n /* Adicionar Peça */\n $sttm = Controlador::getInstance()->getConnection()->connection->prepare(\"INSERT INTO TB_PROCESSOS_DOCUMENTOS(ID_PROCESSOS_CADASTRO,ID_DOCUMENTOS_CADASTRO,ID_USUARIOS,ID_UNIDADE_USUARIO) VALUES (?,?,?,?)\");\n $sttm->bindParam(1, DaoProcesso::getProcesso($numero_processo, 'id'), PDO::PARAM_INT);\n $sttm->bindParam(2, DaoDocumento::getDocumento($digital, 'id'), PDO::PARAM_INT);\n $sttm->bindParam(3, $this->_usuario->id, PDO::PARAM_INT);\n $sttm->bindParam(4, $id_unidade_usuario, PDO::PARAM_INT);\n $sttm->execute();\n\n /* Comitar */\n Controlador::getInstance()->getConnection()->connection->commit();\n\n return new Output(array('success' => 'true', 'message' => \"Peça adicionada com sucesso!\"));\n } else {\n $numero_processo = DaoProcesso::getProcesso($out['ID_PROCESSOS_CADASTRO'], 'numero_processo');\n return new Output(array('success' => 'false', 'error' => \"O documento {$digital} já é peça do processo {$numero_processo}!\"));\n }\n } else {\n /* Retorna quando o documento filho nao esta na area de trabalho do usuario */\n return new Output(array('success' => 'false', 'error' => \"O documento {$digital} não está na sua área de trabalho!\"));\n }\n } else {\n /* Retorna quando o documento pai nao esta na area de trabalho do usuario */\n return new Output(array('success' => 'false', 'error' => \"O processo {$numero_processo} não está na sua área de trabalho!\"));\n }\n } catch (PDOException $e) {\n Controlador::getInstance()->getConnection()->connection->rollback();\n return new Output(array('success' => 'false', 'error' => $e->getMessage()));\n }\n }", "title": "" }, { "docid": "992b304ca5231ada03ac450a1e518a35", "score": "0.4691235", "text": "public function store(Request $request)\n {\n\n $candidato = new Candidato;\n $endereco = new Endereco;\n $escolaridade = new Escolaridade;\n\n $candidato->nome = $request->nome;\n $candidato->sobrenome = $request->sobrenome;\n $candidato->cpf = $request->cpf;\n $candidato->rg = $request->rg;\n $candidato->email = $request->email;\n $candidato->raca = $request->raca;\n $candidato->estado_civil = $request->estado_civil;\n $candidato->naturalidade = $request->naturalidade;\n $candidato->nacionalidade = $request->nacionalidade;\n $candidato->filiacao1 = $request->filiacao1;\n $candidato->filiacao2 = $request->filiacao2;\n $candidato->telefone1 = $request->telefone1;\n $candidato->telefone2 = $request->telefone2;\n\n foreach($request->sexo as $sexo)\n $candidato->sexo = $sexo;\n \n $candidato->pne = $request->pne;\n $candidato->atendimento_especial = $request->atendimento_especial;\n $candidato->save(); \n\n //experiencias\n foreach($request->experiencias as $exp){\n $experienciaProfissional = new ExperienciaProfissional;\n $experienciaProfissional->empresa = $exp['empresa'];\n $experienciaProfissional->cargo = $exp['cargo'];\n $experienciaProfissional->funcao = $exp['funcao'];\n $experienciaProfissional->data_inicio = $exp['data_inicio'];\n $experienciaProfissional->data_fim = $exp['data_fim'];\n $experienciaProfissional->descricao = $exp['descricao'];\n $experienciaProfissional->tempo = $this->periodoDeExperiencia($exp['data_inicio'], $exp['data_fim']);\n $candidato->experiencias()->save($experienciaProfissional);\n }\n\n //escolaridade\n $escolaridade->instituicao = $request->instituicao;\n $escolaridade->nivel_escolar = $request->nivel_escolar;\n $escolaridade->nome_curso = $request->nome_curso;\n $escolaridade->ano_conclusao = $request->ano_conclusao;\n $candidato->escolaridade()->save($escolaridade);\n \n //endereco data\n $endereco->logradouro = $request->logradouro;\n $endereco->bairro = $request->bairro;\n $endereco->cidade = $request->cidade;\n $endereco->estado = $request->estado;\n $endereco->cep = $request->cep;\n $candidato->endereco()->save($endereco);\n\n return redirect(\"candidato/{$candidato->cpf}/comprovante\");\n\n }", "title": "" }, { "docid": "663516263f077ff7e9875992cce32c8f", "score": "0.46896976", "text": "function insertarPartidaIds(){\n\t\t$this->procedimiento='pre.ft_partida_ids_ime';\n\t\t$this->transaccion='PRE_RPS_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n $this->setParametro('id_gestion_act','id_gestion_act','int4');\n\t\t$this->setParametro('id_partida_uno','id_partida_uno','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": "9eea729c55ce57377f5d1bbeb81aee9e", "score": "0.4689566", "text": "public function insertarMatricureprobado($adm_id, $pami_id, $sins_id, $uaca_id, $mod_id, $eaca_id, $mre_usuario_ingreso, $mre_estado_matriculado, $mre_fecha_creacion) {\n $con = \\Yii::$app->db_captacion;\n $trans = $con->getTransaction(); // se obtiene la transacción actual\n if ($trans !== null) {\n $trans = null; // si existe la transacción entonces no se crea una\n } else {\n $trans = $con->beginTransaction(); // si no existe la transacción entonces se crea una\n }\n\n $param_sql = \"mre_estado\";\n $bdet_sql = \"1\";\n\n $param_sql .= \", mre_estado_logico\";\n $bdet_sql .= \", 1\";\n\n if (isset($adm_id)) {\n $param_sql .= \", adm_id\";\n $bdet_sql .= \", :adm_id\";\n }\n if (isset($pami_id)) {\n $param_sql .= \", pami_id\";\n $bdet_sql .= \", :pami_id\";\n }\n if (isset($sins_id)) {\n $param_sql .= \", sins_id\";\n $bdet_sql .= \", :sins_id\";\n } \n if (isset($uaca_id)) {\n $param_sql .= \", uaca_id\";\n $bdet_sql .= \", :uaca_id\";\n }\n if (isset($mod_id)) {\n $param_sql .= \", mod_id\";\n $bdet_sql .= \", :mod_id\";\n }\n if (isset($eaca_id)) {\n $param_sql .= \", eaca_id\";\n $bdet_sql .= \", :eaca_id\";\n } \n if (isset($mre_usuario_ingreso)) {\n $param_sql .= \", mre_usuario_ingreso\";\n $bdet_sql .= \", :mre_usuario_ingreso\";\n }\n if (isset($mre_estado_matriculado)) {\n $param_sql .= \", mre_estado_matriculado\";\n $bdet_sql .= \", :mre_estado_matriculado\";\n }\n if (isset($mre_fecha_creacion)) {\n $param_sql .= \", mre_fecha_creacion\";\n $bdet_sql .= \", :mre_fecha_creacion\";\n }\n\n try {\n $sql = \"INSERT INTO \" . $con->dbname . \".matriculados_reprobado ($param_sql) VALUES($bdet_sql)\";\n $comando = $con->createCommand($sql);\n\n if (isset($adm_id)) {\n $comando->bindParam(':adm_id', $adm_id, \\PDO::PARAM_INT);\n }\n if (isset($pami_id)) {\n $comando->bindParam(':pami_id', $pami_id, \\PDO::PARAM_INT);\n }\n if (isset($sins_id)) {\n $comando->bindParam(':sins_id', $sins_id, \\PDO::PARAM_INT);\n }\n if (isset($uaca_id)) {\n $comando->bindParam(':uaca_id', $uaca_id, \\PDO::PARAM_INT);\n }\n if (isset($mod_id)) {\n $comando->bindParam(':mod_id', $mod_id, \\PDO::PARAM_INT);\n }\n if (isset($eaca_id)) {\n $comando->bindParam(':eaca_id', $eaca_id, \\PDO::PARAM_INT);\n }\n if (!empty((isset($mre_usuario_ingreso)))) {\n $comando->bindParam(':mre_usuario_ingreso', $mre_usuario_ingreso, \\PDO::PARAM_INT);\n }\n if (!empty((isset($mre_estado_matriculado)))) {\n $comando->bindParam(':mre_estado_matriculado', $mre_estado_matriculado, \\PDO::PARAM_INT);\n }\n if (!empty((isset($mre_fecha_creacion)))) {\n $comando->bindParam(':mre_fecha_creacion', $mre_fecha_creacion, \\PDO::PARAM_STR);\n }\n\n $result = $comando->execute();\n if ($trans !== null)\n $trans->commit();\n return $con->getLastInsertID($con->dbname . '.matriculados_reprobado');\n } catch (Exception $ex) {\n if ($trans !== null)\n $trans->rollback();\n return FALSE;\n }\n }", "title": "" }, { "docid": "bdf6c2975725844a739923a2ec8b0e92", "score": "0.46877438", "text": "public function initialize()\n {\n $this->belongsTo(\"process_id\", \"\\Cron\\Model\\Process\", \"id\", ['alias' => 'Process']);\n }", "title": "" }, { "docid": "e67823f7cf00e0e75a66111aec7ab061", "score": "0.4685338", "text": "public function getFkImobiliarioImovelProcessos()\n {\n return $this->fkImobiliarioImovelProcessos;\n }", "title": "" }, { "docid": "2b7295f0ada48c21cd60c72b24ecd5c3", "score": "0.46852565", "text": "private function atualizarPropostasPagamento() {\r\n\r\n /*\r\n * Se o tipo da operação for E - Exclusão\r\n * Então forçamos o banco, agencia e conta corrente como nulos\r\n */\r\n $banco = ($this->tipo_operacao == 'E') ? null : $this->banco_posterior;\r\n $agencia = ($this->tipo_operacao == 'E') ? 'null' : \"'\" . $this->agencia_posterior . \"'\";\r\n $conta_corrente = ($this->tipo_operacao == 'E') ? 'null' : \"'\" . $this->conta_corrente_posterior . \"'\";\r\n \r\n $this->dao->atualizarPropostasPagamento($this->id_cliente, $this->forma_cobranca_posterior, $banco, $agencia, $conta_corrente);\r\n }", "title": "" }, { "docid": "de89884a95b1ee4071cd7a1d1f923b23", "score": "0.46803287", "text": "public function adicionarBairro(Bairro $oBairro) {\n\n if (!db_utils::inTransaction()) {\n throw new DBException(\"Sem transação com o banco de dados ativa.\");\n }\n\n $oDaoCadEnderBairroCadEnderRua = new cl_cadenderbairrocadenderrua();\n $sWhereCadEnderBairroCadEnderRua = \" db87_cadenderrua = {$this->getSequencial()}\";\n $sWhereCadEnderBairroCadEnderRua .= \" and db87_cadenderbairro = {$oBairro->getSequencial()}\";\n $sSqlCadEnderBairroCadEnderRua = $oDaoCadEnderBairroCadEnderRua->sql_query(\n null,\n \"db87_sequencial,\n db87_cadenderrua\",\n \"db87_sequencial\",\n $sWhereCadEnderBairroCadEnderRua\n );\n $rsCadEnderBairroCadEnderRua = $oDaoCadEnderBairroCadEnderRua->sql_record($sSqlCadEnderBairroCadEnderRua);\n\n /**\n * Exclui todos os vínculos entre bairro e o logradouro utilizando o sequencial do logradouro\n * e adiciona novamente com as alterações.\n */\n if ($oDaoCadEnderBairroCadEnderRua->numrows > 0) {\n\n $iCadEnderEnderRua = db_utils::fieldsMemory($rsCadEnderBairroCadEnderRua, 0)->db87_cadenderrua;\n $oDaoCadEnderBairroCadEnderRua->excluir(null, \"db87_cadenderrua = {$iCadEnderEnderRua}\");\n }\n\n $oDaoCadEnderBairroCadEnderRua->db87_cadenderbairro = $oBairro->getSequencial();\n $oDaoCadEnderBairroCadEnderRua->db87_cadenderrua = $this->getSequencial();\n $oDaoCadEnderBairroCadEnderRua->incluir(null);\n\n if ($oDaoCadEnderBairroCadEnderRua->erro_status == 0) {\n throw new BusinessException($oDaoCadEnderBairroCadEnderRua->erro_msg);\n }\n }", "title": "" }, { "docid": "831d82d441777327c2e18932a401bb45", "score": "0.46794653", "text": "public function actionCreate()\n {\n $model = new Atendimento();\n $modelProduto = new Produto();\n $modelAnexo = new AtendimentoAnexos();\n $modelsAnexo = [new AtendimentoAnexos];\n $modelOcorrencia = new TipoOcorrencia();\n\n if( Yii::$app->request->isAjax && isset($_POST['Atendimento']) ) {\n\n $errors = CActiveForm::validate($model);\n\n if($errors !== '[]') {\n\n Yii::app()->end($errors);\n\n }else{\n\n $model->save(false);\n\n Yii::app()->end($errors);\n\n }\n\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n if ($model->solucao != null){\n $model->status = 1;\n }\n $model->save(false);\n $qtd_produtos = count(Yii::$app->request->post('ContratoProdutos', []));\n\n\n if ($qtd_produtos > 0) {\n $produtos = [new ContratoProdutos()];\n for ($g = 0; $g < $qtd_produtos; $g++) {\n $produtos[] = new ContratoProdutos();\n }\n Model::loadMultiple($produtos, Yii::$app->request->post());\n\n foreach ($produtos as $produto) {\n $produto->fk_contrato = $model->id;\n $produto->save();\n }\n } else {\n $produtos = null;\n }\n\n return $this->redirect(['index']);\n }\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()) {\n $data_atendimento = $model->data_atendimento;\n $prazo = $modelOcorrencia->prazo;\n $data_prevista = $model->data_prevista;\n\n $data_prevista = date('d/m/Y', strtotime(\"+\" . $prazo . \" months\", strtotime(date($data_atendimento))));\n\n if ($model->solucao != null) {\n $model->status = 1;\n } else {\n $model->status = 0;\n }\n\n\n $index = 0;\n $index_foto = 0;\n $index_anexo = 0;\n\n $model->numero_atendimento = $this->id . '/' . date('Y');\n\n $modelsAnexo = DynamicFormModel::createMultiple(AtendimentoAnexos::classname());\n DynamicFormModel::loadMultiple($modelsAnexo, Yii::$app->request->post());\n\n if (!empty($_FILES['AtendimentoAnexos'])) {\n $files = $_FILES['AtendimentoAnexos'];\n\n foreach ($modelsAnexo as $modelAnexo) {\n if (count($files['name']) > $index_anexo && $files['name'][$index_anexo]['anexo'] != '') {\n $s3 = Yii::$app->get('s3');\n $saved = false;\n while (!$saved) {\n $nome = rand(0, 9999999);\n $ext = 'aaa';\n $exist = $s3->exist('crm/anexos/' . $model->numero_atendimento . '/' . $nome . '.' . $ext);\n if (!$exist) {\n $result = $s3->upload('crm/anexos/' . $model->numero_atendimento . '/' . $nome . '.' . $ext, $files['tmp_name'][$index_anexo]['anexo']);\n $modelAnexo->anexo = $result->get('ObjectURL');\n $saved = true;\n }\n }\n $modelAnexo->fk_atendimento = $model->id;\n $modelAnexo->save();\n }\n $index_anexo++;\n }\n }\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'view' => null,\n 'model' => $model,\n 'modelProduto' => $modelProduto,\n 'modelsAnexo' => (empty($modelsnexo)) ? [new AtendimentoAnexos()] : $modelsAnexo,\n 'modelAnexo' => $modelAnexo,\n 'modelOcorrencia' => $modelOcorrencia,\n ]);\n }\n }\n\n\n return $this->render('create', [\n 'model' => $model,\n 'view' => null,\n 'modelProduto' => $modelProduto,\n 'modelsAnexo' => (empty($modelsAnexo)) ? [new AtendimentoAnexos()] : $modelsAnexo,\n 'modelAnexo' => $modelAnexo,\n 'modelOcorrencia' => $modelOcorrencia,\n ]);\n }", "title": "" }, { "docid": "8823af5ee9808ef1aa428380a7665015", "score": "0.4678771", "text": "public function inserirAgendamento() \n {\n /**\n * preencher um formulario com dados do agendamento\n * utilizando array []\n */\n $dadosForm = [\n 'descricao' => 'teste de inserção 1',\n 'data' => '2018-04-30 00:00:00',\n 'advogado_id' => '4',\n ];\n\n //recuperar um advogado pelo id, nome.. a seu criterio\n //$advogado = Advogado::find(1);\n \n //$inserir = $advogado->agendamentos()->create($dadosAgendamento);\n $inserir = Agendamento::create($dadosForm);\n \n var_dump($inserir->descricao);\n }", "title": "" }, { "docid": "e8ac798e1f7b3edba48feeb629160359", "score": "0.4678288", "text": "public function store(StoreAtencionRequest $request)\n {\n \n $id_usuario = Auth::id();\n\n $searchUsuarioID = DB::table('users')\n ->select('*')\n // ->where('estatus','=','1')\n ->where('id','=', $id_usuario)\n ->get();\n\n foreach ($searchUsuarioID as $usuario) {\n $usuarioEmp = $usuario->id_empresa;\n $usuarioSuc = $usuario->id_sucursal;\n }\n\n \n\n $atencion = new Atencion;\n $atencion->id_empresa =$usuarioEmp;\n $atencion->id_sucursal =$usuarioSuc;\n $atencion->save();\n\n if ($request->origen_paciente=='Profesional'){\n \n if(! is_null($request->servicios)){\n\n $serviciosatencion = new AtencionServicios;\n $serviciosatencion->id_atencion =$atencion->id;\n $serviciosatencion->id_servicio =0;\n $serviciosatencion->origen ='Servicios';\n $serviciosatencion->id_profesional =$request->profesional;\n $serviciosatencion->porcentaje =$request->porcentajeserv;\n $serviciosatencion->montoser = $request->precioserv;\n $serviciosatencion->id_sucursal =$usuarioSuc;\n $serviciosatencion->id_empresa =$usuarioEmp;\n $serviciosatencion->save();\n foreach ($request->servicios as $key => $value) {\n\n $searchServ = DB::table('servicios')\n ->select('*')\n // ->where('estatus','=','1')\n ->where('id','=', $value)\n ->get();\n\n foreach ($searchServ as $servicios) {\n $precio = $servicios->precio;\n\n }\n\n $atenciondetalle = new AtencionDetalle;\n $atenciondetalle->id_atencion =$atencion->id;\n $atenciondetalle->id_paciente =$request->pacientes;\n $atenciondetalle->costo =$request->preciototal;\n $atenciondetalle->origen =$request->origen_paciente;\n $atenciondetalle->id_profesional =$request->profesional;\n $atenciondetalle->acuenta =$request->acuenta;\n $atenciondetalle->costoa =$request->costoa;\n $atenciondetalle->pendiente =($request->preciototal-$request->costoa);\n $atenciondetalle->tarjeta =$request->tarjeta;\n $atenciondetalle->porcentaje =$request->porcentaje;\n $atenciondetalle->observaciones =$request->observaciones;\n $atenciondetalle->save();\n\n\n $serviciosprofatencion = new AtencionProfesionalesServicio;\n $serviciosprofatencion->id_atencion =$atencion->id;\n $serviciosprofatencion->id_servicio =$value;\n $serviciosprofatencion->id_profesional =$request->profesional;\n $serviciosprofatencion->porcentaje =$request->porcentajeserv;\n $serviciosprofatencion->montoser = $request->precioserv;\n $serviciosprofatencion->pagar = ($precio*$request->porcentajeserv)/100;\n $serviciosprofatencion->id_sucursal =$usuarioSuc;\n $serviciosprofatencion->id_empresa =$usuarioEmp;\n //$serviciosprofatencion->id_atec_servicio =$serviciosatencion->id;\n $serviciosprofatencion->save();\n }\n }\n\n if(! is_null($request->paquetes)){\n foreach ($request->paquetes as $key => $value) {\n\n $searchServPaq = DB::table('paquetes_servs')\n ->select('*')\n // ->where('estatus','=','1')\n ->where('id_paquete','=', $value)\n ->get();\n\n foreach ($searchServPaq as $serv) {\n $id_servicio = $serv->id_servicio;\n\n\n if(! is_null($id_servicio)){\n\n $paquetesatencion = new AtencionProfesionalesPaquete;\n $paquetesatencion->id_atencion =$atencion->id;\n $paquetesatencion->id_paquete =$value;\n $paquetesatencion->id_servicio =$id_servicio;\n $paquetesatencion->id_profesional =$request->profesional;\n $paquetesatencion->porcentajepaq =$request->porcentajepaq;\n $paquetesatencion->costo = $request->costo;\n $paquetesatencion->pagar = ($request->costo*$request->porcentajepaq)/100;\n $paquetesatencion->id_sucursal =$usuarioSuc;\n $paquetesatencion->id_empresa =$usuarioEmp;\n $paquetesatencion->save();\n\n $atenciondetalle = new AtencionDetalle;\n $atenciondetalle->id_atencion =$atencion->id;\n $atenciondetalle->id_paciente =$request->pacientes;\n $atenciondetalle->costo =$request->preciototal;\n $atenciondetalle->origen =$request->origen_paciente;\n $atenciondetalle->id_profesional =$request->profesional;\n $atenciondetalle->acuenta =$request->acuenta;\n $atenciondetalle->costoa =$request->costoa;\n $atenciondetalle->pendiente =($request->preciototal-$request->costoa);\n $atenciondetalle->tarjeta =$request->tarjeta;\n $atenciondetalle->porcentaje =$request->porcentaje;\n $atenciondetalle->observaciones =$request->observaciones;\n $atenciondetalle->save();\n }\n }\n\n $searchLabPaq = DB::table('paquetes_analises')\n ->select('*')\n ->where('id_paquete','=', $value)\n ->get();\n\n foreach ($searchLabPaq as $lab) {\n $id_laboratorio = $lab->id_analisis;\n\n\n if(! is_null($id_laboratorio)){\n\n $paquetesatencion = new AtencionProfesionalesPaqueteLab;\n $paquetesatencion->id_atencion =$atencion->id;\n $paquetesatencion->id_paquete =$value;\n $paquetesatencion->id_laboratorio =$id_laboratorio;\n $paquetesatencion->id_profesional =$request->profesional;\n $paquetesatencion->porcentajepaq =$request->porcentajepaq;\n $paquetesatencion->costo = $request->costo;\n $paquetesatencion->pagadolab = 0;\n $paquetesatencion->pagar = ($request->costo*$request->porcentajepaq)/100;\n $paquetesatencion->id_sucursal =$usuarioSuc;\n $paquetesatencion->id_empresa =$usuarioEmp;\n $paquetesatencion->save();\n\n $atenciondetalle = new AtencionDetalle;\n $atenciondetalle->id_atencion =$atencion->id;\n $atenciondetalle->id_paciente =$request->pacientes;\n $atenciondetalle->costo =$request->preciototal;\n $atenciondetalle->origen =$request->origen_paciente;\n $atenciondetalle->id_profesional =$request->profesional;\n $atenciondetalle->acuenta =$request->acuenta;\n $atenciondetalle->costoa =$request->costoa;\n $atenciondetalle->pendiente =($request->preciototal-$request->costoa);\n $atenciondetalle->tarjeta =$request->tarjeta;\n $atenciondetalle->porcentaje =$request->porcentaje;\n $atenciondetalle->observaciones =$request->observaciones;\n $atenciondetalle->save();\n }\n }\n\n\n}\n}\n\n\n if(! is_null($request->analises)){\n $analisisatencion = new AtencionLaboratorio;\n $analisisatencion->id_atencion =$atencion->id;\n $analisisatencion->id_analisis =0;\n $analisisatencion->origen ='Laboratorios';\n $analisisatencion->id_profesional =$request->profesional;\n $analisisatencion->porcentaje =$request->porcentajelab;\n $analisisatencion->montolab = $request->preciopublico;\n $analisisatencion->id_sucursal =$usuarioSuc;\n $analisisatencion->id_empresa =$usuarioEmp;\n $analisisatencion->save();\n foreach ($request->analises as $key => $value) {\n\n\n $searchLab = DB::table('analises')\n ->select('*')\n // ->where('estatus','=','1')\n ->where('id','=', $value)\n ->get();\n\n foreach ($searchLab as $lab) {\n $precio = $lab->preciopublico;\n\n }\n\n $atenciondetalle = new AtencionDetalle;\n $atenciondetalle->id_atencion =$atencion->id;\n $atenciondetalle->id_paciente =$request->pacientes;\n $atenciondetalle->costo =$request->preciototal;\n $atenciondetalle->origen =$request->origen_paciente;\n $atenciondetalle->id_profesional =$request->profesional;\n $atenciondetalle->acuenta =$request->acuenta;\n $atenciondetalle->costoa =$request->costoa;\n $atenciondetalle->pendiente =($request->preciototal-$request->costoa);\n $atenciondetalle->tarjeta =$request->tarjeta;\n $atenciondetalle->porcentaje =$request->porcentaje;\n $atenciondetalle->observaciones =$request->observaciones;\n $atenciondetalle->save();\n\n\n $serviciosproflab = new AtencionProfesionalesLaboratorio;\n $serviciosproflab->id_atencion =$atencion->id;\n $serviciosproflab->id_laboratorio =$value;\n $serviciosproflab->id_profesional =$request->profesional;\n $serviciosproflab->porcentaje =$request->porcentajelab;\n $serviciosproflab->montolab = $request->preciopublico;\n $serviciosproflab->pagar = ($precio*$request->porcentajelab)/100;\n $serviciosproflab->id_sucursal =$usuarioSuc;\n $serviciosproflab->id_empresa =$usuarioEmp;\n //$serviciosproflab->id_atec_lab =$analisisatencion->id;\n $serviciosproflab->save();\n }\n}\n} else {\n\n if(! is_null($request->servicios)){\n\n $serviciosatencion = new AtencionServicios;\n $serviciosatencion->id_atencion =$atencion->id;\n $serviciosatencion->id_servicio =0;\n $serviciosatencion->origen ='Servicios';\n $serviciosatencion->id_profesional =999;\n $serviciosatencion->porcentaje =$request->porcentajeserv;\n $serviciosatencion->montoser = $request->precioserv;\n $serviciosatencion->id_sucursal =$usuarioSuc;\n $serviciosatencion->id_empresa =$usuarioEmp;\n $serviciosatencion->save();\n foreach ($request->servicios as $key => $value) {\n\n $searchServ = DB::table('servicios')\n ->select('*')\n // ->where('estatus','=','1')\n ->where('id','=', $value)\n ->get();\n\n foreach ($searchServ as $servicios) {\n $precio = $servicios->precio;\n\n }\n\n\n $serviciosprofatencion = new AtencionProfesionalesServicio;\n $serviciosprofatencion->id_atencion =$atencion->id;\n $serviciosprofatencion->id_servicio =$value;\n $serviciosprofatencion->id_profesional =999;\n $serviciosprofatencion->porcentaje =$request->porcentajeserv;\n $serviciosprofatencion->montoser = $request->precioserv;\n $serviciosprofatencion->pagar = ($precio*$request->porcentajeserv)/100;\n $serviciosprofatencion->id_sucursal =$usuarioSuc;\n $serviciosprofatencion->id_empresa =$usuarioEmp;\n //$serviciosprofatencion->id_atec_servicio =$serviciosatencion->id;\n $serviciosprofatencion->save();\n }\n }\n\n\n if(! is_null($request->analises)){\n $analisisatencion = new AtencionLaboratorio;\n $analisisatencion->id_atencion =$atencion->id;\n $analisisatencion->id_analisis =0;\n $analisisatencion->origen ='Laboratorios';\n $analisisatencion->id_profesional =999;\n $analisisatencion->porcentaje =$request->porcentajelab;\n $analisisatencion->montolab = $request->preciopublico;\n $analisisatencion->id_sucursal =$usuarioSuc;\n $analisisatencion->id_empresa =$usuarioEmp;\n $analisisatencion->save();\n foreach ($request->analises as $key => $value) {\n\n\n $searchLab = DB::table('analises')\n ->select('*')\n // ->where('estatus','=','1')\n ->where('id','=', $value)\n ->get();\n\n foreach ($searchLab as $lab) {\n $precio = $lab->preciopublico;\n\n }\n\n\n $serviciosproflab = new AtencionProfesionalesLaboratorio;\n $serviciosproflab->id_atencion =$atencion->id;\n $serviciosproflab->id_laboratorio =$value;\n $serviciosproflab->id_profesional =999;\n $serviciosproflab->porcentaje =$request->porcentajelab;\n $serviciosproflab->montolab = $request->preciopublico;\n $serviciosproflab->pagar = ($precio*$request->porcentajelab)/100;\n $serviciosproflab->id_sucursal =$usuarioSuc;\n $serviciosproflab->id_empresa =$usuarioEmp;\n //$serviciosproflab->id_atec_lab =$analisisatencion->id;\n $serviciosproflab->save();\n }\n}\n\n\n $atenciondetalle = new AtencionDetalle;\n $atenciondetalle->id_atencion =$atencion->id;\n $atenciondetalle->id_paciente =$request->pacientes;\n $atenciondetalle->costo =$request->preciototal;\n $atenciondetalle->origen =$request->origen_paciente;\n $atenciondetalle->id_profesional =999;\n $atenciondetalle->acuenta =$request->acuenta;\n $atenciondetalle->costoa =$request->costoa;\n $atenciondetalle->pendiente =($request->preciototal-$request->costoa);\n $atenciondetalle->tarjeta =$request->tarjeta;\n $atenciondetalle->porcentaje =$request->porcentaje;\n $atenciondetalle->observaciones =$request->observaciones;\n $atenciondetalle->save();\n\n if(! is_null($request->paquetes)){\n foreach ($request->paquetes as $key => $value) {\n\n $searchServPaq = DB::table('paquetes_servs')\n ->select('*')\n // ->where('estatus','=','1')\n ->where('id_paquete','=', $value)\n ->get();\n\n foreach ($searchServPaq as $serv) {\n $id_servicio = $serv->id_servicio;\n\n\n if(! is_null($id_servicio)){\n\n $paquetesatencion = new AtencionProfesionalesPaquete;\n $paquetesatencion->id_atencion =$atencion->id;\n $paquetesatencion->id_paquete =$value;\n $paquetesatencion->id_servicio =$id_servicio;\n $paquetesatencion->id_profesional =999;\n $paquetesatencion->porcentajepaq =$request->porcentajepaq;\n $paquetesatencion->costo = $request->costo;\n $paquetesatencion->pagar = ($request->costo*$request->porcentajepaq)/100;\n $paquetesatencion->id_sucursal =$usuarioSuc;\n $paquetesatencion->id_empresa =$usuarioEmp;\n $paquetesatencion->save();\n }\n }\n\n $searchLabPaq = DB::table('paquetes_analises')\n ->select('*')\n ->where('id_paquete','=', $value)\n ->get();\n\n foreach ($searchLabPaq as $lab) {\n $id_laboratorio = $lab->id_analisis;\n\n\n if(! is_null($id_laboratorio)){\n\n $paquetesatencion = new AtencionProfesionalesPaqueteLab;\n $paquetesatencion->id_atencion =$atencion->id;\n $paquetesatencion->id_paquete =$value;\n $paquetesatencion->id_laboratorio =$id_laboratorio;\n $paquetesatencion->id_profesional =999;\n $paquetesatencion->pagadolab = 0;\n $paquetesatencion->porcentajepaq =$request->porcentajepaq;\n $paquetesatencion->costo = $request->costo;\n $paquetesatencion->pagar = ($request->costo*$request->porcentajepaq)/100;\n $paquetesatencion->id_sucursal =$usuarioSuc;\n $paquetesatencion->id_empresa =$usuarioEmp;\n $paquetesatencion->save();\n }\n }\n\n\n}\n}\n\n \n\n}\n\n\n $creditos = new Creditos;\n $creditos->id_atencion =$atencion->id;\n $creditos->monto =$request->costoa;\n $creditos->tipo_ingreso =$request->acuenta;\n $creditos->origen ='INGRESO DE ATENCIONES';\n $creditos->id_empresa =$usuarioEmp;\n $creditos->id_sucursal =$usuarioSuc;\n $creditos->save();\n\n\n \n if(isset($request->paquetes)){\n foreach ($request->paquetes as $key => $value) {\n $paquetesatencion = new AtencionPaquetes;\n $paquetesatencion->id_atencion =$atencion->id;\n $paquetesatencion->id_paquete =$value;\n $paquetesatencion->id_sucursal =$usuarioSuc;\n $paquetesatencion->id_empresa =$usuarioEmp;\n $paquetesatencion->save();\n } \n }\n \n \n\n return redirect()->route('admin.atencion.index');\n\n }", "title": "" } ]
54b537a6c2e3464c5bc4ca68db68094d
vrati cenu dopravy bez DPH
[ { "docid": "51b5b12615277ebcee78bd2c46859bb3", "score": "0.0", "text": "public function get_delivery_method_price_without_vat()\n {\n return round($this->delivery_method_price / (100 + $this->delivery_method_vat) * 100, 2);\n }", "title": "" } ]
[ { "docid": "c4c93fb2651d12c27a23301fdde10680", "score": "0.6604202", "text": "private function parsujDobropis() {\r\n\t\t\r\n\t\t$dobropis = $this->xmlImport->SeznamFaktVyd->FaktVyd;\r\n\t\t\r\n\t\t$this->fakturaCislo = $dobropis->Doklad;\r\n\t\t$this->ico = $dobropis->MojeFirma->ICO;\r\n\t\t$this->datum = $this->upravDatum($dobropis->PlnenoDPH);\r\n\t\t$this->dekada = \" \";\r\n\t\t$this->dodaciListCislo = \"0000000000\";\r\n\t\t\r\n\t\t$this->vypisPolozkyDobropisu($dobropis);\r\n\r\n\t\tif($this->chyba == \"\") {\r\n\t\t\t$this->stahnoutTXT();\r\n\t\t} else {\r\n\t\t\techo $this->chyba;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "bfe93284e64d8b5d7aca1b62086f9fa6", "score": "0.6304524", "text": "public function dodaj_oglas()\n\t{\n\t\t$this->pozovi('pretraga/dodajOglas');\n\t}", "title": "" }, { "docid": "c73bc45ac6bc7d779e6a582973f579f6", "score": "0.606799", "text": "public function Bedrijfsgegevens(){\n\n\t\t\n\t}", "title": "" }, { "docid": "37c66f255cacdac8d50ec71e6b938e41", "score": "0.603088", "text": "function getidcad() {return $this->idcad;}", "title": "" }, { "docid": "199e63526fa2298e6c09cbd14d863c58", "score": "0.6002328", "text": "private function Popust(){\n \n if ($this->ukupno < 10 ) {\n\n echo \"<h3>Dodajte jos u korpi za popust!</h3>\";\n\n }elseif($this->ukupno < 20){\n\n echo \"<b>Ostvarili ste 10% popusta</b>\";\n \n $this->cena -= (( 10 / 100) * $this->cena); \n\n }elseif($this->ukupno < 40){\n\n echo \"<b>Ostvarili ste 20% popusta</b>\";\n \n $this->cena -= (( 20 / 100) * $this->cena); \n\n } elseif($this->ukupno < 70){\n\n echo \"<b>Ostvarili ste 30% popusta</b>\";\n \n $this->cena -= (( 30 / 100) * $this->cena); \n\n }elseif($this->ukupno < 100){\n\n echo \"<b>Ostvarili ste 40% popusta</b>\";\n \n $this->cena -= (( 40 / 100) * $this->cena); \n\n }elseif($this->ukupno > 100){\n\n echo \"<b>Ostvarili ste 50% popusta</b>\";\n \n $this->cena -= (( 50 / 100) * $this->cena); \n }\n }", "title": "" }, { "docid": "22665d5a08387495db3e13e8b429caf4", "score": "0.5989578", "text": "function uradjeni_zad ($niz){\n $naj=0;\n $ind=\"\";\n foreach($niz as $dan=>$uspeh){\n if ($naj <=$uspeh){\n $naj=$uspeh;\n $ind=$dan;\n }\n }\n echo \"<p>Najuspesniji dan je $ind sa uspehom $naj</p>\";\n $zbir=0;\n $brojd=0;\n foreach($niz as $dan=> $uspeh){\n $zbir+=$uspeh;\n $brojd++;\n\n }\n $prosek=$zbir / $brojd;\n echo \"<p>Prosecna uspesnost je $prosek\";\n $najmanji=$niz['ponedeljak'];\n foreach($niz as $dan=> $uspeh)\n if($najmanji>$uspeh)\n $najmanji=$uspeh;\n \n \n $raz=$naj-$najmanji;\n \n \n \n echo \"<p>Razlika je $raz</p>\";\n }", "title": "" }, { "docid": "06794beb6d5c224c5dde9c9f9b8c37ae", "score": "0.5965071", "text": "public static function getPgDetalhe();", "title": "" }, { "docid": "d1a3772db3744554b6a645a283013030", "score": "0.593263", "text": "public function zaradaDoprinosPoslovnomUspehu() {\n if ($this->karnet->getValue('tipNagrada') === 1) {\n return round($this->karnet->getValue('iznosNagrada'), 2);\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "7c27922ac3b5b302ffe70511ea7a2a77", "score": "0.59292316", "text": "public function zobrazpristupyDnes ($kedy = 'all') {\n\t\t# dnes = \n\t\t# vcera = - 1 day alebo time()-(3600*24) = 1 den\n\t\t# tyzden = - 7 day\n\t\t\n\t\t# CELKOVO\n\t\t$query = $this->db->query('SELECT COUNT(DISTINCT pocitadlo_ip) AS pocetcelkovo_ip, \n\t\t\t\t\t\t\t\t\t\t COUNT(DISTINCT pocitadlo_id) AS pocetcelkovo_zob,\n\t\t\t\t\t\t\t\t\t\t MAX(pocitadlo_datum) AS poslednypristup \n\t\t\t\t\t\t\t\t\tFROM be_pocitadlo' . $this->prefix . ' \n\t\t\t\t\t\t\t\t\tWHERE DATE(pocitadlo_datum) = DATE(NOW())\n\t\t\t\t\t\t\t\t\tORDER BY pocitadlo_datum DESC ');\n\t\n\t\t$row = $query->fetch_assoc();\n\n\t\t?>\n\t\t<h4>Dnes</h4>\n\t\t<table>\n\t\t<tr><td style=\"font-weight: bold;\">Pocet navstev:</td><td><?php echo htmlspecialchars($row['pocetcelkovo_ip']); ?></td></tr>\n\t\t<tr><td style=\"font-weight: bold;\">Pocet zobrazeni:</td><td><?php echo htmlspecialchars($row['pocetcelkovo_zob']); ?></td></tr>\n\t\t</table>\n\t\t<?php\n\n\t}", "title": "" }, { "docid": "d49720ab442f1b9301675bbad685c8c6", "score": "0.5920772", "text": "public function peserta();", "title": "" }, { "docid": "add232f01067223c925a31abc2ef67a0", "score": "0.5915909", "text": "public function absensi_dosen(){\n\t\t$where = array('nip' => $_SESSION['username']);\n\t\t$this->siak_view->dosen = $this->siak_model->siak_edit($where, \"dosen\", \"*\");\n\t\t$this->siak_view->prodi = $this->siak_model->siak_data_list(\"prodi\", \"*\");\n\t\t$this->siak_view->tahun = $this->siak_model->siak_data_list(\"tahun_akademik\", \"*\");\n\t\t$this->siak_view->matakuliah = $this->siak_model->siak_data_list(\"matakuliah\", \"*\");\n\t\t$this->siak_view->siak_render('siak_absensi_mahasiswa/absen_dosen', false);\t\t\n\t}", "title": "" }, { "docid": "33ea757874b3ae754bb8b9ac2c82548c", "score": "0.59128606", "text": "abstract function verwalteGeleitschutz();", "title": "" }, { "docid": "6ff51190842d1d79d460c6bee44b97b1", "score": "0.5909117", "text": "public function getPropiedadPlazaLibre()\n {\n /*\n puede ser una plaza propia o una cedida.\n */\n $gesAsistentes = new \\asistentes\\model\\entity\\GestorAsistente();\n $err_txt = '';\n\n $id_activ = $this->getId_activ();\n $mi_dl = \\core\\ConfigGlobal::mi_delef();\n\n $propiedad = array();\n $pl_propias = $this->getPlazasPropias();\n\n if ($pl_propias > 0) {\n $ocu = $gesAsistentes->getPlazasOcupadasPorDl($id_activ, $mi_dl, $mi_dl);\n if ($ocu < $pl_propias) {\n $propiedad[\"$mi_dl>$mi_dl\"] = \"$mi_dl ($ocu de $pl_propias)\";\n } else {\n $err_txt = _(\"Ya están todas las plazas ocupadas\");\n }\n }\n\n // Si no quedan, ver si dispongo de otras\n if (empty($propiedad)) {\n //Conseguidas\n $gesActividadPlazas = new \\actividadplazas\\model\\entity\\GestorActividadPlazas();\n // plazas de calendario de cada dl\n $cActividadPlazas = $gesActividadPlazas->getActividadesPlazas(array('id_activ' => $id_activ));\n foreach ($cActividadPlazas as $oActividadPlazas) {\n $id_dl_otra = $oActividadPlazas->getId_dl();\n $dl_otra = $this->getDlText($id_dl_otra);\n\n $json_cedidas = $oActividadPlazas->getCedidas();\n if (!empty($json_cedidas)) {\n $aCedidas = json_decode($json_cedidas, TRUE);\n foreach ($aCedidas as $dl_2 => $num_plazas) {\n if ($mi_dl == $dl_2) {\n $ocu = $gesAsistentes->getPlazasOcupadasPorDl($id_activ, $mi_dl, $dl_otra);\n if ($ocu < $num_plazas) {\n $propiedad[\"$dl_otra>$dl_2\"] = \"$dl_otra ($ocu de $num_plazas)\";\n }\n }\n }\n }\n }\n }\n if (empty($propiedad)) {\n $rta['success'] = FALSE;\n $rta['mensaje'] = $err_txt;\n } else {\n $rta['success'] = TRUE;\n $rta['mensaje'] = $err_txt;\n $rta['propiedad'] = $propiedad;\n }\n\n return $rta;\n }", "title": "" }, { "docid": "41ed76e5098f48b551117af3ebb6959e", "score": "0.589847", "text": "function pondokanrekap(){\n $tgl = date('Y-m-d');\n $variabel['tanggal'] = $tgl;\n $variabel['data'] = $this->m_rekap_santri_pondokan_p->datapelajaran();\n $this->layout->renderakdp('back-end/akademik/rekap_presensi_pondokan_p/v_data_pondokan',$variabel,'back-end/akademik/rekap_presensi_pondokan_p/v_rekap_js');\n }", "title": "" }, { "docid": "eb9732e403b0019fb9d9fff1b5f8d823", "score": "0.58973867", "text": "abstract function berechneZug();", "title": "" }, { "docid": "6c9e3f96233b32fa963cc2aacc8f3bdc", "score": "0.58973014", "text": "function getNapetiDvorak() : int {\n return $this->napetiDvorak;\n }", "title": "" }, { "docid": "3f25ad12457f4f3b236c51eae3c2fdb0", "score": "0.58551306", "text": "public function GetDisPerso(){\r\n\t\t\t//on initialise la valeur d'attaque des équipements\t\t\r\n\t\t$val_distance_objet = 0;\r\n\t\t\r\n\t\t\t//on ajoute la valeur des équipements\r\n\t\t$val_distance_objet += $this->ValeurEquipements('objet_distance');\r\n\t\t\r\n\t\t\t//on ajoute la valeur des sorts\r\n\t\t$val_distance_objet += $this->ValeurDesSorts('objet_distance');\r\n\t\t\r\n\t\treturn $val_distance_objet;\r\n\t}", "title": "" }, { "docid": "1154de70f60d5548cf8ddce569e44559", "score": "0.5843014", "text": "private function parsujDodak() {\r\n\t\t\r\n\t\tforeach ($this->xmlImport->SeznamDLVyd->DLVyd as $dodaciList) {\r\n\t\t\t\r\n\t\t\t//vytazeni cisla dodaciho listu z aktualne prochazeneho dodaku\r\n\t\t\t$this->dodaciListCislo = $this->upravDelku($dodaciList->CisloDokla,10);\r\n\t\t\t// vytazeni cisla ICO\r\n\t\t\t$this->ico = $dodaciList->MojeFirma->ICO;\r\n\t\t\t// ziskani a upraveni datumu z dodaku\r\n\t\t\t$this->datum = $this->upravDatum($dodaciList->DatSkPoh);\r\n\t\t\t$this->cisloProdejny = $this->upravDelku($dodaciList->Zakazka, 3);\r\n\t\t\t$this->vypisPolozkyDodaku($dodaciList);\r\n\t\t\t\r\n\t\t\tif($this->cisloProdejny == \"000\") {\r\n\t\t\t\t$this->chyba .= \"<span style='color:red'>CHYBA:</span>U dodaciho listu \".$this->dodaciListCislo.\" neni vyplnena prodejna! (polozka ZAKAZKA)<br/>\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif($this->chyba == \"\") {\r\n\t\t\t$this->stahnoutTXT();\r\n\t\t} else {\r\n\t\t\techo $this->chyba;\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "4a077537d8ab91288884ff41119139d7", "score": "0.58421123", "text": "private function vypocetCenyNaRadku($radek)\n\t{\n\t\t$eshopSettings = G_EshopSetting::instance();\n\t//\t$eshopSettings = G_Setting::instance();\n\t\tif ($eshopSettings->get(\"PRICE_TAX\") == HlavniCena::BezDane) {\n\t\t\t$radek->puvodni_cena = $radek->prodcena;\n\t\t\t$radek->puvodni_cena_sdph = $radek->prodcena_sdph;\n\t\t} else {\n\t\t\t$radek->puvodni_cena = $radek->prodcena_sdph;\n\t\t}\n\n\t\tif (isset($radek->pricelist) && count($radek->pricelist) > 0) {\n\t\t\t$cenik = $radek->pricelist[0];\n\n\t\t//\t\t\tprint_r($cenik);\n\t\t\t//\t\tprint_r($cenik);\n\t\t\t$radek->sleva = $cenik->sleva;\n\t\t\t$radek->druh_slevy = $cenik->typ_slevy;\n\n\t\t\tif ($cenik->cenik_cena > 0) {\n\t\t\t\t$radek->prodcena = $cenik->cenik_cena;\n\t\t\t}\n\t\t\t$radek->bezna_cena = $radek->prodcena_sdph;\n\t\t\tif ($eshopSettings->get(\"PRICE_TAX\") == HlavniCena::BezDane) {\n\t\t\t\t$radek->bezna_cena = $radek->prodcena;\n\t\t\t}\n\t\t//\tprint $radek->bezna_cena . \">\" . $eshopSettings->get(\"PRICE_TAX\");\n\t\t}\n\n // print_R($radek);\n // sazba dph\n\t\t$sazba_dph = ($radek->value_dph>0) ? $radek->value_dph/100 : $radek->value_dph * 1;\n // print \"sazba_dph:\" . $sazba_dph . \"<br>\";\n\t\t$vyse_slevy = 0;\n\t\t$znak_slevy = \"&nbsp;Kč\";\n\t\tif ($radek->sleva <> 0) {\n \n \t\t\t$radek->bezna_cena = $radek->prodcena_sdph;\n\t\t\tif ($eshopSettings->get(\"PRICE_TAX\") == HlavniCena::BezDane) {\n\t\t\t\t$radek->bezna_cena = $radek->prodcena;\n\t\t\t}\n \n\t\t\t// výpočet slevy\n\t\t\tif ($radek->druh_slevy == \"%\" && $radek->prodcena <> 0) {\n\t\t\t\t$vyse_slevy = $radek->prodcena * $radek->sleva / 100;\n\t\t\t\t$znak_slevy = \"%\";\n\t\t\t} else {\n\t\t\t\t$vyse_slevy = $radek->sleva;\n\t\t\t}\n\t\t}\n \n \n\n if ($eshopSettings->get(\"PLATCE_DPH\") == PlatceDane::Ano) {\n\t\t\t\t$zaklad = $radek->prodcena + $vyse_slevy;\n \t\t$radek->castka_dph = $sazba_dph * $zaklad;\n \t\t$radek->cena_sdph = $zaklad + $radek->castka_dph;\n \t\t$radek->cena_bezdph = $zaklad;\t\t\n \n } else {\n\t\t\t\t$zaklad = $radek->prodcena_sdph + $vyse_slevy;\n \t\t$radek->castka_dph = $sazba_dph * $zaklad;\n \t\t$radek->cena_sdph = $zaklad + $radek->castka_dph;\n \t\t$radek->cena_bezdph = $zaklad + $radek->castka_dph;\n \t//\t$radek->cena_bezdph = $zaklad; \n \n }\n \n\t\t\n\n\n\t\t$radek->sleva_label = round($radek->sleva) . $znak_slevy;\n // print $radek->sleva_label;\n\t\t$radek->sleva_bc = 0;\n\t\t$radek->sleva_bc_label = \"\";\n \n if ($eshopSettings->get(\"PRICE_TAX\") == HlavniCena::BezDane) {\n \t\tif ($radek->bezna_cena > $radek->cena_bezdph) {\n \t\t\t$radek->sleva_bc = $radek->bezna_cena - $radek->cena_bezdph;\n \t\t\t$radek->sleva_bc_label = round($radek->bezna_cena - $radek->cena_bezdph) . \"&nbsp;Kč\";\n \t\t} \n } else {\n \n \t\tif ($radek->bezna_cena > $radek->cena_sdph) {\n \t\t\t$radek->sleva_bc = $radek->bezna_cena - $radek->cena_sdph;\n \t\t\t$radek->sleva_bc_label = round($radek->bezna_cena - $radek->cena_sdph) . \"&nbsp;Kč\";\n \t\t} \n }\n \n /* \n if ($radek->bezna_cena > $radek->cena_sdph) {\n\t\t\t$radek->sleva_bc = $radek->bezna_cena - $radek->cena_sdph;\n\t\t\t$radek->sleva_bc_label = round($radek->cena_sdph - $radek->bezna_cena) . \" Kč\";\n\t\t} */\n \n /* \n print \"castka_dph:\" . $radek->castka_dph.\"<br />\";\n print \"cena_sdph:\" . $radek->cena_sdph.\"<br />\";\n */\n\n\t}", "title": "" }, { "docid": "5f57d31de39f716374c3787421a2c97f", "score": "0.582378", "text": "public function dziennaSredniaWilgotnosc($asortyment_id,$data_form,$nr_suszarni)\n {\n $data=$data_form;\n $kolejny_dzien = date('Y-m-d', strtotime($data . ' +1 day'));\n $godzina8='8:00:00';\n $godzina6='6:00:00';\n\n $Suma_Wilgotnosc1=\"\";\n $Suma_Wilgotnosc2=\"\";\n $Suma_Wilgotnosc=\"\";\n $Ilosc_pomiarow1=\"\";\n $Ilosc_pomiarow2=\"\";\n $Ilosc_pomiarow=\"\";\n $Srednia_Wilgotnosc=\"\";\n $precision=\"\";\n\n $conn = $this->getEntityManager()->getConnection();\n //Obliczamy ilosc pomiarów wilgotności pierwszego dnia raportu\n $sql = \"SELECT COUNT(Wilgotnosc) FROM dane_suszenia WHERE asortyment_id=:asortyment AND Data=:data AND NrSuszarni=:nr_suszarni AND Godzina >= :godzina8 AND Wilgotnosc > 0\";\n $stmt = $conn->prepare($sql);\n \n $stmt->execute(array('asortyment' => $asortyment_id,'data' => $data, 'nr_suszarni' => $nr_suszarni, 'godzina8' => $godzina8 ));\n \n $Ilosc_pomiarow1 = $stmt->fetchAll();\n dump($Ilosc_pomiarow1);\n\n //Obliczamy sumę wilgotności pierwszego dnia raportu\n $sql = \"SELECT SUM(Wilgotnosc) FROM dane_suszenia WHERE asortyment_id=:asortyment AND Data=:data AND NrSuszarni=:nr_suszarni AND Godzina >= :godzina8 AND Wilgotnosc > 0\";\n $stmt = $conn->prepare($sql);\n \n $stmt->execute(array('asortyment' => $asortyment_id,'data' => $data, 'nr_suszarni' => $nr_suszarni, 'godzina8' => $godzina8 ));\n\n $Suma_Wilgotnosc1 = $stmt->fetchAll();\n\n //Obliczamy ilosc pomiarów wilgotności drugiego dnia raportu\n $sql = \"SELECT COUNT(Wilgotnosc) FROM dane_suszenia WHERE asortyment_id=:asortyment AND Data=:data AND NrSuszarni=:nr_suszarni AND Godzina <= :godzina6 AND Wilgotnosc > 0\";\n $stmt = $conn->prepare($sql);\n \n $stmt->execute(array('asortyment' => $asortyment_id,'data' => $kolejny_dzien, 'nr_suszarni' => $nr_suszarni, 'godzina6' => $godzina6 ));\n\n $Ilosc_pomiarow2 = $stmt->fetchAll();\n\n\n //Obliczamy sumę pomiarów wilgotności drugiego dnia raportu\n $sql = \"SELECT SUM(Wilgotnosc) FROM dane_suszenia WHERE asortyment_id=:asortyment AND Data=:data AND NrSuszarni=:nr_suszarni AND Godzina <= :godzina6 AND Wilgotnosc > 0\";\n $stmt = $conn->prepare($sql);\n \n $stmt->execute(array('asortyment' => $asortyment_id,'data' => $kolejny_dzien, 'nr_suszarni' => $nr_suszarni, 'godzina6' => $godzina6 ));\n\n $Suma_Wilgotnosc2 = $stmt->fetchAll();\n\n //Obliczamy wilgotność końcową\n $Suma_Wilgotnosc=$Suma_Wilgotnosc1['0']['SUM(Wilgotnosc)']+$Suma_Wilgotnosc2['0']['SUM(Wilgotnosc)'];\n $Ilosc_pomiarow=$Ilosc_pomiarow1['0']['COUNT(Wilgotnosc)']+$Ilosc_pomiarow2['0']['COUNT(Wilgotnosc)'];\n \n // dump($Suma_Wilgotnosc);\n //dump($Ilosc_pomiarow);\n\n $Srednia_Wilgotnosc=($Suma_Wilgotnosc/$Ilosc_pomiarow);\n\n return round($Srednia_Wilgotnosc,$precision=2);\n ;\n // var_dump($stmt->fetchAll());die;\n //return json_encode($wynik);\n\n }", "title": "" }, { "docid": "2416e167fb08513d19ebbf279d2e1c50", "score": "0.578001", "text": "public function provjeri_naplatni_uredjaj()\n {\n //ukoliko je dodan racun ne dozvoli promjene oznake\n $idPP = $this->input->post('idPP');\n \n if($this->postavka->getNaplatniUredjajID($idPP))\n {\n echo json_encode(array('uspjelo'=>'0', 'poruka' => '<div class=\"alert alert-warning\">Ne dozvoli editiranje! </div>')); \n }\n else\n {\n echo json_encode(array('uspjelo'=>'1')); \n } \n \n }", "title": "" }, { "docid": "249e0ffe3a90d26dcec3b79f3c89588e", "score": "0.577933", "text": "function kiekVyru(){\n $sum = 0; // pradzioje suma = 0\n for ($i=0; $i<count($this->darbuotojai); $i++){ // imame darbuotojus po vieną iš masyvo\n if ($this->darbuotojai[$i]['lyt'] == 'vyr') $sum++; // jeigu vyras, tai +1\n }\n return $sum; // gražiname personalo vyru skaiciu kaip funkcijos rezultatą\n }", "title": "" }, { "docid": "c5ef044f1397cde29c53db495100d9ee", "score": "0.5767958", "text": "public function posiadaaktwnabron(){\n if($this->bron){\n $this->setSila($this->getSila()+$this->bron->getparam1());\n $this->setZrecznosc($this->getZrecznosc()-$this->bron->getparam2());\n }\n if($this->zbroja){\n $this->setZycie($this->getZycie()+$this->zbroja->getparam1());\n $this->setSzybkosc($this->getSzybkosc()-$this->zbroja->getparam1());\n }\n \n }", "title": "" }, { "docid": "7326bad75b6f302d380a047d4357cb87", "score": "0.5759134", "text": "public function descuentoViajesPlus();", "title": "" }, { "docid": "cf5662deec0888eaad0cd468e2ddb4fb", "score": "0.5754085", "text": "public function okruzi();", "title": "" }, { "docid": "50e859e3dc83a0df6d7cfb4707fb28ce", "score": "0.5751264", "text": "public function getDipendenteId(){return $this->idDipendente;}", "title": "" }, { "docid": "a8a05955efef7dc293c85454dc68a8be", "score": "0.5724212", "text": "function pelajaranrekap(){\n $tgl = date('Y-m-d');\n $variabel['tanggal'] = $tgl;\n $variabel['data'] = $this->m_rekap_santriwati->datapelajaran();\n $this->layout->renderakdp('back-end/akademik/rekap_presensi_p/v_data_pelajaran',$variabel,'back-end/akademik/rekap_presensi_p/v_rekap_js');\n }", "title": "" }, { "docid": "d8637505e1281a95ff97f90b30db6c4a", "score": "0.5718228", "text": "public function naselja();", "title": "" }, { "docid": "ead41bc644f508ade8990615ce799030", "score": "0.57111174", "text": "function pelajaran(){\n $variabel['data'] = $this->m_pelajaran->lihatdata();\n $this->layout->renderakdp('back-end/akademik/presensi_pelajaran_p/v_pelajaran',$variabel,'back-end/akademik/presensi_pelajaran_p/v_pelajaran_js');\n }", "title": "" }, { "docid": "c5dfef889301b26bb3b11fd0176d2d5d", "score": "0.5706575", "text": "function situatiePlati() {\n\t\treturn douazecimale($this -> platit_total);\n\t}", "title": "" }, { "docid": "8494e79d5af5ba4a6680af55deedbfb4", "score": "0.56623024", "text": "public function drogueria(){\n \n $laboratorio = new ModeloBandeja();\n $mostrarDrog = $laboratorio->autorizacionDrogueria();\n $_SESSION[\"method\"] = true;\n $total = $this->contador();\n require_once(\"views/components/Bandeja/drogueria.php\");\n }", "title": "" }, { "docid": "24f7f03f9926fc376b5050c493c027df", "score": "0.5658853", "text": "public function doprinosNezaposlenostPoslodavac() {\n return round($this->osnovicaDoprinosa() * $this->payment->getValue('stopaNezaposlenostPoslodavac') / 100, 2);\n }", "title": "" }, { "docid": "bcb099abece128ca2af562b49e1c3c40", "score": "0.5657252", "text": "function ProvjeriPodatke() {\n $greska = \"\";\n foreach ($_POST as $kljuc => $vrijednost) { //petlja za svaki element forme\n if (empty($vrijednost)) { // ako je vrijednost elementa prazna\n $greska .= \" $kljuc vrijednost nije unesena.\" . '\\n';\n $GLOBALS['popisGresaka'] .= \"Element s greskom: \" . $kljuc . \"<br>\";\n } elseif ($kljuc == \"opisKategorije\") {\n if ($vrijednost{0} !== strtoupper($vrijednost{0}) || strlen($vrijednost) < 15) { // ako je prvo slovo malo ili ima manje od 5 znakova\n $greska .= \"Opis kategorije mora početi s velikim slovom i sadržavati minimalno 15 znakova\" . '\\n';\n $GLOBALS['popisGresaka'] .= \"Element s greskom: \" . $kljuc . \"<br>\";\n }\n }\n }\n if (!empty($greska)) {\n echo \"<script>alert('$greska');</script>\"; // ispisi sve greske (ako ih ima)\n }\n }", "title": "" }, { "docid": "52d3b6085eae9db9a9e7c25269d0ab17", "score": "0.56559664", "text": "public function doprinosZdravstvoPoslodavac() {\n return round($this->osnovicaDoprinosa() * $this->payment->getValue('stopaZdravstvoPoslodavac') / 100, 2);\n }", "title": "" }, { "docid": "31278a18ff1002687e1360a0d471d983", "score": "0.5643474", "text": "function pobierzWszystkieGalerie() {\n \t$daneGaleriiZdjec = new DaneGaleriiZdjec(ZarzadcaGaleriiZdjec::pobierzPolaczenieZBazaDanychMysql());\n \t$listaGaleriiZdjec = $daneGaleriiZdjec->pobierzWszystkieGalerie();\n\t\t\n\t\tif (count($listaGaleriiZdjec) == 0) {\n\t\t\techo \"Blad w metodzie ZarzadcaGaleriiZdjec::pobierzWszystkieGalerie. Nie znaleziono zadnej galerii zdjec.<br />\\n\";\n\t\t}\n\t\t\n\t\treturn $listaGaleriiZdjec;\n }", "title": "" }, { "docid": "3e4e484809723cbe2bbe18e5c4c059ad", "score": "0.56369686", "text": "function ProvjeriPodatke() {\n $greska = \"\";\n foreach ($_POST as $kljuc => $vrijednost) { //petlja za svaki element forme\n if (empty($vrijednost)) { // ako je vrijednost elementa prazna\n $greska .= \" $kljuc vrijednost nije unesena.\" . '\\n';\n $GLOBALS['popisGresaka'] .= \"Element s greskom: \" . $kljuc . \"<br>\";\n }\n }\n if (!empty($greska)) {\n echo \"<script>alert('$greska');</script>\"; // ispisi sve greske (ako ih ima)\n }\n }", "title": "" }, { "docid": "12401f9c8561c101d45f6bb034c053c7", "score": "0.5633153", "text": "public function przychody()\n {\n\n\n $rejony = $this->Statistic_model->s_przychody_rejon(); // procedura\n $rejony_w = $this->Statistic_model->s_wydatki_rejony(); // procedura\n\n $wykres = $this->Statistic_model->s_przychody_wkres_lin();\n\n $header['title'] = \"Analiza przychodów\";\n // $out['d'] = $dane;\n $out['r'] = $rejony;\n $out['r_w'] = $rejony_w;\n\n $out['wykres'] = $wykres;\n\n $out['_ow_w'] = $this->Statistic_model->s_ostatnie_przychody_ten_miesiac();\n\n $out['srednia'] = $this->Statistic_model->s_przychody_sredniczasplacenia(); // procedura\n\n $out['klienci'] = $this->Statistic_model->s_przychody_klient(); // procedura\n\n $this->load->view(\"partial/header\", $header);\n $this->load->view(\"Analityka/przychody\", $out);\n $this->load->view(\"partial/footer\");\n\n }", "title": "" }, { "docid": "6efced369522b554a366901fc94d4df5", "score": "0.563259", "text": "public function osnovicaPorez() {\n $ukNeoporezovano = $this->neoporezivo();\n\n if ($this->ukBruto > $ukNeoporezovano) {\n return round($this->ukBruto - $ukNeoporezovano, 2);\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "407b096ffb0ab426f1ce3d2e18bceeb1", "score": "0.5630821", "text": "public function expel();", "title": "" }, { "docid": "e14e84a48f510eca85069aef68a7e6ac", "score": "0.5628784", "text": "public function dar_costos(){\n\t\t$valor = $this->get_precio();\n\t\treturn $valor;\n\t}", "title": "" }, { "docid": "d94311f8557a48526d04435ff31ad50c", "score": "0.5626806", "text": "public function naknadaOdsustvoPraznik() {\n return round($this->karnet->getValue('satiOdsustvoPraznik') * $this->karnet->getValue('prosek3Meseca'), 2);\n }", "title": "" }, { "docid": "93e49c8f14b6ed984420a26f2dc00295", "score": "0.55995214", "text": "public function postaviKomPre(){\n $idOglasa=$_POST['idOglasa'];\n $oglas= Ad::getAdWithId($idOglasa);\n require_once './views/RecenzijeObican/recenzija.php'; \n \n \n \n }", "title": "" }, { "docid": "0cf4d51f84a927d9b79161e0762cf3c8", "score": "0.5595369", "text": "public function dameSueldoTotal(): float{\n //return $this->getSueldo() + $this->incentivo;// no hace falta porque el modificar de acceso de sueldo de la clase padre es protected\n return $this->sueldo + $this->incentivo;\n }", "title": "" }, { "docid": "2f196c721a21458ee4934a57aa625cda", "score": "0.55943733", "text": "abstract protected function nacionalidades();", "title": "" }, { "docid": "c98d304abb8aff4cbde925721c3a6dfc", "score": "0.5588935", "text": "function brojKrivihPrijava($korime) {\n $baza = new Baza();\n $baza->spojiDB();\n $sql = \"SELECT broj_krivih_prijava FROM korisnik WHERE korisnicko_ime='\" . $korime . \"';\";\n $rs = $baza->selectDB($sql);\n $podaci = $rs->fetch_array();\n $krivePrijave = $podaci['broj_krivih_prijava'];\n $baza->zatvoriDB();\n return $krivePrijave;\n}", "title": "" }, { "docid": "123864eb1ecfc8cf50b38b3b1a5e73ae", "score": "0.5585223", "text": "public function orges()\n {\n }", "title": "" }, { "docid": "26222c27a854e2641392a30cffb223e3", "score": "0.55837256", "text": "public function getIdDinamikScdl(){\n\t\t$geo=$this->GEO_ID; \t\t\t\t\t//GET FROM CUSTOMER GEO\n\t\t$subGeo=$this->GEO_SUB;\t\t\t\t\t//SET BY FORM GUI\n\t\t$pekanGanjilGenap=$this->ODD_EVEN;\t\t//SET BY FORM GUI\n\t\t$dayNilai=$this->DAY_VALUE;\t\t\t\t//SET BY FORM GUI\t\t\n\t\t$proses=$this->PROSES_ID;\t\t\t\t//SET BY FORM GUI DEFAULT =1 (ACTIVE CALL)\n\t\tif ($geo!=''){\t\t\t\t\t\t\t// GEO = check semua customer dalam group GEO\n\t\t\tif ($subGeo!=''){\t\t\t\t\t// Check SubGeo Validation scenario jika jumlah customer dalam (GEO+HARI) Full, harus new SubGeo.\n\t\t\t\tif ($pekanGanjilGenap!=''){\t\t// Check hari of week[ganjil/genap] Validation scenario jumlah customer sesuai max default/max MIX\n\t\t\t\t\tif ($dayNilai!=''){\t\t\t// Check Layer B=u or A,B,C,D=m\n\t\t\t\t\t\tif ($proses!=''){\t\t// Check Layer B=u or A,B,C,D=m\n\t\t\t\t\t\t\t$valueFormua= $geo .'.'.$subGeo.'.'.$pekanGanjilGenap.'.'.$dayNilai.'.'.$proses; \n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$valueFormua= \"NotSet\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$valueFormua= \"NotSet\";\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif ($dayNilai!=''){\t\t\t// Check Layer B=u or A,B,C,D=m\n\t\t\t\t\t\tif ($proses!=''){\t\t// Check Layer B=u or A,B,C,D=m\n\t\t\t\t\t\t\t$valueFormua= $geo .'.'.$subGeo.'.0.'.$dayNilai.'.'.$proses; \n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$valueFormua= \"NotSet\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$valueFormua= \"NotSet\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$valueFormua= \"NotSet\";\t\n\t\t\t}\t\t\t\n\t\t}else{\n\t\t\t$valueFormua= \"NotSet\";\n\t\t}\n\t\treturn $valueFormua;\n\t}", "title": "" }, { "docid": "9a3d92e6ea1317a95c669e73b303f775", "score": "0.5579465", "text": "function gravarvendas(){\r\n\t\tif(param(\"FRENTECAIXA\", \"METODOGRAVARVENDAS\", $this->con) === \"1\"){\r\n\t\t\treturn $this->gravarvendas_();\r\n\t\t}\r\n\r\n\t\t// Grava os Vasilhames\r\n\t\tif(is_array($this->vasilhames)){\r\n\t\t\tforeach($this->vasilhames AS $arr_pdvvasilhame){\r\n\t\t\t\tforeach($arr_pdvvasilhame as $pdvvasilhame){\r\n\t\t\t\t\tif(substr($pdvvasilhame->getentsai(), 0, 1) == \"D\"){\r\n\t\t\t\t\t\t$entsai = substr($pdvvasilhame->getentsai(), 1, 1);\r\n\t\t\t\t\t\t$query = \"DELETE \";\r\n\t\t\t\t\t\t$query .= \"FROM vasilhame \";\r\n\t\t\t\t\t\t$query .= \"WHERE codestabelec = \".$this->estabelecimento->getcodestabelec().\" \";\r\n\t\t\t\t\t\tif(strlen($pdvvasilhame->getdtvenda()) > 0){\r\n\t\t\t\t\t\t\t$query .= \" AND dtvenda = '{$pdvvasilhame->getdtvenda()}'\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$query .= \" AND dtrecepcao = '{$pdvvasilhame->getdtrecepcao()}'\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$query .= \" AND entsai = '{$entsai}' \";\r\n\t\t\t\t\t\t$query .= \" AND codvasilhame = {$pdvvasilhame->getcodvasilhame()} \";\r\n\t\t\t\t\t\t$query .= \" AND numrecepcao = {$pdvvasilhame->getnumrecepcao()} \";\r\n\t\t\t\t\t\t$res = $this->con->query($query);\r\n\r\n\t\t\t\t\t\tif(!$res->execute()){\r\n\t\t\t\t\t\t\t$_SESSION[\"ERROR\"] = \"Vasilhame com error.\";\r\n\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(strlen($pdvvasilhame->getcodvasilhame()) == 0){\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$query = \"SELECT codvasilhame \";\r\n\t\t\t\t\t\t$query .= \"FROM vasilhame \";\r\n\t\t\t\t\t\t$query .= \"WHERE codestabelec = \".$this->estabelecimento->getcodestabelec().\" \";\r\n\t\t\t\t\t\tif(strlen($pdvvasilhame->getdtvenda()) > 0){\r\n\t\t\t\t\t\t\t$query .= \" AND dtvenda = '{$pdvvasilhame->getdtvenda()}'\";\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$query .= \" AND dtrecepcao = '{$pdvvasilhame->getdtrecepcao()}'\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$query .= \" AND entsai = '{$pdvvasilhame->getentsai()}' \";\r\n\t\t\t\t\t\t$query .= \" AND codvasilhame = {$pdvvasilhame->getcodvasilhame()} \";\r\n\t\t\t\t\t\t$query .= \" AND numrecepcao = {$pdvvasilhame->getnumrecepcao()} \";\r\n\r\n\t\t\t\t\t\t$res = $this->con->query($query);\r\n\t\t\t\t\t\t$arr = $res->fetchAll(2);\r\n\t\t\t\t\t\tif(sizeof($arr) > 0){\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$vasilhame = objectbytable(\"vasilhame\", null, $this->con);\r\n\t\t\t\t\t\t$vasilhame->setcodestabelec($this->estabelecimento->getcodestabelec());\r\n\t\t\t\t\t\t$vasilhame->setnumrecepcao($pdvvasilhame->getnumrecepcao());\r\n\t\t\t\t\t\t$vasilhame->setcodcliente($pdvvasilhame->getcodcliente());\r\n\t\t\t\t\t\t$vasilhame->setcaixa($pdvvasilhame->getcaixa());\r\n\t\t\t\t\t\t$vasilhame->setdtvenda($pdvvasilhame->getdtvenda());\r\n\t\t\t\t\t\t$vasilhame->setdtrecepcao($pdvvasilhame->getdtrecepcao());\r\n\t\t\t\t\t\t$vasilhame->setcodfunc($pdvvasilhame->getcodfunc());\r\n\t\t\t\t\t\t$vasilhame->setquantidade($pdvvasilhame->getquantidade());\r\n\t\t\t\t\t\t$vasilhame->setcodvasilhame($pdvvasilhame->getcodvasilhame());\r\n\t\t\t\t\t\t$vasilhame->setentsai($pdvvasilhame->getentsai());\r\n\r\n\t\t\t\t\t\tif(!$vasilhame->save()){\r\n\t\t\t\t\t\t\t$_SESSION[\"ERROR\"] = \"Vasilhame com error.\";\r\n\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(sizeof($this->vendas) == 0 && sizeof($this->arr_recebepdv) == 0 && sizeof($this->vasilhames) == 0){\r\n\t\t\t$_SESSION[\"ERROR\"] = \"Nenhuma venda foi encontrada.\";\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\tsetprogress(10, \"Carregando os parametros necessarios para importacao.\", TRUE);\r\n\t\t// Carrega os parametros de estoque\r\n\t\t$paramcomissao = objectbytable(\"paramcomissao\", $this->estabelecimento->getcodestabelec(), $this->con);\r\n\t\tif(!$paramcomissao->exists()){\r\n\t\t\t$_SESSION[\"ERROR\"] = \"Par&acirc;metros de comiss&atilde;o ainda n&atilde;o foram informados para o estabelecimento.<br><a onclick=\\\"$.messageBox('close'); openProgram('CadParamComissao','codestabelec=\".$this->estabelecimento->getcodestabelec().\"')\\\">Clique aqui</a> para abrir os par&acirc;metros de comiss&atilde;o.\";\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\tsetprogress(35, \"Carregando os parametros necessarios para importacao.\", TRUE);\r\n\t\t$paramestoque = objectbytable(\"paramestoque\", $this->estabelecimento->getcodemitente(), $this->con);\r\n\t\tif(strlen($paramestoque->getcodclientevendapdv()) == 0){\r\n\t\t\t$_SESSION[\"ERROR\"] = \"Cliente padr&atilde;o n&atilde;o foi informado na par&acirc;metriza&ccedil;&atilde;o de estoque.<br><a onclick=\\\"$.messageBox('close'); openProgram('ParamEst','codemitente=\".$this->estabelecimento->getcodemitente().\"')\\\">Clique aqui</a> para abrir os par&acirc;metros de estoque.\";\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\tsetprogress(75, \"Carregando os parametros necessarios para importacao.\", TRUE);\r\n\t\t$codtpdocto = $paramestoque->getcodtpdoctovendapdv();\r\n\t\tif(strlen($codtpdocto) == 0){\r\n\t\t\t$_SESSION[\"ERROR\"] = \"Tipo de documento para venda (PDV) n&atilde;o foi informado na par&acirc;metriza&ccedil;&atilde;o de estoque.<br><a onclick=\\\"$.messageBox('close'); openProgram('ParamEst','codemitente=\".$this->estabelecimento->getcodemitente().\"')\\\">Clique aqui</a> para abrir os par&acirc;metros de estoque.\";\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\t// Verifica se o cupom ativo soh tem itens cancelados\r\n\t\tforeach($this->vendas as $pdvvenda){\r\n\t\t\tif($pdvvenda->getstatus() === \"A\"){\r\n\t\t\t\t$cancelado = true;\r\n\t\t\t\tforeach($pdvvenda->pdvitem as $pdvitem){\r\n\t\t\t\t\tif($pdvitem->getstatus() !== \"C\"){\r\n\t\t\t\t\t\t$cancelado = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif($cancelado){\r\n\t\t\t\t\t$pdvvenda->setstatus(\"C\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tsetprogress(90, \"Verificando ECFs cadastradas\", TRUE);\r\n\t\t$ecf = objectbytable(\"ecf\", NULL, $this->con);\r\n\t\t$ecf->setcodestabelec($this->estabelecimento->getcodestabelec());\r\n\t\t$ecf->setstatus(\"A\");\r\n\t\t$arr_ecf_aux = object_array($ecf);\r\n\t\t$arr_ecf = array();\r\n\t\tforeach($arr_ecf_aux as $ecf){\r\n\t\t\t$arr_ecf[$ecf->getcaixa()] = $ecf;\r\n\t\t}\r\n\t\tforeach($this->vendas as $pdvvenda){\r\n\t\t\tif(!isset($arr_ecf[$pdvvenda->getcaixa()])){\r\n\t\t\t\t$_SESSION[\"ERROR\"] = \"Equipamento fiscal no caixa {$pdvvenda->getcaixa()} n&atilde;o foi encontrado no cadastro para o cupom de número {$pdvvenda->getcupom()}.<br><a onclick=\\\"$.messageBox('close'); openProgram('Ecf')\\\">Clique aqui</a> para abrir o cadastro de Equipamentos Fiscais.\";\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Carrega as datas que ja foram feitas leitura na loja\r\n\t\t$arrDatas = array(\"old\" => array(), \"new\" => array());\r\n\t\t$leituradata = objectbytable(\"leituradata\", NULL, $this->con);\r\n\t\t$leituradata->setcodestabelec($this->estabelecimento->getcodestabelec());\r\n\t\t$arr_leituradata = object_array($leituradata);\r\n\t\tforeach($arr_leituradata as $leituradata){\r\n\t\t\t$arrDatas[\"old\"][] = $leituradata->getdtmovto();\r\n\t\t}\r\n\r\n\t\t// Verifica os produtos cadastrados\r\n\t\tsetprogress(0, \"Verificando produtos cadastrados.\", true);\r\n\t\t$arr_codproduto = array();\r\n\t\tforeach($this->vendas as $pdvvenda){\r\n\t\t\tforeach($pdvvenda->pdvitem as $pdvitem){\r\n\t\t\t\t$arr_codproduto[] = $pdvitem->getcodproduto();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$arr_codproduto = array_unique($arr_codproduto);\r\n\t\t$priopesqproduto = $this->frentecaixa->gettipocodproduto() == \"E\" ? \"1\" : \"0\";\r\n\t\t$consultaproduto = new ConsultaProduto($this->con, $priopesqproduto);\r\n\t\t$consultaproduto->addcodproduto($arr_codproduto);\r\n\t\t$consultaproduto->consultar();\r\n\t\t$arr_codproduto_naoencontrado = $consultaproduto->getnaoencontrado();\r\n\t\tif(count($arr_codproduto_naoencontrado) > 0){\r\n\t\t\t$param_estoque_codprodnaocad = trim(param(\"ESTOQUE\", \"CODPRODNAOCAD\", $this->con));\r\n\t\t\tif(strlen($param_estoque_codprodnaocad) > 0){\r\n\t\t\t\tforeach($this->vendas as $pdvvenda){\r\n\t\t\t\t\tforeach($pdvvenda->pdvitem as $pdvitem){\r\n\t\t\t\t\t\tif(in_array($pdvitem->getcodproduto(), $arr_codproduto_naoencontrado)){\r\n\t\t\t\t\t\t\t$pdvitem->setcodproduto($param_estoque_codprodnaocad);\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}else{\r\n\t\t\t\t$_SESSION[\"ERROR\"] = \"Existem produtos não cadastrados no arquivo de vendas. Recadastre os produtos apagados para prosseguir com a leitura.<br><br>Lista de produtos não encontrados:<br>\".implode(\", \", $arr_codproduto_naoencontrado);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$arr_codproduto_encontrado = $consultaproduto->getencontrado();\r\n\t\tforeach($this->vendas as $pdvvenda){\r\n\t\t\tforeach($pdvvenda->pdvitem as $pdvitem){\r\n\t\t\t\t$codproduto = $arr_codproduto_encontrado[$pdvitem->getcodproduto()];\r\n\t\t\t\tif(strlen($codproduto) === 0){\r\n\t\t\t\t\t$codproduto = $param_estoque_codprodnaocad;\r\n\t\t\t\t}\r\n\t\t\t\t$pdvitem->setcodproduto($codproduto);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Carrega os produtos\r\n\t\tif(count($arr_codproduto_encontrado) > 0){\r\n\t\t\tsetprogress(0, \"Carregando cadastro de produtos.\", true);\r\n\t\t\t$query = \"SELECT produto.codproduto, produtoean.codean, produtoestab.custorep AS custo, produtoestab.custotab, produtoestab.custosemimp, classfiscal.tptribicms, classfiscal.aliqicms, \";\r\n\t\t\t$query .= \"\tclassfiscal.aliqredicms, embalagem.codunidade, embalagem.quantidade AS qtdeunidade, piscofins.aliqpis, piscofins.aliqcofins \";\r\n\t\t\t$query .= \"FROM produto \";\r\n\t\t\t$query .= \"LEFT JOIN produtoestab ON (produto.codproduto = produtoestab.codproduto) \";\r\n\t\t\t$query .= \"LEFT JOIN classfiscal ON (produto.codcfpdv = classfiscal.codcf) \";\r\n\t\t\t$query .= \"LEFT JOIN piscofins ON (produto.codpiscofinssai = piscofins.codpiscofins) \";\r\n\t\t\t$query .= \"LEFT JOIN produtoean ON (produto.codproduto = produtoean.codproduto) \";\r\n\t\t\t$query .= \"LEFT JOIN embalagem ON (produto.codembalvda = embalagem.codembal) \";\r\n\t\t\t$query .= \"WHERE produtoestab.codestabelec = \".$this->estabelecimento->getcodestabelec().\" \";\r\n\t\t\t$query .= \" AND produto.codproduto IN (\".implode(\",\", $arr_codproduto_encontrado).\") \";\r\n\t\t\t$query .= \"ORDER BY produto.codproduto \";\r\n\t\t\t$res = $this->con->query($query);\r\n\t\t\t$arrProduto = $res->fetchAll(2);\r\n\t\t}else{\r\n\t\t\t$arrProduto = array();\r\n\t\t}\r\n\r\n\t\t// Carrega a lista de clientes cadastrados\r\n\t\tsetprogress(0, \"Carregando cadastro de clientes.\", TRUE);\r\n\t\t$res = $this->con->query(\"SELECT codcliente, cpfcnpj FROM cliente\");\r\n\t\t$arr = $res->fetchAll(2);\r\n\t\t$arrCliente = array();\r\n\t\tforeach($arr as $row){\r\n\t\t\t$arrCliente[$row[\"codcliente\"]] = $row[\"cpfcnpj\"];\r\n\t\t}\r\n\r\n\t\t// Carrega a lista de todas as finalizadoras cadastradas\r\n\t\tsetprogress(0, \"Carregando cadastro de finalizadoras.\", TRUE);\r\n\t\t$res = $this->con->query(\"SELECT finalizadora.*, especie.geraliquidado FROM finalizadora INNER JOIN especie ON (finalizadora.codespecie = especie.codespecie) WHERE codestabelec = \".$this->estabelecimento->getcodestabelec());\r\n\t\t$arr = $res->fetchAll(2);\r\n\t\t$arr_finalizadora = array();\r\n\t\tforeach($arr as $row){\r\n\t\t\t$arr_finalizadora[$row[\"codfinaliz\"]] = $row;\r\n\t\t}\r\n\r\n\t\t$arrCodProduto = array();\r\n\t\t$arrCodEan = array();\r\n\t\tforeach($arrProduto as $i => $row){\r\n\t\t\t$arrCodProduto[$i] = $row[\"codproduto\"];\r\n\t\t\t$arrCodEan[$i] = $row[\"codean\"];\r\n\t\t}\r\n\r\n\t\t// Carrega lista de bancos cadastrados\r\n\t\tsetprogress(0, \"Carregando cadastro de bancos.\", TRUE);\r\n\t\t$res = $this->con->query(\"SELECT * FROM banco\");\r\n\t\t$arr = $res->fetchAll(2);\r\n\t\t$arr_banco = array();\r\n\t\tforeach($arr as $row){\r\n\t\t\t$arr_banco[$row[\"codoficial\"]] = $row;\r\n\t\t}\r\n\r\n\t\t// Carrega as condicoes de pagamento\r\n\t\tsetprogress(0, \"Carregando condicoes de pagamento\", TRUE);\r\n\t\t$arr_condpagto = array();\r\n\t\t$arr_condpagto_aux = object_array(objectbytable(\"condpagto\", NULL, $this->con));\r\n\t\tforeach($arr_condpagto_aux as $condpagto){\r\n\t\t\t$arr_condpagto[$condpagto->getcodcondpagto()] = $condpagto;\r\n\t\t}\r\n\r\n\t\t// Verifica se todas as finalizadoras e BIN existem no cadastro\r\n\t\tif(TRUE){\r\n\t\t\t$query = \"SELECT DISTINCT ad.tipotransacao AS tipotransacao, adbin.codadminist,adbin.bin \";\r\n\t\t\t$query .= \"FROM administradorabin AS adbin \";\r\n\t\t\t$query .= \"INNER JOIN administradora ad ON (adbin.codadminist = ad.codadminist) \";\r\n\t\t\t$query .= \"WHERE ad.tipotransacao IS NOT NULL AND adbin.bin IS NOT NULL \";\r\n\t\t\t$query .= \"ORDER BY 1, 2, 3 \";\r\n\t\t}\r\n\r\n\t\t$res = $this->con->query($query);\r\n\t\t$this->arr_bin = $res->fetchAll();\r\n\r\n\t\t$arr_finalizadora_naoencontrado = array();\r\n\t\t$arr_bin_naoencontrado = array();\r\n\t\tforeach($this->finalizadoras as $finalizador){\r\n\t\t\tif(!array_key_exists($finalizador->getcodfinaliz(), $arr_finalizadora)){\r\n\t\t\t\t$arr_finalizadora_naoencontrado[] = $finalizador->getcodfinaliz();\r\n\t\t\t}\r\n\r\n\t\t\t$ok = FALSE;\r\n\t\t\tif(strlen($finalizador->getbin()) > 0 && strlen($finalizador->gettipotransacao()) > 0 && sizeof($this->arr_bin) > 0){\r\n\t\t\t\tforeach($this->arr_bin AS $bin){\r\n\t\t\t\t\tif($finalizador->getbin() == $bin[\"bin\"] && $finalizador->gettipotransacao() == $bin[\"tipotransacao\"]){\r\n\t\t\t\t\t\tif(strlen($bin[\"codadminist\"]) > 0){\r\n\t\t\t\t\t\t\t$ok = TRUE;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(!$ok){\r\n\t\t\t\t\t$arr_bin_naoencontrado[] = $finalizador->getbin().\" \".$finalizador->gettipotransacao();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$arr_finalizadora_naoencontrado = array_unique($arr_finalizadora_naoencontrado);\r\n\t\tif(sizeof($arr_finalizadora_naoencontrado) > 0){\r\n\t\t\t$_SESSION[\"ERROR\"] = \"Existem finalizadoras n&atilde;o cadastradas no arquivo de vendas. Cadastre as finalizadoras para prosseguir com a leitura.<br><br>Lista de finalizadoras n&atilde;o encontradas:<br>\".implode(\", \", $arr_finalizadora_naoencontrado);\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\tif(sizeof($arr_bin_naoencontrado) > 0){\r\n\t\t\t$_SESSION[\"ERROR\"] = \"Existem BIN n&atilde;o cadastradas no arquivo de vendas. Cadastre os BIN para prosseguir com a leitura.<br><br>Lista de BIN n&atilde;o encontradas:<br>\".implode(\", \", array_unique($arr_bin_naoencontrado));\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\t// Junta os mesmos produtos do cupom\r\n\t\tforeach($this->vendas as $pdvvenda){\r\n\t\t\t$arr_pdvitem = array();\r\n\t\t\tforeach($pdvvenda->pdvitem as $pdvitem1){\r\n\t\t\t\t$found = FALSE;\r\n\t\t\t\tforeach($arr_pdvitem as $pdvitem2){\r\n\t\t\t\t\tif($pdvitem1->getcodproduto() == $pdvitem2->getcodproduto() && $pdvitem1->getstatus() == $pdvitem2->getstatus()){\r\n\t\t\t\t\t\t$pdvitem2->setquantidade($pdvitem2->getquantidade() + $pdvitem1->getquantidade());\r\n\t\t\t\t\t\t$pdvitem2->setdesconto($pdvitem2->getdesconto() + $pdvitem1->getdesconto());\r\n\t\t\t\t\t\t$pdvitem2->setacrescimo($pdvitem2->getacrescimo() + $pdvitem1->getacrescimo());\r\n\t\t\t\t\t\t$pdvitem2->settotal($pdvitem2->gettotal() + $pdvitem1->gettotal());\r\n\t\t\t\t\t\t$pdvitem2->setpreco(($pdvitem2->gettotal() + $pdvitem2->getdesconto() - $pdvitem2->getacrescimo()) / $pdvitem2->getquantidade());\r\n\t\t\t\t\t\t$found = TRUE;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(!$found){\r\n\t\t\t\t\t$arr_pdvitem[] = $pdvitem1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$pdvvenda->pdvitem = $arr_pdvitem;\r\n\t\t}\r\n\r\n\t\t// Busca as composicoes do tipo explode na venda\r\n\t\tsetprogress(0, \"Carregando cadastro de composicoes\", TRUE);\r\n\t\t$arrComposicao = array();\r\n\t\tif(sizeof($arrCodProduto) > 0){\r\n\t\t\t$res = $this->con->query(\"SELECT * FROM composicao WHERE tipo IN ('A','V')\");\r\n\t\t\t$arrComposicaoAux = $res->fetchAll(2);\r\n\t\t\tforeach($arrComposicaoAux as $rowComposicao){\r\n\t\t\t\t$res = $this->con->query(\"SELECT * FROM itcomposicao WHERE codcomposicao = \".$rowComposicao[\"codcomposicao\"]);\r\n\t\t\t\t$arrComposicao[$rowComposicao[\"codproduto\"]] = $rowComposicao;\r\n\t\t\t\t$arrComposicao[$rowComposicao[\"codproduto\"]][\"itcomposicao\"] = $res->fetchAll(2);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Inicia a transacao\r\n\t\t$this->con->start_transaction();\r\n\r\n\t\t// Cadastra um novo cliente caso não encontrado o cpf ou cnpj\r\n\t\tif(param(\"CADASTRO\", \"CADAUTOCLIENTE\", $this->con) == \"S\"){\r\n\t\t\tsetprogress($i / sizeof($this->vendas) * 100, \"Verificando novos clientes: \".($i + 1).\" de \".sizeof($this->vendas));\r\n\t\t\t$arr_cpfcnpj = array();\r\n\r\n\t\t\tforeach($this->vendas as $venda){\r\n\t\t\t\tif($venda->getcpfcnpj() != NULL){\r\n\t\t\t\t\t$arr_cpfcnpj[] = $venda->getcpfcnpj();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tforeach($this->finalizadoras as $finalizadora){\r\n\t\t\t\tif($finalizadora->getcpfcliente() != NULL){\r\n\t\t\t\t\t$arr_cpfcnpj[] = $finalizadora->getcpfcliente();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tarray_unique($arr_cpfcnpj);\r\n\t\t\t$res = $this->con->query(\"SELECT cpfcnpj FROM cliente\");\r\n\t\t\t$arr = $res->fetchAll(2);\r\n\r\n\t\t\tforeach($arr_cpfcnpj as $cpfcnpj){\r\n\t\t\t\tif(valid_cpf($cpfcnpj) || valid_cnpj($cpfcnpj)){\r\n\t\t\t\t\t$cpfcnpj_bool = TRUE;\r\n\t\t\t\t\tforeach($arr as $row){\r\n\t\t\t\t\t\tif($cpfcnpj == $row[\"cpfcnpj\"]){\r\n\t\t\t\t\t\t\t$cpfcnpj_bool = FALSE;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($cpfcnpj_bool){\r\n\t\t\t\t\t\tif(!$this->gravar_cliente($cpfcnpj)){\r\n\t\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Busca os parceiros dos lancamentos\r\n\t\t$arr_codadminist = array();\r\n\t\tsetprogress(0, \"Carregando cadastro de parceiros\", TRUE);\r\n\t\t$arr_codcliente = array();\r\n\t\t$arr_codestabelec = array();\r\n\t\t$arr_codfornec = array();\r\n\t\t$arr_codtransp = array();\r\n\t\t$arr_codfunc = array();\r\n\t\tforeach($this->finalizadoras as $i => $finalizador){\r\n\t\t\t$finalizadora = $arr_finalizadora[$finalizador->getcodfinaliz()];\r\n\t\t\tif($finalizadora[\"gerafinanceiro\"] == \"S\"){\r\n\t\t\t\t$this->finalizadora_parceiro($tipoparceiro, $codparceiro, $arr_finalizadora, $arrCliente, $finalizador, $paramestoque);\r\n\t\t\t\tswitch($tipoparceiro){\r\n\t\t\t\t\tcase \"A\": $arr_codadminist[] = $codparceiro;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"C\": $arr_codcliente[] = $codparceiro;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"E\": $arr_codestabelec[] = $codparceiro;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"F\": $arr_codfornec[] = $codparceiro;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"T\": $arr_codtransp[] = $codparceiro;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"U\": $arr_codfunc[] = $codparceiro;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Carrega os codigos dos vendedores que estao nos cupons\r\n\t\tforeach($this->vendas as $pdvvenda){\r\n\t\t\t$arr_codfunc[] = $pdvvenda->getcodfunc();\r\n\t\t}\r\n\r\n\t\t// Verifica os numeros de fabricacao para os equipamentos fiscais correspondentes\r\n\t\tif(in_array($this->pdv, array(\"syspdv\", \"saurus\", \"zanthus\"))){\r\n\t\t\t$arr_numfabricacao = [];\r\n\t\t\tforeach($this->vendas as $venda){\r\n\t\t\t\tif(strlen($venda->getnumfabricacao()) > 0){\r\n\t\t\t\t\tif(!in_array($venda->getnumfabricacao(), $arr_numfabricacao)){\r\n\t\t\t\t\t\t$numfabricacao = trim($venda->getnumfabricacao());\r\n\t\t\t\t\t\t$query = \"SELECT codecf FROM ecf WHERE status='A' AND numfabricacao = '{$numfabricacao}'\";\r\n\t\t\t\t\t\t$res = $this->con->query($query);\r\n\t\t\t\t\t\t$codecf = $res->fetchColumn();\r\n\t\t\t\t\t\tif(strlen($codecf) <= 0){\r\n\t\t\t\t\t\t\t$msg = \"Numero de fabrica&ccedil;&atilde;o do equipamento fiscal n&atilde;o encontrado <b>{$venda->getnumfabricacao()}</b> para o caixa <b>{$venda->getcaixa()}</b> e cupom <b>{$venda->getcupom()}</b>\";\r\n\t\t\t\t\t\t\t$_SESSION[\"ERROR\"] = $msg;\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$arr_numfabricacao[$numfabricacao] = $codecf;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Carrega um array de objetos para cada tipo de parceiro\r\n\t\t$arr_administradora = object_array_key(objectbytable(\"administradora\", NULL, $this->con), $arr_codadminist);\r\n\t\t$arr_cliente = object_array_key(objectbytable(\"cliente\", NULL, $this->con), $arr_codcliente);\r\n\t\t$arr_estabelecimento = object_array_key(objectbytable(\"estabelecimento\", NULL, $this->con), $arr_codestabelec);\r\n\t\t$arr_fornecedor = object_array_key(objectbytable(\"fornecedor\", NULL, $this->con), $arr_codfornec);\r\n\t\t$arr_transportadora = object_array_key(objectbytable(\"transportadora\", NULL, $this->con), $arr_codtransp);\r\n\t\t$arr_funcionario = object_array_key(objectbytable(\"funcionario\", NULL, $this->con), $arr_codfunc);\r\n\r\n\t\t$administestabelec = objectbytable(\"administestabelec\", NULL, $this->con);\r\n\t\t$administestabelec->setcodestabelec($this->estabelecimento->getcodestabelec());\r\n\t\t$arr_administestabelec = object_array($administestabelec);\r\n\r\n\t\t// Carrega a lista de codigo de vendedores cadastrados\r\n\t\t$res = $this->con->query(\"SELECT codfunc FROM funcionario\");\r\n\t\t$arr = $res->fetchAll(2);\r\n\t\t$arr_codfunc = array();\r\n\t\tforeach($arr as $row){\r\n\t\t\t$arr_codfunc[] = $row[\"codfunc\"];\r\n\t\t}\r\n\r\n\t\t// Remove cupons duplicados no mesmo lote\r\n\t\t$arr_pdvvenda = array();\r\n\t\tforeach($this->vendas as $pdvvenda1){\r\n\t\t\tforeach($arr_pdvvenda as $pdvvenda2){\r\n\t\t\t\tif($pdvvenda1->getdata() === $pdvvenda2->getdata() && $pdvvenda1->getcaixa() === $pdvvenda2->getcaixa() && $pdvvenda1->getcupom() === $pdvvenda2->getcupom() && $pdvvenda1->getstatus() === $pdvvenda2->getstatus() && $pdvvenda1->getseqecf() === $pdvvenda2->getseqecf()){\r\n\t\t\t\t\tcontinue 2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$arr_pdvvenda[] = $pdvvenda1;\r\n\t\t}\r\n\t\t$this->vendas = $arr_pdvvenda;\r\n\r\n\t\t// Reordena as venda para ler os cancelamentos por ultimo\r\n\t\t$arr_venda_a = array();\r\n\t\t$arr_venda_c = array();\r\n\t\tforeach($this->vendas as $i => $venda){\r\n\t\t\tsetprogress(($i + 1) / sizeof($this->vendas) * 100, \"Reordenando cupons: \".($i + 1).\" de \".sizeof($this->vendas));\r\n\t\t\tswitch($venda->getstatus()){\r\n\t\t\t\tcase \"A\": $arr_venda_a[] = $venda;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"C\": $arr_venda_c[] = $venda;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Remove cupons duplicados (nao cancelados)\r\n\t\tsetprogress(0, \"Verificando cupons duplicados\", TRUE);\r\n\t\t$arr_chave = array();\r\n\t\tforeach($arr_venda_a as $venda){\r\n\t\t\t$arr_chave[] = \"('\".$venda->getdata().\"','\".$venda->getcaixa().\"','\".$venda->getcupom().\"','\".$venda->getseqecf().\"')\";\r\n\t\t\t//$arr_chave[] = \"('\".$venda->getdata().\"','\".$venda->getcaixa().\"','\".$venda->getcupom().\"')\";\r\n\t\t}\r\n\t\t$arr_chave = array_unique($arr_chave);\r\n\t\tif(sizeof($arr_chave) > 0){\r\n\t\t\t$query = \"SELECT idcupom, dtmovto, caixa, cupom, totalliquido \";\r\n\t\t\t$query .= \"FROM cupom \";\r\n\t\t\t$query .= \"WHERE codestabelec = \".$this->estabelecimento->getcodestabelec().\" \";\r\n\t\t\t$query .= \" AND ((dtmovto,caixa,cupom,COALESCE(seqecf,'')) IN (\".implode(\",\", $arr_chave).\")) \";\r\n\t\t\t//$query .= \" AND status = 'A' \";\r\n\t\t\t$res = $this->con->query($query);\r\n\t\t\t$arr = $res->fetchAll(2);\r\n\t\t\tforeach($arr as $i => $row){\r\n\t\t\t\tsetprogress((($i + 1) / sizeof($arr) * 100), \"Removendo cupons duplicados: \".($i + 1).\" de \".sizeof($arr));\r\n\t\t\t\tforeach($arr_venda_a as $j => $venda){\r\n\t\t\t\t\tif($venda->getdata() == $row[\"dtmovto\"] && $venda->getcaixa() == $row[\"caixa\"] && $venda->getcupom() == $row[\"cupom\"]){\r\n\t\t\t\t\t\t$totalitens = 0;\r\n\t\t\t\t\t\tforeach($venda->pdvitem as $pdvitem){\r\n\t\t\t\t\t\t\tif($pdvitem->getstatus() === \"A\"){\r\n\t\t\t\t\t\t\t\t$totalitens += $pdvitem->gettotal();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tunset($arr_venda_a[$j]);\r\n\t\t\t\t\t\t/*if(round($totalitens, 2) == round($row[\"totalliquido\"], 2)){\r\n\t\t\t\t\t\t\tunset($arr_venda_a[$j]);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$cupom = objectbytable(\"cupom\", $row[\"idcupom\"], $this->con);\r\n\t\t\t\t\t\t\tif(!$cupom->delete()){\r\n\t\t\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}*/\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tforeach($this->finalizadoras as $j => $finalizador){\r\n\t\t\t\t\tif($finalizador->getdata() == $row[\"dtmovto\"] && $finalizador->getcaixa() == $row[\"caixa\"] && $finalizador->getcupom() == $row[\"cupom\"]){\r\n\t\t\t\t\t\tif(round($totalitens, 2) == round($row[\"totalliquido\"], 2)){\r\n\t\t\t\t\t\t\tunset($this->finalizadoras[$j]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Remove cupons duplicados (cancelados)\r\n\t\tsetprogress(0, \"Verificando cupons duplicados\", TRUE);\r\n\t\t$arr_chave = array();\r\n\t\tforeach($arr_venda_c as $venda){\r\n\t\t\t$arr_chave[] = \"('\".$venda->getdata().\"','\".$venda->getcaixa().\"','\".$venda->getcupom().\"')\";\r\n\t\t}\r\n\t\t$arr_chave = array_unique($arr_chave);\r\n\t\tif(sizeof($arr_chave) > 0){\r\n\t\t\t$query = \"SELECT dtmovto, caixa, cupom \";\r\n\t\t\t$query .= \"FROM cupom \";\r\n\t\t\t$query .= \"WHERE codestabelec = \".$this->estabelecimento->getcodestabelec().\" \";\r\n\t\t\t$query .= \" AND ((dtmovto,caixa,cupom) IN (\".implode(\",\", $arr_chave).\")) \";\r\n\t\t\t$query .= \" AND status = 'C' \";\r\n\t\t\t$res = $this->con->query($query);\r\n\t\t\t$arr = $res->fetchAll(2);\r\n\t\t\tforeach($arr as $i => $row){\r\n\t\t\t\tsetprogress((($i + 1) / sizeof($arr) * 100), \"Removendo cupons duplicados: \".($i + 1).\" de \".sizeof($arr));\r\n\t\t\t\tforeach($arr_venda_c as $j => $venda){\r\n\t\t\t\t\tif($venda->getdata() == $row[\"dtmovto\"] && $venda->getcaixa() == $row[\"caixa\"] && $venda->getcupom() == $row[\"cupom\"]){\r\n\t\t\t\t\t\tunset($arr_venda_c[$j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tforeach($this->finalizadoras as $j => $finalizador){\r\n\t\t\t\t\tif($finalizador->getdata() == $row[\"dtmovto\"] && $finalizador->getcaixa() == $row[\"caixa\"] && $finalizador->getcupom() == $row[\"cupom\"]){\r\n\t\t\t\t\t\tunset($this->finalizadoras[$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\r\n\t\t// Remove Recebimento Duplicado\r\n\t\tsetprogress(0, \"Verificando recebimentos duplicados\", TRUE);\r\n\t\tif(is_array($this->arr_recebepdv)){\r\n\t\t\tforeach($this->arr_recebepdv AS $i => $recebepdv){\r\n\t\t\t\t$query = \"SELECT dtmovto, caixa, cupom, codestabelec \";\r\n\t\t\t\t$query .= \"FROM recebepdv \";\r\n\t\t\t\t$query .= \"WHERE codestabelec = \".$this->estabelecimento->getcodestabelec().\" \";\r\n\t\t\t\t$query .= \" AND dtmovto = '{$recebepdv->getdtmovto()}' AND caixa = {$recebepdv->getcaixa()} AND cupom='{$recebepdv->getcupom()}' \";\r\n\r\n\t\t\t\t$res = $this->con->query($query);\r\n\t\t\t\t$arr = $res->fetchAll(2);\r\n\t\t\t\tforeach($arr as $i => $row){\r\n\t\t\t\t\tsetprogress((($i + 1) / sizeof($arr) * 100), \"Removendo recebimentos duplicados: \".($i + 1).\" de \".sizeof($arr));\r\n\t\t\t\t\tforeach($this->finalizadoras as $j => $finalizador){\r\n\t\t\t\t\t\tif($finalizador->getdata() == $row[\"dtmovto\"] && $finalizador->getcaixa() == $row[\"caixa\"] && $finalizador->getcupom() == $row[\"cupom\"]){\r\n\t\t\t\t\t\t\tunset($this->finalizadoras[$j]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Junta as vendas normais com as canceladas\r\n\t\t$this->vendas = array_merge($arr_venda_a, $arr_venda_c);\r\n\r\n\t\t// Percorre todas as finalizadoras\r\n\t\t$arr_lancamento = array(); // Grupo de lancamentos sinteticos\r\n\t\t$arr_finaliz_cupom = array(); // Vetor que relacina os cupons com as finalizadoras\r\n\t\t$arr_lancto_cupom = array(); // Vetor que relaciona os cupons com os lancamentos\r\n\t\t$query = \"SELECT DISTINCT ad.codadminist, 'codadminist' AS cod \";\r\n\t\t$query .= \"FROM administradora ad \";\r\n\t\t$query .= \"INNER JOIN administradorabin adbin ON (ad.codadminist = adbin.codadminist) \";\r\n\t\t$query .= \"WHERE adbin.bin IS NOT NULL AND ad.codadminist IS NOT NULL \";\r\n\t\t$query .= \"ORDER BY 1 \";\r\n\r\n\t\t$res = $this->con->query($query);\r\n\t\t$_arr_codadminist = $res->fetchAll();\r\n\r\n\t\t$a_arr_codadminist = array();\r\n\t\tforeach($_arr_codadminist AS $codadminist){\r\n\t\t\t$a_arr_codadminist[] = $codadminist[\"codadminist\"];\r\n\t\t}\r\n\t\tforeach($this->finalizadoras as $i => $finalizador){\r\n\t\t\tsetprogress($i / sizeof($this->finalizadoras) * 100, \"Gerando lancamentos financeiros: \".($i + 1).\" de \".sizeof($this->finalizadoras));\r\n\t\t\t// Verifica se ja nao foi feita a leitura na data da venda\r\n\t\t\t// Trata as novas datas na hora que for ler as vendas\r\n\t\t\tif(($this->estabelecimento->getleituraonline() == \"N\" && $this->estabelecimento->getcodfrentecaixa() != \"11\") && (in_array($finalizador->getdata(), $arrDatas[\"old\"]) || !$this->entre_dtmovto($finalizador->getdata()))){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif($finalizador->getstatus() == \"A\"){\r\n\t\t\t\t$finalizadora = $arr_finalizadora[$finalizador->getcodfinaliz()];\r\n\r\n\t\t\t\t// Grava os recebimentoos\r\n\t\t\t\t$codrecebepdv = \"\";\r\n\t\t\t\tforeach($this->arr_recebepdv AS $i => $recebepdv){\r\n\t\t\t\t\tif(intval($recebepdv->getcupom()) == intval($finalizador->getcupom())){\r\n\t\t\t\t\t\tif(!$recebepdv->save()){\r\n\t\t\t\t\t\t\t$_SESSION[\"ERROR\"] = \"Recebimento com erro. \".$_SESSION[\"ERROR\"];\r\n\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$codrecebepdv = $recebepdv->getcodrecebepdv();\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif($finalizadora[\"gerafinanceiro\"] == \"S\"){\r\n\t\t\t\t\t$condpagto = $arr_condpagto[$finalizadora[\"codcondpagto\"]];\r\n\t\t\t\t\t$banco = $arr_banco[$finalizador->getcodbanco()];\r\n\t\t\t\t\t$this->finalizadora_parceiro($tipoparceiro, $codparceiro, $arr_finalizadora, $arrCliente, $finalizador, $paramestoque);\r\n\t\t\t\t\tswitch($tipoparceiro){\r\n\t\t\t\t\t\tcase \"A\": $parceiro = $arr_administradora[$codparceiro];\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"C\": $parceiro = $arr_cliente[$codparceiro];\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"E\": $parceiro = $arr_estabelecimento[$codparceiro];\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"F\": $parceiro = $arr_fornecedor[$codparceiro];\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"T\": $parceiro = $arr_transportadora[$codparceiro];\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"U\": $parceiro = $arr_funcionario[$codparceiro];\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$valordesconto = 0;\r\n\t\t\t\t\tif($tipoparceiro == \"A\"){\r\n\t\t\t\t\t\tforeach($arr_administestabelec as $administestabelec){\r\n\t\t\t\t\t\t\tif($parceiro->getcodadminist() == $administestabelec->getcodadminist()){\r\n\t\t\t\t\t\t\t\t$valordesconto = number_format($finalizador->getvalortotal() * $administestabelec->getpercdescto() / 100 + $administestabelec->getvaldescto(), 2);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($finalizadora[\"geraliquidado\"] == \"S\"){\r\n\t\t\t\t\t\t$valorpago = $finalizador->getvalortotal() - $valordesconto;\r\n\t\t\t\t\t\t$dtliquid = $finalizador->getdata();\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$valorpago = 0;\r\n\t\t\t\t\t\t$dtliquid = NULL;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Calcula data de vencimento\r\n\t\t\t\t\tif(strlen($finalizador->getdatavencto()) > 0){\r\n\t\t\t\t\t\t$dtvencto = $finalizador->getdatavencto();\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$arr_data = explode(\"-\", value_date($finalizador->getdata()));\r\n\t\t\t\t\t\tif($condpagto->gettipo() == \"PV\"){\r\n\t\t\t\t\t\t\t$dtinicial = mktime(0, 0, 0, $arr_data[1], ($arr_data[2] + $condpagto->getdiascarencia()), $arr_data[0]);\r\n\t\t\t\t\t\t\tif(strlen($condpagto->getdiavencimento()) > 0){\r\n\t\t\t\t\t\t\t\tif(date(\"d\", $dtinicial) < $condpagto->getdiavencimento()){\r\n\t\t\t\t\t\t\t\t\t$dtvencto = date(\"Y-m-d\", mktime(0, 0, 0, date(\"m\", $dtinicial), $condpagto->getdiavencimento(), date(\"Y\", $dtinicial)));\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t$dtvencto = date(\"Y-m-d\", mktime(0, 0, 0, (date(\"m\", $dtinicial) + 1), $condpagto->getdiavencimento(), date(\"Y\", $dtinicial)));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t$dtvencto = date(\"Y-m-d\", $dtinicial);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$dtvencto = date(\"Y-m-d\", mktime(0, 0, 0, $arr_data[1], ($arr_data[2] + $condpagto->getdia1()), $arr_data[0]));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$lancamento = objectbytable(\"lancamento\", NULL, $this->con);\r\n\t\t\t\t\t$lancamento->setsincpdv(\"2\");\r\n\t\t\t\t\t$lancamento->setcodestabelec($this->estabelecimento->getcodestabelec());\r\n\t\t\t\t\t$lancamento->setpagrec(\"R\");\r\n\t\t\t\t\t$lancamento->setprevreal(\"R\");\r\n\t\t\t\t\t$lancamento->setparcela(1);\r\n\t\t\t\t\t$lancamento->settotalparcelas(1);\r\n\t\t\t\t\t$lancamento->settipoparceiro($tipoparceiro);\r\n\t\t\t\t\t$lancamento->setcodparceiro($codparceiro);\r\n\t\t\t\t\t$lancamento->setnumnotafis($finalizador->getcupom());\r\n\t\t\t\t\tif($finalizador->getrecebepdv()){\r\n\t\t\t\t\t\t$lancamento->setserie(\"REC\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$lancamento->setserie(\"PDV\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$lancamento->setcodcondpagto($condpagto->getcodcondpagto());\r\n\t\t\t\t\t$lancamento->setcodespecie($finalizadora[\"codespecie\"]);\r\n\t\t\t\t\t$lancamento->setvalorparcela($finalizador->getvalortotal());\r\n\t\t\t\t\t$lancamento->setvalordescto($valordesconto);\r\n\t\t\t\t\t$lancamento->setvaloracresc(0);\r\n\t\t\t\t\t$lancamento->setvalorpago($valorpago);\r\n\t\t\t\t\t$lancamento->setdtemissao($finalizador->getdata());\r\n\t\t\t\t\t$lancamento->setdtentrada($finalizador->getdata());\r\n\t\t\t\t\t$lancamento->setdtvencto($dtvencto);\r\n\t\t\t\t\t$lancamento->setdtliquid($dtliquid);\r\n\t\t\t\t\t$lancamento->setcodcatlancto($finalizadora[\"codcatlancto\"]);\r\n\t\t\t\t\t$lancamento->setcodsubcatlancto($finalizadora[\"codsubcatlancto\"]);\r\n\t\t\t\t\t$lancamento->setobservacao(\"LANCAMENTO AUTOMATICO\");\r\n\t\t\t\t\tif(strlen($finalizador->getnumcheque()) > 0){\r\n\t\t\t\t\t\t$observacao = \"\\nBanco: \".$finalizador->getcodbanco().\"\\nAgencia: \".$finalizador->getnumagenciacheq().\"\\nConta: \".$finalizador->getcontacheque().\"\\nCheque: \".$finalizador->getnumcheque();\r\n\t\t\t\t\t\t$lancamento->setobservacao($lancamento->getobservacao().$observacao);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$lancamento->setcodccusto($finalizadora[\"codccusto\"]);\r\n\t\t\t\t\t$lancamento->setcodcontacred($this->estabelecimento->getcodconta());\r\n\t\t\t\t\t$lancamento->setcodfinaliz($finalizadora[\"codfinaliz\"]);\r\n\t\t\t\t\tif($parceiro == \"F\"){\r\n\t\t\t\t\t\t$lancamento->setcodcontadeb($parceiro->getcodconta());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$lancamento->setcodmoeda($finalizadora[\"codmoeda\"]);\r\n\t\t\t\t\t$lancamento->setcodbancocheq($banco[\"codbanco\"]);\r\n\t\t\t\t\tif(strlen($finalizadora[\"codbanco\"]) > 0){\r\n\t\t\t\t\t\t$lancamento->setcodbanco($finalizadora[\"codbanco\"]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$lancamento->setdocliquidacao($finalizador->getnumcheque());\r\n\t\t\t\t\tif($finalizador->getcodfunc() > 0 && in_array((string) $finalizador->getcodfunc(), $arr_codfunc)){\r\n\t\t\t\t\t\t$lancamento->setcodfunc($finalizador->getcodfunc());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($finalizadora[\"tipogeracao\"] == \"A\" || $finalizador->getrecebepdv()){ // Analitico\r\n\t\t\t\t\t\tif(!$lancamento->save()){\r\n\t\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!$finalizador->getrecebepdv()){\r\n\t\t\t\t\t\t\t$arr_lancto_cupom[$lancamento->getcodlancto()] = array(array(\r\n\t\t\t\t\t\t\t\t\t\"caixa\" => $finalizador->getcaixa(),\r\n\t\t\t\t\t\t\t\t\t\"cupom\" => $finalizador->getcupom(),\r\n\t\t\t\t\t\t\t\t\t\"totalliquido\" => $finalizador->getvalortotal(),\r\n\t\t\t\t\t\t\t\t\t\"codfinaliz\" => $finalizador->getcodfinaliz()\r\n\t\t\t\t\t\t\t));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif($finalizador->getrecebepdv()){\r\n\t\t\t\t\t\t\t$lancamento->setobservacao(\"Recebimento PDV cupom: {$finalizador->getcupom()}\");\r\n\r\n\t\t\t\t\t\t\tif(!$lancamento->save()){\r\n\t\t\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t$recebepdvlancto = objectbytable(\"recebepdvlancto\", null, $this->con);\r\n\t\t\t\t\t\t\t$recebepdvlancto->setcodrecebepdv($codrecebepdv);\r\n\t\t\t\t\t\t\t$recebepdvlancto->setcodlancto($lancamento->getcodlancto());\r\n\t\t\t\t\t\t\tif(!$recebepdvlancto->save()){\r\n\t\t\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}elseif($finalizadora[\"tipogeracao\"] == \"S\"){ // Sintetico\r\n\t\t\t\t\t\tif(sizeof($_arr_codadminist) > 0){\r\n\t\t\t\t\t\t\tif($tipoparceiro == \"A\" && in_array($codparceiro, $a_arr_codadminist)){\r\n\t\t\t\t\t\t\t\t$tipo_sintetico = \"A\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t$tipo_sintetico = \"F\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$tipo_sintetico = \"F\";\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$idx_lancto = $lancamento->getdtemissao().\";\".($tipo_sintetico == \"A\" ? $codparceiro : $finalizadora[\"codparceiro\"]).\";\".$tipo_sintetico;\r\n\r\n\t\t\t\t\t\t// Sintetico por finalizadora\r\n\t\t\t\t\t\tif(count($this->finalizadoras) > 1000){\r\n\t\t\t\t\t\t\t$s_arr_lancamento = array();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$s_lancamento = objectbytable(\"lancamento\", NULL, $this->con);\r\n\t\t\t\t\t\t\t$s_lancamento->setdtemissao($lancamento->getdtemissao());\r\n\t\t\t\t\t\t\t$s_lancamento->setcodfinaliz($lancamento->getcodfinaliz());\r\n\t\t\t\t\t\t\t$s_lancamento->setcodparceiro($tipo_sintetico == \"A\" ? $codparceiro : $finalizadora[\"codparceiro\"]);\r\n\t\t\t\t\t\t\t$s_lancamento->settipoparceiro($tipoparceiro);\r\n\t\t\t\t\t\t\t$s_lancamento->setcodestabelec($lancamento->getcodestabelec());\r\n\t\t\t\t\t\t\t$s_lancamento->setserie(\"PDV\");\r\n\t\t\t\t\t\t\t$s_arr_lancamento = object_array($s_lancamento);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(sizeof($s_arr_lancamento) > 0){\r\n\t\t\t\t\t\t\t$_lancamento = array_shift($s_arr_lancamento);\r\n\t\t\t\t\t\t\t$_lancamento->setvalorparcela($_lancamento->getvalorparcela() + $lancamento->getvalorparcela());\r\n\t\t\t\t\t\t\t$_lancamento->setvalordescto($_lancamento->getvalordescto() + $lancamento->getvalordescto());\r\n\t\t\t\t\t\t\t$_lancamento->setvalorpago($_lancamento->getvalorpago() + $lancamento->getvalorpago());\r\n\t\t\t\t\t\t\tif(!$_lancamento->save()){\r\n\t\t\t\t\t\t\t\t$this->con->rollback;\r\n\t\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$arr_lancamento[$idx_lancto] = $_lancamento;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tif(array_key_exists($idx_lancto, $arr_lancamento)){\r\n\t\t\t\t\t\t\t\t$arr_lancamento[$idx_lancto]->setnumnotafis(NULL);\r\n\t\t\t\t\t\t\t\t$arr_lancamento[$idx_lancto]->setvalorparcela($arr_lancamento[$idx_lancto]->getvalorparcela() + $lancamento->getvalorparcela());\r\n\t\t\t\t\t\t\t\t$arr_lancamento[$idx_lancto]->setvalordescto($arr_lancamento[$idx_lancto]->getvalordescto() + $lancamento->getvalordescto());\r\n\t\t\t\t\t\t\t\t$arr_lancamento[$idx_lancto]->setvalorpago($arr_lancamento[$idx_lancto]->getvalorpago() + $lancamento->getvalorpago());\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t$arr_lancamento[$idx_lancto] = $lancamento;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$found = FALSE;\r\n\t\t\t\t\t\tif(is_array($arr_finaliz_cupom[$idx_lancto])){\r\n\t\t\t\t\t\t\tforeach($arr_finaliz_cupom[$idx_lancto] as $j => $finaliz_cupom){\r\n\t\t\t\t\t\t\t\tif($finaliz_cupom[\"caixa\"] == $finalizador->getcaixa() && $finaliz_cupom[\"cupom\"] == $finalizador->getcupom() && $finaliz_cupom[\"codfinaliz\"] == $finalizador->getcodfinaliz()){\r\n\t\t\t\t\t\t\t\t\t$arr_finaliz_cupom[$idx_lancto][$j][\"totalliquido\"] += $finalizador->getvalortotal();\r\n\t\t\t\t\t\t\t\t\t$found = TRUE;\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}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(!$found && !$finalizador->getrecebepdv()){\r\n\t\t\t\t\t\t\t$arr_finaliz_cupom[$idx_lancto][] = array(\r\n\t\t\t\t\t\t\t\t\"caixa\" => $finalizador->getcaixa(),\r\n\t\t\t\t\t\t\t\t\"cupom\" => $finalizador->getcupom(),\r\n\t\t\t\t\t\t\t\t\"totalliquido\" => $finalizador->getvalortotal(),\r\n\t\t\t\t\t\t\t\t\"codfinaliz\" => $finalizador->getcodfinaliz()\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\tif($finalizador->getrecebepdv()){\r\n\t\t\t\t\t\t\t$lancamento->setobservacao($lancamento->getobservacao().\" Recebimento PDV cupom: {$finalizador->getcupom()};\");\r\n\t\t\t\t\t\t\tif(!$lancamento->save()){\r\n\t\t\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$codrecebepdv = \"\";\r\n\t\t\t\t\t\t\t// Grava os recebimentoos\r\n\t\t\t\t\t\t\tforeach($this->arr_recebepdv AS $i => $recebepdv){\r\n\t\t\t\t\t\t\t\tif(intval($recebepdv->getcupom()) == intval($finalizador->getcupom()) && $recebepdv->getcaixa() == $finalizador->getcaixa()){\r\n\t\t\t\t\t\t\t\t\tif(!$recebepdv->save()){\r\n\t\t\t\t\t\t\t\t\t\t$_SESSION[\"ERROR\"] = \"Recebimento com erro. \".$_SESSION[\"ERROR\"];\r\n\t\t\t\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t$codrecebepdv = $recebepdv->getcodrecebepdv();\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}\r\n\r\n\t\t\t\t\t\t\t$recebepdvlancto = objectbytable(\"recebepdvlancto\", null, $this->con);\r\n\t\t\t\t\t\t\t$recebepdvlancto->setcodrecebepdv($codrecebepdv);\r\n\t\t\t\t\t\t\t$recebepdvlancto->setcodlancto($lancamento->getcodlancto());\r\n\t\t\t\t\t\t\tif(!$recebepdvlancto->save()){\r\n\t\t\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Gravar os lancamentos sinteticos\r\n\t\t$i = 1;\r\n\t\tforeach($arr_lancamento as $codfinaliz => $lancamento){\r\n\t\t\tsetprogress($i / sizeof($arr_lancamento) * 100, \"Gravando lancamentos financeiros: \".($i++).\" de \".sizeof($arr_lancamento));\r\n\t\t\tif(!$lancamento->save()){\r\n\t\t\t\t$this->con->rollback();\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t\t$arr_lancto_cupom[$lancamento->getcodlancto()] = $arr_finaliz_cupom[$codfinaliz];\r\n\t\t}\r\n\r\n\t\t// Percorre todas as vendas\r\n\t\tforeach($this->vendas as $i => $venda){\r\n\t\t\tsetprogress($i / sizeof($this->vendas) * 100, \"Gravando vendas: \".($i + 1).\" de \".sizeof($this->vendas));\r\n\r\n\t\t\t// Verifica se ja nao foi feita a leitura na data da venda\r\n\t\t\tif(($this->estabelecimento->getleituraonline() == \"N\" && $this->estabelecimento->getcodfrentecaixa() != \"11\") && (in_array($venda->getdata(), $arrDatas[\"old\"]) || !$this->entre_dtmovto($venda->getdata()))){\r\n\t\t\t\tcontinue;\r\n\t\t\t}else{\r\n\t\t\t\t// Grava leitura de data\r\n\t\t\t\tif(!in_array($venda->getdata(), $arrDatas[\"new\"])){\r\n\t\t\t\t\t$arrDatas[\"new\"][] = $venda->getdata();\r\n\t\t\t\t\t$leituradata = objectbytable(\"leituradata\", NULL, $this->con);\r\n\t\t\t\t\t$leituradata->setcodestabelec($this->estabelecimento->getcodestabelec());\r\n\t\t\t\t\t$leituradata->setdtmovto($venda->getdata());\r\n\t\t\t\t\tif(!$leituradata->save()){\r\n\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Verifica se esta com todos os itens cancelados\r\n\t\t\t\tif($venda->getstatus() == \"A\"){\r\n\t\t\t\t\t$itens_cancelados = TRUE;\r\n\t\t\t\t\tforeach($venda->pdvitem as $item){\r\n\t\t\t\t\t\tif($item->getstatus() != \"C\"){\r\n\t\t\t\t\t\t\t$itens_cancelados = FALSE;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($itens_cancelados){\r\n\t\t\t\t\t\t$venda->setstatus(\"C\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Carrega a ECF correta da venda\r\n\t\t\t\t$ecf = $arr_ecf[$venda->getcaixa()];\r\n\r\n\t\t\t\t// Trata cupom cancelado\r\n\t\t\t\tif($venda->getstatus() == \"C\"){\r\n\t\t\t\t\t// Procura o cupom para atualizar seu status para cancelado\r\n\t\t\t\t\t$cupom = objectbytable(\"cupom\", NULL, $this->con);\r\n\t\t\t\t\t$cupom->setcodestabelec($this->estabelecimento->getcodestabelec());\r\n\t\t\t\t\t$cupom->setcaixa($venda->getcaixa());\r\n\t\t\t\t\t$cupom->setdtmovto($venda->getdata());\r\n\t\t\t\t\t//$cupom->sethrmovto($venda->gethora());\r\n\t\t\t\t\t$cupom->setcupom($venda->getcupom());\r\n\t\t\t\t\t$cupom->setnumeroecf($venda->getnumeroecf());\r\n\t\t\t\t\t$cupom->setseqecf($venda->getseqecf());\r\n\t\t\t\t\tif(!in_array($this->pdv,array(\"syspdv\",\"saurus\"))){\r\n\t\t\t\t\t\tif(strlen($venda->getcodecf()) > 0){\r\n\t\t\t\t\t\t\t$cupom->setcodecf($venda->getcodecf());\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$cupom->setcodecf($ecf->getcodecf());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(strlen($venda->getnumfabricacao()) > 0){\r\n\t\t\t\t\t\t\t$numfabricacao = trim($venda->getnumfabricacao());\r\n\t\t\t\t\t\t\t$cupom->setnumfabricacao($numfabricacao);\r\n\t\t\t\t\t\t\t$cupom->setcodecf($arr_numfabricacao[$numfabricacao]);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$cupom->setcodecf(null);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$arr_cupom = object_array($cupom);\r\n\t\t\t\t\tif(count($arr_cupom) > 0){\r\n\t\t\t\t\t\t$cupom = array_shift($arr_cupom);\r\n\t\t\t\t\t\t$cupom->setstatus(\"C\");\r\n\t\t\t\t\t\tif($cupom->save()){\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Calcula os totais necessarios para gravar a venda\r\n\t\t\t\t$total_bruto = 0;\r\n\t\t\t\t$total_desconto = 0;\r\n\t\t\t\t$total_acrescimo = 0;\r\n\t\t\t\tforeach($venda->pdvitem as $item){\r\n\t\t\t\t\tif($item->getstatus() == \"A\" || $venda->getstatus() == \"C\"){\r\n\t\t\t\t\t\t$total_bruto += ($item->gettotal() + $item->getdesconto() - $item->getacrescimo());\r\n\t\t\t\t\t\t$total_desconto += $item->getdesconto();\r\n\t\t\t\t\t\t$total_acrescimo += $item->getacrescimo();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Cria cupom de venda\r\n\t\t\t\t$cupom = objectbytable(\"cupom\", NULL, $this->con);\r\n\t\t\t\t$cupom->setstatus($venda->getstatus());\r\n\t\t\t\t$cupom->setcodestabelec($this->estabelecimento->getcodestabelec());\r\n\t\t\t\t$cupom->setcaixa($venda->getcaixa());\r\n\t\t\t\t$cupom->setnumeroecf($venda->getnumeroecf());\r\n\t\t\t\t$cupom->setdtmovto($venda->getdata());\r\n\t\t\t\t$cupom->sethrmovto($venda->gethora());\r\n\t\t\t\t$cupom->setcupom($venda->getcupom());\r\n\t\t\t\t$cupom->setseqecf($venda->getseqecf());\r\n\t\t\t\t$cupom->setchavecfe($venda->getchavecfe());\r\n\t\t\t\t$cupom->setoperador($venda->getoperador());\r\n\r\n\t\t\t\tif(strlen($venda->getreferencia()) > 0){\r\n\t\t\t\t\t$cupom->setreferencia($venda->getreferencia());\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$cupom->setnumeroecf($venda->getnumeroecf());\r\n\t\t\t\t$cupom->setseqecf($venda->getseqecf());\r\n\r\n\t\t\t\tif(!in_array($this->pdv,array(\"syspdv\",\"saurus\"))){\r\n\t\t\t\t\tif(strlen($venda->getcodecf()) > 0){\r\n\t\t\t\t\t\t$cupom->setcodecf($venda->getcodecf());\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$cupom->setcodecf($ecf->getcodecf());\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$ecf = $arr_ecf[$venda->getcaixa()];\r\n\r\n\t\t\t\t\tif($ecf->getequipamentofiscal() == \"NFC\"){\r\n\t\t\t\t\t\t$cupom->setcodecf($ecf->getcodecf());\t\t\t\t\t\t\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(strlen($venda->getnumfabricacao()) > 0){\r\n\t\t\t\t\t\t\t$numfabricacao = trim($venda->getnumfabricacao());\r\n\t\t\t\t\t\t\t$cupom->setnumfabricacao($numfabricacao);\r\n\t\t\t\t\t\t\t$cupom->setcodecf($arr_numfabricacao[$numfabricacao]);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$cupom->setcodecf(null);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$cupom->setcpfcnpj($venda->getcpfcnpj());\r\n\t\t\t\tif($venda->getcodcliente() > 0 && array_key_exists($venda->getcodcliente(), $arrCliente)){\r\n\t\t\t\t\t$cupom->setcodcliente($venda->getcodcliente());\r\n\t\t\t\t}elseif(strlen($venda->getcpfcnpj()) > 0 && in_array($venda->getcpfcnpj(), $arrCliente)){\r\n\t\t\t\t\t$cupom->setcodcliente(array_search($venda->getcpfcnpj(), $arrCliente));\r\n\t\t\t\t}elseif(count($arr_codcliente) > 0){\r\n\t\t\t\t\t$cupom->setcodcliente($paramestoque->getcodclientevendapdv());\r\n\t\t\t\t}\r\n\t\t\t\tif($venda->getcodfunc() > 0 && in_array((string) $venda->getcodfunc(), $arr_codfunc)){\r\n\t\t\t\t\t$cupom->setcodfunc($venda->getcodfunc());\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$cupom->settotalbruto($total_bruto);\r\n\t\t\t\t$cupom->settotaldesconto($total_desconto);\r\n\t\t\t\t$cupom->settotalacrescimo($total_acrescimo);\r\n\t\t\t\t$cupom->settotalliquido($total_bruto + $total_acrescimo - $total_desconto);\r\n\r\n\t\t\t\tif(!$cupom->save()){\r\n\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\treturn FALSE;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//$this->con->exec(\"INSERT INTO temporario VALUES ('{$cupom->getcupom()}', '{$cupom->getstatus()}', {$cupom->gettotalliquido()})\");\r\n\t\t\t\t// Verifica se existe um orcamento da venda e busca os numeros de serie\r\n\t\t\t\tif($venda->getcodorcamento() > 0){\r\n\t\t\t\t\t$numeroserie = objectbytable(\"numeroserie\", NULL, $this->con);\r\n\t\t\t\t\t$numeroserie->setcodorcamento($venda->getcodorcamento());\r\n\t\t\t\t\t$arr_numeroserie = object_array($numeroserie);\r\n\t\t\t\t\tforeach($arr_numeroserie as $numeroserie){\r\n\t\t\t\t\t\t$numeroserie->setdata($cupom->getdtmovto(TRUE));\r\n\t\t\t\t\t\t$numeroserie->sethora($cupom->gethrmovto());\r\n\t\t\t\t\t\t$numeroserie->setcodorcamento(NULL);\r\n\t\t\t\t\t\t$numeroserie->setidcupom($cupom->getidcupom());\r\n\t\t\t\t\t\tif(!$numeroserie->save()){\r\n\t\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Lancamentos financeiros\r\n\t\t\t\tif($cupom->getstatus() == \"A\"){\r\n\t\t\t\t\t// Liga os cupons com os lancamentos antes de gravar\r\n\t\t\t\t\tforeach($arr_lancto_cupom as $codlancto => $chaves_cupons){\r\n\t\t\t\t\t\tforeach($chaves_cupons as $chave_cupom){\r\n\t\t\t\t\t\t\tif($chave_cupom[\"caixa\"] == $cupom->getcaixa() && $chave_cupom[\"cupom\"] == $cupom->getcupom()){\r\n\t\t\t\t\t\t\t\t$cupomlancto = objectbytable(\"cupomlancto\", NULL, $this->con);\r\n\t\t\t\t\t\t\t\t$cupomlancto->setidcupom($cupom->getidcupom());\r\n\t\t\t\t\t\t\t\t$cupomlancto->setcodlancto($codlancto);\r\n\t\t\t\t\t\t\t\t$cupomlancto->settotalliquido($chave_cupom[\"totalliquido\"]);\r\n\t\t\t\t\t\t\t\t$cupomlancto->setcodfinaliz($chave_cupom[\"codfinaliz\"]);\r\n\t\t\t\t\t\t\t\tif(!$cupomlancto->save()){\r\n\t\t\t\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\t\t\t\treturn FALSE;\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}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Liga as comissoes geradas com os lancamentos\r\n\t\t\t\t\tforeach($arr_lancto_cupom as $codlancto => $chaves_cupons){\r\n\t\t\t\t\t\tforeach($chaves_cupons as $chave_cupom){\r\n\t\t\t\t\t\t\tif($chave_cupom[\"caixa\"] == $cupom->getcaixa() && $chave_cupom[\"cupom\"] == $cupom->getcupom()){\r\n\t\t\t\t\t\t\t\tif(strlen($cupom->getcodfunc()) > 0){\r\n\t\t\t\t\t\t\t\t\t$comissao = objectbytable(\"comissao\", NULL, $this->con);\r\n\t\t\t\t\t\t\t\t\t$comissao->setidcupom($cupom->getidcupom());\r\n\t\t\t\t\t\t\t\t\t$comissao->searchbyobject();\r\n\t\t\t\t\t\t\t\t\tif($comissao->exists()){\r\n\t\t\t\t\t\t\t\t\t\t$comissao->setcodlanctopai($codlancto);\r\n\t\t\t\t\t\t\t\t\t\tif(!$comissao->save()){\r\n\t\t\t\t\t\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Percorre todos os itens do cupom\r\n\t\t\t\tforeach($venda->pdvitem as $item){\r\n\t\t\t\t\t// Busca o indice que contem os dados do produto\r\n\t\t\t\t\t$idxProduto = array_search($item->getcodproduto(), $arrCodProduto);\r\n\t\t\t\t\t// Se o status do item esta como Atendido\r\n\t\t\t\t\tif($item->getstatus() == \"A\" || $item->getstatus() == \"C\"){\r\n\t\t\t\t\t\t// Cria leitura do item\r\n\t\t\t\t\t\t$itcupom = objectbytable(\"itcupom\", NULL, $this->con);\r\n\t\t\t\t\t\t$itcupom->setidcupom($cupom->getidcupom());\r\n\t\t\t\t\t\t$itcupom->setcodproduto((integer) $item->getcodproduto());\r\n\t\t\t\t\t\t$itcupom->setcustorep($arrProduto[$idxProduto][\"custo\"]);\r\n\t\t\t\t\t\t$itcupom->setcustotab($arrProduto[$idxProduto][\"custotab\"]);\r\n\t\t\t\t\t\t$itcupom->setcustosemimp($arrProduto[$idxProduto][\"custosemimp\"]);\r\n\t\t\t\t\t\t$itcupom->setquantidade($item->getquantidade());\r\n\t\t\t\t\t\t$itcupom->setpreco($item->getpreco());\r\n\t\t\t\t\t\t$itcupom->setdesconto($item->getdesconto());\r\n\t\t\t\t\t\t$itcupom->setacrescimo($item->getacrescimo());\r\n\t\t\t\t\t\t$itcupom->setstatus($item->getstatus());\r\n\r\n\t\t\t\t\t\tif(strlen($item->gettptribicms()) == 0 || strlen($item->getaliqicms()) == 0){\r\n\t\t\t\t\t\t\t$itcupom->settptribicms($arrProduto[$idxProduto][\"tptribicms\"] == \"R\" ? \"T\" : $arrProduto[$idxProduto][\"tptribicms\"]);\r\n\t\t\t\t\t\t\tif(in_array($itcupom->gettptribicms(), array(\"T\", \"R\"))){\r\n\t\t\t\t\t\t\t\t$itcupom->setaliqicms(number_format(($arrProduto[$idxProduto][\"aliqicms\"] - ($arrProduto[$idxProduto][\"aliqicms\"] * $arrProduto[$idxProduto][\"aliqredicms\"] / 100)), 2, \".\", \"\"));\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t$itcupom->setaliqicms(0);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$itcupom->settptribicms($item->gettptribicms());\r\n\t\t\t\t\t\t\t$itcupom->setaliqicms($item->getaliqicms());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$itcupom->setaliqpis($arrProduto[$idxProduto][\"aliqpis\"]);\r\n\t\t\t\t\t\t$itcupom->setaliqcofins($arrProduto[$idxProduto][\"aliqcofins\"]);\r\n\t\t\t\t\t\t$itcupom->setvalortotal($item->gettotal());\r\n\r\n\t\t\t\t\t\t// Nao explode os itens de explosao automatica do SysPDV (porque ja vem explodido no arquivo)\r\n\t\t\t\t\t\t$gravar_pai_composicao = TRUE;\r\n\t\t\t\t\t\tif($this->pdv == \"syspdv\"){\r\n\t\t\t\t\t\t\tforeach($arrComposicao as $composicao){\r\n\t\t\t\t\t\t\t\tif($composicao[\"explosaoauto\"] == \"S\" && $composicao[\"codproduto\"] == $itcupom->getcodproduto()){\r\n\t\t\t\t\t\t\t\t\t$gravar_pai_composicao = FALSE;\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}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Trata composicao\r\n\t\t\t\t\t\tif($gravar_pai_composicao){\r\n\t\t\t\t\t\t\t$arr_itcupom_comp = $this->explodirproduto($itcupom, $arrComposicao);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$arr_itcupom_comp = array();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(sizeof($arr_itcupom_comp) > 0 || !$gravar_pai_composicao){\r\n\t\t\t\t\t\t\t$itcupom->setcomposicao(\"P\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$itcupom->setcomposicao(\"N\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Salva item principal\r\n\t\t\t\t\t\tif(!$itcupom->save()){\r\n\t\t\t\t\t\t\tvar_dump(\"Ao salvar itcupom pai: \".$itcupom->getcodproduto().\" Cupom: \".$venda->getcupom());\r\n\t\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Salva filhos da composicao\r\n\t\t\t\t\t\tforeach($arr_itcupom_comp as $itcupom_comp){\r\n\t\t\t\t\t\t\tif(!$itcupom_comp->save()){\r\n\t\t\t\t\t\t\t\tvar_dump(\"Ao salvar itcupom filho: \".$itcupom_comp->getcodproduto());\r\n\t\t\t\t\t\t\t\t//($itcupom_comp->fields);\r\n\t\t\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t // Se o status do item for Cancelado\r\n\t\t\t\t\t\t }elseif($item->getstatus() == \"C\"){\r\n\t\t\t\t\t\t // Procura o item no cupom para atualizar seu status para cancelado\r\n\t\t\t\t\t\t $cupom = objectbytable(\"cupom\",NULL,$this->con);\r\n\t\t\t\t\t\t $cupom->setcodestabelec($this->estabelecimento->getcodestabelec());\r\n\t\t\t\t\t\t $cupom->setcaixa($venda->getcaixa());\r\n\t\t\t\t\t\t $cupom->setdtmovto($venda->getdata());\r\n\t\t\t\t\t\t $cupom->setcupom($venda->getcupom());\r\n\t\t\t\t\t\t $arr_cupom = object_array($cupom);\r\n\t\t\t\t\t\t foreach($arr_cupom as $cupom){\r\n\t\t\t\t\t\t $itcupom = objectbytable(\"itcupom\",NULL,$this->con);\r\n\t\t\t\t\t\t $itcupom->setidcupom($cupom->getidcupom());\r\n\t\t\t\t\t\t if(strlen($item->getsequencial()) > 0){\r\n\t\t\t\t\t\t $itcupom->setseqitem((integer) $item->getsequencial());\r\n\t\t\t\t\t\t }else{\r\n\t\t\t\t\t\t $itcupom->setcodproduto((integer) $item->getcodproduto());\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t $arr_itcupom = object_array($itcupom);\r\n\t\t\t\t\t\t foreach($arr_itcupom as $itcupom){\r\n\t\t\t\t\t\t $itcupom->setstatus(\"C\");\r\n\t\t\t\t\t\t if(!$itcupom->save()){\r\n\t\t\t\t\t\t $this->con->rollback();\r\n\t\t\t\t\t\t return FALSE;\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\t// Se for item de Troca\r\n\t\t\t\t\t}elseif($item->getstatus() == \"T\"){\r\n\t\t\t\t\t\tif(strlen($paramestoque->getcodtpdoctotrocapdv()) == 0){\r\n\t\t\t\t\t\t\t$_SESSION[\"ERROR\"] = \"Tipo de documento para troca no PDV n&atilde;o foi informado na par&acirc;metriza&ccedil;&atilde;o de estoque.<br><a onclick=\\\"$.messageBox('close'); openProgram('ParamEst','codemitente=\".$this->estabelecimento->getcodemitente().\"')\\\">Clique aqui</a> para abrir os par&acirc;metros de estoque.\";\r\n\t\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Cria o ItCupom apenas para tratar a composicao\r\n\t\t\t\t\t\t$itcupom = objectbytable(\"itcupom\", NULL, $this->con);\r\n\t\t\t\t\t\t$itcupom->setcodproduto((integer) $item->getcodproduto());\r\n\t\t\t\t\t\t$itcupom->setcustorep($arrProduto[$idxProduto][\"custo\"]);\r\n\t\t\t\t\t\t$itcupom->setquantidade($item->getquantidade());\r\n\t\t\t\t\t\t$itcupom->setpreco($item->getpreco());\r\n\r\n\t\t\t\t\t\t// Trata composicao\r\n\t\t\t\t\t\t$arr_itcupom_comp = $this->explodirproduto($itcupom, $arrComposicao);\r\n\t\t\t\t\t\tif(count($arr_itcupom_comp) > 0){\r\n\t\t\t\t\t\t\t// Produto de composicao\r\n\t\t\t\t\t\t\tforeach($arr_itcupom_comp as $itcupom_comp){\r\n\t\t\t\t\t\t\t\t$movimento = objectbytable(\"movimento\", NULL, $this->con);\r\n\t\t\t\t\t\t\t\t$movimento->setcodestabelec($this->estabelecimento->getcodestabelec());\r\n\t\t\t\t\t\t\t\t$movimento->setcodproduto($itcupom_comp->getcodproduto());\r\n\t\t\t\t\t\t\t\t$movimento->settipo(\"E\");\r\n\t\t\t\t\t\t\t\t$movimento->setdtmovto($venda->getdata());\r\n\t\t\t\t\t\t\t\t$movimento->setquantidade($itcupom_comp->getquantidade());\r\n\t\t\t\t\t\t\t\t$movimento->setpreco($itcupom_comp->getpreco());\r\n\t\t\t\t\t\t\t\t$movimento->setcustorep($itcupom_comp->getcustorep());\r\n\t\t\t\t\t\t\t\t$movimento->setcupom($venda->getcupom());\r\n\t\t\t\t\t\t\t\t$movimento->setpdv($venda->getcaixa());\r\n\t\t\t\t\t\t\t\t$movimento->sethrmovto($venda->gethora());\r\n\t\t\t\t\t\t\t\t$movimento->setcodunidade($arrProduto[$idxProduto][\"codunidade\"]);\r\n\t\t\t\t\t\t\t\t$movimento->setcodtpdocto($paramestoque->getcodtpdoctotrocapdv());\r\n\t\t\t\t\t\t\t\tif(!$movimento->save()){\r\n\t\t\t\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\t\t\t\treturn FALSE;\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}else{\r\n\t\t\t\t\t\t\t// Produto normal (sem composicao)\r\n\t\t\t\t\t\t\t$movimento = objectbytable(\"movimento\", NULL, $this->con);\r\n\t\t\t\t\t\t\t$movimento->setcodestabelec($this->estabelecimento->getcodestabelec());\r\n\t\t\t\t\t\t\t$movimento->setcodproduto($item->getcodproduto());\r\n\t\t\t\t\t\t\t$movimento->settipo(\"E\");\r\n\t\t\t\t\t\t\t$movimento->setdtmovto($venda->getdata());\r\n\t\t\t\t\t\t\t$movimento->setquantidade($item->getquantidade());\r\n\t\t\t\t\t\t\t$movimento->setpreco($item->getpreco());\r\n\t\t\t\t\t\t\t$movimento->setcustorep($arrProduto[$idxProduto][\"custorep\"]);\r\n\t\t\t\t\t\t\t$movimento->setcupom($venda->getcupom());\r\n\t\t\t\t\t\t\t$movimento->setpdv($venda->getcaixa());\r\n\t\t\t\t\t\t\t$movimento->sethrmovto($venda->gethora());\r\n\t\t\t\t\t\t\t$movimento->setcodunidade($arrProduto[$idxProduto][\"codunidade\"]);\r\n\t\t\t\t\t\t\t$movimento->setcodtpdocto($paramestoque->getcodtpdoctotrocapdv());\r\n\t\t\t\t\t\t\tif(!$movimento->save()){\r\n\t\t\t\t\t\t\t\t$this->con->rollback();\r\n\t\t\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Busca todos os produtos dos cupons para recalcular a venda media\r\n\t\t$arr_codproduto = array();\r\n\t\tforeach($this->vendas as $i => $venda){\r\n\t\t\tforeach($venda->pdvitem as $j => $item){\r\n\t\t\t\t$arr_codproduto[] = $item->getcodproduto();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$arr_codproduto = array_merge(array_unique($arr_codproduto));\r\n\r\n\t\t// Recalcula venda media\r\n\t\t$vendamedia = new VendaMedia($this->con);\r\n\t\t$vendamedia->setcodestabelec($this->estabelecimento->getcodestabelec());\r\n\t\tforeach($arr_codproduto as $i => $codproduto){\r\n\t\t\tsetprogress($i / sizeof($arr_codproduto) * 100, \"Atualizando venda media: \".($i + 1).\" de \".sizeof($arr_codproduto));\r\n\t\t\t$vendamedia->setcodproduto($codproduto);\r\n\t\t\tif(!$vendamedia->atualizar()){\r\n\t\t\t\t$this->con->rollback();\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->con->commit();\r\n\t\treturn TRUE;\r\n\t}", "title": "" }, { "docid": "77b4530acae4b19fa8abc22c51e6ece7", "score": "0.5569113", "text": "function dodajGalerie($galeriaZdjec) {\n \t// Ustaw domyslny sposob przechowywania komentarzy i date utworzenia galerii.\n \t$ustawieniaGaleriiZdjec = new UstawieniaGaleriiZdjec();\n \t$galeriaZdjec->sposobPrzechowywaniaKomentarzy = $ustawieniaGaleriiZdjec->domyslnySposobPrzechowywaniaKomentarzy;\n \t$galeriaZdjec->dataUtworzenia = date(\"Y-m-d\");\n \t\n \t$daneGaleriiZdjec = new DaneGaleriiZdjec(ZarzadcaGaleriiZdjec::pobierzPolaczenieZBazaDanychMysql());\n \treturn $daneGaleriiZdjec->dodajGalerie($galeriaZdjec);\n }", "title": "" }, { "docid": "e1d55aa4e490cd947d48251dbc29aa34", "score": "0.5567106", "text": "function hieu($p_tuso, $p_mauso)\n {\n $ps = new PHAN_SO();\n $ps->khoitao_ps($p_tuso, $p_mauso);\n $ps->tuso = ($this->tuso * $ps->mauso) - ($ps->tuso * $this->mauso);\n $ps->mauso = $this->mauso * $ps->mauso;\n //$ps->toigian_ps();\n return $ps;\n }", "title": "" }, { "docid": "dd1e1ff1ace9ffc0e1b35e3085fec431", "score": "0.5559148", "text": "public function kupovina_dalje()\n\t{\n\t\t$oglas = $this->session->get('oglas');\n\t\tif ($oglas == null){\n\t\t\treturn redirect()->to(site_url('/'));\n\t\t}\n\n\t\t$stanjeModel = new ModelStanje();\n\t\t$stanje = $stanjeModel->find($oglas->IdS);\n\n\t\tif ($stanje->Opis !== 'Okacen'){\n\t\t\treturn redirect()->to(site_url('/'));\n\t\t}\n\n\t\t$this->session->set('nacin', $this->request->getVar('a'));\n\t\tif (\"poruka\" == $this->request->getVar('a')) {\n\t\t\t//redirect na prodavca \n\t\t\t$_POST['knjiga'] = \"Zdravo, želim da kupim knjigu \\\"\" . $oglas->Naslov .\"\\\"\";\n\t\t\t$_POST['primalac'] = $oglas->IdK;\n\t\t\t$this->session->remove('oglas');\n\t\t\t$this->zapocniKonverzaciju();\n\t\t} else {\n\t\t\t$this->pozovi('kupovina/forma', [\n\t\t\t\t'oglas' => $oglas,\n\t\t\t\t'a' => $this->request->getVar('a')\n\t\t\t]);\n\t\t}\n\t}", "title": "" }, { "docid": "a784a785e8de8e5b874ae92ef33d65bb", "score": "0.55569226", "text": "function insertarDetalleFormulacion(){\n //Definicion de variables para ejecucion del procedimiento\n $this->procedimiento='pre.ft_presupuesto_ime';\n $this->transaccion='PRE_FORMUPRE_INS';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_responsable','id_responsable','int4');\n $this->setParametro('observaciones','observaciones','varchar');\n $this->setParametro('id_gestion','id_gestion','int4');\n $this->setParametro('centro_costo','centro_costo','varchar');\n $this->setParametro('concepto_gasto','concepto_gasto','varchar');\n $this->setParametro('partida','partida','varchar');\n $this->setParametro('justificacion','justificacion','varchar');\n $this->setParametro('nro_contrato','nro_contrato','varchar');\n $this->setParametro('proveedor','proveedor','varchar');\n $this->setParametro('hoja_respaldo','hoja_respaldo','varchar');\n $this->setParametro('periodo_enero','periodo_enero','numeric');\n $this->setParametro('periodo_febrero','periodo_febrero','numeric');\n $this->setParametro('periodo_marzo','periodo_marzo','numeric');\n $this->setParametro('periodo_abril','periodo_abril','numeric');\n $this->setParametro('periodo_mayo','periodo_mayo','numeric');\n $this->setParametro('periodo_junio','periodo_junio','numeric');\n $this->setParametro('periodo_julio','periodo_julio','numeric');\n $this->setParametro('periodo_agosto','periodo_agosto','numeric');\n $this->setParametro('periodo_septiembre','periodo_septiembre','numeric');\n $this->setParametro('periodo_octubre','periodo_octubre','numeric');\n $this->setParametro('periodo_noviembre','periodo_noviembre','numeric');\n $this->setParametro('periodo_diciembre','periodo_diciembre','numeric');\n $this->setParametro('importe_total','importe_total','numeric');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n//var_dump('llegamod', $this->respuesta);\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "67f48ba245406adb3eb5817aabc89e91", "score": "0.5552142", "text": "function liste_devis_ouvert ($pdo)\n{\n\t$tableau =array();\n\t$ligne = array(\"C1\" => \"N° devis\", \"C2\" => \"Rèf. client\", \"C3\" => \"Client\", \"C4\" => \"Auteur\", \"C5\" => \"Date de création\", \"C6\" => \"Montant HT\", \"C7\" => \"Type de prestation\", \"C8\" => \"Marge nette €\", \"C9\" => \"Marge nette %\");\n\tarray_push($tableau, $ligne);\n\t\n\t//liste de devis par statut triée par datec et user, le user est l'auteur ou le commercial resp suivi\n\t$sql=\"SELECT DISTINCT T.ref,\n\t\t\t\tT.ref_client,\n T.nom,\n T.firstname,\n T.lastname,\n\t\t\t\tT.datec,\n\t\t\t\tT.total_ht,\n\t\t\t\tT.ztypepresta,\n\t\t\t\t(SUM(T.total_det) - SUM((T.buy_price_ht * T.qty))) AS marge\n\t\t\tFROM\n\t\t\t(\n\t\t\tSELECT llx_propal.ref,\n\t\t\t\tllx_propal.ref_client,\n\t\t\t\tllx_societe.nom,\n\t\t\t\tllx_user.firstname,\n\t\t\t\tllx_user.lastname, \n\t\t\t\tllx_propal.datec,\n\t\t\t\tllx_propal.total_ht,\n\t\t\t\tllx_propal_extrafields.ztypepresta,\n\t\t\t\tllx_propaldet.total_ht as total_det,\n\t\t\t\tllx_propaldet.buy_price_ht,\n\t\t\t\tllx_propaldet.qty\n\t\t\tFROM llx_propal \n\t\t\t\tLEFT JOIN llx_propal_extrafields ON (llx_propal_extrafields.fk_object=llx_propal.rowid)\n\t\t\t\tLEFT JOIN llx_societe ON (llx_societe.rowid=llx_propal.fk_soc)\n\t\t\t\tLEFT JOIN llx_element_contact ON (llx_element_contact.element_id=llx_propal.rowid)\n\t\t\t\tLEFT JOIN llx_user ON (llx_user.rowid=llx_element_contact.fk_socpeople)\n\t\t\t\tLEFT JOIN llx_propaldet ON (llx_propaldet.fk_propal=llx_propal.rowid)\n\t\t\t\tWHERE (llx_element_contact.fk_c_type_contact=31) AND llx_propal.fk_statut=1 \n\t\t\tUNION\n\t\t\tSELECT llx_propal.ref,\n\t\t\t\tllx_propal.ref_client,\n\t\t\t\tllx_societe.nom,\n\t\t\t\tllx_user.firstname,\n\t\t\t\tllx_user.lastname, \n\t\t\t\tllx_propal.datec,\n\t\t\t\tllx_propal.total_ht,\n\t\t\t\tllx_propal_extrafields.ztypepresta,\n\t\t\t\tllx_propaldet.total_ht as total_det,\n\t\t\t\tllx_propaldet.buy_price_ht,\n\t\t\t\tllx_propaldet.qty\n\t\t\tFROM llx_propal \n\t\t\t\t\tLEFT JOIN llx_propal_extrafields ON (llx_propal_extrafields.fk_object=llx_propal.rowid) \n\t\t\t\t\tLEFT JOIN llx_user ON (llx_user.rowid=llx_propal.fk_user_author) \n\t\t\t\t\tLEFT JOIN llx_societe ON (llx_societe.rowid=llx_propal.fk_soc)\n\t\t\t\t\tLEFT JOIN llx_propaldet ON (llx_propaldet.fk_propal=llx_propal.rowid)\n\t\t\t\t\tWHERE llx_propal.rowid NOT IN (SELECT llx_element_contact.element_id FROM llx_element_contact WHERE llx_element_contact.fk_c_type_contact=31) AND llx_propal.fk_statut=1\n\t\t\tORDER BY datec desc, lastname asc\n\n\t\t\t) AS T\n GROUP BY T.ref,\n\t\t\t\tT.ref_client,\n T.nom,\n T.firstname,\n T.lastname,\n\t\t\t\tT.datec,\n\t\t\t\tT.total_ht,\n\t\t\t\tT.ztypepresta\n ORDER BY T.ref, T.lastname\";\n\t\t\t\n\t\t\n\t\t\t//REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(llx_propal_extrafields.ztypepresta,15, 'AFF.Dynamique '),14, 'IPTV '),13, 'Wifi '),12, 'Videoprotection '),11, 'VDI '),10, 'TV '),9, 'Telephonie '),8, 'Interphonie '),7, 'GTC '),6, 'Controle d acces '),5, 'Cablage '),4, 'Alarme SSI '),3, 'Alarme intrusion '),2, 'Tertiaire '),1 , 'Habitat ')\n\t\t\t\n\t//$tt = $pdo->fetchAll();\n\t$num_type = array (15,14,13,12,11,10,9,8,7,6,5,4,3,2,1);\n\t$verb_type = array ('AFF.Dynamique ','IPTV ','Wifi ','Videoprotection ', 'VDI ', 'TV ', 'Telephonie ',' Interphonie',' GTC', ' Controle d acces', ' Cablage', ' Alarme SSI', ' Alarme intrusion', ' Tertiaire' , ' Habitat');\n\t\t\t\n\tforeach ($pdo->query($sql) as $row) \n\t{\n\t\t\n\t\t\n\t\t$type = str_replace ($num_type, $verb_type, $row['ztypepresta']);\n\t\t$marge_tx = 0;\n\t\tif ($row['total_ht']!=0)\n\t\t{\n\t\t\t//$marge_tx = round($row['marge'], 2).\"€ soit \".round((($row['marge']/$row['total_ht'])*100),2).\"%\";\n\t\t\t$marge_tx = round((($row['marge']/$row['total_ht'])*100),2);\n\t\t}\n\t\t//$ligne = array(\"C1\" => $row['llx_propal.ref'], \"C2\" => $row['llx_propal.ref_client'], \"C3\" => $row['llx_societe.nom'], \"C4\" => $row['llx_user.firstname'].\" \".$row['llx_user.lastname'], \"C5\" => $row['llx_propal.datec'], \"C6\" => $row['llx_propal.total_ht'], \"C7\" => $row[\"REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(llx_propal_extrafields.ztypepresta,15, 'AFF.Dynamique '),14, 'IPTV '),13, 'Wifi '),12, 'Vidéoprotection '),11, 'VDI '),10, 'TV '),9, 'Téléphonie '),8, 'Interphonie '),7, 'GTC '),6, 'Contrôle d'acces '),5, 'Cablage '),4, 'Alarme SSI '),3, 'Alarme intrusion '),2, 'Tertiaire '),1 , 'Habitat ')\"]);\n\t\t$ligne = array(\"C1\" => $row['ref'], \"C2\" => $row['ref_client'], \"C3\" => $row['nom'], \"C4\" => $row['firstname'].\" \".$row['lastname'], \"C5\" => $row['datec'], \"C6\" => $row['total_ht'], \"C7\" => $type, \"C8\" => $row['marge'], \"C9\" => $marge_tx);\n\t\t\n\t\tarray_push($tableau, $ligne);\n\t}\n\n\n\t\t\n\n\n\n\t\n\t\treturn $tableau;\n}", "title": "" }, { "docid": "1586580b279852c58d61f9d974eeb952", "score": "0.55482006", "text": "function saldotohari($saldo){\n\t\t// saldo cuti menjadi hari\n\t\t$saldocuti=$saldo;\n\t\t$saldojam=$saldocuti%8;\n\t\t$saldohari=($saldocuti-$saldojam)/8;\n\t\t$return=\"$saldohari Hari $saldojam Jam\";\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "4c6796b16c32f21c6d5f060c45876ba6", "score": "0.5542516", "text": "public function provjeri_poslovni_prostor()\n {\n //ukoliko je zatvoren vrati false ukoliko nije true\n $id = $this->input->post('id');\n if($this->postavka->getProdajnoMjestoID($id))\n {\n echo json_encode(array('uspjelo'=>'1', 'poruka' => '<div class=\"alert alert-success\" >Moze se slati prijava poslovnog prostora! </pre>')); \n }\n else\n {\n echo json_encode(array('uspjelo'=>'0')); \n } \n \n }", "title": "" }, { "docid": "54da6aace4dad8a408242c61349f6e24", "score": "0.55398226", "text": "public function naknadaPozivDrzOrgana() {\n return round($this->karnet->getValue('satiPozivDrzOrgana') * $this->karnet->getValue('prosek3Meseca'), 2);\n }", "title": "" }, { "docid": "6000e31a4273ad8bab2469aa4e964e1f", "score": "0.5534272", "text": "function OdhlasHraceZeScenare( $id_hrac = null, $zapsat_statistiky = true){\n\tglobal $users_class, $db, $CONST;\n\n\tif (!isset( $id_hrac )){\n\t\t$id_hrac = $users_class->user_id();\n\t}\t\n\t\n\t$id_ligy = JeUzivatelVLize( $id_hrac );\n\tif(!$id_ligy){\n\t\treturn;\n\t}\n\t\n\t$query = \"SELECT * FROM ligy WHERE id='$id_ligy'\";\n\t$res = $db->Query( $query );\n\t$row = $db->GetFetchAssoc( $res );\n\t$odehranych_dnu = $row['odehranych_dnu'];\n\t$dohrano = $row['dohrano'];\n\t$trening = $row['typ'] == 'trening';\n\t\n\t//zapis posledni umisteni v lize \n\tif($dohrano!='ano' && $odehranych_dnu>1 && !$trening){\n\t\t$strana = VratAtributHrace('strana', $id_hrac);\n\t\t$datum = date(\"Y-m-d H:i:s\");\n\t\t$query = \"SELECT count(*) FROM in_game_hrac WHERE id_liga='$id_ligy'\";\n\t\t$res = $db->Query( $query );\n\t\t$um = $db->GetFetchRow( $res );\n\t\t$umisteni = $um[0];\n\t\t\n\t\t// odehranych dnu 0 - odlogoval se sam\n\t\t$query = \"INSERT INTO users_vyhry (id_user, id_ligy, datum, odehranych_dnu, umisteni, strana) VALUES\n\t\t\t\t('$id_hrac', '$id_ligy', '$datum', 0,'$umisteni', '$strana');\";\n\t\t$db->DbQuery( $query );\n\t}\n\t\n\t$query = \"DELETE FROM in_game_utoky WHERE id_vlastnik = '$id_hrac'\";\n\t$db->DbQuery( $query );\n\t\n\t$query = \"DELETE FROM in_game_podpora WHERE id_autor = '$id_hrac'\";\n\t$db->DbQuery( $query );\n\t\n\t$query = \"DELETE FROM in_game_letecke_akce WHERE id_autor = '$id_hrac'\";\n\t$db->DbQuery( $query );\n\t\n\t$query = \"DELETE FROM in_game_stavby WHERE id_ligy='$id_ligy' AND \n\t\t\tid_zeme IN (SELECT id_zeme FROM in_game_zeme WHERE id_vlastnik='$id_hrac')\";\n\t$db->DbQuery( $query );\n\t\n\t$query = \"DELETE FROM in_game_hrac WHERE id_hrac = '$id_hrac'\";\n\t$db->DbQuery( $query );\n\t\n\t//vypocet novych hodnot odlogovanych zemi\n\t$infra = $odehranych_dnu + 11;\n\t$pechota = $CONST['NEUTRALKA_PECHOTA'] + 4 * ($odehranych_dnu - 1);\n\t$tanky = $CONST['NEUTRALKA_TANKY'] + $odehranych_dnu - 1;\n\t$sn = ($pechota + $tanky ) * 4 + 2;\n\t\n\t$query = \"UPDATE in_game_zeme SET id_vlastnik=NULL, infrastruktura_now='$infra', \n\t\t\tpechota='$pechota', pechota_odeslano=0, tanky='$tanky', tanky_odeslano=0,\n\t\t\tpovolano=0, oprava_infrastruktury=0, vojenska_policie=0, sila_neutralka='$sn',\n\t\t\tpvo_stanice=0, lze_povolat=0\n\t\tWHERE id_vlastnik = '$id_hrac'\";\n\t$db->DbQuery( $query );\n\t\n\t$query = \"UPDATE in_game_vcera_zeme SET id_vlastnik=NULL, pechota='$pechota', tanky='$tanky',\n\t\tinfrastruktura_now='$infra', sila_neutralka='$sn' WHERE id_vlastnik = '$id_hrac'\";\n\t$db->DbQuery( $query );\n\t\n\tif($dohrano!='ano' && $zapsat_statistiky){\n\t\tstat_odhlaseni( $id_hrac );\n\t}\n}", "title": "" }, { "docid": "c827e58061590115803c38a9c71d0f1e", "score": "0.55318695", "text": "public function game_data()\n {\n $sParam = $_POST[\"parametri\"];\n $nPozitie = 0;\n\n $param_data = substr($sParam, $nPozitie, 10);\n $nPozitie += 10;\n\n $param_idjoc = $this->DecodificaHexa(substr($sParam, $nPozitie, 2));\n $nPozitie += 2;\n\n $param_subtip = $this->DecodificaHexa(substr($sParam, $nPozitie, 2));\n $nPozitie += 2;\n\n $param_dificultate = $this->DecodificaHexa(substr($sParam, $nPozitie, 2));\n $nPozitie += 2;\n\n $param_numar_exercitii = $this->DecodificaHexa(substr($sParam, $nPozitie, 2));\n $nPozitie += 2;\n\n $param_raspunsuri_corecte = $this->DecodificaHexa(substr($sParam, $nPozitie, 2));\n $nPozitie += 2;\n\n $param_cel_mai_rapid_raspuns = $this->DecodificaHexa(substr($sParam, $nPozitie, 2)) * 256.0;\n $nPozitie += 2;\n $param_cel_mai_rapid_raspuns += $this->DecodificaHexa(substr($sParam, $nPozitie, 2));\n $nPozitie += 2;\n $param_cel_mai_rapid_raspuns /= 10.0;\n\n $param_cel_mai_lent_raspuns = $this->DecodificaHexa(substr($sParam, $nPozitie, 2)) * 256.0;\n $nPozitie += 2;\n $param_cel_mai_lent_raspuns += $this->DecodificaHexa(substr($sParam, $nPozitie, 2));\n $nPozitie += 2;\n $param_cel_mai_lent_raspuns /= 10.0;\n\n $param_timp_mediu_de_raspuns = $this->DecodificaHexa(substr($sParam, $nPozitie, 2)) * 256.0;\n $nPozitie += 2;\n $param_timp_mediu_de_raspuns += $this->DecodificaHexa(substr($sParam, $nPozitie, 2));\n $nPozitie += 2;\n $param_timp_mediu_de_raspuns /= 10.0 * $param_raspunsuri_corecte;\n\n $param_scor = $this->DecodificaHexa(substr($sParam, $nPozitie, 2)) * 256.0;\n $nPozitie += 2;\n $param_scor += $this->DecodificaHexa(substr($sParam, $nPozitie, 2));\n $nPozitie += 2;\n\n // === PARAMETRI ===\n /*\n $param_data\t\t\t\t\t\tdata si ora, in format AALLZZOOMM (an, luna, zi, ora, minut)\n $param_idjoc\t\t\t\t\tID joc ( == 1)\n $param_subtip\t\t\t\t\tnefolosit\n $param_dificultate\t\t\t\tnivel de dificultate\n $param_numar_exercitii\t\t\tnumar de exercitii\n $param_raspunsuri_corecte\t\traspunsuri corecte\n $param_cel_mai_rapid_raspuns\tcel mai rapid raspuns\n $param_cel_mai_lent_raspuns\t\tcel mai lent raspuns\n $param_timp_mediu_de_raspuns\ttimp mediu de raspuns\n $param_scor\t\t\t\t\t\tscor\n */\n\n\n $user_id=Session::get(\"user_id\");\n //$str1= \"param_idjoc-\".$param_idjoc.\"<br/>param-subtim->\".$param_subtip.\"<br/>param_dificultate->\".$param_dificultate.\"<br/>param_raspunsuri_corecte\".$param_raspunsuri_corecte;\n //$str2=\"<br/>param_cel_mai_rapid_raspuns->\".$param_cel_mai_rapid_raspuns.\"<br/>param_cel_mai_lent_raspuns->\".$param_cel_mai_lent_raspuns.\"<br/>param_timp_mediu_de_raspuns->\".$param_timp_mediu_de_raspuns.\"<br/>param_scor->\".$param_scor;\n\n $success=$this->db_user->save_game_param($user_id,$param_idjoc,$param_subtip,$param_dificultate,$param_raspunsuri_corecte,$param_cel_mai_rapid_raspuns,$param_cel_mai_lent_raspuns,$param_timp_mediu_de_raspuns,round($param_scor,2));\n if($success){\n $cat=$this->db_user->get_category_by_game_id($param_idjoc);\n $game_cat=$this->language_file->getParam($cat);\n $this->send_results($game_cat,$param_idjoc,$param_dificultate,$param_numar_exercitii,$param_raspunsuri_corecte,round($param_cel_mai_rapid_raspuns,2),round($param_cel_mai_lent_raspuns,2),round($param_timp_mediu_de_raspuns,2),round($param_scor,2));\n echo $this->language_file->getParam(\"send_email\");\n }\n }", "title": "" }, { "docid": "da8328ca426e3e78ef927db831905c19", "score": "0.5531615", "text": "function Precio_final(){\n\t\t$valor_final=$this->precio_base-self::$descuento;\n\t\treturn $valor_final;\n\t}", "title": "" }, { "docid": "708d5c5fb04289f6f03071dc42990565", "score": "0.5529266", "text": "function wyswietlSondeWkoalicji(){\r\n\tglobal $login;\r\n\tglobal $polaczenie;\r\n\tglobal $kingdomInfo;\r\n\t$SQL =\"select id from ankiety where koalicja='\".$kingdomInfo['koalicja'].\"'\r\n and tryb='koalicja'\";\r\n\t$wynik= mysql_query($SQL)or Die(\"sondy koalicje wyswietl\");\r\n\tif(mysql_num_rows($wynik)==1){\r\n\t\t$tmp = mysql_fetch_array($wynik);\r\n\t\t$ankieta->czyJest=true;\r\n\t\t$ankieta->ankieta = wyswietlSondeLubWynik($tmp['id']);\r\n\t\treturn $ankieta;\r\n\t}else{\r\n\t\t$ankieta->czyJest=false;\r\n\t\treturn $ankieta;\r\n\t}\r\n}", "title": "" }, { "docid": "b7c344553927085c7739e5ddac3c1707", "score": "0.55287415", "text": "public function drugaPrimanja() {\n return round($this->topliObrok() + $this->karnet->getValue('iznosOtpremnina') +\n $this->karnet->getValue('iznosRegres') + $this->karnet->getValue('iznosTerenskiDodatak') +\n $this->karnet->getValue('iznosPoklonDeci') + $this->karnet->getValue('iznosOstalo'), 2);\n }", "title": "" }, { "docid": "c4c76d56a231ecb4b73528da444c2231", "score": "0.5522091", "text": "public function getPrezzo():float;", "title": "" }, { "docid": "6aadec4c2f53a9674a71e0627a31e29e", "score": "0.55194896", "text": "public function getPrecio_viaje()\r\r\n {\r\r\n return $this->precio_viaje;\r\r\n }", "title": "" }, { "docid": "5cd1191035b204426688eb21c8d09d39", "score": "0.5519158", "text": "private function __dadosAdicionaisDANFE($x,$y,$pag,$h){\n $oldX = $x;\n\n //*** DADOS ADICIONAIS ***\n $texto = \"DADOS ADICIONAIS\";\n $w = $this->wPrint;\n $aFont = array('font'=>$this->fontePadrao,'size'=>7,'style'=>'B');\n $this->__textBox($x,$y,$w,8,$texto,$aFont,'T','L',0,'');\n\n //*** INFORMAÇÕES COMPLEMENTARES ***\n $texto = \"INFORMACOES COMPLEMENTARES\";\n $y += 3;\n $w = round($this->wPrint*0.66,0);\n $aFont = array('font'=>$this->fontePadrao,'size'=>7,'style'=>'B');\n $this->__textBox($x,$y,$w,$h,$texto,$aFont,'T','L',1,'');\n if (isset($this->infAdic)){\n $i = 0;\n $texto = '';\n $texto .= !empty($this->infAdic->getElementsByTagName(\"infCpl\")->item(0)->nodeValue) ? ' ' . $this->infAdic->getElementsByTagName(\"infCpl\")->item(0)->nodeValue : '';\n $texto .= !empty($this->infAdic->getElementsByTagName(\"infAdFisco\")->item(0)->nodeValue) ? \"\\r\\n \" . $this->infAdic->getElementsByTagName(\"infAdFisco\")->item(0)->nodeValue : '';\n $obsCont = $this->infAdic->getElementsByTagName(\"obsCont\");\n if (isset($obsCont)){\n foreach ($obsCont as $obs){\n $campo = $obsCont->item($i)->getAttribute(\"xCampo\");\n $xTexto = !empty($obsCont->item($i)->getElementsByTagName(\"xTexto\")->item(0)->nodeValue) ? $obsCont->item($i)->getElementsByTagName(\"xTexto\")->item(0)->nodeValue : '';\n $texto .= \"\\r\\n\" . $campo . ': ' . $xTexto;\n $i++;\n }\n }\n } else {\n $texto = '';\n }\n $y += 1;\n $aFont = array('font'=>$this->fontePadrao,'size'=>7,'style'=>'');\n $this->__textBox($x,$y+2,$w-2,$h-3,$texto,$aFont,'T','L',0,'',FALSE);\n\n //*** RESERVADO AO FISCO ***\n $texto = \"RESERVADO AO FISCO\";\n $x += $w;\n $y -= 1;\n $w = $this->wPrint-$w;\n $aFont = array('font'=>$this->fontePadrao,'size'=>6,'style'=>'B');\n $this->__textBox($x,$y,$w,$h,$texto,$aFont,'T','L',1,'');\n $tpEmis = $this->ide->getElementsByTagName(\"tpEmis\")->item(0)->nodeValue;\n $texto = '';\n switch($tpEmis){\n case 2:\n $texto = 'CONTINGENCIA FS emissao em contingencia com impressao do DANFE em Formulario de Seguranca';\n break;\n case 3:\n $texto = 'CONTINGENCIA SCAN';\n break;\n case 4:\n $texto = 'CONTINGENCIA DPEC';\n break;\n case 5:\n $texto = 'CONTINGENCIA FSDA emissao em contingencia com impressao do DANFE em Formulario de Seguranca para Impressao de Documento Auxiliar de Documento Fiscal Eletronico (FS-DA)';\n break;\n }\n $y += 2;\n $aFont = array('font'=>$this->fontePadrao,'size'=>7,'style'=>'');\n $this->__textBox($x,$y,$w-2,$h-3,$texto,$aFont,'T','L',0,'',FALSE);\n return $y+$h;\n }", "title": "" }, { "docid": "7afc5e7c2cc663f7e84796f63a5444d6", "score": "0.55177283", "text": "public function uloz()\n\t{\n\t\t$dbh = Projektor_Container::getDbh(Framework_Config::DATABAZE_PROJEKTOR);\n\n\t\tif($this->id == null)\n\t\t{\n\t\t\t$query = \"INSERT INTO ~1 (~2, ~3, ~4, ~5, ~6, ~7, ~8, ~9, ~10, ~11) VALUES (:12, :13, :14, :15, :16, :17, :18, :19, :20, :21)\";\n\t\t\treturn $dbh->prepare($query)->execute(\n\t\t\tself::TABULKA, self::JMENO, self::PRIJMENI, self::TELEFON_PRACE, self::TELEFON_MOBIL, self::E_MAIL_GRAFIA, self::E_MAIL_OSOBNI, self::INFO_PUBLIC, self::INFO_MANAGER, self::ID_C_ROLE_FK, self::ID_C_ZAMESTNAVATEL_PERSONAL_FK,\n\t\t\t$this->jmeno, $this->prijmeni, $this->telefonPrace, $this->telefonMobil, $this->emailGrafia, $this->emailOsobni, $this->infoPublic, $this->infoManager, $this->idCRoleFK, $this->idCZamestnavatelPersonalFK\n\t\t\t)->last_insert_id();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = \"UPDATE ~1 SET ~2=:3, ~4=:5, ~6=:7, ~8=:9, ~10=:11, ~12=:13, ~14=:15, ~16=:17, ~18=:19, ~20=:21, WHERE ~22=:23\";\n\t\t\t$dbh->prepare($query)->execute(\n\t\t\tself::TABULKA, self::JMENO, $this->jmeno,\n\t\t\tself::PRIJMENI, $this->prijmeni,\n\t\t\tself::TELEFON_PRACE, $this->telefonPrace,\n\t\t\tself::TELEFON_MOBIL, $this->telefonMobil,\n\t\t\tself::E_MAIL_GRAFIA, $this->emailGrafia,\n\t\t\tself::E_MAIL_OSOBNI, $this->emailOsobni,\n\t\t\tself::INFO_PUBLIC, $this->infoPublic,\n\t\t\tself::INFO_MANAGER, $this->infoManager,\n\t\t\tself::ID_C_ROLE_FK, $this->idCRoleFK,\n\t\t\tself::ID_C_ZAMESTNAVATEL_PERSONAL_FK, $this->idCZamestnavatelPersonalFK,\n\t\t\tself::ID, $this->id\n\t\t\t);\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "65f487a61bd3000d533752cb897c4f8a", "score": "0.5514466", "text": "public function zobrazpristupyVcera ($kedy = 'all') {\n\t\t# dnes = \n\t\t# vcera = - 1 day alebo time()-(3600*24) = 1 den\n\t\t# tyzden = - 7 day\n\t\t\n\t\t# CELKOVO\n\t\t$query = $this->db->query('SELECT COUNT(DISTINCT pocitadlo_ip) AS pocetcelkovo_ip, \n\t\t\t\t\t\t\t\t\t\t COUNT(DISTINCT pocitadlo_id) AS pocetcelkovo_zob,\n\t\t\t\t\t\t\t\t\t\t MAX(pocitadlo_datum) AS poslednypristup \n\t\t\t\t\t\t\t\t\tFROM be_pocitadlo' . $this->prefix . ' \n\t\t\t\t\t\t\t\t\tWHERE DATE(pocitadlo_datum) = DATE_ADD(CURDATE(), INTERVAL -1 DAY)\n\t\t\t\t\t\t\t\t\tORDER BY pocitadlo_datum DESC ');\n\t\n\t\t$row = $query->fetch_assoc();\n\n\t\t?>\n\t\t<h4>Vcera</h4>\n\t\t<table>\n\t\t<tr><td style=\"font-weight: bold;\">Pocet navstev:</td><td><?php echo htmlspecialchars($row['pocetcelkovo_ip']); ?></td></tr>\n\t\t<tr><td style=\"font-weight: bold;\">Pocet zobrazeni:</td><td><?php echo htmlspecialchars($row['pocetcelkovo_zob']); ?></td></tr>\n\t\t</table>\n\t\t<?php\n\n\t}", "title": "" }, { "docid": "977247bc1e1d130c8660cff66e8cf5eb", "score": "0.5513223", "text": "public function AddOrden() {\n\t\t$db = new dbConn();\n\n\t if ($r = $db->select(\"correlativo\", \"cotizaciones_data\", \"WHERE td = \".$_SESSION[\"td\"].\" order by correlativo desc limit 1\")) { \n\t $ultimoorden = $r[\"correlativo\"];\n\t } unset($r); \n\n\t \tif($ultimoorden == NULL){ $ultimoorden = 0; }\n\t\t\t$datos = array();\n\t\t $datos[\"cliente\"] = $_SESSION[\"cliente_cot\"];\n\t\t $datos[\"correlativo\"] = $ultimoorden + 1;\n\t\t $datos[\"fecha\"] = date(\"d-m-Y\");\n\t\t $datos[\"hora\"] = date(\"H:i:s\");\n\t\t $datos[\"fechaF\"] = Fechas::Format(date(\"d-m-Y\"));\n\t\t $datos[\"caduca\"] = Fechas::DiaSuma(date(\"d-m-Y\"),15);\n\t\t $datos[\"caducaF\"] = Fechas::Format(Fechas::DiaSuma(date(\"d-m-Y\"),15));\n\t\t $datos[\"edo\"] = 1;\n\t\t $datos[\"hash\"] = Helpers::HashId();\n\t\t $datos[\"time\"] = Helpers::TimeId();\n\t\t $datos[\"td\"] = $_SESSION[\"td\"];\n\t\t $db->insert(\"cotizaciones_data\", $datos); \n\t\t\n\t\t$_SESSION[\"cotizacion\"] = $ultimoorden + 1; \n\t}", "title": "" }, { "docid": "5520ea532b33ec4d6b20472d3dad351b", "score": "0.55121994", "text": "function proveedorMoneda($idbancaria){\n\t\t\t$sql=$this->query(\"SELECT p.cuenta,p.idPrv,p.razon_social FROM mrp_proveedor p ,bco_cuentas_bancarias cb,cont_accounts c where cb.idbancaria=\".$idbancaria.\" and (c.account_id=p.cuenta and c.currency_id=cb.coin_id || p.cuenta=0) group by p.idPrv order by razon_social asc \");\n\t\t\treturn $sql;\n\t\t}", "title": "" }, { "docid": "193131ccd639308a0389c7adc8025957", "score": "0.550227", "text": "public function ingresoCompraPendiente(){\n $filas= Yii::app()->db->createCommand(\n \"select t.cant-sum(b.cant) as faltan,t.cant \n from {{docompra}} t,\n {{alentregas}} b where \n b.iddetcompra=t.id and\n t.iddesolpe not in \n (select id from \n {{desolpe}} where idreserva > 0) \n and t.codart='\".$this->codart.\"' and \n t.codentro='\".$this->codcen.\"' \n and t.codigoalma='\".$this->codalm.\"' \n group by t.codart\n having sum(b.cant) < t.cant\")->queryAll();\n if(count( $filas)>0)\n return $filas[0]['faltan'];\n return 0;\n }", "title": "" }, { "docid": "17203c616d9b9c2e9f64d4749acabd4b", "score": "0.54997915", "text": "function guru()\n {\n $variabel['data'] = $this->m_guru->lihatdata();\n $this->layout->renderakdp('back-end/akademik/guru_p/v_guru',$variabel,'back-end/akademik/guru_p/v_guru_js');\n }", "title": "" }, { "docid": "a55ecc1224c3862401f8ae7258287c5f", "score": "0.54970086", "text": "public function zaradaUkupno() {\n return ( $this->zaradaZaObavljeniRad() + $this->zaradaDoprinosPoslovnomUspehu() + $this->drugaPrimanja() );\n }", "title": "" }, { "docid": "f56b73a1621738bf2725b6acc1de4e64", "score": "0.5496897", "text": "public function getPreu()\n{\nreturn $this->preu;\n}", "title": "" }, { "docid": "7062ea80c3518900f009a5b089aa9fdf", "score": "0.54952615", "text": "public function postaviKom(){\n \n if (empty($_POST['komentar']) || empty($_POST['ocena']) )\n return call('prvi','greska');\n \n \n Ad::postaviKomentar($_POST['komentar'], $_POST['ocena'],$_POST['idOglasa']);\n $idOglasa=$_POST['idOglasa'];\n $oglas= Ad::getAdWithId($idOglasa);\n require_once 'views/RecenzijeObican/recenzija.php';\n \n //$nizRecenzija= Recenzija::dohvatiSveKomentare($idOglasa);\n // require_once 'views/oglasi/prikaz_recenzija.php';\n }", "title": "" }, { "docid": "6059ba3a8689743c5119951b773b0695", "score": "0.5492181", "text": "public function getAgenciaCobradoraDac();", "title": "" }, { "docid": "8a9424c17ec28899741d5b3c5f3bfb93", "score": "0.54856414", "text": "public function proses(){\n $this->initAwal();\n\n //menampilkan tabel total\n //$this->tampilTabelTotal();\n \n //memberikan data awal untuk matrix\n $this->initMatrix();\n $this->jum = 2*$this->orde;\n //menampilkan matrix gauss\n //$this->tampilMatrixAsli($this->matrix);\n\n //menjalankan rumus gauss serta menampilkannya\n $this->gauss();\n \n //pencarian nilai b dan Y topi\n $this->pencarianNilai();\n $this->jum = 12;\n //menampilkan grafik hasil\n $this->tampilGrafik();\n\n // echo \"<pre>\";\n // print_r($this->matrix);\n // echo \"</pre>\";\n\n }", "title": "" }, { "docid": "7c53a6747ba1fdaa6515d5c3a732c4ab", "score": "0.54839367", "text": "function monto_restante_padre($id){\n\t$con = Db::connect();\n\t$sql = $con -> query(\"select\n\t\t\t\t\t\t\t\t\t\t\t\t\tp_monto\n\t\t\t\t\t\t\t\t\t\t\t\tfrom\n\t\t\t\t\t\t\t\t\t\t\t\t\tmaestro_partidas\n\t\t\t\t\t\t\t\t\t\t\t\twhere\n\t\t\t\t\t\t\t\t\t\t\t\t id = '\".$id.\"'\");\n\twhile($monto = $sql -> fetch_array()){\n\t\treturn $monto['p_monto'];\n\t}\n\n}", "title": "" }, { "docid": "c5e30f92619546be289b4d40730ca0c9", "score": "0.54831195", "text": "public function previewdiasprimanavidad($Cform)\n\t{\n\t $connection = Yii::app()->db;\n\t $sql = ' ';\n if($Cform->NOVE_TIPOCARGO!=''){ $sql = ' AND \"TICA_ID\" = '.$Cform->NOVE_TIPOCARGO;}\t \n\t $sql=' \n\t SELECT \"NOPN_ID\", \"PEGE_ID\", \"PEGE_IDENTIFICACION\", \"PEGE_PRIMERAPELLIDO\", \"PEGE_SEGUNDOAPELLIDOS\", \"PEGE_PRIMERNOMBRE\", \"PEGE_SEGUNDONOMBRE\", \"NOPN_MESES\"\n FROM (SELECT pg.*, npn.\"NOPN_ID\", npn.\"NOPN_MESES\", (SELECT eep.\"ESEM_ID\"\n\t\t FROM \"TBL_NOMESTADOSEMPLEOSPLANTA\" eep \n\t\t WHERE ep.\"EMPL_ID\" = eep.\"EMPL_ID\" AND ep.\"PEGE_ID\" = pg.\"PEGE_ID\"\n\t\t ORDER BY eep.\"ESEP_FECHAREGISTRO\" DESC \n\t\t LIMIT 1 \n\t\t ) AS \"ESEM_ID\", \n\t\t (SELECT ep.\"TICA_ID\"\n FROM \"TBL_NOMEMPLEOSPLANTA\" ep, \"TBL_NOMESTADOSEMPLEOSPLANTA\" eep\n WHERE ep.\"EMPL_ID\" = eep.\"EMPL_ID\" AND ep.\"PEGE_ID\" = pg.\"PEGE_ID\"\n ORDER BY eep.\"ESEP_FECHAREGISTRO\" DESC\n LIMIT 1\n ) AS \"TICA_ID\", \n (SELECT ep.\"UNID_ID\"\n FROM \"TBL_NOMEMPLEOSPLANTA\" ep, \"TBL_NOMESTADOSEMPLEOSPLANTA\" eep\n WHERE ep.\"EMPL_ID\" = eep.\"EMPL_ID\" AND ep.\"PEGE_ID\" = pg.\"PEGE_ID\"\n ORDER BY eep.\"ESEP_FECHAREGISTRO\" DESC\n LIMIT 1\n ) AS \"UNID_ID\" \n FROM \"TBL_NOMPERSONASGENERALES\" \"pg\" \n INNER JOIN \"TBL_NOMEMPLEOSPLANTA\" ep ON pg.\"PEGE_ID\" = ep.\"PEGE_ID\"\n INNER JOIN \"TBL_NOMNOVEDADESPRIMANAVIDAD\" npn ON pg.\"PEGE_ID\" = npn.\"PEGE_ID\" \t\t\t\t\t\t \n GROUP BY pg.\"PEGE_ID\", ep.\"EMPL_ID\", npn.\"NOPN_ID\" ) s \n WHERE \"ESEM_ID\" = 1 \n ORDER BY \"PEGE_PRIMERAPELLIDO\", \"PEGE_SEGUNDOAPELLIDOS\", \"PEGE_PRIMERNOMBRE\", \"PEGE_SEGUNDONOMBRE\" \n\t\t ';\n\t\n\t $this->unidadespnavidadDataProvider = NULL;\n\t $count=Yii::app()->db->createCommand('SELECT COUNT(*) FROM ('.$sql.') AS q')->queryScalar();\t \n\t $this->unidadespnavidadDataProvider = $dataProvider=new CSqlDataProvider($sql, array(\n 'totalItemCount'=>$count,\n 'sort'=>array(\n 'attributes'=>array(\n 'PEGE_ID', 'PEGE_IDENTIFICACION', 'PEGE_PRIMERAPELLIDO','PEGE_SEGUNDOAPELLIDOS','PEGE_PRIMERNOMBRE','PEGE_SEGUNDONOMBRE','NOPN_MESES',\n ),\n ),\n 'pagination'=>array(\n 'pageSize'=>1000,\n ),\n )\n\t );\n\t}", "title": "" }, { "docid": "e975365cb0a08a5d573d85dbb97c4e0e", "score": "0.5482821", "text": "public function osnovnaZarada() {\n $tipUm = $this->karnet->getValue('tipUmanjenja');\n $brSati = $this->karnet->radniSatiOsnovnaZarada();\n // standardno umanjenje, tj. umanjenje samo na osnovu umanjene cene rada\n if($tipUm === 1)\n {\n return round($brSati * $this->vrednostSata(), 2);\n }\n // $tipUm === 2, granicni slucaj, gde pada ispod 25000 neto, tj. 34059,63 bruto\n // pa ga treba vestacki vratiti na taj iznos\n $minBruto = 34059.63; // min bruto na 25000\n return round($minBruto / $this->payment->getValue('satiUMesecu') * $brSati, 2);\n }", "title": "" }, { "docid": "c545a7ac5257e00244e9c82e3f06b740", "score": "0.54823416", "text": "public function pagodiario($pagodeprestamos_id,$id,$montopagado,$dias){\n $sql=\"select * from prestamo where id=\".$id;\n $prestamo= $this->Pagodeprestamo->query($sql);\n \n $sql=\"select * from cuotas where prestamo_id=\".$id;\n $cuota= $this->Pagodeprestamo->query($sql);\n $totale=count($cuota);\n $cuota=$cuota[$totale-1]['cuotas'];\n $sql=\"select * from interesprestamo where id=\".$prestamo[0]['prestamo']['interesprestamo_id'];\n $porcentaje= $this->Pagodeprestamo->query($sql);\n \n $sql=\"select * from transaccionprestamointeres where prestamo_id=\".$id;\n $transaccion= $this->Pagodeprestamo->query($sql);\n $total=count($transaccion);\n $montointeres=$transaccion[$total-1]['transaccionprestamointeres']['montointeres'];\n \n if($montopagado>$montointeres){/*si el montopagado es igual al montoenintereses*/\n //pago y la diferencia que sobra entre lo que pagó el cliente menos los intereses que ha de pagar\n $pagototal=$montopagado-$montointeres;\n echo $pagototal.\"=\".$montopagado.\"-\".$montointeres;\n $montodeuda=$prestamo[0]['prestamo']['montodeuda'];//deuda actual que hay en prestamo\n echo \" <br>\".$montodeuda;\n $montototal=$montodeuda-$pagototal;//nueva montodeuda\n echo \"<br>\".$montototal.\"=\".$montodeuda.\"-\".$pagototal;\n $nuevacuota=$montototal*($porcentaje[0]['interesprestamo']['valor']/100);\n echo \" <br>\".$nuevacuota.\"=\".$montototal.\"*(\".$porcentaje[0]['interesprestamo']['valor']/(100).\")\";\n \n /*queda por hacer*/\n /*modificar tabla prestamo*/\n $sql=\"UPDATE prestamo set montodeuda=\".$montototal.\", diaspagados=\".$dias.\" where id=\".$id;\n $this->Pagodeprestamo->query($sql);\n /*nueva insercion en cuotas*/\n $sql=\"INSERT INTO cuotas (fechaini, fechafin, nrocuotas,montocuota,prestamo_id) VALUES('\".date(\"Y-m-d\").\"','\".$cuota['fechafin'].\"',\".$cuota['nrocuotas'].\",\".$nuevacuota.\",\".$id.\")\";\n $this->Pagodeprestamo->query($sql);\n /*nueva insecion en transacciones*/\n $sql=\"INSERT INTO transaccionprestamointeres(montointeres, fecha, fechamodificacion,montodeuda,pagodeprestamo_id,prestamo_id) VALUES(0,'\".date(\"Y-m-d\").\"','\".date(\"Y-m-d\").\"',\".$montototal.\",\".$pagodeprestamos_id.\",\".$id.\")\";\n $this->Pagodeprestamo->query($sql); \n }\n $this->Session->setFlash(__('El pago de prestamo ha sido Guardado'));\n return $this->redirect(array('action' => 'index'));\n }", "title": "" }, { "docid": "d117027a0c145b5a880b35fa6f86dfa5", "score": "0.5479982", "text": "private function _hitung_regresi()\n {\n }", "title": "" }, { "docid": "7f7329daf103f2cd9bdc9a4224591a29", "score": "0.5474871", "text": "function _Resultado()\r\n {\r\n return ($this->Fim - $this->Inicio);\r\n }", "title": "" }, { "docid": "d9d197b1a1c24607b0c627fe5fd6214e", "score": "0.54700613", "text": "public function obvestiloPodatki() {\n global $db;\n $res = $db->query(\"SELECT * FROM obvestila WHERE id = 1\");\n $res->execute();\n\n $obvestilo = $res->fetch();\n if (!empty($obvestilo)) {\n return $obvestilo;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "b73f8c485ccdbfa285d6549991d85b66", "score": "0.54583424", "text": "public function update(){\n\t\t$pg = $this->percentage;\n\t\t$divisas = DivisaData::getAll();\n\t\t\n\t\t//ultimo valor del dolar \n\t\t$ultimo_elemento=count($divisas)-1; \n\t\t$valor_dolar = ($divisas[$ultimo_elemento]->monto);\n\t\t\n\t\t//Precio costo en Bsf\n\t\t$PrecioNeto = $this->price_in * $valor_dolar ;\n\t\t//Cantidad de Ganancia en Dolar\n\t\t$PrecioGanciaDL = (($this->price_in * $pg) /100 ) ;\n\t\t//Cantidad Ganancia en Bs\n\t\t$PrecioGanciaBs = ((($this->price_in * $pg) /100 ) * $valor_dolar ) ;\n\t\t//Precio venta en dolar\n\t\t$PrecioVentaDl = ((($this->price_in * $pg) /100 ) + $this->price_in ) ;\t\n\t\t//Precio Venta en Bolivares\n\t\t$PrecioVentaBS = $PrecioNeto + $PrecioGanciaBs;\n\n\t\t\t$sql = \"update \".self::$tablename.\" set barcode=\\\"$this->barcode\\\",name=\\\"$this->name\\\",description=\\\"$this->description\\\",attribute=\\\"$this->attribute\\\",location=\\\"$this->location\\\",price_in=\\\"$this->price_in\\\",price_out=\\\"$PrecioVentaDl\\\",price_out_bs=\\\"$PrecioVentaBS\\\",gain_dl=\\\"$PrecioGanciaDL\\\",gain_bs=\\\"$PrecioGanciaBs\\\",unit=\\\"$this->unit\\\",presentation=\\\"$this->presentation\\\",category_id=$this->category_id,subcategory_id=$this->subcategory_id,almacen_id=$this->almacen_id,inventary_min=\\\"$this->inventary_min\\\",is_active=\\\"$this->is_active\\\",is_bsf=\\\"$this->is_bsf\\\" where id=$this->id\";\n\t\t\n\t\t//echo $sql;\n\t\t//exit;\n\t\tExecutor::doit($sql);\n\t \n\t}", "title": "" }, { "docid": "e0b8d4c46516680b62623788406ed27f", "score": "0.5456623", "text": "public function getBrojKreveta(){ return $this->brojKreveta; }", "title": "" }, { "docid": "e0b8d4c46516680b62623788406ed27f", "score": "0.5456623", "text": "public function getBrojKreveta(){ return $this->brojKreveta; }", "title": "" }, { "docid": "3a6f390548b84d2a04274ba975c7de48", "score": "0.5455219", "text": "public function naknadaVojnaVezba() {\n return round($this->karnet->getValue('satiVojnaVezba') * $this->karnet->getValue('prosek3Meseca'), 2);\n }", "title": "" }, { "docid": "d2de90a0c0a10f0cff303944cbef56c7", "score": "0.5451001", "text": "public function MostrarGarage()\n {\n echo \"Razón Social: \".$this->_razonSocial.\"<br>PrecioPorHora: \".$this->_precioPorHora.\"<br>\".$this->MostrarAutos();\n }", "title": "" }, { "docid": "b434a4f4af957f1141c1338b1fe60a43", "score": "0.54466087", "text": "function data_pri()\n {\n $id = $this->fungsi->user_login()->id_kar;\n $data = array (\n 'judul' => \"BiasHRIS | Data Pribadi\",\n 'rowfam' => $this->M_Aproject->getFam(),\n 'rowplam' => $this->M_Aproject->getPlam(),\n 'rowdoc' => $this->M_Aproject->getDoc(),\n 'rownip' => $this->M_Aproject->getNip($id),\n );\n $this->template->load('template','personal/v_pribadi',$data);\n }", "title": "" }, { "docid": "81a7607284f3b976765464277a268758", "score": "0.5442663", "text": "public function show_datos_hemograma($id_paciente,$numero_orden){\n $conectar= parent::conexion();\n $sql=\"select*from hemograma where id_paciente=? and numero_orden=?;\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1, $id_paciente);\n $sql->bindValue(2, $numero_orden);\n $sql->execute();\n return $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "75ba1aab44f537c37a28ef1eb273edc0", "score": "0.54378355", "text": "function kiekMoteru(){\n $sum = 0; // pradzioje suma = 0\n for ($i=0; $i<count($this->darbuotojai); $i++){ // imame darbuotojus po vieną iš masyvo\n if ($this->darbuotojai[$i]['lyt'] == 'mot') $sum++; // jeigu moteris, tai +1\n }\n return $sum; // gražiname personalo moteru skaiciu kaip funkcijos rezultatą\n }", "title": "" }, { "docid": "7d69e5861b8ff03da910d4b4ac5d740e", "score": "0.54326934", "text": "public function daje_ocenu($idP,$ocena)\n {\n $predvidjanje= $this->find($idP);\n $nom=$predvidjanje->Nominalna_Tezina;\n $predvidjanje->Nominalna_Tezina=($nom*$predvidjanje->BrOcena+$ocena)/($predvidjanje->BrOcena+1);\n $predvidjanje->BrOcena++;\n $predvidjanje->Tezina= $this->izracunaj_tezinu($predvidjanje->Nominalna_Tezina, $predvidjanje->DatumNastanka, $predvidjanje->DatumEvaluacije);\n $this->save($predvidjanje);\n \n }", "title": "" }, { "docid": "3cfc582df37470ba50eb13fe34b6c496", "score": "0.5432636", "text": "public function doprinosPIOPoslodavac() {\n return round($this->osnovicaDoprinosa() * $this->payment->getValue('stopaPIOPoslodavac') / 100, 2);\n }", "title": "" }, { "docid": "c0383bf81e0077ac3768848acad8f06a", "score": "0.5432093", "text": "public function getDilCosto()\r\n {\r\n return $this->dil_costo;\r\n }", "title": "" }, { "docid": "7964c2c590b5c2f3501a51c48b0773ae", "score": "0.5431507", "text": "function Geral() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_sq_tipo_acordo = $_REQUEST['w_sq_tipo_acordo'];\r\n \r\n // Verifica se a geração do código será automática ou não\r\n if (f($RS_Menu,'numeracao_automatica')==0) $w_numeracao_automatica = 'N'; else $w_numeracao_automatica = 'S'; \r\n\r\n // Carrega os valores padrão para país, estado e cidade \r\n // Carrega o segmento do cliente\r\n $sql = new db_getCustomerData; $RS = $sql->getInstanceOf($dbms,$w_cliente); \r\n if ($w_pais=='') {\r\n $w_pais = f($RS,'sq_pais');\r\n $w_uf = f($RS,'co_uf');\r\n $w_cidade = f($RS,'sq_cidade_padrao');\r\n } \r\n // Verifica se há necessidade de recarregar os dados da tela a partir\r\n // da própria tela (se for recarga da tela) ou do banco de dados (se não for inclusão)\r\n if ($w_troca>'') {\r\n // Se for recarga da página\r\n $w_codigo_interno = $_REQUEST['w_codigo_interno'];\r\n $w_sq_unidade_resp = $_REQUEST['w_sq_unidade_resp'];\r\n $w_objeto = $_REQUEST['w_objeto'];\r\n $w_aviso = $_REQUEST['w_aviso'];\r\n $w_dias = $_REQUEST['w_dias'];\r\n $w_inicio_atual = $_REQUEST['w_inicio_real'];\r\n $w_inicio_real = $_REQUEST['w_inicio_real'];\r\n $w_fim_real = $_REQUEST['w_fim_real'];\r\n $w_concluida = $_REQUEST['w_concluida'];\r\n $w_data_conclusao = $_REQUEST['w_data_conclusao'];\r\n $w_nota_conclusao = $_REQUEST['w_nota_conclusao'];\r\n $w_custo_real = $_REQUEST['w_custo_real'];\r\n $w_projeto = $_REQUEST['w_projeto'];\r\n $w_sq_tipo_acordo = $_REQUEST['w_sq_tipo_acordo'];\r\n $w_sq_forma_pagamento = $_REQUEST['w_sq_forma_pagamento'];\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_chave_pai = $_REQUEST['w_chave_pai'];\r\n $w_chave_aux = $_REQUEST['w_chave_aux'];\r\n $w_sq_menu = $_REQUEST['w_sq_menu'];\r\n $w_sq_unidade = $_REQUEST['w_sq_unidade'];\r\n $w_sq_tramite = $_REQUEST['w_sq_tramite'];\r\n $w_solicitante = $_REQUEST['w_solicitante'];\r\n $w_cadastrador = $_REQUEST['w_cadastrador'];\r\n $w_executor = $_REQUEST['w_executor'];\r\n $w_descricao = $_REQUEST['w_descricao'];\r\n $w_justificativa = $_REQUEST['w_justificativa'];\r\n $w_inicio = $_REQUEST['w_inicio'];\r\n $w_fim = $_REQUEST['w_fim'];\r\n $w_inclusao = $_REQUEST['w_inclusao'];\r\n $w_ultima_alteracao = $_REQUEST['w_ultima_alteracao'];\r\n $w_conclusao = $_REQUEST['w_conclusao'];\r\n $w_moeda = $_REQUEST['w_moeda'];\r\n $w_valor = $_REQUEST['w_valor'];\r\n $w_opiniao = $_REQUEST['w_opiniao'];\r\n $w_data_hora = $_REQUEST['w_data_hora'];\r\n $w_pais = $_REQUEST['w_pais'];\r\n $w_uf = $_REQUEST['w_uf'];\r\n $w_cidade = $_REQUEST['w_cidade'];\r\n $w_palavra_chave = $_REQUEST['w_palavra_chave'];\r\n $w_sqcc = $_REQUEST['w_sqcc'];\r\n $w_codigo_interno = $_REQUEST['w_codigo_interno'];\r\n $w_titulo = $_REQUEST['w_titulo'];\r\n $w_numero_empenho = $_REQUEST['w_numero_empenho'];\r\n $w_numero_processo = $_REQUEST['w_numero_processo'];\r\n $w_protocolo = $_REQUEST['w_protocolo'];\r\n $w_protocolo_nm = $_REQUEST['w_protocolo_nm'];\r\n $w_data_assinatura = $_REQUEST['w_data_assinatura'];\r\n $w_data_publicacao = $_REQUEST['w_data_publicacao'];\r\n $w_sq_lcmodalidade = $_REQUEST['w_sq_lcmodalidade'];\r\n $w_aditivo = $_REQUEST['w_aditivo'];\r\n $w_sq_menu_relac = $_REQUEST['w_sq_menu_relac'];\r\n $w_cd_compra = $_REQUEST['w_cd_compra'];\r\n $w_ds_compra = $_REQUEST['w_ds_compra'];\r\n $w_pessoa = $_REQUEST['w_pessoa'];\r\n $w_pessoa_atual = $_REQUEST['w_pessoa_atual'];\r\n $w_tipo_pessoa = $_REQUEST['w_tipo_pessoa'];\r\n $w_modulo_pai = $_REQUEST['w_modulo_pai'];\r\n $w_cd_compra = $_REQUEST['w_cd_compra'];\r\n $w_ds_compra = $_REQUEST['w_ds_compra'];\r\n \r\n \r\n if ($w_chave_pai) {\r\n // Garante que conseguirá recuperar as rubricas do projeto\r\n $sql = new db_getSolicData; $RS = $sql->getInstanceOf($dbms,$w_chave_pai,null);\r\n \r\n $w_modulo_pai = piece(f($RS,'dados_solic'),null,'|@|',12);\r\n \r\n if ($w_modulo_pai==='PR' || $w_modulo_pai==='CO') {\r\n $w_solic_vinculo = piece(f($RS,'dados_solic'),null,'|@|',13);\r\n }\r\n }\r\n } elseif (strpos('AEV',$O)!==false || nvl($w_copia,'')!='') {\r\n if (nvl($w_copia,'')!='') {\r\n // Recupera os dados do contrato\r\n $sql = new db_getSolicData; $RS = $sql->getInstanceOf($dbms,$w_copia,$SG);\r\n } else {\r\n $sql = new db_getSolicData; $RS = $sql->getInstanceOf($dbms,$w_chave,$SG);\r\n } \r\n if (count($RS)>0) {\r\n $w_codigo_interno = f($RS,'codigo_interno');\r\n $w_titulo = f($RS,'titulo');\r\n $w_sq_unidade_resp = f($RS,'sq_unidade');\r\n $w_objeto = f($RS,'objeto');\r\n $w_aviso = f($RS,'aviso_prox_conc');\r\n $w_dias = f($RS,'dias_aviso');\r\n $w_inicio_real = f($RS,'inicio');\r\n $w_fim_real = f($RS,'fim');\r\n $w_custo_real = f($RS,'valor_contrato');\r\n $w_projeto = f($RS,'sq_solic_pai');\r\n $w_etapa = f($RS,'sq_projeto_etapa');\r\n $w_sq_tipo_acordo = f($RS,'sq_tipo_acordo');\r\n $w_sq_forma_pagamento = f($RS,'sq_forma_pagamento');\r\n $w_forma_atual = f($RS,'sq_forma_pagamento');\r\n $w_chave_pai = f($RS,'sq_solic_pai');\r\n $w_chave_aux = null;\r\n $w_sq_menu = f($RS,'sq_menu');\r\n $w_sq_unidade = f($RS,'sq_unidade');\r\n $w_sq_tramite = f($RS,'sq_siw_tramite');\r\n $w_solicitante = f($RS,'solicitante');\r\n $w_cadastrador = f($RS,'cadastrador');\r\n $w_executor = f($RS,'executor');\r\n $w_descricao = f($RS,'descricao');\r\n $w_justificativa = f($RS,'justificativa');\r\n $w_inicio = FormataDataEdicao(f($RS,'inicio'));\r\n if (strpos('AEV',$O)!==false) {\r\n $w_inicio_atual = FormataDataEdicao(f($RS,'inicio'));\r\n } \r\n $w_fim = FormataDataEdicao(f($RS,'fim'));\r\n $w_inclusao = f($RS,'inclusao');\r\n $w_ultima_alteracao = f($RS,'ultima_alteracao');\r\n $w_conclusao = f($RS,'conclusao');\r\n $w_valor = number_format(f($RS,'valor'),2,',','.');\r\n $w_moeda = f($RS,'sq_moeda');\r\n $w_data_hora = f($RS,'data_hora');\r\n $w_sqcc = f($RS,'sq_cc');\r\n $w_pais = f($RS,'sq_pais');\r\n $w_uf = f($RS,'co_uf');\r\n $w_cidade = f($RS,'sq_cidade_origem');\r\n $w_palavra_chave = f($RS,'palavra_chave');\r\n $w_numero_empenho = f($RS,'empenho');\r\n $w_numero_processo = f($RS,'processo');\r\n $w_protocolo = nvl(f($RS,'protocolo_completo'),f($RS,'processo'));\r\n $w_protocolo_nm = f($RS,'processo');\r\n $w_opiniao = f($RS,'opiniao');\r\n $w_data_assinatura = FormataDataEdicao(f($RS,'assinatura'));\r\n $w_data_publicacao = FormataDataEdicao(f($RS,'publicacao'));\r\n $w_sq_lcmodalidade = f($RS,'sq_lcmodalidade');\r\n $w_aditivo = nvl(f($RS,'aditivo'),0);\r\n $w_dados_pai = explode('|@|',f($RS,'dados_pai'));\r\n $w_modulo_pai = $w_dados_pai[11];\r\n $w_sq_menu_relac = $w_dados_pai[3];\r\n if (nvl($w_sqcc,'')!='') $w_sq_menu_relac='CLASSIF';\r\n $w_pessoa = f($RS,'outra_parte');\r\n $w_pessoa_atual = f($RS,'outra_parte');\r\n $w_tipo_pessoa = f($RS,'sq_tipo_pessoa');\r\n } \r\n } \r\n \r\n if ($w_herda || $w_modulo_pai==='CO') {\r\n // Recupera os dados da licitação\r\n $sql = new db_getSolicCL; $RS_Solic = $sql->getInstanceOf($dbms,null,$_SESSION['SQ_PESSOA'],'CLLCCAD',3,\r\n null,null,null,null,null,null,null,null,null,null,(($w_herda) ? substr($w_herda,0,strpos($w_herda,'|')) :$w_chave_pai),\r\n null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,\r\n null,null,null,null,null);\r\n if (count($RS_Solic)>0) $RS_Solic = $RS_Solic[0];\r\n \r\n $w_cd_compra = f($RS_Solic,'codigo_interno');\r\n $w_ds_compra = nvl(f($RS_Solic,'objeto'),f($RS_Solic,'justificativa'));\r\n $w_modulo_pai = 'CO'; // Não retirar esta linha. Útil na herança.\r\n $w_moeda = f($RS_Solic,'sq_moeda');\r\n $w_nm_moeda = f($RS_Solic,'nm_moeda');\r\n if ($w_herda) {\r\n $w_pessoa = substr($w_herda,strpos($w_herda,'|')+1);\r\n $w_chave_pai = substr($w_herda,0,strpos($w_herda,'|'));\r\n $w_sq_unidade_resp = f($RS_Solic,'sq_unidade');\r\n $w_solicitante = f($RS_Solic,'solicitante');\r\n $w_justificativa = f($RS_Solic,'justificativa');\r\n $w_sq_menu_relac = f($RS_Solic,'sq_menu');\r\n $w_solic_vinculo = f($RS_Solic,'sq_solic_pai');\r\n }\r\n }\r\n \r\n if (Nvl($w_sq_tipo_acordo,0)>0) {\r\n $sql = new db_getAgreeType; $RS = $sql->getInstanceOf($dbms,$w_sq_tipo_acordo,null,$w_cliente,null,null,$SG);\r\n foreach($RS as $row) {\r\n $w_cd_modalidade = f($row,'modalidade');\r\n break;\r\n }\r\n }\r\n if(nvl($w_sq_menu_relac,0)>0) { $sql = new db_getMenuData; $RS_Relac = $sql->getInstanceOf($dbms,$w_sq_menu_relac); }\r\n\r\n // Recupera os dados do beneficiário\r\n if ($w_pessoa) {\r\n $sql = new db_getBenef; $RS_Benef = $sql->getInstanceOf($dbms,$w_cliente,$w_pessoa,null,null,null,null,null,null,null,null,null,null,null,null, null, null, null, null);\r\n if (count($RS_Benef)>0) {\r\n foreach($RS_Benef as $row) { $RS_Benef = $row; break; }\r\n $w_cpf = f($RS_Benef,'cpf');\r\n $w_cnpj = f($RS_Benef,'cnpj');\r\n $w_sq_prop = f($RS_Benef,'sq_pessoa');\r\n $w_nome = f($RS_Benef,'nm_pessoa');\r\n $w_nome_resumido = f($RS_Benef,'nome_resumido');\r\n $w_sexo = f($RS_Benef,'sexo');\r\n $w_vinculo = f($RS_Benef,'sq_tipo_vinculo');\r\n $w_tipo_pessoa = f($RS_Benef,'sq_tipo_pessoa');\r\n $w_titulo = nvl($w_titulo,f($RS_Benef,'nm_pessoa'));\r\n }\r\n }\r\n \r\n Cabecalho();\r\n head();\r\n Estrutura_CSS($w_cliente);\r\n // Monta o código JavaScript necessário para validação de campos e preenchimento automático de máscara,\r\n // tratando as particularidades de cada serviço\r\n ScriptOpen('JavaScript');\r\n CheckBranco();\r\n FormataData();\r\n SaltaCampo();\r\n FormataDataHora();\r\n FormataValor();\r\n ValidateOpen('Validacao');\r\n if ($O=='I' || $O=='A') {\r\n if ($w_numeracao_automatica=='N') Validate('w_codigo_interno','Código interno','1',1,1,60,'1','1');\r\n if ($w_mod_pa=='S') {\r\n Validate('w_protocolo_nm','Número do processo','hidden','1','20','20','','0123456789./-');\r\n } elseif($w_segmento=='Público') {\r\n if (substr($SG,0,3)=='GCB') Validate('w_numero_processo','Número do empenho (modalidade/nível/mensalidade)','1','1',1,30,'1','1');\r\n else Validate('w_numero_processo','Número do processo','1','1',1,30,'1','1');\r\n }\r\n Validate('w_titulo','Título','1',1,5,100,'1','1'); \r\n Validate('w_sq_tipo_acordo','Tipo','SELECT',1,1,18,'','0123456789');\r\n if ($O=='I' && $w_modulo_pai!='CO') Validate('w_pessoa_nm', 'Outra parte:', 'HIDDEN', 1, 5, 100, '1', '1');\r\n if (substr($SG,0,3)!='GCB') Validate('w_objeto','Objeto','1',1,5,2000,'1','1');\r\n else Validate('w_objeto','Plano de trabalho','1',1,5,2000,'1','1');\r\n if (substr($SG,0,3)!='GCA' || substr($SG,0,3)!='GCZ') {\r\n if (substr($SG,0,3)=='GCR') {\r\n Validate('w_sq_forma_pagamento','Forma de recebimento','SELECT',1,1,18,'','0123456789');\r\n } elseif (substr($SG,0,3)=='GCD') {\r\n Validate('w_sq_forma_pagamento','Forma de pagamento','SELECT',1,1,18,'','0123456789');\r\n } elseif (substr($SG,0,3)!='GCZ') {\r\n Validate('w_sq_forma_pagamento','Forma de pagamento/recebimento','SELECT',1,1,18,'','0123456789');\r\n }\r\n }\r\n if($w_aditivo==0) {\r\n Validate('w_inicio','Início vigência','DATA',1,10,10,'','0123456789/');\r\n Validate('w_fim','Término vigência','DATA',1,10,10,'','0123456789/');\r\n if (nvl(f($RS_Cliente,'sg_segmento'),'-')=='OI' && $w_modulo_pai!='CO') Validate('w_moeda','Moeda','SELECT',1,1,18,'','0123456789');\r\n CompData('w_inicio','Início vigência','<=','w_fim','Término vigência');\r\n if (substr($SG,0,3)!='GCA' && nvl($w_herda,'')=='') {\r\n Validate('w_valor','Valor','VALOR','1',4,18,'','0123456789.,');\r\n }\r\n }\r\n Validate('w_solicitante','Responsável','',1,1,18,'','0123456789');\r\n Validate('w_sq_unidade_resp','Setor responsável','HIDDEN',1,1,18,'','0123456789');\r\n if ($w_modulo_pai!='CO') {\r\n if(nvl($w_sq_menu_relac,'')>'') {\r\n Validate('w_sq_menu_relac','Vincular a','SELECT',1,1,18,1,1);\r\n if ($w_sq_menu_relac=='CLASSIF') {\r\n Validate('w_sqcc','Classificação','SELECT',1,1,18,1,1);\r\n } else {\r\n Validate('w_chave_pai','Vinculação','SELECT',1,1,18,1,1);\r\n }\r\n } elseif (substr($SG,0,3)=='GCB' || $w_cd_modalidade!='F') {\r\n Validate('w_sq_menu_relac','Vincular a','SELECT',1,1,18,1,1);\r\n }\r\n if($w_sq_menu_relac!='CLASSIF') { $sql = new db_getMenuData; $RS_Relac = $sql->getInstanceOf($dbms,$w_sq_menu_relac); }\r\n if(f($RS_Relac,'sg_modulo')=='PR' && $w_cliente != '10135' && $w_cliente != '17305') {\r\n if (substr($SG,0,3)=='GCB') {\r\n Validate('w_etapa','Tema e modalidade','SELECT',1,1,18,'','0123456789');\r\n } else {\r\n Validate('w_etapa','Tema e modalidade','SELECT','',1,18,'','0123456789');\r\n }\r\n ShowHTML(' if (theForm.w_etapa[theForm.w_etapa.selectedIndex].value==\"\" && theForm.w_etapa.selectedIndex != 0) {');\r\n ShowHTML(' alert(\"A modalidade selecionada não permite esta vinculação.\\n Ela pode estar com 100% de conclusão ou ser usada como tema.\");');\r\n ShowHTML(' theForm.w_etapa.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n }\r\n /**\r\n * if (substr($SG,0,3)=='GCB') {\r\n * ShowHTML('if (theForm.w_projeto!=undefined) {');\r\n * Validate('w_projeto','Projeto','SELECT',1,1,18,'','0123456789');\r\n * ShowHTML('}');\r\n * Validate('w_etapa','Tema e modalidade','SELECT',1,1,18,'','0123456789');\r\n * ShowHTML(' if (theForm.w_etapa[theForm.w_etapa.selectedIndex].value==\"\" && theForm.w_etapa.selectedIndex != 0) {');\r\n * ShowHTML(' alert(\"A modalidade selecionada não permite esta vinculação.\\n Ela pode estar com 100% de conclusão ou ser usada como tema.\");');\r\n * ShowHTML(' theForm.w_etapa.focus();');\r\n * ShowHTML(' return false;');\r\n * ShowHTML(' }');\r\n * } elseif ($w_cd_modalidade!='F') {\r\n * ShowHTML('if (theForm.w_projeto!=undefined) {');\r\n * Validate('w_projeto','Projeto','SELECT','',1,18,'','0123456789');\r\n * ShowHTML('}');\r\n * Validate('w_etapa','Etapa','SELECT','',1,18,'','0123456789');\r\n * ShowHTML(' if (theForm.w_etapa[theForm.w_etapa.selectedIndex].value==\"\" && theForm.w_etapa.selectedIndex != 0) {');\r\n * ShowHTML(' alert(\"A modalidade selecionada não permite esta vinculação.\\n Ela pode estar com 100% de conclusão ou ser usada como tema.\");');\r\n * ShowHTML(' theForm.w_etapa.focus();');\r\n * ShowHTML(' return false;');\r\n * ShowHTML(' }');\r\n * } \r\n * if (f($RS_Menu,'solicita_cc')=='S') {\r\n * if ($w_cd_modalidade!='F') {\r\n * Validate('w_sqcc','Classificação','SELECT','',1,18,'','0123456789');\r\n * } else {\r\n * Validate('w_sqcc','Classificação','SELECT','1',1,18,'','0123456789');\r\n * } \r\n * } \r\n * if ($w_cd_modalidade!='F' && f($RS_Menu,'solicita_cc')=='S') {\r\n * ShowHTML('if (theForm.w_projeto!=undefined) {');\r\n * ShowHTML(' if (theForm.w_projeto.selectedIndex > 0 && theForm.w_sqcc.selectedIndex > 0) {');\r\n * ShowHTML(' alert(\"Informe um projeto ou uma classificação. Você não pode escolher ambos!\");');\r\n * ShowHTML(' theForm.w_projeto.focus();');\r\n * ShowHTML(' return false;');\r\n * ShowHTML(' }');\r\n * ShowHTML(' if (theForm.w_projeto.selectedIndex == 0 && theForm.w_sqcc.selectedIndex == 0) {');\r\n * ShowHTML(' alert(\"Informe um projeto ou uma classificação!\");');\r\n * ShowHTML(' theForm.w_projeto.focus();');\r\n * ShowHTML(' return false;');\r\n * ShowHTML(' }');\r\n * ShowHTML('} else {');\r\n * ShowHTML(' if (theForm.w_sqcc.selectedIndex == 0) {');\r\n * ShowHTML(' alert(\"Informe uma classificação!\");');\r\n * ShowHTML(' theForm.w_sqcc.focus();');\r\n * ShowHTML(' return false;');\r\n * ShowHTML(' }');\r\n * ShowHTML('}');\r\n * } \r\n */\r\n }\r\n Validate('w_pais','País','SELECT',1,1,18,'','0123456789');\r\n Validate('w_uf','Estado','SELECT',1,1,3,'1','1');\r\n Validate('w_cidade','Cidade','SELECT',1,1,18,'','0123456789');\r\n if (f($RS_Menu,'descricao')=='S') {\r\n Validate('w_descricao','Resultados esperados','1',1,5,2000,'1','1');\r\n } \r\n if (f($RS_Menu,'justificativa')=='S') {\r\n Validate('w_justificativa','Observações','1','',5,2000,'1','1');\r\n } \r\n Validate('w_dias','Dias de alerta','1','',1,3,'','0123456789');\r\n ShowHTML(' if (theForm.w_aviso[0].checked) {');\r\n ShowHTML(' if (theForm.w_dias.value == \"\") {');\r\n ShowHTML(' alert(\"Informe a partir de quantos dias antes da data limite você deseja ser avisado de sua proximidade!\");');\r\n ShowHTML(' theForm.w_dias.focus();');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n ShowHTML(' }');\r\n ShowHTML(' else {');\r\n ShowHTML(' theForm.w_dias.value = \"\";');\r\n ShowHTML(' }');\r\n } \r\n ValidateClose();\r\n ScriptClose();\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">'); \r\n ShowHTML('</head>');\r\n if ($w_troca>'') {\r\n BodyOpenClean('onLoad=\"document.Form.'.$w_troca.'.focus()\";');\r\n } elseif (strpos('EV',$O)!==false) {\r\n BodyOpenClean('onLoad=\"this.focus()\";');\r\n } else {\r\n if($w_numeracao_automatica=='N') {\r\n BodyOpenClean('onLoad=\"document.Form.w_codigo_interno.focus()\";');\r\n } else {\r\n if ($w_mod_pa=='S') {\r\n BodyOpenClean('onLoad=\"document.Form.w_protocolo_nm.focus()\";');\r\n } elseif($w_segmento=='Público') {\r\n BodyOpenClean('onLoad=\"document.Form.w_numero_processo.focus()\";');\r\n } else {\r\n BodyOpenClean('onLoad=\"document.Form.w_titulo.focus()\";');\r\n }\r\n }\r\n } \r\n Estrutura_Topo_Limpo();\r\n Estrutura_Menu();\r\n Estrutura_Corpo_Abre();\r\n Estrutura_Texto_Abre();\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n if (strpos('IAEV',$O)!==false) {\r\n if (strpos('EV',$O)!==false) {\r\n $w_Disabled = ' DISABLED ';\r\n if ($O=='V') $w_Erro = Validacao($w_sq_solicitacao,$SG);\r\n } \r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST','return(Validacao(this));',null,$P1,$P2,$P3,$P4,$TP,$SG,$w_pagina.$par,$O);\r\n ShowHTML(MontaFiltro('POST'));\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_copia\" value=\"'.$w_copia.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_herda\" value=\"'.$w_herda.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_data_hora\" value=\"'.f($RS_Menu,'data_hora').'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_menu\" value=\"'.$w_menu.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_forma_atual\" value=\"'.$w_forma_atual.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_inicio_atual\" value=\"'.$w_inicio_atual.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_cd_compra\" value=\"'.$w_cd_compra.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_ds_compra\" value=\"'.$w_ds_compra.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_pessoa_atual\" value=\"'.$w_pessoa_atual.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_tipo_pessoa\" value=\"'.$w_tipo_pessoa.'\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td>');\r\n ShowHTML(' <table width=\"100%\" border=\"0\">');\r\n if ($w_modulo_pai=='CO') {\r\n ShowHTML(' <tr><td align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" bgcolor=\"#D0D0D0\"><b>Dados da Licitação</td></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td><table border=0 width=\"100%\" cellspacing=0>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td><b>Número:</b><br>'.$w_cd_compra.'</td>');\r\n ShowHTML(' <td><b>Justificativa/Objeto:</b><br>'.$w_ds_compra.'</td>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td><b>Outra parte:</b><br>'.$w_nome);\r\n ShowHTML(' <INPUT type=\"hidden\" name=\"w_pessoa\" value=\"'.$w_pessoa.'\">');\r\n if (count($RS_Benef)) {\r\n if ($w_tipo_pessoa==1 || $w_tipo_pessoa==3) {\r\n ShowHTML(' <td><b>'.(($w_tipo_pessoa==1) ? 'CPF' : 'Cód. Estrangeiro').':</b><br>'.f($RS_Benef,'cpf'));\r\n ShowHTML(' <INPUT type=\"hidden\" name=\"w_cpf\" value=\"'.$w_cpf.'\">');\r\n } else {\r\n ShowHTML(' <td><b>'.(($w_tipo_pessoa==2) ? 'CNPJ' : 'Cód. Estrangeiro').':</b><br>'.f($RS_Benef,'cnpj'));\r\n ShowHTML(' <INPUT type=\"hidden\" name=\"w_cnpj\" value=\"'.$w_cnpj.'\">');\r\n }\r\n }\r\n ShowHTML(' <tr><td colspan=\"2\"><b>Projeto para débito:</b><br>'.piece(f($RS_Solic,'dados_pai'),null,'|@|',2).' - '.piece(f($RS_Solic,'dados_pai'),null,'|@|',3));\r\n ShowHTML(' <INPUT type=\"hidden\" name=\"w_solic_vinculo\" value=\"'.$w_solic_vinculo.'\">');\r\n ShowHTML(' <INPUT type=\"hidden\" name=\"w_chave_pai\" value=\"'.$w_chave_pai.'\">');\r\n ShowHTML(' </tr></table>');\r\n }\r\n ShowHTML(' <tr><td align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" bgcolor=\"#D0D0D0\"><b>Identificação</td></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td>Os dados deste bloco serão utilizados para identificação, bem como para o controle de sua execução.</td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td><table border=0 width=\"100%\" cellspacing=0>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n if($w_numeracao_automatica=='N') {\r\n ShowHTML(' <td><b><U>C</U>ódigo interno:<br><INPUT ACCESSKEY=\"C\" '.$w_Disabled.' class=\"STI\" type=\"text\" name=\"w_codigo_interno\" title=\"Informar sigla e número do contrato (CTR) ou Ata de Registro de Preços (ATA)\" size=\"18\" maxlength=\"60\" value=\"'.$w_codigo_interno.'\"></td>');\r\n }\r\n if ($w_mod_pa=='S') {\r\n SelecaoProtocolo('N<u>ú</u>mero do processo:','U','Selecione o processo da compra/licitação.',$w_protocolo,null,'w_protocolo','JUNTADA',null);\r\n } elseif($w_segmento=='Público') {\r\n if (substr($SG,0,3)=='GCB') ShowHTML(' <td><b>N<U>ú</U>mero do empenho (modalidade/nível/mensalidade)<br><INPUT ACCESSKEY=\"U\" '.$w_Disabled.' class=\"STI\" type=\"text\" name=\"w_numero_processo\" size=\"20\" maxlength=\"30\" value=\"'.$w_numero_processo.'\"></td>'); \r\n else ShowHTML(' <td><b>N<U>ú</U>mero do processo:<br><INPUT ACCESSKEY=\"U\" '.$w_Disabled.' class=\"STI\" type=\"text\" name=\"w_numero_processo\" size=\"20\" maxlength=\"30\" value=\"'.$w_numero_processo.'\"></td>');\r\n }\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td valign=\"top\"><b><u>T</u>ítulo:</b><br><INPUT ACCESSKEY=\"T\" '.$w_Disabled.' class=\"STI\" type=\"text\" name=\"w_titulo\" size=\"90\" maxlength=\"100\" value=\"'.$w_titulo.'\" title=\"Informar o nome reduzido do fornecedor.\"></td>');\r\n ShowHTML(' <tr>');\r\n SelecaoTipoAcordo('<u>T</u>ipo:','T','Selecione na lista o tipo adequado.',$w_sq_tipo_acordo,null,$w_cliente,'w_sq_tipo_acordo',$SG,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.w_troca.value=\\'w_objeto\\'; document.Form.submit();\"');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' <tr><td colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0>');\r\n if ($O=='I') {\r\n ShowHTML(' <tr valign=\"top\">');\r\n if ($w_modulo_pai!=='CO') {\r\n SelecaoPessoaOrigem('Outra <u>p</u>arte:', 'P', 'Clique na lupa para selecionar a pessoa.', $w_pessoa, null, 'w_pessoa', null, null, 'onFocus=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'w_objeto\\'; document.Form.submit();\"', 1, 'w_identificador');\r\n if (count($RS_Benef)) {\r\n if ($w_tipo_pessoa==1 || $w_tipo_pessoa==3) {\r\n ShowHTML(' <td><b>'.(($w_tipo_pessoa==1) ? 'CPF' : 'Cód. Estrangeiro').':<br><INPUT READONLY ACCESSKEY=\"C\" TYPE=\"text\" class=\"stio\" NAME=\"w_cpf\" VALUE=\"'.f($RS_Benef,'cpf').'\" SIZE=\"16\">');\r\n } else {\r\n ShowHTML(' <td><b>'.(($w_tipo_pessoa==2) ? 'CNPJ' : 'Cód. Estrangeiro').':<br><INPUT READONLY ACCESSKEY=\"C\" TYPE=\"text\" class=\"stio\" NAME=\"w_cnpj\" VALUE=\"'.f($RS_Benef,'cnpj').'\" SIZE=\"20\">');\r\n }\r\n }\r\n }\r\n }\r\n if (substr($SG,0,3)!='GCB') ShowHTML(' <tr><td colspan=2><b>O<u>b</u>jeto:</b><br><textarea '.$w_Disabled.' accesskey=\"O\" name=\"w_objeto\" class=\"sti\" ROWS=5 cols=75 title=\"Descreva o objeto da contratação.\">'.$w_objeto.'</TEXTAREA></td>');\r\n else ShowHTML(' <tr><td colspan=2><b><u>P</u>lano de trabalho:</b><br><textarea '.$w_Disabled.' accesskey=\"P\" name=\"w_objeto\" class=\"sti\" ROWS=5 cols=75 title=\"Descreva o objeto da contratação.\">'.$w_objeto.'</TEXTAREA></td>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n if (substr($SG,0,3)=='GCA' || substr($SG,0,3)=='GCZ') {\r\n $sql = new db_getFormaPagamento; $RS = $sql->getInstanceOf($dbms,$w_cliente,null,null,'REGISTRO',null,'NAPLICA');\r\n foreach($RS as $row) { \r\n $w_sq_forma_pagamento = f($row,'w_sq_forma_pagamento');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_sq_forma_pagamento\" value=\"'.f($row,'chave').'\">');\r\n } \r\n } elseif (substr($SG,0,3)=='GCR') {\r\n SelecaoFormaPagamento('<u>F</u>orma de recebimento:','F','Selecione na lista a forma de recebimento para este acordo.',$w_sq_forma_pagamento,substr($SG,0,3).'CAD','w_sq_forma_pagamento',null);\r\n } elseif (substr($SG,0,3)=='GCD') {\r\n SelecaoFormaPagamento('<u>F</u>orma de pagamento:','F','Selecione na lista a forma de pagamento para este acordo.',$w_sq_forma_pagamento,substr($SG,0,3).'CAD','w_sq_forma_pagamento',null);\r\n } else {\r\n SelecaoFormaPagamento('<u>F</u>orma de pagamento/recebimento:','F','Selecione na lista a forma usual para pagamento/recebimento neste acordo.',$w_sq_forma_pagamento,substr($SG,0,3).'CAD','w_sq_forma_pagamento',null);\r\n }\r\n if($w_aditivo==0) {\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td><b>Iní<u>c</u>io vigência:</b><br><input '.$w_Disabled.' accesskey=\"C\" type=\"text\" name=\"w_inicio\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_inicio.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\">'.ExibeCalendario('Form','w_inicio').'</td>');\r\n ShowHTML(' <td><b><u>F</u>im vigência:</b><br><input '.$w_Disabled.' accesskey=\"F\" type=\"text\" name=\"w_fim\" class=\"sti\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_fim.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\">'.ExibeCalendario('Form','w_fim').'</td>');\r\n\r\n if (nvl(f($RS_Cliente,'sg_segmento'),'-')=='OI') {\r\n if ($w_modulo_pai=='CO') {\r\n if (nvl($w_herda,'')=='') ShowHTML(' <td><b>Moeda:<br>'.f($RS_Solic,'nm_moeda').'</b></td>');\r\n ShowHTML(' <INPUT type=\"hidden\" name=\"w_moeda\" value=\"'.$w_moeda.'\">'); \r\n } else {\r\n selecaoMoeda('<u>M</u>oeda:','U','Selecione a moeda na relação.',$w_moeda,null,'w_moeda','ATIVO',null);\r\n }\r\n }\r\n\r\n if (substr($SG,0,3)!='GCA' && nvl($w_herda,'')=='') {\r\n ShowHTML(' <td><b>Valo<u>r</u>:</b><br><input '.$w_Disabled.' accesskey=\"O\" type=\"text\" name=\"w_valor\" class=\"sti\" SIZE=\"18\" MAXLENGTH=\"18\" VALUE=\"'.$w_valor.'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\" title=\"Informe o valor total real ou estimado.\"></td>');\r\n } else {\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_valor\" value=\"0,00\">');\r\n }\r\n } else {\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td><b>Início vigência:</b><br>'.$w_inicio.'</td>');\r\n ShowHTML(' <td><b>Fim vigência:</b><br>'.$w_fim.'</td>');\r\n \r\n if (nvl(f($RS_Cliente,'sg_segmento'),'-')=='OI') {\r\n if ($w_modulo_pai=='CO') {\r\n ShowHTML(' <td><b>Moeda:<br>'.f($RS_Solic,'nm_moeda').'</b></td>');\r\n ShowHTML(' <INPUT type=\"hidden\" name=\"w_moeda\" value=\"'.$w_moeda.'\">'); \r\n } else {\r\n selecaoMoeda('<u>M</u>oeda:','U','Selecione a moeda na relação.',$w_moeda,null,'w_moeda','ATIVO',null);\r\n }\r\n }\r\n\r\n ShowHTML(' <td><b>Valor:</b><br>'.$w_valor.'</td>');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_inicio\" value=\"'.$w_inicio.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_fim\" value=\"'.$w_fim.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_valor\" value=\"'.$w_valor.'\">');\r\n }\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0>');\r\n SelecaoPessoa('<u>G</u>estor do contrato:','G','Selecione o gestor do contrato.',$w_solicitante,null,'w_solicitante','USUARIOS');\r\n SelecaoUnidade('<U>S</U>etor responsável monitoramento:','S','Selecione o setor responsável pelo monitoramento.',$w_sq_unidade_resp,null,'w_sq_unidade_resp',null,null);\r\n ShowHTML(' </table>');\r\n if ($w_modulo_pai!='CO') {\r\n ShowHTML(' <tr><td align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" bgcolor=\"#D0D0D0\"><b>Vinculação</td></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n\r\n ShowHTML(' <tr valign=\"top\">');\r\n selecaoServico('<U>V</U>incular a:', 'S', null, $w_sq_menu_relac, $w_menu, null, 'w_sq_menu_relac', 'MENURELAC', 'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'w_sq_menu_relac\\'; document.Form.submit();\"', $w_acordo, $w_acao, $w_viagem);\r\n if(Nvl($w_sq_menu_relac,'')!='') {\r\n ShowHTML(' <tr valign=\"top\">');\r\n if ($w_sq_menu_relac=='CLASSIF') {\r\n SelecaoSolic('Classificação:',null,null,$w_cliente,$w_sqcc,$w_sq_menu_relac,null,'w_sqcc','SIWSOLIC',null);\r\n } else {\r\n if(f($RS_Relac,'sg_modulo')=='PR' && $w_cliente != '10135' && $w_cliente != '17305') {\r\n SelecaoSolic('Vinculação:', null, null, $w_cliente, $w_chave_pai, $w_sq_menu_relac, f($RS_Menu, 'sq_menu'), 'w_chave_pai', f($RS_Relac, 'sigla'), 'onChange=\"document.Form.action=\\'' . $w_dir . $w_pagina . $par . '\\'; document.Form.O.value=\\'' . $O . '\\'; document.Form.w_troca.value=\\'w_etapa\\'; document.Form.submit();\"');\r\n ShowHTML(' <tr>');\r\n if (substr(f($RS_Menu, 'sigla'), 2) == 'B')\r\n SelecaoEtapa('<u>T</u>ema e modalidade:', 'T', 'Se necessário, indique a etapa desejada para a vinculação.', $w_etapa, $w_chave_pai, null, 'w_etapa', 'CONTRATO', null);\r\n else\r\n SelecaoEtapa('E<u>t</u>apa:', 'T', 'Se necessário, indique a etapa desejada para a vinculação.', $w_etapa, $w_chave_pai, null, 'w_etapa', 'CONTRATO', null);\r\n ShowHTML(' </tr>');\r\n } else {\r\n SelecaoSolic('Vinculação:',null,null,$w_cliente,$w_chave_pai,$w_sq_menu_relac,f($RS_Menu,'sq_menu'),'w_chave_pai',f($RS_Relac,'sigla'),null);\r\n }\r\n }\r\n } \r\n\r\n /**\r\n * if (substr($SG,0,3)=='GCB') {\r\n * ShowHTML(' <tr><td>Selecione uma forma de vinculação.</td></tr>');\r\n * ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n * // Recupera dados da opção Projetos\r\n * ShowHTML(' <tr>');\r\n * $sql = new db_getLinkData; $RS = $sql->getInstanceOf($dbms,$w_cliente,'PJCADBOLSA');\r\n * SelecaoProjeto('Pr<u>o</u>jeto:','O','Selecione o projeto que deseja a vinculação.',$w_projeto,$w_usuario,f($RS,'sq_menu'),null,null,null,'w_projeto',f($RS_Menu,'sq_menu'),'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'w_etapa\\'; document.Form.submit();\"');\r\n * ShowHTML(' </tr>');\r\n * ShowHTML(' <tr>');\r\n * SelecaoEtapa('<u>T</u>ema e modalidade:','T','Se necessário, indique a etapa desejada para a vinculação.',$w_etapa,$w_projeto,null,'w_etapa','CONTRATO',null);\r\n * ShowHTML(' </tr>');\r\n * } elseif (Nvl($w_cd_modalidade,'F')!='F') {\r\n * ShowHTML(' <tr><td>Selecione uma forma de vinculação.</td></tr>');\r\n * ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n * // Recupera dados da opção Projetos\r\n * ShowHTML(' <tr>');\r\n * $sql = new db_getLinkData; $RS = $sql->getInstanceOf($dbms,$w_cliente,'PJCAD');\r\n * $sql = new db_getLinkData; $RS1 = $sql->getInstanceOf($dbms,$w_cliente,substr($SG,0,3).'CAD');\r\n * SelecaoProjeto('Pr<u>o</u>jeto:','P','Selecione o projeto que deseja para a vinculação.',$w_projeto,$w_usuario,f($RS,'sq_menu'),null,null,null,'w_projeto',f($RS1,'sq_menu'),'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'w_etapa\\'; document.Form.submit();\"');\r\n * ShowHTML(' </tr>');\r\n * ShowHTML(' <tr>');\r\n * SelecaoEtapa('<u>E</u>tapa:','E','Se necessário, indique a etapa desejada para a vinculação.',$w_etapa,$w_projeto,null,'w_etapa','CONTRATO',null);\r\n * ShowHTML(' </tr>');\r\n * } else {\r\n * ShowHTML(' <tr><td>Classifique o acordo perante uma das opções exibidas na lista.</font></td></tr>');\r\n * ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n * }\r\n * if (f($RS_Menu,'solicita_cc')=='S') {\r\n * ShowHTML(' <tr>');\r\n * SelecaoCC('C<u>l</u>assificação:','L','Selecione um dos itens relacionados.',$w_sqcc,null,'w_sqcc','SIWSOLIC');\r\n * ShowHTML(' </tr>');\r\n * } \r\n */\r\n }\r\n ShowHTML(' <tr><td align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" bgcolor=\"#D0D0D0\"><b>Local do Fornecimento ou Prestação do Serviço</td></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td>Selecione país, estado e cidade onde os serviços serão prestados ou onde deverá ocorrer a entrega de produtos. Se mais de uma cidade, selecione a cidade que controlará os serviços ou fornecimentos.</td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td colspan=\"2\"><table border=0 width=\"100%\" cellspacing=0>');\r\n ShowHTML(' <tr>');\r\n SelecaoPais('<u>P</u>aís:','P',null,$w_pais,null,'w_pais',null,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.w_troca.value=\\'w_uf\\'; document.Form.submit();\"');\r\n SelecaoEstado('E<u>s</u>tado:','S',null,$w_uf,$w_pais,null,'w_uf',null,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.w_troca.value=\\'w_cidade\\'; document.Form.submit();\"');\r\n SelecaoCidade('<u>C</u>idade:','C',null,$w_cidade,$w_pais,$w_uf,'w_cidade',null,null);\r\n ShowHTML(' </table>');\r\n if (f($RS_Menu,'descricao')=='S' || f($RS_Menu,'justificativa')=='S') {\r\n ShowHTML(' <tr><td align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" bgcolor=\"#D0D0D0\"><b>Informações adicionais</td></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td>Os dados deste bloco visam orientar os responsáveis pelo monitoramento.</td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n if (f($RS_Menu,'descricao')=='S') {\r\n ShowHTML(' <tr><td><b>Res<u>u</u>ltados esperados:</b><br><textarea '.$w_Disabled.' accesskey=\"U\" name=\"w_descricao\" class=\"sti\" ROWS=5 cols=75 title=\"Descreva os resultados esperados com a contratação.\">'.$w_descricao.'</TEXTAREA></td>');\r\n } \r\n if (f($RS_Menu,'justificativa')=='S') {\r\n ShowHTML(' <tr><td><b>Obse<u>r</u>vações:</b><br><textarea '.$w_Disabled.' accesskey=\"R\" name=\"w_justificativa\" class=\"sti\" ROWS=5 cols=75 >'.$w_justificativa.'</TEXTAREA></td>');\r\n } \r\n } \r\n ShowHTML(' <tr><td align=\"center\" height=\"2\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" bgcolor=\"#D0D0D0\"><b>Alerta de proximidade da data de término</td></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td>Os dados abaixo indicam como deve ser tratada a proximidade do final da vigência.</font></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" height=\"1\" bgcolor=\"#000000\"></td></tr>');\r\n ShowHTML(' <tr><td><table border=\"0\" width=\"100%\">');\r\n ShowHTML(' <tr>');\r\n MontaRadioSN('<b>Emite alerta?</b>',$w_aviso,'w_aviso');\r\n ShowHTML(' <td><b>Quantos <U>d</U>ias antes do fim da vigência?<br><INPUT ACCESSKEY=\"D\" '.$w_Disabled.' class=\"sti\" type=\"text\" name=\"w_dias\" size=\"3\" maxlength=\"3\" value=\"'.$w_dias.'\" title=\"Número de dias para emissão do alerta de proximidade do final da vigência.\"></td>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\" height=\"1\" bgcolor=\"#000000\"></TD></TR>');\r\n // Verifica se poderá ser feito o envio da solicitação, a partir do resultado da validação\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Gravar\">');\r\n if ($O=='I') {\r\n $sql = new db_getMenuData; $RS = $sql->getInstanceOf($dbms,$w_menu);\r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$w_pagina.'Inicial&w_copia='.$w_copia.'&w_herda='.$w_herda.'&O=L&SG='.f($RS,'sigla').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.MontaFiltro('GET')).'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n } \r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n //ShowHTML ' history.back(1);'\r\n ScriptClose();\r\n } \r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Estrutura_Texto_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Rodape();\r\n}", "title": "" }, { "docid": "b4350fa3fafb6a1caf9374f4880c1384", "score": "0.5429723", "text": "public function zobrazpristupyCelkovo ($kedy = 'all') {\n\t\t# dnes = \n\t\t# vcera = - 1 day alebo time()-(3600*24) = 1 den\n\t\t# tyzden = - 7 day\n\t\t\n\t\t# CELKOVO\n\t\t$query = $this->db->query('SELECT COUNT(DISTINCT pocitadlo_ip) AS pocetcelkovo_ip, \n\t\t\t\t\t\t\t\t\t\t COUNT(DISTINCT pocitadlo_id) AS pocetcelkovo_zob, \n\t\t\t\t\t\t\t\t\t\t MIN(pocitadlo_datum) AS najmensidatum, \n\t\t\t\t\t\t\t\t\t\t MAX(pocitadlo_datum) AS poslednypristup \n\t\t\t\t\t\t\t\t\tFROM be_pocitadlo' . $this->prefix . ' \n\t\t\t\t\t\t\t\t\tORDER BY pocitadlo_datum DESC ');\n\t\n\t\t$row = $query->fetch_assoc();\n\n\t\t# CASOVY ROZDIEL\n\t\t$den = ((((strtotime(date('Y-m-d H:i:s')) - strtotime($row['najmensidatum'])) /60) /60) /24);\n\t\t$hodina = ('0' . substr($den, strpos($den, '.'))) * 24;\n\t\t$minuta = substr($hodina, strpos($hodina, '.')) * 60;\n\n\t\t# SKRATENIE CASU \n\t\t$den = substr($den, 0, -(strlen($den) - strpos($den, '.')));\n\t\t$hodina = substr($hodina, 0, -(strlen($hodina) - strpos($hodina, '.')));\n\t\t$minuta = substr($minuta, 0, -(strlen($minuta) - strpos($minuta, '.')));\n\n\t\t?>\n\n\t\t<h4>Celkovo</h4>\n\t\t<table>\n\t\t<tr><td style=\"font-weight: bold;\">Pocet navstev:</td><td><?php echo htmlspecialchars($row['pocetcelkovo_ip']); ?></td></tr>\n\t\t<tr><td style=\"font-weight: bold;\">Pocet zobrazeni:</td><td><?php echo htmlspecialchars($row['pocetcelkovo_zob']); ?></td></tr>\n\n\t\t<tr><td style=\"font-weight: bold;\">Posledny pristup:</td><td><?php echo htmlspecialchars(date('H:i:s d.m.Y',strtotime($row['poslednypristup']))); ?></td></tr>\n\t\t<tr><td style=\"font-weight: bold;\">Start pocitania:</td><td><?php echo htmlspecialchars(date('H:i:s d.m.Y',strtotime($row['najmensidatum']))); ?></td></tr>\n\t\t<tr><td style=\"font-weight: bold;\">Preslo uz:</td><td><?php echo htmlspecialchars($den . ' dni ' . $hodina . ' hodin ' . $minuta . ' minut'); ?></td></tr>\n\t\t</table>\n\t\t<?php\n\n\t}", "title": "" }, { "docid": "c44447e11f3f811bea06c95d0ba6e27a", "score": "0.5428202", "text": "function pdescuento($Sesion){\n\treturn $Sesion->get_var(\"pdescuento\");\n}", "title": "" }, { "docid": "c935fa906a54198953e2234727716c68", "score": "0.54271156", "text": "public function calkowitaIloscSuszuDanegoDnia($asortyment_id,$data_form)\n {\n $data=$data_form;\n\n $conn = $this->getEntityManager()->getConnection();\n \n $sql = \"SELECT CalkowitaIloscSuszu FROM dane_suszenia WHERE asortyment_id=:asortyment AND Data=:data AND CalkowitaIloscSuszu > 0 \";\n $stmt = $conn->prepare($sql);\n \n $stmt->execute(array('asortyment' => $asortyment_id,'data' => $data));\n \n $wynik = $stmt->fetchAll();\n dump($wynik);\n return $wynik['0']['CalkowitaIloscSuszu'];\n // var_dump($stmt->fetchAll());die;\n //return json_encode($wynik);\n\n }", "title": "" }, { "docid": "0e171defce4906c378a2e2cbe82fdf4c", "score": "0.542541", "text": "function tipodocumento($idDocPadre){\n\t\t$sql = $this->query(\"select * from bco_tiposDocumentoConcepto where id=\".$idDocPadre.\" and idstatus=1\");\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "e9a313360f27d5fea245fa27c42b07ce", "score": "0.5425395", "text": "public function getNaziv(){ return $this->naziv; }", "title": "" }, { "docid": "e9a313360f27d5fea245fa27c42b07ce", "score": "0.5425395", "text": "public function getNaziv(){ return $this->naziv; }", "title": "" }, { "docid": "cc4ca9ccbd6d68d4b7ef45bb76ab86e0", "score": "0.5423965", "text": "function dodajAnkiete($info){\r\n\tglobal $polaczenie;\r\n\tglobal $login;\r\n\tglobal $kingdomInfo;\r\n\tsettype($info[\"ileDni\"], \"integer\");\r\n\tif(!isset($info['akcja'])){\r\n\t\t$info['akcja']='NULL';\r\n\t}\r\n\tif($info[\"ileDni\"]<=0){\r\n\t\treturn \"Podaj prawidłową liczbe dni !!!\";\r\n\t}\r\n\tif($info[\"pytanie\"]==\"\"){\r\n\t\treturn \"Wpisz pytanie !!!\";\r\n\t}\r\n\t$info[\"pytanie\"]=strip_tags($info[\"pytanie\"]);\r\n\t$SQL=\"insert into ankiety\r\n values(NULL,'\".date(\"Y-m-d-G-i-s\",time()+$info[\"ileDni\"]*86400).\"','\".$info[\"pytanie\"].\"',\r\n '\".$info['akcja'].\"','\".$login.\"','\".$info[\"tryb\"].\"','\".$kingdomInfo['koalicja'].\"');\";\r\n\t$wynik= mysql_query($SQL)or Die(\"sondy blad przy wstawianiu nowej ankiety\");\r\n\t$forumid=mysql_insert_id();\r\n\tforeach( $info['tab'] as $item ){\r\n\t\t$item=strip_tags($item);\r\n\t\t$SQL=\"insert into opcje\r\n values(NULL,\".$forumid.\",'\".$item.\"',0);\";\r\n\t\t$wynik= mysql_query($SQL)or Die(\"sondy blad przy wstawianiu nowej opcji\");\r\n\t}\r\n\treturn \"Dodano ankiete \";\r\n}", "title": "" } ]
1b4257dcc5392393daa10999ab17d970
/ describe score_stat; +++++++ | Field | Type | Null | Key | Default | Extra | +++++++ | uid | int(11) | NO | PRI | NULL | auto_increment | | id | varchar(32) | NO | UNI | NULL | | | name | varchar(32) | YES | | NULL | | | stat_type | varchar(16) | YES | | NULL | | | stat_month | varchar(12) | NO | | 201301 | | | description | varchar(128) | YES | | NULL | | | create_time | timestamp | YES | | NULL | | | last_update | timestamp | NO | | CURRENT_TIMESTAMP | | | score_sum | decimal(10,0) | NO | | 0 | | | score_count | int(11) | NO | | 0 | | +++++++ 10 rows in set (0.00 sec)
[ { "docid": "91ef66ad071292aaaf71e076170727d0", "score": "0.58545244", "text": "function init_score_stat($product_id, $yyyymm)\n{\n\tif($yyyymm == \"\") $yyyymm = date(\"Ym\");\n\n\t$sql = \t\" insert into score_stat\t\".\n\t\t\" (id, name, stat_type, stat_month) \".\n\t\t\" values \".\n\t\t\" ('\".$product_id.\"','\".$product_id.\"_stat_\".$yyyymm.\"','AVG','\".$yyyymm.\"')\";\n\t$result = query($sql);\n\treturn mysqli_num_rows($result);\n}", "title": "" } ]
[ { "docid": "4e892ead80fa19da1f529657b6105012", "score": "0.632595", "text": "static function buildStats() {\n\t\t$stats = array();\n\t\t$minDate = date(system::getConfig()->getDatabaseDatetimeFormat(), strtotime('-1 year'));\n\n\t\t/*\n\t\t * Assign points for uploading an approved movie\n\t\t * 2011-07-04: DR, commented out because the scoring changed...\n\t\t */\n\t\t//self::buildUserUploadScores($stats, $minDate);\n\t\t\n\t\t/*\n\t\t * Tally those that have won an event\n\t\t */\n\t\tself::buildUserAwardsByTypeScores($stats, mofilmMovieAward::TYPE_WINNER, null, $minDate);\n\n\t\t/*\n\t\t * Tally shortlisted awards\n\t\t */\n\t\tself::buildUserAwardsByTypeScores($stats, mofilmMovieAward::TYPE_SHORTLISTED, null, $minDate);\n\n\t\t/*\n\t\t * Get all the finalists (those that won placed 1-n+1)\n\t\t */\n\t\tself::buildUserAwardsByTypeScores($stats, mofilmMovieAward::TYPE_FINALIST, 5, $minDate);\n\n\t\t/*\n\t\t * Build insert query\n\t\t */\n\t\t$values = array();\n\t\tforeach ( $stats as $userID => $score ) {\n\t\t\t$values[] = sprintf('(%d, %d, \"%s\", \"%s\")', $userID, $score, date('Y-m-d H:i:s'), date('Y-m-d H:i:s'));\n\t\t}\n\n\t\t$queryInsert = '\n\t\t\tINSERT INTO '.system::getConfig()->getDatabase('mofilm_content').'.userPoints\n\t\t\t\t(userID, score, createDate, updateDate)\n\t\t\tVALUES\n\t\t\t\t'.implode(',', $values).'\n\t\t\tON DUPLICATE KEY UPDATE\n\t\t\t\tscore=VALUES(score),\n\t\t\t\tupdateDate=VALUES(updateDate)';\n\n\t\t$rows = dbManager::getInstance()->exec($queryInsert);\n\n\t\t$stats = null;\n\t\tunset($stats);\n\t}", "title": "" }, { "docid": "e912f00f47092c02472c063a3ac8aee1", "score": "0.6115821", "text": "static function buildHighScoreStats() {\n\t\t$stats = array();\n\n\t\t/*\n\t\t * Assign points for uploading an approved movie\n\t\t * 2011-07-04: DR, commented out because the scoring changed...\n\t\t */\n\t\t//self::buildUserUploadScores($stats);\n\n\t\t/*\n\t\t * Tally those that have won an event\n\t\t */\n\t\tself::buildUserAwardsByTypeScores($stats, mofilmMovieAward::TYPE_WINNER);\n\n\t\t/*\n\t\t * Tally shortlisted awards\n\t\t */\n\t\tself::buildUserAwardsByTypeScores($stats, mofilmMovieAward::TYPE_SHORTLISTED);\n\n\t\t/*\n\t\t * Get all the finalists (those that won placed 1-n+1)\n\t\t */\n\t\tself::buildUserAwardsByTypeScores($stats, mofilmMovieAward::TYPE_FINALIST, 5);\n\n\t\t$values = array();\n\t\tforeach ( $stats as $userID => $score ) {\n\t\t\t$values[] = sprintf('(%d, %d, \"%s\", \"%s\")', $userID, $score, date('Y-m-d H:i:s'), date('Y-m-d H:i:s'));\n\t\t}\n\n\t\t$queryInsert = '\n\t\t\tINSERT INTO '.system::getConfig()->getDatabase('mofilm_content').'.userPoints\n\t\t\t\t(userID, highScore, createDate, updateDate)\n\t\t\tVALUES\n\t\t\t\t'.implode(',', $values).'\n\t\t\tON DUPLICATE KEY UPDATE\n\t\t\t\thighScore=VALUES(highScore),\n\t\t\t\tupdateDate=VALUES(updateDate)';\n\n\t\t$rows = dbManager::getInstance()->exec($queryInsert);\n\n\t\t$stats = null;\n\t\tunset($stats);\n\t}", "title": "" }, { "docid": "a1609c04b6ed4e5dd68051ce0dde14ca", "score": "0.55713063", "text": "function addUserScores($uid, $db) {\n// $games = $db->getSchedule();\n $sql = \"Select id, week, opponent, location, stadiumName, homeoraway, byuScore, oppScore, gameDate, closeDate, showUntilDate\n from schedule\n ORDER BY gameDate\";\n try {\n $games = $db->getFullList($sql);\n } catch (PDOException $e) {\n echo '{\"PDOException\":{\"text\":\"' . $e->getMessage() . '\"}}';\n } catch (Exception $e) {\n echo '{\"Exception\":{\"text\":\"' . $e->getMessage() . '\"}}';\n }\n\n // for each game, create an entry into the user_scores table\n try {\n if ($games != null && count($games) > 0) {\n foreach ($games as $game) {\n $gameId = $game->id;\n $isUserScoreExists = $db->userScoreExists($uid, $gameId);\n if (!$isUserScoreExists) {\n $userScore = new stdClass();\n $userScore->uid = $uid;\n $userScore->gameId = $gameId;\n $userScore->byuScore = 0;\n $userScore->oppScore = 0;\n $db->isSettingExists($userScore);\n }\n }\n }\n } catch (PDOException $e) {\n echo '{\"error\":{\"text\":\"' . $e->getMessage() . '\"}}';\n } catch (Exception $e) {\n echo '{\"error\":{\"text\":\"' . $e->getMessage() . '\"}}';\n }\n\n}", "title": "" }, { "docid": "e8204385aec4e5fa2218f6757a33e6d8", "score": "0.54859054", "text": "function parse_stats() {\n // TODO: We should probably do some validation here\n if (!empty($this->http_request->params['stats'][0])) {\n $this->solr_data_store_request->params['stats.field'] = $this->http_request->params['stats'];\n\n $this->solr_data_store_request->params['stats'] = 'true';\n }\n }", "title": "" }, { "docid": "ec9f9a9a910df84e7c5465bd5286f9a7", "score": "0.53846794", "text": "public function insertscore($id,$score){\n $sql= \"SELECT * FROM score where numuser = :id LIMIT 1\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute(['id' => $id]);\n $count = $stmt->rowCount();\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n if($count>0){\n if ($result['score'] < $score) {\n $sql = \" UPDATE score SET score =:score WHERE numuser=:id\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute(['id' => $id, 'score' => $score]);\n }\n }else{\n $sql = \"INSERT INTO score (numuser,score) VALUES(:id,:score)\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute(['id' => $id, 'score' => $score]);\n \n }\n \n }", "title": "" }, { "docid": "af830daa65fb100d88a9875eb62c500f", "score": "0.53504133", "text": "public function insertBatsmenScore($user_id,$tournament_id,$match_id,$team_id,$match_type,$balls_played,$totalruns,$fours,$sixes,$out_as,$strikerate,$team_name,$player_name,$innings,$fielder_id,$bowled_id,$bat_status)\n\t{\n\t\t$model = new CricketPlayerMatchwiseStats();\n\t\t$model->user_id = $user_id;\n\t\t$model->tournament_id = $tournament_id;\n\t\t$model->match_id = $match_id;\n\t\t$model->team_id = $team_id;\n\t\t$model->match_type = $match_type;\n\t\t$model->balls_played = $balls_played;\n\t\t$model->totalruns = $totalruns;\n\t\t$model->fours = $fours;\n\t\t$model->sixes = $sixes;\n\t\t$model->out_as = $out_as;\n\t\t$model->strikerate = $strikerate;\n\t\t$model->team_name = $team_name;\n\t\t$model->player_name = $player_name;\n\t\t$model->innings = $innings;\n\t\t$model->fielder_id = $fielder_id;\n\t\t$model->bowled_id = $bowled_id;\n\t\t$model->bat_status = $bat_status;\n\t\t$model->save();\n\t}", "title": "" }, { "docid": "7105087a9241d6e2988fbd3ca0a709c5", "score": "0.5344014", "text": "function updateScore() {\n\t\t\n\t}", "title": "" }, { "docid": "5402c9bcdcb8a69896a9fd73985b8672", "score": "0.5311316", "text": "public function getStats();", "title": "" }, { "docid": "049fade7765aa7110ee51f71cb0e9e5f", "score": "0.52624166", "text": "function GetPlayerStats($pos, $leagueid){\r\n\t$conn = $GLOBALS['$conn'];\r\n\r\n\tif($pos != \"G\"){\r\n\t\t$posFilter = \" WHERE p.Pos != 'G'\";\r\n\t}else{\r\n\t\t$posFilter = \" WHERE p.Pos = 'G'\";\r\n\t}\r\n\r\n\t$sql = \"SELECT p.*,\r\n\t\tSUM(p.G) as 'tG',\r\n\t\tSUM(p.A) as 'tA',\r\n\t\tSUM(p.SOG) as 'tSOG',\r\n\t\tSUM(p.PIM) as 'tPIM',\r\n\t\tSUM(p.Chks) as 'tChks',\r\n\t\tSUM(p.G + p.A) as 'tPoints',\r\n\t\tsum(TIME_TO_SEC(p.TOI)) as 'tTOI',\r\n\t\tCOUNT(p.GameID) as 'GP'\r\n\t\tFROM playerstats p $posFilter\";\r\n\r\n\t\tif($leagueid != -1){\r\n\t\t\t//$sql .= \" AND LeagueID = '$leagueid'\";\r\n\t\t\t$sql .= $GLOBALS[\"subLg\"];\r\n\t\t}\r\n\r\n\t\t$sql .= \" GROUP BY p.PlayerID \";\r\n\r\n\t\tif($pos == 'G')\r\n\t\t\t$sql .= \"ORDER BY ROUND(SUM(p.G)/SUM(p.SOG)*100) ASC\";\r\n\t\telse\r\n\t\t\t$sql .= \"ORDER BY tG DESC\";\r\n\t\r\n\t//$sql .= \" LIMIT 100\";\r\n\t\r\n\t$result = mysqli_query($conn, $sql);\r\n\r\n\t//echo \"sql:\" . $sql . \"<br/>\";\r\n\r\n\tif ($result) {\r\n\t\t//logMsg(\"Games Grabbed. NumGames: \" . mysqli_num_rows($result));\r\n\t} else {\r\n\t\techo(\"Error: GetPlayerStats: \" . $sql . \"<br>\" . mysqli_error($conn));\r\n\t}\r\n\r\n\treturn $result;\r\n}", "title": "" }, { "docid": "ca5d5bea2f5c33fa0607150d5754388e", "score": "0.5254263", "text": "public function getStats() {}", "title": "" }, { "docid": "69e870419e19b066ad0966a98c1a3162", "score": "0.52458304", "text": "public function initScores() {\n \n }", "title": "" }, { "docid": "d4b40674407b001f39c5242e5998db6b", "score": "0.52418613", "text": "public function monmeilleurscore($id)\n {\n $data = array();\n $sql = \"SELECT user.prenom, user.nom ,score.score FROM user INNER JOIN score ON score.numuser = user.numuser where user.numuser=:id ORDER BY score.score DESC LIMIT 1\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute(['id'=>$id]);\n foreach ($stmt as $row) {\n $data[] = $row;\n }\n return $data;\n }", "title": "" }, { "docid": "15e1dc4922cce954ae6460bb63dee39a", "score": "0.5237984", "text": "public function addStatsField($field) {}", "title": "" }, { "docid": "7898442d79030a3b75f844bae1858b23", "score": "0.5218515", "text": "function getScoreTable() {\n global $db;\n return $db->query(\"SELECT university_code,sum(score) as score \"\n . \"FROM `score` \"\n . \"GROUP BY university_code\")->fetchAll(PDO::FETCH_ASSOC);\n}", "title": "" }, { "docid": "d2477b0ab935321a62f699c3773f56c5", "score": "0.521582", "text": "function getAllUserScore() {\n\t$pdo = db();\n\t// get user scores/problems\n\t$query = 'select submits.id, user_id, problem_id, submits.score as rawscore, handicap, score*handicap as score, max(created_at) from submits join users on user_id = users.id where submits.score is not null group by user_id, problem_id order by problem_id, score';\n\t$stmt = $pdo->query($query);\n\tif (!$stmt) {\n\t\terror_log($pdo->errorInfo()[2]);\n\t\tthrow new Exception(\"unknown error(1). please report to admin\");\n\t}\n\t$r = $stmt->fetchAll();\n\tif (count($r) == 0) {\n\t\treturn [];\n\t}\n\n\n\t// scores\n\t$users = getAllUserCount();\n\t$scores = array_fill(0, $users, 0);\n\t$pid = 0; // problem id\n\t$idx = 0; \n\t// parse $r\n\tforeach ($r as $v) {\n\t\tif ($pid != $v['problem_id']) {\n\t\t\t$pid = $v['problem_id'];\n\t\t\t$idx = 0;\n\t\t}\n\n\t\t$id = $v['user_id']-1;\n\t\t$scores[$id] += $users - $idx;\n\t\tif ($idx == 0) { // bonus\n\t\t\t$scores[$id] += 5; \n\t\t}\n\t\t$idx++;\n\t}\n\n\treturn $scores;\n}", "title": "" }, { "docid": "d8ebf004d152c724eb808f6a4e323461", "score": "0.52134997", "text": "public function getPerformanceData($stats)\n {\n //Graphs\n $numStats = count($stats);\n\n $goalsAssistsVSgames = [];\n $cumulativeGoals = 0;\n $cumulativeAssists = 0;\n\n $teamPointsVSgames = [];\n $cumulativeTeamPoints = 0;\n\n $goalDiffVSgames = [];\n $diff = 0;\n $cumulativeGoalDiff = 0;\n\n foreach($stats as $stat){\n $playerTeam = $stat->team()->first();\n $game = $playerTeam->game()->getResults();\n\n //Goals vs Assits vs Games\n $cumulativeGoals += count($stat->goalsByType());\n $cumulativeAssists += $stat->assists()->count();\n $date = new Carbon($game->date);\n\n $goalsAssistsVSgames[] = [\n [$date->year, $date->month, $date->day],\n $cumulativeGoals,\n $cumulativeAssists\n ];\n\n //Team Points vs. Games\n $cumulativeTeamPoints += $stat->team_points;\n $teamPointsVSgames[] = [\n [$date->year, $date->month, $date->day],\n $cumulativeTeamPoints\n ];\n\n //Goal Difference vs. Game\n $teams = $game->teams()->getResults();\n $teamCount = count($teams);\n\n $score = [];\n\n foreach ($teams as $team) {\n $score[$team->color] = 0;\n }\n\n foreach ($teams as $team) {\n $teamGoals = $team->getTeamGoals();\n $score[$team->color] += $teamGoals['goals'];\n\n $ownGoalUniques = array_unique($teamGoals['ownGoals']);\n\n foreach ($ownGoalUniques as $ownGoalUnique) {\n $score[$ownGoalUnique] += count(array_keys($teamGoals['ownGoals'], $ownGoalUnique));\n }\n }\n\n arsort($score);\n $scores = array_values($score);\n\n if(array_search($playerTeam->color,array_keys($score))==0){\n $diff = $scores[0] - $scores[1];\n }elseif(array_search($playerTeam->color,array_keys($score))==1){\n $diff = $scores[1] - $scores[0];\n }elseif(array_search($playerTeam->color,array_keys($score))==2){\n $diff = $scores[2] - $scores[0];\n }\n\n $cumulativeGoalDiff = $cumulativeGoalDiff + $diff;\n $goalDiffVSgames[] = [\n [$date->year, $date->month, $date->day],\n $cumulativeGoalDiff\n ];\n }\n if ($numStats > 0) {\n return [\n 'goalsAssistsVSgames' => [\n 'title' => 'Cumulative Goals & Assists vs. Games',\n 'goalsRate' => round($cumulativeGoals / $numStats, 2),\n 'assistsRate' => round($cumulativeAssists / $numStats, 2),\n 'data' => $goalsAssistsVSgames\n ],\n 'teamPointsVSgames' => [\n 'title' => 'Cumulative Team Points vs. Games',\n 'data' => $teamPointsVSgames\n ],\n 'goalDiffVSgames' => [\n 'title' => 'Team Goal Difference vs. Games',\n 'data' => $goalDiffVSgames\n ]\n ];\n } else {\n return ['goalsAssistsVSgames' => [\n 'title' => 'Cumulative Goals & Assists vs. Games',\n 'goalsRate' => 0.00,\n 'assistsRate' => 0.00,\n 'data' => $goalsAssistsVSgames\n ],\n 'teamPointsVSgames' => [\n 'title' => 'Cumulative Team Points vs. Games',\n 'data' => $teamPointsVSgames\n ],\n 'goalDiffVSgames' => [\n 'title' => 'Team Goal Difference vs. Games',\n 'data' => $goalDiffVSgames\n ]\n ];\n }\n }", "title": "" }, { "docid": "1eea86b37e9c9bb9cdbf8607ea056c0b", "score": "0.51985395", "text": "function get_score(&$ctx, $obj_id, $datasource, $namespace, $user_id) {\n $score = $ctx->mt->db()->fetch_score($namespace, $obj_id, $user_id, $datasource);\n return $score->objectscore_score;\n}", "title": "" }, { "docid": "3c35511a88fa7e938e86cc9b423706a9", "score": "0.51779604", "text": "function userstats($what,$tid=0) {\n global $db,$userid;\n if(!$tid) $tid = $userid;\n if(!dbc_index::issetIndex('userstats_'.$tid)) {\n $get = db(\"SELECT * FROM \".$db['userstats'].\" WHERE user = '\".intval($tid).\"'\",false,true);\n dbc_index::setIndex('userstats_'.$tid, $get);\n }\n\n return re_entry(dbc_index::getIndexKey('userstats_'.$tid, $what));\n}", "title": "" }, { "docid": "ccf1a17054aca240223990a667c165ba", "score": "0.51754594", "text": "function save_scores($file, $score)\n{\n\tglobal $_configuration, $origin,\n\t\t$_user, $_cid,\n\t\t$TABLETRACK_HOTPOTATOES;\n\t// if tracking is disabled record nothing\n\t$weighting = 100; // 100%\n\t$reallyNow = time();\n\t$date = date(\"Y-m-d H:i:s\", $reallyNow);\n\n\tif (!$_configuration['tracking_enabled'])\n\t{\n\t\treturn 0;\n\t}\n\n\tif ($_user['user_id'])\n\t{\n\t\t$user_id = \"'\".$_user['user_id'].\"'\";\n\t}\n\telse // anonymous\n\t\t{\n\t\t$user_id = \"NULL\";\n\t}\n\t$sql = \"INSERT INTO $TABLETRACK_HOTPOTATOES \".\n\t\"(exe_name, exe_user_id, exe_date,exe_cours_id,exe_result,exe_weighting)\" .\n\t\"VALUES\" .\n\t\"('$file',$user_id,'$date','$_cid','$score','$weighting')\";\n\t$res = api_sql_query($sql,__FILE__,__LINE__);\n\n\tif ($origin == 'learnpath')\n\t{\n\t\t//if we are in a learning path, save the score in the corresponding\n\t\t//table to get tracking in there as well\n\t global $jscript2run;\n\t\t//record the results in the learning path, using the SCORM interface (API)\n\t $jscript2run .= '<script language=\"javascript\" type=\"text/javascript\">window.parent.API.void_save_asset('.$score.','.$weighting.');</script>';\n\t}\n\t\t\n}", "title": "" }, { "docid": "5c7bde731986f83499fe7b44c0555681", "score": "0.516999", "text": "function score()\n {\n access::ensure(\"scoring\");\n $achid = vsql::retr(\"SELECT id FROM achievements WHERE deleted = 0 AND \" . vsql::id_condition($_REQUEST[\"id\"], \"ground\"));\n insider_achievements::score(array_keys($achid));\n }", "title": "" }, { "docid": "6d2485ba9b8cc4b71f42da7c2cb768bc", "score": "0.51628107", "text": "public function getAllUsersStats()\r\n\t{\r\n\t\t$returnArray = array();\r\n\t\t\r\n\t\t$table = $this->getDbTable();\r\n\t\t$select = $table->select();\r\n\t\t$select->setIntegrityCheck(false);\r\n\t\t\r\n\t\t// Total users\r\n\t\t$select->from(array('u' => 'users'),\r\n\t\t\t\t\t array('COUNT(u.userID) as totalUsers'))\r\n\t\t\t ->where('u.fake = 0');\r\n\t\t\r\n\t\t$totalUsers = $table->fetchRow($select);\r\n\t\t$returnArray['totalUsers'] = array('description' => 'Total users',\r\n\t\t\t\t\t\t\t\t\t\t\t'value'\t\t => $totalUsers['totalUsers']);\r\n\t\t\r\n\t\t// Total active users\r\n\t\t$select = $table->select();\r\n\t\t$select->setIntegrityCheck(false);\r\n\t\t\r\n\t\t$select->from(array('u' => 'users'),\r\n\t\t\t\t\t array('COUNT(u.userID) as totalUsers'))\r\n\t\t\t ->where('u.fake = 0')\r\n\t\t\t ->where('u.active = 1');\r\n\t\t\t \r\n\t\t$totalActiveUsers = $table->fetchRow($select);\r\n\t\t$returnArray['totalActiveUsers'] = array('description' => 'Total active users',\r\n\t\t\t\t\t\t\t\t\t\t\t\t'value'\t\t => $totalActiveUsers['totalUsers']);\r\n\t\t\r\n\t\t// Num of active users in last month (who visited in the last month)\r\n\t\t$select = $table->select();\r\n\t\t$select->setIntegrityCheck(false);\r\n\t\t\r\n\t\t$select->from(array('u' => 'users'),\r\n\t\t\t\t\t array('COUNT(u.userID) as totalUsers'))\r\n\t\t\t ->where('u.fake = 0')\r\n\t\t\t ->where('u.lastActive > (now() - INTERVAL 1 month)');\r\n\t\t\t \r\n\t\t$lastActiveMonth = $table->fetchRow($select);\r\n\t\t$returnArray['lastActiveMonth'] = array('description' => 'Users active in last month',\r\n\t\t\t\t\t\t\t\t\t\t\t\t'value'\t\t => $lastActiveMonth['totalUsers']);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t// Num of new users in last month\r\n\t\t$select = $table->select();\r\n\t\t$select->setIntegrityCheck(false);\r\n\t\t\r\n\t\t$select->from(array('u' => 'users'),\r\n\t\t\t\t\t array('COUNT(u.userID) as totalUsers'))\r\n\t\t\t ->where('u.fake = 0')\r\n\t\t\t ->where('u.joined > (now() - INTERVAL 1 month)');\r\n\t\t\t \r\n\t\t$newUsers = $table->fetchRow($select);\r\n\t\t$returnArray['newUsersMonth'] = array('description' => 'New users in last month',\r\n\t\t\t\t\t\t\t\t\t\t\t\t'value'\t\t => $newUsers['totalUsers']);\r\n\t\t\r\n\t\t\r\n\t\t// % change of user base in last 3 months\r\n\t\t$select = $table->select();\r\n\t\t$select->setIntegrityCheck(false);\r\n\t\t\r\n\t\t$select->from(array('u' => 'users'),\r\n\t\t\t\t\t array('COUNT(u.userID) as totalUsers'))\r\n\t\t\t ->where('u.fake = 0')\r\n\t\t\t ->where('u.joined > (now() - INTERVAL 3 month)');\r\n\t\t\t \r\n\t\t$percentageThreeMonth = $table->fetchRow($select);\r\n\t\t\r\n\t\t$percentage = round($percentageThreeMonth['totalUsers'] / ($returnArray['totalUsers']['value'] - $percentageThreeMonth['totalUsers']) * 1000)/10;\r\n\t\t\r\n\t\t$returnArray['percentage3Month'] = array('description' => '% change in total users (3 months)',\r\n\t\t\t\t\t\t\t\t\t\t\t\t'value'\t\t => $percentage . '%');\r\n\t\t\r\n\t\t// % change of user base in last 6 months\r\n\t\t$select = $table->select();\r\n\t\t$select->setIntegrityCheck(false);\r\n\t\t\r\n\t\t$select->from(array('u' => 'users'),\r\n\t\t\t\t\t array('COUNT(u.userID) as totalUsers'))\r\n\t\t\t ->where('u.fake = 0')\r\n\t\t\t ->where('u.joined > (now() - INTERVAL 6 month)');\r\n\t\t\t \r\n\t\t$percentage6Month = $table->fetchRow($select);\r\n\t\t\r\n\t\t$percentage = round($percentage6Month['totalUsers'] / ($returnArray['totalUsers']['value'] - $percentage6Month['totalUsers']) * 1000)/10;\r\n\t\t\r\n\t\t$returnArray['percentage6Month'] = array('description' => '% change in total users (6 months)',\r\n\t\t\t\t\t\t\t\t\t\t\t\t 'value'\t\t => $percentage . '%');\r\n\t\t\r\n\t\treturn $returnArray;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "4b6674548fb446a6c99f01caec582557", "score": "0.51425666", "text": "public function getStatsFields() {}", "title": "" }, { "docid": "68d0dd795a2ca44768ecfff48bf0386e", "score": "0.5122418", "text": "public static function calculateStatistic(array $data)\n {\n $homeTeamStat = self::getStatisticByTeamId($data['home_team_id']);\n $awayTeamStat = self::getStatisticByTeamId($data['away_team_id']);\n\n if ($data['home_team_score'] > $data['away_team_score']) {\n $homeTeamStat->points = $homeTeamStat->points + 3;\n\n $homeTeamStat->goals_for = $homeTeamStat->goals_for + $data['home_team_score'];\n $homeTeamStat->goals_against = $homeTeamStat->goals_against + $data['away_team_score'];\n $awayTeamStat->goals_for = $awayTeamStat->goals_for + $data['away_team_score'];\n $awayTeamStat->goals_against = $awayTeamStat->goals_against + $data['home_team_score'];\n } else if ($data['home_team_score'] < $data['away_team_score']) {\n $awayTeamStat->points = $awayTeamStat->points + 3;\n\n $homeTeamStat->goals_for = $homeTeamStat->goals_for + $data['home_team_score'];\n $homeTeamStat->goals_against = $homeTeamStat->goals_against + $data['away_team_score'];\n $awayTeamStat->goals_for = $awayTeamStat->goals_for + $data['away_team_score'];\n $awayTeamStat->goals_against = $awayTeamStat->goals_against + $data['home_team_score'];\n } else if ($data['home_team_score'] == $data['away_team_score']) {\n $homeTeamStat->points = $homeTeamStat->points + 1;\n $awayTeamStat->points = $awayTeamStat->points + 1;\n\n $homeTeamStat->goals_for = $homeTeamStat->goals_for + $data['home_team_score'];\n $homeTeamStat->goals_against = $homeTeamStat->goals_against + $data['away_team_score'];\n $awayTeamStat->goals_for = $awayTeamStat->goals_for + $data['away_team_score'];\n $awayTeamStat->goals_against = $awayTeamStat->goals_against + $data['home_team_score'];\n } else {\n return false;\n }\n\n $homeTeamStat->save();\n $awayTeamStat->save();\n\n return true;\n }", "title": "" }, { "docid": "97063e99d8c97efd5df89d26201cbd85", "score": "0.5119651", "text": "function user_query_user_score($username, $mysqli) {\n $user = db_query_user($username, $mysqli);\n if ($user != null) {\n $user_id = $user[\"id\"];\n return db_query_user_score($user_id, $mysqli);\n } else {\n return null;\n }\n}", "title": "" }, { "docid": "9a4a6e0994cb1b5b91a0e649a26f4d3b", "score": "0.5115014", "text": "public function meilleurscore(){\n $data = array();\n $sql = \"SELECT user.prenom, user.nom ,score.score FROM user INNER JOIN score ON score.numuser = user.numuser ORDER BY score.score DESC LIMIT 5 \";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute();\n $count = $stmt->rowCount();\n foreach ($stmt as $row) {\n $data[] = $row;\n }\n return $data;\n }", "title": "" }, { "docid": "34b1ff8a7148c5e72b1ab3e3bf155b33", "score": "0.51093143", "text": "public function setUserScores()\n {\n $score = $this->em->getRepository('MeridianUserBundle:User')\n ->findOneBy(['id' => $this->getUserId()])\n ->setScores($this->getUserScores() + 1);\n $this->em->persist($score);\n $this->em->flush();\n }", "title": "" }, { "docid": "8dc69e0d1d6d8c918e272b96595dba98", "score": "0.51031655", "text": "public function getStats() {\n\t\t//$options = [\n\t\t//\t'fields' => function ($query) {\n\t\t//\t\treturn [\n\t\t//\t\t\t'job_type',\n\t\t//\t\t\t'num' => $query->func()->count('*'),\n\t\t//\t\t\t'alltime' => $query->func()->avg('UNIX_TIMESTAMP(completed) - UNIX_TIMESTAMP(created)'),\n\t\t//\t\t\t'runtime' => $query->func()->avg('UNIX_TIMESTAMP(completed) - UNIX_TIMESTAMP(fetched)'),\n\t\t//\t\t\t'fetchdelay' => $query->func()->avg('UNIX_TIMESTAMP(fetched) - IF(notbefore is NULL, UNIX_TIMESTAMP(created), UNIX_TIMESTAMP(notbefore))'),\n\t\t//\t\t];\n\t\t//\t},\n\t\t//\t'conditions' => [\n\t\t//\t\t'completed IS NOT' => null,\n\t\t//\t],\n\t\t//\t'group' => [\n\t\t//\t\t'job_type',\n\t\t//\t],\n\t\t//];\n\t\t//return $this->find('all', $options);\n\t}", "title": "" }, { "docid": "3febe6793e1503968b7eb59c59e66ff7", "score": "0.5095198", "text": "public function getStatsSummary();", "title": "" }, { "docid": "9514c6ec06d018fbc53a9a6213c7a4e2", "score": "0.5084212", "text": "public function getScoreData()\n\t{\n\t\t$scores = [];\n\n\t\tforeach($this->items as $item) {\n\t\t\t$scores[$item->template_id] = (object) [\n\t\t\t\t'score' => $item->score,\n\t\t\t\t'max_score' => $item->max_score,\n\t\t\t\t'final_score' => $this->final_score($item)\n\t\t\t];\n\t\t}\n\n\t\treturn $scores;\n\t}", "title": "" }, { "docid": "a96b863bcf9a230ffe8e646d4fdbc10f", "score": "0.50698495", "text": "function unedtrivial_get_total_score($unedid,$userid){\n GLOBAL $DB;\n \n $total = $DB->get_record_sql('SELECT SUM(n.questionscore) as sum'\n . ' FROM {unedtrivial_history} n'\n . ' WHERE n.idunedtrivial = ? AND'\n . ' n.userid = ?', array($unedid,$userid));\n return $total->sum;\n}", "title": "" }, { "docid": "47fe878ce7c8355996223a4fb9203022", "score": "0.5064887", "text": "function add_question_response_stats() {\n global $DB;\n\n // if no questions\n if ( empty($this->DATA)) return NULL;\n\n foreach ( $this->DATA as $question ) {\n // get count of student posts in each status for this question\n $sql = \"select status,count(id) as x from {bimtwo_marking} where \n question=? and status!='Unallocated' group by status\";\n $marking_details = $DB->get_records_sql( $sql, \n array( $question->id) );\n\n // get ready to update $question->status with information\n $question->status = array();\n $status = array( \"Unallocated\", \"Submitted\", \"Released\", \"Marked\",\n \"Suspended\" );\n\n foreach ( $status as $field ) {\n // if there was a post in that status, update $question->status\n if ( isset( $marking_details[$field] ) ) {\n $question->status[$field] = $marking_details[$field]->x;\n } else {\n $question->status[$field] = 0;\n }\n }\n }\n }", "title": "" }, { "docid": "d1505b9da726e206c062a26c353d769b", "score": "0.50546277", "text": "function highScore() {\n $T_Name1 = 'user'; //name bta3 table el user\n $T_Name2 = 'student'; //name table student\n $Db = DB::getInstance(); //object mn el db\n $result = $Db->select_all4($T_Name1, $T_Name2, \"user.user_id\", \"student.user_id\", \"usertypeid\", \"2\"); //cal function in class db\n $sortArray = array(); //make variable as array\n foreach ($result as $data) { //hna 2 foreach ht3dy 3la el 2d array\n foreach ($data as $key => $value) {\n if (!isset($sortArray[$key])) {\n $sortArray[$key] = array();\n }\n $sortArray[$key][] = $value;\n }\n }\n $orderby = \"point\"; //change this to whatever key you want from the array\n $Sort_array = array_multisort($sortArray[$orderby], SORT_DESC, $result);\n /* echo '<pre>';\n print_r($result);\n echo '</pre>'; */\n return $result;\n }", "title": "" }, { "docid": "a12386dbc3fc75a3eeb93a688a7105da", "score": "0.50510204", "text": "function setStats(mysqli_result $result, array &$array, $id)\n {\n $userId = $id;\n $i = 0; //To keep track of array element\n $totalGamesPlayed = 0;\n $totalGamesWon = 0;\n $totalGamesLost = 0;\n $totalElapsedTimeSeconds = 0;\n $totalScore = 0;\n\n //If the result has rows\n if ($result->num_rows > 0) {\n //Iterate through all rows in each column\n while ($row = $result->fetch_assoc()) {\n $totalGamesPlayed++;\n //If the user is the winner\n if (strcasecmp($row[\"winner_id\"], $userId) == 0) {\n $won = true; //Set boolean to true\n $totalGamesWon++; //Increment totalGamesWon\n }\n //Else, they lost\n else {\n $won = false; //Set boolean to false\n $totalGamesLost++; //Increment totalGamesLost\n }\n //If the user was the host of the match\n if (strcasecmp($row[\"host_id\"], $userId) == 0) {\n $score = $row[\"host_gained_score\"];\n }\n //Else, the user was the guest of the match\n else {\n $score = $row[\"guest_gained_score\"];\n }\n $startTime = $row[\"battle_start_time\"];\n $elapsedTimeSeconds = $row[\"battle_elapse_seconds\"];\n $totalElapsedTimeSeconds += $elapsedTimeSeconds;\n\n $totalScore += $score;\n $array[$i] = [\"result\" => $won,\n \"score\" => $score,\n \"elapsedTime\" => $elapsedTimeSeconds,\n \"date\" => $startTime]; //Insert stats into array as array (multidimensional)\n\n $i++; //Increment $i so next array is placed in next element\n }\n $result->close(); //Close passed connection\n }\n }", "title": "" }, { "docid": "ca5f6dd1764ddf9087c49f982044da94", "score": "0.50361943", "text": "public function findScoreMember($id)\n {\n $resultat = $this->db->query(\"SELECT u.id, st.id, st.date, st.score, st.id_user FROM users u INNER JOIN scoreTable st ON u.id = st.id_user WHERE u.id=$id\");\n return $resultat->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "c18d7ed968cfbaf0d1a705edafc90f7c", "score": "0.5034439", "text": "function save_scores($file, $score) {\n\tglobal $origin, $_user, $_cid,\n\t\t$TABLETRACK_HOTPOTATOES;\n\t// if tracking is disabled record nothing\n\t$weighting = 100; // 100%\n\t$reallyNow = time();\n\t$date = date(\"Y-m-d H:i:s\", $reallyNow);\n\n\tif ($_user['user_id']) {\n\t\t$user_id = $_user['user_id'];\n\t} else {\n\t\t// anonymous\n\t\t$user_id = \"NULL\";\n\t}\n\t$sql = \"INSERT INTO $TABLETRACK_HOTPOTATOES \".\n\t\t\t\"(exe_name, exe_user_id, exe_date,exe_cours_id,exe_result,exe_weighting)\" .\n\t\t\t\"VALUES\" .\n\t\t\t\"(\n\t\t\t'\".Database::escape_string($file).\"',\n\t\t\t'\".Database::escape_string($user_id).\"',\n\t\t\t'\".Database::escape_string($date).\"',\n\t\t\t'\".Database::escape_string($_cid).\"',\n\t\t\t'\".Database::escape_string($score).\"',\n\t\t\t'\".Database::escape_string($weighting).\"')\";\n\t$res = Database::query($sql);\n\n\tif ($origin == 'learnpath') {\n\t\t//if we are in a learning path, save the score in the corresponding\n\t\t//table to get tracking in there as well\n\t global $jscript2run;\n\t\t//record the results in the learning path, using the SCORM interface (API)\n\t $jscript2run .= '<script language=\"javascript\" type=\"text/javascript\">window.parent.API.void_save_asset('.$score.','.$weighting.');</script>';\n\t}\n}", "title": "" }, { "docid": "7be46daf83dfe9772c5dece97c8a63de", "score": "0.5020312", "text": "private function getLeaderScore(){\n return $this->getRankedUsers()[0];\n }", "title": "" }, { "docid": "d491473d33c682ee216df1d8b930f5ac", "score": "0.500834", "text": "public function getScore();", "title": "" }, { "docid": "012023c7659bdc46337f83d6f9121a83", "score": "0.4980081", "text": "function shd_stats_status()\n{\n\tglobal $smcFunc;\n\n\t$status = array(\n\t\tTICKET_STATUS_NEW => 0,\n\t\tTICKET_STATUS_PENDING_STAFF => 0,\n\t\tTICKET_STATUS_PENDING_USER => 0,\n\t\tTICKET_STATUS_CLOSED => 0,\n\t\tTICKET_STATUS_WITH_SUPERVISOR => 0,\n\t\tTICKET_STATUS_ESCALATED => 0,\n\t\tTICKET_STATUS_DELETED => 0\n\t);\n\n\t// Collect up some numbers.\n\t$request = $smcFunc['db_query']('', '\n\t\tSELECT COUNT(id_ticket) AS count, status\n\t\tFROM {db_prefix}helpdesk_tickets\n\t\tWHERE status IN ({array_int:status})\n\t\tGROUP BY status',\n\t\tarray(\n\t\t\t'status' => array_keys($status)\n\t));\n\n\twhile ($row = $smcFunc['db_fetch_assoc']($request))\n\t\t$status[$row['status']] = $row['count'];\n\t$smcFunc['db_free_result']($request);\n\n\t$status['total_open'] = $status[TICKET_STATUS_NEW] + $status[TICKET_STATUS_PENDING_STAFF] + $status[TICKET_STATUS_PENDING_USER] + $status[TICKET_STATUS_WITH_SUPERVISOR] + $status[TICKET_STATUS_ESCALATED];\n\t$status['total_closed'] = $status[TICKET_STATUS_CLOSED] + $status[TICKET_STATUS_DELETED];\n\n\t$status['total_total'] = $status['total_open'] + $status['total_closed'];\n\n\t// We are fast.\n\tif ($status['total_open'] == $status['total_closed'])\n\t\t$status['ratio'] = '1:1';\n\telseif ($status['total_open'] == 0)\n\t\t$status['ratio'] = '0:' . $status['total_closed'];\n\telseif ($status['total_closed'] == 0)\n\t\t$status['ratio'] = $status['total_open'] . ':0';\n\telseif ($status['total_open'] > $status['total_closed'])\n\t\t$status['ratio'] = round($status['total_open'] / $status['total_closed']) . ':1';\n\telseif ($status['total_open'] < $status['total_closed'])\n\t\t$status['ratio'] = '1:' . round($status['total_closed'] / $status['total_open']);\n\n\treturn $status;\n}", "title": "" }, { "docid": "5a751355a53984e1327c4e5c8afc9e7d", "score": "0.4977791", "text": "public function insert($score){\n\t\t$sql = 'INSERT INTO scores (points,name,date) VALUES (?, ?, ?)';\n\t\t\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t\n\t\t$sqlQuery->setString($score->points);\n\t\t$sqlQuery->setString($score->name);\n\t\t$sqlQuery->setString($score->date);\n\n\t\t\n\t\t$id = $this->executeInsert($sqlQuery);\t\n\t\t$score->id = $id;\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "66dde1dcfa1d23f5dfddfa8f97a16609", "score": "0.49687007", "text": "function _update_all_stats () {\n\t\t// Set blog stats to initial values\n\t\tdb()->query(\n\t\t\t\"UPDATE \".db('blog_settings').\" \n\t\t\tSET num_posts = 0,\n\t\t\t\tnum_views = 0,\n\t\t\t\tnum_comments = 0\"\n\t\t);\n\t\t// We need to create blog settings tables for all blog posts\n\t\tdb()->query(\n\t\t\t\"REPLACE INTO \".db('blog_settings').\"\n\t\t\t\t\t(user_id,user_nick) \n\t\t\t\tSELECT u.id,u.nick \n\t\t\t\tFROM \".db('user').\" AS u,\n\t\t\t\t\t\".db('blog_posts').\" AS b\n\t\t\t\tWHERE b.user_id = u.id \n\t\t\t\t\tAND u.id NOT IN ( \n\t\t\t\t\t\tSELECT s.user_id FROM \".db('blog_settings').\" AS s\n\t\t\t\t\t)\n/*\t\t\tON DUPLICATE KEY UPDATE user_nick = VALUES(user_nick)*/\"\n\t\t);\n\t\t// Update user_nick in stats\n\t\tdb()->query(\n\t\t\t\"UPDATE \".db('blog_settings').\" AS s,\n\t\t\t\t\t\".db('user').\" AS u\n\t\t\tSET s.user_nick = u.nick\n\t\t\tWHERE s.user_id = u.id\"\n\t\t);\n\t\t// Create temporary table\n\t\t$tmp_table_name = db()->_get_unique_tmp_table_name();\n\t\tdb()->query(\n\t\t\t\"CREATE TEMPORARY TABLE \".$tmp_table_name.\" ( \n\t\t\t\tuser_id\t\tint(10) unsigned NOT NULL, \n\t\t\t\tnum_posts\t\tint(10) unsigned NOT NULL, \n\t\t\t\tnum_views\t\tint(10) unsigned NOT NULL, \n\t\t\t\tnum_comments\tint(10) unsigned NOT NULL, \n\t\t\t\tPRIMARY KEY (user_id)\n\t\t\t)\"\n\t\t);\n\t\t// Update blog num posts and views\n\t\tdb()->query(\n\t\t\t\"INSERT INTO \".$tmp_table_name.\" \n\t\t\t\t(user_id,num_posts,num_views) \n\t\t\t\tSELECT user_id, \n\t\t\t\t\tCOUNT(id) AS num_posts, \n\t\t\t\t\tSUM(num_reads) AS num_views \n\t\t\t\tFROM \".db('blog_posts').\" \n\t\t\t\tWHERE active=1 \n\t\t\t\tGROUP BY user_id\"\n\t\t);\n\t\t// Create temporary table for num comments\n\t\t$tmp_table_name2 = db()->_get_unique_tmp_table_name();\n\t\tdb()->query(\n\t\t\t\"CREATE TEMPORARY TABLE \".$tmp_table_name2.\" ( \n\t\t\t\tuser_id\t\tint(10) unsigned NOT NULL, \n\t\t\t\tnum_comments\tint(10) unsigned NOT NULL, \n\t\t\t\tPRIMARY KEY (user_id)\n\t\t\t)\"\n\t\t);\n\t\t// Update num_comments for blog posts\n\t\tdb()->query(\n\t\t\t\"INSERT INTO \".$tmp_table_name2.\" \n\t\t\t\t(user_id,num_comments) \n\t\t\t\tSELECT \n\t\t\t\t\tb.user_id AS blog_user_id,\n\t\t\t\t\tCOUNT(c.id) AS num_comments\n\t\t\t\tFROM \".db('comments').\" AS c,\n\t\t\t\t\t\".db('blog_posts').\" AS b \n\t\t\t\tWHERE c.object_name='\"._es('blog').\"' \n\t\t\t\t\tAND b.id=c.object_id \n\t\t\t\t\tAND b.active=1 \n\t\t\t\t\tAND b.privacy NOT IN(9)\n\t\t\t\t\tAND b.allow_comments NOT IN(9)\n\t\t\t\tGROUP BY b.user_id\"\n\t\t);\n\t\t// Syncronize temporary tables\n\t\tdb()->query(\n\t\t\t\"UPDATE \".$tmp_table_name.\" AS tmp1,\n\t\t\t\t\t\".$tmp_table_name2.\" AS tmp2\n\t\t\t\tSET tmp1.num_comments = tmp2.num_comments \n\t\t\tWHERE tmp1.user_id = tmp2.user_id\"\n\t\t);\n\t\t// Update stats table\n\t\tdb()->query(\n\t\t\t\"UPDATE \".db('blog_settings').\" AS s,\n\t\t\t\t\t\".$tmp_table_name.\" AS tmp\n\t\t\tSET s.num_posts = tmp.num_posts,\n\t\t\t\ts.num_views = tmp.num_views,\n\t\t\t\ts.num_comments = tmp.num_comments\n\t\t\tWHERE s.user_id = tmp.user_id\"\n\t\t);\n\t\t// Cleanup temp\n\t\tdb()->query(\"DROP TEMPORARY TABLE \".$tmp_table_name.\"\");\n\t\tdb()->query(\"DROP TEMPORARY TABLE \".$tmp_table_name2.\"\");\n\t}", "title": "" }, { "docid": "0c0caf22d6b8a47cfeec53f1bfda1b3b", "score": "0.49620706", "text": "private function addScore($name,$k,$l,$r,$n,$g,$b,$s,&$doctrine) {\n $score = new Score();\n $score->setProblem($name);\n $score->setK($k);\n $score->setL($l);\n $score->setR($r);\n $score->setN($n);\n $score->setG($g);\n $score->setB($b);\n $score->setS($s);\n \n if($r != 0) { // RN - RG - RB\n $score->setRn(($r-$n)/$r*100);\n $score->setRg(($r-$g)/$r*100);\n $score->setRb(($r-$b)/$r*100);\n } else {\n $score->setRn(0);\n $score->setRg(0);\n $score->setRb(0);\n }\n\n if($n != 0) { // NB - NG\n $score->setNb(($n-$b)/$n*100);\n $score->setNg(($n-$g)/$n*100);\n } else {\n $score->setNb(0);\n $score->setNg(0);\n }\n\n if($g !=0) $score->setGb(($g-$b)/$g*100); // GB\n else $score->setGb(0);\n\n $doctrine->persist($score);\n $doctrine->flush();\n }", "title": "" }, { "docid": "0a7c0c674e34ae3c2ed679cc379b3cde", "score": "0.49605235", "text": "function updateKanjiStats($kanji, $user, $newRetentionScore) {\n $db = mysqli_connect($this->dbInfo['DB_SERVER'], $this->dbInfo['DB_USERNAME'],\n $this->dbInfo['DB_PASSWORD'], $this->dbInfo['DB_DATABASE']);\n mysqli_set_charset($db, \"utf8\");\n\n if (!$db)\n die(\"Connection failed: \" . mysqli_connect_error());\n\n $stmt = $db->prepare(\"UPDATE student_kanji\n SET retention_score = ?,\n total_questions_asked = total_questions_asked + 1,\n last_time_quized = NOW()\n WHERE student_id = (SELECT id FROM student WHERE username = ?)\n AND kanji_id = (SELECT id FROM kanji WHERE kanji = ?)\");\n $stmt->bind_param(\"dss\", $newRetentionScore, $user, $kanji);\n $stmt->execute();\n mysqli_close($db);\n }", "title": "" }, { "docid": "bdf436bd92a499283162989961d1f76b", "score": "0.49591953", "text": "function bim_get_question_response_stats( $questions ) {\n global $DB;\n if ( empty($questions)) {\n return null;\n }\n\n foreach ($questions as $question) {\n // get count of student posts in each status for this question\n $sql = \"select status,count(id) as x from {bim_marking} where \" .\n \"question=$question->id and status!='Unallocated' \" .\n \"group by status\";\n $marking_details = $DB->get_records_sql( $sql );\n\n // get ready to update $question->status with information\n $question->status = array();\n $status = array( \"Unallocated\", \"Submitted\", \"Released\", \"Marked\",\n \"Suspended\" );\n\n foreach ($status as $field) {\n // if there was a post in that status, update $question->status\n if ( isset( $marking_details[$field] ) ) {\n $question->status[$field] = $marking_details[$field]->x;\n } else {\n $question->status[$field] = 0;\n }\n }\n }\n return $questions;\n}", "title": "" }, { "docid": "12cb476ce2db6a3e2692ea9238b639f2", "score": "0.49490273", "text": "function calculateStats($mysqli,$todayDistance, $username){\n\t$debug = \"XXX\".time() %100 ;\n\t$todayJeffRequest= \"SELECT `group`, sum(`NbFormsAttempted`) attempts, sum(`NbFormsSuccess`) success FROM `verbexercises` V2 inner join `verbs` V1 on V1.id = V2.VerbId WHERE V1.id >0 \";\n\tif(isset($username) && $username != \"everybody\"){\n\t\t$todayJeffRequest .= \"and username = '\".$username.\"' \";\n\t}\n\tif(isset($todayDistance)){\n\t \"and datediff(curdate(),V2.`date` )< \".$todayDistance.\" \";\n\t}\n\t$todayJeffRequest .= \"group by V1.`group`\";\n\n\n\t$todayJeffRes = $mysqli->query($todayJeffRequest);\n\t$debug .=\"YYY\". time() %100 ;\n\n\t$totalAttemps = 0;\n\t$totalSuccesses = 0;\n\n\t$regularAttemps = 0;\n\t$regularSuccesses = 0;\n\t$irregularAttemps = 0;\n\t$irregularSuccesses = 0;\n\n\t$g1Attemps = 0;\n\t$g1Successes = 0;\n\t$g2Attemps = 0;\n\t$g2Successes = 0;\n\t$g3Attemps = 0;\n\t$g3Successes = 0;\n\t$g4Attemps = 0;\n\t$g4Successes = 0;\n\t$g5Attemps = 0;\n\t$g5Successes = 0;\n\t$g6Attemps = 0;\n\t$g6Successes = 0;\n\t$g2aAttemps = 0;\n\t$g2aSuccesses = 0;\n\t$g2bAttemps = 0;\n\t$g2bSuccesses = 0;\n\n\t$strongAttemps = 0;\n\t$strongSuccesses = 0;\n\t$irrAttemps = 0;\n\t$irrSuccesses = 0;\n\t$modalAttemps = 0;\n\t$modalSuccesses = 0;\n\n\twhile($obj = $todayJeffRes->fetch_object()){\n\t\t$debug .=\"ZZZ\". time() %100 ;\n\t\t$group=$obj->group;\n\t\t$attempts=$obj->attempts;\n\t\t$success =$obj->success ;\n\t\t// switch case sur le groupe\n\t\tswitch($group){\n\t\t\tcase \"1\":\n\t\t\t\t$g1Attemps += $attempts;\n\t\t\t\t$g1Successes += $success;\n\t\t\t\t$totalAttemps += $attempts;\n\t\t\t\t$totalSuccesses += $success;\n\t\t\t\t$regularAttemps += $attempts;\n\t\t\t\t$regularSuccesses += $success;\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\t$g2aAttemps += $attempts;\n\t\t\t\t$g2aSuccesses += $success;\n\t\t\t\t$g2Attemps += $attempts;\n\t\t\t\t$g2Successes += $success;\n\t\t\t\t$totalAttemps += $attempts;\n\t\t\t\t$totalSuccesses += $success;\n\t\t\t\t$regularAttemps += $attempts;\n\t\t\t\t$regularSuccesses += $success;\n\t\t\t\tbreak;\n\t\t\tcase \"2b\":\n\t\t\t\t$g2bAttemps += $attempts;\n\t\t\t\t$g2bSuccesses += $success;\n\t\t\t\t$g2Attemps += $attempts;\n\t\t\t\t$g2Successes += $success;\n\t\t\t\t$totalAttemps += $attempts;\n\t\t\t\t$totalSuccesses += $success;\n\t\t\t\t$regularAttemps += $attempts;\n\t\t\t\t$regularSuccesses += $success;\n\t\t\t\tbreak;\n\t\t\tcase \"3\":\n\t\t\t\t$g3Attemps += $attempts;\n\t\t\t\t$g3Successes += $success;\n\t\t\t\t$totalAttemps += $attempts;\n\t\t\t\t$totalSuccesses += $success;\n\t\t\t\t$regularAttemps += $attempts;\n\t\t\t\t$regularSuccesses += $success;\n\t\t\t\tbreak;\n\t\t\tcase \"4\":\n\t\t\t\t$g4Attemps += $attempts;\n\t\t\t\t$g4Successes += $success;\n\t\t\t\t$totalAttemps += $attempts;\n\t\t\t\t$totalSuccesses += $success;\n\t\t\t\t$irregularAttemps += $attempts;\n\t\t\t\t$irregularSuccesses += $success;\n\t\t\t\tbreak;\n\t\t\tcase \"5\":\n\t\t\t\t$g5Attemps += $attempts;\n\t\t\t\t$g5Successes += $success;\n\t\t\t\t$totalAttemps += $attempts;\n\t\t\t\t$totalSuccesses += $success;\n\t\t\t\t$irregularAttemps += $attempts;\n\t\t\t\t$irregularSuccesses += $success;\n\t\t\t\tbreak;\n\t\t\tcase \"6\":\n\t\t\t\t$g6Attemps += $attempts;\n\t\t\t\t$g6Successes += $success;\n\t\t\t\t$totalAttemps += $attempts;\n\t\t\t\t$totalSuccesses += $success;\n\t\t\t\t$irregularAttemps += $attempts;\n\t\t\t\t$irregularSuccesses += $success;\n\t\t\t\tbreak;\n\t\t\tcase \"i\":\n\t\t\t\t$irrAttemps += $attempts;\n\t\t\t\t$irrSuccesses += $success;\n\t\t\t\t$totalAttemps += $attempts;\n\t\t\t\t$totalSuccesses += $success;\n\t\t\t\t$irregularAttemps += $attempts;\n\t\t\t\t$irregularSuccesses += $success;\n\t\t\t\tbreak;\n\t\t\tcase \"m\":\n\t\t\t\t$modalAttemps += $attempts;\n\t\t\t\t$modalSuccesses += $success;\n\t\t\t\t$totalAttemps += $attempts;\n\t\t\t\t$totalSuccesses += $success;\n\t\t\t\t$irregularAttemps += $attempts;\n\t\t\t\t$irregularSuccesses += $success;\n\t\t\t\tbreak;\n\t\t\tcase \"F\":\n\t\t\t\t$strongAttemps += $attempts;\n\t\t\t\t$strongSuccesses += $success;\n\t\t\t\t$totalAttemps += $attempts;\n\t\t\t\t$totalSuccesses += $success;\n\t\t\t\t$irregularAttemps += $attempts;\n\t\t\t\t$irregularSuccesses += $success;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tif($totalAttemps == 0){\t$totalAttemps = 1;}\n\tif($regularAttemps == 0){\t$regularAttemps = 1;}\n\tif($irregularAttemps == 0){\t$irregularAttemps = 1;}\n\n\tif($g1Attemps == 0){\t$g1Attemps = 1;}\n\tif($g2Attemps == 0){\t$g2Attemps = 1;}\n\tif($g3Attemps == 0){\t$g3Attemps = 1;}\n\tif($g4Attemps == 0){\t$g4Attemps = 1;}\n\tif($g5Attemps == 0){\t$g5Attemps = 1;}\n\tif($g6Attemps == 0){\t$g6Attemps = 1;}\n\tif($g2aAttemps == 0){\t$g2aAttemps = 1;}\n\tif($g2bAttemps == 0){\t$g2bAttemps = 1;}\n\n\tif($strongAttemps == 0){\t$strongAttemps = 1;}\n\tif($irrAttemps == 0){\t$irrAttemps = 1;}\n\tif($modalAttemps == 0){\t$modalAttemps = 1;}\n\n\t// return as array\n\t$result['totalAttemps']=$totalAttemps;\n\t$result['totalSuccesses']=$totalSuccesses;\n\n\t$result['regularAttemps']=$regularAttemps;\n\t$result['regularSuccesses']=$regularSuccesses;\n\t$result['irregularAttemps']=$irregularAttemps;\n\t$result['irregularSuccesses']=$irregularSuccesses;\n\n\t$result['g1Attemps']=$g1Attemps;\n\t$result['g1Successes']=$g1Successes;\n\t$result['g2Attemps']=$g2Attemps;\n\t$result['g2Successes']=$g2Successes;\n\t$result['g3Attemps']=$g3Attemps;\n\t$result['g3Successes']=$g3Successes;\n\t$result['g4Attemps']=$g4Attemps;\n\t$result['g4Successes']=$g4Successes;\n\t$result['g5Attemps']=$g5Attemps;\n\t$result['g5Successes']=$g5Successes;\n\t$result['g6Attemps']=$g6Attemps;\n\t$result['g6Successes']=$g6Successes;\n\t$result['g2aAttemps']=$g2aAttemps;\n\t$result['g2aSuccesses']=$g2aSuccesses;\n\t$result['g2bAttemps']=$g2bAttemps;\n\t$result['g2bSuccesses']=$g2bSuccesses;\n\n\t$result['strongAttemps']=$strongAttemps;\n\t$result['strongSuccesses']=$strongSuccesses;\n\t$result['irrAttemps']=$irrAttemps;\n\t$result['irrSuccesses']=$irrSuccesses;\n\t$result['modalAttemps']=$modalAttemps;\n\t$result['modalSuccesses']=$modalSuccesses;\n\n\n\t//$debug .=\"AAA\". time() %100 ;\n\t$result['debug']=$username;\n\t//$result['debug']=$debug;\n\n\n\treturn $result;\n}", "title": "" }, { "docid": "c8cb5dd352e1cbdf733105085571b957", "score": "0.4945067", "text": "protected function createNewStats()\n\t{\n\t\t$data = array(\n\t\t\t'site_id' => $this->site_id\n\t\t);\n\n\t\tif ($this->site_id != 1)\n\t\t{\n\t\t\t$stats = $this->getModelFacade()->get('Stats')\n\t\t\t\t->fields('total_members', 'recent_member_id', 'recent_member')\n\t\t\t\t->filter('site_id', 1)\n\t\t\t\t->first();\n\n\t\t\t$data['total_members'] = $stats->total_members;\n\t\t\t$data['recent_member_id'] = $stats->recent_member_id;\n\t\t\t$data['recent_member'] = $stats->recent_member;\n\t\t}\n\n\t\t$this->getModelFacade()->make('Stats', $data)->save();\n\t}", "title": "" }, { "docid": "8c8e99dc7e976082a5f8d6037583c133", "score": "0.494171", "text": "public function stats($id=NULL) {\n \tif( $this->require_role('admin') ) {\n \t\t$poll = $this->_checkRecord($id);\n \t\t\n \t\t$data = array(\n \t\t\t'title' => \"Statistiques d'un sondage\",\n \t\t\t'js_to_load' => array(\n \t\t\t\t'plugins/flot/jquery.flot.js', \n \t\t\t\t'plugins/flot/jquery.flot.resize.min.js', \n \t\t\t\t'plugins/flot/jquery.flot.tooltip.min.js', \n \t\t\t\t'plugins/flot/jquery.flot.pie.js', \n \t\t\t\t'graphs.js?v=1'),\n \t\t\t'content' => 'polls/stats',\n \t\t\t'poll' => $poll\n \t\t);\n \t\t\n \t\tif($poll){\n \t\t\t$poll->sheets_count = $this->main_model->countSheets($poll);\n \t\t\t$all_answers = $this->main_model->getAllAnswers($id);\n \t\t\t$questions_with_answers = $this->main_model->getQuestionsWithAnswers($poll);\n \t\t\t\n \t\t\t$counted_answers = array();\n \t\t\t$stats = array();\n \t\t\t$count_question_answers = 0;\n \t\t\t\n \t\t\tforeach ($all_answers as $answer) {\n\t \t\t\tif(!isset($counted_answers[$answer->id_question])) {\n\t \t\t\t\t$counted_answers[$answer->id_question] = array('global' => 0, 'details' => array());\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif($answer->type == 'free_text') {\n\t \t\t\t\tif(trim($answer->value)) {\n\t \t\t\t\t\t$counted_answers[$answer->id_question]['global'] += 1;\n\t \t\t\t\t}\t\t\n\t \t\t\t} else {\n\t \t\t\t\t$counted_answers[$answer->id_question]['global'] += 1;\n\t \t\t\t\tif($answer->type == 'ordered_choices') {\n\t \t\t\t\t\t// parse answers\n\t\t\t\t\t\t\tforeach (explode('*', $answer->value) as $u_answer) {\n\t\t\t\t\t\t\t\tif($u_answer) {\n\t\t\t\t\t\t\t\t\t$u_answer = explode('|', $u_answer);\n\t\t\t\t\t\t\t\t\t$order = $u_answer[1];\n\t\t\t\t\t\t\t\t\t$id_answer = $u_answer[0];\n\n\t\t\t\t\t\t\t\t\tif(!$order) {\n\t\t\t\t\t\t\t\t\t\t$order = 0;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif(!isset($counted_answers[$answer->id_question]['details'][$id_answer])) {\n\t\t\t \t\t\t\t\t\t$counted_answers[$answer->id_question]['details'][$id_answer] = 0;\n\t\t\t \t\t\t\t\t}\n\t\t\t \t\t\t\t\t$counted_answers[$answer->id_question]['details'][$id_answer] += $order;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tasort($counted_answers[$answer->id_question]['details']);\n\t \t\t\t\t} else {\n\t \t\t\t\t\t$choices = explode(',', $answer->value);\n\t \t\t\t\t\t\n\t \t\t\t\t\tforeach ($choices as $choice) {\n\t \t\t\t\t\t\tif(!isset($counted_answers[$answer->id_question]['details'][$choice])) {\n\t\t \t\t\t\t\t\t$counted_answers[$answer->id_question]['details'][$choice] = 0;\n\t\t \t\t\t\t\t}\n\t\t \t\t\t\t\t$counted_answers[$answer->id_question]['details'][$choice] += 1;\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n\t \t\t\n\t \t\tforeach ($questions_with_answers as $question) {\n\t \t\t\t$question_data = array(\n\t \t\t\t\t'details' => $question\n\t \t\t\t);\n\t \t\t\t\n\t \t\t\tif(!isset($counted_answers[$question->id])) {\n\t \t\t\t\t$counted_answers[$question->id] = array('global' => 0, 'details' => array());\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\t$question_data['nbr_answers'] = $counted_answers[$question->id]['global'];\n\t \t\t\t$question_data['graph'] = array('data' => array(), 'labels' => array());\n\t \t\t\t$counted_answers[$question->id]['answers'] = array();\n\t \t\t\t\n\t \t\t\tif($question->type != 'free_text') {\n\t \t\t\t\t$i = 0;\n\t \t\t\t\tforeach ($question->answers as $answer) {\n\t \t\t\t\t\tif(!isset($counted_answers[$question->id]['details'][$answer->id])) {\n\t \t\t\t\t\t\t$question_data['graph']['data'][] = array($i, 0);\n\t \t\t\t\t\t} else {\n\t \t\t\t\t\t\t$question_data['graph']['data'][] = array($i, $counted_answers[$question->id]['details'][$answer->id]);\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t\t$counted_answers[$question->id]['answers'][$answer->order] = $answer;\n\t \t\t\t\t\t$question_data['graph']['labels'][] = array($i, $answer->description);\n\t \t\t\t\t\t\n\t \t\t\t\t\t$i++;\n\t \t\t\t\t}\n\t \t\t\t} else {\n\t \t\t\t\t$question_data['graph']['data'][] = array(0, $counted_answers[$question->id]['global']);\n\t \t\t\t\t$question_data['graph']['data'][] = array(1, $poll->sheets_count - $counted_answers[$question->id]['global']);\n\t \t\t\t\t\n\t \t\t\t\t$question_data['graph']['labels'][] = array(0, 'Ayant répondu');\n\t \t\t\t\t$question_data['graph']['labels'][] = array(1, 'Pas de réponse');\n\t \t\t\t\t\n\t \t\t\t\t$counted_answers[$question->id]['answers'] = false;\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\t$stats[] = $question_data;\n\t \t\t}\n\t \t\t\n\t \t\t$data['graphs_data'] = $stats;\n\t \t\t$data['answers_data'] = $counted_answers;\n \t\t}\n \t\t\n \t\t$this->load->view('global/layout', $data);\n \t}\n }", "title": "" }, { "docid": "5091606c5aa3fda02a730501715c76c4", "score": "0.49315637", "text": "public function logWorker($score){\r\n\t\t$propArray = array(\r\n\t\t\t\t\"hitId\" => $this->hitId,\r\n\t\t\t\t\"assignmentId\" => $this->assignmentId,\r\n\t\t\t\t\"workerId\" => $this->workerId,\r\n\t\t\t\t\"turkSubmitTo\" => $this->turkSubmitTo,\r\n\t\t\t\t\"task\" => $this->task\r\n\t\t);\r\n\t\t$timestamp = date('Y-m-d H:i:s', time());\r\n\t\t//public function updateFields($table, $field, $value, $propArray){\r\n\t\t$this->dbh->updateFields(\"mturk\", \"updateTime\", $timestamp, $propArray);\r\n\t\t\r\n\t\t$nowRow = $this->dbh->getFirstRow(\"mturk\", $propArray);\r\n\t\t$dbScore = intval($nowRow['score']);\r\n\t\tif(intval($score)-$dbScore<=$this->maxIncreasePoint){\r\n\t\t\t$this->dbh->updateFields(\"mturk\", \"score\", $score, $propArray);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//getFirstRow($table, $propArray)\r\n\t\t/*\r\n\t\t$nowRow = $this->dbh->getFirstRow(\"mturk\", $propArray);\r\n\t\t//$this->dbh->updateFields(\"mturk\", \"score\", $score, $propArray);\r\n\t\t\r\n\t\t$dbScore = $nowRow['score'];\r\n\t\tif($score==0){//reload page\r\n\t\t\tif($score<$dbScore){//no update, just sync the score\r\n\t\t\t\treturn $dbScore;\r\n\t\t\t}\r\n\t\t\treturn $score;\r\n\t\t}else{//update page\r\n\t\t\tif($score<$dbScore){//add score\r\n\t\t\t\tif($score<=$maxIncreasePoint){//safe check\r\n\t\t\t\t\t$this->dbh->updateFields(\"mturk\", \"score\", $dbScore+$score, $propArray);\r\n\t\t\t\t\treturn ($dbScore+$score);\r\n\t\t\t\t}//else{//not safe, just return old score\r\n\t\t\t\treturn ($dbScore);\r\n\t\t\t\t//}\r\n\t\t\t}else if($score>$dbScore){//update score\r\n\t\t\t\tif($dbScore-$score<=$maxIncreasePoint){//safe check\r\n\t\t\t\t\t$this->dbh->updateFields(\"mturk\", \"score\", $score, $propArray);\r\n\t\t\t\t\treturn ($score);\r\n\t\t\t\t}//else{//not safe, keep the old one\r\n\t\t\t\treturn ($dbScore);\r\n\t\t\t\t//}\r\n\t\t\t}\r\n\t\t\treturn $score;\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\t//return \r\n\t}", "title": "" }, { "docid": "aa8a262f15685d7f6f8ecb1d2ed95b41", "score": "0.49311122", "text": "function get_score($league_id)\n\t{\n\t\t//WARNING: use this with care when changing scores! or perhaps better not use it and optimize performance when it's needed....\n\t\t/*if(is_object($this->scores[$league_id]))\n\t\t\treturn $this->scores[$league_id];*/\n\t\t\n\t\t$score = new score();\n\t\t//load or create score from/in database\n\t\tif(false == $score->load_data($this->data['id'],$league_id))\n\t\t\t$score->create($this->data['id'],$league_id);\n\n\t\t$this->scores['league_id'] = $score;\n\t\treturn $score;\n\t}", "title": "" }, { "docid": "f945b41fec26844f504f9a38541e27e9", "score": "0.49298468", "text": "function saveStatsInCache($stat_name, $stat_value)\r\n\t\t{\r\n\t\t\t$fileName = $this->getCachFileName('Stats');\r\n\r\n\t\t\tif($fileName!=null)\r\n\t\t\t{\r\n\t\t\t\t$file = @fopen($fileName, 'r');\r\n\t\t\t\t$file_created = false;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$today = getdate();\r\n\t\t\t\t$cacheDir = $this->getCachDir();\r\n\t\t\t\t$cachePath = $cacheDir->path;\r\n\t\t\t\t$fileName = $cachePath.'messages_stats_'.$GLOBALS['fc_config']['cacheFilePrefix'].'_'.$_SESSION['session_inst'].'.txt';\r\n\t\t\t\t$file = @fopen($fileName, 'w');\r\n\t\t\t\t$file_created = true;\r\n\t\t\t}\r\n\t\t\tif(!$file) return;\r\n\t\t\t//$lines = file($fileName);\r\n\t\t\t$replaced = false;\r\n\t\t\t$newLines = array();\r\n\t\t\tif(!$file_created)\r\n\t\t\twhile(!feof($file))\r\n\t\t\t{\r\n\t\t\t\t$line = fgets($file);\r\n\t\t\t\tif($line=='')\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t$lineElems = explode('=', $line);\r\n\t\t\t\tif($lineElems[0] == $stat_name)\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_push($newLines, $lineElems[0].'='.$stat_value.\"\\n\");\r\n\t\t\t\t\t$replaced = true;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tarray_push($newLines, $lineElems[0].'='.$lineElems[1]);\r\n\t\t\t}\r\n\t\t\tfflush($file);\r\n\t\t\tfclose($file);\r\n\t\t\tif(!$replaced)\r\n\t\t\t\tarray_push($newLines, $stat_name.'='.$stat_value.\"\\n\");\r\n\r\n\t\t\t$file = @fopen($fileName, 'w');\r\n\t\t\tif($file)\r\n\t\t\t{\r\n\t\t\t\tfor($i=0; $i<count($newLines); $i++)\r\n\t\t\t\t\t@fwrite($file, $newLines[$i]);\r\n\t\t\t\tfflush($file);\r\n\t\t\t\t@fclose($file);\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "a4d1a5f7d2220358c47e426273912ed8", "score": "0.49133104", "text": "private function parseMembersScored($html) {\n\n $sidebarInformation = $html->find('div#contentWrapper div#content div.js-scrollfix-bottom div');\n foreach($sidebarInformation as $value) {\n if(strpos($value->plaintext, 'Score:') !== false) {\n if(strpos($value->innertext, 'users') !== false) {\n return (int)trim(str_replace(',', '', $value->find('span', 1)->innertext));\n }\n }\n }\n\n }", "title": "" }, { "docid": "b22fda6fdc9fe4a4716c64947ad4a97c", "score": "0.4909722", "text": "abstract public function getStatistic();", "title": "" }, { "docid": "ffa9e597e492fd91fd80ce0034285d80", "score": "0.49083635", "text": "public function fetch_statistics() {\r\n $query1 = $this->db->query(\"SELECT COUNT(*) AS db_rows FROM users\")->result();\r\n $query2 = $this->db->query(\"SELECT COUNT(*) AS act_rows FROM users WHERE status = 'Active'\")->result();\r\n $query3 = $this->db->query(\"SELECT COUNT(*) AS jee_all_user1 FROM users WHERE course = 'JEE' AND duration = '1'\")->result();\r\n $query4 = $this->db->query(\"SELECT COUNT(*) AS jee_active_user1 FROM users WHERE course = 'JEE' AND duration = '1' AND status = 'Active'\")->result();\r\n $query5 = $this->db->query(\"SELECT COUNT(*) AS jee_all_user2 FROM users WHERE course = 'JEE' AND duration = '2'\")->result();\r\n $query6 = $this->db->query(\"SELECT COUNT(*) AS jee_active_user2 FROM users WHERE course = 'JEE' AND duration = '2' AND status = 'Active'\")->result();\r\n $query7 = $this->db->query(\"SELECT COUNT(*) AS neet_all_user FROM users WHERE course = 'NEET'\")->result();\r\n $query8 = $this->db->query(\"SELECT COUNT(*) AS neet_active_user FROM users WHERE course = 'NEET' AND status = 'Active'\")->result();\r\n return array(\r\n \"all_students\" => $query1,\r\n \"active_students\" => $query2,\r\n \"jee_all_student1\" => $query3,\r\n \"jee_active_student1\" => $query4,\r\n \"jee_all_student2\" => $query5,\r\n \"jee_active_student2\" => $query6,\r\n \"neet_all_student\" => $query7,\r\n \"neet_active_student\" => $query8\r\n );\r\n }", "title": "" }, { "docid": "a441eeb891479437a4f20695a55fc0d3", "score": "0.49072286", "text": "private function appendPoints( $uid ) {\n $query = \"SELECT SUM(t1.score) FROM achievements as t1 INNER JOIN achievement_progress AS t2 ON t2.achievement_id=t1.id WHERE t1.progress_max=t2.progress AND t2.user_id=\" .$uid;\n $result = mysql_query($query) or die('query failed: ' . mysql_error());\n $u = mysql_fetch_array($result, MYSQL_ASSOC);\n echo \"<script> placePoints(\". $u['SUM(t1.score)'] .\")</script>\";\n }", "title": "" }, { "docid": "54417ef32367b2a0fc03295d2da348a2", "score": "0.49070993", "text": "public function getStat();", "title": "" }, { "docid": "8e00ec079f066f975f8eb1eec01871e4", "score": "0.49046966", "text": "public function update_all_score($user_id){\n\t\t$query = $this->db->get_where('user_specs', array('user_id' => $user_id));\n\t\t//check if user specs exists\n\t\tif ($query->num_rows() == 0){\n\t\t\treturn FALSE;\n\t\t} else {\n\t\t\t//calculate result\n\t\t\t$user_specs_str = $query->row_array()['column'];\n\t\t\t$query_str = 'INSERT INTO `pas_user_garment` (`user_id`, `garment_id`, `score`, `expired`) SELECT '.$user_id.' AS `user_id`, `scores`.`garment_id` AS `garment_id`, `scores`.`score` AS `score`, 0 AS `expired` FROM (SELECT `pas_garment_specs`.`garment_id`, (AVG(LEAST('.$user_specs_str.')) + MIN(LEAST('.$user_specs_str.'))) / 2 AS `score` FROM `pas_garment_specs` LEFT JOIN `pas_garment` ON (`pas_garment_specs`.`garment_id` = `pas_garment`.`garment_id`) WHERE `outdated` = 0 GROUP BY `pas_garment_specs`.`garment_id`) AS `scores` WHERE `scores`.`score` IS NOT NULL ON DUPLICATE KEY UPDATE `score` = VALUES(`score`)';\n\t\t\t$query = $this->db->query($query_str);\n\t\t}\n\t}", "title": "" }, { "docid": "3034989883bebb02d2ac0ea68dfea692", "score": "0.49036312", "text": "function index_stats()\n\t{\n\t\tglobal $user;\n\n\t\tif (empty($this->stats))\n\t\t{\n\t\t\t$this->get_stats();\n\t\t}\n\n\t\t$user->add_lang('mods/fulltext_sphinx');\n\n\t\treturn array(\n\t\t\t$user->lang['FULLTEXT_SPHINX_MAIN_POSTS']\t\t\t=> ($this->index_created()) ? $this->stats['main_posts'] : 0,\n\t\t\t$user->lang['FULLTEXT_SPHINX_DELTA_POSTS']\t\t\t=> ($this->index_created()) ? $this->stats['total_posts'] - $this->stats['main_posts'] : 0,\n\t\t\t$user->lang['FULLTEXT_MYSQL_TOTAL_POSTS']\t\t\t=> ($this->index_created()) ? $this->stats['total_posts'] : 0,\n\t\t\t$user->lang['FULLTEXT_SPHINX_LAST_SEARCHES']\t\t=> nl2br($this->stats['last_searches']),\n\t\t);\n\t}", "title": "" }, { "docid": "1df9d18126c902568bc0f88c6f4926d5", "score": "0.49035853", "text": "function answer_stats($userid) \n{\n\t$userdata = qa_db_read_one_assoc( \n\t\t\t\tqa_db_query_sub('\n\t\t\t\t\tSELECT u.userid, COUNT(a.postid) AS qs, SUM(q.selchildid=a.postid) AS selected\n\t\t\t\t\tFROM ^users u\n\t\t\t\t\tLEFT JOIN ^posts a ON u.userid = a.userid AND a.type=\"A\"\n\t\t\t\t\tLEFT JOIN ^posts q ON a.parentid = q.postid AND q.type=\"Q\"\n\t\t\t\t\tWHERE u.userid = $\n\t\t\t\t\t', \n\t\t\t\t\t$userid) \n\t\t\t)\n\t;\n\n\tif(empty($userdata['selected']))\n\t{\n\t\t$userdata['selected'] = 0;\n\t}\n\n\treturn array( $userdata['userid'], $userdata['qs'], $userdata['selected'] );\n}", "title": "" }, { "docid": "c4eec923069f97cebb34e2567b7ca20f", "score": "0.48961452", "text": "public function hasStats(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "37cbd9584f63e39896bbc2af3666b611", "score": "0.4890557", "text": "function getStats($type) {\n\t\treturn $this->connection->execute(\"getStats\", $type);\n\t}", "title": "" }, { "docid": "ada2eafec8ab042246bb18a0d44c86b2", "score": "0.4877207", "text": "private function getTotalUserScore($user, $scoreRepo = null){\n if($scoreRepo == null)\n $scoreRepo = $this->getDoctrine()->getManager()->getRepository('AppBundle:Score');\n $totalPoints = 0;\n $scores = $scoreRepo->findBy(array('user' => $user));\n foreach ($scores as $score) {\n //die(var_dump($score));\n // make total\n $totalPoints += $score->getNbPoints();\n\n }\n // store in array (user, totalScore)\n $rank = array(\n 'user' => $user,\n 'nbPoints' => $totalPoints,\n );\n return $rank;\n }", "title": "" }, { "docid": "1830b0b80347d2077ce31300a2b31219", "score": "0.4877153", "text": "function fgmodesSetScoretable($scoretable,$title='Scores',$title2='',$refresh=false){\n\tglobal $_debug,$_ml_act,$_fgmodes_scoretable,$_FGameMode,$_fgmodes_scoretable_bg_xml,$_fgmodes_scoretable_xml,$_fgmodes_keymax,$_is_relay;\n\tif($_is_relay)\n\t\treturn;\n\n\t$_fgmodes_scoretable = $scoretable;\n\n\t$nmax = count($_fgmodes_scoretable);\n\n\t$entries_xml = '';\n\tif($nmax <= 4){\n\t\t$yt = 24;\n\t\t$scale = 1.0;\n\t}elseif($nmax >= 8){\n\t\t$yt = 8 * 12 / 2;\n\t\t$scale = 4 / 8;\n\t}else{\n\t\t$yt = $nmax * 12 / 2;\n\t\t$scale = 4 / $nmax;\n\t}\n\t$n = 1;\n\tforeach($_fgmodes_scoretable as $score){ // width: 78, left: -39 to -33, right: 29 to 39\n\t\t$x = ($nmax < 8) ? 0 : ( ($n <= 8) ? -39 : 39 );\n\t\t$y = ($n <= 8) ? $yt - 12 * ($n - 1) : $yt - 12 * ($n - 9);\n\t\t$key = $score[0]+0;\n\t\tif($key < 0 || $key > $_fgmodes_keymax)\n\t\t\t$key = 0;\n\t\t$num = ($score[2] !== '') ? \"{$n}\" : '';\n\t\t$entries_xml .= sprintf('<label sizen=\"78 12\" posn=\"%0.1F %0.1F 0.1\" halign=\"center\" text=\" \" action=\"'. $_ml_act['fgmodes.'.$key] .'\"/>' // selectable\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.'<quad sizen=\"6 12\" posn=\"%0.1F %0.1F 0\" bgcolor=\"%sd\"/>' // colored square\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.'<label posn=\"%0.1F %0.1F 0.2\" halign=\"center\" valign=\"center2\" textsize=\"6\" textcolor=\"ffff\" text=\"%s\"/>' // rank\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.'<label sizen=\"30 2\" posn=\"%0.1F %0.1F 0.2\" valign=\"center2\" textsize=\"6\" textcolor=\"ffff\" text=\"%s\"/>', // team\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$x,$y, $x-39,$y,$score[1], $x-36,$y-6,$num, \t$x-32,$y-4.5,$score[2]);\n\t\tif($score[3] !== ''){\n\t\t\t$entries_xml .= sprintf('<label sizen=\"14 4\" posn=\"%0.1F %0.1F 0.2\" halign=\"right\" valign=\"center2\" textsize=\"6\" textcolor=\"ffff\" text=\"%s\"/>', // score\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$x+37.5,$y-4.5,$score[3]);\n\t\t}\n\t\tif($score[4] !== ''){\n\t\t\t$size = is_numeric($score[4]) ? 5 : 3;\n\t\t\t$entries_xml .= sprintf('<label sizen=\"9 3\" posn=\"%0.1F %0.1F 0.2\" halign=\"right\" valign=\"center2\" textsize=\"%d\" textcolor=\"ddbf\" text=\"%s\"/>', // status\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$x+37.5,$y-9.5,$size,$score[4]);\n\t\t}\n\t\tif($score[5] !== ''){\n\t\t\t$entries_xml .= sprintf('<label sizen=\"58 3\" posn=\"%0.1F %0.1F 0.2\" valign=\"center2\" textsize=\"4\" textcolor=\"fffc\" text=\"%s\"/>', // players\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$x-30,$y-9.5,$score[5]);\n\t\t}\n\t\t$n++;\n\t}\n\n\t// default value\n\t$_fgmodes_scoretable_xml = sprintf($_fgmodes_scoretable_bg_xml,$_FGameMode,$title,$title2,$scale,$entries_xml);\n\t//console(\"fgmodesSetScoretable:: => {$_fgmodes_scoretable_xml}\");\n\n\tif($refresh === true)\n\t\tfgmodesUpdateScoretableXml(true,'refresh');\n\telse if($refresh !== false)\n\t\tfgmodesUpdateScoretableXml($refresh,'refresh');\n}", "title": "" }, { "docid": "0bc4a37cc2f366bdbb4a0b145ae85bad", "score": "0.48723766", "text": "public function hasStats(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "5a67aa1342d14e31a915d19b2ce07a26", "score": "0.48702252", "text": "public function register_score($user_id, $score) {\n $data = array(\n 'user_id' => $user_id,\n 'score' => $score\n );\n \n $this->score_model->register_score($data);\n \n }", "title": "" }, { "docid": "a57d414524aa3c2a14b9fb17ebd8dce2", "score": "0.48684424", "text": "function update_score()\n{\n\t//user_uid\n\t//product_id\n\t//score\n\t//seq\n\t//record_time\n \t$num = func_num_args();\n\tif($num > 0) $args = func_get_args();\n\n\tswitch($num)\n\t{\n\t\tcase \"3\":\n\t\t\t\t$user_uid = $args[0];\n\t\t\t\t$product_id = $args[1];\n\t\t\t\t$score\t= $args[2];\n\t\tbreak;\n\t\tcase \"4\":\n $user_uid = $args[0];\n $product_id = $args[1];\n $score = $args[2];\n\t\t\tif(is_int($arg[3]))\n\t\t\t{\n\t\t\t\t$seq_no = $args[3];\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$record_time = \"'\".$args[3].\"'\";\n\t\t\t}\n\t\tbreak;\n\t\tcase \"5\":\n\t\t\t$user_uid = $args[0];\n $product_id = $args[1];\n $score = $args[2];\n\t\t\tif(is_int($args[3])) $seq_no = $args[3];\n\t\t\t$record_time = $args[4];\n\t\tbreak;\n\t\tdefault:\n\t\t\treturn -1;\n\t\tbreak;\n\t}\n\n\tif(!isset($seq_no)) $seq_no = 1;\n\t$sql =\t\" insert into score (user_uid, product_id, score, seq_no\";\n if(isset($record_time)) $sql = $sql . \", record_time \";\n $sql = $sql .\")\t\".\n\t\t\" values \".\n\t\t\" ('\".$user_uid.\"','\".$product_id.\"','\".$score.\"','\".$seq_no.\"'\";\n if(isset($record_time)) $sql = $sql .\",'\".$record_time.\"'\";\n $sql = $sql .\")\";\n\t$result = query($sql);\n\treturn $result; \n}", "title": "" }, { "docid": "4977128986c9319de5e366e649de3f35", "score": "0.48672515", "text": "function userpoints_get_rank($user_id) {\r\n\r\n/*\r\n // SLOWER but more exact ranking, 2 queries required. Each call is rebuilding the whole table\r\n\r\n global $database;\r\n\r\n $database->database_query( \"SET @rownum := 0\" );\r\n return semods::db_query_count( \"SELECT rank FROM (\r\n SELECT @rownum := @rownum+1 AS rank, userpoints_user_id\r\n FROM se_semods_userpoints\r\n ORDER BY userpoints_count DESC, userpoints_user_id\r\n ) AS rank_table WHERE userpoints_user_id=$user_id\r\n \");\r\n*/\r\n\r\n/*\r\n // FAST. This query shares the place for equal score and \"floors\" shared rank\r\n return semods::db_query_count( \"SELECT COUNT(*)+1 AS rank\r\n FROM se_semods_userpoints\r\n WHERE userpoints_totalearned >= (SELECT userpoints_totalearned FROM se_semods_userpoints WHERE userpoints_user_id=$user_id)\" );\r\n*/\r\n\r\n\r\n/*\r\n * user points rank\r\n * user1 1000 1\r\n * user2 500 2\r\n * user3 500 2\r\n * user4 400 4\r\n * user5 0 5\r\n * user5 0 5\r\n *\r\n */\r\n\r\n // FAST. This query shares the place for equal score and makes \"ceiling\" for shared rank positions\r\n return semods::db_query_count( \"SELECT COUNT(*)+1 AS rank\r\n FROM se_semods_userpoints\r\n WHERE userpoints_totalearned > (SELECT userpoints_totalearned FROM se_semods_userpoints WHERE userpoints_user_id=$user_id)\" );\r\n\r\n\r\n}", "title": "" }, { "docid": "4bf725d89f41a71783eae2a384cd4f20", "score": "0.48639274", "text": "public function setIdsummary_stats($value){\n $this->idsummary_stats=$value;\n }", "title": "" }, { "docid": "54e7955b9dd244d1b6e8fb4b862fe0a9", "score": "0.4860595", "text": "public function update($score){\n\t\t$sql = 'UPDATE scores SET points = ?, date = ? WHERE name = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t\n\t\t$sqlQuery->setString($score->points);\n\t\t$sqlQuery->setString($score->date);\n\t\t$sqlQuery->setString($score->name);\n\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "title": "" }, { "docid": "be3018c0baf4c499ea032ece789dcf58", "score": "0.48530155", "text": "public function update_score() {\n $this->check_session();\n \n // Fetch answer tracking\n $answers = array(\n 'regular' => $_POST['regular'],\n 'plus' => $_POST['plus'],\n 'minus' => $_POST['minus']\n );\n \n // Get current score\n $score = $this->session->userdata['user_info']->score;\n \n $old_score = $this->session->userdata['user_info']->score; // grab old score to compare after\n \n // Calculate new score\n $score = $score + $answers['regular'] * $this->view_data['score_scale']['score_regular'];\n $score = $score + $answers['plus'] * $this->view_data['score_scale']['score_plus'];\n $score = $score + $answers['minus'] * - $this->view_data['score_scale']['score_minus'];\n \n // Update new score in db\n $this->user_model->update_user($this->session->userdata['user_info']->id, array('score' => $score));\n \n // Grab new score in session\n // FIX TO UPDATE/WRITE AN ARRAY KEY IN SESSION\n $user_info = $this->session->userdata['user_info'];\n $user_info->score = $score;\n $this->session->set_userdata('user_info', $user_info);\n \n // Grab how many correct answers in session\n $this->session->set_userdata('correct_answers', 4 - $answers['minus']);\n \n // Register score instance\n $this->register_score($this->session->userdata['user_info']->id, $this->session->userdata['user_info']->score - $old_score);\n }", "title": "" }, { "docid": "95299331336bbaa3c2a8914414e71117", "score": "0.48521405", "text": "public function updateStatistics(GameEntity $game, $action = Statistics::ACTION_ADD)\n {\n $statsRepository = $this->entityManager->getRepository('AppBundle:Statistics');\n $statisticsService = $this->container->get('app.statistic_service');\n $isDraw = false;\n // Stats by current month\n $winnerTeamStats = null;\n // Stats by current month\n $defeatTeamStats = null;\n // Stats by all period\n $winnerTeamStatsAll = null;\n // Stats by all period\n $defeatTeamStatsAll = null;\n $date = $game->getGameDate();\n // Stats by current month\n $firstTeamStats = $statsRepository\n ->getStatistic(\n $game->getFirstTeam(),\n (int)$date->format('m'),\n (int)$date->format('Y')\n );\n // Stats by all period\n $firstTeamStatsAll = $statsRepository->getStatistic($game->getFirstTeam());\n // Stats by current month\n $secondTeamStats = $statsRepository\n ->getStatistic(\n $game->getSecondTeam(),\n (int)$date->format('m'),\n (int)$date->format('Y')\n );\n // Stats by all period\n $secondTeamStatsAll = $statsRepository->getStatistic($game->getSecondTeam());\n\n if ($game->getResult() == GameEntity::RESULT_DRAW) {\n $isDraw = true;\n } else {\n if ($game->getResult() == GameEntity::RESULT_FIRST_WINNER) {\n $winnerTeamStats = $firstTeamStats;\n $defeatTeamStats = $secondTeamStats;\n $winnerTeamStatsAll = $firstTeamStatsAll;\n $defeatTeamStatsAll = $secondTeamStatsAll;\n } else {\n $winnerTeamStats = $secondTeamStats;\n $defeatTeamStats = $firstTeamStats;\n $winnerTeamStatsAll = $secondTeamStatsAll;\n $defeatTeamStatsAll = $firstTeamStatsAll;\n }\n }\n\n if ($action == Statistics::ACTION_ADD) {\n\n if ($isDraw) {\n $firstTeamStats->addDrawn();\n $secondTeamStats->addDrawn();\n $firstTeamStatsAll->addDrawn();\n $secondTeamStatsAll->addDrawn();\n } else {\n $winnerTeamStats->addWon();\n $winnerTeamStatsAll->addWon();\n $defeatTeamStats->addLost();\n $defeatTeamStatsAll->addLost();\n }\n\n } elseif ($action == Statistics::ACTION_REMOVE) {\n\n if ($isDraw) {\n $firstTeamStats->removeDrawn();\n $secondTeamStats->removeDrawn();\n $firstTeamStatsAll->removeDrawn();\n $secondTeamStatsAll->removeDrawn();\n // Update statistic streak\n $statisticsService->updateStreak($firstTeamStats);\n $statisticsService->updateStreak($firstTeamStatsAll);\n $statisticsService->updateStreak($secondTeamStats);\n $statisticsService->updateStreak($secondTeamStatsAll);\n } else {\n $winnerTeamStats->removeWon();\n $winnerTeamStatsAll->removeWon();\n $defeatTeamStats->removeLost();\n $defeatTeamStatsAll->removeLost();\n // Update statistic streak\n $statisticsService->updateStreak($winnerTeamStats);\n $statisticsService->updateStreak($winnerTeamStatsAll);\n $statisticsService->updateStreak($defeatTeamStats);\n $statisticsService->updateStreak($defeatTeamStatsAll);\n }\n\n }\n\n $this->entityManager->flush();\n }", "title": "" }, { "docid": "ce4ef5286d1c8cc04620cd82fa9ba217", "score": "0.48491007", "text": "function insertScore(string $name, int $score)\n {\n $sql = \"INSERT INTO score (name, score) VALUES (?, ?)\";\n $connection = connect();\n $stmt = mysqli_prepare($connection, $sql);\n $stmt->bind_param(\"si\", $name, $score);\n $stmt->execute();\n }", "title": "" }, { "docid": "3c600927963205d23e6107136010508f", "score": "0.4846045", "text": "public function userStats ($user ) {\n }", "title": "" }, { "docid": "a46af3e280609749d19a976cf029c355", "score": "0.4845932", "text": "public function eraseAllMemberScore($id)\n {\n $resultat = $this->db->query(\"DELETE FROM scoreTable WHERE id_user = $id\");\n }", "title": "" }, { "docid": "ac780db163473633ac4d05f4bf6414f6", "score": "0.48439702", "text": "public function authUserScore() {\n\t\treturn $this->hasOne(Score::class)->where('user_id', Auth::id())->withDefault([\n\t\t\t'user_id' => Auth::id(),\n\t\t\t'card_id' => $this->id,\n\t\t]);\n\t}", "title": "" }, { "docid": "dc98af9c0fddd3973235a64a3276439e", "score": "0.48349476", "text": "function learndash_get_user_stats( $user_id = null ) {\n\n\tif ( null === $user_id ) {\n\t\t$cuser = wp_get_current_user();\n\t\t$user_id = $cuser->ID;\n\t} else {\n\t\t$user_id = absint( $user_id );\n\t}\n\n\t$progress = get_user_meta( $user_id, '_sfwd-course_progress' );\n\n\t$stats = array(\n\t\t'courses' => 0,\n\t\t'completed' => 0,\n\t\t'points' => learndash_get_user_course_points( $user_id ),\n\t\t'certificates' => learndash_get_certificate_count( $user_id ),\n\t);\n\n\t$courses = learndash_user_get_enrolled_courses( $user_id, array(), true );\n\n\tif ( $courses ) {\n\n\t\t$stats['courses'] = count( $courses );\n\n\t\tforeach ( $courses as $course_id ) {\n\n\t\t\t$progress = learndash_course_progress(\n\t\t\t\tarray(\n\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t'course_id' => $course_id,\n\t\t\t\t\t'array' => true,\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif ( 100 === absint( $progress['percentage'] ) ) {\n\t\t\t\t$stats['completed']++;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Filters LearnDash user stats. Used to modify user details like courses, points, certificates.\n\t *\n\t * @param array $stats User stats\n\t * @param int $user_id User ID.\n\t */\n\treturn apply_filters( 'learndash-get-user-stats', $stats, $user_id );\n\n}", "title": "" }, { "docid": "0bef9c4b3f567582bd9e231e4229cf05", "score": "0.48277327", "text": "function bbps_create_user_ranking_meta($user_id){\n$rankings = get_option('_bbps_reply_count');\n\n\t\t$meta = array(\n\t\t\t'post_count' => '0', \n\t\t\t'current_ranking' => ''\n\t\t);\n\t\n\t\n\tupdate_user_meta( $user_id, '_bbps_rank_info', $meta);\n}", "title": "" }, { "docid": "e8a125dcec09691174ee5cd4b73f97ce", "score": "0.48157847", "text": "function get_actual_stats($name)\n{\n\tglobal $dbprefix, $SQL, $plugin;\n\n\t$query = array(\n\t\t\t\t\t'SELECT'\t=> 's.' . $name,\n\t\t\t\t\t'FROM'\t\t=> \"{$dbprefix}stats s\"\n\t\t\t);\n\n\t$result\t= $SQL->build($query);\n\t$v\t\t= $SQL->fetch($result);\n\n\t($hook = $plugin->run_hook('get_actual_stats_func')) ? eval($hook) : null; //run hook\n\n\t$SQL->free($result);\n\n\treturn $v[$name];\n}", "title": "" }, { "docid": "dbb7299b2b9e61ec03174aedc2ace948", "score": "0.48134455", "text": "public function stats()\n {\n return $this->hasOne('App\\Models\\Stat');\n }", "title": "" }, { "docid": "b966857dff3f16e067ac1f50d6e6684a", "score": "0.4804704", "text": "public function getScore() { return $this->_score; }", "title": "" }, { "docid": "ac3b2d410624274d172a2a290a7d1d2d", "score": "0.4783759", "text": "public function set_dummy_highest_score()\n {\n $this->load->model('user_model');\n\n // Reset all ranking\n\n $query = \"UPDATE {$this->user_model->database_name}.{$this->user_model->table_name} SET highest_score = NULL\" ;\n\n $this->user_model->master->query($query);\n\n $res = $this->user_model\n ->where('status', 'active')\n ->where('primary_type', 'student')\n ->order_by('id', 'ASC')\n ->limit(100)\n ->all();\n\n foreach ($res AS $key => $user) {\n\n $key += 1;\n // Update random highest score\n\n $score = 0;\n\n switch (TRUE) {\n case $key == 1:\n $score = 35000;\n break;\n\n case $key == 2:\n $score = 30000;\n break;\n\n case $key >= 3 && $key <= 8:\n $score = 29999 - ($key - 3);\n break;\n\n case $key == 9:\n $score = 27000;\n break;\n case $key == 10:\n $score = 25000;\n break;\n case $key == 11:\n $score = 20000;\n break;\n\n case $key >= 12 && $key <= 48:\n $score = 19999 - ($key - 12);\n break;\n\n case $key == 49:\n $score = 17000;\n break;\n\n case $key == 50:\n $score = 15000;\n break;\n\n case $key == 51:\n $score = 10000;\n break;\n\n case $key >= 52 && $key <= 98:\n $score = 9999 - ($key - 52);\n break;\n\n case $key == 99:\n $score = 7000;\n break;\n\n case $key == 100:\n $score = 3000;\n break;\n\n }\n\n $this->user_model->update($user->id, [\n 'highest_score' => $score\n ]);\n }\n }", "title": "" }, { "docid": "45a2742f8caf78181e45759a231829f9", "score": "0.47825733", "text": "public function set_score($score){\n\t\t//acquiring data\n\t\t$oldmedia = $this->score;\n\t\t$newscore = $score;\n\t\t\n\t\t$oldvotes = $this->votes;\n\t\t$newvotes = $this->votes + 1;\n\t\t//calculating new media\n\t\t$newmedia = ($oldmedia * $oldvotes + $newscore) / ($newvotes);\n\t\t\n\t\t//setting new infos to local memory object\n\t\t$this->score = $newmedia;\n\t\t$this->votes = $newvotes;\n\t\t\n\t\t//updating db\n\t\tEDatabase::q(\"UPDATE ocs_content SET score=\".$this->score.\", votes=\".$this->votes.\" WHERE id=\".$this->id.\" LIMIT 1\");\n\t\t\n\t}", "title": "" }, { "docid": "262ac81155eb0638372cab6c6c4c9b8f", "score": "0.4771724", "text": "public function score( $sid ) {\n\t\t$userObject = $this->getUser();\n\t\t$output = $this->getOutput();\n\t\t$output->setPageTitle( wfMessage( 'poll-title-score' )->text() );\n\n\t\t$linkRenderer = $this->getLinkRenderer();\n\n\t\tif ( !$userObject->isAllowed( 'poll-score' ) ) {\n\t\t\t$output->addWikiMsg( 'poll-score-right-error' );\n\t\t\t$output->addHtml( $linkRenderer->makeKnownLink( $this->getPageTitle(), wfMessage( 'poll-back' )->text(),\n\t\t\t\t[], [ 'action' => 'list' ] ) );\n\t\t} else {\n\t\t\t$dbr = wfGetDB( DB_REPLICA );\n\t\t\t$query = $dbr->select( 'poll', 'question, alternative_1, alternative_2, alternative_3, alternative_4, alternative_5, alternative_6, creater, multi',\n\t\t\t\t[ 'id' => $sid ], __METHOD__ );\n\n\t\t\tforeach ( $query as $row ) {\n\t\t\t\t$question = htmlentities( $row->question, ENT_QUOTES, 'UTF-8' );\n\t\t\t\t$alternative_1 = htmlentities( $row->alternative_1, ENT_QUOTES, 'UTF-8' );\n\t\t\t\t$alternative_2 = htmlentities( $row->alternative_2, ENT_QUOTES, 'UTF-8' );\n\t\t\t\t$alternative_3 = htmlentities( $row->alternative_3, ENT_QUOTES, 'UTF-8' );\n\t\t\t\t$alternative_4 = htmlentities( $row->alternative_4, ENT_QUOTES, 'UTF-8' );\n\t\t\t\t$alternative_5 = htmlentities( $row->alternative_5, ENT_QUOTES, 'UTF-8' );\n\t\t\t\t$alternative_6 = htmlentities( $row->alternative_6, ENT_QUOTES, 'UTF-8' );\n\t\t\t\t$creater = htmlentities( $row->creater, ENT_QUOTES, 'UTF-8' );\n\t\t\t\t$multi = $row->multi;\n\t\t\t}\n\n\t\t\tif ( !isset( $question ) || $question == \"\" ) {\n\t\t\t\t$output->addWikiMsg( 'poll-invalid-id' );\n\t\t\t\t$output->addHtml( $linkRenderer->makeKnownLink( $this->getPageTitle(), wfMessage( 'poll-back' )->text(),\n\t\t\t\t\t[], [ 'action' => 'list' ] ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( $multi != 1 ) {\n\t\t\t\t$query_1 = $dbr->select( 'poll_answer', 'uid', [ 'vote' => '1', 'pid' => $sid ], __METHOD__ );\n\t\t\t\t$query_2 = $dbr->select( 'poll_answer', 'uid', [ 'vote' => '2', 'pid' => $sid ], __METHOD__ );\n\t\t\t\t$query_3 = $dbr->select( 'poll_answer', 'uid', [ 'vote' => '3', 'pid' => $sid ], __METHOD__ );\n\t\t\t\t$query_4 = $dbr->select( 'poll_answer', 'uid', [ 'vote' => '4', 'pid' => $sid ], __METHOD__ );\n\t\t\t\t$query_5 = $dbr->select( 'poll_answer', 'uid', [ 'vote' => '5', 'pid' => $sid ], __METHOD__ );\n\t\t\t\t$query_6 = $dbr->select( 'poll_answer', 'uid', [ 'vote' => '6', 'pid' => $sid ], __METHOD__ );\n\n\t\t\t\t$query_num_1 = $query_1->numRows();\n\t\t\t\t$query_num_2 = $query_2->numRows();\n\t\t\t\t$query_num_3 = $query_3->numRows();\n\t\t\t\t$query_num_4 = $query_4->numRows();\n\t\t\t\t$query_num_5 = $query_5->numRows();\n\t\t\t\t$query_num_6 = $query_6->numRows();\n\t\t\t}\n\n\t\t\tif ( $multi == 1 ) {\n\t\t\t\t$query_num_1 = 0;\n\t\t\t\t$query_num_2 = 0;\n\t\t\t\t$query_num_3 = 0;\n\t\t\t\t$query_num_4 = 0;\n\t\t\t\t$query_num_5 = 0;\n\t\t\t\t$query_num_6 = 0;\n\n\t\t\t\t$query_multi = $dbr->select( 'poll_answer', 'vote', [ 'pid' => $sid ], __METHOD__ );\n\t\t\t\tforeach ( $query_multi as $row ) {\n\t\t\t\t\t$vote = $row->vote;\n\t\t\t\t\t$vote = explode( \"|\", $vote );\n\n\t\t\t\t\tif ( $vote[0] == \"1\" ) {\n\t\t\t\t\t\t$query_num_1++;\n\t\t\t\t\t}\n\t\t\t\t\tif ( $vote[1] == \"1\" ) {\n\t\t\t\t\t\t$query_num_2++;\n\t\t\t\t\t}\n\t\t\t\t\tif ( $vote[2] == \"1\" ) {\n\t\t\t\t\t\t$query_num_3++;\n\t\t\t\t\t}\n\t\t\t\t\tif ( $vote[3] == \"1\" ) {\n\t\t\t\t\t\t$query_num_4++;\n\t\t\t\t\t}\n\t\t\t\t\tif ( $vote[4] == \"1\" ) {\n\t\t\t\t\t\t$query_num_5++;\n\t\t\t\t\t}\n\t\t\t\t\tif ( $vote[5] == \"1\" ) {\n\t\t\t\t\t\t$query_num_6++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$query_other = $dbr->select( 'poll_answer', 'vote_other', [ 'pid' => $sid, 'isset_vote_other' => 1 ], __METHOD__ );\n\t\t\t$score_other = [];\n\t\t\tforeach ( $query_other as $row ) {\n\t\t\t\tif ( !isset( $score_other[$row->vote_other]['first'] ) ) {\n\t\t\t\t\t$score_other[$row->vote_other]['first'] = 0;\n\t\t\t\t\t$score_other[$row->vote_other]['number'] = 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$score_other[$row->vote_other]['number']++;\n\t\t\t}\n\n\t\t\t$tableRows = [];\n\t\t\t$tableHeaders = [];\n\n\t\t\t$tableHeaders[] = Xml::element( 'span', [ 'style' => 'text-align: center;' ], $question, false );\n\n\t\t\t$tableRows[] = [ $alternative_1, $query_num_1 ];\n\t\t\t$tableRows[] = [ $alternative_2, $query_num_2 ];\n\t\t\tif ( $alternative_3 != \"\" ) {\n\t\t\t\t$tableRows[] = [ $alternative_3, $query_num_3 ];\n\t\t\t}\n\t\t\tif ( $alternative_4 != \"\" ) {\n\t\t\t\t$tableRows[] = [ $alternative_4, $query_num_4 ];\n\t\t\t}\n\t\t\tif ( $alternative_5 != \"\" ) {\n\t\t\t\t$tableRows[] = [ $alternative_5, $query_num_5 ];\n\t\t\t}\n\t\t\tif ( $alternative_6 != \"\" ) {\n\t\t\t\t$tableRows[] = [ $alternative_6, $query_num_6 ];\n\t\t\t}\n\n\t\t\tforeach ( $score_other as $name => $value ) {\n\t\t\t\t$tableRows[] = [ htmlentities( $name, ENT_QUOTES, 'UTF-8' ), htmlentities( $value['number'], ENT_QUOTES, 'UTF-8' ) ];\n\t\t\t}\n\n\t\t\t$output->addHtml( self::buildTable( $tableRows, [], $tableHeaders ) );\n\t\t\t$this->outputWikiText( '<small>' . wfMessage( 'poll-score-created', $creater )->text() . '</small>' );\n\t\t\t$output->addHtml( $linkRenderer->makeKnownLink( $this->getPageTitle(), wfMessage( 'poll-back' )->text(),\n\t\t\t\t\t[], [ 'action' => 'list' ] ) );\n\t\t}\n\t}", "title": "" }, { "docid": "30a1c9c0d41043e5b3b8686fcbf53c25", "score": "0.4771626", "text": "public function incrementScore() : game;", "title": "" }, { "docid": "07b214b843940d656ae56c156f0dd6bf", "score": "0.47669426", "text": "private function updatePlusCounter(){\n $counter = new RatingStatistic();\n $counter->entityType = $this->entityType;\n $counter->entityId = $this->entityId;\n $counter->type = 'count';\n $counter->valueType = self::VALUE_TYPE;\n $counter->tag = self::TAG;\n $result = $counter->find();\n if(count($result)===0){\n $counter->value = 1;\n $id = $counter->insert();\n $counter->id = $id;\n }\n else{\n $counter = $result[0];\n $counter->value++;\n $counter->timestamp = date('Y-m-d H:i:s');\n $counter->update();\n }\n $this->_counter = $counter;\n }", "title": "" }, { "docid": "df347ad93691119c9d408d200702d753", "score": "0.47645286", "text": "function user_get_stats($user_id) {\n $stats = ['num_sessions' => 0, 'fav_sport' => ['name' => '', 'icon' => ''], 'fav_trainer' => ['id' => 0, 'name' => '', 'picture' => asset('/images/default_profile.png'), 'primary_sport' => ['name' => '', 'icon' => '']]];\n //TEMPORARY\n $stats = ['num_sessions' => 37, 'fav_sport' => ['name' => 'Weights', 'icon' => 'fas fa-dumbbell'], 'fav_trainer' => ['id' => 19, 'name' => 'Blake Garrett', 'picture' => asset('/images/default_profile.png'), 'primary_sport' => ['name' => 'Cardio', 'icon' => '']]];\n return $stats;\n }", "title": "" }, { "docid": "f001aaa43dbf25ee6b5ecce039bf1a14", "score": "0.47588778", "text": "function updateCreatorScore(){\n\t\trequire('quizrooDB.php');\t// database connections\n\t\t\n\t\t// count all the points and update the member's creator score\n\t\t$queryCheck = sprintf(\"SELECT COUNT(quiz_score) AS score FROM q_quizzes WHERE fk_member_id = %s\", $this->id);\n\t\t$getCheck = mysql_query($queryCheck, $quizroo) or die(mysql_error());\n\t\t$row_getCheck = mysql_fetch_assoc($getCheck);\n\t\t$totalScore = $row_getCheck['score'];\n\t\tmysql_free_result($getCheck);\n\t\t$query = sprintf(\"UPDATE s_members SET quizcreator_score = %d WHERE member_id = %s)\", $totalScore, $this->id);\n\t\tmysql_query($query, $quizroo) or die(mysql_error());\n\t}", "title": "" }, { "docid": "2432d3286289d2847b07b403061aa5bb", "score": "0.4752063", "text": "public function testCreateNewScore()\n {\n $this->client->logInAsClient();\n $user = factory(User::class)->create();\n $user->addMembership($this->client->domain);\n $group = UserGroup::create(['name' => 'testGroup', 'permissions' => ['analytics' => ['score-create' => true]]]);\n DB::table('user_user_group')->insert(['user_id' => $user->id, 'user_group_id' => $group->id]);\n $this->be($user);\n\n $this->get('analytics/score/create')->assertSee('CityNexus | Create New Score');\n }", "title": "" }, { "docid": "be0b9df49255585eeb82f5371ebeb19a", "score": "0.47471142", "text": "function getUserScore($user_id)\n{\n\n return Score::where('user_id', $user_id)->sum('scores');\n}", "title": "" }, { "docid": "39d640cf924dbed217c37bc747feed92", "score": "0.4744603", "text": "public function getStats($nick)\n {\n $sth = $this->db->prepare('SELECT COUNT(*) FROM scores WHERE nick = ?');\n $sth->execute([$nick]);\n $total = $sth->fetchColumn();\n\n $sth = $this->db->prepare(\"SELECT COUNT(*) FROM scores WHERE nick = ? AND scored_at >= DATE('now')\");\n $sth->execute([$nick]);\n $today = $sth->fetchColumn();\n\n return new Stats($nick, $total, $today);\n }", "title": "" }, { "docid": "f8fe32c724322a7bfa5e26d0edeecb4b", "score": "0.47370803", "text": "function FindScoreWithId($id){\n global $bdd;\n $scores = array();\n $req = $bdd->query('SELECT * FROM leaderboard WHERE id=\"'.$id.'\"');\n while ($donnees = $req->fetch()) {\n $scores[] = array('startword' => $donnees['startword'], 'endword' => $donnees['endword'], 'clics' => $donnees['clics'], 'time' => $donnees['time'],'course'=> $donnees['course'], 'username' => $donnees['username'],'comment' => $donnees['comment'],'date' => $donnees['date']);\n }\n $req->closeCursor();\n return array_reverse($scores);\n}", "title": "" }, { "docid": "8f9abacaff5485e33efbb49cea3bef39", "score": "0.47322196", "text": "public function forumStats(){\t\tif(!$this->cache->get('core_forumStats',$this->config['whatsgoingon_cache'])){\r\n\t\t\t// Set todays date\r\n\t\t\t$lo = strtotime(\"-1 day\");\r\n\t\t\t// Get all users...\r\n\t\t\t$uq = \"SELECT time,uid FROM `user_session` WHERE time > '$lo' ORDER BY time DESC\";\r\n\t\t\t$uq = $this->DB->query($uq);\r\n\t\t\t// get template\r\n\t\t\t$template['path'] = core::getCurrentThemeLocation();\r\n\t\t\t$template['container_p'] = $template['path'].'container.html';\r\n\t\t\t$template['container'] = file_get_contents($template['container_p']);\r\n\t\t\t$template['container_p1'] = $template['path'].'core_whats_going_on.html';\r\n\t\t\t$template['container1'] = file_get_contents($template['container_p1']);\r\n\t\t\t// how many online?\r\n\t\t\t$online = $uq->num_rows;\r\n\t\t\t// users currentlyt active\r\n\t\t\twhile($ur = $uq->fetch_assoc()){\r\n\t\t\t\tif($num != 0){\r\n\t\t\t\t\t$c = ', ';\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$c = '';\r\n\t\t\t\t}\r\n\t\t\t\t$num ++;\r\n\t\t\t\t$gid = $ur['group'];\r\n\t\t\t\t// set username\r\n\t\t\t\t$username = core::getUsername($ur['uid']);\r\n\t\t\t\t// add\r\n\t\t\t\t$active .= $c.' <a title=\"Last active: '.date(\"j F Y, G:i\",$ur['time']).'\" style=\"text-decoration:none;\" href=\"'.core::generateUrl('index.php?profile='.$ur['uid'],'user',$ur['uid'],strip_tags($username),NULL).'\">'.$username.'</a>';\r\n\t\t\t}\r\n\t\t\tif($online == 0){\r\n\t\t\t\t$active = '<em>Nobody has been online today</em>';\r\n\t\t\t}\r\n\t\t\t// Now, we show some stats\r\n\t\t\t// Number of posts\r\n\t\t\t$pq = \"SELECT count(id) AS num_posts FROM `posts` WHERE deleted='0'\";\r\n\t\t\t$pq = $this->DB->query($pq);\r\n\t\t\t$pr = $pq->fetch_assoc();\r\n\t\t\t// Number of topics\r\n\t\t\t$tq = \"SELECT count(id) AS num_topics FROM `topics` WHERE deleted='0'\";\r\n\t\t\t$tq = $this->DB->query($tq);\r\n\t\t\t$tr = $tq->fetch_assoc();\r\n\t\t\t// Newest member\r\n\t\t\t$lq = \"SELECT id,username,`group` FROM `users` ORDER BY `id` DESC LIMIT 1\";\r\n\t\t\t$lq = $this->DB->query($lq);\r\n\t\t\t$lr = $lq->fetch_assoc();\r\n\t\t\t$gid = $lr['group'];\r\n\t\t\t// Number of members\r\n\t\t\t$mq = \"SELECT count(id) AS num_users FROM `users`\";\r\n\t\t\t$mq = $this->DB->query($mq);\r\n\t\t\t$mr = $mq->fetch_assoc();\r\n\t\t\t// Newset member\r\n\t\t\t$url = core::generateUrl('index.php?profile='.$lr['id'],'user',$lr['id'],$lr['username'],NULL);\r\n\t\t\t$user = core::getUsername($lr['id']);\r\n\t\t\t// replacements\r\n\t\t\t$content = $template['container1'];\r\n\t\t\t$content = str_replace('{online_users_count}',$online,$content);\r\n\t\t\t$content = str_replace('{currently_active}',$active,$content);\r\n\t\t\t$content = str_replace('{num_posts}',$pr['num_posts'],$content);\r\n\t\t\t$content = str_replace('{num_topics}',$tr['num_topics'],$content);\r\n\t\t\t$content = str_replace('{num_users}',$mr['num_users'],$content);\r\n\t\t\t$content = str_replace('{profile_url}',$url,$content);\r\n\t\t\t$content = str_replace('{newest_user}',$user,$content);\r\n\t\t\t// container\r\n\t\t\t$content = str_replace('{content}',$content,$template['container']);\r\n\t\t\t$content = str_replace('{header_title}','What&#39;s going on?',$content);\r\n\t\t\t// set the cache\r\n\t\t\t$this->cache->set('core_forumStats',$content);\r\n\t\t}else{\r\n\t\t\t$content = $this->cache->get('core_forumStats',$this->config['whatsgoingon_cache']) . '<!-- Loaded from cache -->';\r\n\t\t}\r\n\t\treturn $content;\r\n\t}", "title": "" }, { "docid": "df41556ff6195a5b7498dffb4b9502ce", "score": "0.4730078", "text": "static function stats(){\n $stats = [];\n $stats['all'] = Suivi::where('user_id', Auth::user()->id)->count();\n $stats['relaunch'] = Suivi::where([\n ['user_id', Auth::user()->id],\n ['relaunch', '=', null],\n ['first_date', '!=', null],\n ['status', '=', 'encours'],\n ['response', '=', 'off'],\n ])->orderBy('relaunch')->count();\n $stats['interview'] = Suivi::where('user_id', Auth::user()->id)->where([\n ['interview_date', '!=', null],\n ['interview_date', '>', date(\"Y-m-d\")]\n ])->orderBy('interview_date')->count();\n $stats['positive'] = Suivi::where([\n ['user_id', Auth::user()->id],\n ['status', '=', 'positif'],\n ])->count();\n $stats['negative'] = Suivi::where([\n ['user_id', Auth::user()->id],\n ['status', '=', 'negatif'],\n ])->count();\n $stats['encours'] = Suivi::where([\n ['user_id', Auth::user()->id],\n ['status', '=', 'encours'],\n ])->count();\n $stats['candidate'] = Suivi::where('user_id', Auth::user()->id)->whereNull('first_date')->count();\n\n return $stats;\n }", "title": "" }, { "docid": "82a9e4312e349e269bda397ef79a6cfc", "score": "0.47296494", "text": "function updatescores($con)\n{\n //Get data fields\n $data =$_POST[\"myform_data\"];\n $username = sec_log($_POST[\"myform_nick\"]);\n $type =$_POST[\"myform_type\"];\n\n //Put current high scores into array\n $SQL = \"SELECT * FROM high WHERE name = '\" . $type . \"'\";\n $result_id = @mysql_query($SQL) or die(\"DATABASE ERROR!\");\n $total = mysql_num_rows($result_id);\n $datas = @mysql_fetch_array($result_id);\n\n //Make arrays for dealing with stuff\n $topscore = array(\"score1\", \"score2\", \"score3\", \"score4\", \"score5\", \"score6\", \"score7\", \"score8\", \"score9\", \"score10\");\n $topname = array(\"name1\", \"name2\", \"name3\", \"name4\", \"name5\", \"name6\", \"name7\", \"name8\", \"name9\", \"name10\");\n $tops = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n $topn = array(\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\");\n\n\n //Fill the tops and topn array with the current high scores\n for ($x=0; $x < 10; $x++) {\n $tops[$x] = $datas[$topscore[$x]];\n $topn[$x] = $datas[$topname[$x]];\n }\n\n\n //Put the users score in the right place\n for ($x=0; $x < 10; $x++) { // For 1 through 10\n if($data > $tops[$x]){ // If the user's score is greater than a score at point x\n for ($y=9; $y > x; $y--) { // For all scores at a place lower then point x\n $tops[$y+1] = $tops[$y]; // score x+1 = score x (score x is moved down)\n $topn[$y+1] = $topn[$y]; // Move the name to match the score\n }\n $tops[$x] = $data; // Put the player's score at the x point\n $topn[$x] = $username; // Put the player's name at the x point\n break;\n }\n }\n\n //Track Success\n $success = true;\n\n\n //Update all of the stuff\n for ($x=0; $x < 10; $x++)\n {\n $SQL = \"UPDATE `high` SET \" . $topscore[$x] . \" = '\" . $tops[$x] . \"'WHERE name = '\" . $type . \"'\";\n if (!mysql_query($SQL, $con)){echo \"This Error: \" . $SQL . $con->error; $success = false;}\n\n $SQL = \"UPDATE `high` SET \" . $topname[$x] . \" = '\" . $topn[$x] . \"'WHERE name = '\" . $type . \"'\";\n if (!mysql_query($SQL, $con)){echo \"This Error: \" . $SQL . $con->error; $success = false;}\n }\n\n //Report success\n if($success) echo \"success\";\n\n}", "title": "" }, { "docid": "71def53c13b137e343813c0cea1c734d", "score": "0.47232872", "text": "public function createStats($sId)\n {\n $prepared = mysqli_prepare($this->dbConn, \"INSERT INTO stats VALUES(NULL, ?, ?)\");\n $prepared->bind_param('ss', $sId , date('Y-m-d h:i:s'));\n $prepared->execute();\n }", "title": "" }, { "docid": "a9629df803276b84fd681cf3deeee430", "score": "0.47154808", "text": "function matchSetScore($admlogin, $playerlogin, $score){\n\tglobal $_debug,$_match_scores,$_match_conf,$_match_map;\n\t\n\tif($_match_map < 1 || !isset($_match_scores[$playerlogin]) || $score < 0 || $score < $_match_scores[$playerlogin]['ScoreBonus'])\n\t\treturn;\n\n\t// set score\n\tconsole(\"matchSetScore: set score to {$playerlogin} ({$score})\");\n\t$_match_scores[$playerlogin]['Score'] = $score;\n\t$scores = array(array('PlayerId'=>$_match_scores[$playerlogin]['PlayerId'],\n\t\t\t\t\t\t\t\t\t\t\t\t'Score'=>$_match_scores[$playerlogin]['Score']));\n\taddCall($admlogin,'ForceScores',$scores,true);\n\tdebugPrint(\"matchSetScore::scores\",$scores);\n\t\n\t// sort scores list\n\tmatchSortMatchScores();\n\t\n\t$nick = $_match_scores[$playerlogin]['NickDraw2'];\n\t$msg = localeText(null,'server_message').localeText(null,'interact').\" \\$o\\$88fScore for {$nick} : {$score}\";\n\t// send message in offical chat\n\taddCall(null,'ChatSendServerMessage', $msg);\n\n\t//debugPrint(\"matchSetScore - _match_scores\",$_match_scores);\n}", "title": "" }, { "docid": "b365fe4d07e44195dc6fe0a334ccc1f9", "score": "0.47115988", "text": "function drush_ting_smart_search_score_importer() {\r\n\r\n $file = drush_get_option('file');\r\n //dpm($file);\r\n if (!empty($file) && file_exists($file)) {\r\n $csv_data = array_map(function($v){return str_getcsv($v, \",\", \"\\t\");}, file($file));\r\n // loop through array and skip 0 lines\r\n for ($i = 0; $i < 80000/*count($csv_data)*/;$i++) {\r\n $title = str_replace(' and ', ' ', $csv_data[$i][0]);\r\n $title = str_replace('(', '', $title);\r\n $title = str_replace(')', '', $title);\r\n $score = ($csv_data[$i][1] == '-') ? 0 : $csv_data[$i][1];\r\n\r\n\r\n // fail if key fields are not present\r\n if (empty($title)) {\r\n drupal_set_message('Key fields are missing from array '.$i.'. Check the file and try again');\r\n } else {\r\n\r\n drupal_set_message($title.' - '.$score);\r\n // find the matching entity and assign the stats\r\n $ssquery = new EntityFieldQuery();\r\n\r\n $ssquery->entityCondition('entity_type', 'ting_type')\r\n ->entityCondition('bundle', 'smart_search_string')\r\n ->propertyCondition('title', $title, '=');\r\n\r\n $result = $ssquery->execute();\r\n\r\n if (isset($result['ting_type'])) {\r\n $string_items_nids = array_keys($result['ting_type']);\r\n $string_item = entity_metadata_wrapper('ting_type', $string_items_nids[0]);\r\n $string_item->field_sss_hits_score->set($score);\r\n // save\r\n $string_item->save();\r\n drupal_set_message('Title: '.$title.' has been updated with: '.$score);\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n } else {\r\n return 'No file given to import or file does not exist';\r\n }\r\n }", "title": "" }, { "docid": "2461ad459ae67079f5a1b754c1cf928f", "score": "0.47112608", "text": "public function testUpdateScore()\n {\n\n $rank[1] = array('matchsWon' => 0, 'setsWon' => 0, 'setsLost' => 0, 'gamesWon' => 0, 'gamesLost' => 0, 'points' => 0);\n $rank[2] = array('matchsWon' => 0, 'setsWon' => 0, 'setsLost' => 0, 'gamesWon' => 0, 'gamesLost' => 0, 'points' => 0);\n\n $rankResult[1] = array('matchsWon' => 2, 'setsWon' => 5, 'setsLost' => 3, 'gamesWon' => 35, 'gamesLost' => 38, 'points' => 6);\n $rankResult[2] = array('matchsWon' => 1, 'setsWon' => 3, 'setsLost' => 5, 'gamesWon' => 38, 'gamesLost' => 35, 'points' => 3);\n\n $gameService = new GameService();\n $gameService->setManager($this->em);\n $rank = $gameService->updateScore(\"6/3 2/6 7/5\", $rank, 1, 2);\n $rank = $gameService->updateScore(\"6/4 7/5\", $rank, 1, 2);\n $rank = $gameService->updateScore(\"0/6 6/3 1/6\", $rank, 1, 2);\n $this->assertEquals($rank, $rankResult);\n }", "title": "" }, { "docid": "fad457f3db1b75b587ba37ce017ff6df", "score": "0.47104293", "text": "function get_category_accu_level($category_id, $stat_month)\n{\n\tif($category_id == \"\" ) return null;\n\t$sql = \" select sum(a.count) cnt, a.count_label \n\t\t from score_stat_accu a, product b \n where a.product_id = b.id and b.category_id = '\".$category_id.\"' \";\n\tif($stat_month != \"\") $sql = $sql . \" and a.stat_month='\".$stat_month.\"' \";\n\t$sql = $sql . \" group by a.count_label order by a.count_label\";\n\ttlog($sql);\n\t$result = query($sql);\n\n $ar = array();\n if(mysqli_num_rows($result)>0)\n while($row=mysqli_fetch_object($result))\n {\n $obj = array(\n 'count' => $row->cnt,\n 'score_level' => $row->count_label,\n );\n array_push($ar,$obj);\n\n }\n return $ar;\n\n\n\n\n\t\n}", "title": "" }, { "docid": "f7654662b0890275d1e87e5958dde69c", "score": "0.47021967", "text": "function view_points($uid)\n{\n \n db_connect();\n \n $result = mysql_query(\"SELECT * FROM user_survey WHERE uid=$uid ;\");\n \n $ps = 0;\n while ($r = mysql_fetch_array($result)) {\n $ps = $ps + $r[\"points\"];\n \n }\n \n return $ps;\n \n}", "title": "" }, { "docid": "f10f3ca7272435c43a75687fd737618f", "score": "0.46975482", "text": "public function actionStats(string $id) {\n $group = $this->groups->findOrThrow($id);\n\n if (!$this->groupAcl->canViewStats($group)) {\n $user = $this->getCurrentUser();\n $stats = $this->groupViewFactory->getStudentsStats($group, $user);\n $this->sendSuccessResponse([$stats]);\n } else {\n $this->sendSuccessResponse($this->groupViewFactory->getAllStudentsStats($group));\n }\n }", "title": "" }, { "docid": "e0465bc6ef0f7a0cb23c3bcde7f10522", "score": "0.46950585", "text": "public function getStats()\n {\n return $this->getFieldValue('stats');\n }", "title": "" } ]
ccbac23fe5060d65630b19e5693a41e9
Get the validation rules that apply to the request.
[ { "docid": "afb00f9dadfadbf344c74e4e98365963", "score": "0.0", "text": "public function rules()\n {\n return [\n 'id' => [ 'nullable','exists:store_coupons,id'],\n 'store_coupon_id' => [ 'nullable','exists:store_coupons,id'],\n 'store_id' => [ 'required','exists:stores,id,deleted_at,NULL'],\n 'title' => [ 'required' ],\n 'amount' => [ 'required' ,'numeric' ],\n 'offer_valid' => [ 'nullable','date' ],\n ];\n }", "title": "" } ]
[ { "docid": "93d9e84737b3cd1c4ac4807afd42609f", "score": "0.85588574", "text": "public function rules()\n {\n\n $rules = $this->requestRules;\n\n return $rules;\n\n }", "title": "" }, { "docid": "5299910a0ea84ec4e7c05f90e78a8a21", "score": "0.8149077", "text": "public function rules()\n\t{\n\t\t//dd($this->request);//->get('key'));\n\n\t\t// http://laravel.com/docs/5.0/validation#available-validation-rules\n\t\t$rules = array(\n\t\t\t'name' => 'required',\n\t\t\t'email' => 'required|email'\n\t\t);\n\n\t\t//rules done\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "8471abd4d4d51c54ba74e3101f64df6f", "score": "0.8118398", "text": "public function getValidationRules()\n {\n return $this->validationRules;\n }", "title": "" }, { "docid": "8471abd4d4d51c54ba74e3101f64df6f", "score": "0.8118398", "text": "public function getValidationRules()\n {\n return $this->validationRules;\n }", "title": "" }, { "docid": "f3c76174c5a69ad644c99824df4f1003", "score": "0.8073928", "text": "public function getValidationRules();", "title": "" }, { "docid": "18c36eaf26480ae97537e30df90d11d8", "score": "0.80722016", "text": "public function getValidationRules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "18c36eaf26480ae97537e30df90d11d8", "score": "0.80722016", "text": "public function getValidationRules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "18c36eaf26480ae97537e30df90d11d8", "score": "0.80722016", "text": "public function getValidationRules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "97dad3e93f1181b706c4c37e6bc508fb", "score": "0.8062524", "text": "public static function getValidationRules()\n {\n return self::$rules;\n }", "title": "" }, { "docid": "97dad3e93f1181b706c4c37e6bc508fb", "score": "0.8062524", "text": "public static function getValidationRules()\n {\n return self::$rules;\n }", "title": "" }, { "docid": "0ef03e157defd3c2e4bc747a47bd2718", "score": "0.80254227", "text": "public function validationRules(): array\n {\n /** @var \\Illuminate\\Routing\\Route $route */\n $route = $this->getRequest()->route();\n $actionMethod = $route->getActionMethod();\n\n return $this->getRules()->getValidationRulesForAction($actionMethod);\n }", "title": "" }, { "docid": "2bfd956e06290167753b99914da7d7bb", "score": "0.7955172", "text": "public function rules()\n {\n $rules = VALIDATION_RULES;\n return $rules;\n }", "title": "" }, { "docid": "674f48033c4da89ffa7685260cca729a", "score": "0.7926811", "text": "public function rules()\n {\n return $this->validationRules;\n }", "title": "" }, { "docid": "f00b1f0a6c418ccda47a385de1950fb2", "score": "0.7884104", "text": "public function rules()\n {\n $rules = [];\n switch($this->getMethod()):\n case \"POST\":\n $rules = [\n 'name' => 'required|string|max:60',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'name' => 'required|string|max:60'\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "title": "" }, { "docid": "8d8857dab7be8bc07cf70e89a1a87a8c", "score": "0.78363377", "text": "public function fetchRequestRules()\n {\n if (($this->request->all())) {\n return array_intersect_key($this->rules, $this->request->all());\n }\n\n return;\n }", "title": "" }, { "docid": "1649aa3e6720b274be6030033e5150c2", "score": "0.7835016", "text": "public function rules()\n {\n $rules = [\n 'title' => 'required',\n 'project' => 'required'\n ];\n\n // If you need to change rules based on routes or something, do like this:\n if (FeatureRequest::isMethod('patch'))\n {\n $rules = null;\n $rules = [];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "3b30cc57b2847892d0b83e77c10f691f", "score": "0.7823726", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'type' => 'required',\n 'name' => 'required',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required',\n ];\n }\n }", "title": "" }, { "docid": "103b23750f11156a94979181418cda2a", "score": "0.78182065", "text": "public function validationRules() : array {\n return $this->validationRules;\n }", "title": "" }, { "docid": "12bf32cdf79f678c176e49b3aa796bd7", "score": "0.78123534", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required'\n ];\n if(null == $this->request->get('label')) {\n $rules['items'] = 'required';\n }\n if(null == $this->request->get('formula')) {\n $rules['formulas'] = 'required';\n }\n return $rules;\n }", "title": "" }, { "docid": "fd9ec9ae4cad3bf36420cca15b933256", "score": "0.7809099", "text": "public function rules()\n {\n $rules = [];\n\n switch ($this->method()) {\n case 'GET':\n break;\n case 'DELETE':\n break;\n case 'POST':\n $rules = [\n 'user_id' => 'bail|integer|required',\n 'title' => 'bail|string|required|min:3|max:50',\n 'description' => 'bail|string|required|min:10|max:250',\n 'estimation' => 'bail|date|required',\n ];\n break;\n case 'PUT':\n $rules = [\n 'title' => 'bail|string|nullable|min:3|max:50',\n 'description' => 'bail|string|nullable|min:10|max:250',\n 'estimation' => 'bail|date|nullable',\n ];\n break;\n }\n return $rules;\n }", "title": "" }, { "docid": "6143c798cc2310e49ce20c0c8f0f0e69", "score": "0.7803923", "text": "protected function getValidationRules()\n {\n $rules = [\n 'username' => 'required|min:3|max:255'\n ];\n\n if (\\Request::isMethod('put') || \\Request::isMethod('patch')) {\n $user_id = Route::current()->parameter('user');\n\n $rules['email'] = [\n 'required',\n 'unique:users,email,' . $user_id,\n 'email'\n ];\n } else {\n $rules['email'] = [\n 'required',\n 'unique:users',\n 'email'\n ];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "e8eb155c31aba6afb2d444e7b1758894", "score": "0.7791027", "text": "public function getValidationRules()\n {\n return [];\n }", "title": "" }, { "docid": "94806e5583bb2e9e8e0d65448c281583", "score": "0.7760143", "text": "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Name' => array(\n\t\t\t\t'string' => array(),\n\t\t\t),\n\t\t\t'_Path' => array(\n\t\t\t\t'string' => array(),\n\t\t\t),\n\t\t\t'_Date' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UniqID' => array(\n\t\t\t\t'string' => array(),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "a52d8f66be5fa8dcfc8fc2e8cfdef9e6", "score": "0.7756176", "text": "public function rules()\n {\n return RequestServices::$rules;\n }", "title": "" }, { "docid": "c83803ed32ea811246b0af0058438730", "score": "0.7719659", "text": "protected function getValidationRules() {\n return [\n 'brand' => 'required|max:255',\n 'model' => 'required|max:255',\n 'color' => 'required|max:50',\n 'size' => 'required|numeric|between:0,99.9',\n 'price' => 'required|numeric|between:0,999.99'\n ];\n }", "title": "" }, { "docid": "1f166073e0db5669da41ab2f4dc82281", "score": "0.7686504", "text": "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'update':\n return [\n 'name' => 'required|max:16',\n 'sex' => 'required|between:1,2',\n 'tel' => 'required|max:16',\n 'address' => 'required|max:255',\n ];\n default:\n return [];\n }\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683318", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683318", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683318", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683318", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "71898638a902cf7e7072d9266e47f3df", "score": "0.76828766", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "ccfd103bfeec1b283476d90bdc2459a8", "score": "0.7674634", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'course_id.*' => 'required',\n 'c_hour.*' => 'required',\n 'c_price.*' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'course_id.*' => 'required',\n 'c_hour.*' => 'required',\n 'c_price.*' => 'required',\n ];\n }\n }", "title": "" }, { "docid": "5c3d39017722119bdd102b492fb0c395", "score": "0.76726216", "text": "public function rules()\n {\n $rules = [];\n $rules['full_name'] = ['required', 'min:3', 'max:100', new ValidateFullName, new SpamFree,];\n $rules['email'] = ['required', 'email', 'max:255', Rule::unique('users'),];\n $rules['mobile_number'] = ['required', new ValidateMobileNumber, Rule::unique('users'),];\n $rules['role_id'] = ['required', Rule::exists('roles', 'id'),];\n $rules['group_id'] = ['required', Rule::exists('user_groups', 'id'),];\n\n if ($this->getMethod() == 'PUT') {\n $userId = $this->route('user')->id;\n $rules['email'] = ['required', 'email', 'max:255', Rule::unique('users')->ignore($userId),];\n $rules['mobile_number'] = ['required', new ValidateMobileNumber, Rule::unique('users')->ignore($userId),];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "fb28210093cda58dbe54a74fa833bde9", "score": "0.7665956", "text": "public function rules()\n {\n $rules['cn_name'] = 'required';\n $rules['en_name'] = 'required';\n // 添加权限(针对更新)\n if (request()->isMethod('PUT') || request()->isMethod('PATH')) {\n // 修改时 request()->method() 方法返回的是 PUT或PATCH\n $rules['id'] = 'numeric|required';\n }\n return $rules;\n }", "title": "" }, { "docid": "58fe2d9144ef3efd8ea1e63261d4154a", "score": "0.7662625", "text": "protected function rules() {\n\t\treturn $this->rules;\n\t}", "title": "" }, { "docid": "2ae12335c8b8027a6e3f4d98bd789013", "score": "0.7656521", "text": "public function rules()\n {\n $rules = [];\n\n if (Input::has('email')) {\n $rules = [\n 'email' => 'required|email',\n ];\n } elseif (Input::has('password_reset_token')) {\n $rules = [\n 'new_password' => 'required',\n 'confirm_password' => 'required|same:new_password',\n 'password_reset_token' => 'required',\n ];\n } else {\n $rules = [\n 'old_password' => 'required',\n 'new_password' => 'required',\n 'confirm_password' => 'required|same:new_password'\n ];\n }\n return $rules;\n }", "title": "" }, { "docid": "957bfc34394c39051fb2a8c24b5a5cff", "score": "0.76514685", "text": "public function rules()\n {\n $rules = [\n ];\n\n switch (request()->method()) {\n case \"POST\":\n $rules = [\n 'open' => 'required',\n 'domain' => 'required|domain_not_exists',\n 'setting_id' => 'required|message_setting',\n 'description' => 'string',\n ];\n break;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "9e817d27f8c6952d4ae7189c5a4edc45", "score": "0.764881", "text": "public function rules()\n {\n $rules = Request::$rules;\n $userId = \\Auth::user()->id;\n $rules['project_id'] = 'nullable|in:' . implode(',', Project::pluck('id')->all());\n $rules['device_id'] = 'required|in:' . implode(',', Device::where('status', STATUS_DEVICES_AVAIABLE)->pluck('id')->all());\n $rules['start_time'] = 'required|date_format:Y-m-d|after_or_equal:today';\n $rules['end_time'] = 'required|date_format:Y-m-d|after_or_equal:start_time|max_date_request:start_time,' . MAX_REQUEST_DATE;\n $rules['note'] = 'max:255';\n\n return $rules;\n }", "title": "" }, { "docid": "1941f45dd4463378f6ca96c52004a6ad", "score": "0.7646411", "text": "public function rules()\n {\n $rules = [];\n\n $rules['first_name'] = 'required';\n $rules['last_name'] = 'required';\n $rules['email'] = 'required|email|unique_email';\n $rules['password'] = 'required|min:6';\n $rules['confirm_password'] = 'required|min:6|same:password';\n $rules['secondary_contact'] = 'email|unique_email';\n\n $rules = array_merge($rules, $this->getRulesForUsers($this->get('user')));\n\n return $rules;\n }", "title": "" }, { "docid": "5aa6c4a27f8d73f6cbb41edcc10d6b66", "score": "0.76398474", "text": "public function rules()\n {\n switch ($this->method())\n {\n case 'GET':\n case 'DELETE':\n case 'POST':\n {\n return [\n 'name' => ['required', 'string'],\n 'link_url' => ['required', 'string'],\n ];\n }\n case 'PUT':\n case 'PATCH':\n {\n return [\n 'name' => ['required', 'string'],\n 'link_url' => ['required', 'string'],\n ];\n }\n default:break;\n }\n }", "title": "" }, { "docid": "bdb23e8ac6193df38599ed46b48fa78b", "score": "0.7631662", "text": "public function rules()\n {\n $routeName = $this->route()->getName();\n switch ($routeName) {\n case \"api.member-manage.book-bed.store\":\n $rule = [\n \"bed_number\" => \"required\",\n \"bed_cost\" => \"required|numeric\",\n \"check-in_date\" => \"required|integer\",\n \"contract_number\" => \"required\",\n \"appoint_person\" => \"required\",\n \"name\" => \"required\",\n \"gender\" => \"required\",\n \"self-care_ability\" => \"required\",\n \"remark\" => \"required\",\n \"account_id\" => \"required\"\n ];\n break;\n case \"\":\n $rule = [];\n break;\n default:\n $rule = [];\n };\n\n return $rule;\n }", "title": "" }, { "docid": "364323ebc5b80b21dae573b4b1e79e62", "score": "0.76311845", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n {\n return [\n 'title' => 'required',\n 'content_check' => 'required',\n ];\n }\n case 'PUT':\n case 'PATCH':\n {\n return [\n 'title' => 'required',\n 'content_check' => 'required',\n ];\n }\n default:break;\n }\n }", "title": "" }, { "docid": "8a874d1323aa2164791cbd3e839d5b7f", "score": "0.76133573", "text": "public function rules()\n {\n\n $rules = [];\n\n $rules = array_merge($rules, [\n 'email' => 'required',\n 'amount' => 'required'\n ]);\n\n return $rules;\n }", "title": "" }, { "docid": "01b16e37e6e8ac4de56cc6e529af3389", "score": "0.76125926", "text": "private function getValidationRules()\n {\n return [\n 'region_id' => 'required',\n 'city_id' => 'required',\n 'mark_id' => 'required',\n 'model_id' => 'required',\n 'date_release_id' => 'required|integer|between:1930,' . Carbon::now()->format('Y'),\n 'run' => 'required|integer|between:0,1000000',\n 'state_id' => 'required',\n 'gear_id' => 'required',\n 'color_id' => 'required',\n 'rudder_id' => 'required',\n 'engine_id' => 'required',\n 'kpp_id' => 'required',\n 'vin' => 'size:17',\n 'power' => 'integer',\n 'image' => 'image|between:0,5120'\n ];\n }", "title": "" }, { "docid": "93e646523497ecb4bfc4464e06b8f134", "score": "0.7586315", "text": "public function rules()\n {\n $all_rules = [\n 'email' => [\n 'required',\n 'email',\n 'max:255',\n Rule::uniqueCaseInsensitive($this->repository->getModelTable())\n ->where(static function ($query) {\n $query->whereNull('deleted_at');\n }),\n ],\n 'name' => 'required|string|max:255',\n 'password' => 'required|confirmed|string|min:6|max:255',\n ];\n\n if (Config::get('mmcms.recaptcha.mode') === true) {\n $all_rules['g_recaptcha_response'] = 'bail|required|captcha';\n }\n\n return $all_rules;\n }", "title": "" }, { "docid": "9d7f3ea8198b7432e6a2634796259050", "score": "0.7584067", "text": "public function rules()\n {\n $rules = [];\n switch($this->method())\n {\n case 'POST':\n {\n $rules = [\n 'title' => 'required|max:100|min:1|string',\n 'subtitle' => 'required|max:100|min:1|string',\n 'body' => 'required|min:10|string',\n ];\n }\n break;\n case 'PATCH':\n {\n $rules = [\n 'title' => 'required|max:100|min:1|string',\n 'subtitle' => 'required|max:100|min:1|string',\n 'body' => 'required|min:10|string',\n ];\n }\n break;\n default:\n break;\n }\n return $rules;\n\n }", "title": "" }, { "docid": "bcd6a9b0f44e8b449a2326cc2213d321", "score": "0.75795704", "text": "public function rules()\n {\n switch ($this->method()) {\n\n case 'POST':\n {\n $rules = [];\n\n $rules['goal.name'] = 'required|max:191';\n $rules['goal.provider_id'] = 'required|max:20';\n $rules['goal.participant_id'] = 'required|max:20';\n\n foreach (goalScale() as $key => $value) {\n $rules[\"goal.scale.$key\"] = 'required|max:10000';\n }\n\n return $rules;\n }\n case 'PUT':\n {\n $rules = [];\n\n $rules['goal.activity_ranking'] = 'required|max:20';\n $rules['goal.update_text'] = 'required|max:10000';\n return $rules;\n }\n default:break;\n }\n }", "title": "" }, { "docid": "860c7be98c9085e60e8ecc2542666475", "score": "0.7579284", "text": "public function rules()\n {\n if ($this->method == \"GET\") {\n return [];\n } // Return no rules for forum view request\n\n return [\n 'name' => 'required',\n ];\n }", "title": "" }, { "docid": "8583102ef574eace09421150ce4b5abd", "score": "0.75772125", "text": "public function rules()\n {\n if ($this->isMethod('POST')) {\n return $this->createRules();\n } else {\n return $this->updateRules();\n }\n }", "title": "" }, { "docid": "bedcc084a74ac0a5cb46c07a43f5c8eb", "score": "0.7547975", "text": "public function rules()\n {\n $rules = array(\n // email\n array('email', 'required'),\n\n // password\n array('password', 'required'),\n array('password', 'authenticate', 'skipOnError' => true),\n\n // remember_me\n array('remember_me', 'boolean'),\n );\n // recaptcha\n if (Setting::item('recaptcha')) {\n $rules[] = array('recaptcha', 'validators.ReCaptchaValidator', 'privateKey' => Setting::item('recaptchaPrivate'), 'on' => 'recaptcha');\n }\n return $rules;\n }", "title": "" }, { "docid": "d8515ee4f0086a7f5fa40a4134ed6d8e", "score": "0.75431406", "text": "public function getValidationRules()\n\t{\n\t\treturn array(\n\t\t\t'answer' => 'required'\n\t\t);\n\t}", "title": "" }, { "docid": "626c210b1b7ef7bbd2b2c62961952863", "score": "0.75395185", "text": "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->createRules();\n }\n else if ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "title": "" }, { "docid": "9c6b2d848932554c98559c0bd435f9b6", "score": "0.7535956", "text": "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'name' => 'required|between:2,50|unique:form',\n 'table' => [\n 'required',\n 'regex:/^[a-zA-Z]\\w{1,20}$/',\n 'unique:form'\n ],\n 'sequence' => 'required|integer',\n 'sort' => [\n 'required',\n 'regex:/^[\\s\\w,]{0,20}$/'\n ],\n 'display' => 'required|in:0,1'\n ];\n if ($this->post('display', 1)) {\n $rules['return_type'] = 'required|in:0,1';\n $rules['return_msg'] = 'required';\n $rules['page'] = 'required|integer';\n $rules['is_captcha'] = 'required|in:0,1';\n }\n }\n return $rules;\n }", "title": "" }, { "docid": "c8e52a061c07d25eea9f07fe143dccaf", "score": "0.7527647", "text": "public function rules()\n {\n $global = GlobalSetting::first();\n $rules = [\n 'name' => 'required',\n 'email' => 'required|email',\n 'message' => 'required',\n ];\n if ($global->google_recaptcha_status && $global->google_captcha_version == 'v2') {\n $rules['g-recaptcha-response'] = 'required';\n }\n return $rules;\n }", "title": "" }, { "docid": "e1c552be92c9162d240c9c19bd71229c", "score": "0.7511551", "text": "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'code' => 'required|string',\n\t\t\t\t\t\t'name' => 'required|string',\n\t\t\t\t\t\t'alpha2' => 'required|string|max:2|min:2',\n\t\t\t\t\t\t'alpha3' => 'required|string|max:3|min:3',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'code' => 'required|string',\n\t\t\t\t\t\t'name' => 'required|string',\n\t\t\t\t\t\t'alpha2' => 'required|string|max:2|min:2',\n\t\t\t\t\t\t'alpha3' => 'required|string|max:3|min:3',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "title": "" }, { "docid": "d1a8c6d5056e2ee9e69213bbab2d3049", "score": "0.75009704", "text": "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'email_phone' => 'required|string',\n 'message' => 'required|string',\n ];\n }", "title": "" }, { "docid": "a40be6a448537c4b65d0efc764ec514c", "score": "0.7488007", "text": "public function rules()\n {\n switch($this->method()){\n // case 'GET':\n // return $this->__getRules();\n case 'POST':\n return [\n // 'name' =>'required|string|unique:segments',\n 'first_name' =>'required|string',\n 'last_name' =>'required|array|min:1',\n 'email' =>['required','string','email','unique:subscriptions,email'],\n 'birth_day' =>'sometimes|date'\n ];\n case 'PUT':\n return [\n 'first_name' =>'sometime|string',\n 'last_name' =>'sometime|string',\n // 'email' =>['required','string','email','unique:subscriptions,email'],\n 'birth_day' =>'sometimes|date'\n ];\n // case 'DELETE':\n // return $this->__deleteRules();\n default :\n break;\n }\n }", "title": "" }, { "docid": "105392be9ade0b65b65400638edef963", "score": "0.7464613", "text": "public function rules()\n {\n\n $rules = [];\n\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [];\n break;\n }\n case 'POST':\n {\n $rules = [\n 'url' => '',\n 'username' => '',\n 'password' => '',\n ];\n\n break;\n }\n case 'PUT':\n case 'PATCH':\n {\n $rules = [\n 'url' => '',\n 'username' => '',\n 'password' => '',\n ];\n break;\n }\n default:\n break;\n }\n\n return $rules;\n\n }", "title": "" }, { "docid": "5533516a16af9ad668a00262ce740b12", "score": "0.7456235", "text": "public function rules()\n {\n $routeName = $this->route()->getName();\n switch ($routeName) {\n case \"api.department-manage.store\":\n $rule = [\n \"department_name\" => \"required\",\n \"department_description\" => \"required\",\n ];\n break;\n case \"\":\n $rule = [];\n break;\n };\n\n return $rule;\n }", "title": "" }, { "docid": "e7040bebf01edd39ff865327d8b0cdf4", "score": "0.74506754", "text": "public function rules()\n {\n if ($this->method()==\"POST\")\n {\n $rules = [\n 'name'=>'required',\n 'password'=>'required|confirmed',\n 'email'=>'required|email|unique:users,email',\n ];\n }\n elseif($this->method()==\"PUT\")\n {\n $rules = [\n 'name'=>'required',\n 'password'=>'confirmed',\n 'email'=>'required|email',\n ];\n }\n return $rules;\n }", "title": "" }, { "docid": "bbe840801d68277f834aa070ebc2f6dc", "score": "0.7448826", "text": "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "title": "" }, { "docid": "a2c967ae660a85b73882f9f0052f47b2", "score": "0.74482524", "text": "public function rules()\n {\n return array_merge(\n parent::rules(),\n [\n ['conversationId', 'required'],\n ['desk', 'validateDesk'],\n ['client', 'validateClient'],\n ['desk', 'required'],\n ['client', 'required'],\n ['lastChatTime', 'default', 'value' => new MongoDate()],\n ]\n );\n }", "title": "" }, { "docid": "9d0ba3dd7595c16ab0b39e9870b05b0f", "score": "0.74480903", "text": "public function rules()\n {\n $rules = $this->rules;\n $rules['location'] = 'required|integer';\n $rules['area'] = 'required|min:2';\n $rules['direction'] = 'required|min:2';\n $rules['from_city'] = 'required|min:2';\n $rules['to_city'] = 'required|min:2';\n $rules['lat'] = 'required';\n $rules['lng'] = 'required';\n $rules['zone'] = 'required|min:2';\n $rules['authority'] = 'required|min:2';\n return $rules;\n }", "title": "" }, { "docid": "c2ad7f5cc1df80947cc586deac555598", "score": "0.7447268", "text": "public function rules()\n {\n if ($this->method() == 'POST' || $this->method() == 'PUT') {\n return [\n 'title' => 'required|string|max:125',\n 'is_active' => 'required|in:0,1',\n 'public_comment' => 'required|in:0,1',\n 'reply' => 'required|in:0,1',\n 'reply_all' => 'required|in:0,1',\n ];\n } else {\n return [\n\n ];\n }\n }", "title": "" }, { "docid": "22c44c2fa33dc767165e72cea944f97b", "score": "0.7446372", "text": "public function rules()\n {\n return self::$rules;\n }", "title": "" }, { "docid": "a9a51f17f74ca0409f11692d3a1bf6c7", "score": "0.74420166", "text": "public function rules()\n {\n if ($this->isUpdate())\n {\n //\n }\n\n return $this->rules;\n }", "title": "" }, { "docid": "21a6325d6bd8e9c2c29523699833ec9b", "score": "0.7440046", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n return [\n 'status' => 'boolean',\n ];\n break;\n case 'POST':\n return [\n 'user_name' => 'required|string',\n 'operation' => 'required|string',\n 'description' => 'required|string',\n 'status' => 'boolean',\n ];\n break;\n }\n }", "title": "" }, { "docid": "707190d7d3fba8e0fe2269251ec72ed8", "score": "0.7429881", "text": "public function rules()\n {\n switch ($this->method()) {\n case \"GET\":\n return [];\n case \"POST\":\n return [];\n default:\n return [];\n }\n }", "title": "" }, { "docid": "0360cc9a8e895ee5953ea003b352be0e", "score": "0.74223983", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST': {\n return $this->IdOnlyRules();\n }\n\n case 'DELETE': {\n return $this->IdOnlyRules();\n }\n\n case 'PATCH': {\n return $this->patchRules();\n }\n\n default:\n break;\n }\n }", "title": "" }, { "docid": "9763e5d83664ffb8b8fcf0c1e73311d9", "score": "0.74207485", "text": "public function rules()\n {\n if ($this->acacha_forms_disable_validation) return [];\n if ($this->acacha_forms_disable_strict_validation) return $this->rules;\n return $this->strictRules;\n }", "title": "" }, { "docid": "d75a6b264391f70313a8b6cee55e75de", "score": "0.7420232", "text": "public function getValidationRules()\n {\n $schema = $this->entityManager->getClassMetadata(get_class($this->entity))->fieldMappings;\n\n $this->parser->setData($schema);\n $this->parser->setIgnore(array('id'));\n\n $rules = $this->parser->parse();\n\n return $rules;\n }", "title": "" }, { "docid": "dbf296a147f2c144e6ed3f90148078d2", "score": "0.7417991", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'channels' => 'required|array|min:1',\n 'customer_groups' => 'required|array|min:1',\n 'starts_from' => 'nullable|date',\n 'ends_till' => 'nullable|date|after_or_equal:starts_from',\n 'action_type' => 'required',\n 'discount_amount' => 'required|numeric',\n ];\n\n if (request()->has('action_type') && request()->action_type == 'by_percent') {\n $rules = array_merge($rules, [\n 'discount_amount' => 'required|numeric|min:0|max:100',\n ]);\n }\n\n return $rules;\n }", "title": "" }, { "docid": "c0d1c927d7bc536f32c640792ba4184d", "score": "0.7414592", "text": "public function rules()\n {\n $rules = [\n 'body' => 'required|min:10',\n ];\n\n if (\\Config::get('chatter.security.captcha')) {\n $rules['g-recaptcha-response'] = 'required|captcha';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "327326c7b590c8fd46ee63b02e41cfba", "score": "0.7414464", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n case 'POST':\n {\n return [\n 'username' => 'required',\n 'password' => 'required',\n ]; \n }\n case 'PUT':\n case 'PATCH':\n default:break;\n }\n }", "title": "" }, { "docid": "669b0485760eb01ccc752d927f7b32b7", "score": "0.74023736", "text": "public function rules()\n {\n switch ($this->getMethod())\n {\n case 'POST':\n return self::RULES_POST;\n case 'PUT':\n return self::RULES_PUT;\n case 'DELETE':\n return self::RULES_DELETE;\n default:\n return self::RULES;\n }\n }", "title": "" }, { "docid": "b1ae892558a81d42ba98025e19a29422", "score": "0.7397293", "text": "public function getValidationRules()\n {\n $rules = [];\n\n foreach ($this->rules as $name => $rule) {\n $ruleName = sprintf('2fa.*.settings.%s', $name);\n $rules[$ruleName] = $rule;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "926458ef354ced54a99f13b46e4a07ac", "score": "0.73962873", "text": "public function rules()\n {\n $rules = [\n 'status' => 'required',\n 'sign_off_remarks' => 'required'\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "232ddbc4fcd3e1c5463d600d626e435b", "score": "0.739592", "text": "public function rules()\n {\n $rules = [\n 'global_name' => 'required|string|max:50',\n 'menu_id' => ['required', Rule::in(Menu::getList()->pluck(\"id\")->toArray())],\n\n 'name' => 'required|string|max:255',\n 'url' => 'required|string|max:255',\n 'open_target' => [\"required\", Rule::in(MenuItem::OPEN_TARGETS)],\n ];\n\n $rules = $this->addActiveFlgRules($rules);\n\n return $rules;\n }", "title": "" }, { "docid": "35157d474deff54226081a1920bc50cb", "score": "0.73948014", "text": "public function rules()\n {\n $this->sanitize();\n\n return [\n 'name' => 'required|max:20',\n 'email' => 'required|email',\n 'phone' => 'nullable',\n 'message' => 'required|max:5000',\n 'dateSent' => 'nullable|date'\n ];\n }", "title": "" }, { "docid": "6252b8a5443173997498f35bf23430e9", "score": "0.7394202", "text": "public function getRules() {\n return [\n 'actions' => [ 'required', ],\n 'user_add' => [ 'required', 'rangeLogin', 'uniqueLogin', ],\n 'pass_add' => [ 'required', 'confirmPassword', 'minPassword' ],\n 'pass_repeat_add' => [ 'required', ],\n 'family_add' => [ 'required', ],\n 'name_add' => [ 'required', ],\n\n ];\n }", "title": "" }, { "docid": "5988f5548a36ad0e7be54161ba920923", "score": "0.7391687", "text": "public function rules()\n {\n $rules = [\n\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "204d9ad4e8c63ebd1cf9cd2c94df8be9", "score": "0.7389409", "text": "public function rules()\n {\n switch ($this->method()){\n case 'POST':\n return [\n 'sp' => 'required|numeric',\n 'dp' => 'required|numeric',\n ];\n break;\n case 'PATCH':\n return [\n 'sp' => 'required|numeric',\n 'dp' => 'required|numeric',\n ];\n break;\n }\n\n }", "title": "" }, { "docid": "eb6a97d26bcb56a9074031f72dfde6c0", "score": "0.7384887", "text": "public function rules()\n {\n if (request('update_type') == 'status') {\n return [\n 'status' => [\n 'required',\n Rule::in([\n Business::STATUS_NORMAL,\n Business::STATUS_FREEZE\n ])\n ]\n ];\n } else {\n return [\n 'tel' => 'required',\n 'address' => 'required',\n 'lng' => 'required',\n 'lat' => 'required',\n 'username' => 'required',\n 'mobile' => 'required'\n ];\n }\n }", "title": "" }, { "docid": "c8a9010d033ec474369a3cf59bb4667e", "score": "0.73842204", "text": "public function rules()\n {\n $rules = [\n 'role_id' => 'required',\n 'password' => 'required|confirmed',\n 'password_confirmation' => 'required'\n ];\n\n // 根据RESTful请求的方法来判断是新建还是更新(PUT)\n if ($this->method() === \"PUT\") {\n // 更新信息时,限制一个id,用于防止校验自身重复\n $rules['name'] = 'required|unique:users,name,' . $_POST[\"id\"];\n $rules['email'] = 'required|unique:users,email,' . $_POST[\"id\"];\n } else {\n $rules['name'] = 'required|unique:users';\n $rules['email'] = 'required|unique:users';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "37095e5b810edc5c3e423bb34f66630e", "score": "0.7382261", "text": "public function rules()\n {\n $rules = array();\n\n $rules['name'] = $this->validarName();\n $rules['lastName'] = $this->validarName();\n $rules['userName'] = $this->validarUserName();\n $rules['email'] = $this->validarEmail();\n $rules['especialidad'] = $this->validarEspecialidad();\n $rules['num_colegiado'] = $this->validarNumColegiado();\n $rules['num_sanitario'] = $this->validarNumSanitario();\n $rules['birthdate'] = $this->validarBirthdate();\n $rules['dni'] = $this->validarDnidni();\n $rules['movil'] = $this->validarMovil();\n $rules['password'] = $this->validarPassword();\n $rules['password_confirmation'] = $this->validarPasswordConfirmation();\n\n return $rules;\n }", "title": "" }, { "docid": "18124b67d5894c07268e91234b4ec4b9", "score": "0.73776037", "text": "public function rules(): array\n {\n $rules = [];\n $uri = $this->path();\n switch ($uri) {\n case 'self_intro/upload':\n $rules = [\n 'file' => 'required',\n ];\n break;\n case 'self_intro/editPassWord':\n $rules = [\n 'id' => 'required',\n 'password' => 'required',\n ];\n break;\n case 'self_intro/homeLook':\n $rules = [\n 'password' => 'required',\n ];\n break;\n }\n return $rules;\n }", "title": "" }, { "docid": "2a8ee1716da661d78c028daa2eea5984", "score": "0.7377214", "text": "public function getRules()\n {\n $rules = [\n 'name' => 'required',\n 'type' => 'required|in:person,company',\n 'rnc' => '',\n 'noid' => '',\n 'phone' =>'',\n 'cellphone' =>'numeric',\n 'email' =>'email',\n 'address' =>'',\n 'contact_name' =>'' ,\n 'comments' =>'' ,\n 'available' =>'in:0,1' ,\n\n ];\n return $rules;\n }", "title": "" }, { "docid": "825e1d805c5d9d672dede4fb70948d5e", "score": "0.73674846", "text": "public function rules()\n {\n if (empty($this->get('class'))) {\n return ['class' => 'required'];\n }\n return $this->get('class')::getRules();\n }", "title": "" }, { "docid": "b8e83ec2971955a992948068fbd888e8", "score": "0.73609126", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return array();\n }\n case 'POST':\n {\n return array(\n 'title'=>'required|string|max:255',\n 'description'=>'required|string|max:555',\n 'company_name'=>'required|string|max:255',\n 'start_date'=>'required|date',\n // 'end_date'=>'date',\n );\n }\n case 'PUT':\n {\n return array(\n 'title'=>'required|string|max:255',\n 'description'=>'required|string|max:555',\n 'company_name'=>'required|string|max:255',\n 'start_date'=>'required|date',\n );\n }\n case 'PATCH':\n\n }\n }", "title": "" }, { "docid": "1658df07323e6fb0b9670a6f16d5e539", "score": "0.73589677", "text": "public function rules()\n {\n if ($this->method() === 'PATCH') {\n return Mount::getRulesForUpdate($this->route()->parameter('mount')->id);\n }\n\n return Mount::getRules();\n }", "title": "" }, { "docid": "b918eed03f20201d579147f38d4164b9", "score": "0.73507965", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST': {\n return [\n 'to'=>'required|email',\n 'cc'=>'email',\n 'bcc'=>'email',\n 'subject'=>'required',\n 'message'=>'required'\n ];\n break;\n }\n }\n }", "title": "" }, { "docid": "90f762d9defdeb4a87d9f52033fd121d", "score": "0.7349274", "text": "public function getFilterValidationRules();", "title": "" }, { "docid": "35ee7be2a191ca45cedb61366e81f2af", "score": "0.7349204", "text": "public function rules()\n {\n\n $rules = [];\n\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [];\n break;\n }\n case 'POST':\n {\n $rules = [\n 'branch_id' => 'exists:branches,id',\n 'transaction_id' => 'required',\n 'debit_account_id' => 'required',\n 'credit_account_id' => 'required',\n 'amount' => 'required',\n 'narration' => 'required',\n ];\n\n break;\n }\n case 'PUT':\n case 'PATCH':\n {\n $rules = [\n 'branch_id' => 'exists:branches,id',\n 'transaction_id' => 'required',\n 'debit_account_id' => 'required',\n 'credit_account_id' => 'required',\n 'amount' => 'required',\n 'narration' => 'required',\n ];\n break;\n }\n default:\n break;\n }\n\n return $rules;\n\n }", "title": "" }, { "docid": "d04a249d08672e78eefcbf2b5d3dda78", "score": "0.73455215", "text": "public function defineValidationRules()\n {\n return [];\n }", "title": "" }, { "docid": "b6de7ff87fb1b4bbf401e7e7e5bc39c4", "score": "0.7345512", "text": "public function rules()\n {\n switch ($this->method())\n {\n case 'POST': //create\n return [\n 'name' => 'required|string|max:30',\n 'type' => 'required|integer',\n 'img' => 'nullable|url',\n 'url' => 'nullable|string|max:255',\n 'sort' => 'required|integer',\n 'state' => 'required|integer',\n ];\n case 'PUT': //update\n return [\n 'name' => 'required|string|max:30',\n 'type' => 'required|integer',\n 'img' => 'nullable|url',\n 'url' => 'nullable|string|max:255',\n 'sort' => 'required|integer',\n 'state' => 'required|integer',\n ];\n case 'PATCH':\n case 'GET':\n case 'DELETE':\n default:\n {\n return [];\n }\n }\n }", "title": "" }, { "docid": "5ff7ae7890a43375a7b1d435e06231d4", "score": "0.73446405", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required|min:3',\n 'gameId' => 'required|integer',\n 'image' => 'image',\n 'roster' => 'required|array'\n ];\n\n foreach ($this->request->get('roster') as $key => $member) {\n $rules['roster.' . $key . '.userId'] = 'required|integer';\n $rules['roster.' . $key . '.captain'] = 'boolean';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "fd9d196236fef19b90f80eae1a0e2b0a", "score": "0.73427635", "text": "public function rules()\n {\n $rules = [\n Knowledge::COL_CODE => 'required|unique:knowledge,code,'.$this->knowledge,\n Knowledge::COL_CONCLUSION => 'required|exists:facts,code',\n Knowledge::COL_RELIABILITY => 'required|numeric|between:0,1',\n Knowledge::COL_STATUS => 'required|boolean',\n ];\n foreach ($this->request->get('criteria') as $key => $value) {\n $rules['criteria.'.$key] = 'required|exists:criterias,code';\n }\n foreach ($this->request->get('operators') as $key => $value) {\n $rules['operators.'.$key] = 'required|numeric|between:0,3';\n }\n foreach ($this->request->get('scores') as $key => $value) {\n $rules['scores.'.$key] = 'required|numeric|between:0,1';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "b0d9a89503345d656c906ba6b7385cb1", "score": "0.7340829", "text": "public function rules()\n {\n $method = $this->getMethod();\n\n if ($method !== 'PUT' && $method !== 'POST') {\n return [];\n }\n\n return [\n 'consume_name' => 'required',\n 'consume_time' => 'required|date',\n 'consume_cost' => 'sometimes|numeric|min:0',\n 'good_id' => 'sometimes|exists:goods,id',\n 'shop_id' => 'sometimes|exists:shops,id'\n ];\n }", "title": "" }, { "docid": "19c651e600de0184ba283593acef0a2b", "score": "0.73401827", "text": "public function rules()\n {\n $rules = [];\n\n if(action_name() == 'members'){\n $rules['activity_id'] = 'required';\n }\n\n if(action_name() == 'auth'){\n $rules['user_id'] = ['required'];\n $rules['appid'] = ['required'];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "297e33d19038ac8ca6ad5ebe004b7a79", "score": "0.733586", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'name' => 'bail|required|string|unique:skill|max:50',\n 'category_id' => 'required',\n 'start_from' => 'required|integer|min:' .\n Carbon::now()->startOfCentury()->year . '|max:' . date('Y'),\n 'user_id' => 'required'\n ];\n break;\n case 'PUT':\n return [\n 'name' => 'required|string|max:50',\n 'category_id' => 'bail|required',\n 'start_from' => 'bail|required|integer|min:' .\n Carbon::now()->startOfCentury()->year . '|max:' . date('Y'),\n 'user_id' => 'required'\n ];\n break;\n }\n }", "title": "" }, { "docid": "95ce20fc7886d6aba72555e29af8b597", "score": "0.7333137", "text": "public function rules()\n {\n $rules = parent::rules();\n return $rules;\n }", "title": "" } ]
e6e4ba8661867fc38dc0b7c803a316e2
get product image list
[ { "docid": "e1720e69cc5dd46ad5260bc2121f0b68", "score": "0.72655416", "text": "public function productImages()\n {\n $productImages = null;\n if(Input::has('product_id'))\n {\n $productImages = StoreProductImage::where('product_id', Input::get('product_id'))->get();\n } \n else\n {\n $productImages = StoreProductImage::where('key', Input::get('product_key'))->get();\n }\n \n return $this->view('site.store.product.images', compact('productImages'));\n }", "title": "" } ]
[ { "docid": "b7ac019e2852e2124231c49c6c2c2610", "score": "0.8027475", "text": "private function getImages() {\n\n\t\t$sql = 'SELECT p.file_name, p.alt_text FROM product_images as p JOIN product_to_images \n ON p.file_name = product_to_images.file_name \n WHERE product_to_images.pid = :pid \n ORDER BY product_to_images.sort_order DESC';\n \n\t\t$db = DB::getInstance();\n\t\t$query = $db->prepare($sql);\n\t\t$query->execute(array('pid' => $this->pid));\n\t\t$results = $query->fetchAll(\\PDO::FETCH_ASSOC);\n\t\tif(!empty($results)) {\n\n for ($i=0;$i<count($results);$i++) {\n $results[$i]['file_name'] = $results[$i]['file_name'];\n $results[$i]['alt_text'] = $results[$i]['alt_text'];\n }\n\n\t\t\t$this->images = $results;\n\t\t}\n\t\telse { \n\t\t\t$this->images = false;\t\n\t\t}\n\t}", "title": "" }, { "docid": "1586eafcba4bd33956bf10673c9ab70c", "score": "0.7880672", "text": "public function getImage() {\n $images = array();\n foreach ($this->productImages as $img) {\n if ($img->is_default == 1) {\n $images[] = array('id' => $img->id,\n 'image_large' => $img->image_url['image_large'],\n 'image_small' => $img->image_url['image_small'],\n );\n break;\n } else {\n $images[] = array('id' => $img->id,\n 'image_large' => $img->image_url['image_large'],\n 'image_small' => $img->image_url['image_small'],\n );\n break;\n }\n }\n\n return $images;\n }", "title": "" }, { "docid": "9d24584ce4cf423723cc3f64a3cfbd53", "score": "0.77607065", "text": "function getImages($prodID){\n $p = Mage::getModel('catalog/product')->load($prodID);\n $backend = Mage::getResourceModel('catalog/product_attribute_backend_media');\n $attributeId = Mage::getResourceModel('eav/entity_attribute')->getIdByCode('catalog_product', 'media_gallery');\n $container = new Varien_Object(array(\n 'attribute' => new Varien_Object(array('id' => $attributeId))\n ));\n $gallery = $backend->loadGallery($p, $container);\n\n $images = array();\n foreach ($gallery as $image) {\n array_push($images, Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $image['file']);\n }\n return $images;\n //return ['hola', 'images'];\n}", "title": "" }, { "docid": "72830ff9ee954d417754d46dc5a498c8", "score": "0.77331024", "text": "public function getImages()\n {\n if (empty($this->images)) {\n if ($this->productHasImageGallery()) {\n $productPictures = $this->getProductData()->ProductGallery->ProductPicture;\n // Make sure $productPictures is an array.\n if (!is_array($productPictures)){\n $productPictures = [$productPictures];\n }\n\n foreach ($productPictures as $img) {\n $attr = $img->{'@attributes'};\n $this->images[] = [\n 'high' => $attr->Pic,\n 'low' => $attr->LowPic,\n 'thumb' => $attr->ThumbPic,\n ];\n }\n }\n if ($this->productHasMainImage()) {\n $this->images[] = [\n 'high' => $this->getProductData()->{'@attributes'}->HighPic,\n 'low' => $this->getProductData()->{'@attributes'}->LowPic,\n 'thumb' => $this->getProductData()->{'@attributes'}->ThumbPic,\n ];\n }\n }\n\n return $this->images;\n }", "title": "" }, { "docid": "565cfbedbd26c54aeb82a22de4bd240f", "score": "0.7601677", "text": "public function getImages();", "title": "" }, { "docid": "f878114939a9ac3a0979f8593b63826d", "score": "0.7433527", "text": "public function getProductImgs() {\n $ids = $this->getProductIds();\n $imgArr = [];\n foreach ($ids as $id) {\n $prodImg = $this->getOneProductImgs($id);\n if ($prodImg) {\n foreach ($prodImg as $pic) {\n if (!empty($pic)) {\n $imgArr[] = $pic;\n }\n }\n }\n }\n if (!empty($imgArr)) {\n return $imgArr;\n }\n return false;\n }", "title": "" }, { "docid": "ec9366e408b7be5e3113b1a9ef2c111e", "score": "0.7389851", "text": "function productImages($argpid) {\n $arrClms = array(\n 'pkImageID',\n 'ImageName'\n );\n $argWhere = \"fkProductID = '\" . $argpid . \"'\";\n $varOrderBy = 'ImageDateAdded DESC';\n $varTable = TABLE_PRODUCT_IMAGE;\n $arrRes = $this->select($varTable, $arrClms, $argWhere, $varOrderBy);\n return $arrRes;\n }", "title": "" }, { "docid": "a60da35baa9d936ff21612d1f8841247", "score": "0.7376058", "text": "public function listImages(){\n\n return $results;\n }", "title": "" }, { "docid": "de2d17dfaa61431d9c3570c412756eb8", "score": "0.7365157", "text": "public function images()\n {\n return (ProductImageProxy::modelClass())\n ::where('product_images.product_id', $this->product_id)\n ->select('product_images.*');\n }", "title": "" }, { "docid": "ca082ad004355a169a8452d0ba93de70", "score": "0.7349223", "text": "function get_product_images(){\n $result = array();\n for ($i = 1; $i <= 6; $i++) { \n if(get_field(\"cf_product_gallery_\".$i)){\n array_push($result, get_field(\"cf_product_gallery_\".$i));\n } \n }\n return $result; \n }", "title": "" }, { "docid": "9691ed41bdcfa16c22af1ef42055f34b", "score": "0.7209913", "text": "public function getGalleryImages($product)\n {\n $images = [];\n\n if ($product) {\n foreach ($product->images as $image) {\n if (! Storage::has($image->path))\n continue;\n\n $images[] = [\n 'small_image_url' => url('cache/small/' . $image->path),\n 'medium_image_url' => url('cache/medium/' . $image->path),\n 'large_image_url' => url('cache/large/' . $image->path),\n 'original_image_url' => url('cache/original/' . $image->path),\n ];\n }\n }\n\n if (! $product || (! $product->parent_id && !count($images))) {\n $images[] = [\n 'small_image_url' => bagisto_asset('images/product/small-product-placeholder.png'),\n 'medium_image_url' => bagisto_asset('images/product/meduim-product-placeholder.png'),\n 'large_image_url' => bagisto_asset('images/product/large-product-placeholder.png'),\n 'original_image_url' => bagisto_asset('images/product/large-product-placeholder.png'),\n ];\n }\n\n return $images;\n }", "title": "" }, { "docid": "0c8d38967e2424d0cc29ed01e8232bc5", "score": "0.7184655", "text": "function getImages($argpid) {\n $arrClms = array(\n 'pkImageID',\n 'ImageName'\n );\n $argWhere = 'fkProductID = ' . $argpid;\n $varOrderBy = 'ImageDateAdded DESC';\n $varTable = TABLE_PRODUCT_IMAGE;\n $arrRes = $this->select($varTable, $arrClms, $argWhere, $varOrderBy);\n return $arrRes;\n }", "title": "" }, { "docid": "fb577dac667c88254b37f389fdde263c", "score": "0.7149224", "text": "function getProductImages(int $product) {\n return select('\n SELECT ImagePath\n FROM stockitemimages \n WHERE StockItemID = :stockitemid\n ', ['stockitemid' => $product]);\n}", "title": "" }, { "docid": "1cb14776cc197cb485112fa6edc1f4c6", "score": "0.71180487", "text": "public function getAll()\n {\n return Image::whereNull('product_id')->paginate();\n }", "title": "" }, { "docid": "db7d3f7ff288dd02b5ad4a95093fce57", "score": "0.71074784", "text": "function get_productImageById()\n {\n $this->db->select('*');\n $this->db->from('product_image');\n $this->db->where('product_id', $this->_product_id);\n $query = $this->db->get();\n return $query->result_array();\n }", "title": "" }, { "docid": "f5ab6cfda9ca419d31b92cf69e143ca8", "score": "0.7089285", "text": "function food_viewImgProduct(){\n $sql = \"select * from fd_image where get_imgid=:get_imgid order by fd_imgid ASC\";\n $args = [':get_imgid'=>$this->id];\n return $this->run($sql, $args);\n }", "title": "" }, { "docid": "ed8f96ca99d56c7f2eedfd2c705e4faa", "score": "0.7082749", "text": "function getImages() {\n $db = phpmotorsConnect();\n $sql = 'SELECT imgId, imgPath, imgName, imgDate, inventory.invId, invMake, invModel FROM images JOIN inventory ON images.invId = inventory.invId';\n $stmt = $db->prepare($sql);\n $stmt->execute();\n $imageArray = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n\n return $imageArray;\n }", "title": "" }, { "docid": "0387c2440ab27ade79dd116be84dbd22", "score": "0.7072245", "text": "protected function getImages()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "2209c4c553866bcf87991c3d5156dad5", "score": "0.7070298", "text": "public function images()\n {\n \t$image=$this->hasMany(Image::class);\n if ($image->count()){\n return $image;\n }else{\n return $this\n ->find(config('app_products.products.image.default_product_id_image'))\n ->hasMany(Image::class);\n }\n }", "title": "" }, { "docid": "242449fb51febc15b0ec2bb26a396e0f", "score": "0.704649", "text": "function product_image_list($projectId, $location, $productId)\n{\n $client = new ProductSearchClient();\n\n # get the name of the product.\n $productPath = $client->productName($projectId, $location, $productId);\n\n # list all the reference images available\n $referenceImages = $client->listReferenceImages($productPath);\n\n foreach ($referenceImages->iterateAllElements() as $referenceImage) {\n $name = $referenceImage->getName();\n $nameArray = explode('/', $name);\n\n printf('Reference image name: %s' . PHP_EOL, $name);\n printf('Reference image id: %s' . PHP_EOL, end($nameArray));\n printf('Reference image uri: %s' . PHP_EOL, $referenceImage->getUri());\n print('Reference image bounding polygons: ');\n foreach ($referenceImage->getBoundingPolys() as $boundingPoly) {\n foreach ($boundingPoly->getVertices() as $vertex) {\n printf('(%d, %d) ', $vertex->getX(), $vertex->getY());\n }\n print(PHP_EOL);\n }\n }\n\n $client->close();\n}", "title": "" }, { "docid": "ca3fbaebe5d5c1092f7f7a8c7dfa58bc", "score": "0.70341945", "text": "public function images()\n {\n return $this->hasMany(ProductImageProxy::modelClass(), 'product_id');\n }", "title": "" }, { "docid": "2f61b3f137f5cec5be6c6f1b331f05c7", "score": "0.7025193", "text": "public function getAllProductImages(Product $product)\n {\n $data = array();\n $message = array();\n $hasError = true;\n $codeResponse = 200;\n\n $list = null;\n\n try{\n $relationshipNames = array('images');\n $this->service->load($product,$relationshipNames);\n $images = $product->images;\n $list = ImageWebResource::collection($images);\n array_push ( $message , trans('crud.list_success'));\n $hasError = false;\n\n } catch(\\Exception $e){\n report($e);\n array_push ( $message , $e->getMessage());\n array_push ( $message , trans('crud.list_error'));\n $codeResponse = $e->getCode();\n }\n\n $data['list'] = $list;\n $data['hasError'] = $hasError;\n $data['message'] = $message;\n return response()->json($data,$codeResponse);\n }", "title": "" }, { "docid": "99ff4db7e7af1d565c393498b05dec82", "score": "0.70128685", "text": "function get_products_images($id)\n {\n $result = $this->db->get_where('products_images', array(\n 'id' => $id\n ))->row_array();\n if (! (array) $result) {\n $fields = $this->db->list_fields('products_images');\n foreach ($fields as $field) {\n $result[$field] = '';\n }\n }\n $db_error = $this->db->error();\n if (! empty($db_error['code'])) {\n echo 'Database error! Error Code [' . $db_error['code'] . '] Error: ' . $db_error['message'];\n exit();\n }\n return $result;\n }", "title": "" }, { "docid": "59c40a670ac3f5a344a94a2632e8b48d", "score": "0.7010675", "text": "public function getAllImages() {\n $directory = \"bilder/\";\n $images = glob($directory . \"*.jpg\");\n\n $imageList = \"\";\n foreach($images as $image)\n {\n $imageList .= \"<li><img src=\" . $image . \"></li>\";\n }\n\n return $imageList;\n }", "title": "" }, { "docid": "4979e67e9d0a793f253bdd753d462eab", "score": "0.70024407", "text": "public function getProductImages($table , $product_code)\n {\n $statment = $this -> pdo -> prepare(\"select `galleryPhoto` from `$table` JOIN `products` ON `productCode`= '$product_code' AND `gallery_product_id`=`productId`\");\n\n $statment -> execute();\n\n return $statment -> fetchAll(PDO::FETCH_CLASS);\n }", "title": "" }, { "docid": "680bc16eb1217618c6c7ddd8ed520aeb", "score": "0.7001706", "text": "function getImages() { return $this->_images; }", "title": "" }, { "docid": "132a53e6f91dd21ef54303690c9c2f2d", "score": "0.69819695", "text": "function products_images() {\n $query = \"SELECT * FROM `qtsb9_jshopping_products_images` WHERE `image_id` > 23931 ORDER BY `image_id`\";\n $db = Db::getInstance();\n $st = $db->prepare($query);\n $st->execute();\n if($st->execute()) {\n $row = $st->fetchAll(PDO::FETCH_ASSOC);\n return $row;\n } else {\n return 'ERROR';\n } \n }", "title": "" }, { "docid": "1a3ae8c102465d1e0092b18a33ea386d", "score": "0.69808656", "text": "public function getAdditionalImagesByProductsId($pId) {\n\t\t/* {Hook} \"MLProduct_getProductImagesByID\": Enables you to fetch additional product images in a different\n\t\t method than using the products_images table.<br>\n\t\t Variables that can be used: <ul>\n\t\t <li>$pId: The ID of the product (Table <code>products.products_id</code>).</li>\n\t\t <li>$images: Array that this function will return</li>\n\t\t </ul>\n\t\t Set $images array in this format:<br>\n\t\t <pre>\n$images = array (\n\t0 => 'image1.jpg',\n\t1 => 'image2.jpg',\n\t2 => ...\n);\n</pre>\n\t\t */\n\t\tif (($hp = magnaContribVerify('MLProduct_getProductImagesByID', 1)) !== false) {\n\t\t\t$images = array();\n\t\t\trequire($hp);\n\t\t\t\n\t\t\tif (is_array($images) && isset($images[0])) {\n\t\t\t\treturn $images;\n\t\t\t}\n\t\t\t\n\t\t\treturn array();\n\t\t\t\n\t\t} else if (defined('TABLE_PRODUCTS_IMAGES') && MagnaDB::gi()->tableExists(TABLE_PRODUCTS_IMAGES)) {\n\t\t\t# Tabelle nur bei xtCommerce- und Gambio- Shops vorhanden (nicht OsC)\n\t\t\t\n\t\t\t$cols = MagnaDB::gi()->getTableCols(TABLE_PRODUCTS_IMAGES);\n\t\t\t$orderBy = (in_array('image_nr', $cols)\n\t\t\t\t? 'image_nr'\n\t\t\t\t: (in_array('sort_order', $cols)\n\t\t\t\t\t? 'sort_order'\n\t\t\t\t\t: ''\n\t\t\t\t)\n\t\t\t);\n\t\t\tif (!empty($orderBy)) {\n\t\t\t\t$orderBy = 'ORDER BY '.$orderBy;\n\t\t\t}\n\t\t\t$colname = (in_array('image', $cols)\n\t\t\t\t? 'image'\n\t\t\t\t: (in_array('image_name', $cols)\n\t\t\t\t\t? 'image_name'\n\t\t\t\t\t: ''\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t$return = array();\n\t\t\tif (!empty($colname)) {\n\t\t\t\t$return = MagnaDB::gi()->fetchArray('\n\t\t\t\t SELECT '.$colname.'\n\t\t\t\t FROM '.TABLE_PRODUCTS_IMAGES.'\n\t\t\t\t WHERE products_id = \"'.$pId.'\"\n\t\t\t\t AND '.$colname.' <> \"\"\n\t\t\t\t AND '.$colname.' IS NOT NULL\n\t\t\t\t '.$orderBy.'\n\t\t\t\t', true);\n\t\t\t\tif (empty($return)) {\n\t\t\t\t\t$return = array();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $return;\n\t\t}\n\t\treturn array();\n\t}", "title": "" }, { "docid": "adf94cac15925e4cd059b9d68797a3cf", "score": "0.6974123", "text": "function associated_imgs_by_product_id($cms_connect, $productid){\n\t$sql = \"SELECT file_id, img_order FROM product_img Where active = 1 AND product_id = $productid ORDER BY img_order\";\n\t$result = $cms_connect->query($sql);\n $output = array();\n\tforeach ($result as $row) {\n\t\tarray_push($output, $row['file_id']);\n\t}\n return $output;\n}", "title": "" }, { "docid": "4cecb8633f75dbe3d5c9318c8c18b977", "score": "0.695555", "text": "function woo_gallery_images($product_id){\n\t$product = new WC_product($product_id);\n\t$attachment_ids = $product->get_gallery_attachment_ids();\n\n\tif (empty($attachment_ids)) {\n\t\treturn false;\n\t}\n\n\t$gallery = array();\n\n\tforeach( $attachment_ids as $attachment_id ) {\n\t\tarray_push($gallery, array(\n\t\t\t'full_url' => wp_get_attachment_url( $attachment_id )\n\t\t));\n\t}\n\n\treturn $gallery;\n}", "title": "" }, { "docid": "530251d8727a06cec9ea549075d8ada0", "score": "0.6950914", "text": "public function getAllImagesByProductsId($pId) {\n\t\t$product = MagnaDB::gi()->fetchRow('\n\t\t\tSELECT products_id AS ProductId, products_image AS Images \n\t\t\t FROM '.TABLE_PRODUCTS.'\n\t\t\t WHERE products_id=\"'.$pId.'\"\n\t\t');\n\t\t$this->completeImages($product);\n\t\treturn $product['Images'];\n\t}", "title": "" }, { "docid": "e173256db87456fc10713091a6b90e12", "score": "0.69406813", "text": "abstract public function get_images_to_render();", "title": "" }, { "docid": "7ad85daf6c3f9904324351c3f169f7db", "score": "0.69354594", "text": "public function getImages()\n {\n $finder = $this->getImagesFinder();\n\n $imageQuery = Image::find()\n ->where($finder);\n $imageQuery->orderBy(['position' => SORT_DESC]);\n $imageRecords = $imageQuery->all();\n\n if(!$imageRecords){\n return [$this->getModule()->getPlaceHolder()];\n }\n return $imageRecords;\n }", "title": "" }, { "docid": "58e8c3f06e467d1c178dfae8d140ec97", "score": "0.69218075", "text": "function GetImages()\n {\n echo DocumentHelper::GetImages($this->Core);\n }", "title": "" }, { "docid": "8f937fa57a638a31e84d248899070623", "score": "0.6907128", "text": "public function getImages()\n {\n return Image::model()->findAllByAttributes(array('entity_type' => get_class($this), 'entity_id' => $this->id));\n }", "title": "" }, { "docid": "8bd932947b366562b92eb0e05257aa5a", "score": "0.6892866", "text": "function property_images($id){\n $conn = database::getDB();\n $images = array();\n $sql= \"SELECT image FROM property_details WHERE id=\".$id.\"\";\n $result = $conn->query($sql);\n while($row = $result->fetch_assoc()){\n array_push($images,$row['image']);\n \t}\n \treturn $images;\n }", "title": "" }, { "docid": "9daa056f20680a990db891ecca76211c", "score": "0.6874242", "text": "public function getProforSubImg()\n\t\t{\n\t\t\t$sql = \"SELECT tbl_products.id_product, tbl_products.product_name FROM tbl_products \";\n\n\t\t\t$pre = $this->pdo->prepare($sql);\n\t\t\t$pre->execute();\n\n\t\t\treturn $pre->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t}", "title": "" }, { "docid": "0934187570ddb8be527e093fa547347a", "score": "0.68707144", "text": "public function productImagesProvider(): array\n {\n $result = array();\n //====================================================================//\n // For Each Object Types\n foreach ($this->objectTypesProvider() as $testCase) {\n //====================================================================//\n // Setup Sequence\n $this->loadLocalTestSequence($testCase[0]);\n //====================================================================//\n // Check Test is Allowed\n if (!$this->isAllowedProductImagesTests($testCase[1])) {\n continue;\n }\n //====================================================================//\n // For Each Object Types\n foreach ($this->getProductImagesSequences() as $imgSequence) {\n $dataSet = $testCase;\n $dataSet[3] = $this->getFakeImages($imgSequence);\n $result[] = $dataSet;\n }\n }\n if (empty($result)) {\n $this->markTestSkipped('No Product Images Combination Found.');\n }\n\n return $result;\n }", "title": "" }, { "docid": "06dc1cf3c41d3c696d1af3794f4e48bb", "score": "0.6867359", "text": "public function getImages()\n {\n return $this->images;\n }", "title": "" }, { "docid": "06dc1cf3c41d3c696d1af3794f4e48bb", "score": "0.6867359", "text": "public function getImages()\n {\n return $this->images;\n }", "title": "" }, { "docid": "06dc1cf3c41d3c696d1af3794f4e48bb", "score": "0.6867359", "text": "public function getImages()\n {\n return $this->images;\n }", "title": "" }, { "docid": "06dc1cf3c41d3c696d1af3794f4e48bb", "score": "0.6867359", "text": "public function getImages()\n {\n return $this->images;\n }", "title": "" }, { "docid": "06dc1cf3c41d3c696d1af3794f4e48bb", "score": "0.6867359", "text": "public function getImages()\n {\n return $this->images;\n }", "title": "" }, { "docid": "f9515a8ad1273fb0e7b7560ae18d87ef", "score": "0.6851031", "text": "public function get_images() {\n\t\treturn $this->images;\n\t}", "title": "" }, { "docid": "e7f65c222d2fd5be50bb054577e6d29a", "score": "0.68471307", "text": "function &images()\r\n {\r\n $return_array = array();\r\n $image_array = array();\r\n\r\n $db =& eZDB::globalDatabase();\r\n $db->array_query( $image_array, \"SELECT ID, ImageID, Placement FROM eZTrade_ProductImageLink WHERE ProductID='$this->ID' ORDER BY Created\" );\r\n\r\n // convert the database if placement is not set\r\n if ( count( $image_array ) > 0 )\r\n {\r\n if ( $image_array[0][$db->fieldName(\"Placement\")] == \"0\" )\r\n {\r\n $placement=1;\r\n for ( $i=0; $i < count($image_array); $i++ )\r\n {\r\n $imageLinkID = $image_array[$i][$db->fieldName(\"ID\")];\r\n $db->query( \"UPDATE eZTrade_ProductImageLink SET Placement='$placement' WHERE ID='$imageLinkID'\" );\r\n\r\n $image_array[$i][$db->fieldName(\"Placement\")] = $placement;\r\n $placement++;\r\n }\r\n }\r\n }\r\n\r\n for ( $i=0; $i < count($image_array); $i++ )\r\n {\r\n $return_array[$i][\"Image\"] = new eZImage( $image_array[$i][$db->fieldName(\"ImageID\")] );\r\n $return_array[$i][\"Placement\"] = $image_array[$i][$db->fieldName(\"Placement\")];\r\n }\r\n\r\n return $return_array;\r\n }", "title": "" }, { "docid": "38e08b84ac239c6d7a457ee722f84439", "score": "0.6845502", "text": "function getProductThumbnails($invId) {\r\n $db = acmeConnect();\r\n $sql = 'SELECT * FROM images WHERE invId = :invId ORDER BY imgName';\r\n $stmt = $db->prepare($sql);\r\n $stmt->execute();\r\n $productThumbnails = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n $stmt->closeCursor();\r\n return $productThumbnails;\r\n}", "title": "" }, { "docid": "1c9da486b4726d253c8800773fe5ae17", "score": "0.6838011", "text": "public function getAllImages()\n {\n $sql = 'select IMG_PATH as path,'\n . ' USER_LOGIN as login'\n . ' from T_IMAGES';\n\n $images = $this->executerRequete($sql);\n return $images->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "5e9385d20a67ba889b18bc540cf33a41", "score": "0.67797446", "text": "public function getImagesProperty()\n {\n return ['image'];\n }", "title": "" }, { "docid": "0d3ac6dc48180d938d1e6875623a916b", "score": "0.67757034", "text": "private function handleImages(array $product)\n {\n\n $images = ($product['content']['productImages']?? []);\n if (!is_array($images)) {\n return [];\n }\n\n return array_filter(array_map(\n function ($image) {\n $imageUrl = stripslashes($image['imageUrl']);\n return (\"http:\" . $imageUrl ?? NULL);\n },\n $images\n ));\n //$image = ($product['content']['productImages'][0] ?? []);\n //return $image['imageUrl'] ?? '';\n }", "title": "" }, { "docid": "10878930a0f426960373b9d194744831", "score": "0.6762051", "text": "public function productImages()\n\t{\n\t\treturn $this->hasMany('App\\Models\\ProductImage', 'color_id');\n\t}", "title": "" }, { "docid": "cdbd00c09b44642904ef58d24d372119", "score": "0.6747301", "text": "public function getGalleryImages()\n {\n return $this->hasMany(\\common\\models\\GalleryImage::class, ['ownerId' => 'id'])\n ->andWhere(['type' => 'product'])\n ->orderBy(['rank' => SORT_ASC]);\n }", "title": "" }, { "docid": "a14a34f6515ca6366596f04a2e6a8db7", "score": "0.6747211", "text": "private function getProductImage()\n {\n $images = $this->product->getImages();\n\n if (!is_array($images) || count($images) == 0)\n {\n return;\n }\n\n return $this->config->image_product_live_path . '/' . $images[0]->image_full;\n }", "title": "" }, { "docid": "21bf2f112022097495511267d0c1d30a", "score": "0.67403173", "text": "public function getImages()\n {\n return \\Storage::disk('image-manager')->files();\n }", "title": "" }, { "docid": "853e21b59e354be3e4cc509fd2b350bc", "score": "0.6731311", "text": "public function images() {\n\n \treturn $this->hasMany(ProductImage::class);\n }", "title": "" }, { "docid": "3cd631af5c80a7dd9e3c53ea4ecef3e3", "score": "0.6728388", "text": "public function getImages()\n {\n return $this->images;\n }", "title": "" }, { "docid": "9cbaccffd401d581ab955a063334a113", "score": "0.6708525", "text": "public function GetAll(){\n $products = Product::select('id','name','unit_price')->get();\n\n // GET PRODUCT IMAGE FOR DISPLAY (USES MAIN IMAGE)\n $images = ProductImage::select('id','product_image_url','main_image','product_id')->where('main_image',true)->get();\n\n // SET DISPLAY IMAGE FOR EACH PRODUCT\n foreach($products as $product){\n // CHECK IF IMAGE IS PLACEHOLDER (FOR TESTING PURPOSES)\n $image_url = $images->where('product_id', $product->id)->first()->product_image_url;\n if(str_contains($image_url, 'lorempixel')){\n $product->setAttribute('product_image_url', $image_url);\n }\n else{\n $product->setAttribute('product_image_url', '/product_images/'.$image_url);\n }\n }\n\n return response()->json([\n 'message' => 'success',\n 'data' => $products,\n ], 200);\n }", "title": "" }, { "docid": "9fc3595c8bdf4752fe9041fbb129deb8", "score": "0.6695751", "text": "public function images()\n {\n return $this->hasMany(ProductImage::class);\n }", "title": "" }, { "docid": "3b23e8574ee565c8658ddcd7d075b258", "score": "0.667098", "text": "public function getProductImage($prefix = \"\") {\n\n $arr_res = $this->db->getRows($this->tablename, $this->assoc_form_db['imagelink'], array(\n array(\"where\", $this->assoc_form_db['imagelink'], \"LIKE\", $prefix . \"%\")\n ));\n\n $arrout = array();\n\n for ($i = 0; $i < count($arr_res); $i++) {\n $arrout[] = $arr_res[$i][$this->assoc_form_db['imagelink']];\n }\n\n return $arrout;\n }", "title": "" }, { "docid": "26e97e9e111549b44b8831ebd241b1d8", "score": "0.66569173", "text": "public function get_product_image(){\n\t\treturn $this->v_product_image;\n\t}", "title": "" }, { "docid": "2e7fc74fa0c43330a9080f33048b5a91", "score": "0.66370267", "text": "public function showImg() {\n $select = 'SELECT `name`,`link`,`id_tp_artWorks`,`id_tp_users` FROM `tp_artWorkImg` WHERE `id_tp_artWorks`= :id_tp_artWorks';\n $queryPrepare = $this->pdo->prepare($select);\n $queryPrepare->bindValue(':id_tp_artWorks', $this->id_tp_artWorks, PDO::PARAM_INT);\n $queryPrepare->execute();\n return $queryPrepare->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "f7da4f08591acce16bdb67e7b0f67c4a", "score": "0.66307825", "text": "public function productImages()\n {\n return $this->hasMany(ProductImage::class, 'product_id');\n }", "title": "" }, { "docid": "3c43774592a8431fa1446ce4b356b0d8", "score": "0.66235197", "text": "function get_wc_product_images($order)\n{\n if (is_int($order)) {\n $_order = wc_get_order($order);\n } elseif (is_object($order)) {\n $_order = &$order;\n } else {\n $_order = false;\n }\n\n // Make sure the order is valid\n if (!$_order || !method_exists($order, 'get_items'))\n return [];\n\n $items = $order->get_items();\n $product_img_urls = [];\n\n if (empty($items)) return [];\n\n foreach ($items as $item_id => $item) {\n $order_data = $item->get_data();\n\n if (isset($order_data['product_id'])) {\n $product = wc_get_product($order_data['product_id']);\n\n if (!method_exists($product, 'get_image_id'))\n continue;\n\n $image_id = $product->get_image_id();\n $product_img_urls[$item_id] = wp_get_attachment_image_url($image_id, 'full');\n }\n }\n return $product_img_urls;\n}", "title": "" }, { "docid": "e63982280aad7eefe8edf4353097da97", "score": "0.66214025", "text": "public function gallery()\n {\n if(!isset($this->gallery)) {\n if ($product_images = explode('|', $this->images)) {\n foreach ($product_images as &$image) {\n if (strlen($image) > 0) {\n $image = $this->prepareImageURL($image);\n } else {\n $image = '';\n }\n }\n\n $this->gallery = strlen($product_images[0]) > 0 ? $product_images : [];\n }\n }\n\n return $this->gallery;\n }", "title": "" }, { "docid": "13d5618a8d9d95540a99ebe33b83f336", "score": "0.66130286", "text": "public function actionImageList() {\n $images = array();\n $handler = opendir(Yii::app()->basePath . '/../userdata/' . Yii::app()->session['uid'] . '/image');\n while ($file = readdir($handler)) {\n if ($file != \".\" && $file != \"..\")\n $images[] = $file;\n }\n closedir($handler);\n\n $jsonArray = array();\n\n foreach ($images as $image)\n $jsonArray[] = array(\n 'thumb' => Yii::app()->baseUrl . '/mailer/userdata/' . Yii::app()->session['uid'] . '/image/' . $image,\n 'image' => Yii::app()->baseUrl . '/mailer/userdata/' . Yii::app()->session['uid'] . '/image/' . $image,\n );\n\n header('Content-type: application/json');\n echo CJSON::encode($jsonArray);\n }", "title": "" }, { "docid": "c4750e9efee806cc669e04a755e3a555", "score": "0.6607082", "text": "public function getImages() : array\n {\n return $this->images;\n }", "title": "" }, { "docid": "ea954d653da2b456922efe132c888e33", "score": "0.66046345", "text": "public function getThumbs();", "title": "" }, { "docid": "4fbe956cbe18ae70f4fc0fc2dfa384f5", "score": "0.66013855", "text": "public function getImages()\n {\n \treturn $this->getFilesByPattern('/.*\\.(jpeg|jpg|gif|png)/');\n }", "title": "" }, { "docid": "2428c98d9071aeadbf4662e435d6e419", "score": "0.659245", "text": "function display_wc_product_images(array $images = [])\n{\n if (empty($images)) return;\n foreach ($images as $item_id => $image) {\n $img_alt_text = sprintf(__('Item-%s', 'text-domain'), $item_id);\n echo sprintf(\n '<div><img width=\"200px\" height=\"200px\" src=\"%s\" alt=\"%s\"></div>',\n esc_url($image),\n $img_alt_text,\n );\n }\n}", "title": "" }, { "docid": "bda5e3883960b1adb398ffe54d34b3c1", "score": "0.6585047", "text": "protected function _createImageUrls(Mage_Catalog_Model_Product $product)\n {\n $result = array();\n //get media images associated with product\n $images = $product->getMediaGalleryImages();\n\n if (!empty($images)) {\n foreach ($images as $image ) {\n $isDeleted = $image->getRemoved();\n if (!$isDeleted) {\n $label = $image->getLabel();\n $data = array(\n 'url' => $this->_getNotSecureImageUrl($image->getUrl()),\n 'height' => null,\n 'width' => null,\n 'label' => $label ? $this->_createLocalizedValue($label) : null,\n 'altText' => null,\n 'tags' => null,\n );\n $result[] = $data;\n }\n }\n }\n\n\n $image = $product->getData('image');\n if (!empty($image) && $image !='no_selection') {\n $imageUrl = (string)Mage::helper('catalog/image')->init($product, 'image');\n $label = $product->getData('image_label');\n $data = array(\n 'url' => $this->_getNotSecureImageUrl($imageUrl),\n 'height' => null,\n 'width' => null,\n 'label' => $label ? $this->_createLocalizedValue($label) : null,\n 'altText' => null,\n 'tags' => null,\n );\n\n $result[] = $data;\n }\n\n $image = $product->getData('small_image');\n if (!empty($image) && $image !='no_selection') {\n $imageUrl = (string)Mage::helper('catalog/image')->init($product, 'small_image');\n $label = $product->getData('small_image_label');\n $data = array(\n 'url' => $this->_getNotSecureImageUrl($imageUrl),\n 'height' => null,\n 'width' => null,\n 'label' => $label ? $this->_createLocalizedValue($label) : null,\n 'altText' => null,\n 'tags' => null,\n );\n\n $result[] = $data;\n }\n\n $image = $product->getData('thumbnail');\n if (!empty($image) && $image !='no_selection') {\n $imageUrl = (string)Mage::helper('catalog/image')->init($product, 'thumbnail');\n $label = $product->getData('thumbnail_label');\n $data = array(\n 'url' => $this->_getNotSecureImageUrl($imageUrl),\n 'height' => null,\n 'width' => null,\n 'label' => $label ? $this->_createLocalizedValue($label) : null,\n 'altText' => null,\n 'tags' => array('THUMBNAIL'),\n );\n\n $result[] = $data;\n }\n\n return count($result) ? $result : null;\n }", "title": "" }, { "docid": "dbc28c2194fb2b4939e2213956dba4e2", "score": "0.6567097", "text": "function vmlistAdditionalImages( $product_id, $images, $title='', $limit=1000 ) {\r\n\t\tglobal $sess;\r\n\t\t$html = '';\r\n\t\t$i = 0;\r\n\t\tforeach( $images as $image ) { \r\n\t\t\t$thumbtag = ps_product::image_tag( $image->file_name, 'class=\"browseProductImage\"', 1, 'product', $image->file_image_thumb_width, $image->file_image_thumb_height );\r\n\t\t\t$fulladdress = $sess->url( 'index2.php?page=shop.view_images&amp;image_id='.$image->file_id.'&amp;product_id='.$product_id.'&amp;pop=1' );\r\n\t\t\t\r\n\t\t\tif( $this->get_cfg('useLightBoxImages', 1 )) {\r\n\t\t\t\t$html .= vmCommonHTML::getLightboxImageLink( $image->file_url, $thumbtag, $title ? $title : stripslashes(htmlentities($image->file_title,ENT_QUOTES)), 'product'.$product_id );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$html .= vmPopupLink( $fulladdress, $thumbtag, 640, 550 );\r\n\t\t\t}\r\n\t\t\t$html .= ' ';\r\n\t\t\tif( ++$i > $limit ) break;\r\n\t\t}\r\n\t\treturn $html;\r\n\t}", "title": "" }, { "docid": "2c0d179d5db03197901f9482668c167a", "score": "0.656208", "text": "function GetImages() {\r\n //Select folder to scan\r\n $handle = opendir(\"Images/Products\");\r\n\r\n //Read all files and store names in array\r\n while ($image = readdir($handle)) {\r\n $images[] = $image;\r\n }\r\n\r\n closedir($handle);\r\n\r\n //Exclude all filenames where filename length < 3\r\n $imageArray = array();\r\n foreach ($images as $image) {\r\n if (strlen($image) > 2) {\r\n array_push($imageArray, $image);\r\n }\r\n }\r\n\r\n //Create <select><option> Values and return result\r\n $result = $this->CreateOptionValues($imageArray);\r\n return $result;\r\n }", "title": "" }, { "docid": "b12d31ee46880c5546c23424c74bd7c7", "score": "0.6560226", "text": "public function images(): array\n {\n return $this->_images;\n }", "title": "" }, { "docid": "7e25c43abe8755e6a020b5a22aa3f717", "score": "0.6536299", "text": "public function getMyImages()\n {\n return $this->processQuery($this->buildQuery(\n null, null, array('filter' => ImagesActions::ACTION_FILTER_MY_IMAGES))\n );\n }", "title": "" }, { "docid": "21e91d907381bc23e8417682390697dc", "score": "0.65320593", "text": "public function get_used_images(){\n\t\t$query = \"select `u`.`image` as `image` from `ld_service_units` as `u` UNION select `s`.`image` as `serimage` from `ld_services` as `s`\tUNION\tselect `setim`.`option_value` as `setimage` from `ld_settings` as `setim` where `option_name` = 'ld_company_logo'\";\n\t\t$result=mysqli_query($this->conn,$query);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "bffb1d38294a9d52161d8b5119c7e969", "score": "0.65192586", "text": "public function images_product()\n {\n return $this->hasMany(ImageProduct::class);\n }", "title": "" }, { "docid": "331bdfac1234489ac60f3ed5fe261ef8", "score": "0.6516755", "text": "function getProductoImagenes($idproducto){\n try{\n\n $comando = $this->pdo->prepare(\"call sp_get_imagenesproductos(?)\");\n $comando->execute(\n array(\n $idproducto\n )\n );\n\n return $comando->fetchAll(PDO::FETCH_OBJ);\n\n }catch(Exception $e){\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "f329e6bcff82ca9c76cdb929b1417e53", "score": "0.6507298", "text": "public function index()\n {\n $images = Image::orderBy('id','DESC')->paginate(5);\n $products = Product::all();\n return view('backend.images_product.list',compact('images','products'));\n }", "title": "" }, { "docid": "a840710ed19e1dc4dcd855dd3f11bb38", "score": "0.6503523", "text": "public function getProductList($categorie) {\n $bd = (new \\common\\providers\\OurConnection)->getDb();\n $listeProduitsImages = [];\n $listeProduitsImages['id'] = $categorie['id_categorie'];\n $listeProduitsImages['nom'] = $categorie['nom'];\n $listeProduitsImages['type'] = $categorie['type'];\n\n $query1 = (new \\yii\\db\\Query())->select('p.nom,p.id_produit,f2.nom as photo')\n ->from('produit p')\n ->innerJoin('photo f2', 'p.id_photo=f2.id_photo')\n ->where('p.id_categorie=' . $listeProduitsImages['id'] . '');\n $produits = $query1->createCommand($bd)->queryAll();\n $listeProduitsImages['produits'] = $produits;\n\n return $listeProduitsImages;\n }", "title": "" }, { "docid": "a25fd3f6412d4e3482843fa0653b05da", "score": "0.648814", "text": "function property_images_more($id){\n $conn = database::getDB();\n $images = array();\n $sql = \"SELECT image FROM property_image WHERE property_id =\".$id.\"\";\n $result = $conn->query($sql);\n while($row = $result->fetch_assoc()){\n array_push($images,$row['image']);\n \t}\n \treturn $images;\n }", "title": "" }, { "docid": "14ed0f0f72562938d09b3379f8de024a", "score": "0.64870983", "text": "public function getCategoriesImgs() {\n $imgArr = [];\n $newImgArr = [];\n $url = 'modules/shop/category_img/';\n $ids = $this->getCategoriesIds();\n// print_r($ids);\n// die;\n if (!empty($ids)) {\n foreach ($ids as $id => $type) {\n if (!empty($type['category_icon'])) {\n if (file_exists($url . $id . '/icon_' . $id . '.0x320.' . $type['category_icon'])) {\n $imgArr[] = $url . $id . '/icon_' . $id . '.0x320.' . $type['category_icon'];\n }\n if (file_exists($url . $id . '/icon_' . $id . '.200x0.' . $type['category_icon'])) {\n $imgArr[] = $url . $id . '/icon_' . $id . '.200x0.' . $type['category_icon'];\n }\n if (file_exists($url . $id . '/icon_' . $id . '.48x48.' . $type['category_icon'])) {\n $imgArr[] = $url . $id . '/icon_' . $id . '.48x48.' . $type['category_icon'];\n }\n if (file_exists($url . $id . '/icon_' . $id . '.750x0.' . $type['category_icon'])) {\n $imgArr[] = $url . $id . '/icon_' . $id . '.750x0.' . $type['category_icon'];\n }\n if (file_exists($url . $id . '/icon_' . $id . '.96x96.' . $type['category_icon'])) {\n $imgArr[] = $url . $id . '/icon_' . $id . '.96x96.' . $type['category_icon'];\n }\n if (file_exists($url . $id . '/icon_' . $id . '.970x970.' . $type['category_icon'])) {\n $imgArr[] = $url . $id . '/icon_' . $id . '.970x970.' . $type['category_icon'];\n }\n }\n if (!empty($type['category_logo'])) {\n if (file_exists($url . $id . '/logo_' . $id . '.0x320.' . $type['category_logo'])) {\n $imgArr[] = $url . $id . '/logo_' . $id . '.0x320.' . $type['category_logo'];\n }\n if (file_exists($url . $id . '/logo_' . $id . '.200x0.' . $type['category_logo'])) {\n $imgArr[] = $url . $id . '/logo_' . $id . '.200x0.' . $type['category_logo'];\n }\n if (file_exists($url . $id . '/logo_' . $id . '.48x48.' . $type['category_logo'])) {\n $imgArr[] = $url . $id . '/logo_' . $id . '.48x48.' . $type['category_logo'];\n }\n if (file_exists($url . $id . '/logo_' . $id . '.750x0.' . $type['category_logo'])) {\n $imgArr[] = $url . $id . '/logo_' . $id . '.750x0.' . $type['category_logo'];\n }\n if (file_exists($url . $id . '/logo_' . $id . '.96x96.' . $type['category_logo'])) {\n $imgArr[] = $url . $id . '/logo_' . $id . '.96x96.' . $type['category_logo'];\n }\n if (file_exists($url . $id . '/logo_' . $id . '.970x970.' . $type['category_logo'])) {\n $imgArr[] = $url . $id . '/logo_' . $id . '.970x970.' . $type['category_logo'];\n }\n }\n }\n }\n\n $compressedImages = $this->getCompressedImgs();\n\n if ($compressedImages) {\n $imgArr = array_diff($imgArr, $compressedImages);\n }\n\n if (!empty($imgArr)) {\n foreach ($imgArr as $value) {\n $newImgArr[] = $value;\n }\n return $newImgArr;\n }\n return FALSE;\n }", "title": "" }, { "docid": "279ccc9356c09ae60cb459eef372eaf9", "score": "0.6481427", "text": "public function getGalleryImages(): SS_List {\n \t$list = new ArrayList();\n \tforeach ($this->SortedImages() as $image) {\n \t\t$list->add(new GalleryImage($image));\n\t\t}\n\n \treturn $list;\n\t}", "title": "" }, { "docid": "e2db58bee102c1729ce7c71850d5d871", "score": "0.6476383", "text": "public function imageAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $items = $em->getRepository('AppBundle:Item')->findBy(array('type' => 'image'));\n\n return $this->render('item/image_list.html.twig', array(\n 'items' => $items,\n ));\n }", "title": "" }, { "docid": "1a4c162227b72488636365bc096d431f", "score": "0.6469802", "text": "public function getPictureByProductId($id);", "title": "" }, { "docid": "fd3316af119dddc2638811afec778c63", "score": "0.64647865", "text": "public function pictures(){\n\t\treturn $this->pictures;\n\t}", "title": "" }, { "docid": "d9b5718c33e10d85e081d5c27fa1d35c", "score": "0.6459912", "text": "public function getImages($product_ref = string)\n {\n // Required field\n if (!$product_ref) {\n return array();\n }\n $options['product_ref'] = $product_ref;\n $helper = Mage::helper('swisspost_api/Api');\n\n return $helper->call('get_images', $options);\n }", "title": "" }, { "docid": "5cd9472f0e536c336c8e711caa1f1344", "score": "0.6457706", "text": "private function defaultThumbnail()\n {\n return [\n [\n 'width' => 600,\n 'height' => 600,\n 'url' => url( '/images/defaults/product_org.jpg' ),\n 'base_dir' => '/images/defaults/product_org.jpg'\n ],\n [\n 'width' => 50,\n 'height' => 50,\n 'url' => url( '/images/defaults/product_sqr.jpg' ),\n 'base_dir' => '/images/defaults/product_sqr.jpg'\n ],\n [\n 'width' => 280,\n 'height' => 280,\n 'url' => url( '/images/defaults/product_thn.jpg' ),\n 'base_dir' => '/images/defaults/product_thn.jpg'\n ],\n [\n 'width' => 150,\n 'height' => 150,\n 'url' => url( '/images/defaults/product_sml.jpg' ),\n 'base_dir' => '/images/defaults/product_sml.jpg'\n ],\n [\n 'width' => 300,\n 'height' => 300,\n 'url' => url( '/images/defaults/product_mdm.jpg' ),\n 'base_dir' => '/images/defaults/product_mdm.jpg'\n ],\n [\n 'width' => 600,\n 'height' => 600,\n 'url' => url( '/images/defaults/product_lrg.jpg' ),\n 'base_dir' => '/images/defaults/product_lrg.jpg'\n ]\n ];\n }", "title": "" }, { "docid": "4feab5e034be2d5fcce7fc3bafc34291", "score": "0.6456461", "text": "public function images()\n {\n if ($this->images === null) {\n $data = $this->rawData();\n $images = [];\n if (isset($data['entities']['media'])) {\n foreach ($data['entities']['media'] as $media) {\n if (!isset($media['type']) || $media['type'] !== self::ENTITY_TYPE_PHOTO) {\n continue;\n }\n\n if (!isset($media['media_url_https'])) {\n continue;\n }\n\n $images[] = $media['media_url_https'];\n }\n }\n\n $this->images = $images;\n }\n\n return $this->images;\n }", "title": "" }, { "docid": "3c62c165aca481171e85fe94fa257e59", "score": "0.64521605", "text": "public function images()\n {\n return $this->morphMany(Image::class, 'imagable')->orderBy('ordering', 'asc')->orderBy('id', 'asc');\n }", "title": "" }, { "docid": "372baf5b6dd06f1eb1777c5e83f4543e", "score": "0.64438426", "text": "public function images()\n {\n $images = Image::wherePostId($this->id);\n return $images;\n\n }", "title": "" }, { "docid": "7b55435a4b8cc2f131afd6f5ba5a56b6", "score": "0.6443627", "text": "function get_gallery_image_ids( $product ) {\n if ( ! is_a( $product, 'WC_Product' ) ) {\n return;\n }\n\n if ( is_callable( 'WC_Product::get_gallery_image_ids' ) ) {\n return $product->get_gallery_image_ids();\n } else {\n return $product->get_gallery_attachment_ids();\n }\n }", "title": "" }, { "docid": "7ff91253b948bc13f85e9dae8ba7c855", "score": "0.6435939", "text": "public function all($productId, $params = [])\n {\n return $this->client->get(\"products/{$productId}/images.json\", 'images', $params);\n }", "title": "" }, { "docid": "db193635aef316af5136dbe4090b08c3", "score": "0.64322627", "text": "function goods_list_pics($goodslist){\n\t$pics = array();\n\tforeach($goodslist as $gtp=>$gt) {\n\t\t$pic = get_the_post_thumbnail($gtp, array(47,47));\n\t\tif(empty($pic))\n\t\t\t$pic = \"<img src='\".get_template_directory_uri().\"/img/default.png' width='47' height='47'>\";\n\t\t$pics[$gtp] = $pic;\n\t}\n\treturn $pics;\n}", "title": "" }, { "docid": "205fea965780c3486fbf16bfa7c66d98", "score": "0.6431005", "text": "public function index()\n {\n $product_images = $this->productImageRepository->paginate(5);\n return view('admin.product_images.index')->with(['product_images' => $product_images]);\n }", "title": "" }, { "docid": "fa22e7979e0927ea9a6627d0a912e962", "score": "0.64241487", "text": "public function index()\n {\n return ItemImageResource::collection(ItemImage::all());\n }", "title": "" }, { "docid": "9bef88472b4089a69cadafc32f2d50aa", "score": "0.6404933", "text": "public function load_images($id = '')\n {\n if (!$this->input->is_ajax_request()) redirect(base_url());\n $galleries = $this->admin->get_product_gallery($id);\n $result = array();\n foreach ($galleries as $gallery) {\n $img_name = $gallery->image_name;\n $obj['filename'] = $img_name;\n $obj['fileURL'] = PRODUCTS_IMAGE_PATH . $img_name;\n// $obj['fileURL'] = base_url('data/products/' . $id . '/' . $img_name);\n// $obj['filesize'] = filesize(realpath('./data/products/' . $id . '/' . $img_name));\n $obj['filesize'] = $this->curl_get_file_size(PRODUCTS_IMAGE_PATH . $img_name);\n $obj['featured'] = $gallery->featured_image;\n $result[] = $obj;\n }\n header('Content-type: text/json');\n header('Content-type: application/json');\n echo json_encode($result);\n exit;\n }", "title": "" }, { "docid": "cf39d6601056ca9fc30e3c7bda3d08fa", "score": "0.6403125", "text": "public function all_products(){\n// return $this->database->query_database('SELECT * FROM products');\n\n// just for the example:\n return array(\n array(\n 'name' => 'The Brief Wondrous Life of Oscar Wao',\n 'author' => 'Junot Diaz',\n 'image' => IMAGES_URL.'1.jpg'\n ),\n array(\n 'name' => 'The Orphan Master\\'s Son: A Novel (Pulitzer Prize for Fiction)',\n 'author' => 'Adam Johnson',\n 'image' => IMAGES_URL.'2.jpg'\n ),\n array(\n 'name' => 'The Road',\n 'author' => 'Cormac McCarthy',\n 'image' => IMAGES_URL.'3.jpg'\n )\n );\n }", "title": "" }, { "docid": "d7b1c92ec67a790befce2ff6e1286b78", "score": "0.63998365", "text": "public function getImageProductById($id)\n\t{\n\t\t$data = [];\n\t\t$sql = \"SELECT * FROM `image_product` AS a WHERE a.`product_id` = :id\";\n\t\t$stmt = $this->db->prepare($sql);\n\t\tif($stmt){\n\t\t\t$stmt->bindParam(':id', $id, PDO::PARAM_INT);\n\t\t\tif($stmt->execute()){\n\t\t\t\tif($stmt->rowCount() > 0){\n\t\t\t\t\t$data = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t}\n\t\t\t\t$stmt->closeCursor();\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "4b9c1d6a21312e7476896eb38bc9f6e6", "score": "0.63972545", "text": "public function run()\n {\n $images_product = array(\n array('product_id' => '1','image' => 'product/mdaKIF8GJq27VOQYL3A85y3hQ8LgaaLvymwxYMIN.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '2','image' => 'product/TwLz3X3WqkF98xqK9S8qqCyoLMoie5syAs42MaZA.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '2','image' => 'product/M2DR4K6wRgohHucUNusc35nJtzIgKWpMa5T5Im9D.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '3','image' => 'product/3geeJdlbZP3zMlEH2SNrdUkIZctjJDnBaoANn1SQ.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '3','image' => 'product/yvDoyeBHWrGwiqQNpu0PoJEmPwIfQxEgJFSX4uPR.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '3','image' => 'product/1ldLllCe07BQaje8mdITDyJvdNOR39WWvOyF8OYR.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '4','image' => 'product/SU3SXhvZ3vSEjBBtLhJorJXX6If1Jju7qa4ndnau.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '4','image' => 'product/AAHunxoX1e22Z0anbmkKdiwMGJBBFpkX7cHHCqGp.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '4','image' => 'product/lhBeyaX4iY4Os49eZcCPDZst01eaAtKYmlf9EnyM.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '4','image' => 'product/bJj8pRmts8O4OHkXUvH0d8U6IK3uLgvUwAUc0B0w.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '5','image' => 'product/BMnxJUQjNN5FkbPZtVA6zYsr9wipnODRCbSGPeBm.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '5','image' => 'product/FIsEbTcELOy33GrUfCgmUAtqEAL5DTbKXAYSISZF.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '6','image' => 'product/JTeoIVUwYorwJjiqlAe80pOFjqfmQ2IRRE050kSB.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '6','image' => 'product/Vnf74FSKZPrgKZzu4CFZOvoFu00b4UIRr6x6SQq3.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '6','image' => 'product/3vKUjYg0ZIkTjlNmJvSvfZzy5EdFYcppmgrHE4gr.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '7','image' => 'product/wJMubHan2j36rVuACrnDydh9Ybj8CyCeywf76WUq.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '7','image' => 'product/mFDhD65SmPRoaWRELJUmAgP91eolmZTns1uHPwNd.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '7','image' => 'product/wiFQ80tHQMtzxQ9yo2IRbdlo7LGyiQ4U60jlxIju.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '8','image' => 'product/6GigSOsX2FHqP36EvrCZigU5GkLbpMAiWiUiRwgr.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '8','image' => 'product/DcCDT6FuquF0J3HnWxjcCxDV5CAduGNqfXimyELU.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '8','image' => 'product/NEI7PqiV5gCyQx7d8D13EfRX6KMtFo5pQDN9WlPs.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '9','image' => 'product/vIuWv22rM1ZMmS5zCq91FMzoXk99WGG44x1zoZUe.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '9','image' => 'product/2UeCIQMQSEL3CduAX4S2qJccUpocoIwr36b2NxQ1.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '9','image' => 'product/BiSOmkNbYMGsUncpkF9FhyJjM9yrvzy4dlurdWRr.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '10','image' => 'product/jEkfStAzxaXwYQEVrHwKAUI5NUEaz7OHIlGQPPFl.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '10','image' => 'product/LKUdDHCabsww70H9MuIeRKhnAkgb9IJZnWIknwXJ.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '10','image' => 'product/KSr2FC51xNXC3VJxxm6J4soW4TK9crC95pG97sVX.png','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '11','image' => 'product/oIPVv7Vq8FOVVRRQg8XOO8bnPzv3euM1VPQpoQ6G.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '11','image' => 'product/2ud1EZT5kI0jlEfos8GP7kXjDlqb1aGNtq3LRM94.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '11','image' => 'product/hNbGDRnIHQcoNIMoKnYjoE2MHXDHWR5wmP7rfls0.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '12','image' => 'product/UNuYWCOoBz0TNkDw90bz3JYw6PVfH4OUbXoQNIDK.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '12','image' => 'product/tX0U1caW83Bt05oaif96QN3dRtxdnMaqtJE9vvRh.jpeg','created_at' => \\Carbon\\Carbon::now()),\n array('product_id' => '12','image' => 'product/SsgJ9Tvy961vqdnA38uygadAhv2JEi4uNTHRmnar.jpeg','created_at' => \\Carbon\\Carbon::now())\n );\n\n ImagesProduct::insert($images_product);\n }", "title": "" }, { "docid": "3359d6f0d8933c5256e1506ef39f5284", "score": "0.6397011", "text": "public function getImageForProduct()\n {\n $image = null;\n $action = $this->request->param('Action');\n $id = $this->request->param('ID');\n\n if ($action && $action === \"iid\" && $id) {\n $image = $this->Images()->byID($id);\n }\n\n if (!$image) {\n $image = $this->SortedImages()->first();\n }\n \n $this->extend(\"updateImageForProduct\", $image);\n\n return $image;\n }", "title": "" }, { "docid": "db29e31614bff27f74c7ef06ad17e6ea", "score": "0.63934606", "text": "public function images()\n {\n return $this->hasMany('App\\ProductVariantImage', 'product_variant_id', 'id');\n }", "title": "" } ]
f2a32bc21bf704c69a4bb81fb8e41bf6
Sets the feUserData array or an index of the array
[ { "docid": "a9bb7bcb0bdd69a3b0795830f13a2758", "score": "0.70024836", "text": "public function setFeUserData ($value, $key = '')\n {\n if ($key != '') {\n $this->feUserData[$key] = $value;\n } else {\n $this->feUserData = $value;\n }\n }", "title": "" } ]
[ { "docid": "9a450dd554544bae2503661d13990d0b", "score": "0.68257695", "text": "public function set($user_data=array()) \n {\n \n }", "title": "" }, { "docid": "cb48c4c9011f269231e3a203decb132f", "score": "0.65705305", "text": "public function set(array $data)\n\t{\t\tforeach($data as $tag => $value) {\n\t\t\tswitch($tag) {\n\t\t\t\tcase 'passwordChanged':\n\t\t\t\t\t$userid = $_SESSION['userid'];\n\t\t\t\t\t$this->db->update('users', ['passwordChanged' => $value], 'userid = \\''.$userid.'\\'');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "da8c3fc06bace2d99a6b4f049d46b855", "score": "0.6568221", "text": "public function setUserData($userData = array()){\n $this->_user = $userData;\n /*\n * userSession gets used throughout the site for signed in users\n * */\n $this->set(array('userSession' => $userData));\n $testsessionInfo = $this->_user;\n $test=null;\n }", "title": "" }, { "docid": "230482c0f4de2027786249f3d915d852", "score": "0.65612876", "text": "public function setUserData(array $userData) {\n $this->user = $this->mapUserToObject($userData);\n return $this;\n }", "title": "" }, { "docid": "3e9ad514e8c2b5d711d37abdb006fe7d", "score": "0.6497212", "text": "public function set_user_data($data){\n\t\n\t\t$type = gettype($data);\n\t\t\n\t\tif($type != 'object' AND $type != 'array'){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif($type == 'object'){\n\t\t\t$data = get_object_vars($data);\n\t\t}\n\n\t\t//convert ipaddresses back to human readable form!\n\t\tif(isset($data['ipAddress'])){\n\t\t\t$data['ipAddress'] = inet_ntop($data['ipAddress']);\n\t\t}\n\t\t\n\t\t$this->user_data = array_merge($this->user_data, $data);\n\t\t\n\t}", "title": "" }, { "docid": "ff036773e8875041f3a1346db2199777", "score": "0.6483492", "text": "public function set(array $data);", "title": "" }, { "docid": "c0f315b64287d2ab9247f7d85cfe857f", "score": "0.6395174", "text": "public function set_userdata($data = [], $value = '')\n\t{\n\t\tif(is_string($data))\n\t\t{\n\t\t\t$this->userdata['user_data'][$data] = $value;\n\t\t}\n\t\telseif(sizeof($data) > 0)\n\t\t{\n\t\t\tforeach($data as $key => $value)\n\t\t\t{\n\t\t\t\t$this->userdata['user_data'][$key] = $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set cookies for a new session variables\n\t\t$this->write();\n\t}", "title": "" }, { "docid": "14800d49ed793e20be54ac61e3769795", "score": "0.63188285", "text": "abstract public function setData(array $data);", "title": "" }, { "docid": "df6880bf70c0065b700643605712d27d", "score": "0.62860936", "text": "public static function setUserData($key, $value)\n {\n if (!self::debug()) return;\n // get debug trace (so we know where it's setting it)\n $trace = (array) debug_backtrace();\n $src = null;\n foreach ($trace as $line) {\n if (!empty($line['file']) && !empty($line['function']) && $line['function'] == __FUNCTION__) {\n $src = \"Line {$line['line']} in File [{$line['file']}]\";\n break;\n }\n }\n if (!is_string($value) && !is_numeric($value)) {\n $value = self::printVar($value);\n }\n self::$DATA[self::USER][] = array($key, $value, $src);\n\n }", "title": "" }, { "docid": "eca99c639ae8d2e11d8e45adfe563dcb", "score": "0.6283771", "text": "function set_userdata($newdata = array(), $newval = '')\n\t{\n\t\tif (is_string($newdata))\n\t\t{\n\t\t\t$newdata = array($newdata => $newval);\n\t\t}\n\t\n\t\tif (count($newdata) > 0)\n\t\t{\n\t\t\tforeach ($newdata as $key => $val)\n\t\t\t{\n\t\t\t\t$this->userdata[$key] = $val;\n\t\t\t}\n\t\t}\n\t\n\t\t$this->sess_write();\n\t}", "title": "" }, { "docid": "0fc30dfc60340ca3ce151932a6e02809", "score": "0.6264086", "text": "private function setUsersData($data) {\n foreach ($this->necessaryData as $nameOfField) {\n if (isset($data->$nameOfField)) {\n $this->userData[$nameOfField] = $data->$nameOfField;\n }\n }\n }", "title": "" }, { "docid": "9e79a76a58e4723460ee950877fe99fd", "score": "0.6231481", "text": "function setData(array $data);", "title": "" }, { "docid": "483e492a82312068a199752673197720", "score": "0.6143493", "text": "public function setData(array $data) {\n }", "title": "" }, { "docid": "d46254b8c931e4edb3866365a72e900e", "score": "0.61337584", "text": "public function setData(array $data);", "title": "" }, { "docid": "d46254b8c931e4edb3866365a72e900e", "score": "0.61337584", "text": "public function setData(array $data);", "title": "" }, { "docid": "d46254b8c931e4edb3866365a72e900e", "score": "0.61337584", "text": "public function setData(array $data);", "title": "" }, { "docid": "d46254b8c931e4edb3866365a72e900e", "score": "0.61337584", "text": "public function setData(array $data);", "title": "" }, { "docid": "d46254b8c931e4edb3866365a72e900e", "score": "0.61337584", "text": "public function setData(array $data);", "title": "" }, { "docid": "d46254b8c931e4edb3866365a72e900e", "score": "0.61337584", "text": "public function setData(array $data);", "title": "" }, { "docid": "d46254b8c931e4edb3866365a72e900e", "score": "0.61337584", "text": "public function setData(array $data);", "title": "" }, { "docid": "d46254b8c931e4edb3866365a72e900e", "score": "0.61337584", "text": "public function setData(array $data);", "title": "" }, { "docid": "bb9725adea55a0238f4d442d1b36d35a", "score": "0.6132418", "text": "public function setData($data) {\n\t\tif ( is_array($data)) {\n\t\t\t$this->data = $data;\n\t\t}\n\t}", "title": "" }, { "docid": "ae64d8eea0a671e60aa650c3bfdf596f", "score": "0.6121191", "text": "public function setData(array $data)\n {\n }", "title": "" }, { "docid": "45eb2d77774b974ae87be4f594cdb8a3", "score": "0.6093123", "text": "function user_update($user,$new_data)\n{\n\t$idx = user_get_index($user);\n\tif ($idx < 0)\n\t\treturn;\n\n\t$data=$new_data;\n\t$GLOBALS[\"users\"][$idx] = $new_data;\n\treturn _saveUsers();\n}", "title": "" }, { "docid": "ebb919e4d182e048489c3ff8d46cb20f", "score": "0.6080965", "text": "public function setData($data = array())\n\t{\n\t\tforeach ($data as $field => $value) \n\t\t{\n\t\t\t$this->data[$field] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "6a621ad70576113f9d495e4d4bd80a22", "score": "0.60708874", "text": "public function setData(array $data) {\n\t\t$this->data = $data;\n\t}", "title": "" }, { "docid": "15c58a6fee77a748a81ea1b628182c12", "score": "0.6064109", "text": "function SetData( Array $data = [] )\n\t{\n\t\tif( $this->m_bAlterKeyCase )\n\t\t\tArrayKeyCase( $data );\n\n\t\t$this->m_Data = $data;\n\t}", "title": "" }, { "docid": "48a74034ec7bbf0a5d19ffbf54b485c5", "score": "0.6060541", "text": "public function setData(array $data) {\n $this->data = $data;\n }", "title": "" }, { "docid": "05a958c0122a51b4ac56175009124217", "score": "0.60460514", "text": "function set_userdata($newdata = array(), $newval = '')\n\t{\n\t\tif (is_string($newdata))\n\t\t{\n\t\t\t$newdata = array($newdata => $newval);\n\t\t}\n\n\t\tif (count($newdata) > 0)\n\t\t{\n\t\t\tforeach ($newdata as $key => $val)\n\t\t\t{\n\t\t\t\t$_SESSION[$key] = $val;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "37769c93293c0c9539961158ba416e73", "score": "0.6045138", "text": "public function set_data(array $data)\n {\n $this->_data = $data;\n }", "title": "" }, { "docid": "42b0c98b7049b713c60ceedfecd2df6f", "score": "0.6039164", "text": "public function setData($data)\n\t{\n\t\tif (!empty($data)) {\n\t\t\t$this->_inData = (array)$data;\n\t\t}\n\t}", "title": "" }, { "docid": "991c8e559a96cb937f9b562f74e7f0ca", "score": "0.60254335", "text": "function set_userdata($newdata = array(), $newval = '')\n\t{\n\t (is_string($newdata))\n\t \t? $newdata = array($newdata => $newval)\n\t \t: false;\n\t\n\t if(count($newdata) > 0)\n\t \t{\n\t foreach($newdata as $key => $val)\n\t {\n\t $_SESSION[$key] = $val;\n\t }\n\t \t}\n\t}", "title": "" }, { "docid": "2a2a07e62c536f492145e0f3dd658cc9", "score": "0.60077566", "text": "public function setOriginalData(array $data);", "title": "" }, { "docid": "54f224973db0af66b42c756381db6f0d", "score": "0.5999298", "text": "public function setUsers(?array $value): void {\n $this->getBackingStore()->set('users', $value);\n }", "title": "" }, { "docid": "43c7c0fb1b881fed5b5997e56b2fa2d6", "score": "0.5982989", "text": "public function setData($data)\n {\n $this->data = (array) $data;\n }", "title": "" }, { "docid": "7feea4884ac50e69d2392d788a268503", "score": "0.59684134", "text": "private function setPostDataToDataArray()\n\t{\n\t\ttry\n\t\t{\n\t\t\t# Set the Database instance to a variable.\n\t\t\t$db=DB::get_instance();\n\n\t\t\t# Check if the form has been submitted.\n\t\t\tif(array_key_exists('_submit_check', $_POST) && (isset($_POST['send']) && ($_POST['send']=='Send Request')))\n\t\t\t{\n\t\t\t\t$data=$this->getData();\n\n\t\t\t\t# Check if email POST data was sent.\n\t\t\t\tif(isset($_POST['email']))\n\t\t\t\t{\n\t\t\t\t\t# Set the email to the User data member.\n\t\t\t\t\t$data['Email']=trim($_POST['email']);\n\t\t\t\t}\n\n\t\t\t\t# Reset the data array to the data member.\n\t\t\t\t$this->setData($data);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tthrow $e;\n\t\t}\n\t}", "title": "" }, { "docid": "52d476eeb4b9c5513eb4fc1a8b636275", "score": "0.594683", "text": "public function setData(array $data)\n\t{\n\t\t$this->data = $data;\n\t}", "title": "" }, { "docid": "9f24ca4ad93716ef09c271c183239b34", "score": "0.59443367", "text": "function set_update_fields($data)\n\t{\n\t\tif(is_array($data))\n\t\t{\n\t\t\tforeach($data AS $key => $row)\n\t\t\t{\n\t\t\t\t$this->_update_fields[] = $row;\n\t\t\t}\n\t\t} else \n\t\t{\n\t\t\t$this->_update_fields = $data;\n\t\t}\n\t}", "title": "" }, { "docid": "27eda3dcbb91d1fccdcdedd2fa659c8a", "score": "0.59392583", "text": "public function setData($data = array())\n {\n foreach ($data as $key => $value) {\n $this->{\"set\".$key}($value); //realizar o acesso via get e set\n }\n }", "title": "" }, { "docid": "f5a0c6f6deca607bde048cddd89f3b52", "score": "0.59219927", "text": "public function updateUser(array $data)\n {\n\n }", "title": "" }, { "docid": "6a592c1e381543ae9c29acd6041dd9df", "score": "0.5914033", "text": "function set_data ($item, $value = null, $user = false) {\n\t\t$user = (int)$user ?: $this->id;\n\t\tif (!$item || $user == User::GUEST_ID) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!is_array($item)) {\n\t\t\t$item = [\n\t\t\t\t$item => $value\n\t\t\t];\n\t\t}\n\t\t$params = [];\n\t\tforeach ($item as $i => $v) {\n\t\t\t$params[] = [$i, _json_encode($v)];\n\t\t}\n\t\tunset($i, $v);\n\t\t$result = $this->db_prime()->insert(\n\t\t\t\"REPLACE INTO `[prefix]users_data`\n\t\t\t\t(\n\t\t\t\t\t`id`,\n\t\t\t\t\t`item`,\n\t\t\t\t\t`value`\n\t\t\t\t) VALUES (\n\t\t\t\t\t$user,\n\t\t\t\t\t'%s',\n\t\t\t\t\t'%s'\n\t\t\t\t)\",\n\t\t\t$params\n\t\t);\n\t\t$this->cache->del(\"data/$user\");\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "8c89a2becd825c2a3cbd30698b58b131", "score": "0.5912991", "text": "public function setUserData($value)\n {\n return $this->set('UserData', $value);\n }", "title": "" }, { "docid": "11d8ec175cecebc9c104780f6d6c58dd", "score": "0.59041935", "text": "public function setData(array $data)\n\t{\n\t\t$this->data\t\t= $data;\n\t}", "title": "" }, { "docid": "ad95e1c0277eb20bc65b25f00637bee0", "score": "0.58934915", "text": "public function setData($data = array())\n {\n foreach ($data as $key => $value) {\n $this->{\"set\" . $key}($value);\n }\n }", "title": "" }, { "docid": "d0974e18d11ee20740cdb19740092169", "score": "0.58913916", "text": "public function setDataArray(array $data)\n {\n $this->data = $data;\n }", "title": "" }, { "docid": "cc22f49f459f483baf444d2d176c575e", "score": "0.58911914", "text": "public function setdata($data);", "title": "" }, { "docid": "99c45ff65be63efdfd20a28ed9b41634", "score": "0.5863421", "text": "private function setUserData()\n {\n $this->userData = $this->verificationLinkData->user;\n }", "title": "" }, { "docid": "ff4b736d0da699f71a2b83a22d272c55", "score": "0.5859718", "text": "public function set_data($data);", "title": "" }, { "docid": "c146383018387d3dd1ced3e1bf8c5417", "score": "0.58352154", "text": "public function setData(array $data): void;", "title": "" }, { "docid": "3e60a752c3969598d52267ea0ebb7da3", "score": "0.5819281", "text": "public function set(array $data, $lastIndex = null);", "title": "" }, { "docid": "e008120fdea64778716aba9e5e56679d", "score": "0.58117133", "text": "public function offsetSet($offset, $value) {\n // if (is_null($offset)) {\n // $this->data[] = $value;\n // } else {\n // $this->data[$offset] = $value;\n // }\n \n }", "title": "" }, { "docid": "0349698000acdae45a8fc17a9d3bc92d", "score": "0.58086854", "text": "public function setLocalData(array $data)\n\t{\n\t\t$this->localData = $data;\n\t}", "title": "" }, { "docid": "48067b89005052cf1fc6cb52ec5073d0", "score": "0.57981175", "text": "public function setData(array &$data): void {\r\n $this -> data = &$data;\r\n }", "title": "" }, { "docid": "3d3d54902414b35632195628ba6b732a", "score": "0.57976335", "text": "public static function set_userdata($newdata = array(), $newval = '') {\n\t\tif (is_string($newdata)) {\n\t\t$newdata = array($newdata => $newval);\n\t\t}\n\n\t\tif (count($newdata) > 0) {\n\t\tforeach ($newdata as $key => $val) {\n\t\t\t$_SESSION[$key] = $val;\n\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a15c3a377a6fa8c47487362eece72f03", "score": "0.5793142", "text": "function setData( $data );", "title": "" }, { "docid": "d1cb627a8af431451e8f9eeba9cfc8a7", "score": "0.57531506", "text": "public function set($data);", "title": "" }, { "docid": "d1cb627a8af431451e8f9eeba9cfc8a7", "score": "0.57531506", "text": "public function set($data);", "title": "" }, { "docid": "8fbd72df6409a3e469035c6b909e5df8", "score": "0.57454586", "text": "public function setLdapData(array $userData, array $groupData);", "title": "" }, { "docid": "b32759e569fd4c49270e278d20a4e403", "score": "0.5742757", "text": "public function offsetSet($offset, $value)\n\t{\n\t\tif ($offset === 'id') return; // you can not change id\n\n\t\tif ($this->dataType === 'item' && is_string($offset))\n\t\t{\n\t\t\t$this->data[$offset] = $value;\t\n\t\t}\n\t}", "title": "" }, { "docid": "da082950272d4120d7beba8b14f292b3", "score": "0.5737166", "text": "public function setData(array $data = null)\n {\n $this->data = $data;\n }", "title": "" }, { "docid": "d0659e8643d790e496198bfc890cbab7", "score": "0.57344896", "text": "public function setUserAttributeValues(?array $value): void {\n $this->getBackingStore()->set('userAttributeValues', $value);\n }", "title": "" }, { "docid": "4c7996c6d89e3c2622f7f9cbae29bd6d", "score": "0.5731321", "text": "public function update(int $userId, array $userData) : void\n {\n foreach ($this->data as $key => $user) {\n if ($user['id'] == $userId) {\n $this->data[$key] = $userData;\n }\n }\n }", "title": "" }, { "docid": "671f37f27a027d8dcf95d49a12fb8703", "score": "0.5724428", "text": "public function setFromArray(array $data) {\n foreach ($data as $key => $value) {\n $this->{$key} = $value;\n }\n }", "title": "" }, { "docid": "fed03dcec0bb50962117c93e079d715f", "score": "0.5720566", "text": "public function updateUserDataProvider()\n {\n // use the factory to create a Faker\\Generator instance\n $fakerFa = Factory::create('fa_IR');\n $fakerEn = Factory::create();\n\n $doubleEmail = $fakerEn->email;\n $doubleMobile = $fakerFa->mobileNumber;\n\n return [\n [['name' => $fakerFa->name, 'family' => $fakerEn->lastName], 1],\n [['mobile' => '009390675600'], 1],\n [['mobile' => '09390675600'], 1],\n [['mobile' => '+989390675600'], 1],\n [['mobile' => '989390675600'], 1],\n [['mobile' => $doubleMobile], 1],\n [['email' => $fakerEn->domainName], 0],\n [['email' => $fakerFa->userName], 0],\n [['email' => $fakerFa->name], 0],\n [['email' => $doubleEmail], 1],\n [['status' => User::STATUS_ACTIVE], 1],\n [['status' => User::STATUS_BLOCK], 1],\n [['status' => $fakerEn->numberBetween(0, 100)], 0],\n [['status' => $fakerEn->name], 0],\n ];\n }", "title": "" }, { "docid": "e0210dbdf3c64205b652903f365f63cc", "score": "0.57185423", "text": "public static function SET_DATA(array $data = [], string $context = null);", "title": "" }, { "docid": "0a6ae037475f95a385a882a134a8f4e6", "score": "0.5703", "text": "private function setUserData(): void\n {\n $url = \"https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=\" . self::STEAM_API_KEY . \"&steamids=\" . $this->steam_id;\n $content = json_decode(file_get_contents($url), true, 512, JSON_THROW_ON_ERROR);\n if (isset($content['response']['players'][0])) {\n $pd = $content['response']['players'][0];\n $this->user_data = array(\n 'steam_id' => $pd['steamid'],\n 'name' => $pd['personaname'],\n 'avatar' => $pd['avatarfull'],\n 'avatar_med' => $pd['avatarmedium'],\n 'state' => $pd['personastate'],\n 'profile_state' => $pd['profilestate'],\n 'url' => $pd['profileurl']\n );\n echo json_encode($this->user_data);\n } else {\n $this->user_data = array();\n }\n }", "title": "" }, { "docid": "077eb656c1f7049f6ea2cdc0fe0c7350", "score": "0.5688647", "text": "public function set(array $doc);", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "8ce02d1ae0c08951616766ab4efcc16a", "score": "0.5667372", "text": "public function setAdditionalData(?array $value): void {\n $this->getBackingStore()->set('additionalData', $value);\n }", "title": "" }, { "docid": "5b2fffd2a4efe43ae0928d8d304467a2", "score": "0.5656112", "text": "public function setData($data = array()){\n\n $user = new User();\n\n $user->setId($data['idUser']);\n $user->setFirstName($data['firstName']);\n $user->setLastName($data['lastName']);\n $user->setEmail($data['email']);\n $user->setPassword($data['password']);\n $user->setState($data['state']='1');\n $user->setDate(new DateTime($data['date']));\n\n return $user;\n\n }", "title": "" }, { "docid": "b3c22aaf6ee43aa65736d88bbd7aef19", "score": "0.5648667", "text": "public function setData(array $data_array)\n {\n $this->data = $data_array;\n }", "title": "" }, { "docid": "2fbde90038260022f5e308c1df1c77d0", "score": "0.5648171", "text": "public function setData($data){\n\t\t$this->setIduser($data['id_user']);\n\t\t$this->setDeslogin($data['des_login']);\n\t\t$this->setDessenha($data['des_senha']);\n\t\t//Estamos a meter a data bem formada\n\t\t$this->setDtregisto(new DateTime($data['dt_registo']));\n}", "title": "" }, { "docid": "9912fa984aa07996e03bce40126b1c90", "score": "0.5613531", "text": "function set_Data($data){\n\t\t$this->data -> $data;\n\t}", "title": "" }, { "docid": "1d92fc5a21a29ad297ee8208487e20e9", "score": "0.5610931", "text": "function offsetSet($offset,$value) {\n $this->set($offset,$value);\n }", "title": "" }, { "docid": "ac716b3d83871472fadb069bca025eb0", "score": "0.5610127", "text": "public function offsetSet($offset, $value) {}", "title": "" }, { "docid": "9cee7f262ba75382119aa6437c45faf4", "score": "0.560725", "text": "private function setData($data){\n \n if(is_array($data)) {\n $this->setValuesFromArray($data);\n }\n else if(is_a ($data, get_class($this))) {\n $this->setValuesFromObject($data);\n }\n }", "title": "" }, { "docid": "4ff14a1638c246e464ae8a5055439f6b", "score": "0.56053764", "text": "public function setData($data)\n\t{\n\t\tif (!is_array($data))\n\t\t{\n\t\t\tthrow new LBHToolkit_TableMaker_Exception(\"The provided data is not a valid array.\");\n\t\t}\n\t\t\n\t\t$this->data = $data;\n\t}", "title": "" }, { "docid": "5fcd5065603896a4cdfaa708f52015d9", "score": "0.5601531", "text": "public function assignData(array $data){\n if(is_array($data)): // If Data is an Array\n $this->id = $data['user_id'];\n $this->name = $data['user_name']; // Assign Name from Data\n $this->email = $data['user_email']; // Assign Email from Data\n $this->alias = $data['user_alias']; // Assign Alias from Array\n $this->loggedIn = true; // Set Logged in to True\n $_SESSION['user'] = array( // Assign data to PHP Session\n 'user_id' => $this->id,\n 'user_name' => $this->name,\n 'user_email' => $this->email,\n 'user_alias' => $this->alias\n );\n else: // If Data is not an Array\n return false; //@return false\n endif;\n }", "title": "" }, { "docid": "9703899883999981fd98babaefcf965b", "score": "0.55849445", "text": "public function set_data()\n {\n }", "title": "" }, { "docid": "efbd4519a0e382bfaeee5188875a07f6", "score": "0.5572922", "text": "public function setData($data) {\n\t}", "title": "" } ]
bae1d4716b80bf887b395cf476905dfc
This extracts the paramters from the URL
[ { "docid": "9cef78fd1c78dc9e3bd60fccf9b31c67", "score": "0.65160996", "text": "private function extractURLParams($matches){\r\n $url_params = array();\r\n\r\n foreach ($matches as $key => $value){\r\n if(is_string($key)){\r\n $url_params[$key] = $value;\r\n }\r\n }\r\n return $url_params;\r\n }", "title": "" } ]
[ { "docid": "d57f877ad8732e0e7539a389614ddec4", "score": "0.78220195", "text": "private function parseRequest()\n {\n if (isset($_GET['url'])) {\n $params = $_GET;\n\n $params['url'] = explode('/', filter_var(rtrim($params['url'], '/'), FILTER_SANITIZE_URL));\n\n return $params;\n }\n }", "title": "" }, { "docid": "9b7ba61e5c270336564680ad9aa74acd", "score": "0.7734457", "text": "public function getUrlParams() {\n\t\t$query = !empty($this->endpointParts['query']) ? $this->endpointParts['query'] : '';\n\t\tparse_str($query, $result);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "d291883b7c100f114b7fd69dcd3a7fd7", "score": "0.74680513", "text": "private function parseURL() {\n $requestedURI = $_SERVER['REQUEST_URI'];\n\n $url = explode('/', $_SERVER['REQUEST_URI']);\n\n if (empty($url[1])) $this->handleError('Missing params');\n\n $rawParams = explode('&', explode('?', $url[1])[1]);\n $params = array();\n\n foreach ($rawParams as $key => $value) {\n if (!empty($value)) {\n $param = explode('=', $value);\n $params[$param[0]] = $param[1];\n }\n }\n\n if (!array_key_exists('page', $params)) $this->handleError('Missing param: page');\n\n $this->url_params = $params;\n }", "title": "" }, { "docid": "a4ebdee015d67c02cc63f956b703294d", "score": "0.7318678", "text": "private static function getUrlParams()\n {\n $url = $_SERVER['REQUEST_URI'];\n $question = strpos($url, \"?\");\n if($question !== FALSE)\n return substr($url, $question);\n else\n return \"\";\n }", "title": "" }, { "docid": "c04096dd0df997119c73016789f6744a", "score": "0.7280049", "text": "public static function getUrlParams($url){\n\t\t$uri = explode('?', $url);\n\t\t$params = explode('&', empty($uri[1]) ? '' : $uri[1]);\n\t\treturn $params;\n\t}", "title": "" }, { "docid": "5b063874d99295d5b80264025638acb4", "score": "0.72054577", "text": "private static function ParseQueryParams() {\r\n $q = $_SERVER['REQUEST_URI'];\r\n $q = substr($q, strpos($q, \"?\") + 1);\r\n $q = explode(\"&\", $q);\r\n\r\n $result = [];\r\n\r\n foreach($q as $x) {\r\n $y = explode(\"=\", $x);\r\n if(count($y) > 1)\r\n $result[$y[0]] = $y[1];\r\n }\r\n\r\n $_GET = $result;\r\n }", "title": "" }, { "docid": "cb29071343b954132bc381fea7ba3227", "score": "0.7153771", "text": "public function getParams(){\n if(count($this->url)){\n $this->params = $this->url;\n }\n }", "title": "" }, { "docid": "3f39d2ba44f4222b1f37300b03ea0281", "score": "0.71053916", "text": "public function parseUrl()\n\t{\n\t\tif (isset($_GET['url'])) {\n\t\t\t\n\t\t\treturn $url = explode('/', filter_var(rtrim($_GET['url'],'/'), FILTER_SANITIZE_URL)) ; \n\t\t}\n\t}", "title": "" }, { "docid": "e01b90b8d2974e1e9c5d7a380c0141d1", "score": "0.70419294", "text": "function extract() {\n\t\t$params = array();\n\t\t$url = explode('/',$this->url);\n\t\t\n\t\tif (empty($url[0])) {\n\t\t\tarray_shift($url);\n\t\t}\n\t\t\n\t\tif (empty($url[0])) {\n\t\t\t$params['controller'] = 'docs';\n\t\t} elseif ($url[0]=='ajax') {\n\t\t\t$this->ajax = true;\n\t\t\tarray_shift($url);\n\t\t\t$params['controller'] = empty($url[0])?'docs':$url[0];\n\t\t} else {\n\t\t\t$params['controller'] = $url[0];\n\t\t}\n\t\t\n\t\tarray_shift($url);\n\t\t\n\t\tif (empty($url[0])) {\n\t\t\t$params['action'] = 'index';\n\t\t} else {\n\t\t\t$params['action'] = $url[0];\n\t\t}\n\t\t\n\t\tarray_shift($url);\n\t\t\n\t\tforeach ($url as $key=>$val) {\n\t\t\tif (!empty($val)) {\n\t\t\t\t$params['params'][$key] = $val;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $params;\n\t}", "title": "" }, { "docid": "62e115bb69ae6cd012e22974bf38ba8b", "score": "0.7022318", "text": "public function parseUrl() {\n if (isset($_GET['url'])) {\n return $url = explode('/', filter_var(rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL));\n }\n }", "title": "" }, { "docid": "12721edff1f21109b28e0ac4fb32df1a", "score": "0.7021252", "text": "public function parseUrl()\n\t{\n\t\tif (isset($_GET['url']))\n\t\t{\n\t\t\treturn explode('/', filter_var( rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL) );\n\t\t}\n\t}", "title": "" }, { "docid": "bd47ece2cfaa8bc8df99e31ff63e97d8", "score": "0.70040464", "text": "function getParameters() {\n $resource = $_SERVER['REQUEST_URI'];\n $param_string = \"\";\n $param_array = array();\n if (strstr($resource, '?')) {\n # URI has parameters\n $param_string = substr($resource, strpos($resource, '?')+1);\n $parameters = explode('&', $param_string); \n foreach ($parameters as $single_parameter) {\n $param_name = substr($single_parameter, 0, strpos($single_parameter, '='));\n $param_value = substr($single_parameter, strpos($single_parameter, '=')+1);\n $param_array[$param_name] = $param_value;\n }\n }\n return $param_array;\n }", "title": "" }, { "docid": "6d7771f2779d8900aa69e1be915134b6", "score": "0.6988797", "text": "public function parseUrl()\n {\n if (isset($_GET['url'])) {\n return $url = explode('/', filter_var(rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL));\n }\n }", "title": "" }, { "docid": "99e01a6816a4334ba53f90ab0763e99f", "score": "0.6984982", "text": "function parseURL() {\n global $username;\n global $scroll_to_id;\n\n if ($_SERVER[\"REQUEST_METHOD\"] == \"GET\") {\n $parsed_url = parse_url($_SERVER[\"REQUEST_URI\"], PHP_URL_QUERY);\n $params = array();\n parse_str($parsed_url, $params);\n\n if (isset($params['username'])) {\n $username = $params['username'];\n }\n\n if (isset($params['scroll_to_id'])) {\n $scroll_to_id = $params['scroll_to_id'];\n }\n }\n }", "title": "" }, { "docid": "c6f51497e3437778306ac959654cb128", "score": "0.6945041", "text": "public function parseUrl()\n {\n $get = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING);\n if(isset($get['url'])){\n $args = explode('/', rtrim($get['url'], '/') );\n return $args;\n }else{\n return FALSE;\n }\n }", "title": "" }, { "docid": "e7d365bf05944f298a850a69f28328ac", "score": "0.6916314", "text": "private function parseGETParams($url) {\n if (strpos($url, \"%3f\")) {\n $$url = substr($url, 0, strpos($url, \"%3f\"));\n $params = $this->parseQueryString(substr($url, strpos($url, \"%3f\") + 3));\n return $params;\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "4b3f37f8f6e3c69cd2148e98d1b794ef", "score": "0.69042134", "text": "function getParameters() {\n $resource = $_SERVER['REQUEST_URI'];\n $param_string = \"\";\n $param_array = array();\n if (strstr($resource, '?')) {\n # URI has parameters\n $param_string = substr($resource, strpos($resource, '?')+1);\n $parameters = explode('&', $param_string);\n foreach ($parameters as $single_parameter) {\n $param_name = substr($single_parameter, 0, strpos($single_parameter, '='));\n $param_value = substr($single_parameter, strpos($single_parameter, '=')+1);\n $param_array[$param_name] = $param_value;\n }\n }\n return $param_array;\n}", "title": "" }, { "docid": "128ff644214cc07bf3192acaa6bbe2f8", "score": "0.68518424", "text": "function remove_and_store_params()\n {\n // Store URI for debugging\n $param_pattern = '#('; // begin match group\n $param_pattern .= '\\?'; // match a '?';\n $param_pattern .= '|'; // OR\n $param_pattern .= '\\&'; // match a '?';\n $param_pattern .= ')'; // end match group\n $param_pattern .= '.*$'; // continue matching characters until end of string\n $param_pattern .= '#'; // end match\n\n $matches = Array();\n preg_match($param_pattern, $this->EE->uri->uri_string, $matches);\n $url_params = (isset($matches[0])) ? $matches[0] : '';\n $this->EE->uri->uri_string = preg_replace($param_pattern, '', $this->EE->uri->uri_string);\n\n return $url_params;\n }", "title": "" }, { "docid": "d85e2fb5fb68e22a3f5dadae9ea9e3a0", "score": "0.67916286", "text": "private function splitUrl() {\n if (isset($_GET['url'])) {\n\n // split URL\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n\n // Put URL parts into according properties\n // By the way, the syntax here if just a short form of if/else, called \"Ternary Operators\"\n // http://davidwalsh.name/php-shorthand-if-else-ternary-operators\n $this->url_controller = (isset($url[0]) ? $url[0] : null);\n $this->url_action = (isset($url[1]) ? $url[1] : null);\n $this->url_parameter_1 = (isset($url[2]) ? $url[2] : null);\n $this->url_parameter_2 = (isset($url[3]) ? $url[3] : null);\n $this->url_parameter_3 = (isset($url[4]) ? $url[4] : null);\n }\n }", "title": "" }, { "docid": "573f5885d58b8565a1e0639bd98975e9", "score": "0.67744255", "text": "public function parseUrl() {\n\n\t\tif (isset($_GET['url'])) {\n\t\techo $_GET['url'];\n\t\t\t$url = rtrim($_GET['url'], '/');\n\n\t\t\t$url = filter_var($url, FILTER_SANITIZE_URL);\n\n\t\t\t$url = explode('/',$url);\n\t\t\t\n\n\t\t\treturn $url;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "a191c0a7863bbde6e36f46522f1f7a9c", "score": "0.6772531", "text": "public function parseURL()\n {\n if( isset($_GET['url']) ) {\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n return $url;\n };\n }", "title": "" }, { "docid": "bfd50cdf9c70fabca3a3b379a73f49ce", "score": "0.67683655", "text": "private function splitUrl() {\n if (isset($_GET['url'])) {\n // split URL\n $url = trim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n $this->url_controller = isset($url[0]) ? ucwords($url[0]) . 'Controller' : null;\n $this->url_action = isset($url[1]) ? $url[1] . 'Action' : null;\n unset($url[0], $url[1]);\n $this->url_params = array_values($url);\n\n }\n }", "title": "" }, { "docid": "2c654a050f2eca8f51874c764fe927ed", "score": "0.6738763", "text": "private function _parseURL()\r\n {\r\n if(isset($_GET['url']) && !empty($_GET['url'])) {\r\n $url = explode('/', filter_var(trim(rtrim($_GET['url'], '/')), FILTER_SANITIZE_URL));\r\n return $url;\r\n }\r\n }", "title": "" }, { "docid": "bd8eae13b59854c47f04de9b44cc1788", "score": "0.6726585", "text": "public function extractRequestParams() \r\n\t{\r\n\t\t$params = $this->getAllowedParams();\r\n\t\t$results = array ();\r\n\r\n\t\tforeach ($params as $paramName => $paramSettings)\r\n\t\t\t$results[$paramName] = $this->getParameterFromSettings($paramName, $paramSettings);\r\n\r\n\t\treturn $results;\r\n\t}", "title": "" }, { "docid": "36e40585e9a9450d2362204ce757ed90", "score": "0.6726429", "text": "static function getVarsFromUrl()\n\t{\t\n\t\t$vars = array();\n\t\t\n\t\t$cr_route = self::getRoute();\n\t\t\n\t\t$parts = explode('/', $cr_route);\n\t\t\n\t\tif(!empty($parts[2]))\n\t\t{\n\t\t\tunset($parts[0], $parts[1]);\n\t\t\t$parts = array_values($parts);\n\t\t\t\n\t\t\t$total = count($parts);\n\t\t\tfor($i = 0; $i < $total; $i += 2)\n\t\t\t{\n\t\t\t\tif(!empty($parts[$i]))\n\t\t\t\t\t$vars[$parts[$i]] = isset($parts[$i + 1]) ? addslashes($parts[$i + 1]) : null;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "8915dbceac99a19d8fe177be80f39fb8", "score": "0.67001957", "text": "function parsePaginacaoOrdenacao4444444(){\n \n parse_str(parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY), $url); \n\n $order = $url['order'] ?? 'id';\n $sens = $url['sens'] ?? 'asc';\n $where = $order .' '.$sens;\n $pag = $url['pag'] ?? 1;\n $modo = $url['modo'] ?? 't';\n\n return compact('order','sens','where','pag','modo');\n }", "title": "" }, { "docid": "15798fe3f33ae94e5629c07f9af9c522", "score": "0.6692997", "text": "protected function get_url_params() {\n\t\t// @codingStandardsIgnoreStart\n\t\tif ( ! empty( $_REQUEST[ $this->prefix ] ) ) {\n\t\t\t$prefixed_params = (array) $_REQUEST[ $this->prefix ] ;\n\t\t// @codingStandardsIgnoreEnd\n\t\t} else {\n\t\t\t$prefixed_params = [];\n\t\t}\n\t\treturn $prefixed_params;\n\t}", "title": "" }, { "docid": "681068b616f56d529916fe3ddfa9909d", "score": "0.66603285", "text": "protected function _get_params()\n\t{\n\t\treturn array('url_original', 'url_seo', 'url_base');\n\t}", "title": "" }, { "docid": "045445c3cc4bc239eeffb40c9cc21ace", "score": "0.66548324", "text": "public function getParameters(): array\n {\n if(!array_key_exists('query', $this->url)){\n return [];\n }\n\n $query = $this->url['query'];\n\n parse_str($query, $parameters);\n\n return $parameters;\n }", "title": "" }, { "docid": "82ae8274183a54ae5fe2c296431a36d6", "score": "0.6614049", "text": "function inicializaParametrosURL3333333(){\n parse_str(parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY), $params);\n\n $default = [\n 'pag'=>1,\n 'modo'=>'t', \n 'order'=>'id',\n 'sens'=>'asc',\n ];\n\n return array_merge($default,array_intersect_key($params, $default));\n}", "title": "" }, { "docid": "3d13b19c530699e817d02e86d4a067ab", "score": "0.66028583", "text": "function split_url() {\n\tglobal $_GET;\n\t\n\t$url = $_GET['url'];\n\t$url = split('/', $url);\n\t\n\t$key = array('lang', 'mod', 'func', 'p', 'val', 'q');\n\t$eval = array('strlen($val) == 2', 'true', 'true', \"strpos('pag-')\", 'true', 'true');\n\t\n\tforeach ($url as $v) {\n\t\tif (strpos($v, '_')) {\n\t\t\t$v = split('_', $v);\n\t\t\t\n\t\t\tforeach ($v as $val) {\n\t\t\t\tif (eval($eval[0])) {\n\t\t\t\t\t$_GET[$key[0]] = $v;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tarray_shift($key);\n\t\t\t\tarray_shift($eval);\n\t\t\t}\n\t\t} else {\n\t\t\t$val = $v;\n\t\t\tif (eval($eval[0])) {\n\t\t\t\t$_GET[$key[0]] = $v;\n\t\t\t}\n\t\t\t\n\t\t\tarray_shift($key);\n\t\t\tarray_shift($eval);\n\t\t}\n\t}\n\t\n}", "title": "" }, { "docid": "8e43b28483e2ec8f8bb5448b7a7920ba", "score": "0.65773535", "text": "function parseURL() {\n global $username;\n\n if ($_SERVER[\"REQUEST_METHOD\"] == \"GET\") {\n $parsed_url = parse_url($_SERVER[\"REQUEST_URI\"], PHP_URL_QUERY);\n $params = array();\n parse_str($parsed_url, $params);\n\n if (isset($params['username'])) {\n $username = $params['username'];\n }\n }\n }", "title": "" }, { "docid": "40b85b55656f05bbf61e81d718280ddb", "score": "0.65717775", "text": "private function _extractUrl($url)\n {\n $aUrl = @parse_url($url);\n if (isset($aUrl['query'])) {\n $aUrl['query'] = str_replace('&amp;', '&', $aUrl['query']);\n parse_str($aUrl['query'], $aUrl['params']);\n }\n if (!isset($aUrl['params']) && !is_array($aUrl['params'])) {\n $aUrl['params'] = array();\n }\n return $aUrl;\n }", "title": "" }, { "docid": "df2d160a5bb9183a6296e5a033486b6e", "score": "0.65531415", "text": "protected function extractParams() {\n\t\tif ( !empty( $this->params ) )\n\t\t\treturn;\n\n\t\t$this->description = (string) $this->obj->description[0];\n\t\t$this->extractAnchors();\n\t\t\t\n\t\tforeach( self::$paramsList as $key => $extra ) {\n\t\t\n\t\t\t$method = \"extract_$key\";\n\t\t\t$this->$method();\n\t\t}\n\n\t\tunset( $this->obj );\n\t}", "title": "" }, { "docid": "84060851d35fa284c9bb6c41a985a068", "score": "0.65500224", "text": "private function splitURL()\n {\n if (isset($_GET['url'])) {\n\n // Split URL\n $url = trim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n\n // Set active controller & action\n $this->activeController = (isset($url[0]) ? $url[0] : null);\n $this->activeAction = (isset($url[1]) ? $url[1] : null);\n\n // Remove active controller & action from URL\n unset($url[0], $url[1]);\n\n // Set URL params\n $this->activeParams = array_values($url);\n }\n }", "title": "" }, { "docid": "9ecfc0d07d30b65eec4c409865209547", "score": "0.65243", "text": "private function splitUrl()\n {\n if (isset($_GET['url'])) {\n\n // split URL\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n\n // Put URL parts into according properties\n // By the way, the syntax here is just a short form of if/else, called \"Ternary Operators\"\n // @see http://davidwalsh.name/php-shorthand-if-else-ternary-operators\n $this->url_controller = (isset($url[0]) ? $url[0] : null);\n $this->url_action = (isset($url[1]) ? $url[1] : null);\n $this->url_parameter_1 = (isset($url[2]) ? $url[2] : null);\n $this->url_parameter_2 = (isset($url[3]) ? $url[3] : null);\n $this->url_parameter_3 = (isset($url[4]) ? $url[4] : null);\n\n // for debugging. uncomment this if you have problems with the URL\n // echo 'Controller: ' . $this->url_controller . '<br />';\n // echo 'Action: ' . $this->url_action . '<br />';\n // echo 'Parameter 1: ' . $this->url_parameter_1 . '<br />';\n // echo 'Parameter 2: ' . $this->url_parameter_2 . '<br />';\n // echo 'Parameter 3: ' . $this->url_parameter_3 . '<br />';\n }\n }", "title": "" }, { "docid": "e099f5d2dbba102a286f4fef90406ea7", "score": "0.6521208", "text": "public function getRouteParams();", "title": "" }, { "docid": "e099f5d2dbba102a286f4fef90406ea7", "score": "0.6521208", "text": "public function getRouteParams();", "title": "" }, { "docid": "51b4edb4787eff364d191a98e124d22c", "score": "0.64735883", "text": "public function parseURL()\n\t{\n\t\tif( isset($_GET['url']))\n\t\t{ //agar diakhir tidak ada garing \"/\" menggunakan rtrim\n\t \t//rtrim(($_GET['url'], kemdian yang dihapus yaitu garing '/');)\n\t\t\t$url = rtrim($_GET['url'], '/');\n\t\t\t//membersikan url dari karakter yang aneh yang kemungkinan web dihack\n\t\t\t$url = filter_var($url, FILTER_SANITIZE_URL);\n\t\t\t//url nya dipecah berdasarkan tanda garing \"/\" dengan fungsi explode dengan delimiternya garing \"/\" dan stringnya jdi elemen array\n\t\t\t$url = explode('/', $url);\n\n\t\t\treturn $url;\n\t\t}\n\t}", "title": "" }, { "docid": "b05b19eb9ac8223a40aebee710562ec9", "score": "0.64714813", "text": "public function parseURL()\n\t{\n\t\tif ( isset($_GET['url']) ) {\n\n\t\t\t//menghapus '/' di akhir url\n\t\t\t$url = rtrim($_GET['url'], '/');\n\t\t\t\n\t\t\t//memebersihkan url dari karakter aneh\n\t\t\t$url = filter_var($url, FILTER_SANITIZE_URL);\n\n\t\t\t//memecah url berdasarkan tanda '/' untuk menjadikannya elemen array\n\t\t\t$url = explode('/', $url);\n\n\t\t\treturn $url;\n\t\t}\n\t}", "title": "" }, { "docid": "04ca5e9e39eabd3d5af556d518c3a88c", "score": "0.6468517", "text": "public function parseUrl() {\t\tif( isset( $_GET['url'] ) ) {\n\t\t\t// Yes, let's grab it.\n\t\t\t$url = $_GET['url'];\n\t\t\t// Trim excess trailing slashes\n\t\t\t$url = rtrim( $url, '/' );\n\t\t\t// Sanitize it\n\t\t\t$url = filter_var( $url, FILTER_SANITIZE_URL );\n\t\t\t// Explode it\n\t\t\t$url = explode(\"/\", $url);\n\t\t\t// Return it\n\t\t\treturn $url;\n\t\t}\n\t}", "title": "" }, { "docid": "4d951ffc7845efd2555828aaa15cde1a", "score": "0.6459037", "text": "function getParams();", "title": "" }, { "docid": "6566b1f8b2174019bdc2eb665a30d744", "score": "0.6457914", "text": "function url_split_qs($qs = null) {\r\n if (is_null($qs)) {\r\n $qs = array_key_exists('QUERY_STRING', $_SERVER) ? $_SERVER['QUERY_STRING'] : '';\r\n }\r\n $a = array();\r\n parse_str($qs, $a);\r\n return $a;\r\n}", "title": "" }, { "docid": "5af5de1e05aaf474ae68a4fd5a8be7eb", "score": "0.6446483", "text": "public function getParameters()\n {\n if ( $this->_parameter == \"\" )\n {\n return array();\n }\n $paramAssignments = explode('&', $this->_parameter);\n $params = array();\n foreach ( $paramAssignments as $paramAssignment )\n {\n $item = explode('=', $paramAssignment);\n $params[$item[0]] = urlencode($item[1]);\n // $params[$item[0]] = urldecode($item[1]);\n } \n return $params;\n }", "title": "" }, { "docid": "80a5e59f85692e02d77ebbb25a1bb1e0", "score": "0.6407964", "text": "public function parseURL() {\n\t\tif (!isset($_GET['url'])){header('Location: index');}\n\t\t$url = $_GET['url'];\n\t\t$url = rtrim($url, '/');\n\t\t$url = explode('/', $url);\n\t\t$this->url = new stdClass();\n\t\t$this->url->controllerName = $url[0];\n\t\t@$this->url->method = $url[1];\n\t}", "title": "" }, { "docid": "1c38dc5a7ae54942070fbfa008522fef", "score": "0.63920164", "text": "protected function _extractParams($request)\n {\n $params = $request->params;\n $params['?'] = $request->query;\n $params['_method'] = $request->method();\n $params['_host'] = $request->host();\n if (!isset($params['_ext'])) {\n $params['_ext'] = null;\n }\n\n $pass = isset($params['pass']) ? $params['pass'] : [];\n\n unset(\n $params['pass'],\n $params['paging'],\n $params['models'],\n $params['url'],\n $params['autoRender'],\n $params['bare'],\n $params['requested'],\n $params['return'],\n $params['_Token'],\n $params['_matchedRoute']\n );\n $params = array_merge($params, $pass);\n $params += $params['?'];\n\n $this->_normalizeParams($params);\n\n return $params;\n }", "title": "" }, { "docid": "270160b27fa9a040dc271bc109e3f361", "score": "0.6389766", "text": "private function _addParam()\n {\n $aParseUrl = parse_url($_SERVER['REQUEST_URI']);\n\n if (array_key_exists('query', $aParseUrl))\n {\n parse_str($aParseUrl['query'], $aParseStr);\n\n foreach ($aParseStr as $sKey => $sValue)\n {\n $_GET[$sKey] = $sValue;\n }\n }\n }", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.6386061", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.6386061", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.6386061", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.6386061", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.6386061", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.6386061", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.6386061", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.6386061", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.6386061", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.6386061", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.6386061", "text": "public function getParams();", "title": "" }, { "docid": "f12a658baaa99a0aeba1b6ebfdb31593", "score": "0.63797927", "text": "public function params(): array\n {\n if (null === $this->link) {\n return [];\n }\n\n parse_str(parse_url($this->link, PHP_URL_QUERY), $result);\n\n return $result;\n }", "title": "" }, { "docid": "e3e4baa33d227897803f8f3dc124c5cb", "score": "0.6376734", "text": "static function getListFromUrl()\n\t{\t\n\t\t$vars = array();\n\t\t\n\t\t$cr_route = self::getRoute();\n\t\t\n\t\t$parts = explode('/', $cr_route);\n\t\t\n\t\tif(!empty($parts[2]))\n\t\t{\n\t\t\tunset($parts[0], $parts[1]);\n\t\t\t$parts = array_values($parts);\n\t\t\t\n\t\t\tforeach($parts as $value)\n\t\t\t{\n\t\t\t\tif(!empty($value))\n\t\t\t\t\t$vars[] = $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "623c4c47abf4212a761fd32611d205af", "score": "0.6375533", "text": "public function getParams()\n {\n $params = [];\n \n // GET \n $elements = explode('/', $this->_request); \n unset($elements[0]);\n\n for ($i = 1; $i < count($elements); $i++) {\n $params[$elements[$i]] = $elements[$i + 1];\n $i++; // Add another one if more\n }\n\n // POST\n if ($_POST) {\n\n foreach ($_POST as $key => $value) {\n $params[$key] = $value;\n }\n\n }\n\n return $params;\n }", "title": "" }, { "docid": "1ea9465118cdc2c24c3db4ebecaa33a5", "score": "0.6374624", "text": "public static function params()\n {\n\n $params = [];\n switch (self::method()) {\n case \"GET\":\n $params = $_GET;\n break; \n case \"POST\":\n $params = $_POST;\n break;\n\n case \"PUT\":\n case \"DELETE\":\n parse_str(file_get_contents(\"php://input\"),$post_vars);\n $params = $post_vars;\n break;\n }\n\n $uri = explode('/',trim(\n parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/'\n )) ;\n\n if(isset($uri[1]) && is_numeric($uri[1])){\n $params['id'] = $uri[1];\n\n }\n \n\n \treturn $params;\n }", "title": "" }, { "docid": "23377f354eec87418ef9942ddb4c70e5", "score": "0.6365361", "text": "private function splitUrl()\n {\n\t\t// Checar se a url foi setada\n if (isset($_GET['url'])) {\n\n // Quebrar a URL\n $url = trim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n\n // Coloque partes do URL nas propriedades correspondentes\n // A propósito, a sintaxe aqui é apenas uma forma curta de if/else, chamado \"Operador Ternário\"\n // @see http://davidwalsh.name/php-shorthand-if-else-ternary-operators\n $this->urlController = isset($url[0]) ? $url[0] : null;\n $this->urlAction = isset($url[1]) ? $url[1] : 'index';// era null\n\n // Remova o controller e o action da URL dividida\n unset($url[0], $url[1]);\n\n // Rebase as chaves do array e armazene os parâmetros da URL\n $this->urlParams = array_values($url);\n\n /* == Para DEBUGGING descomente as linhas abaixo caso encontre algum problema com a URL == */\n // echo 'Controller: ' . ucfirst($this->urlController) . '<br>';\n // echo 'Action: ' . $this->urlAction . '<br>';\n // echo 'Parameters: ' . print_r($this->urlParams, true) . '<br>';\n }\n }", "title": "" }, { "docid": "b42a1cc8951ea064f8d51345b303d39e", "score": "0.636482", "text": "function getUrlParams() {\n return $this->url_params;\n }", "title": "" }, { "docid": "6a62cfa5a6e8fd74c3f91e531eee38d0", "score": "0.6330391", "text": "protected function _parseUrl($url)\n {\n if (strstr($url, '?')) {\n list($baseUrl, $qs) = explode('?', $url);\n $paramPairs = explode('&', isset($qs) ? $qs : '');\n } else {\n $baseUrl = $url;\n $paramPairs = array();\n }\n // split up all vals\n $params = array();\n foreach ($paramPairs as $paramPair) {\n list($key, $value) = explode('=', $paramPair);\n $params[$key] = $value;\n }\n return array($baseUrl, $params);\n }", "title": "" }, { "docid": "6a8025afd5abfc6ea97402bfbd6fcbb3", "score": "0.6302846", "text": "protected function url() {\n if(isset($_GET['url'])) {\n return explode('/', filter_var(rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL));\n }\n }", "title": "" }, { "docid": "604fa2619c8aa8f1f6ddc400f0aa0674", "score": "0.6293188", "text": "private function getUrl() : array {\n /** @var string $url */\n $url = $_GET[ '_url' ] ?? '';\n /** @var string $rtrim */\n $rtrim = rtrim( $url, '/' );\n /** @var string $filter */\n $filter = filter_var( $rtrim, FILTER_SANITIZE_URL );\n /** @var string $explode */\n $explode = explode( '/', $url );\n\n return [\n 'controller' => empty( $explode[ 0 ] ) ? self::DEFAULT_CONTROLLER : $explode[ 0 ],\n 'method' => $explode[ 1 ] ?? self::DEFAULT_METHOD,\n 'argument' => $explode[ 2 ] ?? ''\n ];\n }", "title": "" }, { "docid": "b9931e4f0949ff6b8c75ccff6dfd759a", "score": "0.6291508", "text": "public static function getUrlParamsArray() {\r\n\t\tif (strlen($paramsString = self::getUrlParamsString()) < 1) {\r\n\t\t\treturn array();\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$params\t= explode(\"/\", $paramsString);\r\n\t\t\tforeach ($params as $param) {\r\n\t\t\t\tif (strlen($param) < 1) continue;\r\n\t\t\t\t$out[]\t= urldecode($param);\r\n\t\t\t}\r\n\t\t\treturn $out;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "868f7b16190f7e928bcb07ca8a466317", "score": "0.62739027", "text": "private function setParams()\n {\n preg_match('/(\\/)([0-9]+)/', $this->path, $params);\n if (count($params) > 2) {\n $this->params = $params[2];\n }\n }", "title": "" }, { "docid": "d38d7fe776ec06f9256f29546de0c294", "score": "0.62678885", "text": "public function parseURL()\r\n {\r\n //melakukan pengecekan apakah ada element url\r\n if (isset($_GET['url'])) {\r\n //mengambil nilai nilai pada url\r\n $url = rtrim($_GET['url'], '/');\r\n //membersihkan element url dari simbol simbol \r\n $url = filter_var($url, FILTER_SANITIZE_URL);\r\n //mendapat semua nilai pada element dengan pemisah /\r\n $url = explode('/', $url);\r\n //element akan di return dalam bentuk array\r\n return $url;\r\n }\r\n }", "title": "" }, { "docid": "55bf488a88c07610febb660ac0ba21a3", "score": "0.6232792", "text": "function getParameters()\n {\n $ar = split(\";\", $GLOBALS[\"pagedata\"][\"module\"]);\n for ($c = 0; $c < sizeof($ar); $c++) {\n $a = split(\"=\", $ar[$c]);\n $this->module_param[$a[0]] = $a[1];\n }\n }", "title": "" }, { "docid": "bb8068dcf52cd2627a2ba4965ddc2433", "score": "0.62326527", "text": "function getParameters() {\n $ar = split(\";\", $GLOBALS[\"pagedata\"][\"module\"]);\n for ($c = 0; $c < sizeof($ar); $c++) {\n $a = split(\"=\", $ar[$c]);\n $this->module_param[$a[0]] = $a[1];\n }\n }", "title": "" }, { "docid": "bb8068dcf52cd2627a2ba4965ddc2433", "score": "0.62326527", "text": "function getParameters() {\n $ar = split(\";\", $GLOBALS[\"pagedata\"][\"module\"]);\n for ($c = 0; $c < sizeof($ar); $c++) {\n $a = split(\"=\", $ar[$c]);\n $this->module_param[$a[0]] = $a[1];\n }\n }", "title": "" }, { "docid": "a6176c138d85e05c094f3a749f0f7169", "score": "0.62157005", "text": "protected function url_params()\r\n\t{\r\n\r\n\t\t$excludes = func_get_args();\r\n\t\tfor($i=0;$i<count($excludes);++$i)\r\n\t\t{\r\n\t\t\tif(is_array($excludes[$i]))\r\n\t\t\t{\r\n\t\t\t\t$excludes = array_merge($excludes,$excludes[$i]);\r\n\t\t\t\tunset($excludes[$i]);\r\n\t\t\t}\r\n\t\t\tif(is_null($excludes[$i]))\r\n\t\t\t{\r\n\t\t\t\tunset($excludes[$i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$returnValue = \"\";\r\n\r\n\t\tforeach ($_GET as $key => $value)\r\n\t\t{\r\n\t\t\tif (!(in_array($key, $excludes))) $returnValue.=\"&$key=$value\";\r\n\t\t}\r\n\t\treturn $returnValue;\r\n\t}", "title": "" }, { "docid": "8391f699e55fced7fd4098b8c944c1d8", "score": "0.61795574", "text": "public function getQueryParameters()\n {\n $parameters = [];\n\n parse_str(parse_url($this->query(), PHP_URL_QUERY), $parameters);\n\n return $parameters;\n }", "title": "" }, { "docid": "34f97c7f63d693149574597f822d4941", "score": "0.6166657", "text": "public function getProperties(){\n if(isset($_GET['url'])) {\n $url = explode('/', $_GET['url']);\n return $url;\n } else {\n return $url = ['pages', 'index'];\n }\n }", "title": "" }, { "docid": "7dd56f26be2b823a3025d96f1912b3b9", "score": "0.61580133", "text": "function parseUrlParameters($urlMap,$params){\n if(empty($urlMap['query'])){\n return $params;\n }\n else {\n $str = $urlMap['query'];\n parse_str($str , $urlParamsArray );\n foreach ($urlParamsArray as $key => $value)\n {\n $urlParamsArray[$key] = $this->RFC3986urlencode($value);\n }\n return array_merge($params,$urlParamsArray);\n }\n }", "title": "" }, { "docid": "8f7169945289b29b3b40341576177f17", "score": "0.6151174", "text": "public function getURLQuery() {\n\t\t$query = array();\n\t\tif (Request::getGET('key')) {\n\t\t\t$query['key'] = Request::getGET('key');\n\t\t}\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "1f71009e7a9758b54d54c0d4617a5365", "score": "0.61299586", "text": "function http_parse_params ($param, $flags = null) {}", "title": "" }, { "docid": "5e24cee44238836145bdad301934919e", "score": "0.6128049", "text": "function querystring_to_hash($url){\n\t\tpreg_match_all('/[?|&]([^=%]+)=([^&]+)/x', $url, $result, PREG_SET_ORDER);\n\t\t$vars = array();\n\t\tfor ($matchi = 0; $matchi < count($result); $matchi++) {\n\t\t\t$vars[$result[$matchi][1]] = $result[$matchi][2];\n\t\t}\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "4b81196a3a522be8827b9c9d7f0ae5b6", "score": "0.6122234", "text": "private function prepareUrl(){\n //to get url\n $url= $_SERVER['QUERY_STRING'];\n if(!empty($url)){\n \n $url = trim($url,'/'); \n $url = explode('/',$url);\n // echo $url[0].\" hellow every one\";\n // to git controllers from url and captial fist cahr and add Controllers to url\n $this->controllers = isset($url[0]) ? ucwords($url[0]).\"Controller\" :\"HomeController\"; \n // echo $this->controllers;\n // to git second param in url is method\n $this->action = isset($url[1]) ? $url[1]:\"index\";\n // echo $this->action;\n unset($url[0],$url[1]);\n // var_dump($url);\n // to git second param in url is method\n $this->param = !empty($url) ? array_values($url):[];\n // var_dump($this->param);\n }\n }", "title": "" }, { "docid": "3ccc4f6aef296009bbd8865a0b946647", "score": "0.6110042", "text": "public static function getQueryStringParams($url='', $var='')\n {\n if ($url === '') {\n $url = self::getCurrentUrl();\n }\n\n $params = array();\n $queryStr = parse_url($url, PHP_URL_QUERY);\n parse_str($queryStr, $params);\n\n if ($var !== '') {\n if (isset($params[$var]) === TRUE) {\n return $params[$var];\n } else {\n return '';\n }\n }\n\n return $params;\n\n }", "title": "" }, { "docid": "8105eb4d1dfa193bd6de55cdce0b6ebf", "score": "0.61100215", "text": "public static function parseUrl($par=null){\n $url=explode(\"/\", $_GET['url'], FILTER_SANITIZE_URL);\n if(!is_null($par)){\n if(array_key_exists($par, $url)){\n return $url[$par];\n }else{\n return false;\n }\n }else{\n return $url;\n }\n }", "title": "" }, { "docid": "182425e0b8065065e356f7ae91dee614", "score": "0.6098996", "text": "public function getUrlVariables() {\n $variables = [];\n foreach($_GET as $key => $value) {\n $variables[$key] = $key . \"=\" . $value;\n }\n return $variables;\n }", "title": "" }, { "docid": "4f85586e03985b159ef6ded6be59ed13", "score": "0.60989845", "text": "public function getUrlParameters()\n {\n return $this->urlParameters;\n }", "title": "" }, { "docid": "0aa253dbeb5ed781c27c9fbe20468be8", "score": "0.60786474", "text": "private function splitUrl() {\n if (isset($_GET['page'])) {\n // split URL\n $url = trim($_GET['page'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n //$this->checkAdmin($url, count($url));\n $this->controller = isset($url[0]) ? ucfirst($url[0]) : \"Home\";\n $this->action = isset($url[1]) ? $url[1] : \"index\";\n // Enlever le controlleur et la méthode\n unset($url[0], $url[1]);\n // Récupérer les parametres\n $this->params = array_values($url);\n }else{\n $this->controller = \"Home\";\n $this->action = \"index\";\n //$this->controllerPath .=$this->section . '/'; \n }\n }", "title": "" }, { "docid": "53f6f0add1cf3dd9b8c52505a172f606", "score": "0.6054748", "text": "public static function getUrlParamsString() {\r\n\t\treturn trim(LBOX_REQUEST_URL_PARAMS);\r\n\t}", "title": "" }, { "docid": "3192981c1cec458b68884a67a20a956b", "score": "0.6046755", "text": "public static function groupURLToKeyAndValueAvailableInControllers()\n {\n $path = trim($_SERVER['REQUEST_URI'], '/');\n\n @list($param) = explode('/', str_replace(['?'], ['/'], $path), 1);\n\n if ($param) {\n\n self::ifGetHasEqual($param);\n\n if (! empty(self::$paramOfGet)) {\n $param = self::$paramOfGet[0];\n } else {\n $param = explode('/', $path);\n }\n\n $key = array_search(self::getFirstPartOfUrl(), $param);\n\n unset($param[$key]);\n\n $parameters = [];\n\n foreach (array_chunk($param, 2) as $met) {\n $parameters[$met[0]] = $met[1];\n }\n\n return $parameters;\n }\n }", "title": "" }, { "docid": "51c8de2bf3a3de7535984bc7cc13b148", "score": "0.6039529", "text": "protected function parseURL() {\n $request = trim($_SERVER['REQUEST_URI'], '/');\n if (!empty($request)) {\n $url = explode('/', $request);\n $this->controller = isset($url[0]) ? $url[0] . 'Controller' : 'loginController';\n $this->action = isset($url[1]) ? $url[1] : 'login';\n unset($url[0], $url[1]);\n $this->prams = !empty($url) ? array_values($url) : [];\n }\n }", "title": "" }, { "docid": "a720e7f734cfbb12732958167dfad80a", "score": "0.60355467", "text": "function parse(& $segments)\n\t{\n\t\t$vars = array();\n\t\tif (count($segments))\n\t\t{\n\t\t\t$db = JFactory::getDbo();\n\t\t\t$key = md5(str_replace(':', '-', implode('/', $segments)));\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->select('`query`')\n\t\t\t\t->from('#__osrs_urls')\n\t\t\t\t->where('md5_key=\"'.$key.'\"');\n\t\t\t$db->setQuery($query);\n\t\t\t$queryString = $db->loadResult();\n\t\t\tif ($queryString)\n\t\t\t{\n\t\t\t\tparse_str(html_entity_decode($queryString), $vars);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$method = strtoupper(JFactory::getApplication()->input->getMethod());\n\t\t\t\tif ($method == 'GET')\n\t\t\t\t{\n\t\t\t\t\tthrow new Exception('Page not found', 404);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (version_compare(JVERSION, '4.0.0-dev', 'ge'))\n\t\t\t{\n\t\t\t\t$segments = [];\n\t\t\t}\n\t\t}\n\n\t\t$app\t\t= JFactory::getApplication();\n\t\t$menu\t\t= $app->getMenu();\n\t\tif ($item = $menu->getActive())\n\t\t{\n\t\t\tforeach ($item->query as $key=>$value)\n\t\t\t{\n\t\t\t\tif ($key != 'option' && $key != 'Itemid' && !isset($vars[$key]))\n\t\t\t\t\t$vars[$key] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "99976d4634f259acd8ebe866551de435", "score": "0.6032245", "text": "public function getURLData(){\n\t\t$urldata = (isset($_GET['page'])) ? $_GET['page'] : '';\n\t\t$this->urlPath = $urldata;\n\t\tif($urldata == ''){\n\t\t\t$this->urlBits[] = '';\n\t\t\t$this->urlPath = '';\n\t\t}\n\t\telse {\n\t\t\t$data = explode('/', $urldata);\n\t\t\twhile(!empty($data) && strlen(reset($data)) === 0){\n\t\t\t\tarray_shift($data);\n\t\t\t}\n\t\t\twhile(!empty($data) && strlen(end($data)) ===0){\n\t\t\t\tarray_pop($data);\n\t\t\t}\n\t\t\t$this->urlBits = $this->array_trim($data);\n\t\t}\n\t}", "title": "" }, { "docid": "1d7f80a507501deba517c51acba712d3", "score": "0.60279083", "text": "private function _getUrl()\n\t\t{\n\t\t\t$this->_url = isset($_GET['url']) ? $_GET['url'] : null;\n\t\t\t$this->_url = rtrim($this->_url, '/');\n\t\t\t$this->_url = explode(\"/\", $this->_url);\n\t\t}", "title": "" }, { "docid": "04cad5c074c82cf2df2ba4ee78bb9ca9", "score": "0.6021811", "text": "public function extract_params () {\n\n if( defined(\"DEBUG\") ) echo \"<div style='color:red'> 3. extract_params</div>\";\n\n switch( $this->environment ){\n\n case ENVIRONMENT_SHELL:\n for ($i = 1; $i < $_SERVER[\"argc\"]; $i++){\n if( preg_match(\"|-(.*)|\",$_SERVER[\"argv\"][$i]) ){\n if( !preg_match(\"|-(.*)|\",$_SERVER[\"argv\"][$i+1]) ){\n $arg = str_replace(\"-\",\"\",$_SERVER[\"argv\"][$i]);\n $this->params[$arg] = $_SERVER[\"argv\"][++$i];\n }\n else $this->params[str_replace(\"-\",\"\",$_SERVER[\"argv\"][$i])] = \"\";\n }\n } // end for argc\n break;\n\n default:\n $this->params = $_REQUEST;\n if( count($_FILES) ) $this->params = array_merge( $this->params, $_FILES );\n break;\n\n } // end switch environment\n\n // Protect main variable\n unset($this->params['main']);\n unset($this->params['kernel']);\n // Process params and fill all arrays\n $this->process_params();\n\n if( defined(\"PARAMS_DEBUG\") ) print_r( $this->params );\n\n }", "title": "" }, { "docid": "d7528f369cb9abed1b4ed97e8c73b3bb", "score": "0.6020304", "text": "public function extractParameters()\n\t{\n\t\t\n\t// Initialize\n\t\t$this->analyticsValues = [];\n\t\t$this->analyticsError = [];\n\t\t\n\t// Browse each value\n\t\tforeach($this->analyticsParameters as $key=>$element)\n\t\t{\n\t\t\t\n\t\t// Check GET or POST\n\t\t\t$p = filter_input(INPUT_GET, $key, FILTER_SANITIZE_STRING);\n\t\t\tif ($p === NULL) $p = filter_input(INPUT_POST, $key, FILTER_SANITIZE_STRING);\n\t\t\t\n\t\t// Add value \n\t\t\tif ($p !== NULL)\n\t\t\t\t$this->analyticsValues[$key] = $p;\n\t\t\t\n\t\t// Check mandatory values\n\t\t\tif ( ($p === NULL) && ($element === true) )\n\t\t\t\t$this->addAnalyticError($key, 'missing');\n\t\t\t\n\t\t}\n\t\t\n }", "title": "" }, { "docid": "27195c4e99ade9cabd7946f1230de616", "score": "0.60114026", "text": "function _parseQueryParam($href, $desiredKey) {\n if (substr_count($href, '?') != 1) {\n return '';\n }\n\n list($throwAway, $queryParams) = explode('?', $href, 2);\n $params = array($desiredKey => ''); // In case not found\n foreach (explode('&', $queryParams) as $param) {\n if ($param) {\n list($key, $val) = explode('=', $param, 2);\n $params[$key] = $val;\n }\n }\n return $params[$desiredKey];\n }", "title": "" }, { "docid": "1cf92c178f1e6c979a476b230d702d73", "score": "0.6010642", "text": "private function prepareQueryUrl() {\n $url = $this->url;\n\n if ($this->sheet) {\n $this->queryParams['sheet'] = $this->sheet;\n }\n\n if ($this->queryParams) {\n $url .= '/?';\n $url .= http_build_query($this->queryParams);\n $this->url = $url;\n }\n }", "title": "" }, { "docid": "247254997e74355b00cc0a94d9402a3a", "score": "0.6008343", "text": "public function getUrl()\n {\n if(isset($_GET['url'])){\n return $url = explode('/',filter_var(rtrim($_GET['url'] , '/') ,FILTER_SANITIZE_URL));\n \n }\n }", "title": "" }, { "docid": "53b08fb4b87f6b9b38487345ac5456cd", "score": "0.5974594", "text": "public function decode_params() {\n\t\t$this->api_call = $this->request_method;\n\t\t$this->api_var = new stdClass();\n\t\t// Has the key/value pair section of the params strated?\n\t\t$key_value_found = false;\n\t\t$i = 0;\n\t\t$params_length = count($this->params);\n\t\twhile ( $i < $params_length ) {\n\t\t\t$next = $i + 1;\n\t\t\tif ( !$key_value_found && $next < $params_length && is_numeric($this->params[$next]) ) {\n\t\t\t\t// The key/value pair section has started.\n\t\t\t\t$key_value_found = true;\n\t\t\t}\n\t\t\t$this->api_call .= \"/\" . $this->params[$i];\n\t\t\tif ( $key_value_found ) {\n\t\t\t\t$this->api_var->{$this->params[$i]} = $this->params[$next];\n\t\t\t\t$this->api_call .= \"/{}\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\treturn $this->return_handler->results(200,\"\",new stdClass());\n\t}", "title": "" }, { "docid": "4d08dfcbb7a033a5e57494feb8625d83", "score": "0.59629476", "text": "public function prepareParams($params = '')\n {\n $parms = Yii::$app->request->get();\n $addParms = [];\n $list = explode('/', $params);\n foreach ($list as $next) {\n if ($next == '') continue;\n $tmp = explode('=', $next);\n if (count($tmp) > 0) $addParms[$tmp[0]] = isset($tmp[1]) ? $tmp[1] : '';\n }\n $parms = ArrayHelper::merge($parms, $addParms);\n return $parms;\n }", "title": "" }, { "docid": "e9ec39c85f475c8131175a67c0e35192", "score": "0.5954678", "text": "private function parseUrl() {\n $urlParse = parse_url(\\Libs\\InputFilter::init()->getGlobal('REQUEST_URI', 'SERVER'));\n $path = substr($urlParse['path'], 0, 240); //TBD - URI limits\n return $path;\n }", "title": "" } ]
e3cd67b8316cf2d00e58fca673b8a1b0
Add WHERE field NOT IN (values) clause
[ { "docid": "0320feb9d29ce142bce1bd990264f098", "score": "0.61196935", "text": "public function whereNotInArray($field, $array) {\n\t\tif (empty($array)) {\n\t\t\t$q = \"true\";\n\t\t}\n\t\telse {\n\t\t\t$q = $field . \" NOT IN (\";\n\n\t\t\t$isFirst = true;\n\t\t\tforeach ($array as $value) {\n\t\t\t\tif (!$isFirst)\n\t\t\t\t\t$q .= \",\";\n\t\t\t\t$q .= \"?\";\n\t\t\t\t$isFirst = false;\n\t\t\t}\n\n\t\t\t$q .= \")\";\n\t\t}\n\n\t\t$this->where($q, $array);\n\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "d1d3034e6860222ca11c937c1a27cbfc", "score": "0.76821893", "text": "public function notInWhere($expr, $values);", "title": "" }, { "docid": "c5dc68f0eeea526c4d899974706a9eec", "score": "0.759616", "text": "function sql_where_not_in($strKey, $aryValues)\n{\n $strSql = '';\n if(count($aryValues))\n {\n $strSql = '`' . $strKey . '` NOT IN (' . implode(', ', $aryValues) . ')';\n }\n return $strSql;\n}", "title": "" }, { "docid": "5ee88f2840a911d040f7354d8e362609", "score": "0.7594751", "text": "public function where_not_in( $fields, array $values = array() )\n {\n return $this->_prepare_condition( $fields, $values, 'NOT_IN' );\n }", "title": "" }, { "docid": "eb6e19c7209b673a5d724c8a6adfcb90", "score": "0.7363849", "text": "public function whereNotIn($field, array $values);", "title": "" }, { "docid": "31a425fa698cfdce89edd71db8761862", "score": "0.7327155", "text": "public function notIn($values) {\n\t\t$this->queryChanged = true;\n\t\treturn parent::notIn($values);\n\t}", "title": "" }, { "docid": "ecd2dfbf6e470a14a2f5b7a2b7498d34", "score": "0.72848564", "text": "public function whereNotIn($field, $values=[]): QueryBuilderInterface;", "title": "" }, { "docid": "1a4f05cc6bf07ca62b0a14ad01eb3b46", "score": "0.7212783", "text": "public function findWhereNotIn(string $field, array $values, array $columns = ['*']);", "title": "" }, { "docid": "78616b43ad6b49a2210ca67ec0fde31f", "score": "0.72068197", "text": "public function notIn(FieldDescriptorInterface $fieldDescriptor, array $values);", "title": "" }, { "docid": "212e428d70ec1aa90015fde9afb9b3f8", "score": "0.716102", "text": "public function or_where_not_in( $fields, array $values = array() )\n {\n return $this->_prepare_condition( $fields, $values, 'OR_NOT_IN' );\n }", "title": "" }, { "docid": "9a03c01ba2ec0822ebf78c175ed47024", "score": "0.7034548", "text": "public function whereNotIn(array $data);", "title": "" }, { "docid": "00bb29561d2688265163ab6b6b04e325", "score": "0.7021363", "text": "public function whereNotIn($field, $values = array()) {\n\t\tif (func_num_args() > 2) {\n\t\t\t$values = array_splice(func_get_args(), 1);\n\t\t}\n\t\t$this->sql = null;\n\t\treturn $this->pushInCondition($field, $values, null, ' NOT');\n\t}", "title": "" }, { "docid": "a5c35395be9161259898e041ce92ce92", "score": "0.69981384", "text": "public function where_not_in($key = NULL, $values = NULL, $escape = NULL)\n\t{\n if (count($values) > self::WHERE_IN_MAX_COUNT) {\n $values_chunks = array_chunk($values, self::WHERE_IN_MAX_COUNT);\n $this->not_group_start();\n foreach ($values_chunks as $chunk) {\n $this->db->or_where_in($key, $chunk, $escape);\n }\n $this->group_end();\n } else {\n $this->db->where_not_in($key, $values, $escape);\n }\n\n return $this;\n\t}", "title": "" }, { "docid": "e19a06175867919b58162d263f19cffc", "score": "0.69691205", "text": "public function where_not_in($column, $values, $connector = 'AND')\n\t{\n\t\t$this->where .= ' '.$connector.' '.$this->wrap($column).' NOT IN ('.$this->parameterize($values).')';\n\t\t$this->bindings = array_merge($this->bindings, $values);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "e19a06175867919b58162d263f19cffc", "score": "0.69691205", "text": "public function where_not_in($column, $values, $connector = 'AND')\n\t{\n\t\t$this->where .= ' '.$connector.' '.$this->wrap($column).' NOT IN ('.$this->parameterize($values).')';\n\t\t$this->bindings = array_merge($this->bindings, $values);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "72a7be6ee81fd3c72b765c7ba5f7c651", "score": "0.69104546", "text": "protected function sql_not_in( $column, Array $value, $format = '%s', $and = true ) {\n\n $how_many = count( $value );\n $placeholders = array_fill( 0, $how_many, $format );\n $new_format = implode( ', ', $placeholders );\n\n $sql = $this->sql_and( $and );\n $sql .= \" `$column` NOT IN ($new_format)\";\n $sql = $this->wpdb->prepare( $sql, $value );\n\n return $sql;\n }", "title": "" }, { "docid": "7c55cc50528944f0c07094cf0e51d3b1", "score": "0.6906399", "text": "public function where_not_in($field, $array)\n {\n if (is_array($array))\n {\n $array = implode(',', $array);\n }\n $this->cfg_where = $field . ' NOT IN(' . $array . ')';\n return $this;\n }", "title": "" }, { "docid": "cb8d3a0b2bd56727688eed20104377d4", "score": "0.6848563", "text": "public function findWhereNotIn($field, array $values, $columns = array('*'))\n {\n }", "title": "" }, { "docid": "91448b9a84a0780b1180a8c2a6f1b56e", "score": "0.6830443", "text": "public function orWhereNotIn($field, $values=[]): QueryBuilderInterface;", "title": "" }, { "docid": "9b63ed9cc26bbfc25b50eccbb19ba72c", "score": "0.68259007", "text": "public function notIn($column, $values)\n {\n return $this->addWhere($column, 'NOT IN', $values);\n }", "title": "" }, { "docid": "db3d42f6471d95de762a86f089091eed", "score": "0.68164575", "text": "public function notin($field, $values) \n\t{\n\t\treturn $this->in($field, $values, TRUE);\n\t}", "title": "" }, { "docid": "9d3fcdc4b90aabe1cc7bdbffb4c69494", "score": "0.67722243", "text": "public function notIn($values)\r\n\t{\r\n\t\tif (is_array($values)) $values = implode(',', $values);\r\n\r\n\t\t$this->attributes['not_in'] = $values;\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "db58e8e18c880bec8e0040e42bae6bd2", "score": "0.6754303", "text": "public function where_not_in($key = NULL, $values = NULL) {\n return $this->_where_in($key, $values, TRUE);\n }", "title": "" }, { "docid": "d57d914102ed2ae6a0181d47e6a2b11f", "score": "0.6715689", "text": "public function whereNotIn($field, array $arrayValue) {\n\n $notIn = [];\n foreach($arrayValue as $val) {\n $notIn[] = '?';\n $this->whereClauseValues[] = $val;\n }\n $this->whereClause .= $field . ' NOT IN(' . implode(',', $notIn) . ')';\n\n return $this;\n\n }", "title": "" }, { "docid": "018f6e8d1c9965f0f979cca5310453c1", "score": "0.6692258", "text": "public function where_in($column, $values, $connector = 'AND', $not = false) {}", "title": "" }, { "docid": "0ed641872a9da4f4348be81097669a6f", "score": "0.6661379", "text": "public function notIn($column, array $values)\n {\n return $this->where($column, '!in', $values);\n }", "title": "" }, { "docid": "b3508a59e4bb154a3743dfa0e53aca4b", "score": "0.6659964", "text": "public function whereNotContainedIn($field, $array) {\r\n\t$this->parseQuery->whereNotContainedIn($field, $array);\r\n }", "title": "" }, { "docid": "e80023ea18ba17b83d3f500733b9b17d", "score": "0.6657282", "text": "public function testWhereNotInList(): void\n {\n $query = new SelectQuery($this->connection);\n $query->select(['id'])\n ->from('articles')\n ->whereNotInList('id', [1, 3]);\n\n $this->assertQuotedQuery(\n 'SELECT <id> FROM <articles> WHERE <id> NOT IN \\\\(:c0,:c1\\\\)',\n $query->sql(),\n !$this->autoQuote\n );\n\n $result = $query->execute()->fetchAll('assoc');\n $this->assertEquals(['id' => '2'], $result[0]);\n }", "title": "" }, { "docid": "7fe04332a8ac807b35fcdaf61e5a41f5", "score": "0.66160154", "text": "public function whereNotIn($column_name, $values)\n\t{\n\t\t$column_name = $this->_quoteIdentifier($column_name);\n\t\t$placeholders = $this->_createPlaceholders(count($values));\n\t\treturn $this->_addWhere(\"{$column_name} NOT IN ({$placeholders})\", $values);\n\t}", "title": "" }, { "docid": "d32503d789a72a6588fd7d688fb64356", "score": "0.65795624", "text": "public function notIn($field, $value) {\n $this->add($field, Expr::NOT_IN, (array) $value);\n\n return $this;\n }", "title": "" }, { "docid": "0d5f185c11521c6615ce6c540fc8d8be", "score": "0.6563279", "text": "public function notIn(...$values)\n {\n $val = count($values) == 1 ? $values[0] : $values;\n return $this->appendIfNotExists(\\Illuminate\\Validation\\Rule::notIn($val));\n }", "title": "" }, { "docid": "8ba6fd620630d1e178ce7f75d0eda303", "score": "0.65296733", "text": "public function whereNotIn($field, array $values)\n\t{\n\t\treturn $this->model->whereNotIn($field, $values)->get();\n\t}", "title": "" }, { "docid": "30653bb74ed05faf0c83a53a1e74a7c9", "score": "0.65277845", "text": "public function where_not_in($column_name, $values_count) {\n $this->_builder->where_not_in($column_name, count($values_count));\n $this->_values = array_merge($this->_values, $values_count);\n return $this;\n }", "title": "" }, { "docid": "30653bb74ed05faf0c83a53a1e74a7c9", "score": "0.65277845", "text": "public function where_not_in($column_name, $values_count) {\n $this->_builder->where_not_in($column_name, count($values_count));\n $this->_values = array_merge($this->_values, $values_count);\n return $this;\n }", "title": "" }, { "docid": "30653bb74ed05faf0c83a53a1e74a7c9", "score": "0.65277845", "text": "public function where_not_in($column_name, $values_count) {\n $this->_builder->where_not_in($column_name, count($values_count));\n $this->_values = array_merge($this->_values, $values_count);\n return $this;\n }", "title": "" }, { "docid": "1c44abb0372bfd14a9e967e76c5c3e5b", "score": "0.65272874", "text": "public function dbWhereNotIn ( $arrValue, $query = false ) {\n\n\t\tif ( $query ) $this->setQuery( $query );\n\n\t\treturn $this->query->whereNotIn( $arrValue[0], $arrValue[1] );\n\t\t\n\t}", "title": "" }, { "docid": "344794eba67fee6ac44ab9068c8b52c8", "score": "0.64875734", "text": "public function or_where_not_in($key = NULL, $values = NULL, $escape = NULL)\n\t{\n if (count($values) > self::WHERE_IN_MAX_COUNT) {\n $values_chunks = array_chunk($values, self::WHERE_IN_MAX_COUNT);\n $this->or_not_group_start();\n foreach ($values_chunks as $chunk) {\n $this->db->or_where_in($key, $chunk, $escape);\n }\n $this->group_end();\n } else {\n $this->db->or_where_not_in($key, $values, $escape);\n }\n\n return $this;\n\t}", "title": "" }, { "docid": "b3ab8b12f3c1bcf49e41872b2efbfe72", "score": "0.643881", "text": "public function findWhereNotIn($attribute, $values, $columns = ['*'], $with = []);", "title": "" }, { "docid": "ab66a5659d829effbd9c9de7352bfef7", "score": "0.63657475", "text": "public function testWhereNotInListOrNull(): void\n {\n $query = new SelectQuery($this->connection);\n $query->select(['id'])\n ->from('articles')\n ->whereNotInListOrNull('id', [1, 3]);\n\n $this->assertQuotedQuery(\n 'SELECT <id> FROM <articles> WHERE \\\\(<id> NOT IN \\\\(:c0,:c1\\\\) OR \\\\(<id>\\\\) IS NULL\\\\)',\n $query->sql(),\n !$this->autoQuote\n );\n\n $result = $query->execute()->fetchAll('assoc');\n $this->assertEquals(['id' => '2'], $result[0]);\n }", "title": "" }, { "docid": "908a48a2efac073f6166c8770369563d", "score": "0.6361024", "text": "public function andWhereNotIn($field, $values) {\n\t\tif (func_num_args() > 2) $values = array_splice(func_get_args(), 1);\n\t\treturn $this->pushInCondition($field, $values, 'AND', ' NOT');\n\t}", "title": "" }, { "docid": "467e13ff0f29d69bfee4f0d7cd25183c", "score": "0.6348134", "text": "public function resolve_whereNotIn()\n {\n extract($this->worker['whereNotIn']);\n $op = [];\n if (!empty($this->worker['select'])) {\n if ($this->field_cnt == 1 && $this->worker['select']['preserve']) {\n array_walk($this->source, function ($src, $k) use ($search_key, $search_value, &$op) {\n if ((isset($src[$search_key])) && !in_array($src[$search_key], $search_value)) {\n $op[$k] = $src[$this->select_fields];\n }\n });\n } elseif ($this->field_cnt == 1 && !$this->worker['select']['preserve']) {\n array_walk($this->source, function ($src, $k) use ($search_key, $search_value, &$op) {\n if ((isset($src[$search_key])) && !in_array($src[$search_key], $search_value)) {\n $op[$k] = array_intersect_key($src, $this->select_fields);\n }\n });\n } elseif ($this->field_cnt > 1) {\n array_walk($this->source, function (&$src, $k) use ($search_key, $search_value, &$op) {\n if ((isset($src[$search_key])) && !in_array($src[$search_key], $search_value)) {\n $op[$k] = array_intersect_key($src, $this->select_fields);\n }\n });\n }\n $this->source = $preserve ? $op : array_values($op);\n unset($this->functions['select']);\n } else {\n $op = array_filter($this->source, function ($src) use ($search_key, $search_value) {\n return (isset($src[$search_key])) && !in_array($src[$search_key], $search_value);\n }, ARRAY_FILTER_USE_BOTH);\n $this->source = $preserve ? $op : array_values($op);\n }\n }", "title": "" }, { "docid": "c781265dd6c06378d79a374c38237e2b", "score": "0.6323451", "text": "final public function whereNotIn(string $memberExpression, array $values)\n {\n return $this->where($memberExpression, ConditionOperator::NOT_IN, $values);\n }", "title": "" }, { "docid": "08553b7c2bf2288203bb1ba5ecebe7e2", "score": "0.6303746", "text": "protected function filterValues()\n {\n if (! $this->request->value) {\n return;\n }\n\n $this->query->whereIn($this->select[0], Arr::wrap($this->request->value));\n }", "title": "" }, { "docid": "6bc3634bf98e5b590505879d31bdb176", "score": "0.6281916", "text": "public function whereNotEqualTo($field, $value) {\r\n\t$this->parseQuery->whereNotEqualTo($field, $value);\r\n }", "title": "" }, { "docid": "4cf06c61daea4a1861d9d3ed73066470", "score": "0.62686837", "text": "public function whereNotIn($field, array $inValues)\n {\n $this->whereInit($field);\n $this->_wheres[$field]['$nin'] = $inValues;\n\n return $this;\n }", "title": "" }, { "docid": "f078bb6bf334e2b7b9c93aceacd9fc07", "score": "0.6257721", "text": "public function testNotIn()\n {\n $exp = $this->_commonField->notIn(range(0, 10));\n $this->_testExpression($exp, 'NOT IN');\n }", "title": "" }, { "docid": "45b85c54adfc1c706648dd89a15931e0", "score": "0.624323", "text": "public function andNotIn($key, array $values)\n {\n if ($values) {\n $value = sprintf('%s NOT IN (%s)', $key, join(', ', array_fill(0, count($values), '?')));\n return $this->andAdd($value, $values);\n } else {\n $value = '1';\n return $this->andAdd($value, $values);\n }\n }", "title": "" }, { "docid": "bef67ba7d958d607c8d7172129ec524f", "score": "0.62114155", "text": "public function resolve_whereNotIn_row()\n {\n if (!empty($this->functions['order_by'])) {\n $this->resolve_order_by();\n unset($this->functions['order_by']);\n }\n extract($this->worker['whereNotIn']);\n $op = [];\n if (!empty($this->worker['select'])) {\n if ($this->field_cnt == 1 && $this->worker['select']['preserve']) {\n foreach ($this->source as $k => $src) {\n if ((isset($src[$search_key])) && !in_array($src[$search_key], $search_value)) {\n $op[$k] = $src[$this->select_fields];\n break;\n }\n }\n }\n if ($this->field_cnt == 1 && !$this->worker['select']['preserve']) {\n foreach ($this->source as $k => $src) {\n if ((isset($src[$search_key])) && !in_array($src[$search_key], $search_value)) {\n $op[$k] = array_intersect_key($src, $this->select_fields);\n break;\n }\n }\n } elseif ($this->field_cnt > 1 && !$this->worker['select']['preserve']) {\n foreach ($this->source as $k => $src) {\n if ((isset($src[$search_key])) && !in_array($src[$search_key], $search_value)) {\n $op[$k] = array_intersect_key($src, $this->select_fields);\n break;\n }\n }\n }\n unset($this->functions['select']);\n } else {\n foreach ($this->source as $k => $src) {\n if ((isset($src[$search_key])) && !in_array($src[$search_key], $search_value)) {\n $op[$k] = $value;\n break;\n }\n }\n }\n $this->source = $preserve ? $op : array_values($op);\n }", "title": "" }, { "docid": "02a5055dd10cf64cadcbc058876a78f6", "score": "0.6207891", "text": "public function whereNot($name,$value = null , $comparison = \" = \") \n {\n \t$this->whereClause = null;\n \t \tif(!is_array($name) && $value == null && !is_int($value))\n \t \t{\n \t \t\t$this->whereClause = \"n\";\n \t\t\treturn false;\n \t \t}\n\n \tif($value == null && is_array($name))\n \t\t$this->includeWhereArray($name);\n \telse\n \t\t$this->whereClause = \" WHERE NOT \" .$name . $comparison . \"'\".$value.\"'\"; \n\n \treturn true;\n }", "title": "" }, { "docid": "fe619b7c067a3e9b751a356fbf513713", "score": "0.6203061", "text": "public function where_not_in($column, array $not_in)\n {\n $this->where[] = array('type' => 'not_in', 'column' => $column, 'value' => $not_in);\n\n return $this;\n }", "title": "" }, { "docid": "7969d39d1325c0ae137b785b9704e231", "score": "0.6194437", "text": "public function notInArray($element, array $array) {\n if ($array) {\n $this->_filter['where'] .= \"{$this->quote($element)} NOT IN (\" . implode(\", \", array_fill(0, count($array), '?')) . \")\";\n $this->_filter['bindings'] = array_merge($this->_filter['bindings'], array_values($array));\n } else {\n if (substr($this->_filter['where'], -3) === 'OR ') {\n $this->contradiction();\n } else {\n $this->identity();\n }\n }\n \n return $this;\n }", "title": "" }, { "docid": "fa96e8080ae93631310a6ecbccc42544", "score": "0.6190364", "text": "public function orWhereNotIn($field, $values) {\n\t\tif (func_num_args() > 2) $values = array_splice(func_get_args(), 1);\n\t\treturn $this->pushInCondition($field, $values, 'OR',' NOT');\n\t}", "title": "" }, { "docid": "34f1d81a33aa4e9f4326015508322886", "score": "0.61876184", "text": "public function testWhereNotIn()\n {\n $this->class->where_in('left', 'right', TRUE);\n $value = $this->get_reflection_property_value('where');\n\n $this->assertEquals('WHERE left NOT IN right', $value);\n }", "title": "" }, { "docid": "2ac85677f0df7265afe7e2847ef47739", "score": "0.61292404", "text": "public function notIn($identifier, array $values)\n {\n return $this->addPredicate(new NotIn($identifier, $values));\n }", "title": "" }, { "docid": "da7957dc1a0a02470b58e4f3525dff19", "score": "0.6107859", "text": "private function setNotIn($whereNotIn)\n {\n $wheres = [];\n foreach ($whereNotIn as $k => $v) {\n if (is_null($v)) {\n $wheres[] = $k . ' IS NULL';\n } elseif (is_int($k)) {\n $wheres[] = $v;\n } elseif (is_int($v)) {\n $wheres[] = $k . ' NOT IN (' . mysqli_real_escape_string($this->_con, $v) . ')';\n } elseif (is_array($v)) {\n $values = [];\n foreach ($v as $value) {\n $values[] = '\"' . mysqli_real_escape_string($this->_con, $value) . '\"';\n }\n $wheres[] = $k . ' NOT IN (' . implode(', ', $values) . ')';\n } else {\n $wheres[] = $k . ' NOT IN (' . mysqli_real_escape_string($this->_con, $v) .')';\n }\n }\n\n if($this->_where !== '') {\n if(count($wheres) == 1) {\n return \"\\n\\t AND \" . $wheres[0];\n }\n\n return \"\\n\\t\" . implode(\" AND \\n\\t\", $wheres);\n }\n\n return \" WHERE \\n\\t\" . implode(\" AND \\n\\t\", $wheres);\n }", "title": "" }, { "docid": "22fe14e3baf7de62ca49b4ed03f9e649", "score": "0.61071837", "text": "private function stringBuilderNotIn() {\n $column = $this->getQuotedCurrentColumn();\n return $column.' NOT IN ('.$this->getValueStringForConditionIn().')';\n }", "title": "" }, { "docid": "b5438ed7f4de349741ead7299131d3e6", "score": "0.60932255", "text": "public function whereMultiNotIn($columns, $values, $boolean = 'and') {\n\n\t\t\treturn $this->whereMultiIn($columns, $values, $boolean, true);\n\t\t}", "title": "" }, { "docid": "47c27f7b78b56d398c3f6d810fa15d9c", "score": "0.6081362", "text": "public function testUpdateWhereNotIn()\n {\n $connection = $this->getQueryBuilderConnection();\n\n $statement = $connection\n ->update('querybuilder_tests')\n ->set(['field' => 'wert'])\n ->whereNotIn('id', [5, 6, 7, 8, 9])\n ->execute();\n\n $this->assertInstanceOf(\\PDOStatement::class, $statement);\n $this->assertEquals(5, $statement->rowCount());\n\n $result = $connection\n ->select()\n ->from('querybuilder_tests')\n ->whereNotIn('id', [5, 6, 7, 8, 9])\n ->get();\n\n $expected = [\n (object)[\n 'id' => '0',\n 'languageId' => '1',\n 'field' => 'wert',\n ],\n (object)[\n 'id' => '1',\n 'languageId' => '1',\n 'field' => 'wert',\n ],\n (object)[\n 'id' => '2',\n 'languageId' => '1',\n 'field' => 'wert',\n ],\n (object)[\n 'id' => '3',\n 'languageId' => '1',\n 'field' => 'wert',\n ],\n (object)[\n 'id' => '4',\n 'languageId' => '1',\n 'field' => 'wert',\n ],\n ];\n\n $this->assertEquals($expected, $result);\n }", "title": "" }, { "docid": "aec3a747e384c86faa8c92e50a07f71f", "score": "0.60715616", "text": "function prepareExcludeConditions($exclude, $table_name, $type_field_name = 'type', $id_field_name = 'id') {\n if(is_foreachable($exclude)) {\n $result = array();\n\n foreach($exclude as $type => $ids) {\n if($type && $ids) {\n $result[] = DB::prepare(\"($table_name.$type_field_name = ? AND $table_name.$id_field_name IN (?))\", $type, $ids);\n } // if\n } // foreach\n\n return count($result) ? 'NOT (' . implode(' AND ', $result) . ')' : '';\n } else {\n return '';\n } // if\n }", "title": "" }, { "docid": "35fcbb96270c13009686858bb29770cb", "score": "0.6058018", "text": "public function or_where_not_in($column, $values)\n\t{\n\t\treturn $this->where_not_in($column, $values, 'OR');\n\t}", "title": "" }, { "docid": "35fcbb96270c13009686858bb29770cb", "score": "0.6058018", "text": "public function or_where_not_in($column, $values)\n\t{\n\t\treturn $this->where_not_in($column, $values, 'OR');\n\t}", "title": "" }, { "docid": "d9c313097eacf40ff1f8b36610e7bdc8", "score": "0.6048653", "text": "public function filterNotIn($columns, $value)\n {\n foreach ($columns as $column) {\n $this->query->whereNotIn($column, array_map('intval', (array) $value));\n }\n }", "title": "" }, { "docid": "3bb56c3476a7bd6211e92de7b3e6fa42", "score": "0.6042347", "text": "public function whereNotIn($column, $values, $boolean = 'and')\n {\n return $this->whereIn($column, $values, $boolean, true);\n }", "title": "" }, { "docid": "bb835a180f15c1207a66404aeb037fbf", "score": "0.60311824", "text": "public function getWhereNotInAndOrder($field,$exclude, $order, $direction);", "title": "" }, { "docid": "73dcda964a50c67898b28b4cd74b0e3a", "score": "0.6011834", "text": "function valueNotIn($values) {\n\t\tforeach($this->values as $value) {\n\t\t\tif(!in_array($value, $values)) {\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "23ab906644088f5c80d68e8687c18757", "score": "0.5998639", "text": "public function whereNotInQuery($field, $className, $array) {\r\n\t$this->parseQuery->whereNotInQuery($field, $className, $array);\r\n }", "title": "" }, { "docid": "3c36886549a0d4dfc59a0d5228d25434", "score": "0.598304", "text": "public function notLike(string $field, $values, string $pos='both'): QueryBuilderInterface;", "title": "" }, { "docid": "5e0cd553ab77263e9859d275f5ffa36e", "score": "0.5980771", "text": "public function whereNotIn($name, $value = [])\n {\n $this->must_not[] = [\"terms\" => [$name => $value]];\n\n return $this;\n }", "title": "" }, { "docid": "c4d621fbae2faab7e6146054302177ee", "score": "0.59171194", "text": "public function where_not_in($what = \"\", $in)\n\t{\n\t\t$this->_where_init($what);\n\n\t\t$this->where[$what]['$nin'] = $in;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "9f08ad1d4a0e6f72928a52c5895ee865", "score": "0.5893284", "text": "public function where_doesnt_have($values)\n {\n $hases = explode('|', $values);\n $model = $this->builder->getModel();\n $hases = collect($hases)->filter(function ($has) use($model) {\n $relation_has = explode(',', $has)[0];\n if (Str::contains($has, '.')) return ($model->{explode('.', $relation_has)[0]}() instanceof Relation);\n return ($model->{$relation_has}() instanceof Relation);\n })->toArray();\n $validator = validator([ 'values' => $hases ], [ 'values' => 'array|min:1' ]);\n return $this->builder->when(!$validator->fails(), function (Builder $query) use($hases) {\n foreach ($hases as $has) {\n $exploded_has = explode(',', $has);\n $relation = $exploded_has[0];\n\n $args = array_map(function ($value){\n if (is_float($value)) return (float) $value;\n elseif (is_numeric($value)) return (int) $value;\n elseif ($value == 'NULL') return null;\n return $value;\n }, array_splice($exploded_has,1, count($exploded_has)));\n\n $query->whereDoesntHave($relation, function (Builder $query) use ($args) {\n $index = 0;\n\n while ($index < count($args)) {\n $column = $args[$index];\n $operator = $args[$index+1];\n\n $invalidOperator = !in_array(strtolower($operator), $query->getQuery()->operators, true) &&\n !in_array(strtolower($operator), $query->getQuery()->grammar->getOperators(), true);\n\n if ($invalidOperator) {\n $query->where($query->qualifyColumn($column), $operator);\n $index += 2;\n } else {\n $query->where($query->qualifyColumn($column), $operator, $args[$index + 2]);\n $index += 3;\n }\n }\n });\n }\n });\n }", "title": "" }, { "docid": "41c33242fdf4bbf3902ef96f43037604", "score": "0.5867366", "text": "public function whereNotIn($column, $array = [])\n {\n $this->where->add($column, 'not in', $array);\n return $this;\n }", "title": "" }, { "docid": "6b21a2559e39b105e965f914c0bb825b", "score": "0.5858549", "text": "public function whereIn($field, array $values);", "title": "" }, { "docid": "cb208339124f1e62fc10e02a51b4ab0a", "score": "0.5849761", "text": "public function except_keys($values)\n {\n $keys = explode(',', $values);\n $model = $this->builder->getModel();\n $validator = validator([ 'values' => $keys ], [ 'values.*' => 'exists:'.$model->getTable().','.$model->getKeyName() ]);\n return $this->builder->when(!$validator->fails(), function (Builder $query) use($keys) {\n $query->whereKeyNot($keys);\n });\n }", "title": "" }, { "docid": "381210402625f6de222de7cc81a15d7c", "score": "0.5835164", "text": "public function allByNotIn($column, array $values)\n {\n return $this->model->whereNotIn($column, $values)->get();\n }", "title": "" }, { "docid": "83ac1157ab160b734249ecbc8bbe87de", "score": "0.5807561", "text": "protected function find_not_in( array $not_in_criteria, $field = 'id' )\n\t{\n\t\t$field = isset( $field ) ? $field : $this->primary_key;\n\n\t\t$result = $this->db->where_in( $field, $not_in_criteria )->get( $this->table );\n\n\t\tif ( $result->num_rows() > 0 )\n\t\t{\n\t\t\treturn $result;\n\t\t}\n\n\t\treturn array();\n\t}", "title": "" }, { "docid": "dbb9f8036720f61598abfa2ca9547ad8", "score": "0.5798787", "text": "public function whereIn($field, $values=[]): QueryBuilderInterface;", "title": "" }, { "docid": "f5635e2610a22d4032959fd884d272a0", "score": "0.57798487", "text": "public function whereNotIn($column_name, array $fields = [], $op = 'AND')\r\n {\r\n\r\n $this->whereNotIn[] = array($column_name, $fields, $op);\r\n return $this;\r\n }", "title": "" }, { "docid": "9eafe63b073252990439de4fc6d9eb70", "score": "0.57603097", "text": "public function notIn(TokenConditionNotIn $token, TokenBase $previous = null) {\n\t\treturn \"\\t{$token->property} NOT IN [\" . implode(',', is_array($token->value) ? $token->value : array()) . ']';\n\t}", "title": "" }, { "docid": "c3155c00e924f129be7d2ac5402bca24", "score": "0.5750246", "text": "public function notEq($field, $value) {\n if (is_array($value)) {\n $this->notIn($field, $value);\n\n } else if ($value === null) {\n $this->notNull($field);\n\n } else {\n $this->add($field, '!=', $value);\n }\n\n return $this;\n }", "title": "" }, { "docid": "676eb3e91ac2c60b17b6ca47843058c8", "score": "0.57465297", "text": "public function dbWhereNotBetween ( $arrValue, $query = false ) {\n\n\t\tif ( $query ) $this->setQuery( $query );\n\n\t\treturn $this->query->whereNotBetween( $arrValue[0], $arrValue[1] );\n\t\t\n\t}", "title": "" }, { "docid": "37ebdaebd8829c39c69ec09499932b90", "score": "0.5729797", "text": "public function testWhereNotInListEmpty(): void\n {\n $query = new SelectQuery($this->connection);\n $query->select(['id'])\n ->from('articles')\n ->whereNotInList('id', [], ['allowEmpty' => true])\n ->orderBy(['id']);\n\n $this->assertQuotedQuery(\n 'SELECT <id> FROM <articles> WHERE \\(<id>\\) IS NOT NULL',\n $query->sql(),\n !$this->autoQuote\n );\n\n $result = $query->execute()->fetchAll('assoc');\n $this->assertEquals(['id' => '1'], $result[0]);\n }", "title": "" }, { "docid": "2eec97bc947754a5ec7f7d53e18b7e3b", "score": "0.5728459", "text": "public function findWhereNotIn(string $field, array $values, array $columns = ['*'])\n {\n return $this->tap(\n $this->getCriteriaBuilder()->whereNotIn($field, $values)->get($columns),\n $this->resetBuilderClosure()\n );\n }", "title": "" }, { "docid": "7a338334a8f248c7cd07673e9cf7d874", "score": "0.57127905", "text": "public function whereNotIn($whereNotIn = [])\n {\n $this->_where .= $this->setWhere($whereNotIn, 'not in');\n return $this;\n }", "title": "" }, { "docid": "2b3c3ea4569c081fc53f743f2bd54471", "score": "0.57123446", "text": "public function scopeExcept($query, $value)\n {\n $defaultColumns = ['id', 'created_at', 'updated_at'];\n if (in_array_('deleted_at', $this->dates)) {\n $defaultColumns[] = 'deleted_at';\n }\n if (is_string($value)) {\n $value = [$value];\n }\n return $query->select(array_diff(array_merge($defaultColumns, $this->fillable), (array) $value));\n }", "title": "" }, { "docid": "ecb275fb7e233080af477d99d1a4d7b4", "score": "0.5684033", "text": "protected function whereNotIn(Builder $query, $where)\r\n\t{\r\n\t\tif (! empty($where['values'])) {\r\n\r\n\t\t\t// encrypt column if necessary\r\n\t\t\tif (in_array($where['column'], $this->crypted)) {\r\n\t\t\t\t$values = $this->parameterizeAndEncrypt($where['values']);\r\n\t\t\t} else {\r\n\t\t\t\t$values = $this->parameterize($where['values']);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $this->wrap($where['column']).' not in ('.$values.')';\r\n\t\t}\r\n\r\n\t\treturn '1 = 1';\r\n\t}", "title": "" }, { "docid": "c41352698cfcf698569980ac76c147ec", "score": "0.5680025", "text": "public function findWhereIn(string $field, array $values, array $columns = ['*']);", "title": "" }, { "docid": "f17a77cf109d824a448c6f6e1e9dc081", "score": "0.5673094", "text": "public function orNotIn($key, array $values)\n {\n if ($values) {\n $value = sprintf('%s NOT IN (%s)', $key, join(', ', array_fill(0, count($values), '?')));\n return $this->orAdd($value, $values);\n } else {\n $value = '1';\n return $this->orAdd($value, $values);\n }\n }", "title": "" }, { "docid": "81cade5b07b9b391a7b92900c570019d", "score": "0.5668349", "text": "public function whereNotIn(string $where_key, array $where_values): \\TFHInc\\Ray\\Ray\n {\n $where_array = [];\n\n foreach ($this->working_array as $key => $value) {\n if (is_array($value)) {\n if (array_key_exists($where_key, $value)) {\n if (!in_array($value[$where_key], $where_values)) {\n $where_array[$key] = $value;\n }\n }\n }\n }\n\n $this->setWorkingArray($where_array);\n\n return $this;\n }", "title": "" }, { "docid": "5e99825d0f8c6d03f82656e3a6d4994e", "score": "0.5655006", "text": "public function or_where_not_in($key = NULL, $values = NULL) {\n return $this->_where_in($key, $values, TRUE, 'OR ');\n }", "title": "" }, { "docid": "9a4ac893d57edf9a9ae3cb610e63f5e1", "score": "0.56397855", "text": "public function orNotLike(string $field, $values, string $pos='both'): QueryBuilderInterface;", "title": "" }, { "docid": "0631aeb6e39bb4771e330a365a3d187c", "score": "0.5622786", "text": "function except($fields) {\n return filter(function($v, $k) use ($fields) {\n return !in_array($k, $fields);\n });\n}", "title": "" }, { "docid": "26e8819e0697f601646ae9c4eef54b2e", "score": "0.5605803", "text": "public function testWhereNotInListOrNullEmpty(): void\n {\n $query = new SelectQuery($this->connection);\n $query->select(['id'])\n ->from('articles')\n ->whereNotInListOrNull('id', [], ['allowEmpty' => true])\n ->orderBy(['id']);\n\n $this->assertQuotedQuery(\n 'SELECT <id> FROM <articles> WHERE \\(<id>\\) IS NOT NULL',\n $query->sql(),\n !$this->autoQuote\n );\n\n $result = $query->execute()->fetchAll('assoc');\n $this->assertEquals(['id' => '1'], $result[0]);\n }", "title": "" }, { "docid": "c38ccb56ecddc3a968d49108637ddda3", "score": "0.5604959", "text": "public function findWhereNotIn($field, array $values, $columns = ['*'])\n {\n $this->applyCriteria();\n $this->applyScope();\n\n $model = $this->model->whereNotIn($field, $values)->get($columns);\n $this->resetEverything();\n return $this->parserResult($model);\n }", "title": "" }, { "docid": "d185ad4bc841b2f7869e8a6bc09d35ed", "score": "0.5603772", "text": "public function in($field, $values, $not = FALSE) \n\t{\n\t\tif (is_array($values))\n\t\t{\n\t\t\t$escaped_values = array();\n\t\t\tforeach ($values as $v)\n\t\t\t{\n\t\t\t\tif (is_numeric($v)) \n\t\t\t\t{\n\t\t\t\t\t$escaped_values[] = $v;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$escaped_values[] = \"'\".$this->driver->escape_string($v).\"'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$values = implode(',', $escaped_values);\n\t\t}\n\t\t$this->where($this->driver->escape_column($field).' '.($not === TRUE ? 'NOT ' : '').'IN ('.$values.')');\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1b3a9c1acc9a4b0cd93227d5304b3b49", "score": "0.55812335", "text": "protected function _Get_Without_SQL() {\n if (!$this->without || !is_array($this->without) || count($this->without) < 1) { return false; }\n // The list of flags to look for\n $without_flags = $this->without[0];\n // The condition of the flags\n $without_condition = $this->without[1];\n // Create a new sql helper\n $reports_helper_sql_flags = new VCFF_Reports_Helper_SQL_Flags();\n // Retrieve the flags table\n $flags_table = $reports_helper_sql_flags->Get_Flags_Table();\n // The sql related vars\n $sql = ''; $prepare = array();\n // Loop through each flag\n foreach ($without_flags as $k => $flag) {\n // If we are looking for ANY match\n if ($without_condition == 'any') {\n // Use an OR operator\n $sql .= $sql ? \" OR \" : \"\";\n } // Otherwise use an AND operator\n else { $sql .= $sql ? \" AND \" : \"\"; }\n // Populate the SQL string\n $sql .= \"NOT EXISTS (SELECT * FROM \".$flags_table.\" AS Flags WHERE Flags.entry_uuid = Entry.uuid AND Flags.flag_code = %s)\";\n // Add to the prepare array\n $prepare[] = $flag;\n }\n // Return the resulting string\n return array(\n 'sql' => '('.$sql.')',\n 'prepare' => $prepare\n );\n }", "title": "" }, { "docid": "4d89f7ffee38cf579339eb7716a97e60", "score": "0.55796856", "text": "public function selectWithSelectWhereColumnsIsNotinAnotherColumn($columns, $table, $whereColumn, \n $isNotInColumn, array $whereValuesArray, $isNullColumn, $singleRow=True) {\n assert(is_string($columns));\n assert(is_string($table));\n assert(is_string($isNotInColumn)); \n assert(is_bool($singleRow));\n $where = \"$whereColumn NOT IN (SELECT $isNotInColumn FROM $table WHERE $isNotInColumn IS NOT NULL)\";\n $where = self::prepareWhereValuesSQL($whereValuesArray, $where); //the values\n $where .= \" AND $isNullColumn IS NULL\";\n $table = strtolower($table); //lowercase tables\n $sql = \"SELECT $columns FROM $table WHERE $where;\";\n return $this->runQueryReturnResults($sql, $singleRow, $whereValuesArray);\n }", "title": "" }, { "docid": "dbd39b4b1968038284c661623f6c9a96", "score": "0.5552921", "text": "function elgg_get_entity_private_settings_where_sql($table, $names = NULL, $values = NULL,\n$pairs = NULL, $pair_operator = 'AND', $name_prefix = '') {\n\n\tglobal $CONFIG;\n\n\t// @todo short circuit test\n\n\t$return = array (\n\t\t'joins' => array (),\n\t\t'wheres' => array(),\n\t);\n\n\t$return['joins'][] = \"JOIN {$CONFIG->dbprefix}private_settings ps on\n\t\t{$table}.guid = ps.entity_guid\";\n\n\t$wheres = array();\n\n\t// get names wheres\n\t$names_where = '';\n\tif ($names !== NULL) {\n\t\tif (!is_array($names)) {\n\t\t\t$names = array($names);\n\t\t}\n\n\t\t$sanitised_names = array();\n\t\tforeach ($names as $name) {\n\t\t\t$name = $name_prefix . $name;\n\t\t\t$sanitised_names[] = '\\'' . sanitise_string($name) . '\\'';\n\t\t}\n\n\t\t$names_str = implode(',', $sanitised_names);\n\t\tif ($names_str) {\n\t\t\t$names_where = \"(ps.name IN ($names_str))\";\n\t\t}\n\t}\n\n\t// get values wheres\n\t$values_where = '';\n\tif ($values !== NULL) {\n\t\tif (!is_array($values)) {\n\t\t\t$values = array($values);\n\t\t}\n\n\t\t$sanitised_values = array();\n\t\tforeach ($values as $value) {\n\t\t\t// normalize to 0\n\t\t\tif (!$value) {\n\t\t\t\t$value = 0;\n\t\t\t}\n\t\t\t$sanitised_values[] = '\\'' . sanitise_string($value) . '\\'';\n\t\t}\n\n\t\t$values_str = implode(',', $sanitised_values);\n\t\tif ($values_str) {\n\t\t\t$values_where = \"(ps.value IN ($values_str))\";\n\t\t}\n\t}\n\n\tif ($names_where && $values_where) {\n\t\t$wheres[] = \"($names_where AND $values_where)\";\n\t} elseif ($names_where) {\n\t\t$wheres[] = \"($names_where)\";\n\t} elseif ($values_where) {\n\t\t$wheres[] = \"($values_where)\";\n\t}\n\n\t// add pairs which must be in arrays.\n\tif (is_array($pairs)) {\n\t\t// join counter for incremental joins in pairs\n\t\t$i = 1;\n\n\t\t// check if this is an array of pairs or just a single pair.\n\t\tif (isset($pairs['name']) || isset($pairs['value'])) {\n\t\t\t$pairs = array($pairs);\n\t\t}\n\n\t\t$pair_wheres = array();\n\n\t\tforeach ($pairs as $index => $pair) {\n\t\t\t// @todo move this elsewhere?\n\t\t\t// support shortcut 'n' => 'v' method.\n\t\t\tif (!is_array($pair)) {\n\t\t\t\t$pair = array(\n\t\t\t\t\t'name' => $index,\n\t\t\t\t\t'value' => $pair\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// must have at least a name and value\n\t\t\tif (!isset($pair['name']) || !isset($pair['value'])) {\n\t\t\t\t// @todo should probably return false.\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (isset($pair['operand'])) {\n\t\t\t\t$operand = sanitise_string($pair['operand']);\n\t\t\t} else {\n\t\t\t\t$operand = ' = ';\n\t\t\t}\n\n\t\t\t// for comparing\n\t\t\t$trimmed_operand = trim(strtolower($operand));\n\n\t\t\t// if the value is an int, don't quote it because str '15' < str '5'\n\t\t\t// if the operand is IN don't quote it because quoting should be done already.\n\t\t\tif (is_numeric($pair['value'])) {\n\t\t\t\t$value = sanitise_string($pair['value']);\n\t\t\t} else if (is_array($pair['value'])) {\n\t\t\t\t$values_array = array();\n\n\t\t\t\tforeach ($pair['value'] as $pair_value) {\n\t\t\t\t\tif (is_numeric($pair_value)) {\n\t\t\t\t\t\t$values_array[] = sanitise_string($pair_value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$values_array[] = \"'\" . sanitise_string($pair_value) . \"'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($values_array) {\n\t\t\t\t\t$value = '(' . implode(', ', $values_array) . ')';\n\t\t\t\t}\n\n\t\t\t\t// @todo allow support for non IN operands with array of values.\n\t\t\t\t// will have to do more silly joins.\n\t\t\t\t$operand = 'IN';\n\t\t\t} else if ($trimmed_operand == 'in') {\n\t\t\t\t$value = \"({$pair['value']})\";\n\t\t\t} else {\n\t\t\t\t$value = \"'\" . sanitise_string($pair['value']) . \"'\";\n\t\t\t}\n\n\t\t\t$name = sanitise_string($name_prefix . $pair['name']);\n\n\t\t\t// @todo The multiple joins are only needed when the operator is AND\n\t\t\t$return['joins'][] = \"JOIN {$CONFIG->dbprefix}private_settings ps{$i}\n\t\t\t\ton {$table}.guid = ps{$i}.entity_guid\";\n\n\t\t\t$pair_wheres[] = \"(ps{$i}.name = '$name' AND ps{$i}.value\n\t\t\t\t$operand $value)\";\n\n\t\t\t$i++;\n\t\t}\n\n\t\t$where = implode(\" $pair_operator \", $pair_wheres);\n\t\tif ($where) {\n\t\t\t$wheres[] = \"($where)\";\n\t\t}\n\t}\n\n\t$where = implode(' AND ', $wheres);\n\tif ($where) {\n\t\t$return['wheres'][] = \"($where)\";\n\t}\n\n\treturn $return;\n}", "title": "" }, { "docid": "f1bb315de89c8a79f8f59bf31ce90607", "score": "0.55501926", "text": "public function getDoktypeExcludeWhere() {}", "title": "" }, { "docid": "21a56741e14b67a1944daa8e6c9d382c", "score": "0.5549856", "text": "function in($a_field, $a_values, $negate = false, $a_type = \"\")\n\t{\n\t\tif (count($a_values) == 0)\n\t\t{\n\t\t\t// BEGIN fixed mantis #0014191:\n\t\t\t//return \" 1=2 \";\t\t// return a false statement on empty array\n\t\t\treturn $negate ? ' 1=1 ' : ' 1=2 ';\n\t\t\t// END fixed mantis #0014191:\n\t\t}\n\t\tif ($a_type == \"\")\t\t// untyped: used ? for prepare/execute\n\t\t{\n\t\t\t$str = $a_field.(($negate) ? \" NOT\" : \"\").\" IN (?\".str_repeat(\",?\", count($a_values) - 1).\")\";\n\t\t}\n\t\telse\t\t\t\t\t// typed, use values for query/manipulate\n\t\t{\n\t\t\t$str = $a_field.(($negate) ? \" NOT\" : \"\").\" IN (\";\n\t\t\t$sep = \"\";\n\t\t\tforeach ($a_values as $v)\n\t\t\t{\n\t\t\t\t$str.= $sep.$this->quote($v, $a_type);\n\t\t\t\t$sep = \",\";\n\t\t\t}\n\t\t\t$str.= \")\";\n\t\t}\n\t\t\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "b111ddda675ef6920bee04bc72628d1c", "score": "0.5549333", "text": "public function testSelectWhereNot(): void\n {\n $query = new SelectQuery($this->connection);\n $result = $query\n ->select(['id'])\n ->from('comments')\n ->where(function ($exp) {\n return $exp->not(\n $exp->and(['id' => 2, 'created' => new DateTime('2007-03-18 10:47:23')], ['created' => 'datetime'])\n );\n })\n ->execute();\n $rows = $result->fetchAll('assoc');\n $this->assertCount(5, $rows);\n $this->assertEquals(['id' => 1], $rows[0]);\n $this->assertEquals(['id' => 3], $rows[1]);\n $result->closeCursor();\n\n $query = new SelectQuery($this->connection);\n $result = $query\n ->select(['id'])\n ->from('comments')\n ->where(function ($exp) {\n return $exp->not(\n $exp->and(['id' => 2, 'created' => new DateTime('2012-12-21 12:00')], ['created' => 'datetime'])\n );\n })\n ->execute();\n $this->assertCount(6, $result->fetchAll());\n $result->closeCursor();\n }", "title": "" }, { "docid": "c861bd6a1e827515c0addcd2c2d5e3db", "score": "0.5538419", "text": "public function filterByNot() {\n $args = func_get_args();\n return $this->internalFilterBy($args, '!=');\n }", "title": "" } ]
e0da4a44a4dd57444326b63c312ea366
Get High limit of low range
[ { "docid": "91e632aff7f15279fddc825ab0f73bcb", "score": "0.6030713", "text": "function getLow()\n {\n return $this->getAttribute(\"low\");\n }", "title": "" } ]
[ { "docid": "b3bca52d5ee677a6579a0dbec9723cfc", "score": "0.6691578", "text": "public function getPriceRange()\n {\n $range = $this->getData('price_range');\n\n if (!$range) {\n $maxPrice = $this->getMaxPriceInt();\n\n if (!$range) {\n $calculation = Mage::app()->getStore()->getConfig(self::XML_PATH_RANGE_CALCULATION);\n\n if (!$calculation || $calculation == self::RANGE_CALCULATION_AUTO) {\n $index = 1;\n \n\t\t\t\t\tdo {\n $range = pow(10, (strlen(floor($maxPrice)) - $index));\n $items = $this->getRangeItemCounts($range);\n $index++;\n } while ($range > self::MIN_RANGE_POWER && count($items) < 2);\n } else {\n $range = (float)Mage::app()->getStore()->getConfig(self::XML_PATH_RANGE_STEP);\n }\n }\n\t\t\t\n $this->setData('price_range', $range);\n }\n\t\t\n return $range;\n }", "title": "" }, { "docid": "4ccae6e7e34dbd0cd0b747ec8055ce6c", "score": "0.66632783", "text": "public function _getHigh(){ return floatval($this->_getDataKey('high')); }", "title": "" }, { "docid": "dd242bb00db784c594723d792c6e1489", "score": "0.66355073", "text": "public function _getLow(){ return floatval($this->_getDataKey('low')); }", "title": "" }, { "docid": "32d0f5b812c61908a4f198642f3880c6", "score": "0.6613695", "text": "function idealEndRailCheckfirsthigh($EndMaxs){\nreturn $EndMaxs[count($EndMaxs)-1];\t\t\t\n}", "title": "" }, { "docid": "9fd7409473b4876422b006436b715395", "score": "0.64776444", "text": "function ocicollmax () {}", "title": "" }, { "docid": "a9704fbb6ea41cff726b52d6fa52a84a", "score": "0.64539284", "text": "public function maxValue();", "title": "" }, { "docid": "a43769fae950ce68c2264dee506089fa", "score": "0.6345463", "text": "public function getRange()\n\t{\n\t\tif ($this->getIsRanged() && !is_null($this->getRangeMin()) && !is_null($this->getRangeMax())) {\n\t\t\treturn (double)$this->getRangeMax() - (double)$this->getRangeMin(); \n\t\t}\n\t\t\n\t\treturn null;\n\t}", "title": "" }, { "docid": "47c80298e39e56da3d247009b2390c56", "score": "0.6327143", "text": "public function getMaxValue()\n {\n return $this->maxValue;\n }", "title": "" }, { "docid": "4bb9a46fa881585c05b2ad21f4110179", "score": "0.6315801", "text": "public function getMinLimit() {\n return $this->min < 2 ? 2 : $this->min;\n }", "title": "" }, { "docid": "c02a5c5af6e60670a7d0199ecdc67abe", "score": "0.6255038", "text": "public function highvalue($limit = null)\n {\n $params = array();\n\n if ($limit !== null) {\n $params['limit'] = $limit;\n }\n\n return $this->make('highvalue', $params);\n }", "title": "" }, { "docid": "e867f760f9a86affc13d71e0c7ff5727", "score": "0.6251543", "text": "private function _validate_range( $input, $high ) {\r\n\r\n\t\tif ( function_exists( 'filter_var' ) ) {\r\n\r\n\t\t\t$options = array( 'options' => array( 'min_range' => 1, 'max_range' => $high ) );\r\n\r\n\t\t\tif ( filter_var( $input, FILTER_VALIDATE_INT, $options ) ) {\r\n\t\t\t\treturn $input;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\telse {\r\n\r\n\t\t\t$input = intval( $input ); // Force an integer\r\n\r\n\t\t\tif ( $input >= 1 && $input <= $high ) {\r\n\t\t\t\treturn $input;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn $high;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "af076100bebb5357230ba6fbfa71ae4f", "score": "0.6228193", "text": "public function get_range($data) {\n return $this->get_max($data) - $this->get_min($data);\n }", "title": "" }, { "docid": "29bcb840bedff19d2fd9e78cded7b0ba", "score": "0.6215634", "text": "public function high2() {\n return $this->segments[count($this->segments)-1]->high;\n }", "title": "" }, { "docid": "c4b7aca133dd5567e7f9d9617244d8fc", "score": "0.62113917", "text": "function setMaxRangeDummy($val=\"100\")\r\n {\r\n \t\t$ret = \"\";\r\n \tif($val<=100)\r\n\t\t\t$ret = 100;\r\n\t\telse if($val>100 && $val<=200)\r\n\t\t\t$ret = 200;\r\n\t\telse if($val>100 && $val<=200)\r\n\t\t\t$ret = 200;\r\n\t\telse if($val>200 && $val<=300)\r\n\t\t\t$ret = 300;\r\n\t\telse if($val>300 && $val<=400)\r\n\t\t\t$ret = 400;\r\n\t\telse if($val>400 && $val<=500)\r\n\t\t\t$ret = 500;\r\n\t\telse if($val>500 && $val<=600)\r\n\t\t\t$ret = 600;\r\n\t\telse if($val>600 && $val<=700)\r\n\t\t\t$ret = 700;\r\n\t\telse if($val>700 && $val<=800)\r\n\t\t\t$ret = 800;\r\n\t\telse if($val>800)\r\n\t\t\t$ret = 1000;\r\n\t\telse\r\n\t\t\t$ret = 100;\r\n\t\t\t\r\n\t\treturn $ret;\r\n }", "title": "" }, { "docid": "a51adb6b552806fd5858a1a818427ecb", "score": "0.6210164", "text": "public function getPriceRange() {\n\n return $this->getMaxPriceInt();\n }", "title": "" }, { "docid": "23c7421cad6a8fa5f4d876f9c4cb6ed5", "score": "0.6197399", "text": "function highLow($data) {\n \tif(!empty($this->data['Bidbutler']['minimum_price']) && !empty($this->data['Bidbutler']['maximum_price'])) {\n \t\tif($this->data['Bidbutler']['minimum_price'] < $this->data['Bidbutler']['maximum_price']) {\n \t\t\treturn true;\n \t\t} else {\n \t\t\treturn false;\n \t\t}\n \t} else {\n \t\treturn true;\n \t}\n }", "title": "" }, { "docid": "588aa737b36dbd5d06e439033dbac215", "score": "0.6192913", "text": "public function low() {\n return $this->segments[0]->low;\n }", "title": "" }, { "docid": "acb07e09ee95887541d266d715dd9faa", "score": "0.61390626", "text": "function getHigh()\n {\n return $this->getAttribute(\"high\");\n }", "title": "" }, { "docid": "ca0120bee23d36d927838f3e1329ed20", "score": "0.61379594", "text": "public function getSleepHighLimit()\n {\n return $this->sleepHighLimit;\n }", "title": "" }, { "docid": "e15888fd4c2ceadcf7ffd349e0a5a3c5", "score": "0.61076856", "text": "public function getHigh() {\n\t\treturn isset($this->attributes['high'])?$this->attributes['high']:null;\n\t}", "title": "" }, { "docid": "76b8daa7d26c0fd8b9bdd4078fe9b28a", "score": "0.6097215", "text": "public function getRange()\n {\n return $this->range;\n }", "title": "" }, { "docid": "bf4fa54c8c5f6e9f1d0d437739f3c1ba", "score": "0.60750115", "text": "function max_range($pdo, $table)\n{\n\tglobal $cache_dir;\n\tif (!is_dir($cache_dir.'table_infos'))\n\t\tmkdir ($cache_dir.'table_infos');\n\t$fn = $cache_dir.'table_infos/max_range-'.$table;\n\tif (file_exists($fn))\n\t{\n\t\t$inf = fopen($fn, \"r\");\n\t\t$max = fgets($inf);\n\t\treturn intval($max)+1;\n\t}\n\n\t$query = 'select max(end-start) from '.$table;\n\t$stmt = $pdo->prepare($query);\n\t$stmt->execute();\n\tif ($row = $stmt->fetch(PDO::FETCH_NUM))\n\t{\n\t\t$max = $row[0];\n\t\t$outf = fopen($fn, \"w\");\n\t\tfprintf($outf, \"%s\", $max);\n\t\tfclose($outf);\n\t\treturn intval($max)+1;\n\t}\n\treturn 1;\n}", "title": "" }, { "docid": "bbca315927368d6ac84bf5cb0cce5407", "score": "0.6051763", "text": "public function getMinLimit()\n {\n return 2 > $this->min ? 2 : $this->min;\n }", "title": "" }, { "docid": "21d7f657a564f3e5532f4f45b0185fa9", "score": "0.6047893", "text": "public function getMaxValue()\n {\n return $this->max_value;\n }", "title": "" }, { "docid": "21d7f657a564f3e5532f4f45b0185fa9", "score": "0.6047893", "text": "public function getMaxValue()\n {\n return $this->max_value;\n }", "title": "" }, { "docid": "9d84be431dd79f82d7609a6d1ae84b89", "score": "0.60464656", "text": "abstract public function getRange();", "title": "" }, { "docid": "bfad220e9b9d38cf85906441f4eaf45b", "score": "0.6011261", "text": "public function get_max() {\n\t\treturn $this->values_max;\n\t}", "title": "" }, { "docid": "8b652fd2f7c64949cccab459b0c18560", "score": "0.6005785", "text": "public function usesMax();", "title": "" }, { "docid": "46810ae55d004894a52991b166c87cd9", "score": "0.60048825", "text": "public function getMax();", "title": "" }, { "docid": "12d2e39ca6bf2567121731741b52d564", "score": "0.5984816", "text": "public function getMaxValue()\n {\n return Value::where('profile_stn_code', $this->profile_stn_code)\n ->where('data_code', $this->data_code)\n ->where('tag', '<>', self::NODATA)\n ->where('value', $this->getMaxString())\n ->first();\n }", "title": "" }, { "docid": "7b8fba70f7a041e07dc68fcd0c170bec", "score": "0.59813374", "text": "public function get_maxValue(): float\n {\n return $this->_maxVal;\n }", "title": "" }, { "docid": "7dd51e62a7a9d608895097b0277155e6", "score": "0.5976881", "text": "function wpSearch_getLimit($limit)\n{\n\tglobal $wpSearch_low;\n\tglobal $wpSearch_high;\n\n\tif( is_search() && wpSearchIsIndexBuilt() )\n\t{\n\t\t$temp \t\t\t= str_replace(\"LIMIT\", \"\", $limit);\n\t\t$temp \t\t\t= split(\",\", $temp);\n\t\t$wpSearch_low \t= intval($temp[0]);\n\t\t$wpSearch_high \t= intval($wpSearch_low + intval($temp[1]) - 1);\n\t}\n\t\n\treturn $limit;\n}", "title": "" }, { "docid": "1cca6fee96b52c004f629917a65a129f", "score": "0.59645337", "text": "function getMax ($x, $y) {\n if ($x >= $y) return $x;\n\n return $y;\n }", "title": "" }, { "docid": "a82994660f1f37abd80aac575e828bc6", "score": "0.59329927", "text": "public function getMaxLimit()\n {\n return (int) $this->max;\n }", "title": "" }, { "docid": "28c4898de80b872b51432c5f6c0f690c", "score": "0.59046215", "text": "public function getMaxInterval(): int\n {\n return $this->maxInterval;\n }", "title": "" }, { "docid": "6348d8837ed984305c9535475a5a4e6a", "score": "0.59044796", "text": "function min_max($val, $min, $max) {\r\n\treturn min(max($val, $min), $max);\r\n}", "title": "" }, { "docid": "20d30f46ff81967f9b79011b8c4384b5", "score": "0.5899111", "text": "function get_max_and_min($numbers){\n\t$results = array('max'=>0, 'min'=>9999);\n\t//Check for max\n\tfor ($i=0; $i < count($numbers) ; $i++) { \n\t\tif ($results['max'] < $numbers[$i]) {\n\t\t\t$results['max'] = $numbers[$i];\n\t\t}\n\t}\n\t//Check for min\n\tfor ($i=0; $i < count($numbers) ; $i++) { \n\t\tif ($results['min'] > $numbers[$i]) {\n\t\t\t$results['min'] = $numbers[$i];\n\t\t}\n\t}\n\treturn $results;\n\t// echo 'Max: '.$results['max'].' || Min:'.$results['min'];\n}", "title": "" }, { "docid": "8fd176c61affb8aac49ad1d25fb2071d", "score": "0.5891039", "text": "function get_x_max()\n\t{\n\t\t$this->sanity(__FUNCTION__);\n\n\t\t$x = array_keys($this->_config[self::VALUES]);\n\t\tsort($x);\n\t\treturn array_pop($x);\n\t}", "title": "" }, { "docid": "e81e50b77af257c39fc4e6fbc9b7e4a3", "score": "0.5889171", "text": "public function getMaxLimit() {\n return intval($this->max);\n }", "title": "" }, { "docid": "c75e3bbe063e850ee85bd85430c2b7e1", "score": "0.58718204", "text": "public function getLow() {\n\t\treturn isset($this->attributes['low'])?$this->attributes['low']:null;\n\t}", "title": "" }, { "docid": "435bfb247ddfe8693485e26284b8902d", "score": "0.58433163", "text": "function MaxMinGrdSpd ()\n\t{\n\t\tforeach ( $this->gs as $value )\n\t\t{\n\t\t\tif ( $this->maxGrdSpd < $value[0] )\n\t\t\t\t$this->maxGrdSpd = $value[0];\n\t\t\tif ( $this->minGrdSpd > $value[0] )\n\t\t\t\t$this->minGrdSpd = $value[0];\n\t\t}\r\n\t}", "title": "" }, { "docid": "933fe9d18092d90152f2f566e3fb8c02", "score": "0.58324105", "text": "public function max () {}", "title": "" }, { "docid": "5efef270f0251f8d1920beab69c4f53d", "score": "0.5830055", "text": "public static function maxValue()\n {\n return static::createFromTimestamp(PHP_INT_MAX);\n }", "title": "" }, { "docid": "131b30499810703378f0f29e0feff710", "score": "0.58195186", "text": "function best_numeric_range($positive,$negative) {\n\t\t//echo \"postive = \" .print_r($positive,1) . \"<br>\\n\";\n\t\t//echo \"negative = \" .print_r($negative,1) . \"<br>\\n\";\n\t\t$pos_num = array_filter( $positive, 'is_numeric' );\n\t\t$neg_num = array_filter( $negative, 'is_numeric' );\n\t\t\n\t\tsort($pos_num, SORT_NUMERIC );\n\t\tsort($neg_num, SORT_NUMERIC );\n\n\t\t//echo \"pos_num = \" .print_r($pos_num,1) . \"<br>\\n\";\n\t\t//echo \"neg_num = \" .print_r($neg_num,1) . \"<br>\\n\";\n\n\t\t$pos_smaller = 0;\n\t\t$neg_smaller = 0;\n\t\t$pos_bigger = $pos_tot = count($pos_num);\n\t\t$neg_bigger = $neg_tot = count($neg_num);\n\t\t\n\t\tif ( $pos_bigger == 0 || $neg_bigger == 0 ) {\n\t\t\treturn array( NO_FITNESS, array( 'kind'=>'UNKNOWN' ) );\n\t\t}\n\t\t\n\t\t$best_fitness = NO_FITNESS;\n\t\t$best_lower = false;\n\t\t$best_upper = false;\n\t\t$best_pos_upper = false;\n\t\t\n\t\t$pos_index = 0;\n\t\t$neg_index = 0;\n\t\t\n\t\twhile ( $pos_bigger > 0 && $neg_bigger > 0 ) {\n\t\t\t$next_pos_val = $pos_num[$pos_index];\n\t\t\t$next_neg_val = $neg_num[$neg_index];\n\t\t\t//echo \"at pos_bigger=$pos_bigger neg_bigger=$neg_bigger $next_pos_val = pos_num[$pos_index] $next_neg_val = neg_num[$neg_index] <br>\\n\";\n\t\t\tif ( $next_pos_val < $next_neg_val ) {\n\t\t\t\t$upper = $next_neg_val;\n\t\t\t\twhile ( $pos_bigger > 0 && $pos_num[$pos_index] < $next_neg_val ) {\n\t\t\t\t\t$lower = $pos_num[$pos_index];\n\t\t\t\t\t$pos_index++; $pos_bigger--; $pos_smaller++;\n\t\t\t\t}\n\t\t\t} elseif ( $next_pos_val > $next_neg_val ) {\n\t\t\t\t$upper = $next_pos_val;\n\t\t\t\twhile ( $neg_bigger > 0 && $next_pos_val > $neg_num[$neg_index] ) {\n\t\t\t\t\t$lower = $neg_num[$neg_index];\n\t\t\t\t\t$neg_index++; $neg_bigger--; $neg_smaller++;\n\t\t\t\t}\n\t\t\t} else { // $next_pos_val == $next_neg_val\n\t\t\t\t$lower = $next_pos_val;\n\t\t\t\twhile ( $pos_bigger > 0 && $pos_num[$pos_index] == $lower ) {\n\t\t\t\t\t$pos_index++; $pos_bigger--; $pos_smaller++;\n\t\t\t\t}\n\t\t\t\twhile ( $neg_bigger > 0 && $neg_num[$neg_index] == $lower ) {\n\t\t\t\t\t$neg_index++; $neg_bigger--; $neg_smaller++;\n\t\t\t\t}\n\t\t\t\tif ( $pos_bigger == 0 ) {\n\t\t\t\t\tif ( $neg_bigger == 0 ) { // both zero \n\t\t\t\t\t\tbreak; // no more to try\n\t\t\t\t\t} else { // just pos zero\n\t\t\t\t\t\t$upper = $neg_num[$neg_index];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( $neg_bigger == 0 ) { // just neg zero\n\t\t\t\t\t\t$upper = $pos_num[$pos_index];\n\t\t\t\t\t} else { // both OK\n\t\t\t\t\t}\n\t\t\t\t\t\t$upper = min( $pos_num[$pos_index], $neg_num[$neg_index] );\n\t\t\t\t}\n\t\t\t}\n\t\t\t//echo \"moved to pos_bigger=$pos_bigger neg_bigger=$neg_bigger {$pos_num[$pos_index]} = pos_num[$pos_index] {$neg_num[$neg_index]} = neg_num[$neg_index] <br>\\n\";\n\t\t\t$fitness = $this->single_choice_fitness($pos_bigger,$neg_bigger,$pos_smaller,$neg_smaller);\n\t\t\t//echo \"range [$lower,$upper] = $fitness = single_choice_fitness($pos_bigger,$neg_bigger,$pos_smaller,$neg_smaller) <br>\\n\";\n\t\t\tif ( $fitness > $best_fitness ) {\n\t\t\t\t$best_fitness = $fitness;\n\t\t\t\t$best_lower = $lower;\n\t\t\t\t$best_upper = $upper;\n\t\t\t\t$best_pos_upper = $pos_bigger * $neg_smaller >= $pos_smaller * $neg_bigger ; \n\t\t\t\t // equivalent to $pos_bigger / $neg_bigger >= $pos_smaller / $neg_smaller ;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$best_value = nice_value_to_split_range($best_lower,$best_upper);\n\t\t\n\t\tif ( $best_value == $best_lower ) {\n\t\t\tif ( $best_pos_upper ) {\n\t\t\t\t$operator = \">\";\n\t\t\t} else {\n\t\t\t\t$operator = \"<=\";\n\t\t\t}\n\t\t} elseif ( $best_value == $best_upper ) {\n\t\t\tif ( $best_pos_upper ) {\n\t\t\t\t$operator = \">=\";\n\t\t\t} else {\n\t\t\t\t$operator = \"<\";\n\t\t\t}\n\t\t} else {\n\t\t\tif ( $best_pos_upper ) {\n\t\t\t\t$operator = \">\";\n\t\t\t} else {\n\t\t\t\t$operator = \"<\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t//echo \"best_value=$best_value best_lower=$best_lower best_pos_upper=$best_pos_upper operator=$operator <br>\\n\";\n\t\t\n\t\tif ( $best_fitness == NO_FITNESS ) {\n\t\t\treturn array( NO_FITNESS, array( 'kind'=>'UNKNOWN' ) );\n\t\t} else {\n\t\t\treturn array( $best_fitness, $best_value, $operator );\n\t\t}\n\t}", "title": "" }, { "docid": "10af4f16170be893924d57a1e62a68d6", "score": "0.58187455", "text": "function front_get_value_range_id_from_value($value_in_million,&$value_range_id){\n\t\tif($value_in_million == 0){\n\t\t\t$value_range_id = 0;\n\t\t\treturn true;\n\t\t}\n\t\t$db = new db();\n\t\t$q = \"select value_range_id,lower_value_limit_in_million from \".TP.\"transaction_value_range_master order by lower_value_limit_in_million desc\";\n\t\t$ok = $db->select_query($q);\n\t\tif(!$ok){\n\t\t\treturn false;\n\t\t}\n\t\t$slabs = $db->get_result_set_as_array();\n\t\t$slab_count = $db->row_count();\n\t\t\n\t\t$value_range_id = 0;\n\t\tfor($i=0;$i<$slab_count;$i++){\n\t\t\tif($value_in_million >= $slabs[$i]['lower_value_limit_in_million']){\n\t\t\t\t$value_range_id = $slabs[$i]['value_range_id'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1a64dc60579b16bad3e9ba8f6ed67dee", "score": "0.5815871", "text": "public function getMaxValueValue()\n {\n return $this->readWrapperValue(\"max_value\");\n }", "title": "" }, { "docid": "2e40234be78ec8566203f7e023957dc5", "score": "0.58128357", "text": "function getRangeMaxInt($max)\n{\n $array = [];\n for ($i = 1; $i < $max; $i++) {\n $array[] = $i;\n }\n\n return $array;\n}", "title": "" }, { "docid": "f5c85d6b323816dd5fd766a385dea5ee", "score": "0.5809211", "text": "function getMaximum()\r\n {\r\n return $this->maximum;\r\n }", "title": "" }, { "docid": "7ce06827d16ef2dcd6cf0ffdf0da1a1a", "score": "0.58018255", "text": "public function getMax()\n {\n return $this->max;\n }", "title": "" }, { "docid": "7ce06827d16ef2dcd6cf0ffdf0da1a1a", "score": "0.58018255", "text": "public function getMax()\n {\n return $this->max;\n }", "title": "" }, { "docid": "7ce06827d16ef2dcd6cf0ffdf0da1a1a", "score": "0.58018255", "text": "public function getMax()\n {\n return $this->max;\n }", "title": "" }, { "docid": "7ce06827d16ef2dcd6cf0ffdf0da1a1a", "score": "0.58018255", "text": "public function getMax()\n {\n return $this->max;\n }", "title": "" }, { "docid": "6611f593be68a011c1ff4a8e8e3ef18d", "score": "0.5784404", "text": "function getNumberMax($max = 1);", "title": "" }, { "docid": "2c9c9519c3ff93095fac6b33ea9be32a", "score": "0.5780795", "text": "public function getLimit() : int;", "title": "" }, { "docid": "a2738304866c6470c3802ab44f3dc286", "score": "0.5777709", "text": "function clamp($val, $max, $min) {\n\t$val = (($val > $max)? $max : $val);\n\t$val = (($val < $min)? $min : $val);\n\treturn $val;\n}", "title": "" }, { "docid": "88ad52bd02fb1f539cb498aaa0426a66", "score": "0.5760125", "text": "function _getMaximum()\n {\n return $this->_maximum;\n }", "title": "" }, { "docid": "40e4d2078d4d57a75db1989af1d6f697", "score": "0.5758649", "text": "function get_minMax($a, $min, $max) {\n\t\tif ($min <= $a && $a <= $max) {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "0079be7910a707e7c4afe80f614a6c16", "score": "0.575811", "text": "public static function maxBound($intervals)\n {\n $bounds = array_column($intervals, 1);\n sort($bounds);\n return array_pop($bounds);\n }", "title": "" }, { "docid": "cb310e58df161e1cdb32416336fa9d51", "score": "0.5758108", "text": "private static function keepWithin($value, $min, $max) {\n if($value < $min) return $min;\n if($value > $max) return $max;\n return $value;\n }", "title": "" }, { "docid": "bca25e9d43f5ebc58d488279ab9b83ff", "score": "0.5756587", "text": "public function getLowPrice()\n {\n return (int) $this->info[5];\n }", "title": "" }, { "docid": "0b5fd1a8c723817f33fb08a87ae60ca1", "score": "0.5743356", "text": "public function getMax()\n {\n return $this->_max;\n }", "title": "" }, { "docid": "9b52bcc4ac3d64992bb968094ee5f81f", "score": "0.5742801", "text": "protected function getLowerBound()\n {\n return (int) $this->newNestedSetQuery()->max($this->getRgtName());\n }", "title": "" }, { "docid": "e3868093a29f55f9970d28e578930abb", "score": "0.5729646", "text": "public function getMax()\n\t{\n\t\treturn $this->max;\n\t}", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.5728017", "text": "public function getLimit();", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.5728017", "text": "public function getLimit();", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.5728017", "text": "public function getLimit();", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.5728017", "text": "public function getLimit();", "title": "" }, { "docid": "2be063dc51b5537185fed1499c373aed", "score": "0.5714733", "text": "public function getRangeD() : float;", "title": "" }, { "docid": "5d945c0f764f0c2627a7889fb8e3fe9f", "score": "0.57137585", "text": "public function __getLowAmount($from, $to)\n {\n\t\t$con=$this->connectDB();\n $res = $con->query(\"SELECT `id`, `product_name`, `amount` FROM `\".$this->table.\"` WHERE `amount` < 10 ORDER BY `amount` LIMIT \".$from.\",\".$to.\" \");// DESC is opposite\n return $res;\n\t}", "title": "" }, { "docid": "646f1076179f0f5fb62d3639a7473f92", "score": "0.57120055", "text": "function getMaxValues() { return $this->_maxvalues; }", "title": "" }, { "docid": "6daf07396909069f4f2e10e6abc62eeb", "score": "0.57088584", "text": "public function getMax()\n {\n return isset($this->max) ? $this->max : 0;\n }", "title": "" }, { "docid": "d5875effddf33eba7fea907e5f59775a", "score": "0.5702037", "text": "function get_y_max()\n\t{\n\t\t$this->sanity(__FUNCTION__);\n\n\t\t$y = array_values($this->_config[self::VALUES]);\n\t\tsort($y);\n\t\treturn array_pop($y);\n\t}", "title": "" }, { "docid": "2c949805b44046a89a3bebd9946c5a04", "score": "0.57018787", "text": "public function high1() {\n return $this->segments[0]->high;\n }", "title": "" }, { "docid": "75513bcadf1abf3868b04680b4b0b269", "score": "0.56995875", "text": "public function getMaximumUses();", "title": "" }, { "docid": "485557c2afa7de8be707b51ea1ace537", "score": "0.5690662", "text": "function getLimit($min, $max)\n{\n $limit = isset($_GET[\"limit\"]) ? $_GET[\"limit\"] : 10;\n if (filter_var(\n $limit,\n FILTER_VALIDATE_INT,\n array(\"options\" => array(\"min_range\" => $min, \"max_range\" => $max))\n ) === false) {\n echo (\"{\\\"error\\\":\\\"Limit must be between 1 and 100\\\"}\");\n exit();\n }\n\n return $limit;\n}", "title": "" }, { "docid": "dd2e113d70555fc396f736e217f35272", "score": "0.56876355", "text": "public function max(): int;", "title": "" }, { "docid": "2b0722756357d71ed6fc9b5513f29b75", "score": "0.56826", "text": "function max_min(float ...$args): array{\n return[max($args), min($args)];\n}", "title": "" }, { "docid": "6d9e4eca2d09c406fc83c72986637173", "score": "0.56822443", "text": "function getMaximumPoints()\n\t{\n\t\treturn $this->points;\n\t}", "title": "" }, { "docid": "3ef88e64aaf1f7dd5dcee353e95b4bb1", "score": "0.56753796", "text": "function MaxMinAltitude ()\n\t{\n\t\tforeach ( $this->wp as $value )\n\t\t{\n\t\t\tif ( $this->maxAlt < $value[2] )\n\t\t\t\t$this->maxAlt = $value[2];\n\t\t\tif ( $this->minAlt > $value[2] )\n\t\t\t\t$this->minAlt = $value[2];\n\t\t}\n\t}", "title": "" }, { "docid": "8ce27040cdef9ba1c4436d6c1c675fba", "score": "0.5672929", "text": "public function getOccuranceRange()\n {\n return (integer)($this->getMaxOccurances() - $this->getMinOccurances());\n }", "title": "" }, { "docid": "32d92c95e3f560a85f3c83fd946480b4", "score": "0.56661594", "text": "public function getSleepLowLimit()\n {\n return $this->sleepLowLimit;\n }", "title": "" }, { "docid": "f9aee4c71064f0e2c23ab786e5d52b4a", "score": "0.56619316", "text": "public function getVoltageCallbackThreshold()\n {\n $result = array();\n\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_VOLTAGE_CALLBACK_THRESHOLD, $payload);\n\n $payload = unpack('c1option/v1min/v1max', $data);\n\n $result['option'] = chr($payload['option']);\n $result['min'] = IPConnection::fixUnpackedInt16($payload['min']);\n $result['max'] = IPConnection::fixUnpackedInt16($payload['max']);\n\n return $result;\n }", "title": "" }, { "docid": "eceab4099239aa5a11ccc8e4bce34e2a", "score": "0.5659366", "text": "abstract public function getLimit(): int;", "title": "" }, { "docid": "d5bb82973599b55c30bfd77ef1bf6a15", "score": "0.56525564", "text": "public function getHistogramMax()\n {\n return $this->sides;\n }", "title": "" }, { "docid": "f18b7a95dafc59e08082b8ae133bc715", "score": "0.56404036", "text": "public function getHighPrice()\n {\n return (int) $this->info[4];\n\n }", "title": "" }, { "docid": "cb466e06daa11ef3e5c80767dff0fdfd", "score": "0.5637013", "text": "public function max();", "title": "" }, { "docid": "3d694141fb44be4c66fbe90f04a1f78b", "score": "0.56269187", "text": "function maxPoints(): int\n {\n return $this->max;\n }", "title": "" }, { "docid": "ec7c4fa5298221fe795d8f09e2ddb49e", "score": "0.56239724", "text": "public function hitungMax($v){\n \t$bar=count($v);\n\t$has=$v[0];\t\t\n \tfor($i=1;$i<$bar;$i++){\n \t \tif($has<$v[$i]) $has=$v[$i];\t\n \t\t}\n \treturn $has;\n \t}", "title": "" }, { "docid": "311f0b5dbbe3639ba452a035cbd56894", "score": "0.5620947", "text": "private function setLimit($low, $high)\n\t{\n\t\t$this->limit = array('Low' => $low,\n\t\t\t\t\t\t\t'High' => $high);\n\t}", "title": "" }, { "docid": "1cc2a8c917f86e24848b55f9504296a5", "score": "0.56190336", "text": "public function getLimit(): int;", "title": "" }, { "docid": "9c0a01d2167540dce3dd1eace741b937", "score": "0.5618552", "text": "public function getLimit()\n\t{\n\t\treturn (int)'2';\n\t}", "title": "" }, { "docid": "090025d4f61736c9e26ab0d67ff88a9e", "score": "0.56055117", "text": "abstract function minuteOhlcvLimit(): int;", "title": "" }, { "docid": "3db6043950e354bdb3da8b1e3246091f", "score": "0.5597463", "text": "function range1($min, $max)\n{\n $range = [];\n while ($min <= $max) {\n $range[] = $min;\n $min += 1;\n }\n return $range;\n}", "title": "" }, { "docid": "1b5e7eb76a073e1ae6627f6900c7f73e", "score": "0.5592521", "text": "function __construct($low,$high) {\n $this->low = intval($low);\n $this->high = intval($high);\n }", "title": "" }, { "docid": "97bd72881361b08724f562741c5a6c89", "score": "0.5577648", "text": "function idealEndRailCheck5($EndMaxs){\nreturn $EndMaxs[count($EndMaxs)-2];\t\t\t\n}", "title": "" }, { "docid": "14e3fa126a87522d71fc654c247c970a", "score": "0.5575985", "text": "public function getMaxHP () {\n\t\treturn (int)$this->stats['personal']['hp_max'];\n\t}", "title": "" }, { "docid": "13c1ff6b3b74eb314d559c244775093e", "score": "0.5567699", "text": "public function s_min_max_sitemap( $new_value ) {\n\n\t\t$new_value = $this->s_absint( $new_value );\n\n\t\tif ( ! $new_value ) {\n\t\t\t// We assume something's wrong. Return default value.\n\t\t\t$new_value = $this->get_default_option( 'sitemap_query_limit' );\n\t\t} elseif ( $new_value < 1 ) {\n\t\t\t$new_value = 1;\n\t\t} elseif ( $new_value > 50000 ) {\n\t\t\t$new_value = 50000;\n\t\t}\n\n\t\treturn $new_value;\n\t}", "title": "" }, { "docid": "af67c7819ac3b56073ca4722b8969689", "score": "0.5563101", "text": "public function getPriceRange() {\n $basePrice = $this->BasePrice;\n $highestPrice = $this->BasePrice;\n\n $optionCode = $this->options->groupBy('OptCode');\n foreach ($optionCode as $option => $member) {\n $highestOption = 0;\n foreach ($member as $eachmember) {\n if ($eachmember->OptPrice > $highestOption) {\n $highestOption = $eachmember->OptPrice;\n }\n }\n $highestPrice += $highestOption;\n }\n\n $result = \"$\".number_format($basePrice,2).\" - \".\"$\".number_format($highestPrice,2);\n return $result;\n }", "title": "" }, { "docid": "63ac2fad7dc3b34349ce4d37c6977f20", "score": "0.5552402", "text": "public function getMaxEnergy () {\n\t\treturn (int)$this->stats['personal']['energy_max'];\n\t}", "title": "" }, { "docid": "956543dede92f68076a8f3db44c2fafb", "score": "0.55470383", "text": "public static function bound($n=0,$min=0,$max=0)\n\t{\n\t\t//if min > max, switch\n\t\tif ($min > $max) { $m = $min; $min = $max; $max = $m; }\n\t\treturn min(max($n,$min),$max);\n\t}", "title": "" } ]
78c86f83de906a3c5d84bdea9676c398
Request more infomation application
[ { "docid": "7e45b835ae7ee0569890d606ea41ad27", "score": "0.54514027", "text": "public function requestInfo(Request $request){\n $expert = Expert::where('uuid', $request->input('uuid'))->first();\n\n if (empty($expert)) {\n return response()->json([\n 'success' => 0,\n 'error' => 'No expert with the provided details'\n ], 404);\n }\n\n if ($expert->update([\n 'approved' => 4\n ])) {\n // Send an email request more info\n SERequestMoreInfo::dispatch($expert->user->email, $expert->user->first_name, $request->input('info'));\n\n return response()->json([\n 'success' => 1,\n 'message' => 'An email has been sent requesting for more information'\n ], 200);\n } else {\n return response()->json([\n 'success' => 0,\n 'error' => 'Error sending request. Refresh browser and try again.'\n ], 500);\n }\n\n }", "title": "" } ]
[ { "docid": "41695f7fe9b51d204eb8e6056c5bcfd5", "score": "0.6494524", "text": "public function applicationInfo()\n {\n $parameters['type'] = 'info';\n\n return $this->request(\"/\", $parameters);\n }", "title": "" }, { "docid": "c6133a452084658429c84a8cbbf66623", "score": "0.6221581", "text": "protected function requestApplicationInformation()\n {\n $this->question('Please enter your application information');\n\n $data = [\n 'APP_NAME' => \"{$this->ask('Application name')}\",\n 'APP_URL' => ($this->ask('Is this site protected by SSL? (y/n)', 'y') == \"y\" ? \"https://\" : \"http://\") . $this->ask('URL'),\n 'APP_LOCALE' => $this->ask('Language (nl or en)', 'en'),\n 'APP_ENV' => 'local',\n ];\n\n $this->updateEnvironmentFile($data);\n\n $this->updateConfig('app', $data, 'APP');\n\n $this->info('Application information saved.');\n }", "title": "" }, { "docid": "fdf9a504aa45e170ff6d73bf7548106a", "score": "0.6162345", "text": "public function infoAction()\n {\n //return array of all parameters sent\n $requestParams = Mage::app()->getRequest()->getParams(); \n \n $Password = isset($requestParams['secret']) ? $requestParams['secret'] : '';\n \n // Check password. if invalid password, it will not proceed.\n if(!Mage::getModel('expertrec_recommendation/validate')->checkPassword($Password)){\n die('ERROR: The specified password is invalid.');\n }\n\n Mage::register('buildno',self::BUILD_NO); \n Mage::register('secret',Mage::getModel('expertrec_recommendation/validate')->getPassword()); \n $this->loadLayout();\n $this->renderLayout();\n }", "title": "" }, { "docid": "181a1d16a0dd1a15debd5f798a0fe943", "score": "0.6043574", "text": "public function determine_request () {\n if( defined(\"DEBUG\") ) echo \"<div style='color:red'> 3. determine_request</div> \";\n\n // Determine app\n $app = basename($this->params[\"app\"]);\n $this->params[\"app\"] = $this->app = $app ? $app : DEFAULT_APPLICATION;\n\n // Determine object\n $object = $this->params[\"object\"];\n $this->params[\"object\"] = $this->object = $object ? $object : DEFAULT_OBJECT;\n\n // Generate prefix\n $this->pid = $this->prefix = $this->params[\"prefix\"] ? $this->params[\"prefix\"] : rand();\n\n $this->target_div = $this->params[\"target_div\"] ? $this->params[\"target_div\"] : DEFAULT_TARGET_DIV;\n\n $this->user_info[\"lang\"] = $this->user_info[\"lang\"] ? $this->user_info[\"lang\"] : DEFAULT_LANGUAGE;\n\n if( $this->templ ){\n $this->templ->assign(\"object\", $this->object );\n $this->templ->assign(\"prefix\", $this->pid );\n $this->templ->assign(\"pid\", $this->pid );\n $this->templ->assign(\"lang\", $this->user_info[\"lang\"] );\n $this->templ->assign(\"target_div\", $this->target_div );\n $this->templ->assign(\"user_info\", $this->user_info );\n $this->templ->assign(\"params\", $this->params_html );\n }\n\n $this->set( $this->app );\n $this->include_resource( APP_CODE );\n\n }", "title": "" }, { "docid": "7e7772c6b3d7d249016765ca88ec1d8b", "score": "0.5838486", "text": "public function actionExplainMachine()\n\t{\n\t\t$this->auth($this->model->authDomainDev);\n\t\t// @todo - move this to a better place\n\t\techo serialize($this->model->serveServiceDescription());\n\t\texit;\n\t}", "title": "" }, { "docid": "f6139ced3b6a06a91907727c3241433c", "score": "0.58156604", "text": "public function info()\n{\n$html=\\PHK\\Tools\\Util::envIsWeb();\n\nif ($html && (!is_null($info_script=$this->option('info_script'))))\n\t{ require($this->uri($info_script)); }\nelse\n\t{\n\tself::startInfoTable($html);\n\t$this->showOption($html,'name');\n\t$this->showOption($html,'summary');\n\t$this->showOption($html,'version');\n\t$this->showOption($html,'release');\n\t$this->showOption($html,'distribution');\n\t$this->showOption($html,'license');\n\t$this->showOption($html,'copyright');\n\t$this->showOption($html,'url');\n\t$this->showOption($html,'author');\n\t$this->showOption($html,'packager');\n\t$this->showOption($html,'requires');\n\n\t$req=implode(' ',\\PHK\\Tools\\Util::mkArray($this->option('required_extensions')));\n\tif ($req=='') $req='<none>';\n\tself::showInfoLine($html,'Required extensions',$req);\n\n\tself::endInfoTable($html);\n\t}\n}", "title": "" }, { "docid": "9606f5fab0b3597ec2d4dcff3e084c0d", "score": "0.5759051", "text": "public function showInfo()\n {\n }", "title": "" }, { "docid": "e5a100f06c83a22ecc92d37324a34ba1", "score": "0.57577705", "text": "public function view_details()\n\t{\n\t\t$request_id = $this->input->get('request_id');\n\t\t// $this->ajax_view($request_id); // WILL return ajax json code format for data retrieval\n\t\t$this->page_start('request_detail_view');\n\t}", "title": "" }, { "docid": "d4e8458c4e26f475b08ca69bd810d495", "score": "0.5749989", "text": "public static function app()\n {\n try {\n global $json_api;\n $id = $json_api->query->id;\n $arr = new SingleApp($id);\n api_handler::outSuccessDataWeSoft($arr->list_reward_details());\n } catch (Exception $e) {\n api_handler::outFail($e->getCode(), $e->getMessage());\n }\n }", "title": "" }, { "docid": "713ecc16f8afa6162b310af98c712f72", "score": "0.5746509", "text": "function infoScreen()\n\t{\n\t\t$this->ctrl->setCmd(\"showSummary\");\n\t\t$this->ctrl->setCmdClass(\"ilinfoscreengui\");\n\t\t$this->outputInfoScreen();\n\t}", "title": "" }, { "docid": "3466d4cef75786978838de46f846f193", "score": "0.57031834", "text": "public function add_information() \r\n {\r\n //echo $this->router->fetch_method();exit();\r\n try\r\n {}\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n } \r\n }", "title": "" }, { "docid": "126377d0bc4fc8730a6d4dc22625772d", "score": "0.56335956", "text": "public function appInfo(){\n $appInfo = $this->settingService->getAppInfo();\n return $this->viewAdmin('setting.app_info',['appInfo' => $appInfo]);\n }", "title": "" }, { "docid": "3a33337cd7b36250e9844d49b998096b", "score": "0.5588441", "text": "public function _info()\n\t{\n\t\t$this->process(self::INFO, func_get_args());\n\t}", "title": "" }, { "docid": "fe6dc7e608f862f8eb1f95c02bc1fe94", "score": "0.5572536", "text": "public function info();", "title": "" }, { "docid": "d813eee98f8ee86ac1885a56fc412686", "score": "0.5561649", "text": "public function getInformation();", "title": "" }, { "docid": "c758c17f1b4624fe1dae18c8fbedb8cb", "score": "0.5534232", "text": "abstract public function info();", "title": "" }, { "docid": "1bcb6ea22b6d393d1f2c39bf646c6b27", "score": "0.55255675", "text": "function viewRequestsC() {\n\t\t$this->bizname = @$_GET['bizname'];\n\t\t\n\t}", "title": "" }, { "docid": "eb469d05dd1f394ceecbdb5c1a1c4c81", "score": "0.55054915", "text": "public function getInfo();", "title": "" }, { "docid": "eb469d05dd1f394ceecbdb5c1a1c4c81", "score": "0.55054915", "text": "public function getInfo();", "title": "" }, { "docid": "eb469d05dd1f394ceecbdb5c1a1c4c81", "score": "0.55054915", "text": "public function getInfo();", "title": "" }, { "docid": "355e8c3696cfb4e2f29cc3de731801db", "score": "0.5504628", "text": "function showInfoScreen()\n\t{\n\t\t$this->outputInfoScreen(true);\n\t}", "title": "" }, { "docid": "3a9c868897f672810d6339db9528d1a1", "score": "0.549387", "text": "public abstract function info();", "title": "" }, { "docid": "632169fe1f4021bafd22d3b1043567cf", "score": "0.5479374", "text": "public function offerDetailsAction(Request $request)\n { \n $query = $request->getContent(); \n $api = 'query';\n $queryParams[$api] = $query;\n $output = $this->process($api, $queryParams); \n echo $output;\n exit;\n }", "title": "" }, { "docid": "ec9a081232d2bc3208b32d520fe37dea", "score": "0.5479129", "text": "abstract public function getInfo();", "title": "" }, { "docid": "3d1637c3df51bf6673580434dd4df342", "score": "0.5440018", "text": "public function details();", "title": "" }, { "docid": "ee4eecd74a6c6e82d14d20f1d961342b", "score": "0.54356384", "text": "private function getInformation() {\n $url = sprintf('http://mcapi.ca/query/%s:%d/extensive', $this->address, $this->port);\n $information = file_get_contents($url);\n if ($information === true) {\n $this->status = true;\n $json = json_decode($information, true);\n $this->minecraftVersion = !empty($json['version']) ? $json['version'] : null;\n $this->software = !empty($json['software']) ? $json['software'] : null;\n $this->gameType = !empty($json['game_type']) ? $json['game_type'] : null;\n $this->htmlMotd = !empty($json['htmlmotd']) ? $json['htmlmotd'] : null;\n $this->ingameMotd = !empty($json['motds']['ingame']) ? $json['motds']['ingame'] : null;\n $this->mapName = !empty($json['map']) ? $json['map'] : null;\n $this->players = !empty($json['players']) ? $json['players'] : null;\n $this->playerCount = !empty($this->players) ? count($this->players) : 0;\n }\n }", "title": "" }, { "docid": "212a99a753c8a0341065c94fa169f371", "score": "0.5410637", "text": "public function getApplication() {\n\t\t$this->getHTMLHeader();\n\t\tprint '<div id=\"ifm\"></div>';\n\t\t$this->getJS();\n\t\tprint '<script>var ifm = new IFM(); ifm.init( \"ifm\" );</script>';\n\t\t$this->getHTMLFooter();\n\t}", "title": "" }, { "docid": "95e8b57dff8224aa31b8bdd57a56d96f", "score": "0.53975856", "text": "protected function indexAction()\n\t{\n\t\t$this->usageAction();\n\t\t$this->response->appendLine('');\n\t\t$this->response->appendLine('Invalid request', array('hiWhite', 'bgRed'));\n\t\t$this->response->appendLine('');\n\t}", "title": "" }, { "docid": "0d858eb5e870d06e096867b690a5775a", "score": "0.5396113", "text": "function infoScreenObject()\n\t{\n\t\t$this->ctrl->setCmd(\"showSummary\");\n\t\t$this->ctrl->setCmdClass(\"ilinfoscreengui\");\n\t\t$this->infoScreen();\n\t}", "title": "" }, { "docid": "2bf63983673bfdab0e32b62b4667a271", "score": "0.5386637", "text": "function infoScreenObject()\n\t{\n\t\t$this->checkPermission(\"visible\");\n\t\t$this->ctrl->setCmd(\"showSummary\");\n\t\t$this->ctrl->setCmdClass(\"ilinfoscreengui\");\n\t\t$this->infoScreen();\n\t}", "title": "" }, { "docid": "2e1df6805dd69bcae1472a993c015f1a", "score": "0.5371978", "text": "function basic_ui_intro() {\n\t\techo '<p>' . sprintf( __( 'NOTICE: Nest is no longer provisioning new apps on their legacy platform. If you have an existing app, you can continue to use it. The most important setting is the <strong>Redirect URI</strong>, which should be set to <code>%2$s</code>. Make sure you select appropriate permissions as well.', 'keyring' ), Keyring_Util::admin_url( $this->get_name(), array( 'action' => 'verify' ) ) ) . '</p>';\n\t\techo '<p>' . __( \"Once you've set that up, copy your <strong>Product ID</strong> value into the <strong>API Key</strong> field, and the <strong>Product Secret</strong> value into the <strong>API Secret</strong> field and click save (you don't need an App ID value for Nest).\", 'keyring' ) . '</p>';\n\t}", "title": "" }, { "docid": "9280364e051e3e13b74f984cc57f2113", "score": "0.5353829", "text": "protected function loadRequest(){\n\t\t\n\t\t//If the user is logged in\n\t\tif($this->getModel()->checkLogin(true))\n\t\t{\n\t\t\t//Get Module Information if available\n\t\t\t$load = $this->getModel()->getModuleInformation();\n\t\t\t\n\t\t\t//Show this information\n\t\t\t$this->getView()->showModuleInformation($load);\n\t\t}\n\t}", "title": "" }, { "docid": "ec635cd46e7e51845a77e73ff2fac64a", "score": "0.53332776", "text": "function infoScreenObject()\n\t{\n\t\t$this->ctrl->setCmd(\"showSummary\");\n\t\t$this->ctrl->setCmdClass(\"ilinfoscreengui\");\n\t\t$this->infoScreenForward();\n\t}", "title": "" }, { "docid": "2671c472617e6957ca95df0cf2a9ed1c", "score": "0.5322642", "text": "public function collecter_informations(): bool {\r\n $status = true;\r\n $status = $this->collecter_info_club(); // pour le fuseau horaire\r\n \r\n if ($status)\r\n $this->collecter_info_permanence();\r\n \r\n if ($status)\r\n $status = $this->collecter_info_personnes_actives();\r\n \r\n if ($status)\r\n $status = $this->collecter_info_sites(); // renseigne les infos pour chaque activite_site\r\n \r\n return $status;\r\n \r\n }", "title": "" }, { "docid": "6042fef0fd807766c3cb058de218fda4", "score": "0.53203523", "text": "public function inquiryAction() {\n echo 'This is Inquiry!';\n echo '<dl>';\n foreach($this->getRequest()->getParams() as $key=>$value) {\n echo '<dt><strong>Param: </strong>'.$key.'</dt>';\n echo '<dl><strong>Value: </strong>'.$value.'</dl>';\n }\n echo '</dl>';\n }", "title": "" }, { "docid": "70e4b1223c29045af85924943763c412", "score": "0.5314366", "text": "function fetchMeta()\n {\n }", "title": "" }, { "docid": "04404382a8ace15f6250a75dd3f050de", "score": "0.5313358", "text": "public function infoSitemap()\n {\n }", "title": "" }, { "docid": "68488cc4c03c8107cf682cb94573831b", "score": "0.5307939", "text": "public function request()\n {\n //\n }", "title": "" }, { "docid": "dd7e2a29f9eebc6487a0710564a8775b", "score": "0.5297149", "text": "function\n\trequestIdentify()\n\t{\n\t\tforeach ($_REQUEST as $key => $val)\n\t\t{\n\t\t\tif ($key != \"verb\")\n\t\t\t\t$this->Error(\"badArgument\");\n\t\t}\n\n\t\t/*\n\t\t** Form XML and spit out\n\t\t*/\n\t\t$this->response .= \" <Identify>\\n\".\n\t\t\t\" <repositoryName>\" . $this->RepositoryName . \"</repositoryName>\\n\".\n\t\t\t\" <baseURL>\" . $this->BaseURL() . \"</baseURL>\\n\".\n\t\t\t\" <protocolVersion>\" . $this->protocolVersion . \"</protocolVersion>\\n\".\n\t\t\t\" <adminEmail>\" . $this->AdminEmail . \"</adminEmail>\\n\".\n\t\t\t\" <earliestDatestamp>\" . $this->EarliestDatestamp . \"</earliestDatestamp>\\n\".\n\t\t\t\" <deletedRecord>no</deletedRecord>\\n\".\n\t\t\t\" <granularity>YYYY-MM-DD</granularity>\\n\".\n\t\t\t\" </Identify>\\n\";\n\n\t\t$this->ShowResponse();\n\t}", "title": "" }, { "docid": "f68fa9ea13191190e425cd6dae2e5290", "score": "0.5296666", "text": "protected function collecter_info_marees() {\r\n }", "title": "" }, { "docid": "183dc8373e38d07030c224a9a87ad232", "score": "0.5280952", "text": "public function info(){\n return $this->request('info');\n }", "title": "" }, { "docid": "712630a4560ec3d568435be3cc0b305a", "score": "0.5269646", "text": "public function info() {\n }", "title": "" }, { "docid": "24b5dea10eecbefd5ea2f9c350e9aee4", "score": "0.5258909", "text": "public function index() {\n\t\t// explode request\n\t\t$aReqParams = Util::getReqParams();\n\t\t// look if a request corresponds to an existing method\n\t\tif (isset($aReqParams[2]) && method_exists($this, 'program' . ucfirst($aReqParams[2]))) {\n\t\t\t// call found method name\n\t\t\t$sContentToRender = $this->{'program' . ucfirst($aReqParams[2])}($aReqParams);\n\t\t} else {\n\t\t\t// no action, render default view\n\t\t\tPageFragmentBase::appendToRegistry('programController says hello');\n\t\t\t$this->renderView();\n\t\t}\n\t}", "title": "" }, { "docid": "8bb25cbe15c5267d9e832ab40987de12", "score": "0.52388895", "text": "public function showAction() {\n\t\t// Set a default site root so we can link to the extension usage report\n\t\t$sites = Tx_Smoothmigration_Utility_DatabaseUtility::getSiteRoots();\n\t\t$defaultSite = array_shift($sites);\n\t\t$this->view->assign('site', $defaultSite['uid']);\n\t\t$this->view->assign('issueCount', $this->issueRepository->findAll()->count());\n\t\t$this->view->assign('groupedIssues', $this->issueRepository->findAllGroupedByExtensionAndInspection());\n\t\t$this->view->assign('moduleToken', $this->moduleToken);\n\t}", "title": "" }, { "docid": "20ff899b225992dc805b96045970e31e", "score": "0.52363634", "text": "public function actionInfo()\n {\n return $this->render('info');\n }", "title": "" }, { "docid": "93802b97c6f44ae5e366b70deec744b9", "score": "0.522564", "text": "public function show()\n {\n $results = $this->run('show');\n }", "title": "" }, { "docid": "5fcff70fda8a27c07c3e033117d3c494", "score": "0.521938", "text": "public function appls();", "title": "" }, { "docid": "29fb241ffe2c6b8aaaf7dbe588806d8b", "score": "0.5218853", "text": "public function usage() {\n $resource = (isset($this->attribs['command'])) ? $this->attribs['command'] : \"{resource}\";\n $id = (isset($this->attribs['id'])) ? $this->attribs['id'] : \"{id}\";\n\n // Throw some usage screen\n $this->data[] = new api_model_array(Array(\n \"index\"=> Array(\"url\"=>\"$resource/index\", \"verb\"=>\"GET\"),\n \"read\"=> Array(\"url\"=>\"$resource/$id/read\", \"verb\"=>\"GET\"),\n \"create\"=> Array(\"url\"=>\"$resource/create\", \"verb\"=>\"POST\"),\n \"update\"=> Array(\"url\"=>\"$resource/$id/update\", \"verb\"=>\"POST\"),\n \"delete\"=> Array(\"url\"=>\"$resource/$id/delete\", \"verb\"=>\"POST\")),\n 'CRUD');\n\n $this->data[] = new api_model_array(Array(\n \"index\"=> Array(\"url\"=>\"$resource/\", \"verb\"=>\"GET\"),\n \"read\"=> Array(\"url\"=>\"$resource/$id\", \"verb\"=>\"GET\"),\n \"create\"=> Array(\"url\"=>\"$resource/\", \"verb\"=>\"POST\"),\n \"update\"=> Array(\"url\"=>\"$resource/$id\", \"verb\"=>\"POST\"),\n \"delete\"=> Array(\"url\"=>\"$resource/$id/delete\", \"verb\"=>\"POST\")),\n 'REST');\n\n return True;\n }", "title": "" }, { "docid": "329921cd79193181c9b7f4b04b0f1d6d", "score": "0.5210326", "text": "public function handle_info() {\n\t\t$services = Service::get_all();\n\t\t$service_names = [];\n\t\tforeach ($services as $service) {\n\t\t\t$service_names[] = $service->name;\n\t\t}\n\n\t\t$name = Container::get_name();\n\t\t$response = new Container_Response();\n\t\t$response->set_data([\n\t\t\t'name' => $name,\n\t\t\t'authenticated' => Container_Permission::is_authenticated(),\n\t\t\t'services' => $service_names,\n\t\t]);\n\t\t$response->output();\n\t}", "title": "" }, { "docid": "b46e045269de645b398d17372ab1a4ef", "score": "0.5205797", "text": "public function info()\n {\n $this->load->helper('url');\n $this->load->view('info');\n\t\t\n }", "title": "" }, { "docid": "03527cc15747037b4bdcd4668746312e", "score": "0.51966316", "text": "abstract public function collectInformation();", "title": "" }, { "docid": "fc53f213a89ece275ae98637e4dd962f", "score": "0.51898104", "text": "public function getApplicationData() {\n $chapters = $this->nmodel->getChapters('pankaj', $this->aliveFlag);\n $notes = $this->nmodel->getNotes('pankaj', $this->aliveFlag);\n $data = array(\n 'chapters' => $chapters,\n 'notes' => $notes\n );\n $this->output_json($this, $data);\n }", "title": "" }, { "docid": "f188f56050146435220bffd4fa19a163", "score": "0.51846474", "text": "public function overview(){\n $this->showOverview();\n }", "title": "" }, { "docid": "78968df700f82dbbe01b3b578996a370", "score": "0.5184432", "text": "public function info()\n {\n }", "title": "" }, { "docid": "805bbf169b54315c119c27905ab107a3", "score": "0.5183248", "text": "public function accueilDetail()\n\t{\n\t\t$biographyManager = new Biography();\n\t\t$summaryManager = new Summary();\n\t\t$bio= $biographyManager->getContentBiography();\n\t\t$summary = $summaryManager->getContentSummary();\n\t\trequire('view/ViewFrontEnd/accueilView.php');\n\t}", "title": "" }, { "docid": "9d130e7e656bdc3fc833b0686ed7c9c8", "score": "0.5153978", "text": "function requestGame() {\n $this->console = new ConsoleUI();\n\n $this->url = $this->console->promptServer();\n\n $this->client = new WebClient();\n\n echo \"Obtaining server information ......\";\n\n $info = $this->client->getInfo($this->url . \"/info\");\n\n $strategy = $this->console->promptStrategy($info['strategies']);\n\n $this->pid = $this->client->getInfo($this->url . \"/new/?strategy=\" . $strategy)['pid'];\n\n $this->playGame();\n }", "title": "" }, { "docid": "a8b460ff79ddbd7609d1a1d24d8a2487", "score": "0.5142709", "text": "public function info(){\n }", "title": "" }, { "docid": "174c74484b9d7cd165001d835cd2edf7", "score": "0.51425356", "text": "public function get_request()\r\n\t{\r\n\t}", "title": "" }, { "docid": "b85468bf9ff3e401739f495f0253caaa", "score": "0.512461", "text": "public function info()\n {\n \treturn View('thongtin');\n }", "title": "" }, { "docid": "b4b1a9180b36559be30546df32d3db5d", "score": "0.5123259", "text": "public function appAboutUpdate(){\n $appInfo = $this->settingService->getAppInfo();\n return $this->viewAdmin('setting.app_about',['appInfo' => $appInfo]);\n// return $this->viewAdmin('setting.test');\n }", "title": "" }, { "docid": "0fc7ee362461a2268c4b3b51dcdbd3a4", "score": "0.51182693", "text": "public function bestlearner_admin_html_page() {\n\t\tinclude_once BESTLEARNER_TEMP_DIR . '/inc/bestlearner-info-page.php';\n\t}", "title": "" }, { "docid": "38d1120ea29591c47342dbd5bce99f74", "score": "0.51142585", "text": "function nodeinfo_init() {\n\trequire_once dirname( __FILE__ ) . '/includes/class-nodeinfo-endpoint.php';\n\n\t// Configure the REST API route\n\tadd_action( 'rest_api_init', array( 'Nodeinfo_Endpoint', 'register_routes' ) );\n\n\t// Add Webmention and Host-Meta discovery\n\tadd_filter( 'webfinger_user_data', array( 'Nodeinfo_Endpoint', 'render_jrd' ), 10, 3 );\n\tadd_filter( 'webfinger_post_data', array( 'Nodeinfo_Endpoint', 'render_jrd' ), 10, 3 );\n\tadd_filter( 'host_meta', array( 'Nodeinfo_Endpoint', 'render_jrd' ) );\n}", "title": "" }, { "docid": "9010f5719b50c737f426bda0a77affab", "score": "0.51127607", "text": "public function request();", "title": "" }, { "docid": "263b1fee005f59e6d23e80fb634dd0f2", "score": "0.51024014", "text": "function suggest_requests() \n\t\t{\t\n\t\t\treturn array(\n\t\t\t\tarray(\n\t\t\t\t\t'title' => 'Best Users per Year Page', // title of page\n\t\t\t\t\t'request' => 'bestusers-year', // request name\n\t\t\t\t\t'nav' => 'M', // 'M'=main, 'F'=footer, 'B'=before main, 'O'=opposite main, null=none\n\t\t\t\t),\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "32ed15deb8e3a11abdee25f36efeaaba", "score": "0.5093145", "text": "public function introduct() {\n self::send_header( true );\n self::view_introduct();\n }", "title": "" }, { "docid": "15844fc8a22545630c299952037ab2d6", "score": "0.5092342", "text": "public function show() {\n\n\n\t}", "title": "" }, { "docid": "922ae72186e6c768d03a797bfa68a86c", "score": "0.5090419", "text": "public function tools()\n\t{\n\t\t// Ofcold::provideToScript([\n\t\t// \t'resources' => function (Request $request) {\n\t\t// \t\treturn Ofcold::resourceInformation($request);\n\t\t// \t},\n\t\t// ]);\n\t}", "title": "" }, { "docid": "5a9fc628bedbe22d78a8912ed5c0eb9c", "score": "0.50887585", "text": "public static function request()\n {\n }", "title": "" }, { "docid": "963c7280fc7d51de3705a1e73697f492", "score": "0.5086727", "text": "function app_mag250() {\n $this->name=\"app_mag250\";\n $this->title=\"mag250\";\n $this->module_category=\"<#LANG_SECTION_DEVICES#>\";\n $this->checkInstalled();\n}", "title": "" }, { "docid": "5b633e945558e8d576742593c6ece471", "score": "0.50823784", "text": "public function indexAction() {\n\n\t\t$data = $this->model->Ad->getInfo();\n\t\t$this->view->set($data);\n\n\t}", "title": "" }, { "docid": "a9f109099f56355dcb21cd8df36266a5", "score": "0.50808036", "text": "public function actionMeta(){\n\t\t$api = $this->getApi();\n\t\t$this->info(\"META=\".print_r($api->getMeta(),true));\n\t}", "title": "" }, { "docid": "ed9dfac43a9e23cef576b0a1777e8632", "score": "0.5080465", "text": "protected function getApplicationInformation()\n\t\t{\n\t\t\treturn $this->applicationInformation;\n\t\t}", "title": "" }, { "docid": "40aa57d0ebfd603e27fc77f32e17417b", "score": "0.508033", "text": "public function articleDetailsAction()\n {\n if($this->_helper->EpCustom->checksession() && $_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest')\n {\n $artilce_obj=new Ep_Article_Article();\n $poll_obj=new Ep_Poll_Participation();\n $responsePollObj=new Ep_Poll_UserResponse();\n $cparticipation=new Ep_Participation_Participation();\n $comments_obj=new Ep_Comments_Adcomments();\n $contrib_identifier=$this->contrib_identifier;\n $article_params=$this->_request->getParams();\n $mission_identifier=$article_params['mission_identifier'];\n $mission_type=$article_params['misson_type'];\n $req_from=$article_params['req_from'];\n //flag set to show upcoming ao popup \n $upcoming=$article_params['upcoming'];\n\n //flag set to show finished ao popup \n $finished=$article_params['finished'];\n\n $this->_view->profile_pic=$this->getPicPath($contrib_identifier);\n\n //$req_from='dfs';\n\n\n if (strpos($_SERVER['HTTP_REFERER'],'aosearch') !== false && !$article_params['req_from'] && !$article_params['item'])\n {\n if($upcoming)\n $recentOffers=$_SESSION['upcoming_offers'];\n else if($finished)\n $recentOffers=$_SESSION['finished_offers'];\n else\n $recentOffers=$_SESSION['all_offers'];\n\t\t\t\t\n\t\t\t\t//echo \"<pre>\";print_r($recentOffers);exit;\n\n $paginate=popup_paginate( $recentOffers,$mission_identifier,$upcoming,$finished,$mission_type);\n }\n else if(!$article_params['item'] && !$article_params['req_from'] )\n {\n /**Recent AO Offers**/\n $recentOffers=$this->recentAoOffers();\n $paginate=popup_paginate( $recentOffers,$mission_identifier,NULL,NULL,$mission_type);\n }\n\n\n\n if($article_params['item']=='cart')\n $disabled='yes';\n if($mission_identifier!='' && $mission_type!='' )\n {\n if($mission_type=='premium')\n {\n $searchParameters['articleId']=$mission_identifier;\n $searchParameters['req_from']= $req_from;\n $searchParameters['upcoming']= $upcoming;\n $searchParameters['profile_type']=$this->profileType;\n $searchParameters['black_status']=$this->black_status;\n $searchParameters['translator_type']=$this->translator_type;\n $searchParameters['translator']=$this->translator;\n\n $comment_type='article';\n\n //added if for finished articles\n if($finished)\n {\n\n $articleDetails=$cparticipation->finishedArticles($searchParameters);\n }\n else\n {\n// echo \"<pre>\";print_r($searchParameters);echo \"</pre><hr />\";\n\n $articleDetails=$artilce_obj->getArticleDetailsNew($searchParameters);\n if(count($articleDetails)==0)\n {\n $articleDetails=$artilce_obj->getArticleSearchDetails($searchParameters);\n // user does not have permission to access this Artilce\n// echo \"<pre>\";print_r($articleDetails);echo \"</pre><hr />\";\n $this->_view->no_permission=\"yes\";\n }\n }\n\n if(count($articleDetails)>0)\n $articleDetails=$this->formatArticleDetails($articleDetails);\n\n\n\n\n //Comment Details\n $commentDetails=$comments_obj->getAdComments($mission_identifier,$comment_type);\n if(count($commentDetails)>0)\n $commentDetails=$this->formatCommentDetails($commentDetails);\n /* *** added on 29.04.2016 *** */\n //adding condition to disp\n $this->_view->mission_type='premium';\n $this->_view->comment_type= $comment_type;\n $this->_view->identifier=$mission_identifier;\n $this->_view->articleDetails=$articleDetails;\n $this->_view->commentDetails=$commentDetails;\n $this->_view->commentCount=count($commentDetails);\n $this->_view->request_from=$req_from;\n $this->_view->disabled=$disabled;\n $this->_view->profile_type=$this->profileType;\n\n if($upcoming)\n $this->_view->upcoming='yes';\n else if($finished)\n $this->_view->finished='yes';\n// echo \"<pre>\";print_r($this);exit;\n $this->render(\"Contrib_misson_popup\");\n\n }\n else if($mission_type=='nopremium')\n {\n $searchParameters['articleId']=$mission_identifier;\n $searchParameters['req_from']= $req_from;\n $searchParameters['upcoming']= $upcoming;\n $searchParameters['profile_type']=$this->profileType;\n $searchParameters['black_status']=$this->black_status;\n\n\n $comment_type='article';\n\n //added if for finished articles\n if($finished)\n {\n $articleDetails=$cparticipation->finishedArticles($searchParameters);\n }\n else\n {\n $articleDetails=$artilce_obj->getArticleDetails($searchParameters);\n if(count($articleDetails)==0)\n {\n $articleDetails=$artilce_obj->getArticleSearchDetails($searchParameters);\n //if user does not have permission to access this Artilce\n $this->_view->no_permission=\"yes\";\n }\n }\n\n if(count($articleDetails)>0)\n $articleDetails=$this->formatArticleDetails($articleDetails);\n //Comment Details\n $commentDetails=$comments_obj->getAdComments($mission_identifier,$comment_type);\n if(count($commentDetails)>0)\n $commentDetails=$this->formatCommentDetails($commentDetails);\n\n\n $this->_view->mission_type='nopremium';\n $this->_view->comment_type= $comment_type;\n $this->_view->identifier=$mission_identifier;\n $this->_view->articleDetails=$articleDetails;\n $this->_view->commentDetails=$commentDetails;\n $this->_view->commentCount=count($commentDetails);\n $this->_view->request_from=$req_from;\n $this->_view->disabled=$disabled;\n $this->_view->profile_type=$this->profileType;\n\n if($upcoming)\n $this->_view->upcoming='yes';\n else if($finished)\n $this->_view->finished='yes';\n\n $this->render(\"Contrib_misson_popup\");\n }\n else if($mission_type=='poll_premium')\n {\n\n $searchParameters['profile_type']=$this->profileType;\n $searchParameters['pollid']=$mission_identifier;\n $searchParameters['req_from']= $req_from;\n $searchParameters['upcoming']= $upcoming;\n $searchParameters['black_status']=$this->black_status;\n\n $comment_type='poll';\n $pollDetails=$poll_obj->getPollDetails($searchParameters);\n if(count($pollDetails)>0)\n $pollDetails=$this->formatPollDetials($pollDetails);\n //Comment Details\n $commentDetails=$comments_obj->getAdComments($mission_identifier,$comment_type);\n if(count($commentDetails)>0)\n $commentDetails=$this->formatCommentDetails($commentDetails);\n\n\n // Check already given response for this poll or not\n $checkResponseExist=$responsePollObj->checkPollResponse($contrib_identifier,$mission_identifier);\n if($checkResponseExist!=\"NO\")\n {\n $this->_view->ResponseExist='yes';\n foreach($checkResponseExist as $response)\n {\n if (strpos($response['response'], '|') !== false)\n {\n $poll_response[$response['question_id']]=explode(\"|\",$response['response']);\n }\n else\n $poll_response[$response['question_id']]=$response['response'];\n }\n\n }\n else if(is_array($this->EP_Contrib_Cart->poll_response[$mission_identifier]))\n {\n $this->_view->ResponseExist='yes';\n foreach($this->EP_Contrib_Cart->poll_response[$mission_identifier] as $key=> $response)\n {\n if (strpos($response['response'], '|') !== false)\n {\n $poll_response[$response['question_id']]=explode(\"|\",$response['response']);\n }\n else\n $poll_response[$response['question_id']]=$response['response'];\n }\n }\n\n\n //Devis new functionalities (getting questions linked to poll)\n\n $poll_questions=$poll_obj->getPollQuestions($mission_identifier);\n //echo \"<pre>\";print_r($poll_questions);\n if($poll_questions)\n {\n $i=0;\n foreach($poll_questions as $question)\n {\n if($question['type']=='radio')\n {\n $options=explode(\"|\",$question['option']);\n $j=1;\n foreach($options as $option)\n {\n $radio_options['option'.$j]=$option;\n $j++;\n }\n $poll_questions[$i]['option']=$radio_options;\n }\n if($question['type']=='checkbox')\n {\n $options=explode(\"|\",$question['option']);\n $j=1;\n foreach($options as $option)\n {\n $check_options['option'.$j]=$option;\n $j++;\n }\n $poll_questions[$i]['option']=$check_options;\n }\n\n //assigning answer if already given reply to this poll question\n if(is_array($poll_response))\n {\n\n if(array_key_exists($question['id'], $poll_response))\n {\n if($question['type']=='checkbox') //if it is checkbox change the answer in to array if not array\n {\n if(is_array($poll_response[$question['id']]))\n $poll_questions[$i]['answer']=$poll_response[$question['id']];\n else\n $poll_questions[$i]['answer']=array($poll_response[$question['id']]);\n }\n else\n $poll_questions[$i]['answer']=$poll_response[$question['id']];\n\n }\n }\n\n\n\n $i++;\n\n }\n\n $this->_view->poll_questions=$poll_questions;\n\n }\n\n\n\n\n $this->_view->mission_type='poll_premium';\n $this->_view->comment_type= $comment_type;\n $this->_view->identifier=$mission_identifier;\n $this->_view->pollDetails=$pollDetails;\n $this->_view->commentDetails=$commentDetails;\n $this->_view->commentCount=count($commentDetails);\n $this->_view->request_from=$req_from;\n $this->_view->disabled=$disabled;\n $this->_view->profile_type=$this->profileType;\n\n if($upcoming)\n $this->_view->upcoming='yes';\n\n $this->render(\"Contrib_devis_popup\");\n }\n else if($mission_type=='poll_nopremium')\n {\n\n $searchParameters['profile_type']=$this->profileType;\n $searchParameters['pollid']=$mission_identifier;\n $searchParameters['req_from']= $req_from;\n $searchParameters['upcoming']= $upcoming;\n $searchParameters['black_status']=$this->black_status;\n\n $comment_type='poll';\n $pollDetails=$poll_obj->getPollDetails($searchParameters);\n if(count($pollDetails)>0)\n $pollDetails=$this->formatPollDetials($pollDetails);\n //Comment Details\n $commentDetails=$comments_obj->getAdComments($mission_identifier,$comment_type);\n if(count($commentDetails)>0)\n $commentDetails=$this->formatCommentDetails($commentDetails);\n\n\n //Devis new functionalities (getting questions linked to poll)\n $poll_questions=$poll_obj->getPollQuestions($mission_identifier);\n if($questions)\n $this->_view->poll_questions=$poll_questions;\n\n // Check already given response for this poll or not\n $checkResponseExist=$responsePollObj->checkPollResponse($contrib_identifier,$mission_identifier);\n if($checkResponseExist!=\"NO\")\n $this->_view->ResponseExist='yes';\n\n\n\n $this->_view->mission_type='poll_nopremium';\n $this->_view->comment_type= $comment_type;\n $this->_view->identifier=$mission_identifier;\n $this->_view->pollDetails=$pollDetails;\n $this->_view->commentDetails=$commentDetails;\n $this->_view->commentCount=count($commentDetails);\n $this->_view->request_from=$req_from;\n $this->_view->disabled=$disabled;\n $this->_view->profile_type=$this->profileType;\n\n if($upcoming)\n $this->_view->upcoming='yes';\n\n $this->render(\"Contrib_devis_popup\");\n }\n else if($mission_type=='correction')\n {\n\n $searchParameters['profile_type']=$this->profileType;\n $searchParameters['articleId']=$mission_identifier;\n $searchParameters['corrector']=$this->corrector;\n $searchParameters['corrector_type']=$this->corrector_type;\n $searchParameters['req_from']= $req_from;\n $searchParameters['upcoming']= $upcoming;\n\n $comment_type='correction';\n $correctionDetails=$artilce_obj->getCorrectorAOs($searchParameters);\n if(count($correctionDetails)>0)\n $correctionDetails=$this->formatCorrectionDetials($correctionDetails);\n\n\n //Comment Details\n $commentDetails=$comments_obj->getAdComments($mission_identifier,$comment_type);\n if(count($commentDetails)>0)\n $commentDetails=$this->formatCommentDetails($commentDetails);\n $this->_view->mission_type='correction';\n $this->_view->comment_type= $comment_type;\n $this->_view->identifier=$mission_identifier;\n $this->_view->correctionDetails=$correctionDetails;\n $this->_view->commentDetails=$commentDetails;\n $this->_view->commentCount=count($commentDetails);\n $this->_view->request_from=$req_from;\n $this->_view->disabled=$disabled;\n $this->_view->profile_type=$this->profileType;\n\n if($upcoming)\n $this->_view->upcoming='yes';\n $this->render(\"Contrib_correction_popup\");\n }\n\n\n }\n\n }\n else\n $this->_redirect(\"/contrib/aosearch\");\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.5077513", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "2198536305db1b29c1bd0b935284628d", "score": "0.50710756", "text": "public function canShowInfo()\n {\n return true;\n }", "title": "" }, { "docid": "85704ee0907f9ed818f259481a5174b6", "score": "0.50704926", "text": "public function testInfoRest()\n {\n\n $restaurant = Restaurant::factory()->create([\n 'id' => 1,\n ]);\n\n $this->browse(function (Browser $browser) use ($restaurant) {\n $browser->visit(new RestaurantPage($restaurant->id))\n ->click('#info-tab')\n ->assertSee('Dónde estamos')\n ->assertSee('Sobre nosotros')\n //->assertSee('$restaurant.description')\n ->assertSee('Horario de apertura'); \n });\n }", "title": "" }, { "docid": "d1b2a9c68eb3adf21eca41ab3ee251f0", "score": "0.50624156", "text": "abstract public function request();", "title": "" }, { "docid": "52ebf0a6a28c8fe27e7fcd2bc5226ebb", "score": "0.50403774", "text": "public function lancementApp(){\n\n\t\treturn \"L'appli se lance comme cela !\";\n\t}", "title": "" }, { "docid": "6dc7dff33713dcfdf5bf2026f331941b", "score": "0.5035899", "text": "public function info()\r\n {\r\n $info = Info::paginate(10);\r\n \treturn view('info.info', ['info' => $info]);\r\n\t}", "title": "" }, { "docid": "e8db9a470b44767485e2902ec4f29f40", "score": "0.5030625", "text": "protected function usage()\n {\n $this->getDI()->get('logr')->debug('Usage : ');\n $this->getDI()->get('logr')->debug(\n 'disturb.php \"Tasks\\\\Manager\" start --workflow=\"/path/to/workflow/config/file.json\" [--name=\"workflowName\"]'\n );\n }", "title": "" }, { "docid": "cd9d609bc22450665e77b2b42ec13152", "score": "0.50296783", "text": "function viewAppraisal(){\n\t // This shows the module name you are accessing, as a tiltle in the browser. \n $data['title'] = \"Appraisal\";\n\t\t\t// This shows the module name you are accessing, as a header(tab name) in the browser. \n $data['header'] = \"Appraisal\";\n\t\t\t$username = $this->uri->segment(4);\n\t\t\t$data['app'] = $this->MPof->viewAppDetails($username);\n\t\t\t if($this->input->post('submit'))\n\t\t\t {\n\t\t\t $this->MPof->submitComments($username);\n\t\t\t flashMsg('success', 'Your comments have been entered.');\n\t\t\t redirect('pof/admin/allConsApp/','refresh');\n\t\t\t }\n\t\t\telse\n\t\t\t {\n \t // This is how Mirus-HRMS loads views\n $data['page'] = $this->config->item('backendpro_template_admin') . \"performance_appraisal_admin_view\";\n $data['module'] = 'pof';\n $this->load->view($this->_container,$data );\n\t\t\t\t //\n\t\t\t\t }\n }", "title": "" }, { "docid": "d18f08ae1b48a8247e8d15c74c988235", "score": "0.50272477", "text": "function appinfo($name='') {\n\t\n\treturn $name;\n}", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.501907", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "0d82c2f94164eb1849df8ada7730328c", "score": "0.50139874", "text": "public function show(Application $application)\n {\n //\n }", "title": "" }, { "docid": "78f7efd48108d2c126f47e5e0c44d67b", "score": "0.50121653", "text": "function _show_info($info) {\n\t\tglobal $database;\n\t\t//print_r($this->data_add);\n\t\tif($info == \"AddProducts\") {\n\t\t\tforeach($this->data_add as $key=>$value) {\n\t\t\t\t$this->_interia_send_request($this->_content,$type='');\n\t\t\t\tif(!array_key_exists(\"SOAP-ENV:FAULT\", $this->_tags)) {\n\t\t\t\t\t$str=\"Produkty załadowane poprawnie<br>\"; \n\t\t\t\t} else {\n\t\t\t\t\t$str=\"Produkty załadowane niepoprawnie <font color=red>Błąd!!! \".$this->_values[$this->_tags['FAULTSTRING'][0]]['value'].\"</font><br>\";\t\n\t\t\t\t}\n\t\t\t\tprint $str;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4dfe3117e5b13830576e7d83942d9549", "score": "0.50115806", "text": "final public function getInfo()\n {\n }", "title": "" }, { "docid": "65054a51440462c5b9bc6fc90fb333a2", "score": "0.5010998", "text": "public function launching()\n {\n }", "title": "" }, { "docid": "0c732ac4daa77bd4d41e061f7ab9c4e6", "score": "0.50068843", "text": "public function action_describe_installation() {\n $this->render('describe_installation', array(\n 'pageTitle' => 'Installing Yubnub'\n ));\n }", "title": "" }, { "docid": "defda7bb7e7c754b542b00442b0618f1", "score": "0.5001367", "text": "public function index()\n { \n $mapel = MapelRes::collection(MapelModel::with('teachers')->get());\n // $mapel2 = MapelModel::paginate(3); Jaga Jaga buat pagination\n return generateAPI(['data' => $mapel, 'custom_lenght' => count($mapel), 'message' => generateAPIMessage(['context' => Self::$context, 'type' => 'read'])]);\n }", "title": "" }, { "docid": "cf1d589452e4039b3f9a2ab26dfdbc80", "score": "0.4991387", "text": "public function request(){\n return \\Gaia\\ShortCircuit::request();\n }", "title": "" }, { "docid": "2bf8da9bb6cef0c6be0de42365ca7b0b", "score": "0.49888423", "text": "public function showDetails(){\n $this->_showDetails = true;\n }", "title": "" }, { "docid": "8c342660bfe19d44eab463ad08309e81", "score": "0.4986355", "text": "public function read($id) {\n\n // We know, now, that the programme exists and is published because the method\n // query has been called before this one\n // For the same reason we don't do exception handling about the node not being found\n // because we know that the method query has found it\n\n $n = node_load($id);\n\n //watchdog('musth_restws', 'W7D001 7ytgyg ProgrammeResourceController::read ' .\n // 'load_tracks_and_credits_list (!i) (!m) (!n) ',\n // array('!i' => print_r($id, true),\n // '!m' => print_r($n, true),\n // '!n' => print_r('', true),\n // ), WATCHDOG_DEBUG);\n\n $load_tracks_and_credits_list = false;\n $load_bio_info = false;\n $load_partner_details = false;\n\n if (isset($n->field_system_title[LANGUAGE_NONE])) {\n $system_title = $n->field_system_title[LANGUAGE_NONE][0]['value'];\n\n // Library \"programmes\" don't have tracks and credits list for now\n\n switch (substr($system_title, 0, 1)) {\n case 'V':\n case 'A':\n $load_tracks_and_credits_list = true;\n break;\n case 'L':\n $load_bio_info = true;\n break;\n case 'P':\n $load_partner_details = true;\n break;\n default:\n // @todo exception handling here\n watchdog('musth_restws',\n 'W3E??? dung7jae7phir3k Unknown first letter of system title (!t) ',\n array('!t' => print_r($system_title, true)),\n WATCHDOG_ERROR);\n }\n\n } else\n $system_title = 'Missing system title';\n\n // Now we don't need taxonomy on the angular side, so we are not sending it\n\n if ($load_tracks_and_credits_list) {\n\n //watchdog('musth_restws', 'W7D001 7ASW ProgrammeResourceController::read ' .\n // 'load_tracks_and_credits_list (!i) (!m) (!n) ',\n // array('!i' => print_r($id, true),\n // '!m' => print_r('', true),\n // '!n' => print_r('', true),\n // ), WATCHDOG_DEBUG);\n\n // Loading the credits list\n\n if (isset($n->field_cast_crew_credits[LANGUAGE_NONE])) {\n $credits_elements_array =\n musth_restws_make_credits_elements_array($n->field_cast_crew_credits[LANGUAGE_NONE]);\n } else {\n $credits_elements_array = array();\n }\n\n // We sort the tracks by catalogue no so that we have them sorted by\n // segment no and then by track no\n\n $query = new EntityFieldQuery();\n $tids_of_found_tracks = $query->entityCondition('entity_type', 'node')\n ->entityCondition('bundle', 'programme_track')\n ->fieldCondition('field_programme', 'target_id', $id, '=')\n ->fieldOrderBy('field_catalogue_no', 'value', 'ASC')\n ->execute();\n\n // No check on $tids_of_found_tracks to see if the entity field query worked\n // We have done many checks above\n\n // But we want to check if there are any tracks associated to this programme\n\n if (isset($tids_of_found_tracks['node'])) {\n\n $tids_of_found_tracks_just_the_tids = array_keys($tids_of_found_tracks['node']);\n\n //watchdog('musth_restws', 'W7D001 3333 TrackResourceController query (!f) (!m) (!n) ',\n // array('!f' => print_r($filters, true),\n // '!m' => print_r($meta_controls, true),\n // '!n' => print_r($tracks_as_array, true),\n // ), WATCHDOG_DEBUG);\n\n } else {\n\n watchdog('musth_restws',\n 'W3E029 No tracks for this programme (!n) ',\n array('!n' => print_r($id, true)),\n WATCHDOG_ERROR);\n\n $tids_of_found_tracks_just_the_tids = array();\n\n }\n\n // Loading the actual track nodes\n\n $array_track_objects = musth_restws_load_tracks($tids_of_found_tracks_just_the_tids);\n\n } else {\n\n $credits_elements_array = array();\n $array_track_objects = array();\n\n }\n\n // Loading bio info if present and only for Biography nodes\n // Actually we don't check the bundle here, we attempt to\n // fetch the bio info for any library programme\n\n if ($load_bio_info)\n $array_bio_info_objects = musth_restws_load_bio_info($n);\n else\n $array_bio_info_objects = array();\n\n if ($load_partner_details)\n $array_partner_details_objects = musth_restws_load_partner_details($n);\n else\n $array_partner_details_objects = array();\n\n // About the other fields, if they are defined we get their values.\n // Otherwise we send back a default value.\n\n // We complete the filename of the summary panel image with the base url\n // @todo just a test, use a define. We have to see if we get images from the cdn or from\n // our website\n\n if (isset($n->field_summary_panel_image[LANGUAGE_NONE]))\n $image_full_url = \"/backend/sites/default/files/\" .\n $n->field_summary_panel_image[LANGUAGE_NONE][0]['filename'];\n else\n $image_full_url = \"Missing summary panel image\";\n\n if (isset($n->field_display_title[LANGUAGE_NONE]))\n $display_title = $n->field_display_title[LANGUAGE_NONE][0]['value'];\n else\n $display_title = '';\n\n if (isset($n->field_display_sub_title[LANGUAGE_NONE]))\n $display_sub_title = $n->field_display_sub_title[LANGUAGE_NONE][0]['value'];\n else\n $display_sub_title = '';\n\n // These two fields, body and summary, contain html markup. To correctly display it in angularjs we have to use\n // the directive ng-bind-html\n // The html markup in fields like these will be inserted by editors, so here we just\n // send to angular the fields as it is\n\n if (isset($n->body[LANGUAGE_NONE]))\n $body = $n->body[LANGUAGE_NONE][0]['value'];\n else\n $body = '';\n\n if (isset($n->field_summary[LANGUAGE_NONE]))\n $summary = $n->field_summary[LANGUAGE_NONE][0]['value'];\n else\n $summary = '';\n\n //watchdog('musth_restws', 'W7D001 8989 ProgrammeResourceController summary (!i) (!p) ',\n // array('!i' => print_r($id, true),\n // '!p' => print_r($summary, true)),\n // WATCHDOG_DEBUG);\n\n // The field field_synopsis in programmes is an entity reference to a synopsis\n // content node\n\n if (isset($n->field_synopsis[LANGUAGE_NONE]))\n $synopsis_nid = $n->field_synopsis[LANGUAGE_NONE][0]['target_id'];\n else\n $synopsis_nid = 0;\n\n // We get the field 'body' of the synopsis node\n\n if ($synopsis_nid > 0) {\n $synopsis_node = node_load($synopsis_nid);\n $synopsis = $synopsis_node->body[LANGUAGE_NONE][0]['value'];\n } else {\n $synopsis = '';\n }\n\n if (isset($n->field_sleeve_notes[LANGUAGE_NONE]))\n $sleeve_notes = $n->field_sleeve_notes[LANGUAGE_NONE][0]['value'];\n else\n $sleeve_notes = '';\n\n // Creating the Programme object to send back\n\n $programme_obj_to_return = new Programme($id,\n $display_title,\n $display_sub_title,\n $system_title,\n $image_full_url, // summary panel image full url\n $summary,\n $synopsis,\n $sleeve_notes,\n $body,\n $credits_elements_array,\n $array_track_objects,\n $array_bio_info_objects,\n $array_partner_details_objects);\n\n //watchdog('musth_restws', 'W7D001 996TGBHY ProgrammeResourceController read (!i) (!p) ',\n // array('!i' => print_r($id, true),\n // '!p' => print_r($image_full_url, true)),\n // WATCHDOG_DEBUG);\n\n // Sending back the Programme object\n\n return $programme_obj_to_return;\n }", "title": "" }, { "docid": "8275f968c91acbd430fe18eb6ec3204d", "score": "0.49859992", "text": "protected function indexRequest(){\n\t\t\n\t\t//If the user is logged in\n\t\tif($this->getModel()->checkLogin(true))\n\t\t{\n\t\t\t//Get the installed module data\n\t\t\t$data = $this->getModel()->getInstalledModules();\n\t\t\t\n\t\t\t//Show this data visually\n\t\t\t$this->getView()->showInstalledModules($data);\n\t\t}\n\t}", "title": "" }, { "docid": "07c73f5e6c6014b4369376e305b19461", "score": "0.49820712", "text": "public function action_show() {\n switch ($_GET['id']) {\n case 'goodies':\n $this->page = 'goodies';\n require_once './app/views/help/goodies.php';\n break;\n case 'about':\n $this->page = 'about';\n require_once './app/views/help/about.php';\n break;\n case 'contact':\n $this->page = 'contact';\n require_once './app/views/help/contact.php';\n break;\n }\n }", "title": "" }, { "docid": "8ad784199eae9144014e87d75e536d1d", "score": "0.49800998", "text": "public function overview()\n\t{\n\t\t#grab members page\n\t\t$this->showPage = $this->registry->class_global->overview();\n\t\t\n\t\t#navigation\n\t\t$this->registry->output->addNavigation( $this->lang->words['overview'], 'app=ibEconomy&amp;tab=global&amp;area=overview' );\n\t\t\n\t\t#page title\n\t\t$this->page_title .= ' ' .$this->lang->words['overview'];\n\t}", "title": "" }, { "docid": "d18b9864b6ff9a02ded66e507946cc23", "score": "0.4977188", "text": "public function display_detail_experiment() {\n\t\tinclude_once( 'views/details.php' );\n\t}", "title": "" }, { "docid": "47291f89d738c92bdbec17751a07b7f4", "score": "0.49739686", "text": "public function show_page() {\n\t\tswitch( filter_input (INPUT_GET, 'page', FILTER_SANITIZE_STRING) ){\n\t\t\tcase 'aga_googleanalytics':\n\t\t\t\t$settings = new Settings();\n\t\t\t\t$settings->render();\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "858cf8a41f95f58eb64037f33c056c62", "score": "0.49731228", "text": "public function discover () {\n\t\techo \" and can at the same time discover\";\n\t}", "title": "" }, { "docid": "60d8bafcff7c0b9f854f4c7d17f9d54e", "score": "0.4972954", "text": "public function openAdditional();", "title": "" }, { "docid": "92689f6293644fbb0d8beea8d2c3b5f9", "score": "0.49669954", "text": "public function detailAction() {\n if ($this->request->hasArgument('id')) {\n $id = $this->request->getArgument('id');\n }\n\n $structure = NULL;\n if (!is_null($id)) {\n $structureWS = new StructureService();\n $structure = $structureWS->getStructure($id);\n }\n // Adding a control on the url to not have a duplicate content.\n if (strpos($structure->urlStr, \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getIndpEnv('TYPO3_SITE_URL')) === FALSE) {\n $GLOBALS['TSFE']->additionalHeaderData['ot_webservice'] = '<meta name=\"robots\" content=\"noindex, nofollow\">';\n }\n $this->view->assign('structure', $structure);\n }", "title": "" } ]
7332a82002356d1d1e90aa2fa1d1018c
Given markdown text, turns it into html. A shell div is output around the markdown. You can specifiy the css class and div id.
[ { "docid": "4a65c7045e95ea999afc6e42b72eac33", "score": "0.73978496", "text": "function MarkdownToHtml($markdown, $class=\"markdown\", $divid=\"\")\n{\n\t$c = \"\";\n\t$id = \"\";\n\tif(!empty($class)) $c = ' class=\"' . $class . '\"';\n\tif(!empty($divid)) $id = ' id=\"' . $divid . '\"';\n\n\t$html = '<div ' . $c . $id . '>' . \"\\n\";\n\t$html .= Markdown::defaultTransform($markdown);\n\t$html .= '</div>' . \"\\n\";\n\treturn $html;\n}", "title": "" } ]
[ { "docid": "78dcc3525078a34c413c17435019453c", "score": "0.7533641", "text": "function markdown2html($text)\n{\n\t$text = html($text);\n\t\n\t// Convert plain-text formatting to HTML\n\t\n\t// strong emphasis\n\t$text = preg_replace('/__(.+?)__/s', '<strong>$1</strong>', $text);\n\t$text = preg_replace('/\\*\\*(.+?)\\*\\*/s', '<strong>$1</strong>', $text);\n\t\n\t// emphasis\n\t$text = preg_replace('/_([^_]+)_/', '<em>$1</em>', $text);\n\t$text = preg_replace('/\\*([^\\*]+)\\*/', '<em>$1</em>', $text);\n\t\n\t// Convert Windows (\\r\\n) to Unix (\\n)\n\t$text = str_replace(\"\\r\\n\", \"\\n\", $text);\n\t// Convert Macintosh (\\r) to Unix (\\n)\n\t$text = str_replace(\"\\r\", \"\\n\", $text);\n\t\n\t// Paragraphs\n $text = '<p>' . str_replace(\"\\n\\n\", '</p><p>', $text) . '</p>';\n\t// Line breaks\n\t$text = str_replace(\"\\n\", '<br>', $text);\n\t\n\t// Url links\n\t$text = preg_replace(\n\t\t\t'/\\[([^\\]]+)]\\(([-a-z0-9._~:\\/?#@!$&\\'()*+,;=%]+)\\)/i',\n\t\t\t'<a href=\"$2\">$1</a>', $text);\n\t\n\treturn $text;\n}", "title": "" }, { "docid": "996a74a44100a1d5966918784af81264", "score": "0.7393723", "text": "function markdownout($text)\n{\n\techo markdown2html($text);\n}", "title": "" }, { "docid": "df3ec8e9114c1b65e51525e50877911a", "score": "0.71218884", "text": "function markdown(string $text): string\n\t{\n\t\t$parser = Services::markdown();\n\t\treturn $parser->convertToHtml($text);\n\t}", "title": "" }, { "docid": "e3187234bdc47c0e767a13092fcaebc5", "score": "0.6973823", "text": "function markdownToHtml($string, $config = [])\n{\n $Parsedown = new Parsedown();\n foreach ($config as $option => $value) {\n if ($option === 'breaksEnabled') {\n $Parsedown->setBreaksEnabled($value);\n } elseif ($option === 'markupEscaped') {\n $Parsedown->setMarkupEscaped($value);\n } elseif ($option === 'urlsLinked') {\n $Parsedown->setUrlsLinked($value);\n } else {\n throw new \\InvalidArgumentException(\"Invalid Parsedown option \\\"$option\\\"\");\n }\n }\n return $Parsedown->text($string);\n}", "title": "" }, { "docid": "5d9d9a22c54341f7d74cb3ab7a12085a", "score": "0.68876594", "text": "private static function getHtml(string $text): string\n {\n $markdown = static::normalizeHTMLAndMarkdown($text);\n\n $html = static::convertMarkdownToHtml($markdown);\n\n return $html;\n }", "title": "" }, { "docid": "9debfa2bbbd669332e8ed9274ef6756d", "score": "0.6837342", "text": "private static function convertMarkdownToHtml(string $markdown): string\n {\n $html = (new static())->getMarkdownCoverter()->convertToHtml($markdown);\n\n return static::replaceLineBreaksInsideTagsForBr((string) $html);\n }", "title": "" }, { "docid": "8e77a644091efe00f78861fadc679e89", "score": "0.6735915", "text": "function markdown($text)\n{\n return Parsedown::instance()->parse($text);\n}", "title": "" }, { "docid": "ff3ccf567dd0ba3a00ed664c7eac57c7", "score": "0.6706517", "text": "public function convertMarkdownToHtml($markdown)\n {\n return $this->markdownConverter\n ->setBreaksEnabled(true)\n ->text($markdown);\n }", "title": "" }, { "docid": "988f1286b1e5af740f6cfd8045c856b5", "score": "0.6679519", "text": "function markdown($content)\n{\n $parser = new MarkdownExtra;\n\n if (Config::get('theming.markdown_hard_wrap')) {\n $parser->hard_wrap = true;\n }\n\n return $parser->transform($content);\n}", "title": "" }, { "docid": "2461147f4a76403c24e36d1824698f6c", "score": "0.6670343", "text": "public function html_text()\n {\n return $this->dispatch(\n new MarkdownToHtml(\n $this->wrappedObject->text\n )\n );\n }", "title": "" }, { "docid": "19f18e413e1456c2d574e167e790acdd", "score": "0.6649709", "text": "private function markdown($text) {\r\n require_once(__DIR__ . '/php-markdown/Michelf/Markdown.php');\r\n require_once(__DIR__ . '/php-markdown/Michelf/MarkdownExtra.php');\r\n return \\Michelf\\MarkdownExtra::defaultTransform($text);\r\n }", "title": "" }, { "docid": "724eb9868cfe5995d7544a7a18734465", "score": "0.66058296", "text": "public function markdownAction()\n {\n // return __METHOD__ . \", \\$db is {$this->db}\";\n $title = \"Movie database | oophp\";\n $text = file_get_contents(__DIR__ . \"./text/bbcode.txt\");\n $txtFilter = new MyTextFilter();\n $html = $txtFilter->parse($text, [\"markdown\"]);\n\n $data = [\n \"text\" => $text,\n \"html\" => $html\n ];\n\n $this->app->page->add(\"mytextfilter/markdown\", $data);\n return $this->app->page->render([\n \"title\" => $title,\n ]);\n }", "title": "" }, { "docid": "86b9d2abe4d395838f249265cd26014f", "score": "0.6567176", "text": "function markdown($text)\n{\n return (new ParsedownExtra)->text($text);\n}", "title": "" }, { "docid": "6a61a4a247e8470b2689fd5b159ce7c8", "score": "0.6556385", "text": "public function parseMarkdown(): HtmlString\n {\n $text = $this->getMarkdown();\n\n if ($text instanceof Collection) {\n $text = $text->toArray();\n }\n\n // If the data is an array, or a collection, we will treat each array item as a line.\n if (is_array($text)) {\n $text = implode(PHP_EOL, $text);\n }\n\n return Markdown::parse((string)$text);\n }", "title": "" }, { "docid": "22aae73589d4358f8ea2c6c876fcb3ae", "score": "0.6502931", "text": "public function markdownAction() : object\n {\n $title = \"Markdown\";\n $text = file_get_contents(__DIR__ . \"/textfiles/sample.md\");\n // $filter = new MyTextFilter();\n\n // Deal with the action and return a response.\n $this->app->page->add(\"textfilter/markdown\", [\n \"text\" => $text,\n \"html\" => $this->filter->parse($text, [\"markdown\"])\n ], \"main\");\n return $this->app->page->render([ \"title\" => $title ]);\n }", "title": "" }, { "docid": "804cf150bee85ef2fba85f54336aacc1", "score": "0.6457329", "text": "protected function formatMarkdown() :string{\n return Markdown::convertToHtml($this->body);\n }", "title": "" }, { "docid": "59a99db5e183c3231702d170316b8285", "score": "0.6426143", "text": "function parse_markdown($str) {\n\tglobal $parsedown;\n\t// return $ciconia->render($str);\n\treturn $parsedown->text($str);\n}", "title": "" }, { "docid": "102f3582709b5dfc4a553919e57fbfae", "score": "0.64099145", "text": "public function markdownToHtml(InputContextInterface $input): string\n {\n $document = $this->parse($input);\n\n $action = fn (): string => $this->renderer->renderBlock($document);\n\n return $this->executeInContext($action, $input);\n }", "title": "" }, { "docid": "8f8cc66f1c3cdd3356c1666b10a260d4", "score": "0.640728", "text": "public function markdown($text)\n {\n $text = \\Michelf\\MarkdownExtra::defaultTransform($text);\n $text = \\Michelf\\SmartyPantsTypographer::defaultTransform(\n $text,\n \"2\"\n );\n return $text;\n }", "title": "" }, { "docid": "997340efcaa0d704843f49a9183b365d", "score": "0.6336398", "text": "protected function toMarkdown($content)\n {\n $tmpfname = tempnam(sys_get_temp_dir(), 'fillet'); // good\n file_put_contents($tmpfname, $content);\n $cmd = $this->config['pandoc']['bin'] . ' --no-wrap -f html -t markdown ' . $tmpfname;\n $content = shell_exec($cmd);\n unlink($tmpfname);\n return $content;\n }", "title": "" }, { "docid": "7a469b0b05211d68145ff16e26c64f3d", "score": "0.63245934", "text": "private static function normalizeHTMLAndMarkdown(string $text): string\n {\n $markdown = static::wrapBasicTagsInAParagraph($text);\n\n $markdown = static::wrapImagesTagsInAParagraph($markdown);\n\n $markdown = static::replaceLineBreaksInsideTagsForBr($markdown);\n\n return static::replaceParagraphsForMarkdown($markdown);\n }", "title": "" }, { "docid": "82e9a1077f6342de7d0fa88c768bd246", "score": "0.627289", "text": "function markdown_raccourcis($texte){\n\n\t$md = $texte;\n\n\t// enlever les \\n\\n apres <div class=\"base64....\"></div>\n\t// et surtout le passer en <p> car ca perturbe moins Markdown\n\tif (strpos($md,'<div class=\"base64')!==false){\n\t\t$md = preg_replace(\",(<div (class=\\\"base64[^>]*>)</div>)\\n\\n,Uims\",\"<p \\\\2</p>\",$md);\n\t}\n\n\t// marquer les ul/ol explicites qu'on ne veut pas modifier\n\tif (stripos($md,\"<ul\")!==false OR stripos($md,\"<ol\")!==false OR stripos($md,\"<li\")!==false)\n\t\t$md = preg_replace(\",<(ul|ol|li)(\\s),Uims\",\"<$1 html$2\",$md);\n\n\t// parser le markdown\n\t$md = Parsedown::instance()->parse($md);\n\n\t// class spip sur ul et ol et retablir les ul/ol explicites d'origine\n\t$md = str_replace(array(\"<ul>\",\"<ol>\",\"<li>\"),array('<ul'.$GLOBALS['class_spip_plus'].'>','<ol'.$GLOBALS['class_spip_plus'].'>','<li'.$GLOBALS['class_spip'].'>'),$md);\n\t$md = str_replace(array(\"<ul html\",\"<ol html\",\"<li html\"),array('<ul','<ol','<li'),$md);\n\n\t// Si on avait des <p class=\"base64\"></p> les repasser en div\n\t// et reparagrapher car MD n'est pas tres fort et fait de la soupe <p><div></div></p>\n\tif (strpos($md,'<p class=\"base64')!==false){\n\t\t$md = preg_replace(\",(<p (class=\\\"base64[^>]*>)</p>),Uims\",\"<div \\\\2</div>\",$md);\n\t\t$md = paragrapher($md);\n\t\t// pas d'autobr introduit par paragrapher\n\t\tif (_AUTO_BR AND strpos($md,_AUTOBR)!==false){\n\t\t\t$md = str_replace(_AUTOBR,'',$md);\n\t\t}\n\t\t// eviter les >\\n\\n<p : un seul \\n\n\t\tif (strpos($md,\">\\n\\n<p\")!==false){\n\t\t\t$md = str_replace(\">\\n\\n<p\",\">\\n<p\",$md);\n\t\t}\n\t}\n\n\t// echapper le markdown pour que SPIP n'y touche plus\n\treturn code_echappement($md,\"md\");\n}", "title": "" }, { "docid": "27cf8c680ab3ad8ce106f810b0c673db", "score": "0.6259137", "text": "public function markdown($txt)\n {\n return $this->parser->transformMarkdown($txt);\n }", "title": "" }, { "docid": "f8dc7f80489ba8613258f978a020b3f6", "score": "0.6187294", "text": "public function markdown($text)\n {\n return MarkdownExtra::defaultTransform($text);\n }", "title": "" }, { "docid": "0613cc42a99ef76e546b5d00b19595e2", "score": "0.61836666", "text": "function processContent(string $content): string\n{\n $content = processShortcodes($content);\n return Michelf\\Markdown::defaultTransform($content);\n}", "title": "" }, { "docid": "d665546c613564a7ecc9bedf628db5ba", "score": "0.6173597", "text": "abstract protected function getMarkdown();", "title": "" }, { "docid": "b08a213d14c6786de57416968daab9cd", "score": "0.61642003", "text": "function jabMarkdown($text, $safe=false) \n{\n\tglobal $jab;\n\t\n\t# Setup static parser variable.\n\tstatic $parser;\n\tif (!isset($parser)) \n\t{\n\t\t$parser=jabCreateMarkdownParser($safe);\n\t}\n\t\n\tif ($safe)\n\t{\n\t\t$text=str_replace(\"!!gt!!\", \">\", htmlspecialchars(str_replace(\">\", \"!!gt!!\", $text)));\n\t}\n\t\n\t$text=$parser->transform($text);\n\treturn $text;\t\n}", "title": "" }, { "docid": "e4e9d72864c23332276e2bc5a58b1d43", "score": "0.61534613", "text": "public static function markdownify($text)\n {\n $parser = new MarkdownParser();\n return $parser->text($text);\n }", "title": "" }, { "docid": "3fb907b06fb3bca35705195391e9e7ce", "score": "0.6119764", "text": "public function parse($markdown) {\n\n if(!$this->kirby->options['markdown']) {\n return $markdown;\n } else {\n // initialize the right markdown class\n $parsedown = $this->kirby->options['markdown.extra'] ? new ParsedownExtra() : new Parsedown();\n\n // set markdown auto-breaks\n $parsedown->setBreaksEnabled($this->kirby->options['markdown.breaks']);\n\n // parse it!\n return $parsedown->text($markdown);\n }\n\n }", "title": "" }, { "docid": "1a191fcb69cb24782441c4f32afef270", "score": "0.6114802", "text": "function markdown($markdown)\n{\n static $parser;\n if (!$parser) {\n $parser = new Markdown();\n }\n\n return $parser->parse($markdown);\n}", "title": "" }, { "docid": "2bd34e7f1aa5759865a6daed2765b7ce", "score": "0.6107965", "text": "function markdown_echappe_code($texte){\n\t$texte = echappe_retour($texte);\n\n\t// tous les paragraphes indentes par 4 espaces ou une tabulation\n\t// mais qui ne sont pas la suite d'une liste ou d'un blockquote\n\tpreg_match_all(\",(^( |\\t|\\* |\\+ |- |> |\\d+\\.)(.*)$(\\s*^(\\s+|\\t).*$)*?),Uims\",$texte,$matches,PREG_SET_ORDER);\n\tforeach($matches as $match){\n\t\tif (!strlen(trim($match[2]))){\n\t\t\t#var_dump($match[0]);\n\t\t\t$p = strpos($texte,$match[0]);\n\t\t\t$texte = substr_replace($texte,code_echappement($match[0], 'md', true),$p,strlen($match[0]));\n\t\t}\n\t}\n\n\tif (strpos($texte,\"```\")!==false OR strpos($texte,\"~~~\")!==false){\n\t\t$texte = echappe_html($texte,'md',true,',^(```|~~~)\\w*?\\s.*\\s(\\1),Uims');\n\t}\n\tif (strpos($texte,\"``\")!==false){\n\t\t$texte = echappe_html($texte,'md',true,',``.*``,Uims');\n\t}\n\tif (strpos($texte,\"`\")!==false){\n\t\t$texte = echappe_html($texte,'md',true,',`.*`,Uims');\n\t}\n\n\t// escaping\n\tif (strpos($texte,\"\\\\\")!==false){\n\t\t$texte = echappe_html($texte,'md',true,',\\\\\\\\[\\\\`*_{}\\[\\]\\(\\)>+.!-],Uims');\n\t}\n\n\treturn $texte;\n}", "title": "" }, { "docid": "77e55b6d7a5873746e232ba88882903b", "score": "0.610379", "text": "function parse_markdown($markdown)\n\t{\n\t\t$ci = & get_instance();\n\t\t$ci->load->library('markdown_parser');\n\n\t\treturn Markdown($markdown);\n\t}", "title": "" }, { "docid": "65c328eff7c5496911758001ccfdc0b5", "score": "0.6089366", "text": "public function toHtml(): string\n {\n return $this->parseMarkdown()->toHtml();\n }", "title": "" }, { "docid": "1d8ba75b0d89d828cd7cf8354c96f7f6", "score": "0.60851574", "text": "public function render(string $markdown): string\n {\n return $this->converter->convert(self::adjust($markdown))->getContent();\n }", "title": "" }, { "docid": "1a7778ce4cd202e0deaca3f1f3b9c543", "score": "0.60729164", "text": "public function render($text, array $options = null)\n {\n return Mage::getSingleton('markdown/markdown_render')\n ->setOptions($options)\n ->renderMarkdown($text);\n }", "title": "" }, { "docid": "ae4a8346b7759bd000f27518f3cbcef5", "score": "0.60169524", "text": "function code_trick( $text, $markdown ) {\n\t\t// If doing markdown, first take any user formatted code blocks and turn them into backticks so that\n\t\t// markdown will preserve things like underscores in code blocks\n\t\tif ( $markdown )\n\t\t\t$text = preg_replace_callback(\"!(<pre><code>|<code>)(.*?)(</code></pre>|</code>)!s\", array( __CLASS__,'decodeit'), $text);\n\n\t\t$text = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $text);\n\t\tif ( !$markdown ) {\n\t\t\t// This gets the \"inline\" code blocks, but can't be used with Markdown.\n\t\t\t$text = preg_replace_callback(\"|(`)(.*?)`|\", array( __CLASS__, 'encodeit'), $text);\n\t\t\t// This gets the \"block level\" code blocks and converts them to PRE CODE\n\t\t\t$text = preg_replace_callback(\"!(^|\\n)`(.*?)`!s\", array( __CLASS__, 'encodeit'), $text);\n\t\t} else {\n\t\t\t// Markdown can do inline code, we convert bbPress style block level code to Markdown style\n\t\t\t$text = preg_replace_callback(\"!(^|\\n)([ \\t]*?)`(.*?)`!s\", array( __CLASS__, 'indent'), $text);\n\t\t}\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "b29df4a874bcbdb1b3c2893ea134a9b9", "score": "0.5940365", "text": "function markdown_post_typo($texte){\n\tif (strpos($texte,\"<md>\")!==false){\n\t\t$texte = echappe_retour($texte,\"md\");\n\t}\n\treturn $texte;\n}", "title": "" }, { "docid": "8267a1940f4fabcd5be2b202e42b64b8", "score": "0.591796", "text": "function markdown_pre_echappe_html_propre($texte){\n\tstatic $syntaxe_defaut = null;\n\n\tif (is_null($syntaxe_defaut)){\n\t\t// lever un flag pour dire que ce pipeline est bien OK\n\t\tif (!defined('_pre_echappe_html_propre_ok'))\n\t\t\tdefine('_pre_echappe_html_propre_ok',true);\n\t\t// on peut forcer par define, utile pour les tests unitaires\n\t\tif (defined('_MARKDOWN_SYNTAXE_PAR_DEFAUT'))\n\t\t\t$syntaxe_defaut = _MARKDOWN_SYNTAXE_PAR_DEFAUT;\n\t\telse {\n\t\t\tinclude_spip('inc/config');\n\t\t\t$syntaxe_defaut = lire_config(\"markdown/syntaxe_par_defaut\",\"spip\");\n\t\t}\n\t}\n\n\t// si syntaxe par defaut est markdown et pas de <md> dans le texte on les introduits\n\tif ($syntaxe_defaut===\"markdown\"\n\t\t// est-ce judicieux de tester cette condition ?\n\t AND strpos($texte,\"<md>\")===false\n\t ){\n\t\t$texte = str_replace(array(\"<spip>\",\"</spip>\"),array(\"</md>\",\"<md>\"),$texte);\n\t\t$texte = \"<md>$texte</md>\";\n\t\t$texte = str_replace(\"<md></md>\",\"\",$texte);\n\t}\n\n\tif (strpos($texte,\"<md>\")!==false){\n\t\t// Compat SPIP <3.0.17\n\t\tif (!function_exists(\"traiter_echap_math_dist\")){\n\t\t\t$texte = echappe_html_3017($texte,\"mdblocs\",false,',<(md)(\\s[^>]*)?'.'>(.*)</\\1>,UimsS');\n\t\t}\n\t\telse {\n\t\t\t// echapper les blocs <md>...</md> car on ne veut pas toucher au <html>, <code>, <script> qui sont dedans !\n\t\t\t$texte = echappe_html($texte,\"mdblocs\",false,',<(md)(\\s[^>]*)?'.'>(.*)</\\1>,UimsS');\n\t\t}\n\t}\n\n\n\treturn $texte;\n}", "title": "" }, { "docid": "51ca8eb9183b25dc1c63aa1bd8884ace", "score": "0.59105635", "text": "function jabLeaveMarkdown()\n{\n\tglobal $jab;\n\tif (--$jab['markdown_depth']==0)\n\t{\n\t\t// Format content\n\t\t$html=jabMarkdown(ob_get_contents(), $jab['markdown_safe']);\n\n\t\tob_end_clean();\n\t\t\n\t\techo $html;\n\t}\t\n}", "title": "" }, { "docid": "b67551bcf7fae7843433f3eb649e2246", "score": "0.5879118", "text": "public function convertHtmlToMarkdown($html)\n {\n return $this->htmlConverter->convert($html);\n }", "title": "" }, { "docid": "dbe859b6888c79a326b712cfb96fa6e0", "score": "0.5831371", "text": "public function markdown()\n\t{\n\t\techo view('sketchpad::help/output/markdown');\n\t}", "title": "" }, { "docid": "45b87fb5c730b8a0b9b3ce54582fa616", "score": "0.58281285", "text": "public static function Markdown($Mixed) {\n if (!is_string($Mixed)) {\n return self::To($Mixed, 'Markdown');\n } else {\n $Formatter = Gdn::Factory('HtmlFormatter');\n if (is_null($Formatter)) {\n return Gdn_Format::Display($Mixed);\n } else {\n require_once(PATH_LIBRARY.DS.'vendors'.DS.'markdown'.DS.'markdown.php');\n $Mixed = Markdown($Mixed);\n $Mixed = Gdn_Format::Mentions($Mixed);\n return $Formatter->Format($Mixed);\n }\n }\n }", "title": "" }, { "docid": "2f790792c23118a78043efb89ff90f1c", "score": "0.5787718", "text": "public function __invoke ($text, $withEncloseTag = false)\n\t{\n\t\t$markdown = str_replace(\"\\n\", \"\", \\Michelf\\Markdown::defaultTransform($text));\n\n if ($withEncloseTag) {\n return '<div class=\"markdown\">'.$markdown.'</div>';\n } else {\n return $markdown;\n }\n\t}", "title": "" }, { "docid": "ec273d614a7855a193483c79c6c3c038", "score": "0.5776634", "text": "function markdown_file_render($markdown_filename){\n\n // ensure file exists\n if (is_file($markdown_filename)){\n // using it as-is, no big deal\n } else if (path_xdrive_to_local($markdown_filename)){\n $markdown_filename = path_xdrive_to_local($markdown_filename);\n } else {\n error_box(\"<b>FILE DOES NOT EXIST:</b><br><code>$markdown_filename</code>\");\n return;\n }\n\n // ensure file is not empty\n if (filesize($markdown_filename)==0){\n error_box(\"<b>FILE IS EMPTY:</b><br><code>$markdown_filename</code>\");\n return;\n }\n\n // provide an anchor for this file\n $anchorName = basename($markdown_filename);\n $anchorName = explode('.',$anchorName)[0];\n echo \"<a name='$anchorName'></a>\";\n\n // render and echo the file\n include_once('Parsedown.php');\n $Parsedown = new Parsedown();\n $f = fopen($markdown_filename, \"r\");\n $raw = fread($f,filesize($markdown_filename));\n fclose($f);\n $html = $Parsedown->text($raw);\n echo $html;\n\n // add a button to edit the file\n $markdown_filename = path_clean($markdown_filename);\n $url=path_to_url($markdown_filename);\n echo \"<div align='right' style='font-size: 80%; color: #CCC; padding-right: 10px;'>\";\n echo \"<a href='$url' style='color: #CCC;'>$markdown_filename</a>\";\n echo \"</div>\";\n //echo \"<a href='$url' style='color: #CCC'>edit $url</a></div>\";\n //echo \"<i>Edit this text block: $markdown_filename</i></div>\";\n}", "title": "" }, { "docid": "1a61ca2d5e2b6cc0fb2d906f2d104d0f", "score": "0.5717291", "text": "public function toHTML($text)\n {\n return \\Parsedown::instance()->text($text);\n }", "title": "" }, { "docid": "3a281e035ee07eb3be33d15f64c2f1f0", "score": "0.57137907", "text": "function markdown_echappe_liens($texte){\n\t//[blabla](http://...) et ![babla](http://...)\n\tif (strpos($texte,\"](\")!==false){\n\t\tpreg_match_all(\",([!]?\\[[^]]*\\])(\\([^)]*\\)),Uims\",$texte,$matches,PREG_SET_ORDER);\n\t\tforeach($matches as $match){\n\t\t\t#var_dump($match);\n\t\t\t$p = strpos($texte,$match[0]);\n\t\t\t$pre = $match[1];\n\t\t\tif (strncmp($pre,\"!\",1)==0){\n\t\t\t\t$pre = code_echappement(\"!\", 'md', true).substr($pre,1);\n\t\t\t}\n\t\t\t$texte = substr_replace($texte,$pre.code_echappement($match[2], 'md', true),$p,strlen($match[0]));\n\t\t}\n\t}\n\t// [blabla]: http://....\n\tif (strpos($texte,\"[\")!==false){\n\t\tpreg_match_all(\",^(\\s*\\[[^]]*\\])(:[ \\t]+[^\\s]*(\\s+(\\\".*\\\"|'.*'|\\(.*\\)))?)\\s*$,Uims\",$texte,$matches,PREG_SET_ORDER);\n\t\tforeach($matches as $match){\n\t\t\t#var_dump($match);\n\t\t\t$p = strpos($texte,$match[0])+strlen($match[1]);\n\t\t\t$texte = substr_replace($texte,code_echappement($match[2], 'md', true),$p,strlen($match[2]));\n\t\t}\n\t}\n\t// ![Markdown Logo][image]\n\tif (strpos($texte,\"![\")!==false){\n\t\tpreg_match_all(\",^(!\\[[^]]*\\])(\\[[^]]*\\])$,Uims\",$texte,$matches,PREG_SET_ORDER);\n\t\tforeach($matches as $match){\n\t\t\t#var_dump($match);\n\t\t\t$p = strpos($texte,$match[0]);\n\t\t\t$texte = substr_replace($texte,code_echappement(\"!\", 'md', true),$p,1);\n\t\t}\n\t}\n\t// <http://...>\n\t$texte = echappe_html($texte,'md',true,',' . '<https?://[^<]*>'.',UimsS');\n\n\treturn $texte;\n}", "title": "" }, { "docid": "0fb1e8ee7b81a90748871401dbea3381", "score": "0.56978273", "text": "function acf_parse_markdown($text = '')\n{\n}", "title": "" }, { "docid": "70a924788d4484ebfb5e2b639c8a9be1", "score": "0.5690186", "text": "function traiter_echap_md_dist($regs){\n\t// echapons le code dans le markdown\n\t$texte = markdown_echappe_code($regs[3]);\n\t$texte = markdown_echappe_liens($texte);\n\t$texte = markdown_echappe_del($texte);\n\treturn \"<md\".$regs[2].\">$texte</md>\";\n}", "title": "" }, { "docid": "78350e58c91eb656b659a5badf78df87", "score": "0.5670835", "text": "public function parse($markdown)\n\t{\n\t\t// Reset some variables\n\t\t$this->hashTable = array();\n\t\t$this->references = array();\n\n\t\t$markdown = $this->convertToUnix($markdown);\n\t\t$markdown = $this->hashifyBlocks($markdown);\n\t\t$markdown = $this->stripReferences($markdown);\n\n\t\t$markdown = $this->encodeEscape($markdown);\n\t\t$markdown = $this->replaceBlock($markdown);\n\n\t\treturn $markdown;\n\t}", "title": "" }, { "docid": "3b3d41c44f36b237ab6d28d4c0d4cfbc", "score": "0.5660006", "text": "function ciniki_systemdocs_processMarkdown($ciniki, $content) {\n\n //\n // Escape any existing html\n //\n $content = htmlspecialchars($content);\n\n //\n // Break into lines\n //\n $lines = explode(\"\\n\", $content);\n\n //\n // Check for lists\n //\n $prev_line = '';\n $list_level = 0;\n $list_type = '';\n $paragraph = 0;\n $pre = 0;\n foreach($lines as $lnum => $line) {\n/*\n //\n // Check for subtitles\n //\n if( preg_match('/^\\s*\\#\\#\\s+(.*)$/', $line, $matches) ) {\n $lines[$lnum] = '<h3>' . $matches[1] . '</h3>';\n } \n // Check for list item\n // or for hex number or number unordered list\n // 1 - The first number\n else*/\n if( $pre == 0 && preg_match('/^\\s*[+-]\\s*(.*)$/', $line, $matches) ) {\n if( $list_level == 0 ) {\n if( $paragraph > 0 ) {\n $lines[$lnum-1] .= \"</p>\";\n $paragraph = 0;\n }\n $lines[$lnum] = \"<ul>\\n\" . '<li>' . $matches[1];\n $list_level++;\n $list_type = 'ul';\n } else {\n $lines[$lnum] = '<li>' . $matches[1];\n }\n }\n elseif( $pre == 0 && preg_match('/^\\s*[0-9]\\.\\s+(.*)$/', $line, $matches) ) {\n if( $list_level == 0 ) {\n if( $paragraph > 0 ) {\n $lines[$lnum-1] .= \"</p>\";\n $paragraph = 0;\n }\n $lines[$lnum] = \"<ol>\\n\" . '<li>' . $matches[1];\n $list_level++;\n $list_type = 'ol';\n } else {\n $lines[$lnum] = '<li>' . $matches[1];\n }\n }\n // 0x01 - The first flag\n elseif( $pre == 0 && preg_match('/^\\s*((0x[0-9]+|[0-9]+)\\s*-\\s*(.*))$/', $line, $matches) ) {\n if( $list_level == 0 ) {\n if( $paragraph > 0 ) {\n $lines[$lnum-1] .= \"</p>\";\n $paragraph = 0;\n }\n $lines[$lnum] = \"<dl>\\n\" . '<dt>' . $matches[2] . '</dt><dd>' . $matches[3];\n $list_level++;\n $list_type = 'dl';\n } else {\n $lines[$lnum] = '</dd><dt>' . $matches[2] . '</dt><dd>' . $matches[3];\n }\n }\n // Definition lists\n // Label text :: The first item in the list\n elseif( $pre == 0 && preg_match('/^\\s*((.*)\\s::\\s(.*))$/', $line, $matches) ) {\n if( $list_level == 0 ) {\n if( $paragraph > 0 ) {\n $lines[$lnum-1] .= \"</p>\";\n $paragraph = 0;\n }\n $lines[$lnum] = \"<dl>\\n\" . '<dt>' . $matches[2] . '</dt><dd>' . $matches[3];\n $list_level++;\n $list_type = 'dl';\n } else {\n $lines[$lnum] = '</dd><dt>' . $matches[2] . '</dt><dd>' . $matches[3];\n }\n }\n // Check for tables\n // Check for text line\n elseif( $pre == 0 && preg_match('/^\\s*((.*)\\s\\|\\s\\s*(.*))$/', $line, $matches) ) {\n if( $list_level == 0 ) {\n if( $paragraph > 0 ) {\n $lines[$lnum-1] .= \"</p>\";\n $paragraph = 0;\n }\n $lines[$lnum] = '<table><tr><td>' . $matches[2] . '</td><td>' . $matches[3];\n $list_level++;\n $list_type = 'table';\n } else {\n $lines[$lnum] = '</td></tr><tr><td>' . $matches[2] . '</td><td>' . $matches[3];\n }\n }\n elseif( preg_match('/^```/', $line, $matches) ) {\n if( $paragraph == 1 ) {\n $lines[$lnum-1] .= '</p>';\n $paragraph = 0;\n }\n if( $pre == 1 ) {\n $lines[$lnum] = '</pre>';\n $pre = 0;\n } else {\n $lines[$lnum] = '<pre>';\n $pre = 1;\n }\n }\n //\n // Check for **test**<space><space><newline>text\n //\n elseif( $paragraph == 0 && $list_level == 0 && preg_match('/^\\s*\\*\\*(.*)\\*\\*\\s*$/', $line, $matches) && isset($lines[$lnum+1]) && preg_match('/[a-zA-Z0-9]/', $lines[$lnum+1])) {\n $lines[$lnum] = '<p><strong>' . $matches[1] . '</strong><br/>';\n $paragraph = 1;\n }\n // Check for blank line, end of list\n elseif( $list_level > 0 && preg_match('/^\\s*$/', $line) ) {\n if( $list_type == 'dl' ) {\n $lines[$lnum] = '</dd></dl>';\n } elseif( $list_type == 'table' ) {\n $lines[$lnum] = '</td></tr></table>';\n } else {\n $lines[$lnum] = '</ul>';\n }\n $list_level = 0;\n }\n // Check for blank line, end of paragraph\n elseif( $paragraph > 0 && preg_match('/^\\s*$/', $line) ) {\n $lines[$lnum] = '</p>';\n $paragraph = 0;\n }\n // Check if text line and paragraph should start\n elseif( $pre == 0 && $paragraph == 0 && $list_level == 0 && preg_match('/[a-zA-Z0-9]/', $line) ) {\n $lines[$lnum] = '<p>' . $line;\n $paragraph = 1;\n }\n\n //\n // Check for emphasis\n // *em*, or **strong**\n //\n if( $pre == 0 ) {\n $lines[$lnum] = preg_replace('/\\*\\*([^\\*]+)\\*\\*/', '<strong>$1</strong>', $lines[$lnum]);\n $lines[$lnum] = preg_replace('/\\*([^\\*]+)\\*/', '<em>$1</em>', $lines[$lnum]);\n }\n }\n if( $list_level > 0 ) {\n if( $list_type == 'dl' ) {\n $lines[$lnum+1] = '</dd></dl>';\n } elseif( $list_type == 'table' ) {\n $lines[$lnum+1] = '</td></tr></table>';\n } else {\n $lines[$lnum+1] = '</ul>';\n }\n }\n elseif( $paragraph > 0 ) {\n $lines[$lnum+1] = '</p>';\n }\n\n $html_content = implode(\"\\n\", $lines);\n \n //\n // Check for URL's\n //\n // URL's with a title\n $html_content = preg_replace('/\\[([^\\]]+)\\]\\((http[^\\)]+)\\)/', '<a target=\"_blank\" href=\"$2\">$1</a>', $html_content);\n // URL's without a title\n $html_content = preg_replace('/([^\\\"])(http[^ ]+)/', '$1<a target=\"_blank\" href=\"$2\">$2</a>', $html_content);\n\n return array('stat'=>'ok', 'html_content'=>$html_content);\n}", "title": "" }, { "docid": "04e8d416e0e409feb6871a45f492b64f", "score": "0.5650402", "text": "function div($text, $options = array()) {\n\t\treturn $this->Html->div(null, $text, $options).\"\\n\";\n\t}", "title": "" }, { "docid": "322889abed87b3ba340eb115fb25c061", "score": "0.56480086", "text": "public function parseMarkdown($content)\n {\n return $this->markdownEngine->transform($content);\n }", "title": "" }, { "docid": "6dab842bb564b9cfdd014e37fb1f77ae", "score": "0.5635147", "text": "public function appendMarkdownFile(string $path): Div {\n $slide = new Div();\n $slide->appendMarkdownFile($path);\n $this->append($slide);\n return $slide;\n }", "title": "" }, { "docid": "4879e5f6224248e9ceb5e92a41a154d0", "score": "0.5572756", "text": "function html_wikir_render($str)\n{\n $regexps = array();\n $replacements = array();\n $refs = wikir_pages_references($str);\n foreach($refs as $ref)\n {\n $regexps[] = '/\\[\\['.preg_quote($ref).'\\]\\]/';\n \n $link = '<a href=\"';\n $link .= url_for($ref);\n $link .= '\">';\n $link .= h(str_replace('_', '\\_', $ref));\n $link .= '</a>';\n if(!WikirPage::exists($ref)) $link .= '<sup>(?)</sup>';\n $replacements[] = $link;\n }\n return Markdown(preg_replace($regexps, $replacements, $str));\n}", "title": "" }, { "docid": "691fcff7c3ca9309418021713c086696", "score": "0.5566057", "text": "private static function replaceParagraphsForMarkdown(string $text): string\n {\n // Any text inside a <p>\n $regex = '/<p\\b[^>]*>((?:\\s|\\S)*?)<\\/p>\\s*/m';\n\n // Adds two break lines\n $substitution = \"$1\\n\\n\";\n\n return preg_replace($regex, $substitution, $text);\n }", "title": "" }, { "docid": "359314c051cb5611346f72518ec1a9cc", "score": "0.5532613", "text": "public function appendMd(string $md): Div {\n $slide = new Div();\n $slide->appendMarkdown($md);\n $this->append($slide);\n return $slide;\n }", "title": "" }, { "docid": "b44ebeee717d6b154fe475a6f4eed5d5", "score": "0.55322844", "text": "public function parseString($textInput) {\n\t\t\treturn Markdown($textInput);\n\t\t}", "title": "" }, { "docid": "b3c8a094eb78e6ae95426528dac9f813", "score": "0.55280805", "text": "function htmlout($text)\n{\n\techo html($text);\n}", "title": "" }, { "docid": "36c663a2a387ed4cd175d6e1527b631c", "score": "0.5523729", "text": "public static function getHTMLContent($text) {\r\n \r\n \r\n \r\n if(strpos($text,'<div id=\"content\">') !== false && strstr($text, '<div id=\"content\">', true) == \"\") {\r\n //the div element with id=content is the first element so I remove it\r\n $text = substr($text, strlen('<div id=\"content\">'));\r\n $text = trim(substr($text, 0, strlen($text)-strlen('</div>')));\r\n }\r\n \r\n return $text;\r\n\t}", "title": "" }, { "docid": "3ad9d53e128953cee62c0b5766707f3e", "score": "0.55200356", "text": "private function wrapHtml($content): string\n {\n return <<<HTML\n<html>\n <head>\n <style>\n body {color: #545454; font:14px/22px ''; margin: 20px;}\n div.message {margin-bottom: 10px; padding: 6px 12px;}\n div.step {display: flex;}\n span.index {display: block; flex: 0 0 20px; padding: 6px 12px;}\n span.detail {display: block; flex: 0 1 auto; padding: 6px 12px;}\n span.execution {color: #B71C1C; display: block;}\n span.argument {color: #545454;}\n span.position {display: block; font-size: 12px;}\n span.file {color: #F57F17;}\n </style>\n </head>\n <body>\n $content\n </body>\n</html>\nHTML;\n }", "title": "" }, { "docid": "0eebe44ffac15055deba758f7e88bee7", "score": "0.55164605", "text": "public static function convertMarkdowntoRst(&$content)\n {\n // Header\n $content = preg_replace_callback('/(\\n|^)##\\s(.*)/', function($matches)\n {\n return \"\\n\".$matches[2].\"\\n\".str_repeat('~', strlen($matches[2]));\n },$content);\n\n $content = preg_replace_callback('/(\\n|^)###\\s(.*)/', function($matches)\n {\n return \"\\n\".$matches[2].\"\\n\".str_repeat('^', strlen($matches[2]));\n },$content);\n\n // inline code\n $content = preg_replace_callback('/[^\\S\\n]`([^`]+)`[^\\S\\n]/', function($matches)\n {\n return ' ``'.$matches[1].'`` ';\n },$content);\n\n // code block\n $content = preg_replace_callback('/```(\\w+)([^`]+)```/', function($matches)\n {\n return '.. code-block:: '.$matches[1].\"\\n\".self::indent($matches[2], 4);\n },$content);\n\n // Link\n $content = preg_replace_callback('/\\[([^\\]]+)]\\(([^\\)]+)\\)/', function($matches)\n {\n return '`'.$matches[1].' <'.$matches[2].'>`_ ';\n },$content);\n\n // ul-list\n $content = preg_replace_callback('/\\n\\*\\s(.*)/', function($matches)\n {\n return \"\\n- \".$matches[1];\n },$content);\n\n return $content;\n\n }", "title": "" }, { "docid": "9debddc55b1628c71e9a83dfbc999694", "score": "0.55070007", "text": "private function makeHTML($path) {\n $output = shell_exec(\"sudo /var/www/sphinx/./myMake.sh \" . $path . \" html\");\n //$output = shell_exec(\"sudo sphinx-build -b html $path/source/ $path/build/html\");\n //dd($output);\n $this->addNewNews(0, 0, 3, \"Erstellt HTML\");\n }", "title": "" }, { "docid": "87a0b0a967012eda1a1d3b1fd4828f6a", "score": "0.5504282", "text": "private function html($text) {\r\n return $text;\r\n }", "title": "" }, { "docid": "09fccc945130feb831e6e1dec81c83ee", "score": "0.54679376", "text": "public function getContentAsMarkdown($filter = [\"markdown\"])\n {\n $filter = is_array($filter) ? $filter : [$filter];\n $textFilter = new TextFilter();\n return $textFilter->parse($this->content, $filter)->text;\n }", "title": "" }, { "docid": "71de16397321c1fc8ffa9d3fed7e8c23", "score": "0.54644585", "text": "function markdown_pre_typo($texte){\n\treturn $texte;\n}", "title": "" }, { "docid": "851ad76c4e76048e2069cb841dc091d9", "score": "0.5419617", "text": "private function processMarkdownContent($content, $config)\n {\n // Find all occurrences of GOOGLEMAP in content\n // ~ marks the start and end of the pattern, i is an option for caseless matching\n // The pattern to match is\n // - [GOOGLEMAPS:\n // - some identification (called tagid in the documentation and source)\n static $regex = '~\\[(GOOGLEMAPS)\\:(?P<tagid>[^\\:\\]]*)\\]~i';\n\n $matches = false;\n if (\\preg_match_all($regex, $content, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {\n if ($config->get('enabled', true)) {\n // Found markers to replace; add necessary css and javascript to the document\n $this->addAssets($config);\n // Replace individual markers with html\n $content = $this->replaceMarkers($config, $regex, $matches, $content);\n } else {\n // note this causes havoc if another modular contains a googlemap\n $this->assetData = []; // Discard individual markers\n $content = $this->discardMarkers($regex, $matches, $content);\n }\n }\n\n return $content;\n }", "title": "" }, { "docid": "86d4db87a633199e32337e6c3dd52510", "score": "0.5403892", "text": "function formatText (\n\t$text,\t\t//the text to process into HTML\n\t$permalink='',\t//optional full URL to the thread this text will be a part of, used to make title links permanent\n\t$post_id='',\t//optional HTML ID of the post that this text will form, used for title self-links\n\t$rss=NULL\t//optional simpleXML object of the whole thread, to link to other user's posts\n) {\n\t//unify carriage returns between Windows / UNIX, and sanitise HTML against injection\n\t$text = safeHTML (preg_replace ('/\\r\\n?/', \"\\n\", $text));\n\t\n\t//these arrays will hold any portions of text that have to be temporarily removed to avoid interference with the\n\t//markup processing, i.e code spans / blocks\n\t$pre = array (); $code = array ();\n\t\n\t/* preformatted text (code blocks):\n\t -------------------------------------------------------------------------------------------------------------- */\n\t/* example:\t\t\tor: (latex in partiular since it uses % as a comment marker)\n\t\n\t\t% title \t\t$ title\n\t\t⋮\t\t\t⋮\n\t\t%\t\t\t$\n\t*/\n\twhile (preg_match ('/^(?-s:(\\h*)([%$])(.*?))\\n(.*?)\\n\\h*\\2([\"”»]?)$/msu', $text, $m, PREG_OFFSET_CAPTURE)) {\n\t\t//format the code block\n\t\t$pre[] = \"<pre><span class=\\\"ct\\\">{$m[2][0]}{$m[3][0]}</span>\\n\"\n\t\t\t //unindent code blocks that have been quoted\n\t\t .(strlen ($m[1][0]) ? preg_replace (\"/^\\s{1,\".strlen ($m[1][0]).\"}/m\", '', $m[4][0]) : $m[4][0])\n\t\t .\"\\n<span class=\\\"cb\\\">{$m[2][0]}</span></pre>\"\n\t\t;\n\t\t//replace the code block with a placeholder:\n\t\t//(we will have to remove the code chunks from the source text to avoid the other markup processing from\n\t\t//munging it and then restore the chunks back later)\n\t\t$text = substr_replace ($text, \"\\n&PRE_\".(count ($pre)-1).\";\\n\".$m[5][0], $m[0][1], strlen ($m[0][0]));\n\t}\n\t\n\t/* inline code / teletype text:\n\t -------------------------------------------------------------------------------------------------------------- */\n\t// example: `code` or ``code``\n\twhile (preg_match ('/(?<=[\\s\\p{Z}\\p{P}]|^)(`+)(.*?)(?<!`)\\1(?!`)/m', $text, $m, PREG_OFFSET_CAPTURE)) {\n\t\t//format the code block\n\t\t$code[] = '<code>'.$m[1][0].$m[2][0].$m[1][0].'</code>';\n\t\t//same as with normal code blocks, replace them with a placeholder\n\t\t$text = substr_replace ($text, '&CODE_'.(count ($code)-1).';', $m[0][1], strlen ($m[0][0]));\n\t}\n\t\n\t/* hyperlinks:\n\t -------------------------------------------------------------------------------------------------------------- */\n\t//find full URLs and turn into HTML hyperlinks. we also detect e-mail addresses automatically\n\twhile (preg_match (\n\t\t'/(?:\n\t\t\t((?:(?:http|ftp)s?|irc)?:\\/\\/)\t\t\t# $1 = protocol\n\t\t|\t([a-z0-9\\._%+\\-]+@)\t\t\t\t# $2 = email name\n\t\t)(\t\t\t\t\t\t\t# $3 = friendly URL (no protocol)\n\t\t\t[-\\.\\p{L}\\p{M}\\p{N}]+\t\t\t\t# domain (letters, diacritics, numbers & dash only)\n\t\t\t(?:\\.[\\p{L}\\p{M}\\p{N}]+)+\t\t\t# TLDs (also letters, diacritics & numbers only)\n\t\t)(?(2)|\t\t\t\t\t\t\t# email ends here\n\t\t\t(\\/)?\t\t\t\t\t\t# $4 = slash is excluded from friendly URL\n\t\t\t(?(4)(\t\t\t\t\t\t# $5 = folders and filename, relative URL\n\t\t\t\t(?>\t\t\t\t\t# folders and filename\n\t\t\t\t\t\"(?!\\/?&gt;|\\s|$)|\t\t# ignore the end of an HTML hyperlink\n\t\t\t\t\t\\)(?![:\\.,\"”»]?(?:\\s|$))|\t# ignore brackets on end with punctuation\n\t\t\t\t\t[:\\.,”»](?!\\s|$)|\t\t# ignore various characters on the end\n\t\t\t\t\t[^\\s:)\\.,\"”»]\t\t\t# the rest, including bookmark\n\t\t\t\t)*\n\t\t\t)?)\n\t\t)/xiu',\n\t\t//capture the starting point of the match, so that `$m[x][0]` is the text and $m[x][1] is the offset\n\t\t$text, $m, PREG_OFFSET_CAPTURE,\n\t\t//use an offset to search from so we don’t get stuck in an infinite loop\n\t\t//(this isn’t valid the first time around obviously so gives 0)\n\t\t@($m[0][1] + strlen ($replace))\n\t\t\n\t//replace the URL in the source text with a hyperlinked version:\n\t//(we record the HTML in `$replace` so that we can skip forward that much for the next search iteration)\n\t)) $text = substr_replace ($text, $replace =\n\t\t'<a href=\"'.($p=(@$m[2][0] ? 'mailto:'.$m[2][0] //is this an e-mail address?\n\t\t : ($m[1][0] ? $m[1][0] : 'http://'))) //has a protocol been given?\n\t\t\t//rest of the URL [domain . slash . everything-else]\n\t\t\t//(encode double-quotes without double-encoding existing ampersands; this is the PHP5.2.3 req.)\n\t\t\t.htmlspecialchars ($m[3][0].@$m[4][0].@$m[5][0], ENT_COMPAT, 'UTF-8', false).'\"'\n\t\t\t//is the URL external? if so add the rel attributes\n\t\t\t.($p.$m[3][0] !== FORUM_URL ? ' rel=\"nofollow external\"' : '')\n\t\t.'>'\t//the link-text\n\t\t\t.$m[0][0]\n\t\t.'</a>',\n\t\t//where to substitute\n\t\t$m[0][1], strlen ($m[0][0])\n\t);\n\t\n\t/* inline formatting:\n\t -------------------------------------------------------------------------------------------------------------- */\n\t$text = preg_replace (\n\t\t//example: _italic_ & *bold*\n\t\tarray ('/(?<=\\s|^)_(?!_)(.*?)(?<!_)_(?=\\s|$)/m',\t'/(?<![*\\w])\\*(?!\\*)(.*?)(?<!\\*)\\*(?![*\\w])/'),\n\t\tarray ('<em>_$1_</em>',\t\t\t\t\t'<strong>*$1*</strong>'),\n\t$text);\n\t\n\t/* divider: \"---\"\n\t -------------------------------------------------------------------------------------------------------------- */\n\t$text = preg_replace (\n\t\t'/(?:\\n|\\A)\\h*(---+)\\h*(?:\\n?$|\\Z)/m',\t\t\t\"\\n\\n<p class=\\\"hr\\\">$1</p>\\n\",\n\t$text);\n\t\n\t/* blockquotes:\n\t -------------------------------------------------------------------------------------------------------------- */\n\t/* example:\n\t\n\t\t“this is the first quote level.\n\t\t\n\t\t“this is the second quote level.”\n\t\t\n\t\tback to the first quote level.”\n\t*/\n\tdo $text = preg_replace (array (\n\t\t//you would think that you could combine these. you really would\n\t\t'/(?:\\n|\\A)\\h*(\"(?!\\s+)((?>(?1)|.)*?)\\s*\")\\h*(?:\\n?$|\\Z)/msu',\n\t\t'/(?:\\n|\\A)\\h*(“(?!\\s+)((?>(?1)|.)*?)\\s*”)\\h*(?:\\n?$|\\Z)/msu',\n\t\t'/(?:\\n|\\A)\\h*(«(?!\\s+)((?>(?1)|.)*?)\\s*»)\\h*(?:\\n?$|\\Z)/msu'\n\t),\t//extra quote marks are inserted in the spans for both themeing, and so that when you copy a quote, the\n\t\t//nesting is preserved for you. there must be a line break between spans and the text otherwise it prevents\n\t\t//the regex from finding quote marks at the ends of lines (these extra linebreaks are removed next)\n\t\t\"\\n\\n<blockquote>\\n\\n\".\n\t\t\t\"<span class=\\\"ql\\\">&ldquo;</span>\\n$2\\n<span class=\\\"qr\\\">&rdquo;</span>\\n\\n\".\n\t\t\"</blockquote>\\n\",\n\t\t$text, -1, $c\n\t); while ($c);\n\t\n\t//remove the extra linebreaks addeded between our theme quotes\n\t//(required so that extra `<br />`s don’t get added!)\n\t$text = preg_replace (\n\t\tarray ('/&ldquo;<\\/span>\\n(?!\\n)/',\t'/\\n<span class=\"qr\">/'),\n\t\tarray ('&ldquo;</span>',\t\t'<span class=\"qr\">'),\n\t$text);\n\t\n\t/* name references:\n\t -------------------------------------------------------------------------------------------------------------- */\n\t//name references (e.g. \"@bob\") will link back to the last reply in the thread made by that person.\n\t//this requires that the whole RSS thread is passed to this function to refer to\n\tif (!is_null ($rss)) {\n\t\t//first, produce a list of all authors in the thread\n\t\t$names = array ();\n\t\tforeach ($rss->channel->xpath ('./item/author') as $name) $names[] = $name[0];\n\t\t$names = array_unique ($names);\t\t\t//remove duplicates\n\t\t$names = array_map ('strtolower', $names);\t//set all to lowercase\n\t\t$names = array_map ('safeHTML', $names);\t//HTML encode names as they will be in the source text\n\t\t//sort the list of names Z-A so that longer names and names with spaces occur first,\n\t\t//this is so that we don’t choose \"Bob\" over \"Bob Monkhouse\" when matching names\n\t\trsort ($names);\n\t\t\n\t\t//find all possible name references in the text:\n\t\t//(that is, any \"@\" followed by text up to the end of a line. note that this means that what might be\n\t\t//matched may include additional text that *isn't* part of the name, e.g. \"@bob How are you?\")\n\t\t$offset = 0; while (preg_match ('/(?:^|\\s+)(@.+)/m', $text, $m, PREG_OFFSET_CAPTURE, $offset)) {\n\t\t\t//check each of the known names in the thread and see if one fits the source text reference\n\t\t\t//e.g. does \"@bob How are you?\" begin with \"bob\"\n\t\t\tforeach ($names as $name) if (stripos ($m[1][0], $name) === 1)\n\t\t\t\t//locate the last post made by that author in the thread to link to\n\t\t\t\tforeach ($rss->channel->item as $item) if (safeHTML (strtolower ($item->author)) == $name)\n\t\t\t{\t//replace the reference with the link to the post\n\t\t\t\t$text = substr_replace ($text,\n\t\t\t\t\t//TODO: `safeHTML` isn't quote safe\n\t\t\t\t\t'<a href=\"'.safeHTML ($item->link).'\"'.(isMod ($name) ? ' class=\"nnf_mod\"' : '').'>'\n\t\t\t\t\t\t.substr ($m[1][0], 0, strlen ($name)+1).\n\t\t\t\t\t'</a>',\n\t\t\t\t\t$m[1][1], strlen ($name)+1\n\t\t\t\t);\n\t\t\t\t//move on to the next reference, no need to check any further names for this one\n\t\t\t\t$offset = $m[1][1] + strlen ($name) + strlen ($item->link) + 15 + 1;\n\t\t\t\tbreak 2;\n\t\t\t}\n\t\t\t\n\t\t\t//failing any match, continue searching\n\t\t\t//(avoid getting stuck in an infinite loop)\n\t\t\t$offset = $m[1][1] + 1;\n\t\t};\n\t}\n\t\n\t/* titles\n\t -------------------------------------------------------------------------------------------------------------- */\n\t//example: :: title\n\t$replace = ''; $titles=array (); while (preg_match (\n\t\t'/(?:\\n|\\A)(::.*)(?:\\n?$|\\Z)/mu',\n\t\t//capture the starting point of the match, so that `$m[x][0]` is the text and $m[x][1] is the offset\n\t\t$text, $m, PREG_OFFSET_CAPTURE,\n\t\t//use an offset to search from so we don’t get stuck in an infinite loop\n\t\t//(this isn’t valid the first time around obviously so gives 0)\n\t\t@($m[0][1] + strlen ($replace))\n\t)) {\n\t\t//generate a unique HTML ID for the title:\n\t\t//flatten the title text into a URL-safe string of [a-z0-9_]\n\t\t$translit = safeTransliterate (strip_tags ($m[1][0]));\n\t\t//if a title already exsits with that ID, append a number until an available ID is found.\n\t\t$c = 0; do $id = $translit.($c++ ? '_'.($c-1) : ''); while (in_array ($id, $titles));\n\t\t//add the current ID to the list of used IDs\n\t\t$titles[] = $id;\n\t\t//remove hyperlinks in the title (since the title will be a hyperlink too)\n\t\t//if a user-link is present, keep the mod class if present\n\t\t$m[1][0] = preg_replace ('/<a href=\"[^\"]+\"( class=\"nnf_mod\")?>(.*?)<\\/a>/', \"<b$1>$2</b>\", $m[1][0]);\n\t\t//create the replacement HTML, including an anchor link\n\t\t$text = substr_replace ($text, $replace =\n\t\t\t//(note: code spans in titles don't transliterate since they've been replaced with placeholders)\n\t\t\t\"\\n\\n<h2 id=\\\"$post_id::$id\\\">\".\n\t\t\t\t//TODO: `safeHTML` isn't quote-safe\n\t\t\t\t\"<a href=\\\"\".safeHTML ($permalink).\"#$post_id::$id\\\">\".$m[1][0].\"</a>\".\n\t\t\t\"</h2>\\n\",\n\t\t\t//where to substitute\n\t\t\t$m[0][1], strlen ($m[0][0])\n\t\t);\n\t}\n\t\n\t/* finalise:\n\t -------------------------------------------------------------------------------------------------------------- */\n\t//add paragraph tags between blank lines\n\tforeach (preg_split ('/\\n{2,}/', trim ($text), -1, PREG_SPLIT_NO_EMPTY) as $chunk) {\n\t\t//if not a blockquote, title, hr or pre-block, wrap in a paragraph\n\t\tif (!preg_match ('/^<\\/?(?:bl|h2|p)|^&PRE_/', $chunk))\n\t\t\t$chunk = \"<p>\\n\".str_replace (\"\\n\", \"<br />\\n\", $chunk).\"\\n</p>\"\n\t\t;\n\t\t$text = @$result .= \"\\n$chunk\";\n\t}\n\t\n\t//restore code spans/blocks\n\tforeach ($code as $i => $html) $text = str_replace (\"&CODE_$i;\", $html, $text);\n\tforeach ($pre as $i => $html) $text = str_replace (\"&PRE_$i;\", $html, $text);\n\treturn $text;\n}", "title": "" }, { "docid": "15e9156d1be3b2a5f833a44c48d519d9", "score": "0.540118", "text": "function markdown_echappe_del($texte){\n\tif (strpos($texte,\"~~\")!==false){\n\t\t$texte = echappe_html($texte,'md',true,',~~,Uims');\n\t}\n\n\treturn $texte;\n}", "title": "" }, { "docid": "ffe4b5f849332577f8c65e9d1f567900", "score": "0.5396374", "text": "function markdownify( &$input ){\n return $input;\n }", "title": "" }, { "docid": "bd234dce757d934c992f57dcd0d2bc90", "score": "0.539491", "text": "public function markdown()\n {\n $this->params['parse_mode'] = 'markdown';\n\n return $this;\n }", "title": "" }, { "docid": "3cc3d69d3458d84a38894ac5dcb3ca3c", "score": "0.5385569", "text": "public function process($html);", "title": "" }, { "docid": "210d433b3d506c15510ba30656e33713", "score": "0.53661454", "text": "function markdown_filtre_portions_md($texte,$filtre){\n\tif (strpos($texte,\"<md>\")!==false){\n\t\tpreg_match_all(\",<md>(.*)</md>,Uims\",$texte,$matches,PREG_SET_ORDER);\n\t\tforeach($matches as $m){\n\t\t\t$t = $filtre($m[1]);\n\t\t\t$p = strpos($texte,$m[1]);\n\t\t\t$texte = substr_replace($texte,$t,$p-4,strlen($m[1])+9);\n\t\t}\n\t}\n\treturn $texte;\n}", "title": "" }, { "docid": "d60d6848b25ccde6a5e3e442a7f370c9", "score": "0.53411424", "text": "function html($text) {\n\t\t// Sanitizing html text\n\t\t$text = Sanitize::html($text);\n\t\t// Adding <br />\n\t\t$text = nl2br($text);\n\t\t// Transform http:// into links\n\t\t$text = $this->convertLinks($text);\n\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "f58e900e84c78cba164d113a4e497c95", "score": "0.5324139", "text": "function tidy_get_html(tidy $object) {}", "title": "" }, { "docid": "cb1d83df133765f85861608eddfc5193", "score": "0.5314059", "text": "public abstract function asHTML();", "title": "" }, { "docid": "c7a3863554c2f6d4f782131e2469f4eb", "score": "0.5304438", "text": "public function getHtml(string $text) : string\n {\n $textAsHtml = htmlspecialchars($text, ENT_QUOTES);\n $textWithNewLines = nl2br($textAsHtml);\n\n $tokenized = $this->tokenizer->tokenize($textWithNewLines);\n $html = $this->bbCode->format($tokenized);\n\n return $html;\n }", "title": "" }, { "docid": "a60a2df339b292c287306980ec731786", "score": "0.5283521", "text": "function generate_text_for_html_display($text)\n{\n\t//Replace new\n\t$text = str_replace(\"\\n\", \"<br />\\n\", $text);\n\n\t//BBCode replacement array\n\t$bbcode = array(\n\t\t\"/\\[b\\](.*?)\\[\\/b\\]/is\" => '<span style=\"font-weight:bold;\">$1</span>',\n\t\t\"/\\[u\\](.*?)\\[\\/u\\]/is\" => '<span style=\"text-decoration:underline;\">$1</span>',\n\t\t\"/\\[color\\=(.*?)\\](.*?)\\[\\/color\\]/is\" => '<span style=\"color:$1;\">$2</span>',\n\t\t\"/\\[code\\](.*?)\\[\\/code\\]/is\" => '<pre style=\"padding-left:20px;\">$1</pre>',\n\t);\n\n\t//Replace BBCode\n\t$text = preg_replace(array_keys($bbcode), array_values($bbcode), $text);\n\t$text = preg_replace_callback('#\\[url(=(.*))?\\](.*)\\[/url\\]#iU', function ($ary) { return(validate_url($ary[2], $ary[3])); }, $text);\n\n\treturn $text;\n}", "title": "" }, { "docid": "b822b21bfc82f5d83c6e97b5f1c17acf", "score": "0.5276339", "text": "abstract public function convert_to_html();", "title": "" }, { "docid": "0092680d887abec1daeae49b1d9b023b", "score": "0.5275005", "text": "function drush_html_to_text($html, $allowed_tags = NULL) {\n $replacements = [\n '<hr>' => '------------------------------------------------------------------------------',\n '<li>' => ' * ',\n '<h1>' => '===== ',\n '</h1>' => ' =====',\n '<h2>' => '---- ',\n '</h2>' => ' ----',\n '<h3>' => '::: ',\n '</h3>' => ' :::',\n '<br/>' => \"\\n\",\n ];\n $text = str_replace(array_keys($replacements), array_values($replacements), $html);\n return html_entity_decode(preg_replace('/ *<[^>]*> */', ' ', $text));\n}", "title": "" }, { "docid": "f728be42803efc5e76ee8f4eb1bfba6e", "score": "0.5274623", "text": "public static function markdown($str, $args = null)\r\n {\r\n // Create our markdown parse/conversion regex's\r\n $md = array(\r\n '/\\[([^\\]]++)\\]\\(([^\\)]++)\\)/' => '<a href=\"$2\">$1</a>',\r\n '/\\*\\*([^\\*]++)\\*\\*/' => '<strong>$1</strong>',\r\n '/\\*([^\\*]++)\\*/' => '<em>$1</em>'\r\n );\r\n\r\n // Let's make our arguments more \"magical\"\r\n $args = func_get_args(); // Grab all of our passed args\r\n $str = array_shift($args); // Remove the initial arg from the array (and set the $str to it)\r\n if (isset($args[0]) && is_array($args[0])) {\r\n /**\r\n * If our \"second\" argument (now the first array item is an array)\r\n * just use the array as the arguments and forget the rest\r\n */\r\n $args = $args[0];\r\n }\r\n\r\n // Encode our args so we can insert them into an HTML string\r\n foreach ($args as &$arg) {\r\n $arg = htmlentities($arg, ENT_QUOTES, 'UTF-8');\r\n }\r\n\r\n // Actually do our markdown conversion\r\n return vsprintf(preg_replace(array_keys($md), $md, $str), $args);\r\n }", "title": "" }, { "docid": "e631485320cf616b7e62c55f7c5831f4", "score": "0.52663827", "text": "function markdown_pre_liens($texte){\n\t// si pas de base64 dans le texte, rien a faire\n\tif (strpos($texte,\"base64mdblocs\")!==false) {\n\t\t// il suffit de desechapper les blocs <md> (mais dont on a echappe le code)\n\t\t$texte = echappe_retour($texte,'mdblocs');\n\t}\n\n\t// ici on a le html du code SPIP echappe, mais sans avoir touche au code MD qui est echappe aussi\n\treturn $texte;\n}", "title": "" }, { "docid": "058be342b788c3ff731066f7aa5c5bd6", "score": "0.52562803", "text": "public function renderHtmlContent(string $content)\n {\n $htmlData = '<div data-content-type=\"row\" data-appearance=\"contained\" data-element=\"main\">';\n $htmlData .= '<div data-element=\"inner\">';\n $htmlData .= '<div data-content-type=\"text\" data-appearance=\"default\" data-element=\"main\">';\n $htmlData .= '<p>'.nl2br($content).'</p>';\n $htmlData .= '</div>';\n $htmlData .= '</div>';\n $htmlData .= '</div>';\n\n return $htmlData;\n }", "title": "" }, { "docid": "1dd6d1e20e901a0d840bb6c26bb5d7f5", "score": "0.52273285", "text": "function htmlblock($text) {\n $this->html($text, 'pre');\n }", "title": "" }, { "docid": "a2752eaab45de3d6d19a4b9fbb2d53c4", "score": "0.52083063", "text": "private function bbcode2html($text) {\r\n $search = array(\r\n '/\\[b\\](.*?)\\[\\/b\\]/is',\r\n '/\\[i\\](.*?)\\[\\/i\\]/is',\r\n '/\\[u\\](.*?)\\[\\/u\\]/is',\r\n '/\\[img\\](https?.*?)\\[\\/img\\]/is',\r\n '/\\[url\\](https?.*?)\\[\\/url\\]/is',\r\n '/\\[url=(https?.*?)\\](.*?)\\[\\/url\\]/is'\r\n );\r\n $replace = array(\r\n '<strong>$1</strong>',\r\n '<em>$1</em>',\r\n '<u>$1</u>',\r\n '<img src=\"$1\" />',\r\n '<a href=\"$1\">$1</a>',\r\n '<a href=\"$1\">$2</a>'\r\n );\r\n return preg_replace($search, $replace, $text);\r\n }", "title": "" }, { "docid": "866569c74b072f588a67f6dc4809ea74", "score": "0.520748", "text": "function add_html () {\n //Adds a html block\n return '<div class=\"black\">Lorem ipsum dolor</div>';\n }", "title": "" }, { "docid": "279ff4355da1c87a4428dac7647ba247", "score": "0.51998514", "text": "public static function MarkupToHtml($text, $items = []) {\n $text = $this->cleanup($text);\n \n // Make it html safe\n $text = htmlentities($text, ENT_QUOTES, \"UTF-8\");\n \n // Add a newline after headers\n // so paragraphs work properly. Should figure out regex so it doesn't\n // add an extra \\n if its not needed\n $text = preg_replace('{(^|\\n)([=]+)(.*?)(\\n)}', \"$0\\n\", $text);\n \n // pre formated\n $text = preg_replace_callback(\n '/(^|\\n)([ ][ ][ ][ ])((.|\\n.)+)(?=(\\n\\n|$))/',\n function ($match) {\n $content = $match[0];\n $content = preg_replace_callback(\n '/(^|\\n)(.+?)(?=($|\\n))/',\n function ($match) {\n if (substr($match[0],0,1) == \"\\n\") {\n return \"\\n\" . substr($match[0], 5);\n } else {\n return substr($match[0], 4);\n }\n },\n $content\n );\n return \"\\n<pre>\" . $content . \"\\n</pre>\\n\";\n },\n $text\n );\n \n // Paragraphs\n // Ignore header lines\n $text = preg_replace_callback(\n '/(\\n\\n|^)(?=([^=][^=][^=][^=][^=][^=][^=]))((.|\\n.)+)(?=(\\n\\n|$))/',\n function ($match) {\n $content = trim($match[0]);\n if (strlen($content) > 0) {\n return \"\\n<div class='para'>\\n\" . $content . \"\\n\\n</div>\\n\";\n } else {\n return \"\";\n }\n },\n $text\n );\n\n // Headers\n // This works, but is there a cleaner way to go about it\n $text = preg_replace_callback(\n '/(^|\\n)([=]+)(.*?)(?=(\\n|$))/',\n function ($match) {\n $num = min(intval(strlen($match[2])) + 2, 6);\n return \"\\n<h\" . $num . \">\" . trim($match[3]) . \"</h\" . $num .\">\\n\";\n },\n $text\n );\n \n // Bold\n $text = preg_replace('{(^|\\n|\\s|_|`|[<].*?[>])([*])(.+?)([*])($|\\n|\\s|_|`|[<].*?[>])}', \"$1<strong>$3</strong>$5\", $text);\n \n \n // Italic\n $text = preg_replace('{(^|\\n|\\s|[*]|`|[<].*?[>])([_])(.+?)([_])($|\\n|\\s|[*]|`|[<].*?[>])}', \"$1<em>$3</em>$5\", $text);\n \n // mono\n $text = preg_replace('{(^|\\n|\\s|[*]|_|[<].*?[>])([`])(.+?)([`])($|\\n|\\s|[*]|_|[<].*?[>])}', \"$1<span style='font-family:monospace;'>$3</span>$5\", $text);\n \n // bar\n $text = preg_replace('{(\\n|^)([-]+)(\\n|$)}', \"<hr />\", $text);\n \n // Special Chars\n // Have to use &gt; because everything is already made safe\n $text = preg_replace('{(&lt;--&gt;)}', \"&harr;\", $text);\n $text = preg_replace('{(&lt;--)}', \"&larr;\", $text);\n $text = preg_replace('{(--&gt;)}', \"&rarr;\", $text);\n $text = preg_replace('{(/c/)}', \"&copy;\", $text);\n $text = preg_replace('{(/r/)}', \"&reg;\", $text);\n $text = preg_replace('{(/tm/)}', \"&trade;\", $text);\n $text = preg_replace('{(/pi/)}', \"&Pi;\", $text);\n\n // Block Quote\n $text = preg_replace_callback(\n '/(^|\\n)(\\&gt;)([(](.+?)[)])?((.|\\n.)+)(?=(\\n\\n|$))/',\n function ($match) {\n $content = str_replace(\"&gt;\", \"\", trim($match[5]));\n $content = str_replace(\"\\n\", \"<br />\", $content);\n $attribution = trim($match[4]);\n if ($attribution == \"\") {\n return \"\\n<blockquote>\\n\" . $content . \"\\n</blockquote>\\n\";\n } else {\n return \"\\n<blockquote>\\n\" . $content . \"\\n<span class='attribution'>\" . $attribution . \"</span></blockquote>\\n\";\n }\n },\n $text\n );\n\n // ordered lists\n $text = preg_replace_callback(\n '/(^|\\n)(#)((.|\\n.)+)(?=(\\n\\n|$))/',\n function ($match) {\n $content = trim($match[0]);\n $lastLevel = 1;\n $content = preg_replace_callback(\n '/(^|\\n)([#]+)(\\s?)(.*?)(?=(\\n|$))/',\n function ($match) use (&$lastLevel) {\n $level = intval(strlen(trim($match[2])));\n $ret = \"<li>\" . trim($match[4]) . \"</li>\\n\";\n if ($level > $lastLevel) {\n $ret = \"<ol>\\n\" . $ret;\n } else if ($level < $lastLevel) {\n $ret = \"</ol>\\n\" . $ret;\n }\n $lastLevel = $level;\n return $ret;\n },\n $content\n );\n\n return \"\\n<ol>\\n\" . $content . \"</ol>\\n\";\n },\n $text\n );\n \n // unordered lists\n $text = preg_replace_callback(\n '/(^|\\n)([*])((.|\\n.)+)(?=(\\n\\n|$))/',\n function ($match) {\n $content = trim($match[0]);\n $lastLevel = 1;\n $content = preg_replace_callback(\n '/(^|\\n)([*]+)(\\s?)(.*?)(?=(\\n|$))/',\n function ($match) use (&$lastLevel) {\n $level = intval(strlen(trim($match[2])));\n $ret = \"<li>\" . trim($match[4]) . \"</li>\\n\";\n if ($level > $lastLevel) {\n $ret = \"<ul>\\n\" . $ret;\n } else if ($level < $lastLevel) {\n $ret = \"</ul>\\n\" . $ret;\n }\n $lastLevel = $level;\n return $ret;\n },\n $content\n );\n\n return \"\\n<ul>\\n\" . $content . \"</ul>\\n\";\n },\n $text\n );\n\n // external link\n $text = preg_replace_callback(\n '/(\\[)(.*?)(\\])(\\(((http[s]?)|ftp):\\/\\/)(.*?)(\\))/',\n function ($match) {\n $link = strtolower(str_replace(\" \", \"+\", trim($match[7])));\n $ret = \"<a target='_blank' href='\" . strtolower($match[5]) . \"://\" . $link . \"'>\" . trim($match[2]) . \"</a>\";\n if (strtolower($match[5]) == \"http\") {\n $ret .= \"<img src='/images/link_http.png' class='link' />\";\n } else if (strtolower($match[5]) == \"https\") {\n $ret .= \"<img src='/images/link_https.png' class='link' />\";\n } else if (strtolower($match[5]) == \"ftp\") {\n $ret .= \"<img src='/images/link_ftp.png' class='link' />\";\n }\n return $ret;\n },\n $text\n );\n\n // internal link\n $text = preg_replace_callback(\n '/(\\[)(.*?)(\\])/',\n function ($match) {\n $link = str_replace(\" \", \"+\", trim($match[2]));\n return \"<a href='\" . $link . \"'>\" . trim($match[2]) . \"</a>\";\n },\n $text\n );\n \n \n return \"\\n\" . trim($text) . \"\\n\";\n }", "title": "" }, { "docid": "42994a62442d1c6206489ccb5a6b2972", "score": "0.5182235", "text": "function transform($text, $format = 'Xhtml')\n {\n $this->parse($text);\n return $this->render($format);\n }", "title": "" }, { "docid": "d7cba0a539058c1311f9a8a6b18a7e39", "score": "0.5159721", "text": "public function testDangerousMarkdownFile()\n {\n $markdown = '[some text](javascript:alert(\\'xss\\'))\n\n> hello <a name=\"n\"\n> href=\"javascript:alert(\\'xss\\')\">*you*</a>\n\n{@onclick=alert(\\'hi\\')}some paragraph\n\n[xss](http://\"onmouseover=\"alert(1))';\n // add a file to the depot\n $file = new File;\n $file->setFilespec('//depot/foo/dangereux.md')\n ->open()\n ->setLocalContents($markdown)\n ->submit('change test');\n\n $this->dispatch('/files/depot/foo/dangereux.md');\n\n $result = $this->getResult();\n $this->assertRoute('file');\n $this->assertRouteMatch('files', 'files\\controller\\indexcontroller', 'file');\n $this->assertResponseStatusCode(200);\n $this->assertInstanceOf('Zend\\View\\Model\\ViewModel', $result);\n $this->assertSame('depot/foo/dangereux.md', $result->getVariable('path'));\n $this->assertInstanceOf('P4\\File\\File', $result->getVariable('file'));\n $this->assertQueryContentContains('h1', 'dangereux.md');\n\n // verify markdown\n $this->assertQueryContentContains('div.markdown a', 'some text');\n $this->assertQueryContentContains(\n 'div.markdown',\n 'hello <a name=\"n\"' . \"\\n\" . 'href=\"javascript:alert(\\'xss\\')\">'//<em>'//you</em>'//&lt;/a&gt;'\n );\n $this->assertQueryContentContains('div.markdown', \"{@onclick=alert('hi')}some paragraph\");\n $this->assertNotQuery(\n 'div.markdown a[href=\"\"]',\n 'xss'\n );\n }", "title": "" }, { "docid": "fc47feab2233d7a492d41888f6a3929b", "score": "0.5158793", "text": "static function div($content, $id = Null, $class = Null) \n {\n return '<div ' . self::_id($id).self::_class($class) . '>'\n .self::$_nl.$content.'</div>'.self::$_nl;\n }", "title": "" }, { "docid": "a231be43c39a4a0fe9524f96d039dabb", "score": "0.51543766", "text": "function htmlOut($text) {\n\techo html($text);\n}", "title": "" }, { "docid": "00f5bfb939e8e3235cafd202596eb988", "score": "0.5149206", "text": "public abstract function cleanHTML($content);", "title": "" }, { "docid": "09b1f1636489f03627d343c445c1508b", "score": "0.51435965", "text": "function parse($string) {\n return \\Michelf\\Markdown::defaultTransform($string);\n}", "title": "" }, { "docid": "b07e961ba816d178aefe894d7943c042", "score": "0.5139357", "text": "public function bbcode2html($text)\n {\n $search = [\n '/\\[b\\](.*?)\\[\\/b\\]/is',\n '/\\[i\\](.*?)\\[\\/i\\]/is',\n '/\\[u\\](.*?)\\[\\/u\\]/is',\n '/\\[img\\](https?.*?)\\[\\/img\\]/is',\n '/\\[url\\](https?.*?)\\[\\/url\\]/is',\n '/\\[url=(https?.*?)\\](.*?)\\[\\/url\\]/is'\n ];\n\n $replace = [\n '<strong>$1</strong>',\n '<em>$1</em>',\n '<u>$1</u>',\n '<img src=\"$1\" />',\n '<a href=\"$1\">$1</a>',\n '<a href=\"$1\">$2</a>'\n ];\n\n return preg_replace($search, $replace, $text);\n }", "title": "" }, { "docid": "a5bc8b7ff7b1758c2ecfaf6a08a779a2", "score": "0.5134408", "text": "function transform(){\n\t\tif($this->request->post() && ($d = $this->form->validate($this->params))){\n\t\t\tAtk14Require::Helper(\"modifier.markdown\");\n\t\t\t$content = smarty_modifier_markdown($d[\"source\"]);\n\t\t\tif($d[\"base_href\"]){\n\t\t\t\t$base_href = $d[\"base_href\"];\n\t\t\t\tif(!preg_match('/\\/$/',$base_href)){\n\t\t\t\t\t$base_href .= \"/\";\n\t\t\t\t}\n\t\t\t\t$content = preg_replace_callback('/(<a\\b[^>]*\\bhref=\"|img\\b[^>]*\\bsrc=\")([^\"]*)/',function($matches) use($base_href){\n\t\t\t\t\t$url = $matches[2];\n\t\t\t\t\tif(!preg_match('/^https?:\\/\\//',$url) && !preg_match('/^\\//',$url)){\n\t\t\t\t\t\t$url = preg_replace('/^\\.\\/+/','',$url);\n\t\t\t\t\t\t$url = $base_href.$url;\n\t\t\t\t\t}\n\t\t\t\t\treturn $matches[1].$url.\"\";\n\t\t\t\t},$content);\n\t\t\t}\n\t\t\t$this->_report_success(array(),array(\n\t\t\t\t\"content_type\" => \"text/plain\",\n\t\t\t\t\"raw_data\" => $content,\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "313d85be929d0789d660721cc313edf1", "score": "0.51298946", "text": "protected function output() {\n\t\t$content = $this->option( 'content' );\n\t\t$content_path = $this->option( 'content_path' );\n\t\t$mmarkdown = $this->option( 'markdown' );\n\n\t\tif ( ! empty( $content_path ) && file_exists( $content_path ) ) {\n\t\t\twponion_catch_output();\n\t\t\tinclude $content_path;\n\t\t\t$content = wponion_catch_output( false );\n\t\t} elseif ( ! empty( $content ) && wponion_is_callable( $content ) ) {\n\t\t\twponion_catch_output();\n\t\t\techo wponion_callback( $content );\n\t\t\t$content = wponion_catch_output( false );\n\t\t}\n\n\t\tif ( true === $mmarkdown && ! empty( $content ) ) {\n\t\t\t$content = '<div class=\"wponion-markdown-output\">' . wponion_markdown( $content ) . '</div>';\n\t\t}\n\t\treturn $this->before() . do_shortcode( $content ) . $this->after();\n\t}", "title": "" }, { "docid": "07b3003f3c49563d5803c5ebc886e859", "score": "0.5129863", "text": "public function display( $html )\n\t{\n\t\t$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/text/parser/bbcode.php', 'class_text_parser_bbcode' );\n\t\t$bbcodeParser = new $classToLoad();\n\t\t\n\t\t$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/text/parser/html.php', 'class_text_parser_html' );\n\t\t$htmlParser = new $classToLoad();\n\t\t\n\t\tif ( $this->isBBCode( $html ) )\n\t\t{\n\t\t\t$html = $bbcodeParser->BBCodeToHtml( $html );\n\t\t}\n\n\t\t/* Remove disabled tags */\n\t\tif ( ! self::$Perms['parseHtml'] )\n\t\t{\n\t\t\t$html = $this->removeDisabledTags( $html );\n\t\t}\n\n\t\t/* Parse display tags */\n\t\t$html = $bbcodeParser->toDisplay( $html );\n\t\t\n\t\t/* Finish off HTML display */\n\t\t$html = $htmlParser->toDisplay( $html );\n\t\t\n\t\t/* Emoticons */\n\t\tif ( self::$Perms['parseEmoticons'] )\n\t\t{\n\t\t\t$html = $this->parseEmoticons( $html );\n\t\t}\n\t\t\n\t\t/* Badwords */\n\t\tif ( ! self::$Perms['skipBadWords'] )\n\t\t{\n\t\t\t$html = $this->parseBadWords( $html );\n\t\t}\n\t\n\t\tif ( self::$Perms['parseHtml'] )\n\t\t{\n\t\t\tif ( IPS_APP_COMPONENT != 'forums' && IPS_APP_COMPONENT != 'members' )\n\t\t\t{\n\t\t\t\t/* Allow apps that don't save HTML state HTML editing */\n\t\t\t\t$html = str_replace( \"&#39;\" , \"'\", $html );\n\t\t\t\t$html = str_replace( \"&#33;\" , \"!\", $html );\n\t\t\t\t$html = str_replace( \"&#036;\", \"$\", $html );\n\t\t\t\t$html = str_replace( \"&#124;\", \"|\", $html );\n\t\t\t\t$html = str_replace( \"&amp;\" , \"&\", $html );\n\t\t\t\t$html = str_replace( \"&gt;\"\t , \">\", $html );\n\t\t\t\t$html = str_replace( \"&lt;\"\t , \"<\", $html );\n\t\t\t\t$html = str_replace( \"&#60;\" , \"<\", $html );\n\t\t\t\t$html = str_replace( \"&#62;\" , \">\", $html );\n\t\t\t\t$html = str_replace( \"&quot;\", '\"', $html );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* Fixes an issue with legacy posts */\n\t\t\t\t$html = str_replace( '&quot;', '\"', $html );\n\t\t\t\t$html = str_replace( '&lt;', '<', $html );\n\t\t\t\t$html = str_replace( '&gt;', '>', $html );\n\t\t\t}\n\t\t\t\n\t\t\t/* Legacy posts and object/embed */\n\t\t\tpreg_match_all( '#(codebase|src|href|pluginspage|data|value)=\"<a href=[\"\\']([^\"\\']+?)[\"\\']([^>]+?)?>(.+?)</a>#is', $html, $urlMatches );\n\t\t\t\n\t\t\t/* Finish up URLs and such */\n\t\t\tfor( $i = 0 ; $i < count( $urlMatches[0] ) ; $i++ )\n\t\t\t{\n\t\t\t\t$raw = $urlMatches[0][ $i ];\n\t\t\t\t$attr = $urlMatches[1][ $i ];\n\t\t\t\t$url = $urlMatches[2][ $i ];\n\t\t\t\t$text = $urlMatches[4][ $i ];\n\t\t\t\t\n\t\t\t\t$html = str_replace( $raw, $attr . '=\"' . $url . '\"', $html );\n\t\t\t}\n\t\t\t\n\t\t\t$html = preg_replace( '#<br([^>]+?)?>(\\s+?)?<param#is', \"<param\", $html );\n\t\t\t$html = preg_replace( '#<br([^>]+?)?>(\\s+?)?<embed#is', \"<embed\", $html );\n\t\t\t$html = preg_replace( '#<br([^>]+?)?>(\\s+?)?</object>#is', \"</object>\", $html );\n\t\t\t\n\t\t\t/* Ugh... */\n\t\t\t$html = $this->HtmlAllowedPreContents( $html, 'pre', array( '<', '>' ) );\n\t\t}\n\t\t\n\t\t/* SEO stuffs */\n\t\t$html = $this->_seoAcronymExpansion( $html );\n\t\t\n\t\t/* Little secret codes */\n\t\t$html = str_ireplace( \"(c)\" , \"&copy;\", $html );\n\t\t$html = str_ireplace( \"(tm)\", \"&#153;\", $html );\n\t\t$html = str_ireplace( \"(r)\" , \"&reg;\" , $html );\n\t\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "b4b9176e9876121be345bcf5bf4ebdbe", "score": "0.51181614", "text": "protected function _spanTransform($text)\n {\n $text = $this->_markdown->prepare($text);\n $text = $this->_markdown->processSpans($text);\n $text = $this->_markdown->cleanup($text);\n $text = $this->_markdown->render($text);\n return $text;\n }", "title": "" }, { "docid": "b26bbed6900369481b642b16ee22f10c", "score": "0.5105611", "text": "public function testMarkdownFile()\n {\n $markdown = '# Celerique habitantum\n\n## Pro ubi respondit flammae\n\nLorem markdownum, obscenas ut audacia coeunt pulchro excidit obstitit vulnera!\nMedio est non protinus, *ne* et elige!\n\n computing.redundancy_power_olap(webSymbolic);\n if (internalOfNosql > dpi + agp + desktop(printer_offline)) {\n mbrVlogCircuit(truncate, cd, word_software * burn_on);\n }\n siteMemory(nybble_string, tag_output_vista.lionMacHibernate(5, artificial));\n\nTemporis circum. Non cogit dira cave iubent rursus pleno ritu inferius meus;\nflatuque agmina me. Mira ad vicimus, minus delet, ab tetigisse solet in adiuvet\ndubitas. Suo monuit coniunx ordine germanam.';\n\n // add a file to the depot\n $file = new File;\n $file->setFilespec('//depot/foo/testfile1.md')\n ->open()\n ->setLocalContents($markdown)\n ->submit('change test');\n\n $this->dispatch('/files/depot/foo/testfile1.md');\n\n $result = $this->getResult();\n $this->assertRoute('file');\n $this->assertRouteMatch('files', 'files\\controller\\indexcontroller', 'file');\n $this->assertResponseStatusCode(200);\n $this->assertInstanceOf('Zend\\View\\Model\\ViewModel', $result);\n $this->assertSame('depot/foo/testfile1.md', $result->getVariable('path'));\n $this->assertInstanceOf('P4\\File\\File', $result->getVariable('file'));\n $this->assertQueryContentContains('h1', 'testfile1.md');\n\n // verify markdown\n $this->assertQueryContentContains('h1', 'Celerique habitantum');\n $this->assertQueryContentContains('h2', 'Pro ubi respondit flammae');\n $this->assertQueryContentContains('em', 'ne');\n $this->assertQueryContentContains('pre code', 'computing.redundancy_power_olap(webSymbolic);');\n }", "title": "" }, { "docid": "e77194a99a2da8b283cd564ec8703647", "score": "0.51019174", "text": "public static function txt2html($txt) {\n\n\t//Kills double spaces and spaces inside tags.\n\t// while( !( strpos($txt,' ') === FALSE ) ) $txt = str_replace(' ',' ',$txt);\n if( !( strpos($txt,' ') === FALSE ) ) $txt = str_replace(' ',' ',$txt);\n\n\t$txt = str_replace(' >','>',$txt);\n\t$txt = str_replace('< ','<',$txt);\n\n\t//Transforms accents in html entities.\n\t$txt = utf8_decode($txt);\n\t$txt = htmlentities($txt);\n\n\t//We need some HTML entities back!\n\t$txt = str_replace('&quot;','\"',$txt);\n\t$txt = str_replace('&lt;','<',$txt);\n\t$txt = str_replace('&gt;','>',$txt);\n\t$txt = str_replace('&amp;','&',$txt);\n\t\n\t//Ajdusts links - anything starting with HTTP opens in a new window\n\t$txt = WA_String::stri_replace(\"<a href=\\\"http://\",\"<a target=\\\"_blank\\\" href=\\\"http://\",$txt);\n\t$txt = WA_String::stri_replace(\"<a href=http://\",\"<a target=\\\"_blank\\\" href=http://\",$txt);\n\n\t//Basic formatting\n\t$eol = ( strpos($txt,\"\\r\") === FALSE ) ? \"\\n\" : \"\\r\\n\";\n\t$html = '<p>'.str_replace(\"$eol$eol\",\"</p><p>\",$txt).'</p>';\n $html = str_replace(\"$eol\",\"<br />\\n\",$html);\n\t$html = str_replace(\"</p>\",\"</p>\\n\\n\",$html);\n\t$html = str_replace(\"<p></p>\",\"<p>&nbsp;</p>\",$html);\n\n\t//Wipes <br> after block tags (for when the user includes some html in the text).\n\t$wipebr = Array(\"table\",\"tr\",\"td\",\"blockquote\",\"ul\",\"ol\",\"li\");\n\n\tfor($x = 0; $x < count($wipebr); $x++) {\n \t $tag = $wipebr[$x];\n \t $html = WA_String::stri_replace(\"<$tag><br />\",\"<$tag>\",$html);\n \t $html = WA_String::stri_replace(\"</$tag><br />\",\"</$tag>\",$html);\n\t}\n\n\treturn $html;\n }", "title": "" }, { "docid": "a37e013767f6c9be0a4b8a5a03bd3f7e", "score": "0.5100167", "text": "function wysiwygFilter($text) {\n\n\t\t// Clean up -----------------------------------------------------------\n\t\t$patterns = array(\n\t\t\t\t\t\t'/\\s\\s+/', // whitespace\n\t\t\t\t\t\t'/\\sstyle=\".*?\"/', // Strip all styles\n\t\t\t\t\t\t\"#(<span.*?>|</span>)#i\", // strip all spans\n\t\t\t\t\t\t'{<div[^>]*><br[^>]*>(.*?)</div>}', // empty div br\n\t\t\t\t\t\t'{<div[^>]*>(.*?)<br[^>]*></div>}', // empty div br\n\t\t\t\t\t\t'/<div>(.+?)<\\/div>/', // div content\n\t\t\t\t\t\t'/<p>(.+?)<\\/p>/', // p content\n\t\t\t\t\t\t'/<\\s?[bB]\\s?>/', // strong open\n\t\t\t\t\t\t'/<\\s?\\/\\s?[bB]\\s?>/', // strong close\n\t\t\t\t\t\t'/<\\s?[iI]\\s?>/', // emphasis open\n\t\t\t\t\t\t'/<\\s?\\/\\s?[iI]\\s?>/' // emphasis close\n\t\t\t\t\t\t );\n\t\t$replacements = array(\n\t\t\t\t\t\t'', // whitespace\n\t\t\t\t\t\t'', // strip all styles\n\t\t\t\t\t\t'', // strip all spans\n\t\t\t\t\t\t'$1', // empty div br\n\t\t\t\t\t\t'$1', // empty div br\n\t\t\t\t\t\t'<p>$1</p>'.\"\\n\\n\", // div content\n\t\t\t\t\t\t'<p>$1</p>'.\"\\n\\n\", // p content\n\t\t\t\t\t\t'<strong>', // strong open\n\t\t\t\t\t\t'</strong>', // strong close\n\t\t\t\t\t\t'<em>', // emphasis open\n\t\t\t\t\t\t'</em>' // emphasis close\n\t\t);\t\t\n\t\t$text = preg_replace($patterns, $replacements, $text);\n\n\t\t// TODO: add these to above preg_replace\n\t\t$text = str_replace(\n\t\t\tarray('<br></div>','<div></div>'),\n\t\t\tarray('</div>',''),\n\t\t\t$text\n\t\t);\n\t\t// Add new lines ------------------------------------------------------\n\n\t\t$text = str_replace(\n\t\t\tarray('<br>','</p>','</h1>','</h2>','</h3>','</h4>','</h5>','</h6>'),\n\t\t\tarray(\"\\n\",'</p>'.\"\\n\\n\",'</h1>'.\"\\n\\n\",'</h2>'.\"\\n\\n\",'</h3>'.\"\\n\\n\",'</h4>'.\"\\n\\n\",'</h5>'.\"\\n\\n\",'</h6>'.\"\\n\\n\"),\n\t\t\t$text\n\t\t);\n\n\t\t// Textile parser -----------------------------------------------------\n\t\t$textile = new Textile();\n\t\t$text = trim($text);\n\t\t$text = $textile->textileThis($text);\n\t\t// Empty <p> and Stuff ------------------------------------------------\n\t\t$text = preg_replace('/<p[^>]*>(?:\\s+|(?:&nbsp;)+|(?:<br\\s*\\/?>)+)*<\\/p>/', '', $text);\n\n\t\t$text = str_replace(\n\t\t\tarray('<p><span></span></p>','<p><span><strong></strong></span></p>','.&nbsp; ','&nbsp;</p>'),\n\t\t\tarray('','','. ','</p>'),\n\t\t\t$text\n\t\t);\n\t\t// Remove remaining empty tags and another go at the freakin <p> ------\n\t\t$text = preg_replace(\n\t\t\tarray(\"/<[^\\/>]*>([\\s]?)*<\\/[^>]*>/\", \"/<p[^>]*><\\\\/p[^>]*>/\"),\n\t\t\t'',\n\t\t\t$text\n\t\t);\n\t\t\n\t\t// Smart Quotes and the such ------------------------------------------\n\t\t// Utf\n\t\t$text = str_replace(\n\t\t\tarray(\"\\xe2\\x80\\x98\", \"\\xe2\\x80\\x99\", \"\\xe2\\x80\\x9c\", \"\\xe2\\x80\\x9d\", \"\\xe2\\x80\\x93\", \"\\xe2\\x80\\x94\", \"\\xe2\\x80\\xa6\"),\n\t\t\tarray(\"'\", \"'\", '\"', '\"', '-', '--', '...'),\n\t\t\t$text\n\t\t);\n\t\t// Windows\n\t\t$text = str_replace(\n\t\t\tarray(chr(145), chr(146), chr(147), chr(148), chr(150), chr(151), chr(133)),\n\t\t\tarray(\"'\", \"'\", '\"', '\"', '-', '--', '...'),\n\t\t\t$text\n\t\t);\n\n\t\t// Incidentals --------------------------------------------------------\n/*\n\n ADD NEW FILTERS HERE\n CONSOLIDATE ON NEW VERSION OF LIBRARY\n\n*/\n\t\t$text = str_replace(\n\t\t\tarray(' class=\"Content\"', ' class=\"content\"',' class=\"Apple-style-span\"'),\n\t\t\t'',\n\t\t\t$text\n\t\t);\n\n\t\treturn $text;\n\t}", "title": "" } ]
99dfda8da4c2d6cf92dbb540e4dfc134
add function to retrieve ACF field values without wpautop
[ { "docid": "0608d4c6898a8f8b833f77e6abc82718", "score": "0.7189272", "text": "function get_the_field_without_wpautop( $field_name, $post_id ) {\n\n\tremove_filter('acf_the_content', 'wpautop');\n\t$field = get_field( $field_name, $post_id );\n\tadd_filter('acf_the_content', 'wpautop');\n\n\treturn $field;\n\n}", "title": "" } ]
[ { "docid": "66b3581e8ece5d6fc66df5ac7f6460c1", "score": "0.7426215", "text": "function my_acf_format_value( $value, $post_id, $field ) {\r\n global $wpdb;\r\n $table_name = $wpdb->prefix . \"acf_data\";\r\n\r\n if($field['type'] != 'text' && $field['type'] != 'textarea' && $field['type'] != 'number'):\r\n return $value;\r\n endif;\r\n\r\n if($post_id == 'options'):\r\n $post_id = -1;\r\n endif;\r\n \r\n $campo_name = $field['name'];\r\n\r\n $campo = $wpdb->get_var(\r\n \"SELECT $campo_name FROM $table_name\r\n WHERE post_id = $post_id\"\r\n );\r\n\r\n return $campo;\r\n}", "title": "" }, { "docid": "d178af0d8bfd1f16924f29e231f4ac34", "score": "0.7169162", "text": "function cunifymax_get_field_text($field, $identifier, $cunifymax_stored_meta) {\n ?>\n\n <div class=\"meta-row\">\n <div class=\"meta-th\">\n <label for=\"<?php echo $field['name'] ?>\" class=\"cunifymax-row-title\"><?php _e($field['title'], $identifier) ?></label>\n </div>\n <div class=\"meta-td\">\n <input type=\"text\" class=\"cunifymax-row-content\" name=\"<?php echo $field['name'] ?>\" id=\"<?php echo $field['name'] ?>\" value=\"<?php\n if (!empty($cunifymax_stored_meta[$field['name']])) {\n echo esc_attr($cunifymax_stored_meta[$field['name']][0]);\n }\n ?>\"/>\n </div>\n </div>\n\n <?php\n}", "title": "" }, { "docid": "51ec51fc8ce03474c3d9b053f8f783af", "score": "0.703869", "text": "function gedem_acf_format_value( $value, $post_id, $field ) {\n\treturn esc_attr( $value );\n}", "title": "" }, { "docid": "b03fb134d67e29132e56836b1c6f2ad0", "score": "0.68804955", "text": "function my_custom_field($field, $value){\n\tprint_r($field);\n\tprint_r($value);\n\n}", "title": "" }, { "docid": "7eb5895379385bb21394a2a13610359d", "score": "0.68603253", "text": "function my_custom_field($field, $value) {\n print_r($field);\n print_r($value);\n}", "title": "" }, { "docid": "7eb5895379385bb21394a2a13610359d", "score": "0.68603253", "text": "function my_custom_field($field, $value) {\n print_r($field);\n print_r($value);\n}", "title": "" }, { "docid": "448ff10e33161fcc16420da68ab50e20", "score": "0.68548656", "text": "function render_field( $field ) \n {\n echo '<textarea rows=\"8\" class=\"fresh-acf-markdown-input\" name=\"' . esc_attr($field['name']) . '\">'. esc_textarea($field['value']).'</textarea>';\n }", "title": "" }, { "docid": "06c1e3e9c8734182ba805c56c25ae850", "score": "0.6829658", "text": "function cf7_get_custom_field($atts){\n\textract(shortcode_atts(array(\n\t\t'key' => '',\n\t\t'post_id' => -1,\n\t\t'obfuscate'\t=> 'off'\n\t), $atts));\n\n\tif($post_id < 0){\n\t\tglobal $post;\n\t\tif(isset($post)) $post_id = $post->ID;\n\t}\n\n\tif($post_id < 0 || empty($key)) return '';\n\n\t$val = get_post_meta($post_id, $key, true);\n\n\tif($obfuscate == 'on'){\n\t\t$val = cf7dtx_obfuscate($val);\n\t}\n\n\treturn $val;\n\n}", "title": "" }, { "docid": "60f48278bfb089c21beed2aa93ee98cd", "score": "0.68079275", "text": "function vsz_cf7_admin_get_field_name($field){\n return esc_html($field);\n}", "title": "" }, { "docid": "65b0ef042f32080469915d24b181b64e", "score": "0.67932534", "text": "public function getFieldFriendlyValue();", "title": "" }, { "docid": "2da5bcd2af651d7d729cf93a6b3dc198", "score": "0.675924", "text": "function lze_get_field_information() {\r\n global $wpdb;\r\n //functions for sex, avatar and signature are default\r\n $lze_txt = array('function lze_character_sex() {\r\n global $post;\r\n $custom = get_post_custom($post->ID);\r\n $lze_male = \"\";\r\n $lze_female = \"\";\r\n if (get_post_meta( $post->ID, \\'lze_character_sex\\', true )) {\r\n $lze_character_sex = get_post_meta( $post->ID, \\'lze_character_sex\\', true );\r\n }\r\n if ($lze_character_sex == \"Mann\") {\r\n $lze_male = \"checked\";\r\n } else {\r\n $lze_female = \"checked\";\r\n }\r\n\r\n echo \\'<input type=\"radio\" name=\"lze_character_sex\" value=\"Mann\" \\'. $lze_male . \\'> Männlich<br><input type=\"radio\" name=\"lze_character_sex\" value=\"Frau\" \\'. $lze_female . \\'> Weiblich\\';};\r\n\r\n function lze_character_ava() {\r\n global $post;\r\n $lze_character_ava = \"\";\r\n $toggle = 0;\r\n if (get_post_meta( $post->ID, \\'lze_character_ava\\', true )) {\r\n $lze_character_ava = get_post_meta( $post->ID, \\'lze_character_ava\\', true );\r\n $toggle = 1;\r\n }\r\n if ($toggle) {\r\n $display = $lze_character_ava;\r\n } else {\r\n $display = $image = get_option(\\'rpg_options_dummypic\\');\r\n }\r\n echo \\'<img class=\"rpg_profile_img\" src=\\'.$display.\\'>\\';\r\n echo \\'<p>Bitte gib eine URL an. <br>180px * 250px</p>\\';\r\n echo \\'<input class=\"lze_textfeld\" name=\"lze_character_ava\" value=\"\\'. $lze_character_ava .\\'\"/>\\';}\r\n\r\n function lze_character_sig() {\r\n global $post;\r\n $lze_character_sig = \"\";\r\n $toggle = 0;\r\n if (get_post_meta( $post->ID, \\'lze_character_sig\\', true )) {\r\n $lze_character_sig = get_post_meta( $post->ID, \\'lze_character_sig\\', true );\r\n $toggle = 1;\r\n }\r\n if ($toggle) {echo \\'<img class=\"rpg_profile_img\" src=\\'.$lze_character_sig.\\'>\\';}\r\n echo \\'<p>Bitte gib eine URL an.<br>max. 400px * 200px</p>\\';\r\n echo \\'<input class=\"lze_textfeld\" name=\"lze_character_sig\" value=\"\\'. $lze_character_sig .\\'\"/>\\';}'\r\n\r\n );\r\n //gets all post-IDs with clue for 'textarea'\r\n $longtext = $wpdb->get_results(\"SELECT post_id FROM wp_postmeta WHERE meta_value = 'LangerText'\");\r\n $ltArray = array();\r\n foreach ($longtext as $longie) {\r\n array_push($ltArray, $longie->post_id); \r\n }\r\n //gets all post-IDs with clue for 'input'\r\n $shorttext = $wpdb->get_results(\"SELECT post_id FROM wp_postmeta WHERE meta_value = 'KurzerText'\");\r\n $stArray = array();\r\n foreach ($shorttext as $shortie) {\r\n array_push($stArray, $shortie->post_id); \r\n }\r\n //gets all post-IDs with value 'steckbrieffeld'\r\n $lze_data = $wpdb->get_results(\"SELECT post_id, meta_value FROM wp_postmeta WHERE meta_value = 'steckbrieffeld'\");\r\n $sorted_data = array();\r\n $counter = 0;\r\n foreach ($lze_data as $single_data) {\r\n $lze_posts = $wpdb->get_results(\"SELECT ID, post_date, post_title, post_content, post_name FROM wp_posts WHERE ID = '\".$single_data->post_id.\"'\");\r\n foreach($lze_posts as $lze_post) {\r\n $sorted_data[$counter] = array();\r\n $sorted_data[$counter]['title'] = $lze_post->post_title;\r\n $sorted_data[$counter]['date'] = $lze_post->post_date;\r\n $sorted_data[$counter]['content'] = $lze_post->post_content;\r\n $sorted_data[$counter]['id'] = $lze_post->ID;\r\n $sorted_data[$counter]['slug'] = $lze_post->post_name;\r\n $counter++;\r\n }\r\n }\r\n\r\n foreach ($sorted_data as $single_data) {\r\n $id = $single_data['id'];\r\n $value = $single_data['title'];\r\n $text = $single_data['content'];\r\n $slug = $single_data['slug'];\r\n $slug = str_replace(\"-\", \"\", $slug);\r\n //checks, if field is textarea. Else: inputfield.\r\n if ($slug){\r\n if (in_array($id, $ltArray)) {\r\n $new_content = \r\n 'function lze_'.$slug.'() {\r\n $info = \"bigpart\";\r\n global $post;\r\n $wert = \"\";\r\n if (get_post_meta( $post->ID, \\'lze_'.$slug.'\\', true )) {\r\n $wert = get_post_meta( $post->ID, \\'lze_'.$slug.'\\', true );\r\n }\r\n if (lze_character_active(get_the_ID()) && !current_user_can(\\'administrator\\')) {\r\n if ($wert) {echo $wert;} else {echo \"Warum nicht?\";}\r\n } else if (!lze_character_active(get_the_ID()) | current_user_can(\\'administrator\\')) {\r\n if (isset($wert)) {\r\n echo \\'<textarea class=\"lze_textarea\" name=\"lze_'.$slug.'\"/>\\'.$wert.\\'</textarea><p class=\"description '.$slug.'\">'.$text.'<p>\\';} else {\r\n echo \\'<textarea class=\"lze_textarea\" name=\"lze_'.$slug.'\"/></textarea><p class=\"description '.$slug.'\">'.$text.'<p>\\';\r\n } \r\n }}';\r\n } else {\r\n $new_content = \r\n 'function lze_'.$slug.'() {\r\n $info = \"oneline\";\r\n global $post;\r\n $'.$slug.' = \"\";\r\n if (get_post_meta( $post->ID, \\'lze_'.$slug.'\\', true )) {\r\n $'.$slug.' = get_post_meta( $post->ID, \\'lze_'.$slug.'\\', true );\r\n }\r\n if (lze_character_active(get_the_ID()) && !current_user_can(\\'administrator\\')) {\r\n if ($'.$slug.') {echo $'.$slug.';} else {echo \"Warum nicht?\";}\r\n } else if (!lze_character_active(get_the_ID()) | current_user_can(\\'administrator\\')) {\r\n if (isset($'.$slug.')) { \r\n echo \\'<input class=\"lze_textfeld\" name=\"lze_'.$slug.'\" value=\"\\' . $'.$slug .' . \\'\"/><p class=\"description '.$slug.'\">'.$text.'<p>\\';} else {\r\n echo \\'<input class=\"lze_textfeld\" name=\"lze_'.$slug.'\" value=\"\"/><p class=\"description '.$slug.'\">'.$text.'<p>\\';}\r\n }}';\r\n }\r\n array_push($lze_txt, $new_content);\r\n }\r\n\r\n }\r\n\r\n //string for functionsdocument\r\n $lze_txt = implode($lze_txt);\r\n return $lze_txt;\r\n }", "title": "" }, { "docid": "150684fbe774f513100f749ea4f35085", "score": "0.669339", "text": "function get_the_sub_field_without_wpautop( $field_name ) {\n\n\tremove_filter('acf_the_content', 'wpautop');\n\t$field = get_sub_field( $field_name );\n\tadd_filter('acf_the_content', 'wpautop');\n\n\treturn $field;\n}", "title": "" }, { "docid": "a0ffcffe60245135e7e493349e0eb7fe", "score": "0.66821676", "text": "function value($field){\n if(array_key_exists($field,$this->values)){\n return htmlspecialchars(stripslashes($this->values[$field]));\n }else{\n return \"\";\n }\n }", "title": "" }, { "docid": "08410ec75430ebfed7fe49d084f4eaf6", "score": "0.66533047", "text": "public function field($field) {\n\t\t$content = get_post_custom_values($field, get_the_ID());\n\t\treturn apply_filters('the_content', $content[0]);\n\t}", "title": "" }, { "docid": "07fcf73aa0c783e9c11d72cb470efbec", "score": "0.6615419", "text": "function paneltopage_get_custom_field( $value ) {\n\tglobal $post;\n\n $custom_field = get_post_meta( $post->ID, $value, true );\n if ( !empty( $custom_field ) )\n\t return is_array( $custom_field ) ? stripslashes_deep( $custom_field ) : stripslashes( wp_kses_decode_entities( $custom_field ) );\n\n return false;\n}", "title": "" }, { "docid": "57adf4eeade5ef479bef42e1d445c5d9", "score": "0.6510844", "text": "public function getFieldHtml() { \n return \"\n <span>{$this->value_field->getValue()}</span>\n {$this->value_field->toHtml()}\n \";\n }", "title": "" }, { "docid": "2977f4c65814388e4aa61b3c15b2c18f", "score": "0.6487368", "text": "function enthl_text( $id, $label, $desc = '' ) {\n global $post;\n\n $html = '';\n $html .= '<div class=\"krm_metabox_field\">';\n $html .= '<label for=\"enthl_' . esc_attr( $id ) . '\">';\n $html .= $label;\n $html .= '</label>';\n $html .= '<div class=\"field\">';\n $html .= '<input type=\"text\" id=\"enthl_' . esc_attr( $id ) . '\" name=\"enthl_' . esc_attr( $id ) . '\" value=\"' . get_post_meta( $post->ID, 'enthl_' . $id, true ) . '\" />';\n if ( $desc ) {\n $html .= '<p>' . $desc . '</p>';\n }\n $html .= '</div>';\n $html .= '</div>';\n\n echo $html;\n}", "title": "" }, { "docid": "4cbdf2050526d58b93e400d29dd0fff3", "score": "0.648231", "text": "function wpcustom($field_name, $return = false) {\r\n\tglobal $post;\r\n\t$custom_field = get_post_meta($post->ID, $field_name, true);\r\n\tif ($return) return $custom_field;\r\n\telse echo $custom_field;\r\n}", "title": "" }, { "docid": "bdfd974546bf1da3bbc501b333614bed", "score": "0.6460392", "text": "function payment_fields() {\n\tif ($this->description) echo wpautop(wptexturize($this->description));\n\t}", "title": "" }, { "docid": "e39883cdfe344af78294769dc3824487", "score": "0.6438459", "text": "function render_sailthru_content_vars_field() {\n\n\t\t// Retrieve data from the database.\n\t\t$options = get_option( 'sailthru_content_settings' );\n\n\t\t// Set default value.\n\t\t$value = isset( $options['sailthru_content_vars'] ) ? $options['sailthru_content_vars'] : '';\n\n\t\t// Field output.\n\t\techo '<input type=\"text\" name=\"sailthru_content_settings[sailthru_content_vars]\" class=\"regular-text sailthru_content_vars_field\" placeholder=\"' . esc_attr__( '', 'text_domain' ) . '\" value=\"' . esc_attr( $value ) . '\">';\n\t\techo '<p class=\"description\"><p>' . esc_attr__( 'Please provide a comma-separated list of WordPress custom fields to include in the Sailthru Content Library.', 'text_domain' ) . '</p></p>';\n\t\techo '<p class=\"description\">' . esc_attr__( 'These fields will be usable within Sailthru messages and content feeds. If blank, all fields will be sent to Sailthru.', 'text_domain' ) . '</p>';\n\n\t}", "title": "" }, { "docid": "3b0888b7401eda9c0b2ce2491c6d53e7", "score": "0.6433501", "text": "function payment_fields()\n {\n if ($this->description)\n echo wpautop(wptexturize($this->description));\n }", "title": "" }, { "docid": "9c4ff2b1a24a165d57297c3efc05569d", "score": "0.64268273", "text": "function uvasomrfd_fields_in_feed($content) { \n if(is_feed()) { \n $post_id = get_the_ID(); \n $output .= '&lt;h2&gt;'.get_post_meta($post_id, 'wpcf-first-name', true).' ';\n\t\t$middle = get_post_meta($post_id, 'wpcf-middle-name', true);\n\t\tif (!empty($middle)){\n\t\t\t$output .= get_post_meta($post_id, 'wpcf-middle-name', true).' ';\n\t\t}\n\t\t$output .= get_post_meta($post_id, 'wpcf-last-name', true).'&lt;/h2&gt;'.\"\\n\";\n $output .= '&lt;h4&gt;Education&lt;/h4&gt;'.\"\\n\";\n $output .= '&lt;ul&gt;'.\"\\n\";\n $output .= get_post_meta($post_id, 'wpcf-degrees-earned', true).\"\\n\";\n $output .= '&lt;/ul&gt;'.\"\\n\";\n $output .= '&lt;h4 class=&quot;faculty&quot;&gt;Primary Appointment&lt;/h4&gt;'.\"\\n\";\n $output .= get_post_meta($post_id, 'wpcf-degrees-earned', true).', '.wp_get_post_terms( $post_id, 'primary').\"\\n\";\n $output .= '&lt;h4 class=&quot;faculty&quot;&gt;Contact&lt;/h4&gt;'.\"\\n\";\n $output .= 'Email: <a href=\"mailto:'. get_post_meta($post_id, 'wpcf-email', true). '\">'.get_post_meta($post_id, 'wpcf-email', true).'</a>'.\"\\n\";\n $output .= '&lt;h4&gt;Research Interests&lt;/h4&gt;'.\"\\n\";\n $output .= get_post_meta($post_id, 'wpcf-research-interest-title', true).\"\\n\";\n $output .= '&lt;h4&gt;Research Description&lt;/h4&gt;'.\"\\n\";\n\t\t//$output .= get_the_content().\"\\n\";\n $output .= '&lt;h4 class=&quot;publications&quot; id=\"'.get_post_meta($post_id, 'wpcf-curv_id', true).'\">Selected Publications&lt;/h4&gt;'.\"\\n\";\n $output .= '&lt;ul class=&quot;facpublications&quot;&gt;&lt;/ul&gt;'.\"\\n\";\n $content = $content.$output; \n } \n return $content; \n}", "title": "" }, { "docid": "ed8d2bf607dc899d21868c80a0c9fe3a", "score": "0.6423713", "text": "function cd_text_field_render() { \r\n\t\t$options = get_option( 'cd_options_settings' );\r\n\t\t?>\r\n\t\t<input type=\"text\" name=\"cd_options_settings[cd_text_field]\" value=\"<?php if (isset($options['cd_text_field'])) echo $options['cd_text_field']; ?>\" />\r\n\t\t<?php\r\n\t}", "title": "" }, { "docid": "8aaac76a0853e0f94f60737de748fa1a", "score": "0.6402001", "text": "function alex21_add_html_for_option_phone() \n{\n $value = html_entity_decode (get_option( 'option_phone' ));\n echo '<input type=\"text\" class=\"regular-text\" id=\"phone_id\" name=\"option_phone\" value=\"' . esc_attr( $value ) . '\"/>';\n}", "title": "" }, { "docid": "5701b829d810995b0a92e7ef01c0a411", "score": "0.6382684", "text": "function payment_fields()\n {\n if ($this->description) {\n echo wpautop(wptexturize($this->description));\n }\n }", "title": "" }, { "docid": "646903c82aa007fb05395b731beef72b", "score": "0.6368442", "text": "function fieldValue($field)\n {\n\n $val = $field['value'];\n\n if ($val != '') {\n\n $val = stripslashes($val);\n\n return $val;\n }\n elseif(isset($field['initial'])) {\n\n return $field['initial'];\n }\n else {\n return '';\n }\n }", "title": "" }, { "docid": "7be5ab683a88753024504c669ca56ce6", "score": "0.6335528", "text": "function feedback_banner_text_field_function($args) {\n $option_value = get_option($args['option_name']);\n ?>\n <input type='text' name='<?php echo $args['option_name']; ?>' id='<?php echo $args['option_name']; ?>'\n value='<?php echo $option_value; ?>' class='moj-component-input'>\n <?php\n\n return null;\n}", "title": "" }, { "docid": "ca1e3f4833f14051b8fc96da7cf1d801", "score": "0.63340265", "text": "function the_papi_field( $post_id = null, $name = null, $default = null ) {\n\t$value = papi_field( $post_id, $name, $default );\n\n\tif ( is_array( $value ) ) {\n\t\t$value = implode( ',', $value );\n\t}\n\n\techo $value;\n}", "title": "" }, { "docid": "ab78c19ccbd213b9a3ea5ee07ac42554", "score": "0.6306322", "text": "function payment_fields() {\n\t\tif ( $this->description ) {\n\t\t\techo wpautop( wptexturize( $this->description ) );\n\t\t}\n\t}", "title": "" }, { "docid": "89a69c7aa695b5b437f5f3aac0ed2c78", "score": "0.62811595", "text": "function filter_fields($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "89a69c7aa695b5b437f5f3aac0ed2c78", "score": "0.62811595", "text": "function filter_fields($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "fb50ffcd648ca10e148b8cf8328fd3dd", "score": "0.6250728", "text": "function payment_fields() {\n\t\t\tif ($this->description) echo wpautop(wptexturize($this->description));\n\t\t}", "title": "" }, { "docid": "fb50ffcd648ca10e148b8cf8328fd3dd", "score": "0.6250728", "text": "function payment_fields() {\n\t\t\tif ($this->description) echo wpautop(wptexturize($this->description));\n\t\t}", "title": "" }, { "docid": "d511d71b498dacfc602d0a03c53933d6", "score": "0.62136734", "text": "function text($value) {\r\n\t\t\r\n\t\techo '<label for=\"' . $value['id'] . '\" class=\"r-meta-label\">' . $value['label'] . '</label>';\r\n\t\techo '<div class=\"r-meta-input-wrap\"><input type=\"text\" value=\"' . htmlspecialchars($value['std']) . '\" id=\"' . $value['id'] . '\" name=\"' . $value['id'] . '\" class=\"r-meta-input\"/></div>';\r\n\t\tif(isset($value['desc']) && $value['desc'] != '') echo '<p class=\"r-meta-help\">' . $value['desc'] . '</p>';\r\n\t\t\r\n\t}", "title": "" }, { "docid": "a0ad418f153fc0c427935f18d772b3e0", "score": "0.62082374", "text": "function custom_options_creator_name()\n{\n echo '<input type=\"text\" name=\"custom_options_creator_name\" value=\"'.get_option('custom_options_creator_name').'\" />';\n}", "title": "" }, { "docid": "86b814e8fd31501700d761810fd26545", "score": "0.6208063", "text": "function get_field ( $f )\n{\n return stripslashes($_REQUEST[$f]);\n}", "title": "" }, { "docid": "2a91e9819c4afef91f6e7d5af94ed56c", "score": "0.6203449", "text": "function extrafields_callback($post){\n\t\twp_nonce_field(plugin_basename(__FILE__),'fechascap_nonce');\n\t\t?>\n\t\t\t<p>\n\t\t\t\t<label class=\"extra\" for=\"fechascap\">Fechas</label>\n\t\t\t\t<input type=\"text\" class=\"issfield\" name=\"fechascap\" value=\"<?php echo get_post_meta($post->ID,'_fechascap',true); ?>\">\n\t\t\t</p>\n\t\t\t<p class=\"howto\">Añade las fechas en que este curso se llevará a cabo. Si el campo se queda vacío, aparecerá “Fecha por definir”.</p>\n\t\t\t<p>\n\t\t\t\t<label class=\"extra\" for=\"precionormal\">Precio Normal</label>\n\t\t\t\t<input type=\"text\" class=\"issfield\" name=\"precionormal\" value=\"<?php echo get_post_meta($post->ID,'_precionormal',true); ?>\">\n\t\t\t</p>\n\t\t\t<p class=\"howto\">Escribe aquí el precio normal para el curso. Si este campo se deja vacío, se mostrará “Precio por definir”. No hace falta escribir + IVA, eso se agrega automáticamente.</p>\n\t\t\t<p>\t\t\t\n\t\t\t\t<label class=\"extra\" for=\"precioespecial\">Precio Especial</label>\n\t\t\t\t<input type=\"text\" class=\"issfield\" name=\"precioespecial\" value=\"<?php echo get_post_meta($post->ID,'_precioespecial',true); ?>\">\n\t\t\t</p>\n\t\t\t<p class=\"howto\">Escribe aquí el precio de promoción para el curso, si lo tiene. Si escribes aquí un precio, el precio normal aparecerá tachado. No hace falta escribir + IVA, eso se agrega automáticamente.\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<label class=\"extra\" for=\"preciopaypal\">Precio neto PayPal</label>\n\t\t\t\t<input type=\"text\" class=\"issfield\" name=\"preciopaypal\" value=\"<?php echo get_post_meta($post->ID,'_preciopaypal',true); ?>\">\n\t\t\t</p>\n\t\t\t<p class=\"howto\">En este campo se coloca el precio neto por persona a pagarse a través de PayPal.</p>\n\t\t\t<p>\n\t\t\t\t<label class=\"extra\" for=\"lugar\">Lugar</label>\n\t\t\t\t<input type=\"text\" class=\"issfield\" name=\"lugar\" value=\"<?php echo get_post_meta($post->ID,'_lugar',true); ?>\">\n\t\t\t</p>\n\t\t\t<p class=\"howto\">Aquí escribe el lugar donde se celebrará el curso. Si este campo se deja vacío, se mostrará “Lugar por definir”.\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<label class=\"extra\" for=\"duracion\">Duración</label>\n\t\t\t\t<input type=\"text\" class=\"issfield\" name=\"duracion\" value=\"<?php echo get_post_meta($post->ID,'_duracion',true); ?>\">\n\t\t\t</p>\n\t\t\t<p class=\"howto\">El número de horas que dura este curso. Si se deja vacío este campo, aparecerá “Por definir”.</p>\n\t\t\t<h2 class=\"ben\">Beneficios</h2>\n\t\t\t<p>\n\t\t\t\t<input type=\"checkbox\" name=\"manual\" value=\"true\" <?php $manualset = get_post_meta($post->ID,'_manual',true); if($manualset == 'true'){echo 'checked';} ?>>\n\t\t\t\t<label for=\"manual\">Manual del participante</label>\n\t\t\t</p>\n\t\t\t<p>\t\t\t\t\n\t\t\t\t<input type=\"checkbox\" name=\"acceso\" value=\"true\" <?php $accesoset = get_post_meta($post->ID,'_acceso',true); if($accesoset == 'true'){echo 'checked';} ?>>\n\t\t\t\t<label for=\"acceso\">Acceso a las presentaciones y materiales en el archivo electrónico</label>\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<input type=\"checkbox\" name=\"compartir\" value=\"true\" <?php $compartirset = get_post_meta($post->ID,'_compartir',true); if($compartirset == 'true'){echo 'checked';} ?>>\n\t\t\t\t<label for=\"compartir\">Compartir las experiencias con profesionales de diversas disciplinas</label>\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<input type=\"checkbox\" name=\"coffeebreak\" value=\"true\" <?php $coffeebreakset = get_post_meta($post->ID,'_coffeebreak',true); if($coffeebreakset == 'true'){echo 'checked';} ?>>\n\t\t\t\t<label for=\"coffeebreak\">Coffee break mañana y tarde</label>\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<input type=\"checkbox\" name=\"estacionamiento\" value=\"true\" <?php $estacionamientoset = get_post_meta($post->ID,'_estacionamiento',true); if($estacionamientoset == 'true'){echo 'checked';} ?>>\n\t\t\t\t<label for=\"estacionamiento\">Estacionamiento</label>\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<input type=\"checkbox\" name=\"diploma\" value=\"true\" <?php $diplomaset = get_post_meta($post->ID,'_diploma',true); if($diplomaset == 'true'){echo 'checked';} ?>>\n\t\t\t\t<label for=\"diploma\">Diploma de participación</label>\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<input type=\"checkbox\" name=\"comida\" value=\"true\" <?php $comidaset = get_post_meta($post->ID,'_comida',true); if($comidaset == 'true'){echo 'checked';} ?>>\n\t\t\t\t<label for=\"comida\">Comida de medio día</label>\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<input id=\"pdftemario\" type=\"text\" name=\"pdftemario\" value=\"<?php echo get_post_meta($post->ID,'_pdftemario',true); ?>\">\n\t\t\t\t<input type=\"button\" id=\"upload_pdftemario\" value=\"Sube el temario en PDF\">\n\t\t\t</p>\n\t\t<?php\n\t}", "title": "" }, { "docid": "e49769f56e88cee9a25b55911a449f85", "score": "0.61961657", "text": "function wpcf7_get_value( $field, $contact_form ) {\r\n\t\tif ( empty( $field )\r\n\t\t or empty( $contact_form ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$value = '';\r\n\r\n\t\tif ( in_array( $field, $this->cf7_fields ) ) {\r\n\t\t\t$templates = $contact_form->additional_setting( $this->cf7_prefix_field . $field );\r\n\r\n\t\t\tif ( empty( $templates[0] ) ) {\r\n\t\t\t\t$template = sprintf( '[your-%s]', $field );\r\n\t\t\t} else {\r\n\t\t\t\t$template = trim( wpcf7_strip_quote( $templates[0] ) );\r\n\t\t\t}\r\n\r\n\t\t\t$value = wpcf7_mail_replace_tags( $template );\r\n\t\t}\r\n\r\n\t\t$value = apply_filters( 'wptelegrampro_wpcf7_get_value', $value,\r\n\t\t\t$field, $contact_form );\r\n\r\n\t\treturn $value;\r\n\t}", "title": "" }, { "docid": "69f6662180adf511aa4a90e063866345", "score": "0.6195631", "text": "function vc_short_description() {\n\tglobal $post;\n\t// Get the short description if it has already been entered\n\t$short_description = get_post_meta($post->ID, 'short_description', true);\n\t// Echo out the field\n\techo '<input type=\"text\" name=\"short_description\" id=\"short_description\" value=\"' . $short_description . '\" class=\"widefat\" />';\n}", "title": "" }, { "docid": "99981923496132618bfec0fe744636ee", "score": "0.618758", "text": "function myplugin_settings_organization_name_field_callback() {\n \t// Retrieving values from input field using get_option()\n $myplugin_organization_name_field = get_option('myplugin_settings_organization_name_field');\n ?>\n <input type=\"text\" name=\"myplugin_settings_organization_name_field\" class=\"regular-text\" value=\"<?php echo isset($myplugin_organization_name_field) ? esc_attr( $myplugin_organization_name_field ) : ''; ?>\" />\n <?php\n }", "title": "" }, { "docid": "209c440de97ff0c93cff60873ab8c8f4", "score": "0.61698115", "text": "function cf7_get($atts){\n\textract(shortcode_atts(array(\n\t\t'key' => 0,\n\t), $atts));\n\t$value = '';\n\tif( isset( $_GET[$key] ) ){\n\t\t$value = sanitize_text_field($_GET[$key]);\n\t}\n\treturn $value;\n}", "title": "" }, { "docid": "1b4cbf4ee8a824b4da2a682dc6b4a55b", "score": "0.6158195", "text": "function sh_add_tfa_code_field(){\n //init\n $html = '<p>\n <label for=\"tfa_code\">'.__(\"Two-Factor Authentication\",\"shtfa\").'<br>\n <input type=\"text\" name=\"tfa_code\" id=\"tfa_code\" class=\"input\" value=\"\" size=\"20\"></label>\n </p>';\n //get setting details\n $enable_tfa = get_option( 'sh_enable_tfa', '');\n //check\n if($enable_tfa) {\n //display\n echo $html;\n }\n}", "title": "" }, { "docid": "9c6a7e5eb20cf3e281937aade2317781", "score": "0.61524916", "text": "function getFieldValue($fieldKey = '')\n{\n return isset($_POST[$fieldKey]) ? htmlspecialchars($_POST[$fieldKey]) : '';\n}", "title": "" }, { "docid": "523b2121579a44e29d582cb7ab82860e", "score": "0.61498487", "text": "static function echo_p_field( $text, $setting, $field, $name, $tooltip_description = NULL, $value = NULL, $id = NULL, $disabled = false ) {\r\n\t global $ppc_global_settings;\r\n\r\n $html = '<p style=\"height: 18px;\">';\r\n\r\n\t\tif( is_string( $tooltip_description ) ) {\r\n\t\t\t$html .= '<span class=\"ppc_tooltip\">';\r\n\t\t\t$html .= '<img src=\"'.$ppc_global_settings['folder_path'].'style/images/info.png'.'\" title=\"'.$tooltip_description.'\" class=\"ppc_tooltip_container\" />';\r\n\t\t\t$html .= '</span>';\r\n\t\t}\r\n\r\n $html .= '<label>';\r\n $html .= '<span class=\"checkable_input\">';\r\n\r\n if( $field == 'radio' )\r\n $html .= PPC_options_fields::generate_radio_field( $setting, $name, $value, $id, $disabled );\r\n else if( $field == 'checkbox' )\r\n $html .= PPC_options_fields::generate_checkbox_field( $setting, $name, $value, $id, $disabled );\r\n\r\n $html .= '</span>';\r\n $html .= $text;\r\n $html .= '</label>';\r\n $html .= '</p>';\r\n\r\n return apply_filters( 'settings_field_generation', $html );\r\n }", "title": "" }, { "docid": "36cff0d5c0f15eae04b9b2970f4dbe05", "score": "0.61445445", "text": "function cmb_get_field_value( $field_args, $object_id = 0, $object_type = 'post' ) {\n\t$field = cmb_get_field( $field_args, $object_id, $object_type );\n\treturn $field->escaped_value();\n}", "title": "" }, { "docid": "3575a6ca47204b81ff41602fa11e0903", "score": "0.613911", "text": "function okhub_expose_acf_fields($post_id) {\n $acf_fields = array();\n // Check if ACF is in use. Can't use (!is_plugin_active('acf')) as we're not in admin. This is how acf itsefl does it. \n if (!(class_exists('acf'))) {\n return $acf_fields;\n }\n\n // Get all custom fields, loop through them and load the field object to create a label => value markup\n $fields = get_fields();\n if ($fields) {\n\tforeach( $fields as $field_name => $value) {\n $field_object = get_field_object($field_name, $post_id, array('load_value'=>TRUE)); \n $key = $field_object['key']; // Use the key, to ensure we get the proper value\n // Process files only\n if ($field_object['type'] == 'file') {\n $id = get_field($key, false, false); // get database Id\n $attachment = get_post( $id );\n if ($attachment) {\n // create array to hold value data\n $value = array(\n 'id' => $attachment->ID,\n\t\t\t'alt' => get_post_meta($attachment->ID, '_wp_attachment_image_alt', true),\n\t\t\t'title' => $attachment->post_title,\n\t\t\t'caption' => $attachment->post_excerpt,\n\t\t\t'description' => $attachment->post_content,\n\t\t\t'mime_type'\t=> $attachment->post_mime_type,\n\t\t\t'url' => wp_get_attachment_url( $attachment->ID ),\n );\n if (is_array($value)) {\n // Convert the field object array into an xml string.\n $xml = new SimpleXMLElement(\"<$field_name/>\");\n array_walk_recursive(array_flip($value), array ($xml, 'addChild'));\n $acf_fields[$field_name] = str_replace('<?xml version=\"1.0\"?>', '', $xml->asXML()); // Take out the xml header.\n } else {\n // We just have a string, so pass that back\n $acf_fields[$field_name] = $value;\n }\n }\n }\n }\n }\n return $acf_fields;\n}", "title": "" }, { "docid": "38be83caeea1cc7deaf0627147a8a97e", "score": "0.6127033", "text": "function cf7_post($atts){\n\textract(shortcode_atts(array(\n\t\t'key' => -1,\n\t), $atts));\n\tif($key == -1) return '';\n\t$val = '';\n\tif( isset( $_POST[$key] ) ){\n\t\t$val = sanitize_text_field( $_POST[$key] );\n\t}\n\treturn $val;\n}", "title": "" }, { "docid": "c43cd21c6fa2412fa9b8cb74824d43bf", "score": "0.6116404", "text": "function rps_print_produkt_meta() {\n\tglobal $post;\n\t$subheader = get_post_meta($post->ID, '_produkt-subheader', true);\n\t$excerpt = get_post_meta($post->ID, '_produkt-excerpt', true);\n \t?>\n \t<label for=\"produkt-subheader\"><?php _e('Ange en underrubrik', 'xbrdr'); ?></label>\n \t<input type=\"text\" class=\"rps produkt-subheader\" name=\"produkt-subheader\" value=\"<?php echo esc_attr($subheader); ?>\" />\n \t<label for=\"produkt-excerpt\"><?php _e('Lägg till ett utdrag till produkten som visas ut på alla produkt sidor', 'xbrdr'); ?></label>\n \t\t<textarea class=\"rps produkt-excerpt\" name=\"produkt-excerpt\"><?php echo $excerpt; ?></textarea>\n\t<?php\n}", "title": "" }, { "docid": "085330d8c3fe4404aba137fb2fc4259a", "score": "0.611138", "text": "function myplugin_add_registration_fields() {\n $user_extra = ( isset($_POST['user_extra']) ) ? $_POST['user_extra'] : '';\n ?>\n\n <p>\n <label for=\"user_extra\"><?php _e('Extra Field', 'gpdealdomain') ?><br />\n <input type=\"text\" name=\"user_extra\" id=\"user_extra\" class=\"input\" value=\"<?php echo esc_attr(stripslashes($user_extra)); ?>\" size=\"25\" /></label>\n </p>\n\n <?php\n}", "title": "" }, { "docid": "0ef51dc77b61e7e26e7cf38e238f218a", "score": "0.6110609", "text": "private function system_info_value( $field_name, $field_value ) {\n\t\tif ( is_array( $field_value ) ) {\n\t\t\t$values = '<ul>';\n\t\t\tforeach ( $field_value as $name => $value ) {\n\t\t\t\t$values .= sprintf( '<li>%s: %s</li>', esc_html( $name ), esc_html( $value ) );\n\t\t\t}\n\t\t\t$values .= '</ul>';\n\n\t\t\treturn $values;\n\t\t}\n\n\t\treturn esc_html( $field_value );\n\t}", "title": "" }, { "docid": "bde502d06dd3b5cabb36304e5079822e", "score": "0.6102035", "text": "function my_populate_field($value){\n // we have to wrestle the field name out of the filter name,\n // since GF doesn't pass it to us\n $filter = current_filter();\n if(!$filter) return '';\n $field = str_replace('gform_field_value_', '', $filter);\n if(!$field) return '';\n \n // get the current logged in user object\n $user = wp_get_current_user();\n \n // We'll just return the user_meta value for the key we're given.\n // In most cases, we'd want to do some checks and/or apply some special\n // case logic before returning.\n return get_user_meta($user->ID, $field, true);\n}", "title": "" }, { "docid": "bde502d06dd3b5cabb36304e5079822e", "score": "0.6102035", "text": "function my_populate_field($value){\n // we have to wrestle the field name out of the filter name,\n // since GF doesn't pass it to us\n $filter = current_filter();\n if(!$filter) return '';\n $field = str_replace('gform_field_value_', '', $filter);\n if(!$field) return '';\n \n // get the current logged in user object\n $user = wp_get_current_user();\n \n // We'll just return the user_meta value for the key we're given.\n // In most cases, we'd want to do some checks and/or apply some special\n // case logic before returning.\n return get_user_meta($user->ID, $field, true);\n}", "title": "" }, { "docid": "af7fea65b5254407bd07d0376d1a8aad", "score": "0.6096987", "text": "function dg_api_get_cpt_content($id) {\n return array(\n 'custom_text_field_1' => get_field('custom_text_field_1', $id),\n 'custom_text_field_2' => get_field('custom_text_field_2', $id)\n );\n}", "title": "" }, { "docid": "792a1c9508be4e724028457fc6901df1", "score": "0.6090387", "text": "function getFieldContent($fN)\t{\n\t\tswitch($fN) {\n\t\t\tcase 'uid':\n\t\t\t\treturn $this->pi_list_linkSingle($this->internal['currentRow'][$fN],$this->internal['currentRow']['uid'],1);\t// The \"1\" means that the display of single items is CACHED! Set to zero to disable caching.\n\t\t\tbreak;\n\t\t\tcase 'leader_phone':\n\t\t\t\t$strHtml = $this->internal['currentRow']['leader1_firstname'].' '.$this->internal['currentRow']['leader1_lastname'].' '.$this->internal['currentRow']['leader1_phone'];\n\t\t\t\tif($this->internal['currentRow']['leader2_lastname']!=\"\") {\n\t\t\t\t\t$strHtml.='<br /> '.$this->internal['currentRow']['leader2_firstname'].' '.$this->internal['currentRow']['leader2_lastname'];\n\t\t\t\t}\n\t\t\t\treturn $strHtml;\n\t\t\tbreak;\n\t\t\t// MLC 20100920 add email\n\t\t\tcase 'leader_email':\n\t\t\t\t$strHtml = $this->internal['currentRow']['leader1_email'];\n\t\t\t\tif($this->internal['currentRow']['leader2_email']!=\"\") {\n\t\t\t\t\t$strHtml.='<br /> '.$this->internal['currentRow']['leader2_email'];\n\t\t\t\t}\n\t\t\t\treturn $strHtml;\n\t\t\tbreak;\n\t\t\tcase 'ages':\n\t\t\t\t$arAges = explode(',',$this->internal['currentRow'][$fN]);\n\t\t\t\twhile(list($k,$v) = each($arAges)) {\n\t\t\t\t\t$arAges[$k] = $this->arAges[$v];\n\t\t\t\t}\n\t\t\t\t$strHtml = implode(', ',$arAges);\n\t\t\t\treturn $strHtml;\n\t\t\tbreak;\n\t\t\tcase 'interests':\n\t\t\t\t$arInterests = explode(',',$this->internal['currentRow'][$fN]);\n\t\t\t\twhile(list($k,$v) = each($arInterests)) {\n\t\t\t\t\t$arInterests[$k] = $this->arInterests[$v];\n\t\t\t\t}\n\t\t\t\t$strHtml = implode(', ',$arInterests);\n\t\t\t\treturn $strHtml;\n\t\t\tbreak;\n\t\t\tcase 'semesters':\n\t\t\t\t$arSemesters = explode(',',$this->internal['currentRow'][$fN]);\n\t\t\t\twhile(list($k,$v) = each($arSemesters)) {\n\t\t\t\t\t$arSemesters[$k] = $this->arSemesters[$v];\n\t\t\t\t}\n\t\t\t\t$strHtml = implode(', ',$arSemesters);\n\t\t\t\treturn $strHtml;\n\t\t\tbreak;\n\t\t\tcase 'day':\n\t\t\t\t$arDays = explode(',',$this->internal['currentRow'][$fN]);\n\t\t\t\twhile(list($k,$v) = each($arDays)) {\n\t\t\t\t\t$arDays[$k] = $this->arDays[$v];\n\t\t\t\t}\n\t\t\t\t$strHtml = implode(', ',$arDays);\n\t\t\t\treturn $strHtml;\n\t\t\tbreak;\n\t\t\tcase 'recurrence':\n\t\t\t\treturn $this->arRecurrences[$this->internal['currentRow'][$fN]];\n\t\t\tbreak;\n\t\t\tcase 'time':\n\t\t\t\treturn date('h:i a',$this->internal['currentRow'][$fN]+21600);\n\t\t\tbreak;\n\t\t\t//case \"title\":\n\t\t\t\t\t// This will wrap the title in a link.\n\t\t\t//\treturn $this->pi_list_linkSingle($this->internal['currentRow']['title'],$this->internal['currentRow']['uid'],1);\n\t\t\t//break;\n\t\t\tcase \"url\":\n\t\t\t\t// This will wrap the title in a link.\n\t\t\t\t$url = trim( $this->internal['currentRow']['url'] );\n\t\t\t\tif ( ! $url )\n\t\t\t\t\treturn $url;\n\t\t\t\telseif ( is_numeric($url) ) {\n\t\t\t\t\t// internal link\n\t\t\t\t\t$string = '<a href=\"';\n\t\t\t\t\t$string .= ( preg_match( '#^http#', $url ) )\n\t\t\t\t\t\t? $url\n\t\t\t\t\t\t: 'http://' . $url;\n\t\t\t\t\t$string .= '\" target=\"_blank\">' . $url . '</a>';\n\n\t\t\t\t\t// return $string;\n\t\t\t\t\treturn $this->pi_linkToPage('website', $url);\n\t\t\t\t} else {\n\t\t\t\t\t// external link\n\t\t\t\t\t$string = '<a href=\"';\n\t\t\t\t\t$string .= ( preg_match( '#^http#', $url ) )\n\t\t\t\t\t\t? $url\n\t\t\t\t\t\t: 'http://' . $url;\n\t\t\t\t\t$string .= '\" target=\"_blank\">' . $url . '</a>';\n\n\t\t\t\t\treturn $string;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn $this->internal['currentRow'][$fN];\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "ccf2e92b9f5eaf944da73d369c6fdd12", "score": "0.60811996", "text": "function listOptionsField(){\n\t\t\t$output = array();\n\t\t\t$sql = \"SHOW COLUMNS FROM `sys_additional_field_content` \";\n\t\t\t$this->db->query($sql);\n\t\t\twhile($this->db->nextRecord()){\n\t\t\t\t$result = $this->db->getRecord();\n\t\t\t\tarray_push($output, \"'\".$result['Field'].\"'\");\n\t\t\t}\t\t\t\n\t\t\tarray_push($output, \"'created_by_format'\");\n\t\t\tarray_push($output, \"'modified_by_format'\");\n\t\t\tarray_push($output, \"'enc_id'\");\n\t\t\tarray_push($output, \"'enc_parent_id'\");\n\t\t\tarray_push($output, \"'type'\");\n\t\t\treturn $output;\n\t\t}", "title": "" }, { "docid": "f30d82ae071d39b25fa4397e48fc4f76", "score": "0.60811037", "text": "function my_display(&$value,&$options) {\n $r=$this->_newXFieldVal($options);\n $r->html=$value;\n if(strlen(trim($this->display_format))>0) {\n $r->html=sprintf($this->display_format,$r->html,$r->html);\n }\n $r->emails=emailClean($r->html);\n $r->raw=$value;\n return $r;\n }", "title": "" }, { "docid": "f71b0b360a6748f9d6129ec96100161d", "score": "0.6071977", "text": "public function display_field($args) {\r\n $field = $this->_get_field($args[0], $args[1]);\r\n\r\n if (NULL !== $field) {\r\n $section_id = $args[0];\r\n $field_id = $args[1];\r\n\r\n if (!isset($field['value']))\r\n $field['value'] = '';\r\n\r\n $field_name = $this->get_option() . '[' . $field_id . ']';\r\n switch ($field['type']) {\r\n default: // default to a 'text' type value\r\n case 'text':\r\n case 'password':\r\n if ('password' === $field['type'])\r\n $type = 'password';\r\n else\r\n $type = 'text';\r\n echo '<input type=\"', $type, '\" id=\"', $field_id, '\" name=\"', $field_name, '\" ';\r\n $this->_render_class('regular-text', $field);\r\n if (isset($field['value']))\r\n echo ' value=\"', esc_attr($field['value']), '\" ';\r\n echo ' />', PHP_EOL;\r\n break;\r\n\r\n case 'select':\r\n echo '<select id=\"', $field_id, '\" name=\"', $field_name, '\">', PHP_EOL;\r\n if (isset($field['option-title']))\r\n echo '<option value=\"0\">', esc_html($field['option-title']), '</option>', PHP_EOL;\r\n foreach ($field['options'] as $opt_name => $opt_value) {\r\n echo '<option value=\"', $opt_value, '\" ';\r\n if ($opt_value == $field['value'])\r\n echo ' selected=\"selected\" ';\r\n echo '>', esc_html($opt_name), '</option>', PHP_EOL;\r\n }\r\n echo '</select>', PHP_EOL;\r\n break;\r\n\r\n case 'radio':\r\n foreach ($field['options'] as $opt_name => $opt_value) {\r\n if ($field['value'] === $opt_name)\r\n $checked = ' checked=\"checked\" ';\r\n else\r\n $checked = '';\r\n echo '<input type=\"radio\" name=\"', $field_name, '\" value=\"', $opt_name, '\"', $checked, ' >';\r\n echo '&nbsp;', esc_html($opt_value), '&nbsp;';\r\n }\r\n break;\r\n\r\n case 'checkbox':\r\n echo '<input type=\"checkbox\" id=\"', $field_id, '\" name=\"', $field_name, '\" ';\r\n if (isset($field['value']) && $field['value'])\r\n echo ' checked=\"checked\"';\r\n echo ' />';\r\n break;\r\n\r\n case 'textarea':\r\n echo '<textarea id=\"', $field_id, '\" name=\"', $field_name, '\" ';\r\n if (isset($field['size']) && is_array($field['size']))\r\n echo ' cols=\"', $field['size'][0], '\" rows=\"', $field['size'][1], '\" ';\r\n echo '>', esc_textarea($field['value']), '</textarea>';\r\n break;\r\n\r\n case 'button':\r\n echo '<button type=\"button\" id=\"', $field_id, '\" name=\"', $field_name, '\" ';\r\n $this->_render_class('', $field);\r\n echo '>', esc_html($field['value']), '</button>';\r\n break;\r\n\r\n case 'message':\r\n break;\r\n\r\n case 'custom':\r\n do_action('spectrom_settings_output_field', $field);\r\n break;\r\n\r\n case 'datepicker':\r\n case 'timepicker':\r\n // TODO: enqueue javascript needed for date/time picker\r\n // http://bevacqua.github.io/rome/ https://github.com/bevacqua/rome\r\n echo '<input type=\"text\" id=\"', $this->_args['group'], '[', $field_id, ']\" ',\r\n ' name=\"', esc_attr($this->_args['group']), '[', $field_id, ']\" ';\r\n $this->_render_class('spectrom-' . $field['type'], $field); // renders class=\"spectrom-{field['type']}\" attribute\r\n echo ' value=\"', esc_attr($field['value']), '\" />';\r\n break;\r\n\r\n case 'image':\r\n echo '<input type=\"text\" id=\"', $this->_args['group'], '-', $field_id, '\" ',\r\n ' name=\"', esc_attr($this->_args['group']), '[', $field_id, ']\" ';\r\n $this->_render_class('regular-text spectrom-' . $field['type'], $field); // renders class=\"spectrom-{field['type']}\" attribute\r\n echo ' value=\"', esc_attr($field['value']), '\" />';\r\n echo '&nbsp;';\r\n\r\n echo '<input type=\"button\" id=\"', $field_id, '_image_upload\" value=\"', __('Choose Media Library Image'),\r\n '\" class=\"button-secondary spectrom-media-upload\" data-fieldid=\"', $this->_args['group'], '-', $field_id, '\" />', PHP_EOL;\r\n if (!isset($field['description']))\r\n $field['description'] = __('Enter an image URL or choose an image from the Media Library');\r\n echo '<br/><label class=\"setting-label\"></label>';\r\n break;\r\n }\r\n\r\n // check for any errors\r\n $err = $this->_get_errors($field_id);\r\n if (0 !== count($err)) {\r\n foreach ($err as $msg) {\r\n echo '<p class=\"spectrom-error\">', esc_html($msg), '</p>';\r\n }\r\n }\r\n\r\n if (isset($field['afterinput']))\r\n echo '&nbsp;', esc_html($field['afterinput']);\r\n\r\n if (isset($field['description']))\r\n echo '<p class=\"description\">', esc_html($field['description']), '</p>';\r\n }\r\n }", "title": "" }, { "docid": "ced1a404cfd248e5dca939e51fcdbf62", "score": "0.6070577", "text": "function widget_field_text($obj, $instance, $fieldname, $fieldtitle) {\n\t$value = $instance[$fieldname];\n\t?>\n\t<p>\n\t\t<label for=\"<?php echo $obj->get_field_id($fieldname); ?>\"><?php echo $fieldtitle; ?>:</label>\n\t\t<input class=\"widefat\" id=\"<?php echo $obj->get_field_id($fieldname); ?>\" name=\"<?php echo $obj->get_field_name($fieldname); ?>\" type=\"text\" value=\"<?php echo esc_attr($value); ?>\" />\n\t</p>\n\t<?php\n}", "title": "" }, { "docid": "b424f827b195910a4841fccbd11c9d61", "score": "0.60614854", "text": "function payment_fields(){\n if($this->description) echo wpautop(wptexturize(__($this->description, 'monepayus')));\n }", "title": "" }, { "docid": "11e1efeece1714ff1b910c6462546976", "score": "0.6051702", "text": "public function display_field($field_data)\n {\n // code...\n }", "title": "" }, { "docid": "214a85bf2683b72961e404c598ceb9fd", "score": "0.6049398", "text": "function print_field($module, $custom_field, $cv, $class_top = '', $class_bottom = 'controls', $label_class = '')\n{\n ?>\n <div class=\"form-group\">\n <div class=\"<?php echo $class_top; ?>\">\n <label<?php echo($label_class != '' ? \" class='\" . $label_class . \"'\" : ''); ?>\n for=\"custom[<?php echo $custom_field->custom_field_id; ?>]\">\n <?php _htmlsc($custom_field->custom_field_label); ?>\n </label>\n </div>\n <?php $fieldValue = $module->form_value('custom[' . $custom_field->custom_field_id . ']'); ?>\n <div class=\"<?php echo $class_bottom; ?>\">\n <?php\n switch ($custom_field->custom_field_type) {\n case 'DATE':\n $dateValue = ($fieldValue == \"\" ? \"\" : date_from_mysql($fieldValue));\n ?>\n <input type=\"text\" class=\"form-control input-sm datepicker\"\n name=\"custom[<?php echo $custom_field->custom_field_id; ?>]\"\n id=\"<?php echo $custom_field->custom_field_id; ?>\"\n value=\"<?php echo $dateValue; ?>\">\n <?php\n break;\n case 'SINGLE-CHOICE':\n $choices = $cv[$custom_field->custom_field_id];\n ?>\n <select class=\"form-control simple-select\" name=\"custom[<?php echo $custom_field->custom_field_id; ?>]\"\n id=\"<?php echo $custom_field->custom_field_id; ?>\">\n <option value=\"\"><?php echo trans('none'); ?></option>\n <?php foreach ($choices as $val): ?>\n <option value=\"<?php echo $val->custom_values_id; ?>\"\n <?php check_select($val->custom_values_id, $fieldValue); ?>>\n <?php _htmlsc($val->custom_values_value); ?>\n </option>\n <?php endforeach; ?>\n </select>\n <?php\n break;\n case 'MULTIPLE-CHOICE':\n $choices = $cv[$custom_field->custom_field_id];\n $selChoices = explode(',', $fieldValue); ?>\n <select id=\"<?php echo $custom_field->custom_field_id; ?>\"\n name=\"custom[<?php echo $custom_field->custom_field_id; ?>][]\"\n multiple=\"multiple\"\n class=\"form-control\">\n <option value=\"\"><?php echo trans('none'); ?></option>\n <?php foreach ($choices as $choice): ?>\n <option value=\"<?php echo $choice->custom_values_id; ?>\" <?php check_select(in_array($choice->custom_values_id, $selChoices)); ?>>\n <?php _htmlsc($choice->custom_values_value); ?>\n </option>\n <?php endforeach; ?>\n </select>\n <script>\n $('#<?php echo $custom_field->custom_field_id; ?>').select2();\n </script>\n <?php\n break;\n case 'BOOLEAN':\n ?>\n <select id=\"<?php echo $custom_field->custom_field_id; ?>\"\n name=\"custom[<?php echo $custom_field->custom_field_id; ?>]\"\n class=\"form-control\">\n <option value=\"0\" <?php check_select($fieldValue, '0'); ?>><?php echo trans('false'); ?></option>\n <option value=\"1\" <?php check_select($fieldValue, '1'); ?>><?php echo trans('true'); ?></option>\n </select>\n <?php\n break;\n default:\n ?>\n <input type=\"text\" class=\"form-control\"\n name=\"custom[<?php echo $custom_field->custom_field_id; ?>]\"\n id=\"<?php echo $custom_field->custom_field_id; ?>\"\n value=\"<?php _htmlsc($fieldValue); ?>\">\n <?php } ?>\n </div>\n </div>\n <?php\n}", "title": "" }, { "docid": "ecc43306f45472b769aee499e4790ebb", "score": "0.6044487", "text": "public function format()\n {\n return $this->field_value;\n }", "title": "" }, { "docid": "ced48b987206afd91a11ad546a6fc896", "score": "0.6042389", "text": "function dcfwc_woo_custom_fields() {\n woocommerce_wp_text_input( array(\n 'id' => 'dcfwc_woo_custom_fields',\n 'label' => __( 'Adomány:', 'donation-counter' ),\n\n ));\n }", "title": "" }, { "docid": "dde29cd727f82eb13551ceba7687eb9d", "score": "0.60384685", "text": "function _civicrm_entity_contact_get_formatted_values(&$field,$wrapper){\n switch($field['field_name']){\n case 'contact_sub_type':\n case 'preferred_communication_method':\n return _civicrm_entity_formatted_output_of_arrays($field,$wrapper);\n default: return $wrapper->{$field['field_name']}->value();\n }\n}", "title": "" }, { "docid": "39bfa67938fd3cb27fadcef51ec7683d", "score": "0.6038352", "text": "function childtheme_search_field_value($args) {\r\n return 'sprei merah';\r\n}", "title": "" }, { "docid": "5ef141c5282843c69eb24f17ab621ab3", "score": "0.6035645", "text": "function clb_usermeta_form_field_saved_articles($user)\n{\n ?>\n <h3>Saved Articles</h3>\n <table class=\"form-table\">\n <tr>\n <th>\n <label for=\"saved_articles\">Saved post IDs</label>\n </th>\n <td>\n <input type=\"text\"\n class=\"regular-text ltr\"\n id=\"saved_articles\"\n name=\"saved_articles\"\n value=\"<?= esc_attr(get_user_meta($user->ID, 'saved_articles', true)); ?>\"\n title=\"Saved post IDs, separated by commas please\"\n >\n <p class=\"description\">\n Saved post IDs, separated by commas please\n </p>\n </td>\n </tr>\n </table>\n <?php\n}", "title": "" }, { "docid": "e2315096d7555acadda39163f2f30997", "score": "0.6024855", "text": "function lze_get_field_saving() {\r\n global $wpdb;\r\n //contents per default information for sex, avatar and signature\r\n $lze_txt = array('function lze_save_character() {global $post; if (isset($_POST[\"lze_character_sex\"])) {update_post_meta($post->ID, \"lze_character_sex\", $_POST[\"lze_character_sex\"]);} if (isset($_POST[\"lze_character_ava\"])) {update_post_meta($post->ID, \"lze_character_ava\", $_POST[\"lze_character_ava\"]);} if (isset($_POST[\"lze_character_sig\"])) {update_post_meta($post->ID, \"lze_character_sig\", $_POST[\"lze_character_sig\"]);}');\r\n $lze_data = $wpdb->get_results(\"SELECT meta_value, post_id FROM wp_postmeta WHERE meta_value = 'steckbrieffeld'\");\r\n foreach ($lze_data as $single_data) {\r\n $moredata = $wpdb->get_results(\"SELECT post_name FROM wp_posts WHERE ID = '\".$single_data->post_id.\"'\");\r\n $value = \"\";\r\n foreach($moredata as $onedata) {\r\n $value = $onedata->post_name;\r\n } \r\n //$value = get_the_title($single_data->post_id);\r\n $value = str_replace(\"-\", \"\", $value);\r\n $newcontent = 'if (isset($_POST[\"lze_'.$value.'\"])) {update_post_meta($post->ID, \"lze_'.$value.'\", $_POST[\"lze_'.$value.'\"]);}';\r\n array_push($lze_txt, $newcontent);\r\n } \r\n //adds code ending to content\r\n $end = \"}\";\r\n array_push($lze_txt, $end); \r\n $lze_txt = implode($lze_txt);\r\n return $lze_txt;\r\n }", "title": "" }, { "docid": "bb0ea6b91dfdf1374e26b4a1f7e207cd", "score": "0.60215026", "text": "static function the_value( $field, $args = array(), $post_id = null )\n\t\t{\n\t\t\t$value = self::get_value( $field, $args, $post_id );\n\t\t\tif ( ! $value )\n\t\t\t\treturn '';\n\n\t\t\t$output = '<ul>';\n\t\t\tif ( $field['clone'] )\n\t\t\t{\n\t\t\t\tforeach ( $value as $subvalue )\n\t\t\t\t{\n\t\t\t\t\t$output .= '<li>';\n\t\t\t\t\t$output .= '<ul>';\n\t\t\t\t\tforeach ( $subvalue as $option )\n\t\t\t\t\t{\n\t\t\t\t\t\t$output .= '<li>' . $field['options'][$option] . '</li>';\n\t\t\t\t\t}\n\t\t\t\t\t$output .= '</ul>';\n\t\t\t\t\t$output .= '</li>';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach ( $value as $option )\n\t\t\t\t{\n\t\t\t\t\t$output .= '<li>' . $field['options'][$option] . '</li>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$output .= '</ul>';\n\n\t\t\treturn $output;\n\t\t}", "title": "" }, { "docid": "09c4c96f8d969e1ba8b5627a7d34800f", "score": "0.60183126", "text": "function hook_field_formatter_info() {\n return array(\n 'default' => array(\n 'label' => t('Default'),\n 'field types' => array('text'),\n ),\n 'plain' => array(\n 'label' => t('Plain text'),\n 'field types' => array('text'),\n ),\n 'trimmed' => array(\n 'label' => t('Trimmed'),\n 'field types' => array('text'),\n ),\n );\n}", "title": "" }, { "docid": "ab50cb46b49b1b3c63fd77b153fab8b7", "score": "0.60165036", "text": "static function get_text_field($name, $value, $setting){\n $s = '<p class=\"text_field\">';\n $s .= '<label for=\"'.$name.'\">'.$setting['label'].'</label>';\n $s .= '<input class=\"widefat\" id=\"'.esc_attr( $name ).'\" name=\"'.$name.'\" type=\"text\" value=\"'.esc_attr( $value ).'\" />';\n $s .= '</p>';\n return $s;\n }", "title": "" }, { "docid": "30bdffa356acd15caeaf27cbc219894f", "score": "0.6013937", "text": "function do_it_my_way( $field_value, $field_type = '', $field_id = '' ) {\n\tforeach ( bp_xprofile_get_field_types() as $type => $class ) {\n\t\tif ( $type !== $field_type ) {\n\t\t\tcontinue;\n\t\t}\n if ( $field_type === 'telephone' ) {\n $field_value = '<a href=\"tel:' . stripPhoneNumber( $field_value ) . '\" rel=\"nofollow\">' . formatPhoneNumber( $field_value ) . '</a>';\n continue;\n }\n\n\t\tif ( method_exists( $class, 'display_filter' ) ) {\n\t\t\t$field_value = call_user_func( array( $class, 'display_filter' ), $field_value, $field_id );\n\t\t}\n\t}\n\n\treturn $field_value;\n}", "title": "" }, { "docid": "ffa2f11219cec9126d418a60c03c8afd", "score": "0.6011167", "text": "function extra_fields_box_func($post){\n ?>\n <table style=\"width: 100%;\">\n <tbody>\n <tr>\n <td>\n <p style=\"font-size: 16px; margin: 0;line-height: 1;\">Link</p>\n </td>\n <td>\n <p style=\"font-size: 16px; margin: 0;line-height: 1;\">Link text</p>\n </td>\n <td colspan=\"2\">\n <p style=\"font-size: 16px; margin: 0;line-height: 1;\">Link color</p>\n </td>\n </tr>\n <tr>\n <td>\n <input type=\"text\" name=\"extra[link]\" placeholder=\"Link\" value=\"<?php\n echo get_post_meta($post->ID, 'link', 1); ?>\" style=\"width:100%\" />\n </td>\n <td>\n <input type=\"text\" name=\"extra[link_text]\" placeholder=\"Link text\" value=\"<?php\n echo get_post_meta($post->ID, 'link_text', 1); ?>\" style=\"width:100%\">\n <input type=\"hidden\" name=\"extra_fields_nonce\" value=\"<?php\n echo wp_create_nonce(__FILE__); ?>\" />\n </td>\n <td style=\"width: 2%;border: 1px solid #000;background-color:<?php\n echo get_post_meta($post->ID, 'link_color', 1); ?>;\">\n <?php\n if (empty(get_post_meta($post->ID, 'link_color', 1))) {\n echo '<p style=\"text-align: center;margin:0\">X</p>';\n }\n ?>\n </td>\n <td>\n <input type=\"text\" name=\"extra[link_color]\" placeholder=\"Link color\" value=\"<?php\n echo get_post_meta($post->ID, 'link_color', 1); ?>\" style=\"width:100%\" />\n </td>\n </tr>\n </tbody>\n </table>\n <p style=\"font-size: 16px;\">For use slider on your page, use this shortcode <span style=\"background-color: #fff9c0; padding: 5px;\">[bs-swiper-slider]</span></p>\n\n <?php\n}", "title": "" }, { "docid": "6a374cf5ce73cd1754522088cfdbb12a", "score": "0.6009612", "text": "function _field($field, $custom_options = array()) \r\n {\r\n\t\t$field['label'] = __l($field['label']);\r\n\t\t$field['info'] = __l($field['info']);\r\n\t\t$required = '';\r\n if ($field['required'] == 1) {\r\n $required = 'required';\r\n }\r\n\t\t$agent_class = 'hide';\r\n\t\t$ua = $_SERVER[\"HTTP_USER_AGENT\"]; // Get user-agent of browser\r\n\t\t$safariorchrome = strpos($ua, 'Safari') ? true : false; // Browser is either Safari or Chrome (since Chrome User-Agent includes the word 'Safari')\r\n\t\t$chrome = strpos($ua, 'Chrome') ? true : false; // Browser is Chrome\r\n\t\tif($safariorchrome == true AND $chrome == false){ $agent_class = ''; }\r\n $options = array();\r\n $out = '';\r\n if (!empty($field['type'])) {\r\n $class = '';\r\n if (empty($this->request->data['UserProfile']['address']) and empty($this->request->data['Item']['address'])) {\r\n $class = 'hide';\r\n }\r\n if (!empty($field['name'])) {\r\n if ($field['name'] == 'Item.name') {\r\n $options['class'] = \"js-preview-keyup js-no-pjax {'display':'js-name'}\";\r\n }\r\n if ($field['name'] == 'Item.needed_amount') {\r\n $options['info'] = sprintf(__l('Minimum Amount: %s%s <br/> Maximum Amount: %s') , Configure::read('site.currency') , $this->Html->cCurrency(Configure::read('Item.minimum_amount')) , Configure::read('site.currency') . $this->Html->cCurrency(Configure::read('Item.maximum_amount')));\r\n }\r\n if ($field['name'] == 'country_id' || $field['name'] == 'State.name') {\r\n $options['class'] = 'location-input';\r\n }\r\n if ($field['name'] == 'Form.address' || $field['name'] == 'Item.address' || $field['name'] == 'Request.address') {\r\n $out.= '<div class=\"profile-block clearfix\"><div class=\"mapblock-info mapblock-info1 pr\"><div class=\"clearfix address-input-block required pull-left\">';\r\n $options['class'] = 'js-preview-address-change';\r\n $options['id'] = 'ItemAddressSearch';\r\n }\r\n\t\t\t\tif ($field['name'] == 'Item.min_number_of_ticket') {\r\n\t\t\t\t\t$out.= '<div class=\"js-min-no-ticket hide\">';\r\n\t\t\t\t}\r\n if ($field['name'] == 'Attachment.filename') {\r\n\t\t\t\t\t$allowedExt = implode(', ', Configure::read('photo.file.allowedExt'));\r\n\t\t\t\t\t$out.= '<div class=\"clearfix ver-space bot-mspace\"><div class=\"alert alert-info\">';\r\n\t\t\t\t\t$message = '';\r\n\t\t\t\t\tif (!Configure::read('item.is_enable_edit_item_image')):\r\n\t\t\t\t\t\t$message .= sprintf(__l('Shared %s images cannot be delete once uploaded. So please be sure about %s images before complete this step.'), Configure::read('item.alt_name_for_item_singular_small'), Configure::read('item.alt_name_for_item_singular_small')) . ' ';\r\n\t\t\t\t\tendif;\r\n\t\t\t\t\t$message .= '<p>' . __l('The maximum file size for uploads is 8 MB per file.') . '</p>';\r\n\t\t\t\t\t$message .= '<p>' . __l('File types that can be uploaded are: jpg, gif, png, bmp.') . '</p>';\r\n\t\t\t\t\t$message .= '<p>' . __l('You can \"Browse or Drag and Drop\" one, multiple, or an entire Folder into this area to upload your image into the site. (some browser restriction apply)') . '</p>';\r\n\t\t\t\t\t$out.= $message;\r\n\t\t\t\t\t$out.= '</div>';\r\n\t\t\t\t\t$out.= '<div class=\"picture\">';\r\n\t\t\t\t\t$out.= '<div class=\"js-attachment-files cur dragdrop dc space\"><span class=\"show space text-46\">'. __l('Drop files here') . '</span><span class=\"show text-16\">('. __l('or click') . ')</span></div>';\r\n\t\t\t\t\t$out.= '<div class=\"input file required\">';\r\n\t\t\t\t\t$out.= '<span class=\"fileinput-button '.$agent_class.'\">';\r\n\t\t\t\t\t$success_url = Router::url(array('controller' => 'items', 'action' => 'update_redirect'), true);\r\n\t\t\t\t\tif(!empty($this->request->data['Item']['id']) && !empty($this->request->data['Item']['slug'])) {\r\n\t\t\t\t\t\t$success_url = Router::url(array('controller' => 'items', 'action' => 'view', $this->request->data['Item']['slug']), true);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$out.= $this->Form->input('Attachment.filename. ', array('type' => 'file', 'label' => false, 'div' => false, 'class' => 'fileUpload', 'multiple' => 'multiple', 'data-allowed-extensions' => $allowedExt, 'data-maximum-number-of-photos' => Configure::read('item.max_upload_photo'), 'data-success-url' => $success_url));\r\n\t\t\t\t\t$out.= '</span>';\r\n\t\t\t\t\t$out.= '</div>';\r\n\t\t\t\t\t$out.= '<div class=\"time-desc datepicker-container clearfix\">\r\n\t<table role=\"presentation\" class=\"table table-striped\">\r\n\t <tbody class=\"files\"></tbody></table>';\r\n\t $out.= '<div class=\"js-sortable-attachments js-image-block item-image-block\">';\r\n\t\tif(!empty($this->request->data['Attachment'])){\r\n\t\t\tfor($p = 0; $p < count($this->request->data['Attachment']); $p++) {\t \r\n\t\t\t\tif(!empty($this->request->data['Attachment']) && !empty($this->request->data['Attachment'][$p]['filename'])) {\r\n\t\t\t\t$out.= '<div id=\"js-delete-'.$this->request->data['Attachment'][$p]['id'].'\" class=\"item-image-innerblock sep img-rounded span4 space pr\">'. $this->Form->input('Attachment.'.$this->request->data['Attachment'][$p]['id'].'.id', array('type' => 'hidden', 'value' => $this->request->data['Attachment'][$p]['id'])) .'\r\n\t\t\t\t\t<div class=\"clearfix\">\r\n\t\t\t\t\t\t<span class=\"js-delete-attach pa image-close\" data-remove_part=\"js-delete-'.$this->request->data['Attachment'][$p]['id'].'\" data-error=\"js-error-message-'.$this->request->data['Attachment'][$p]['id'].'\" data-url=\"'.Router::url(array('controller'=> 'items', 'action' => 'attachment_delete', $this->request->data['Attachment'][$p]['id']), true).'\">\r\n\t\t\t\t\t\t\t<i class=\"icon-remove-sign cur text-18 orangec\"></i>\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"space\">'.$this->Html->showImage('Item', $this->request->data['Attachment'][$p], array('dimension' => 'big_thumb', 'alt' => sprintf(__l('[Image: %s]'), $this->Html->cText($this->request->data['Attachment'][$p]['filename'], false)), 'title' => $this->Html->cText($this->request->data['Attachment'][$p]['filename'] , false))) .'</div>\r\n\t\t\t\t\t<div id=\"js-error-message-'.$this->request->data['Attachment'][$p]['id'].'\" class=\"clearfix hor-space\"></div>'.\r\n\t\t\t\t\t$this->Form->input('Attachment.'.$this->request->data['Attachment'][$p]['id'].'.description', array('label' => false, 'type' => 'text', 'placeholder' => 'Caption', 'value' => $this->request->data['Attachment'][$p]['description'])) . '</div>';\r\n\t\t\t\t}\t \r\n\t\t\t}\r\n\t\t}\r\n\t$out.= <<<EOT\r\n\t</div>\r\n\t<!-- The template to display files available for upload -->\r\n\t<script id=\"template-upload\" type=\"text/x-tmpl\">\r\n\t{% for (var i=0, file; file=o.files[i]; i++) { %}\r\n\t\t<tr class=\"template-upload fade\">\r\n\t\t\t<td>\r\n\t\t\t\t<span class=\"preview\"></span>\r\n\t\t\t</td>\r\n\t\t\t<td>\r\n\t\t\t\t<p class=\"name\">{%=file.name%}</p>\r\n\t\t\t\t{% if (file.error) { %}\r\n\t\t\t\t\t<div><span class=\"label label-danger\">Error</span> {%=file.error%}</div>\r\n\t\t\t\t{% } %}\r\n\t\t\t</td>\r\n\t\t\t<td>\r\n\t\t\t\t<p class=\"size\">{%=o.formatFileSize(file.size)%}</p>\r\n\t\t\t\t{% if (!o.files.error) { %}\r\n\t\t\t\t\t<div class=\"progress progress-striped active\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\" aria-valuenow=\"0\"><div class=\"bar bar-success\" style=\"width:0%;\"></div></div>\r\n\t\t\t\t{% } %}\r\n\t\t\t</td>\r\n\t\t\t<td>\r\n\t\t\t\t{% if (!o.files.error && !i && !o.options.autoUpload) { %}\r\n\t\t\t\t\t<button class=\"btn btn-primary start hide\">\r\n\t\t\t\t\t\t<span>Start</span>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t{% } %}\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t{% } %}\r\n\t</script>\r\n\t<!-- The template to display files available for download -->\r\n\t<script id=\"template-download\" type=\"text/x-tmpl\">\r\n\t{% for (var i=0, file; file=o.files[i]; i++) { %}\r\n\t\t<tr class=\"template-download fade\">\r\n\t\t\t<td>\r\n\t\t\t\t<span class=\"preview\">\r\n\t\t\t\t\t{% if (file.thumbnailUrl) { %}\r\n\t\t\t\t\t\t<a href=\"{%=file.url%}\" title=\"{%=file.name%}\" download=\"{%=file.name%}\" data-gallery><img src=\"{%=file.thumbnailUrl%}\"></a>\r\n\t\t\t\t\t{% } %}\r\n\t\t\t\t</span>\r\n\t\t\t</td>\r\n\t\t\t<td>\r\n\t\t\t\t<p class=\"name\">\r\n\t\t\t\t\t{% if (file.url) { %}\r\n\t\t\t\t\t\t<a href=\"{%=file.url%}\" title=\"{%=file.name%}\" download=\"{%=file.name%}\" {%=file.thumbnailUrl?'data-gallery':''%}>{%=file.name%}</a>\r\n\t\t\t\t\t{% } else { %}\r\n\t\t\t\t\t\t<span>{%=file.name%}</span>\r\n\t\t\t\t\t{% } %}\r\n\t\t\t\t</p>\r\n\t\t\t\t{% if (file.error) { %}\r\n\t\t\t\t\t<div><span class=\"label label-danger\">Error</span> {%=file.error%}</div>\r\n\t\t\t\t{% } %}\r\n\t\t\t</td>\r\n\t\t\t<td>\r\n\t\t\t\t<span class=\"size\">{%=o.formatFileSize(file.size)%}</span>\r\n\t\t\t</td>\r\n\t\t\t<td>\r\n\t\t\t\t{% if (file.deleteUrl) { %}\r\n\t\t\t\t\t<button class=\"btn btn-danger delete\" data-type=\"{%=file.deleteType%}\" data-url=\"{%=file.deleteUrl%}\"{% if (file.deleteWithCredentials) { %} data-xhr-fields='{\"withCredentials\":true}'{% } %}>\r\n\t\t\t\t\t\t<i class=\"glyphicon glyphicon-trash\"></i>\r\n\t\t\t\t\t\t<span>Delete</span>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t{% } %}\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t{% } %}\r\n\t</script>\r\n</div>\r\nEOT;\r\n\t\t\t\t\t$out.= '</div>';\r\n\t\t\t\t\t$out.= '</div>';\r\n }\r\n if ($field['name'] == 'Form.address1' || $field['name'] == 'Item.address1' || $field['name'] == 'Request.address1') {\r\n $out.= '<div id=\"js-geo-fail-address-fill-block\" class=\"' . $class . '\"><div class=\"clearfix\"><div class=\"map-address-left-block address-input-block\">';\r\n $options['class'] = 'js-preview-address-change';\r\n $options['id'] = 'js-street_id';\r\n $out.= '</div>';\r\n }\r\n if ($field['name'] == 'Item.description') {\r\n $options['class'] = 'span16 descblock js-post-item-description';\r\n $options['rows'] = false;\r\n $options['cols'] = false;\r\n }\r\n if ($field['name'] == 'Item.country_id' || $field['name'] == 'Form.country_id' || $field['name'] == 'Request.country_id') {\r\n\t\t\t\t\t$options['id'] = 'js-country_id';\r\n }\r\n\t\t\t\tif ($field['name'] == 'Item.is_additional_fee_to_buyer' || $field['name'] == 'Form.is_additional_fee_to_buyer' || $field['name'] == 'Request.is_additional_fee_to_buyer') {\r\n\t\t\t\t\t$options['id'] = 'js-additional-fee-to-buyer';\r\n }\r\n if (!empty($field['class'])) {\r\n $options['class'] = $field['class'];\r\n }\r\n if ($field['name'] == 'Item.feed_url') {\r\n $options['class'] = 'js-remove-error';\r\n }\r\n }\r\n switch ($field['type']) {\r\n case 'fieldset':\r\n if ($this->openFieldset == true) {\r\n $out.= '</fieldset>';\r\n }\r\n $out.= '<fieldset>';\r\n $this->openFieldset = true;\r\n if (!empty($field['name'])) {\r\n $out.= '<legend>' . Inflector::humanize($field['label']) . '</legend>';\r\n $out.= $this->Form->hidden('fs_' . $field['name'], array(\r\n 'value' => $field['name']\r\n ));\r\n }\r\n break;\r\n\r\n case 'textonly':\r\n $out = $this->Html->para('textonly', $field['label']);\r\n break;\r\n\r\n default:\r\n $options['type'] = $field['type'];\r\n $options['info'] = $field['info'];\r\n if (in_array($field['type'], array(\r\n 'select',\r\n 'checkbox',\r\n 'radio'\r\n ))) {\r\n if (!empty($field['options']) && !is_array($field['options'])) {\r\n $field['options'] = str_replace(', ', ',', $field['options']);\r\n\t\t\t\t\t\t\tif(!empty($field['is_deletable'])) {\r\n\t\t\t\t\t\t\t\t$a = $b = $this->explode_escaped(',', $field['options']);\r\n\t\t\t\t\t\t\t\t$field['options'] = array_combine($a, $b);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$field['options'] = $this->explode_escaped(',', $field['options']);\r\n\t\t\t\t\t\t\t}\r\n }\r\n if ($field['type'] == 'checkbox') {\r\n if (count($field['options']) > 1) {\r\n $options['type'] = 'select';\r\n $options['multiple'] = 'checkbox';\r\n $options['options'] = $field['options'];\r\n\t\t\t\t\t\t\t\t$options['div'] = 'input checkbox pull-left hor-smspace no-mar span20';\r\n\t\t\t\t\t\t\t\t$options['class'] = 'checkbox span5 no-mar';\r\n } else {\r\n\t\t\t\t\t\t\t\tif($field['name'] == 'Item.is_user_can_request' || $field['name'] == 'Item.is_have_definite_time') {\r\n\t\t\t\t\t\t\t\t\t$options['value'] = 0;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t$options['value'] = $field['name'];\r\n\t\t\t\t\t\t\t\t}\r\n }\r\n } else {\r\n $options['options'] = $field['options'];\r\n }\r\n if ($field['type'] == 'select' && !empty($field['multiple']) && $field['multiple'] == 'multiple') {\r\n $options['multiple'] = 'multiple';\r\n } elseif ($field['type'] == 'select') {\r\n $options['empty'] = __l('Please Select');\r\n }\r\n }\r\n if (!empty($field['depends_on']) && !empty($field['depends_value'])) {\r\n $options['class'] = 'dependent';\r\n $options['dependsOn'] = $field['depends_on'];\r\n $options['dependsValue'] = $field['depends_value'];\r\n }\r\n $options['info'] = str_replace(\"##MULTIPLE_AMOUNT##\", Configure::read('equity.amount_per_share') , $options['info']);\r\n $options['info'] = str_replace(\"##SITE_CURRENCY##\", Configure::read('site.currency') , $options['info']);\r\n $field['label'] = str_replace(\"##SITE_CURRENCY##\", Configure::read('site.currency') , $field['label']);\r\n if (!empty($field['label'])) {\r\n $options['label'] = $field['label'];\r\n if ($field['type'] == 'radio') {\r\n $options['legend'] = $field['label'];\r\n }\r\n }\r\n if ($field['type'] == 'file') {\r\n if ($field['name'] != 'Attachment.filename') {\r\n $options['class'] = (!empty($options['class'])) ? $options['class'] : '';\r\n $options['class'].= \" {'UmimeType':'*', 'Uallowedsize':'5','UallowedMaxFiles':'1'}\";\r\n }\r\n }\r\n if ($field['type'] == 'radio') {\r\n $options['div'] = true;\r\n $options['legend'] = false;\r\n $options['multiple'] = 'radio';\r\n }\r\n if ($field['type'] == 'slider') {\r\n for ($num = 1; $num <= 100; $num++) {\r\n $num_array[$num] = $num;\r\n }\r\n $options['div'] = 'input select slider-input-select-block clearfix' . ' ' . $required;\r\n $options['options'] = $num_array;\r\n $options['type'] = 'select';\r\n $options['class'] = 'js-uislider';\r\n $options['label'] = false;\r\n $i = 0;\r\n if (!empty($field['options'])) {\r\n foreach($field['options'] as $value) {\r\n if ($i == 0) {\r\n $options['before'] = '<div class=\"clearfix\"><span class=\"grid_left uislider-inner\">' . $value . '</span>';\r\n } else {\r\n $options['after'] = '<span class=\"grid_left uislider-right\">' . $value . '</span></div>';\r\n }\r\n $i++;\r\n }\r\n }\r\n $out.= $this->Html->div('label-block slider-label ' . $required, $field['label']);\r\n }\r\n if ($field['type'] == 'date') {\r\n $options['div'] = $required;\r\n $options['orderYear'] = 'asc';\r\n $options['minYear'] = date('Y') -10;\r\n $options['maxYear'] = date('Y') +10;\r\n }\r\n if ($field['type'] == 'datetime') {\r\n $options['div'] = 'clearfix';\r\n $options['div'] = 'input text ' . ' ' . $required;\r\n $options['orderYear'] = 'asc';\r\n $options['minYear'] = date('Y') -10;\r\n $options['maxYear'] = date('Y') +10;\r\n }\r\n if ($field['type'] == 'time') {\r\n $options['div'] = 'clearfix';\r\n $options['div'] = 'input text js-time' . ' ' . $required;\r\n $options['orderYear'] = 'asc';\r\n $options['timeFormat'] = 12;\r\n $options['type'] = 'time';\r\n }\r\n if ($field['type'] == 'color') {\r\n $options['div'] = 'input text clearfix' . ' ' . $required;\r\n $options['class'] = 'js-colorpick';\r\n if (!empty($field['info'])) {\r\n $info = $field['info'] . ' <br>'.__l('Comma separated RGB hex code. You can use color picker.');\r\n } else {\r\n $info = __l('Comma separated RGB hex code. You can use color picker.');\r\n }\r\n $options['info'] = $info;\r\n $options['type'] = 'text';\r\n }\r\n if ($field['type'] == 'thumbnail') {\r\n $options['div'] = 'clearfix';\r\n $options['div'] = 'input text' . ' ' . $required;\r\n }\r\n if (!empty($field['default']) && empty($this->data['Form'][$field['name']])) {\r\n $options['value'] = $field['default'];\r\n }\r\n if ($field['type'] == 'text') {\r\n $options['div'] = 'clearfix';\r\n $options['div'] = 'input text' . ' ' . $required;\r\n }\r\n if ($field['type'] == 'textarea') {\r\n $options['div'] = 'clearfix';\r\n $options['div'] = 'input textarea' . ' ' . $required;\r\n }\r\n if ($field['type'] == 'select') {\r\n $options['div'] = 'clearfix';\r\n $options['div'] = 'input select' . ' ' . $required;\r\n if (!empty($field['multiple']) && $field['multiple'] == 'multiple') {\r\n $options['div'].= ' multi-select';\r\n }\r\n }\r\n $options = Set::merge($custom_options, $options);\r\n if ($field['type'] == 'date' || $field['type'] == 'datetime' || $field['type'] == 'time') {\r\n if ($field['name'] == 'Item.item_end_date') {\r\n $date_display = date('Y-m-d', strtotime('+' . Configure::read('maximum_item_expiry_day') . ' days'));\r\n } else {\r\n $date_display = date('Y-m-d');\r\n }\r\n if ($field['type'] == 'datetime') {\r\n $out.= '<div class=\"input js-datetimepicker clearfix ' . $required . '\"><div class=\"js-cake-date\">';\r\n } elseif($field['type'] == 'time') {\r\n $out.= '<div class=\"input js-time clearfix ' . $required . '\"><div class=\"js-cake-date\">';\r\n } else {\r\n $out.= '<div class=\"input js-datetime clearfix ' . $required . '\"><div class=\"js-cake-date\">';\r\n }\r\n }\r\n if ($field['type'] == 'radio') {\r\n $out.= '<div class=\"input select radio-block clearfix\">';\r\n $out.= '<label class=\"label-block pull-left ' . $required . '\" for=\"' . $field['name'] . '\">' . $field['label'] . '</label>';\r\n }\r\n if ($field['name'] == 'Item.short_description') {\r\n $options['class'] = 'js-preview-keyup js-no-pjax js-description-count {\"display\":\"js-short-description\",\"field\":\"js-short-description-count\",\"count\":\"' . Configure::read('Item.item_short_description_length') . '\"}';\r\n $options['info'] = $field['info'] . ' ' . '<span class=\"character-info\">' . __l('You have') . ' ' . '<span id=\"js-short-description-count\"></span>' . ' ' . __l('characters left') . '</span>';\r\n }\r\n if (!empty($field['name']) && $field['name'] == 'Item.description') {\r\n $options['label'] = __l('Description');\r\n $options['info'] = false;\r\n }\r\n if (!empty($field['name']) && $field['name'] == 'Item.needed_amount') {\r\n $options['label'] = __l('Needed amount') . ' (' . Configure::read('site.currency') . ')';\r\n }\r\n\t\t\t\t\tif (!empty($field['name']) && $field['name'] == 'Item.title') {\r\n $options['label'] = __l('Name');\r\n }\r\n\t\t\t\t\tif (!empty($field['name']) && $field['name'] == 'Item.address') {\r\n $options['label'] = __l('Address');\r\n }\r\n\t\t\t\t\tif ($field['type'] == 'checkbox') {\r\n\t\t\t\t\t\tif (count($field['options']) > 1) {\r\n\t\t\t\t\t\t\t$out .= '<div class=\"amenities-list\"><div class=\"clearfix\"><div class=\"pull-left span4 span4-sm no-mar ver-space dr mob-dl\"><span class=\"hor-space show\">' . $field['label'] . '</span></div>';\r\n\t\t\t\t\t\t\t$options['label'] = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n if ($field['name'] != 'Attachment.filename') {\r\n\t\t\t\t\t\t$out.= $this->Form->input($field['name'], $options);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($field['type'] == 'checkbox') {\r\n\t\t\t\t\t\tif (count($field['options']) > 1) {\r\n\t\t\t\t\t\t\t$out.= '</div></div>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n if (!empty($field['name']) && $field['name'] == 'Item.description') {\r\n $out.= '<span class=\"info grayc\"><i class=\"grayc icon-info-sign\"></i> ' . __l('Entered description will display in view page') . '</span>';\r\n }\r\n if ($field['type'] == 'date' || $field['type'] == 'datetime' || $field['type'] == 'time') {\r\n $out.= '</div></div>';\r\n }\r\n if ($field['type'] == 'radio') {\r\n $out.= '</div>';\r\n }\r\n if (!empty($field['name']) && $field['name'] == 'City.name') {\r\n\t\t\t\t\t\t// todo: this is not correct fix, need to fix it [admin_preview cond]\r\n\t\t\t\t\t\tif($this->request->action != 'admin_preview'){\r\n\t\t\t\t\t\t\t$out.= '</div></div></div><div class=\"pull-right js-side-map-div ' . $class . '\"><h5>' . __l('Point Your Location') . '</h5><div class=\"js-side-map\"><div id=\"js-map-container\"></div><span>' . __l('Point the exact location in map by dragging marker') . '</span></div></div><div id=\"mapblock\"><div id=\"mapframe\"><div id=\"mapwindow\"></div></div></div></div></div>';\r\n\t\t\t\t\t\t}\r\n }\r\n\t\t\t\t\tif (!empty($field['name']) && ($field['name'] == 'Item.is_additional_fee_to_buyer' || $field['name'] == 'Form.is_additional_fee_to_buyer' || $field['name'] == 'Request.is_additional_fee_to_buyer')) {\r\n\t\t\t\t\t\t$out.= '<div class=\"js-additional-fee-block hide\">';\r\n\t\t\t\t\t\t$out.= $this->Form->input('Item.additional_fee_name', array('type' => 'text'));\r\n\t\t\t\t\t\t$out.= $this->Form->input('Item.additional_fee_percentage', array('type' => 'text'));\r\n\t\t\t\t\t\t$out.= '</div>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($field['name'] == 'Item.min_number_of_ticket') {\r\n\t\t\t\t\t\t$out.= '</div>';\r\n\t\t\t\t\t}\r\n break;\r\n }\r\n }\r\n return $out;\r\n }", "title": "" }, { "docid": "0bd115f520bcc3baf47acf6eb2b804d0", "score": "0.6008289", "text": "static function get_custom_field($field, $separator=',')\n\t{\n\t\t// the_ID() function won't work because it prints its output\n\t\t$post_id = get_the_ID();\n\t\t$output_array = get_post_meta($post_id, $field);\n\t\tprint implode($separator, $output_array);\n\t}", "title": "" }, { "docid": "a0826e6dd4cf7f37aa7be05f12ac9dd0", "score": "0.5997207", "text": "function get_settings_fields() {\n $settings_fields = array(\n '{%= function_prefix %}_settings' => array(\n array(\n 'name' => 'text',\n 'label' => __( 'Text Field', '{%= text_domain %}' ),\n 'desc' => __( 'Text Field Desc', '{%= text_domain %}' ),\n 'placeholder' => __( 'Place Holder', '{%= text_domain %}' ),\n 'type' => 'text',\n ),\n )\n );\n return apply_filters( '{%= function_prefix %}_settings_fields', $settings_fields );\n }", "title": "" }, { "docid": "5c26f7b8962eb59ece14c969fc1b4011", "score": "0.5993405", "text": "function pp_field_suv_callback() {\n $setting = esc_attr( get_option( 'pp-suv' ) );\n echo \"<input type='text' name='pp-suv' value='$setting' />\";\n}", "title": "" }, { "docid": "9e55b4b63d5e5408a038eff5fc24b923", "score": "0.5991152", "text": "function ap_render_field( $id ) {\n global $ap_fields;\n\n $options = get_option( 'ap_options' );\n\n // If options are not set yet for that ID, grab the default value.\n $field_value = isset( $options[ $id ] ) ? $options[ $id ] : ap_get_field_default( $id );\n\n // Generate HTML markup based on field type.\n switch ( $ap_fields[ $id ]['type'] ) {\n case 'text': \n echo \"<input type='text' name='ap_options[\" . $id . \"]' value='\" . $field_value . \"' />\";\n echo \"<p class='description'>\" . $ap_fields[ $id ]['desc'] . \"</p>\";\n \n break;\n\n case 'upload':\n $visibility_class = ( '' != $field_value ) ? \"\" : \"hide\";\n\n echo \"<img src='\" . $field_value . \"' alt='Logo' class='ap-custom-thumbnail \" . $visibility_class . \"' id='\" . $id . \"-thumbnail' />\";\n echo \"<input type='hidden' name='ap_options[\" . $id . \"]' id='\" . $id . \"-upload-field' value='\" . $field_value . \"' />\";\n echo \"<input type='button' class='btn-upload-img button' value='Upload logo' data-field-id='\" . $id . \"' />\";\n echo \"<input type='button' class='btn-remove-img button \" . $visibility_class . \"' value='Remove logo' data-field-id='\" . $id . \"' id='\" . $id . \"-remove-button' />\";\n echo \"<p class='description'>\" . $ap_fields[ $id ]['desc'] . \"</p>\";\n \n break;\n\n case 'textarea': \n echo \"<textarea name='ap_options[\" . $id . \"]' cols='40' rows='10'>\" . $field_value . \"</textarea>\";\n echo \"<p class='description'>\" . $ap_fields[ $id ]['desc'] . \"</p>\";\n \n break;\n\n case 'checkbox':\n echo \"<input type='checkbox' name='ap_options[\" . $id . \"]' id='\" . $id . \"' value='1' \" . checked( $field_value, 1, false ) . \" />\";\n echo \"<label for='\" . $id . \"'>\" . $ap_fields[ $id ]['label'] . \"</label>\";\n\n break;\n\n case 'radio': \n // Generate as many radio buttons as there are children.\n for ( $i = 0; $i < sizeof( $ap_fields[ $id ]['children'] ); $i++ ) {\n echo \"<p>\";\n echo \"<input type='radio' name='ap_options[\" . $id . \"]' id='ap_options[\" . $id . \"]-\" . $i . \"' value='\" . $i . \"' \" . checked( $field_value, $i, false ) . \" />\";\n echo \"<label for='ap_options[\" . $id . \"]-\" . $i . \"'>\" . $ap_fields[ $id ]['children'][ $i ] . \"</label>\";\n echo \"</p>\";\n }\n\n break;\n\n case 'select': \n echo \"<select name='ap_options[\" . $id . \"]'>\";\n for ( $i = 0; $i < sizeof( $ap_fields[ $id ]['children'] ); $i++ ) {\n echo \"<option value='\" . $i . \"' \" . selected( $field_value, $i, false ) . \">\";\n echo $ap_fields[ $id ]['children'][ $i ];\n echo \"</option>\";\n }\n echo \"</select>\";\n\n break;\n }\n}", "title": "" }, { "docid": "8a1134cd57b68fa92329d1893824fbf2", "score": "0.5984477", "text": "function wptap_custom_field($name)\n{\n\tglobal $post;\n\n\treturn get_post_meta($post->ID, $name, true);\n}", "title": "" }, { "docid": "c4197d39bc1581bf0f939812891540d8", "score": "0.5979128", "text": "function _kc_field( $args ) {\n\tif ( empty( $args['field']['attr'] ) )\n\t\t$args['field']['attr'] = array();\n\n\textract( $args, EXTR_OVERWRITE );\n\n\t$i_text = kcForm::$i_text;\n\t$field_types = array_merge(\n\t\t$i_text,\n\t\tarray(\n\t\t\t'checkbox', 'radio', 'select', 'multiselect',\n\t\t\t'multiinput', 'special', 'file', 'media',\n\t\t\t'textarea', 'editor',\n\t\t)\n\t);\n\t$type = ( !empty( $field['type'] ) && in_array( $field['type'], $field_types ) ) ? $field['type'] : 'input';\n\n\t# setup the input id and name attributes, also get the current value from db\n\tswitch ( $mode ) {\n\t\t# 0. Plugin / Theme\n\t\tcase 'plugin' :\n\t\t\t$name = \"{$prefix}_settings[{$section}][{$field['id']}]\";\n\t\t\t$id = \"{$section}__{$field['id']}\";\n\t\t\t$db_value = kc_get_option( $prefix, $section, $field['id'] );\n\t\tbreak;\n\n\t\t# 1. Attachment\n\t\tcase 'attachment' :\n\t\t\t$id = $field['id'];\n\t\t\t$name = \"attachments[{$object_id}][{$id}]\";\n\t\t\t$db_value = get_metadata( 'post', $object_id, \"_{$id}\", true );\n\t\tbreak;\n\n\t\t# 2. Subfields of multiinput field\n\t\tcase 'subfield' :\n\t\t\textract( $args['data'], EXTR_OVERWRITE );\n\t\tbreak;\n\n\t\t# 3. Menu item\n\t\tcase 'menu_item' :\n\t\t\t$id = \"edit-menu-item-{$section}-{$field['id']}-{$object_id}\";\n\t\t\t$name = \"kc-postmeta[{$section}][{$field['id']}][{$object_id}]\";\n\t\t\t$key = \"_{$field['id']}\";\n\t\t\t$db_value = ( isset($object_id) && $object_id != '' ) ? get_metadata( 'post', $object_id, $key, true ) : null;\n\t\tbreak;\n\n\t\t# 4. Nav menu\n\t\tcase 'menu_nav' :\n\t\t\t$id = \"kc-menu_navmeta-{$section}-{$field['id']}\";\n\t\t\t$name = \"kc-termmeta[{$section}][{$field['id']}]\";\n\t\t\t$key = $field['id'];\n\t\t\t$db_value = ( isset($object_id) && $object_id != '' ) ? get_metadata( 'term', $object_id, $key, true ) : null;\n\t\tbreak;\n\n\t\t# 5. Others: post, term & user meta\n\t\tdefault :\n\t\t\t$id = $field['id'];\n\t\t\t$name = \"kc-{$mode}meta[{$section}][{$id}]\";\n\t\t\t$key = ( $mode == 'post' ) ? \"_{$id}\" : $id;\n\t\t\t$db_value = ( isset($object_id) && $object_id != '' ) ? get_metadata( $mode, $object_id, $key, true ) : null;\n\t\tbreak;\n\t}\n\n\t$desc_tag = ( isset($desc_tag) ) ? $desc_tag : 'p';\n\t$desc_class = ( $mode == 'attachment' ) ? 'help' : 'description';\n\t$desc = ( isset($field['desc']) && !empty($field['desc']) ) ? \"<{$desc_tag} class='{$desc_class}'>{$field['desc']}</{$desc_tag}>\" : null;\n\n\t# Let user filter the output of the setting field\n\t$output = ( $mode !== 'subfield' ) ? apply_filters( 'kc_settings_field_before', '', $section, $field ) : '';\n\n\t# Special option with callback\n\tif ( $type == 'special' ) {\n\t\t$args['field']['name'] = $name;\n\t\t$cb_args = isset( $field['args'] ) ? $field['args'] : '';\n\t\tif ( !empty( $field['args'] ) && is_callable( $field['args'] ) )\n\t\t\t$cb_args = call_user_func_array( $field['args'], array( 'args' => $args, 'db_value' => $db_value ) );\n\n\t\t$output .= call_user_func_array( $field['cb'], array( 'args' => $args, 'db_value' => $db_value, 'cb_args' => $cb_args ) );\n\t\t$output .= $desc;\n\t}\n\n\t# File\n\telseif ( $type == 'file' ) {\n\t\t$output .= _kc_field_file( array(\n\t\t\t'parent' => ( $mode === 'post' || $mode === 'menu_item' ) ? $object_id : 0,\n\t\t\t'field' => $field,\n\t\t\t'id' => $id,\n\t\t\t'name' => $name,\n\t\t\t'db_value' => $db_value,\n\t\t) );\n\t\t$output .= \"\\t{$desc}\\n\";\n\t}\n\n\t# Media\n\telseif ( $type == 'media' ) {\n\t\t$output .= _kc_field_media( array(\n\t\t\t'parent' => ( $mode === 'post' || $mode === 'menu_item' ) ? $object_id : 0,\n\t\t\t'field' => $field,\n\t\t\t'id' => $id,\n\t\t\t'name' => $name,\n\t\t\t'db_value' => $db_value,\n\t\t) );\n\t\t$output .= \"\\t{$desc}\\n\";\n\t}\n\n\t# Multiinput\n\telseif ( $type == 'multiinput' ) {\n\t\t$field['_id'] = $id;\n\n\t\t$output .= _kc_field_multiinput( $name, $db_value, $field );\n\t\t$output .= \"\\t{$desc}\\n\";\n\t}\n\n\t# Others\n\telse {\n\t\t// Attributes\n\t\t$field_attr = wp_parse_args( $field['attr'], array( 'name' => $name, 'class' => \"kcs-{$type}\" ) );\n\n\t\tif ( $type == 'multiselect' ) {\n\t\t\t$type = 'select';\n\t\t\t$field_attr['multiple'] = 'true';\n\t\t\t$field_attr['name'] .= '[]';\n\t\t}\n\t\tif ( $type == 'checkbox' ) {\n\t\t\t$field_attr['name'] .= '[]';\n\t\t}\n\t\tif ( !in_array( $type, array( 'checkbox', 'radio' ) ) ) {\n\t\t\t$field_attr['id'] = $id;\n\t\t}\n\t\tif ( $mode === 'attachment' ) {\n\t\t\t$field_attr['id'] = $name;\n\t\t}\n\t\tif ( in_array( $type, array_merge( $i_text, array( 'textarea' ) ) ) ) {\n\t\t\t$field_attr['class'] .= ' kcs-input';\n\t\t\tif ( $mode == 'menu_item' )\n\t\t\t\t$field_attr['class'] .= ' widefat';\n\t\t}\n\n\n\t\t$field_args = array(\n\t\t\t'type' => $type,\n\t\t\t'attr' => $field_attr,\n\t\t\t'current' => $db_value,\n\t\t);\n\n\t\tforeach ( array( 'options', 'none', 'editor_settings', 'args' ) as $key )\n\t\tif ( !empty($field[ $key ]) )\n\t\t\t$field_args[ $key ] = $field[ $key ];\n\n\t\t$output .= \"\\t\" . kcForm::field( $field_args ) . \"\\n\";\n\t\t$output .= \"\\t{$desc}\\n\";\n\t}\n\n\t# Let user filter the output of the setting field\n\tif ( $mode !== 'subfield' )\n\t\t$output = apply_filters( 'kc_settings_field_after', $output, $section, $field );\n\n\tif ( isset($args['echo']) && $args['echo'] === true )\n\t\techo $output; // xss ok\n\telse\n\t\treturn $output;\n}", "title": "" }, { "docid": "17d61065d8948e65932e3965e5702121", "score": "0.5975335", "text": "function shortcode_fields($key, $value, $id){\n $output = \"\";\n $field = $value['type'];\n $field_id = $id.\"_\".$key;\n switch ($field) {\n case 'text':\n $output .= '<div id=\"'.$key.'\" class=\"zebras_shortcode_field shortcode_text_field\">';\n $output .= '<p>'.$value['desc'].'</p>';\n $output .='<label class=\"shortcode_label\" for =\"'.$field_id.'\">'.$value['label'].'</label>';\n $output .= '<input type=\"text\" value=\"'.$value['std'].'\" id =\"'.$field_id.'\" name =\"'.$field_id.'\"/>';\n $output .= '</div>';\n break;\n\n case 'textarea':\n $output .= '<div id=\"'.$key.'\" class=\"zebras_shortcode_field shortcode_textarea_field\">';\n $output .= '<p>'.$value['desc'].'</p>';\n $output .='<label class=\"shortcode_label\" for =\"'.$field_id.'\">'.$value['label'].'</label>';\n $output .= '<textarea value=\"'.$value['std'].'\" id =\"'.$field_id.'\" name =\"'.$field_id.'\"></textarea>';\n $output .= '</div>';\n break;\n\n case 'select':\n if($value['display'] == 'hidden') $select_display = \"select_hidden_display\";\n $output .= '<div id=\"'.$key.'\" class=\"zebras_shortcode_field '.$select_display.'\">';\n $output .='<label class=\"shortcode_label\" for =\"'.$field_id.'\">'.$value['label'].'</label>';\n $output .= '<select name=\"button-size\" id =\"'.$field_id.'\" name =\"'.$field_id.'\" class=\"zebras_popup_select\">';\n foreach ($value['options'] as $select_key => $select_value) {\n if($value['std'] == $select_key){\n $select = \"selected ='selected'\";\n }else $select = '';\n $output .= '<option '.$select.' value=\"'. $select_key .'\">'. $select_value .'</option>';\n }\n $output .= '</select>';\n $output .= '<p>'.$value['desc'].'</p>';\n $output .= '</div>';\n break;\n\n case 'column-display':\n $output .= '<div id=\"'.$key.'\" class=\"zebras_shortcode_field\">';\n $output .= '<div class=\"show-inner '.$field_id.' clearfix\"></div>';\n $output .= '</div>';\n break;\n\n case 'button':\n $output .= '<input type=\"button\" id=\"'.$key.'\" class=\"popup_button\" value=\"'.$value['label'].'\"/>';\n break;\n\n case 'error':\n $output .= '<span id=\"'.$key.'\" class=\"shortcode_error\">';\n $output .= '</span>';\n break;\n\n }\n echo $output;\n}", "title": "" }, { "docid": "fdd4b66c730602bb7af7fcb3ee566b69", "score": "0.59597313", "text": "function netrics_awis_callback( $args ) {\n ?>\n <input type=\"text\" id=\"newsnetrics-awis\" name=\"newsnetrics[awis]\" size=\"82\" value=\"<?php if ( isset ( $args['value'] ) ) { echo esc_attr( $args['value'] ); } ?>\" />\n <?php\n}", "title": "" }, { "docid": "b2b873d1c36130fa0e70c62e1899cc22", "score": "0.59596324", "text": "function caror_get_acf_field($key, $post = \"option\")\n{\n if (caror_is_language()) {\n $suffix = \"-_es\";\n } else {\n $suffix = \"-_en\";\n }\n return get_field($key . $suffix, $post);\n}", "title": "" }, { "docid": "72a94ce2a6d322661b1eaf1009372d4a", "score": "0.5959353", "text": "function display_congress_meta_box( $congress ) {\n $congress_price = esc_html( get_post_meta( $congress->ID, 'congress_price', true ) );\n $congress_data = esc_html( get_post_meta( $congress->ID, 'congress_data', true ) );\n $congress_time = esc_html( get_post_meta( $congress->ID, 'congress_time', true ) );\n $congress_place = esc_html( get_post_meta( $congress->ID, 'congress_place', true ) );\n ?>\n <table>\n <tr>\n <td style=\"width: 100%\">Цена вебинара (Прим* 250)</td>\n <td><input type=\"text\" size=\"180\" name=\"congress_price_d\" value=\"<?php echo $congress_price; ?>\" /></td>\n </tr>\n <tr>\n <td style=\"width: 100%\">Дата проведения (Прим* 28 окт)</td>\n <td><input type=\"text\" size=\"180\" name=\"congress_data_d\" value=\"<?php echo $congress_data; ?>\" /></td>\n </tr>\n <tr>\n <td style=\"width: 100%\">Время проведения (Прим* с 19 до 21)</td>\n <td><input type=\"text\" size=\"180\" name=\"congress_time_d\" value=\"<?php echo $congress_time; ?>\" /></td>\n </tr>\n <tr>\n <td style=\"width: 100%\">Город (Прим* Одесса)</td>\n <td><input type=\"text\" size=\"180\" name=\"congress_place_d\" value=\"<?php echo $congress_place; ?>\" /></td>\n </tr>\n </table>\n Прим* - Пример\n <?php\n}", "title": "" }, { "docid": "7ec7397430348c131dca28df62b2f536", "score": "0.59570885", "text": "public function printValues()\n {\n $value = $this->getValueFromPostOrDefault();\n\n $template = Template::getTwig()->loadTemplate('textFilter.tpl');\n return $template->render(\n array(\n 'id' => $this->id,\n 'value' => $value\n )\n );\n }", "title": "" }, { "docid": "cd0cc6a56658d6e5fc49b3a046d588cb", "score": "0.5955353", "text": "function getField( &$field, &$user, $output, $reason, $list_compare_types ) {\r\r\n\t\tswitch ( $output ) {\r\r\n\t\t\tcase 'html':\r\r\n\t\t\tcase 'rss':\r\r\n\t\t\t\treturn str_replace( \"\\n\", '<br />', parent::getField( $field, $user, $output, $reason, $list_compare_types ) );\r\r\n\t\t\tdefault:\r\r\n\t\t\t\treturn parent::getField( $field, $user, $output, $reason, $list_compare_types );\r\r\n\t\t\t\tbreak;\r\r\n\t\t}\r\r\n\t}", "title": "" }, { "docid": "b399b5b302065848e1acfa9c718e8a8a", "score": "0.5951452", "text": "function loogmanExtraA() {\n\tglobal $post;\n\t$ident = '_loogman_extra_a';\n\techo '<input type=\"hidden\" name=\"nonce' . $ident . '\" id=\"nonce' . $ident . '\" value=\"' . wp_create_nonce( plugin_basename(__FILE__) ) . '\" />';\n\t$value = get_post_meta($post->ID, $ident, true);\n\techo '<textarea id=\"' . $ident . '\" name=\"' . $ident . '\" class=\"widefat\">' . $value . '</textarea>';\n}", "title": "" }, { "docid": "80cd7a9270e302bd1b2b1f8daa4f4053", "score": "0.59483826", "text": "public static function field_input( $args ) {\n\t\t$value = get_option( $args[0] );\n\t\tprintf( '<input type=\"text\" id=\"%1$s\" name=\"%1$s\" value=\"%2$s\" class=\"regular-text\" />', esc_attr( $args[0] ), esc_attr( $value ) );\n\t\tif ( $args[1] ) {\n\t\t\tprintf( '<small class=\"admin-note\">%s</small>', esc_html( $args[1] ) );\n\t\t}\n\t}", "title": "" }, { "docid": "6b85a943ac877b202fbaf310cc1b5bf8", "score": "0.59479564", "text": "function rioexp_contact_form() {\n ob_start();\n\n esc_html(rioexp_form_markup());\n\n return ob_get_clean();\n}", "title": "" }, { "docid": "f01974a80f32a9eb5eb9eaf2b96a53f9", "score": "0.5941188", "text": "function getField( &$field, &$user, $output, $reason, $list_compare_types ) {\r\r\n\t\t$value\t\t=\tcbReplaceVars( getLangDefinition( cbUnHtmlspecialchars( $field->description ) ), $user );\t//TBD: unhtml is kept for backwards database compatibility until CB 2.0\r\r\n\t\treturn $this->_formatFieldOutput( $field->name, $value, $output, false );\r\r\n\t}", "title": "" }, { "docid": "dcb48416def0bae8122ae5a85ae91d98", "score": "0.5938926", "text": "function custom_tab_content( $slug, $tab ) {\n \n global $post;\n // Check for the custom field value\n $product = wc_get_product( $post->ID );\n $title = $product->get_meta( 'custom_field_title' );\n if( $title ) {\n // Only display our field if we've got a value for the field title\n echo(\n //'<div class=\"cfwc-custom-field-wrapper\"><label for=\"cfwc-title-field\">%s</label><input type=\"text\" id=\"cfwc-title-field\" name=\"cfwc-title-field\" value=\"\"></div>',\n esc_html( $title )\n );\n }\n }", "title": "" }, { "docid": "7fcbf14c467fc2ab1c52b9d0257e1b5a", "score": "0.5935588", "text": "function getFieldValueByType($field_value, $ind, $row, $field_name=\"\"){\n // show as text/html\n //$field_value = str_replace(\"<\", \"&lt;\", $field_value);\n //$field_value = str_replace(\">\", \"&gt;\", $field_value);\n \n // Un-quote string quoted by mysql_real_escape_string()\n if(get_magic_quotes_gpc()) {\n if(ini_get('magic_quotes_sybase')) {\n $field_value = str_replace(\"''\", \"'\", $field_value);\n } else { \n $field_value = stripslashes($field_value);\n }\n } \n \n $req_print = $this->getVariable('print');\n $req_mode = $this->getVariable('mode');\n \n if($field_name == \"\") $field_name = $this->getFieldName($ind); \n if($this->mode === \"view\"){\n $title = \"\";\n if(isset($this->columns_view_mode[$field_name]['text_length']) && ($this->columns_view_mode[$field_name]['text_length'] != \"-1\") && ($field_value != \"\")){\n if((strlen($field_value)) > $this->columns_view_mode[$field_name]['text_length']){\n $field_value = str_replace('\"', \"&quot;\", $field_value); // double quotation mark\n $field_value = str_replace(\"'\", \"&#039;\", $field_value); // single quotation mark \n if($req_print != true){\n if($this->floating_tool_tips_allowed){\n $title = \" onmouseover=\\\"return overlib('\".$field_value.\"');\\\" onmouseout='return nd();' style='cursor: help;'\";\t \n }else{\n $title = \"title='\".$field_value.\"' style='cursor: help;'\";\t\n } \n }\n $field_value = substr($field_value, 0, $this->columns_view_mode[$field_name]['text_length']).\"...\";\n }\n }\n if(array_key_exists($field_name, $this->columns_view_mode)){\n if(!isset($this->columns_view_mode[$field_name]['type'])) $field_type = \"label\";\n else $field_type = $this->columns_view_mode[$field_name]['type'];\n // format case of field value\n if(!isset($this->columns_view_mode[$field_name]['case'])){\n $field_value = $field_value;\n }else if(strtolower($this->columns_view_mode[$field_name]['case']) == \"upper\"){\n $field_value = strtoupper($field_value);\n }else if(strtolower($this->columns_view_mode[$field_name]['case']) == \"lower\") {\n $field_value = strtolower($field_value);\n }\n if($req_print == true){ $field_type = \"label\"; }\n $on_js_event = (isset($this->columns_view_mode[$field_name]['on_js_event']))?$this->columns_view_mode[$field_name]['on_js_event']:\"\"; \n\n switch($field_type){\n case \"barchart\":\n $field = (isset($this->columns_view_mode[$field_name]['field']) ? $this->columns_view_mode[$field_name]['field'] : \"\");\n if(($field != \"\") && ($this->getFieldOffset($field) != -1)) $field_value = $row[$this->getFieldOffset($field)];\n $maximum_value = (isset($this->columns_view_mode[$field_name]['maximum_value']) ? $this->columns_view_mode[$field_name]['maximum_value'] : \"\");\n $barchart_result =\"\n <table width='110px;' bgcolor='##0000ff' height='10px' align='center' cellpadding='0' cellspacing='0' \".$on_js_event.\">\n <tr title='\".$field_value.\"'>\n <td style='font-size:9px;' align='center' width='\".($field_value/$maximum_value * 100).\"px' bgcolor='#ff0000' class='class_nowrap'>\n \".(($field_value > 0) ? $field_value : \"\").\"\n </td>\n <td style='font-size:9px;' width='\".(100 - ($field_value/$maximum_value * 100)).\"px' align='center' class='class_nowrap'>\n \".(($field_value == 0) ? $field_value : \"\").\"\n </td>\n </tr>\n </table>\n \";\n return $barchart_result;\n break;\n case \"image\":\n $img_target_path = (isset($this->columns_view_mode[$field_name]['target_path']) ? $this->columns_view_mode[$field_name]['target_path'] : \"\");\n $img_width = (isset($this->columns_view_mode[$field_name]['image_width']) ? $this->columns_view_mode[$field_name]['image_width'] : \"50px\");\n $img_height = (isset($this->columns_view_mode[$field_name]['image_height']) ? $this->columns_view_mode[$field_name]['image_height'] : \"30px\");\n if(isset($this->columns_view_mode[$field_name]['default']) && ($this->columns_view_mode[$field_name]['default'] != \"\")){\n if(file_exists($img_target_path.trim($this->columns_view_mode[$field_name]['default']))){\n $img_default = \"<img src='\".$img_target_path.$this->columns_view_mode[$field_name]['default'].\"' width='\".$img_width.\"' height='\".$img_height.\"' alt='' title='' \".$on_js_event.\" />\"; \n }else{\n $img_default = \"<span class='class_label' \".$on_js_event.\">\".$this->lang['no_image'].\"</span>\"; \n } \n }else{\n $img_default = \"\";\n }\n if((trim($field_value) !== \"\") && file_exists($img_target_path.trim($field_value))){\n return $this->nbsp.\"<img src='\".$img_target_path.trim($field_value).\"' border='1' width='\".$img_width.\"' height='\".$img_height.\"' align='middle' \".$on_js_event.\" />\".$this->nbsp;\n }else{ \n return \"<table align='center' style='border: solid 1px #000000;' width='\".$img_width.\"' height='\".$img_height.\"'><tr><td align='center'>\".$img_default.\"</td></tr></table>\";\n }\n break;\n case \"label\":\n if((trim($field_value) != \"\")\n // we need this for right handling wysiwyg editor values\n && (trim(strtolower($field_value)) !== \"<pre></pre>\")\n && (trim(strtolower($field_value)) !== \"<pre>\".$this->nbsp.\"</pre>\")\n && (trim(strtolower($field_value)) !== \"<p></p>\")\n && (trim(strtolower($field_value)) !== \"<p>\".$this->nbsp.\"</p>\")){ \n return $this->nbsp.\"<label class='class_label' \".$title.\" \".$on_js_event.\">\".trim($field_value).\"</label>\".$this->nbsp;\n }else{\n return \"&nbsp;&nbsp;\";\n }\n break; \n case \"link\": \n if(isset($this->columns_view_mode[$field_name]['field_data']) && (trim($this->columns_view_mode[$field_name]['field_data']) != \"\")){\n $href_inner = (isset($this->columns_view_mode[$field_name]['href']))?$this->columns_view_mode[$field_name]['href']:\"\";\n $target_inner = (isset($this->columns_view_mode[$field_name]['target']))?$this->columns_view_mode[$field_name]['target']:\"\";\n foreach ($this->columns_view_mode[$field_name] as $search_field_key => $search_field_value){\n if(substr($search_field_key, 0, 9) == \"field_key\"){\n $field_number = intval(substr($search_field_key, 10, strlen($search_field_key) - 10));\n $field_inner = $row[$this->getFieldOffset($search_field_value)];\n if(strpos($href_inner, \"{\".$field_number.\"}\") >= 0){\n $href = str_replace(\"{\".$field_number.\"}\", $field_inner, $href_inner);\n } \n } \n }\n // remove unexpected 'http://'s \n if(strstr($href_inner, \"http://\") != \"\"){\n $href = str_replace(\"http://\", \"\", $href);\n $href = \"http://\".$href;\n }\n return $this->nbsp.\"<a class='\".$this->unique_prefix.\"class_a2' href='\".$href.\"' target='\".$target_inner.\"' \".$title.\" \".$on_js_event.\">\".trim($row[$this->getFieldOffset($this->columns_view_mode[$field_name]['field_data'])]).\"</a>\".$this->nbsp;\n }else{\n return $this->nbsp; \n } \n break;\n case \"linktoview\";\n $curr_url = $this->combineUrl(\"details\", intval($row[(($this->getFieldOffset($this->primary_key) != -1) ? $this->getFieldOffset($this->primary_key) : 0)])); \n $this->setUrlStringPaging($curr_url);\n $this->setUrlStringSorting($curr_url);\n $this->setUrlStringFiltering($curr_url); \n return $this->nbsp.\"<a class='\".$this->unique_prefix.\"class_a' href='$curr_url' \".$title.\" \".$on_js_event.\">\".trim($field_value).\"</a>\".$this->nbsp;\n break;\n case \"linktoedit\";\n $curr_url = $this->combineUrl(\"edit\", intval($row[(($this->getFieldOffset($this->primary_key) != -1) ? $this->getFieldOffset($this->primary_key) : 0)])); \n $this->setUrlStringPaging($curr_url);\n $this->setUrlStringSorting($curr_url);\n $this->setUrlStringFiltering($curr_url); \n return $this->nbsp.\"<a class='\".$this->unique_prefix.\"class_a' href='$curr_url' \".$title.\" \".$on_js_event.\">\".trim($field_value).\"</a>\".$this->nbsp;\n break;\n case \"password\":\n return $this->nbsp.\"<label class='class_label' \".$title.\" \".$on_js_event.\">******</label>\".$this->nbsp;\n break; \n default:\n return $this->nbsp.\"<label class='class_label' \".$title.\" \".$on_js_event.\">\".trim($field_value).\"</label>\".$this->nbsp; break;\n }\n } \n }else if(($this->mode === \"edit\") || ($this->mode === \"details\")){\n\n if(array_key_exists($field_name, $this->columns_edit_mode)){\n // detect maxlength for the current field\n $field_maxlength = $this->getFieldInfo($field_name, 'len', 0);\n if($field_maxlength <= 0) $field_maxlength = \"\";\n else $field_maxlength = \"maxlength='\".$field_maxlength.\"'\"; \n if(!isset($this->columns_edit_mode[$field_name]['maxlength']) ){\n if(!$this->isText($field_name)){\n $field_maxlength = \"maxlength='50'\";\n }\n }else{\n if(($this->columns_edit_mode[$field_name]['maxlength'] != \"-1\") && ($this->columns_edit_mode[$field_name]['maxlength'] != \"\")){\n $field_maxlength = \"maxlength='\".$this->columns_edit_mode[$field_name]['maxlength'].\"'\"; \n }\n } \n if(!isset($this->columns_edit_mode[$field_name]['type'])){ $field_type = \"label\"; }\n else $field_type = $this->columns_edit_mode[$field_name]['type'];\n // get required prefix for a field\n $field_req_type = (isset($this->columns_edit_mode[$field_name]['req_type']) ? $this->columns_edit_mode[$field_name]['req_type'] : \"\");\n if(strlen(trim($field_req_type)) == 3){ $field_req_type = $field_req_type; }\n else if(strlen(trim($field_req_type)) == 2){ $field_req_type = $field_req_type.\"y\"; }\n else { $field_req_type = \"syy\"; } \n if(isset($this->columns_edit_mode[$field_name]['width']) && (trim($this->columns_edit_mode[$field_name]['width']) != \"\")) $field_width = \"style='width:\".$this->columns_edit_mode[$field_name]['width'].\";'\";\n else $field_width = \"\";\n if(isset($this->columns_edit_mode[$field_name]['readonly']) && ((($this->columns_edit_mode[$field_name]['readonly']) === true) || (($this->columns_edit_mode[$field_name]['readonly']) === \"true\"))) { $readonly = \"readonly='readonly'\"; $disabled = \"disabled\"; }\n else { $readonly = \"\"; $disabled = \"\"; }\n if($req_print == true){ $field_type = \"print\"; }\n // get default value of field\n if(($req_mode == \"add\") || ($field_type == \"hidden\")){\n if(isset($this->columns_edit_mode[$field_name]['default'])) $field_value = $this->columns_edit_mode[$field_name]['default'];\n }\n $on_js_event = (isset($this->columns_edit_mode[$field_name]['on_js_event']))?$this->columns_edit_mode[$field_name]['on_js_event']:\"\"; \n \n if ($this->mode === \"edit\"){\n // save entered values from fields in add/edit modes\n $req_field_value = $this->getVariable($field_req_type.$field_name, false, \"post\");\n if($req_field_value != \"\") $field_value = $req_field_value;\n switch($field_type){\n case \"checkbox\": \n $checked = \"\";\n if(isset($this->columns_edit_mode[$field_name]['true_value']) && isset($this->columns_edit_mode[$field_name]['false_value'])){\n if($field_value == $this->columns_edit_mode[$field_name]['true_value']){\n $checked = \"checked\";\n }\n }\n echo \"<input class='class_checkbox' type='checkbox' name='\".$this->getFieldRequiredType($field_name).$field_name.\"' id='\".$this->getFieldRequiredType($field_name).$field_name.\"' title='\".$this->getFieldTitle($field_name).\"' value='\".trim($field_value).\"' \".$checked.\" \".$readonly.\" \".$on_js_event.\">\".$this->nbsp;\n break; \n case \"date\":\n $ret_date = $this->nbsp.\"<input class='class_textbox' \".$field_width.\" readonly type='text' title='\".$this->getFieldTitle($field_name).\"' name='\".$this->getFieldRequiredType($field_name).$field_name.\"' value='\".trim($field_value).\"' $field_maxlength \".$on_js_event.\">\";\n if(!$readonly) $ret_date .= \"<a class='\".$this->unique_prefix.\"class_a2' title='\".$this->getFieldTitle($field_name).\"' href=\\\"javascript: \".$this->unique_prefix.\"openCalendar('', '\".$this->unique_prefix.\"frmEditRow', '$field_req_type', '\".$field_name.\"', '$field_type')\\\"><img src='\".$this->directory.\"images/\".$this->css_class.\"/cal.gif' border='0' alt='\".$this->lang['set_date'].\"' title='\".$this->lang['set_date'].\"' align='top' style='margin:3px;margin-left:6px;margin-right:6px;' /></a>\".$this->nbsp;\n if(!$readonly) $ret_date .= \"<a class='\".$this->unique_prefix.\"class_a2' style='cursor: pointer;' onClick='document.getElementById(\\\"\".$this->getFieldRequiredType($field_name).$field_name.\"\\\").value=\\\"\".date(\"Y-m-d\").\"\\\"'>[\".date(\"Y-m-d\").\"]</a>\";\n return $ret_date;\n break; \n case \"datedmy\": \n $ret_date = $this->nbsp.\"<input class='class_textbox' \".$field_width.\" readonly type='text' title='\".$this->getFieldTitle($field_name).\"' id='\".$this->getFieldRequiredType($field_name).$field_name.\"' name='\".$this->getFieldRequiredType($field_name).$field_name.\"' value='\".$this->myDate($field_value, \"datedmy\").\"' $field_maxlength \".$on_js_event.\">\";\n if(!$readonly) $ret_date .= \"<a class='\".$this->unique_prefix.\"class_a2' title='\".$this->getFieldTitle($field_name).\"' href=\\\"javascript: \".$this->unique_prefix.\"openCalendar('', '\".$this->unique_prefix.\"frmEditRow', '$field_req_type', '\".$field_name.\"', '$field_type')\\\"><img src='\".$this->directory.\"images/\".$this->css_class.\"/cal.gif' border='0' alt='\".$this->lang['set_date'].\"' title='\".$this->lang['set_date'].\"' align='top' style='margin:3px;margin-left:6px;margin-right:6px;' /></a>\".$this->nbsp;\n if(!$readonly) $ret_date .= \"<a class='\".$this->unique_prefix.\"class_a2' style='cursor: pointer;' onClick='document.getElementById(\\\"\".$this->getFieldRequiredType($field_name).$field_name.\"\\\").value=\\\"\".date(\"d-m-Y\").\"\\\"'>[\".date(\"d-m-Y\").\"]</a>\"; \n return $ret_date;\n break; \n case \"datetime\": \n $ret_date = $this->nbsp.\"<input class='class_textbox' \".$field_width.\" readonly type='text' title='\".$this->getFieldTitle($field_name).\"' id='\".$this->getFieldRequiredType($field_name).$field_name.\"' name='\".$this->getFieldRequiredType($field_name).$field_name.\"' value='\".trim($field_value).\"' $field_maxlength \".$on_js_event.\">\";\n if(!$readonly) $ret_date .= \"<a class='\".$this->unique_prefix.\"class_a2' title='\".$this->getFieldTitle($field_name).\"' href=\\\"javascript: \".$this->unique_prefix.\"openCalendar('', '\".$this->unique_prefix.\"frmEditRow', '$field_req_type', '\".$field_name.\"', '$field_type')\\\"><img src='\".$this->directory.\"images/\".$this->css_class.\"/cal.gif' border='0' alt='\".$this->lang['set_date'].\"' title='\".$this->lang['set_date'].\"' align='top' style='margin:3px;margin-left:6px;margin-right:6px;' /></a>\".$this->nbsp;\n if(!$readonly) $ret_date .= \"<a class='\".$this->unique_prefix.\"class_a2' style='cursor: pointer;' onClick='document.getElementById(\\\"\".$this->getFieldRequiredType($field_name).$field_name.\"\\\").value=\\\"\".date(\"Y-m-d H:i:s\").\"\\\"'>[\".date(\"Y-m-d H:i:s\").\"]</a>\";\n return $ret_date;\n break; \n case \"datetimedmy\":\n $ret_date = $this->nbsp.\"<input class='class_textbox' \".$field_width.\" readonly type='text' title='\".$this->getFieldTitle($field_name).\"' id='\".$this->getFieldRequiredType($field_name).$field_name.\"' name='\".$this->getFieldRequiredType($field_name).$field_name.\"' value='\".$this->myDate($field_value, \"datetimedmy\").\"' $field_maxlength \".$on_js_event.\">\";\n if(!$readonly) $ret_date .= \"<a class='\".$this->unique_prefix.\"class_a2' title='\".$this->getFieldTitle($field_name).\"' href=\\\"javascript: \".$this->unique_prefix.\"openCalendar('', '\".$this->unique_prefix.\"frmEditRow', '$field_req_type', '\".$field_name.\"', '$field_type')\\\"><img src='\".$this->directory.\"images/\".$this->css_class.\"/cal.gif' border='0' alt='\".$this->lang['set_date'].\"' title='\".$this->lang['set_date'].\"' align='top' style='margin:3px;margin-left:6px;margin-right:6px;' /></a>\".$this->nbsp;\n if(!$readonly) $ret_date .= \"<a class='\".$this->unique_prefix.\"class_a2' style='cursor: pointer;' onClick='document.getElementById(\\\"\".$this->getFieldRequiredType($field_name).$field_name.\"\\\").value=\\\"\".date(\"d-m-Y H:i:s\").\"\\\"'>[\".date(\"d-m-Y H:i:s\").\"]</a>\"; \n return $ret_date;\n break;\n case \"enum\": \n $ret_enum = \"\";\n $enum_view_type = (isset($this->columns_edit_mode[$field_name]['view_type'])) ? $this->columns_edit_mode[$field_name]['view_type'] : \"\";\n switch($enum_view_type){\n case \"radiobutton\":\n if(isset($this->columns_edit_mode[$field_name]['source']) && is_array($this->columns_edit_mode[$field_name]['source'])){\n $ret_enum .= $this->nbsp.$this->drawRadioButtons($this->getFieldRequiredType($field_name).$field_name, $field_name, $this->columns_edit_mode[$field_name]['source'], $field_value, 'source', \"\", $disabled, $on_js_event).$this->nbsp;\n }else{\n $ret_enum .= $this->nbsp.$this->drawRadioButtons($this->getFieldRequiredType($field_name).$field_name, $field_name, $this->getEnumValues($this->tbl_name, $field_name), $field_value, 'source', \"\", $disabled, $on_js_event).$this->nbsp;\n } \n break; \n case \"dropdownlist\":\n default:\n if(isset($this->columns_edit_mode[$field_name]['source']) && is_array($this->columns_edit_mode[$field_name]['source'])){ \n $ret_enum .= $this->nbsp.$this->drawDropDownList($this->getFieldRequiredType($field_name).$field_name, '', $this->columns_edit_mode[$field_name]['source'], $field_value, \"\", \"\", \"\", $disabled, $on_js_event).$this->nbsp;\n }else{\n $ret_enum .= $this->nbsp.$this->drawDropDownList($this->getFieldRequiredType($field_name).$field_name, '', $this->getEnumValues($this->tbl_name, $field_name), trim($field_value), \"\", \"\", \"\", $disabled, $on_js_event).$this->nbsp;\n }\n break;\n }\n return $ret_enum;\n break;\n case \"hidden\":\n $ret_hidden =\"<input type='hidden' id='\".$this->getFieldRequiredType($field_name).$field_name.\"' name='\".$this->getFieldRequiredType($field_name).$field_name.\"' value='\".trim($field_value).\"' />\";\n return $ret_hidden; \n break; \n case \"image\":\n case \"file\":\n $ret_file = \"\";\n $file = false;\n $file_error_msg = \"\";\n $file_name_view = $field_value;\n $file_act = $this->getVariable('file_act');\n $file_id = $this->getVariable('file_id');\n $rid = $this->getVariable('rid');\n // where the file is going to be placed \n $target_path = $this->getFieldProperty($field_name, 'target_path');\n \n if($this->getFieldProperty($field_name, \"host\") == \"remote\"){\n // *** upload file from url (remote host)\n \n $ret_file = \"<script type='text/javascript'>\n <!--\n function fileAction(file_act, file_id){\n document.\".$this->unique_prefix.\"frmEditRow.action='\".$this->HTTP_URL.\"?\".$_SERVER['QUERY_STRING'].\"&\".$this->unique_prefix.\"file_act='+file_act+'&\".$this->unique_prefix.\"file_id='+file_id;\n document.\".$this->unique_prefix.\"frmEditRow.method='POST';\n document.\".$this->unique_prefix.\"frmEditRow.submit();\n }\n \\n//-->\\n\n </script>\";\n if(trim($field_value) == \"\"){\n if(($file_act == \"upload\") && ($file_id == $field_name)){\n $file_error_msg = $this->lang['file_uploading_error'];\n $file = false;\n }\n }else{\n if(($file_act == \"remove\") && ($file_id == $field_name)){ \n $sql = \"UPDATE $this->tbl_name SET \".$field_name.\" = '' WHERE $this->primary_key = '\".$rid.\"' \";\n $this->db_handler->query($sql);\n // delete file from target path\n if(file_exists($target_path.$field_value)){ unlink($target_path.$field_value); }\n else{ $file_error_msg = $this->lang['file_deleting_error']; }\n $file = false;\n }else if(($file_act == \"upload\") && ($file_id == $field_name)){\n if($downloaded_file = fopen($field_value, \"r\")){\n $content = fread($downloaded_file, $this->getRemoteFilesize($field_value));\n // get file name from url\n $field_value = strrev($field_value);\n $last_slash = strlen($field_value) - strpos($field_value,'/');\n $field_value = strrev($field_value);\n if($last_slash) { $field_value = substr($field_value,$last_slash); }\n if(isset($this->columns_edit_mode[$field_name]['file_name']) && ($this->columns_edit_mode[$field_name]['file_name'] != \"\")){\n $file_name_view = $this->columns_edit_mode[$field_name]['file_name'].strchr(basename($field_value),\".\");\n $field_value = $file_name_view; \n } \n if($uploaded_file = fopen($this->columns_edit_mode[$field_name]['target_path'].$field_value, \"w\")){\n if(!fwrite($uploaded_file, $content)){\n $file_error_msg = $this->lang['file_writing_error'];\n $file = false;\n }else{\n //echo \"eee\";\n $sql = \"UPDATE $this->tbl_name SET \".$field_name;\n $sql .= \" = '\".$field_value.\"' \"; \n $sql .= \" WHERE $this->primary_key= '\".$rid.\"' \";\n $this->db_handler->query($sql); \n $file = true;\n fclose($uploaded_file);\n } \n }\n fclose($downloaded_file);\n }else{\n $file_error_msg = $this->lang['file_uploading_error']; \n }\n }else{\n $file = true;\n }\n } \n // if there is a file (uploaded or exists)\n if($file == true){\n //echo $target_path.$field_value;\n if(strlen($field_value) > 40){\n $str_start = strlen($field_value) - 40;\n $str_prefix = \"...\";\n }else{\n $str_start = 0;\n $str_prefix = \"\";\n }\n //$ret_file .= \"<input type='hidden' name='\".$this->unique_prefix.\"file_act' id='\".$this->unique_prefix.\"file_act' value='remove' />\";\n $ret_file .= \"<table><tr valign='middle'><td align='center'>\";\n if($field_type == \"image\"){\n list($f_width, $f_height, $f_type, $f_attr) = getimagesize($target_path.$field_value);\n $f_size = number_format((filesize($target_path.$field_value)/1024),2,\".\",\",\").\" Kb\";\n $ret_file .= $this->nbsp.\"<img src='\".$target_path.$field_value.\"' height='90px' width='120px' title='$field_value ($f_width x $f_height - $f_size)' alt='$field_value'/>\".$this->nbsp; \n }else{\n $ret_file .= $this->nbsp.$str_prefix.substr($file_name_view, $str_start, 40).$this->nbsp; \n }\n if($field_type == \"image\") $ret_file .= \"<br />\";\n else $ret_file .= \"&nbsp;&nbsp;\";\n $ret_file .= $this->nbsp.\"[<a class='\".$this->unique_prefix.\"class_a' href='' onclick='fileAction(\\\"remove\\\", \\\"\".$field_name.\"\\\"); return false;'><b>\".$this->lang['remove'].\"</b></a>]\".$this->nbsp;\n $ret_file .= \"</td></tr></table>\";\n $ret_file .= \"<input type='hidden' value='$field_value' name='\".$this->getFieldRequiredType($field_name).$field_name.\"' id='\".$this->getFieldRequiredType($field_name).$field_name.\"' />\"; \n }else{\n //echo \"44444444\";\n //$ret_file .= \"<input type='hidden' name='\".$this->unique_prefix.\"file_act' id='\".$this->unique_prefix.\"file_act' value='upload' />\"; \n if($file_error_msg != \"\") $ret_file .= $this->nbsp.\"<label class='class_error_message no_print'>\".$file_error_msg.\"</label><br />\";\n $ret_file .= $this->nbsp.\"<input type='textbox' class='class_textbox' \".$field_width.\" title='\".$this->getFieldTitle($field_name).\"' name='\".$this->getFieldRequiredType($field_name).$field_name.\"' id='\".$this->getFieldRequiredType($field_name).$field_name.\"' \".$disabled.\" \".$on_js_event.\">&nbsp;&nbsp;\";\n $ret_file .= \"[<a class='\".$this->unique_prefix.\"class_a' \".(($disabled == \"disabled\") ? \"\" : \"href='' onclick='fileAction(\\\"upload\\\", \\\"\".$field_name.\"\\\"); return false;'\").\"><b>\".$this->lang['upload'].\"</b></a>]\".$this->nbsp; \n }\n return $ret_file;\n \n }else{\n // *** upload file from local machine \n $ret_file = \"<script type='text/javascript'>\n <!--\n function fileAction(file_act, file_id){\n document.\".$this->unique_prefix.\"frmEditRow.action='\".$this->HTTP_URL.\"?\".$_SERVER['QUERY_STRING'].\"&\".$this->unique_prefix.\"file_act='+file_act+'&\".$this->unique_prefix.\"file_id='+file_id;\n document.\".$this->unique_prefix.\"frmEditRow.encoding='multipart/form-data';\n document.\".$this->unique_prefix.\"frmEditRow.method='POST';\n document.\".$this->unique_prefix.\"frmEditRow.submit();\n }\n \\n//-->\\n\n </script>\";\n if(trim($field_value) == \"\"){\n $file = true;\n $file_name = $this->getFieldRequiredType($field_name).$field_name; \n if((count($_FILES) > 0) && ($file_id == $field_name)){ \n if (isset($_FILES[$file_name][\"error\"]) && ($_FILES[$file_name][\"error\"] > 0)){\n //debug? $file_error_msg = \"Error: \".$_FILES[$file_name][\"error\"].\"\";\n $file_error_msg = $this->lang['file_uploading_error'];\n $file = false;\n }else{\n // check file's max size\n if(isset($this->columns_edit_mode[$field_name]['max_file_size'])){\n $max_file_size = $this->columns_edit_mode[$field_name]['max_file_size']; \n if (!is_numeric($max_file_size)) { \n if (strpos($max_file_size, 'M') !== false) \n $max_file_size = intval($max_file_size)*1024*1024; \n elseif (strpos($max_file_size, 'K') !== false) \n $max_file_size = intval($max_file_size)*1024; \n elseif (strpos($max_file_size, 'G') !== false) \n $max_file_size = intval($max_file_size)*1024*1024*1024; \n } \n if(isset($_FILES[$file_name][\"size\"]) && ($_FILES[$file_name][\"size\"] > $max_file_size)){\n $file = false;\n $file_error_msg = $this->lang['file_invalid file_size'].\": \".number_format(($_FILES[$file_name][\"size\"]/1024),2,\".\",\",\").\" Kb (\".$this->lang['max'].\". \".number_format(($max_file_size/1024),2,\".\",\",\").\" Kb) \";\n }\n } \n } \n if($file == true){\n // create a directory for uploading, if it was not.\n if (!file_exists($target_path)) { mkdir($target_path,0744); }\n // add the original filename to our target path. Result is \"uploads/filename.extension\" \n if(isset($this->columns_edit_mode[$field_name]['file_name']) && ($this->columns_edit_mode[$field_name]['file_name'] != \"\")){\n $target_path_full = $target_path . $this->columns_edit_mode[$field_name]['file_name'].strchr(basename($_FILES[$file_name]['name']),\".\");\n }else{\n $target_path_full = $target_path . (isset($_FILES[$file_name]['name']) ? basename($_FILES[$file_name]['name']) : \"\") ;\n }\n if(isset($_FILES[$file_name]['tmp_name'])){\n if(move_uploaded_file($_FILES[$file_name]['tmp_name'], $target_path_full)) {\n $sql = \"UPDATE $this->tbl_name SET \".$field_name;\n if(isset($this->columns_edit_mode[$field_name]['file_name']) && ($this->columns_edit_mode[$field_name]['file_name'] != \"\")){\n $file_name_view = $this->columns_edit_mode[$field_name]['file_name'].strchr(basename($_FILES[$file_name]['name']),\".\");\n $field_value = $this->columns_edit_mode[$field_name]['file_name'].strchr(basename($_FILES[$file_name]['name']),\".\");\n $sql .= \" = '\".$this->columns_edit_mode[$field_name]['file_name'].strchr(basename($_FILES[$file_name]['name']),\".\").\"'\";\n }else{\n $file_name_view = $_FILES[$file_name]['name'];\n $field_value = $_FILES[$file_name]['name'];\n $sql .= \" = '\".$_FILES[$file_name]['name'].\"' \"; \n }\n $sql .= \" WHERE $this->primary_key= '\".$rid.\"' \"; \n $this->db_handler->query($sql); \n //debug? mysql_error();\n $file = true;\n } else{\n $file_error_msg = $this->lang['file_uploading_error'];\n $file = false;\n }\n }else{\n $file = false;\n }\n }\n }else{\n $file = false; \n }\n }else{\n if(($file_act == \"remove\") && ($file_id == $field_name)){ \n $sql = \"UPDATE $this->tbl_name SET \".$field_name.\" = '' \";\n $sql .= \" WHERE $this->primary_key = '\".$rid.\"' \";\n $this->db_handler->query($sql);\n // delete file from target path\n if(file_exists($target_path.$field_value)){\n unlink($target_path.$field_value);\n }else{\n $file_error_msg = $this->lang['file_deleting_error'];\n }\n $file = false;\n }else{\n $file = true;\n }\n }\n // if there is a file (uploaded or exists)\n if($file == true){\n if(strlen($field_value) > 40){\n $str_start = strlen($field_value) - 40;\n $str_prefix = \"...\";\n }else{\n $str_start = 0;\n $str_prefix = \"\";\n }\n //$ret_file .= \"<input type='hidden' name='\".$this->unique_prefix.\"file_act' id='\".$this->unique_prefix.\"file_act' value='remove' />\";\n $ret_file .= \"<table><tr valign='middle'><td align='center'>\";\n if($field_type == \"image\"){\n if(file_exists($target_path.$field_value)){\n list($f_width, $f_height, $f_type, $f_attr) = getimagesize($target_path.$field_value);\n $f_size = number_format((filesize($target_path.$field_value)/1024),2,\".\",\",\").\" Kb\"; \n }else{\n $ret_file .= $this->nbsp.\"<label class='class_error_message no_print'>\".$this->lang['file_uploading_error'].\"</label><br />\"; \n }\n $ret_file .= $this->nbsp.\"<img src='\".$target_path.$field_value.\"' height='90px' width='120px' title='$field_value ($f_width x $f_height - $f_size)' alt='$field_value'/>\".$this->nbsp; \n }else{\n $ret_file .= $this->nbsp.$str_prefix.substr($file_name_view, $str_start, 40).$this->nbsp; \n }\n if($field_type == \"image\") $ret_file .= \"<br />\";\n else $ret_file .= \"&nbsp;&nbsp;\";\n $ret_file .= $this->nbsp.\"[<a class='\".$this->unique_prefix.\"class_a' href='#' onclick='fileAction(\\\"remove\\\", \\\"\".$field_name.\"\\\"); return false;'><b>\".$this->lang['remove'].\"</b></a>]\".$this->nbsp;\n $ret_file .= \"</td></tr></table>\";\n $ret_file .= \"<input type='hidden' value='$field_value' name='\".$this->getFieldRequiredType($field_name).$field_name.\"' id='\".$this->getFieldRequiredType($field_name).$field_name.\"' />\"; \n }else{\n //$ret_file .= \"<input type='hidden' name='\".$this->unique_prefix.\"file_act' id='\".$this->unique_prefix.\"file_act' value='upload' />\"; \n if($file_error_msg != \"\") $ret_file .= $this->nbsp.\"<label class='class_error_message no_print'>\".$file_error_msg.\"</label><br />\";\n $ret_file .= $this->nbsp.\"<input type='file' class='class_textbox' \".$field_width.\" title='\".$this->getFieldTitle($field_name).\"' name='\".$this->getFieldRequiredType($field_name).$field_name.\"' id='\".$this->getFieldRequiredType($field_name).$field_name.\"' \".$disabled.\" \".$on_js_event.\">&nbsp;&nbsp;\";\n $ret_file .= \"[<a class='\".$this->unique_prefix.\"class_a' \".(($disabled == \"disabled\") ? \"\" : \"href='#' onclick='fileAction(\\\"upload\\\", \\\"\".$field_name.\"\\\"); return false;'\").\"><b>\".$this->lang['upload'].\"</b></a>]\".$this->nbsp; \n }\n return $ret_file;\n }\n break; \n case \"label\":\n return $this->nbsp.\"<label class='class_textbox' \".$field_width.\" \".$on_js_event.\">\".trim($field_value).\"</label>\".$this->nbsp; \n break;\n case \"link\":\n return $this->nbsp.\"<input type='text' class='class_textbox' \".$field_width.\" title='\".$this->getFieldTitle($field_name).\"' id='\".$this->getFieldRequiredType($field_name).$field_name.\"' name='\".$this->getFieldRequiredType($field_name).$field_name.\"' value='\".trim($field_value).\"' $field_maxlength $readonly \".$on_js_event.\">\".$this->nbsp;\n break; \n case \"password\": \n return $this->nbsp.\"<input class='class_textbox' \".$field_width.\" type='password' title='\".$this->getFieldTitle($field_name).\"' id='\".$this->getFieldRequiredType($field_name).$field_name.\"' name='\".$this->getFieldRequiredType($field_name).$field_name.\"' value='\".trim($field_value).\"' $field_maxlength $readonly \".$on_js_event.\">\".$this->nbsp;\n break;\n case \"print\":\n return $this->nbsp.\"<label class='class_label' \".$field_width.\">\".trim($field_value).\"</label>\".$this->nbsp; \n break; \n case \"textarea\":\n $field_value = str_replace('\"', \"&quot;\", $field_value); // double quotation mark\n $field_value = str_replace(\"'\", \"&#039;\", $field_value); // single quotation mark\n $resizable = isset($this->columns_edit_mode[$field_name]['resizable']) ? $this->columns_edit_mode[$field_name]['resizable'] : false;\n $field_rows = isset($this->columns_edit_mode[$field_name]['rows']) ? $this->columns_edit_mode[$field_name]['rows'] : \"3\";\n $field_cols = isset($this->columns_edit_mode[$field_name]['cols']) ? $this->columns_edit_mode[$field_name]['cols'] : \"23\";\n $field_edit_type = isset($this->columns_edit_mode[$field_name]['edit_type']) ? $this->columns_edit_mode[$field_name]['edit_type'] : \"23\";\n $field_wysiwyg_width = isset($this->columns_edit_mode[$field_name]['width']) ? $this->columns_edit_mode[$field_name]['width'] : \"0\";\n $field_id = $this->getFieldRequiredType($field_name).$field_name;\n if(strtolower($field_edit_type) == \"wysiwyg\") $field_maxlength = \"\";\n if(($resizable == true) || ($resizable == \"true\")) { $field_class = \"class='resizable'\"; } else { $field_class = \"\"; };\n $texarea = $this->nbsp.\"<textarea \".$field_class.\" id='\".$field_id.\"' name='\".$field_id.\"' title='\".$this->getFieldTitle($field_name).\"' rows='\".$field_rows.\"' cols='\".$field_cols.\"' \".$field_maxlength.\" \".$field_width.\" \".$readonly.\" \".$on_js_event.\" >\".trim($field_value).\"</textarea>\".$this->nbsp;\n if(strtolower($field_edit_type) == \"wysiwyg\"){\n $texarea .= $this->nbsp.\"\\n<script type='text/javascript'>\\n\";\n $texarea .= \"<!--\\n\";\n $texarea .= \"wysiwygWidth = \".((intval($field_wysiwyg_width) > ((9.4)*$field_cols)) ? intval($field_wysiwyg_width) : ((9.4)*$field_cols)).\";\";\n $texarea .= \"wysiwygHeight = \".(21*$field_rows).\";\";\n $texarea .= \"generate_wysiwyg('\".$this->getFieldRequiredType($field_name).$field_name.\"'); \\n\";\n $texarea .= \"//-->\\n\";\n $texarea .= \"</script>\\n\";\n }\n return $texarea; \n break; \n case \"textbox\":\n $field_value = str_replace('\"', \"&quot;\", $field_value); // double quotation mark\n $field_value = str_replace(\"'\", \"&#039;\", $field_value); // single quotation mark\n ///d id='\".$this->getFieldRequiredType($field_name).$field_name.\"' \n return $this->nbsp.\"<input class='class_textbox' \".$field_width.\" type='text' title='\".$this->getFieldTitle($field_name).\"' name='\".$this->getFieldRequiredType($field_name).$field_name.\"' value='\".trim($field_value).\"' $field_maxlength $readonly \".$on_js_event.\">\".$this->nbsp;\n break;\n default:\n ///d id='\".$this->getFieldRequiredType($field_name).$field_name.\"' \n return $this->nbsp.\"<input type='text' class='class_textbox' \".$field_width.\" title='\".$this->getFieldTitle($field_name).\"' name='\".$this->getFieldRequiredType($field_name).$field_name.\"' value='\".trim($field_value).\"' $field_maxlength $readonly \".$on_js_event.\">\".$this->nbsp;\n break;\n }\n }else if ($this->mode === \"details\"){\n switch($field_type){\n case \"checkbox\":\n return $this->nbsp.(($field_value == 1) ? $this->lang['yes'] : $this->lang['no']).$this->nbsp;\n break; \n case \"date\":\n return $this->nbsp.substr(trim($field_value), 0, 10).$this->nbsp;\n break;\n case \"datedmy\":\n return $this->nbsp.$this->myDate($field_value, \"datedmy\").$this->nbsp;\n break; \n case \"datetime\":\n return $this->nbsp.trim($field_value).$this->nbsp;\n break; \n case \"datetimedmy\":\n return $this->nbsp.$this->myDate($field_value, \"datetimedmy\").$this->nbsp;\n break; \n case \"enum\":\n if(isset($this->columns_edit_mode[$field_name]['source']) && is_array($this->columns_edit_mode[$field_name]['source'])){ \n foreach($this->columns_edit_mode[$field_name]['source'] as $opt => $val){ \n if($field_value == $val) return $this->nbsp.trim($opt).$this->nbsp;\n }\n } \n return $this->nbsp.trim($field_value).$this->nbsp;\n break;\n case \"hidden\":\n return \"\";\n break; \n case \"image\":\n $img_target_path = (isset($this->columns_edit_mode[$field_name]['target_path']) ? $this->columns_edit_mode[$field_name]['target_path'] : \"\" );\n $img_width = (isset($this->columns_edit_mode[$field_name]['image_width']) ? $this->columns_edit_mode[$field_name]['image_width'] : \"50px\" );\n $img_height = (isset($this->columns_edit_mode[$field_name]['image_height']) ? $this->columns_edit_mode[$field_name]['image_height'] : \"30px\" );\n $img_default = ((isset($this->columns_edit_mode[$field_name]['default']) && ($this->columns_edit_mode[$field_name]['default'] != \"\") && file_exists($img_target_path.trim($this->columns_edit_mode[$field_name]['default']))) ? \"<img src='\".$img_target_path.$this->columns_edit_mode[$field_name]['default'].\"' width='\".$img_width.\"' height='\".$img_height.\"' alt='' title='' />\" : \"<span class='class_label'>\".$this->lang['no_image'].\"</span>\"); \n if((trim($field_value) !== \"\") && file_exists($img_target_path.trim($field_value))){\n return $this->nbsp.\"<img src='\".$img_target_path.trim($field_value).\"' border='1' width='\".$img_width.\"' height='\".$img_height.\"' align='middle' />\".$this->nbsp;\n }else{\n return \"<table style='border: solid 1px #000000;' width='\".$img_width.\"' height='\".$img_height.\"'><tr><td align='center'>\".$img_default.\"</td></tr></table>\";\n }\n break;\n case \"label\":\n return $this->nbsp.trim($field_value).\"\"; \n break;\n case \"link\": \n if(isset($this->columns_edit_mode[$field_name]['field_data']) && (trim($this->columns_edit_mode[$field_name]['field_data']) != \"\")){\n $href_inner = (isset($this->columns_edit_mode[$field_name]['href']))?$this->columns_edit_mode[$field_name]['href']:\"\";\n $target_inner = (isset($this->columns_edit_mode[$field_name]['target']))?$this->columns_edit_mode[$field_name]['target']:\"\";\n $on_js_event = (isset($this->columns_edit_mode[$field_name]['on_js_event']))?$this->columns_edit_mode[$field_name]['on_js_event']:\"\"; \n foreach ($this->columns_edit_mode[$field_name] as $search_field_key => $search_field_value){\n if(substr($search_field_key, 0, 9) == \"field_key\"){\n $field_number = intval(substr($search_field_key, 10, strlen($search_field_key) - 10));\n $field_inner = $row[$this->getFieldOffset($search_field_value)];\n if(strpos($href_inner, \"{\".$field_number.\"}\") >= 0){\n $href = str_replace(\"{\".$field_number.\"}\", $field_inner, $href_inner);\n } \n } \n }\n // remove unexpected 'http://'s\n if(strstr($href_inner, \"http://\") != \"\"){\n $href = str_replace(\"http://\", \"\", $href);\n $href = \"http://\".$href;\n } \n return $this->nbsp.\"<a class='\".$this->unique_prefix.\"class_a2' href='\".$href.\"' target='\".$target_inner.\"' \".$on_js_event.\">\".trim($row[$this->getFieldOffset($this->columns_edit_mode[$field_name]['field_data'])]).\"</a>\".$this->nbsp;\n }else{\n return $this->nbsp; \n } \n break; \n case \"password\":\n return $this->nbsp.\"<label class='class_label'>******</label>\".$this->nbsp;\n break; \n case \"print\":\n return $this->nbsp.\"<label class='class_label' \".$field_width.\">\".trim($field_value).\"</label>\".$this->nbsp; \n break;\n case \"textarea\":\n case \"textbox\":\n return $this->nbsp.trim($field_value).\"\"; \n break; \n default:\n return $this->nbsp.trim($field_value).\"\"; \n break;\n } \n }\n } \n }\n return false;\n }", "title": "" }, { "docid": "5de93cb6f7c9591cb81167ee035e8552", "score": "0.5924387", "text": "function display_library_book_meta_box( $library_book ) \r\n{\r\n $book_author = esc_html( get_post_meta( $library_book->ID, 'book_author', true ) );\r\n\t$book_price = esc_html( get_post_meta( $library_book->ID, 'book_price', true ) );\r\n ?>\r\n <table>\r\n <tr>\r\n <td style=\"width: 100%\">Book Author</td>\r\n <td><input type=\"text\" size=\"80\" name=\"library_book_author_name\" value=\"<?php echo $book_author; ?>\" /></td>\r\n </tr>\r\n\t\t<tr>\r\n <td style=\"width: 100%\">Price</td>\r\n <td><input type=\"text\" size=\"80\" name=\"library_book_price\" value=\"<?php echo $book_price; ?>\" /></td>\r\n </tr>\r\n </table>\r\n <?php\r\n}", "title": "" }, { "docid": "497950c87ba48933437dba3b08105039", "score": "0.5923514", "text": "function tdp_fix_editor( $value, $post_id, $field )\n{\n $value = apply_filters('the_content',$value); \n \n return $value;\n}", "title": "" }, { "docid": "3ad80c4302ce64fc4237c93f0be97530", "score": "0.59165394", "text": "function _getEditMarkup($field) {\n\t\tif ($field->primary_key) {\n\t\t\treturn '<input type=\"hidden\" name=\"'.$field->name.'\" value=<?= $result[\"'.$field->name.'\"]?> />';\n\t\t}\n\t\t\n\t\telse {\n\t\t\n\t\t$form_markup = \"\\n\\t<p>\\n\";\n\t\t$form_markup .= '\t<label for=\"'.$field->name.'\">'.ucfirst($field->name).'</label>';\n\t\t$form_markup .= \"<br/>\\n\\t\";\n\t\t\n\t\tswitch ($field->type) {\n\t\t\tcase 'int':\n\t\t\t\t$form_markup .= '<input type=\"text\" name=\"'.$field->name.'\" value=\"<?= $result[\"'.$field->name.'\"]?>\" maxlength=\"500\" size=\"50\" />';\n\t\t\t\tbreak;\n\t\t\tcase 'string':\n\t\t\t\t$form_markup .= '<input type=\"text\" name=\"'.$field->name.'\" value=\"<?= $result[\"'.$field->name.'\"]?>\" maxlength=\"500\" size=\"50\" />';\n\t\t\t\tbreak;\n\t\t\tcase 'blob':\n\t\t\t\t$form_markup .= '<textarea name=\"'.$field->name.'\" cols=\"90\" rows=\"12\" ><?= $result[\"'.$field->name.'\"]?></textarea>';\n\t\t\t\tbreak;\n\t\t\tcase 'datetime':\n\t\t\t\t$form_markup .= '<input type=\"text\" name=\"'.$field->name.'\" value=\"<?= $result[\"'.$field->name.'\"]?>\" maxlength=\"500\" size=\"50\" />';\n\t\t\t\tbreak;\n\t\t}\n\t\t$form_markup .= \"\\n\\t</p>\\n\";\n\t\treturn $form_markup;\n\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "6f906e45d4a0dcf219a4a457d4081bb5", "score": "0.59152776", "text": "static function display_form_field_type_text( $field, $value, $name ) {\n\t\t?>\n\t\t<input id=\"<?php echo 'clientside-formfield-' . $field['name']; ?>\" type=\"text\" class=\"widefat\" name=\"<?php echo esc_attr( $name ); ?>\" value=\"<?php echo $value; ?>\">\n\t\t<?php\n\t}", "title": "" }, { "docid": "5330afbb8e3e9fbe5f9b4a421db1a12d", "score": "0.5910922", "text": "function _echo_name_field( string $label, string $id, string $name, string $val, string $style = '' ): void {\n\t?>\n<tr class=\"form-field\">\n\t<th style=\"<?php echo esc_attr( $style ); ?>\">\n\t\t<label for=\"<?php echo esc_attr( $id ); ?>\"><?php echo esc_html( $label ); ?></label>\n\t</th>\n\t<td style=\"<?php echo esc_attr( $style ); ?>\">\n\t\t<input type=\"text\" size=\"40\" id=\"<?php echo esc_attr( $id ); ?>\" name=\"<?php echo esc_attr( $name ); ?>\" value=\"<?php echo esc_attr( $val ); ?>\" />\n\t</td>\n</tr>\n\t<?php\n}", "title": "" }, { "docid": "9fb9906c4464a189fb7eb452af5fdc1a", "score": "0.59108037", "text": "function form_text1($name, $value, $size=40, $maxlength=40, $colspan=1) {\r\n\r\n echo '<input class=\"mycontrol\" ',\r\n html_attribute(\"name\", \"form[$name]\"),\r\n html_attribute(\"size\", $size),\r\n html_attribute(\"maxlength\", $maxlength);\r\n if($value)\r\n echo html_attribute(\"value\", $value);\r\n echo ' /> ', \"\\n\";\r\n}", "title": "" }, { "docid": "854fd2397d45a40c78a35cd55df74395", "score": "0.59086114", "text": "public function GetField() {\n return $this->GetHtml();\n }", "title": "" }, { "docid": "303977f34615efa7a16cb713b34f124f", "score": "0.590771", "text": "function htmlformattedvalue()\r\n\t\t{\r\n\t\t\t//-- no formatted value so try raw\r\n\t\t\tif($this->_formattedvalue==\"\")return $this->htmlvalue();\r\n\t\t\treturn nl2br(_html_encode($this->formattedvalue()));\r\n\t\t}", "title": "" }, { "docid": "7aae4c9659d5080916fe803471e16d44", "score": "0.5899846", "text": "function _getMarkup($field) {\n\t\tif ($field->primary_key) {\n\t\t\treturn '<input type=\"hidden\" name=\"'.$field->name.'\" value=\"\" />';\n\t\t}\n\t\t\n\t\telse {\n\t\t\n\t\t$form_markup = \"\\n\\t<p>\\n\";\n\t\t$form_markup .= '\t<label for=\"'.$field->name.'\">'.ucfirst($field->name).'</label>';\n\t\t$form_markup .= \"<br/>\\n\\t\";\n\t\t\n\t\tswitch ($field->type) {\n\t\t\tcase 'int':\n\t\t\t\t$form_markup .= form_input($field->name);\n\t\t\t\tbreak;\n\t\t\tcase 'string':\n\t\t\t\t$form_markup .= form_input($field->name);\n\t\t\t\tbreak;\n\t\t\tcase 'blob':\n\t\t\t\t$form_markup .= form_textarea($field->name);\n\t\t\t\tbreak;\n\t\t\tcase 'datetime':\n\t\t\t\t$form_markup .= '<input type=\"text\" name=\"'.$field->name.'\" value=\"<?= date(\"Y-m-d H:i:s\") ?>\" maxlength=\"500\" size=\"50\" />';\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$form_markup .= \"\\t</p>\\n\";\n\t\treturn $form_markup;\n\t\t\n\t\t}\n\t}", "title": "" } ]
56eaff8dbb2ca49262fc1b0f5b1b49b1
validateCustomer ensures that the link belongs to a validate customer
[ { "docid": "90cbd2fba159be1616b92b0ba2a7210e", "score": "0.7303165", "text": "protected function validateCustomer ($link)\n {\n if (empty($link->user)) {\n $subject = 'Feedback link not associated with customer!';\n $error = __FILE__ . ' @ ' . __LINE__;\n $meta = ['url' => $link];\n Notification::send(User::first(), new Slack($subject, $error, $meta));\n exit;\n }\n $this->customer = $link->user;\n $this->first_name = $this->customer->first_name;\n $this->last_name = $this->customer->last_name;\n }", "title": "" } ]
[ { "docid": "682a6990b6740ba36ee6628d86cdcb66", "score": "0.6332561", "text": "public function verifyCustomer($customer_id) : bool;", "title": "" }, { "docid": "9e28992b6950a7a0874553b088fe6072", "score": "0.5984413", "text": "public function _validateCustomer($customerId)\n {\n $customerExist = Mage::getModel('customer/customer')->load($customerId)->getId();\n if ($customerExist)\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "1866f3ea7559f13d0e9671fb8a46ddc2", "score": "0.5983379", "text": "public function validateCustomerAddress(AfterPayValidateCustomerRequestTransfer $validateCustomerRequestTransfer): AfterPayValidateCustomerResponseTransfer;", "title": "" }, { "docid": "0891badcd93caab731384bc73020fd88", "score": "0.5697715", "text": "public static function ajax_validate_customer() {\n write_log( $_POST );\n $data = $_POST;\n write_log( 'Setlr_Profile_Form ajax_validate_customer');\n write_log( $data );\n \n if ( ! isset( $data['nonce'] ) || ! wp_verify_nonce( $data['nonce'], 'login' ) ) :\n write_log( 'ajax_validate_customer nonce did not validate');\n write_log( $data['nonce'] );\n\tendif;\n \n if ( isset( $data['user_login'] ) && isset( $data['user_pwd'] ) && !empty( $data['user_login'] ) && !empty( $data['user_pwd'] ) ) :\n $user = wp_authenticate_username_password( NULL, $data['user_login'], $data['user_pwd'] );\n endif;\n \n $total = (isset( $data['total'] ) && floatval( $data['total'] ) ) ? $data['total'] : 0;\n \n if ( !isset( $user ) || is_wp_error( $user ) ) :\n write_log( 'non valid user');\n write_log( $user );\n echo 0;\n exit();\n else :\n write_log( 'user='. $user->ID );\n write_log( 'total='.$total);\n \n if ( user_can( $user, 'customer' ) ) :\n $args = array(\n 'user_email' => $user->user_login,\n 'user_pass' => $user->user_pass\n );\n self::login_customer( $args );\n echo Setlr_Request::display_actions_fragment( $user->ID, $total );\n else :\n _e( 'You are not a customer', 'pdcrequest' );\n endif;\n exit();\n endif;\n }", "title": "" }, { "docid": "bf9b0a7936d30c0b65ad48d04156e027", "score": "0.55801606", "text": "public static function validateCustomerForm()\n {\n $rules = [\n 'full_name' => 'required',\n 'country' => 'required|exists:countries,code',\n 'phone' => 'required',\n 'email' => 'required|email',\n 'confirm_email' => 'required|email|same:email'\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "ee7c788aaff50c4916dec1e8b684fea7", "score": "0.55375546", "text": "function validate_special_link() {}", "title": "" }, { "docid": "ec8e272b7e22a3cd14c6fc1255a5091c", "score": "0.54859567", "text": "protected function validateCustomerContacts ()\n {\n $this->contacts = [Medium::SMS => [], Medium::EMAIL => []];\n foreach ($this->customer->contacts as $contact) {\n $this->contacts[$contact->medium_id][] = $contact;\n \n // set display number and email to the most recent ones we have received\n if ($contact->medium_id == Medium::SMS) {\n $this->phone = $contact->contact;\n }\n if ($contact->medium_id == Medium::EMAIL) {\n $this->email = $contact->contact;\n }\n }\n }", "title": "" }, { "docid": "0c4937ed865742febea54d06be0d33a6", "score": "0.53307825", "text": "public function verifyAction($customerId)\n {\n $customerService = $this->container->get('dft_foapi.customer');\n\n $customerService->verifyCustomer(\n $this->getAuthenticatedUserIdAndSubAccountIds(),\n $customerId\n );\n\n // TODO: Return proper status code if failed.\n return $this->render('dftFoapiBundle:Common:success.json.twig');\n }", "title": "" }, { "docid": "e701993c6619e8ccb7688d96a186bf23", "score": "0.53301734", "text": "function CheckCustomer($id_customer) {\n $result = $this->con->query(\"select * from customers where id_customer=$id_customer\");\n if ($result->num_rows == 0) {\n return FALSE;\n }\n return TRUE;\n }", "title": "" }, { "docid": "6ea56e0e667682596b9532e6807d7a93", "score": "0.5328326", "text": "public function checkCustomerImport($customer, $customersExt){\r\n $id_src = $this->getCustomerId($customer, $customersExt);\r\n return $this->getMageIdCustomer($id_src);\r\n }", "title": "" }, { "docid": "a12d2a8854430c65d780e6f6d3ea6948", "score": "0.5314302", "text": "public function createFromCustomer(User $customer)\n\t{\n\t\treturn redirect('/invoice/'.$customer->id.'/create');\n\t}", "title": "" }, { "docid": "9d92a4119e732c0612d91468141f5daf", "score": "0.53124833", "text": "function validate_existance($request, $language, $id = 0)\n{\n global $db;\n\n // Check email address, if exist or not?\n if (!empty($request->post['customer_email'])) {\n $statement = $db->prepare(\"SELECT * FROM `customers` WHERE `customer_email` = ? AND `customer_id` != ?\");\n $statement->execute(array($request->post['customer_email'], $id));\n if ($statement->rowCount() > 0) {\n throw new Exception($language->get('error_email_exist'));\n }\n }\n\n // Check Mobile phone, is exist?\n if (!empty($request->post['customer_mobile'])) {\n $statement = $db->prepare(\"SELECT * FROM `customers` WHERE `customer_mobile` = ? AND `customer_id` != ?\");\n $statement->execute(array($request->post['customer_mobile'], $id));\n if ($statement->rowCount() > 0) {\n throw new Exception($language->get('error_mobile_exist'));\n }\n }\n}", "title": "" }, { "docid": "96b6cd0b8ffed0817e37747b2854f971", "score": "0.52798605", "text": "public function customerAction()\n\t{\t\t\n\t\t$customersIds = $this->getRequest()->getParam('customer');\t\t\n\t\t// check weather customerids is array or not\n if(!is_array($customersIds)) {\n Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select customer(s).'));\t\t\t\n } else {\n try {\t\t\t\n\t\t\t\t// Check weather extension is enabled or not.\t\n\t\t\t\tif(Mage::helper('emailmarketing')->isEnabled())\n\t\t\t\t{\n\t\t\t\t\t// Check weather feature is enabled or not and get the INinbox list id for edit.\n\t\t\t\t\t$isIninboxSendCustomerEnabled = Mage::helper('emailmarketing')->getConfig($group = 'customer_settings', $field = 'send_customer');\n\t\t\t\t\t$ininboxCustomerGroupList = Mage::helper('emailmarketing')->getConfig($group = 'customer_settings', $field = 'customer_group_list');\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif($isIninboxSendCustomerEnabled && !is_null($ininboxCustomerGroupList))\n\t\t\t\t\t{\n\t\t\t\t\t\t$message = Mage::getModel('emailmarketing/observer')->importIninboxContact($customersIds, $ininboxCustomerGroupList);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(isset($message) && $message != '')\t\t\t\t\t\t\n\t\t\t\t\t\t\tMage::getSingleton('adminhtml/session')->addError($message);\t\t\t\t\t\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tMage::getSingleton('adminhtml/session')->addSuccess(\n\t\t\t\t\t\t\t\tMage::helper('adminhtml')->__('Total of %d record(s) were added.', count($customersIds))\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } \n }\n $this->_redirect('adminhtml/customer/index/');\n\t\treturn; \n\t}", "title": "" }, { "docid": "d325b7cb209d4d3fac5caf1faff92f18", "score": "0.5266918", "text": "protected function _validate()\n\t{\n\t\tif($is_cc == true)\n\t\t{\n\t\t\tif( empty($this->cc_uri) && empty($this->cc_name) )\n\t\t\t{\n\t\t\t\t$this->addError('cc', 'Creative Commons License ');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a17b4c0b1c38a02377680e55d05bb97e", "score": "0.5247427", "text": "function adminValidateComment()\n{\n\t$registerManager = new \\Tp\\Blog\\Model\\RegisterManager();\n\n\t$comValid = $registerManager->validComment($_GET['id']);\n\n\theader('Location: viewCommentsAdmin');\n}", "title": "" }, { "docid": "891d730303e0eadad18faad9efcbb925", "score": "0.51754135", "text": "public function state(Customer $customer, $validationValue): bool;", "title": "" }, { "docid": "5299af517ce4082b779d25fdd1daf8d4", "score": "0.51735646", "text": "abstract protected function validate();", "title": "" }, { "docid": "5299af517ce4082b779d25fdd1daf8d4", "score": "0.51735646", "text": "abstract protected function validate();", "title": "" }, { "docid": "5299af517ce4082b779d25fdd1daf8d4", "score": "0.51735646", "text": "abstract protected function validate();", "title": "" }, { "docid": "5299af517ce4082b779d25fdd1daf8d4", "score": "0.51735646", "text": "abstract protected function validate();", "title": "" }, { "docid": "11e62284cb72edac819576524b4701ea", "score": "0.5168549", "text": "function customerValidation($data){\n $validation = array(\n \"status\" => true,\n \"msg\" => array()\n );\n\n // Required fields to insert a new customer\n $requiredFields = array(\n 'cpf' => 'CPF',\n 'name' => 'Name',\n 'email' => 'Email'\n );\n\n foreach($requiredFields as $key => $value){\n if(!array_key_exists($key, $data)){\n $validation['status'] = false;\n $validation['msg'][] = \"Please inform a $value\";\n }\n }\n\n // General Validations\n foreach($data as $param => $value){\n switch($param){\n case 'cpf':\n if(!CPFValidation($value)){\n $validation['status'] = false;\n $validation['msg'][] = \"Please insert a valid CPF\";\n }\n\n if(Customer::where('cpf', $value)->first()){\n $validation['status'] = false;\n $validation['msg'][] = \"CPF already exists\";\n }\n break;\n\n case 'name':\n if(Customer::where('name', $value)->first()){\n $validation['status'] = false;\n $validation['msg'][] = \"Name already exists\";\n }\n break;\n\n case 'email':\n if(Customer::where('email', $value)->first()){\n $validation['status'] = false;\n $validation['msg'][] = \"Email already exists\";\n }\n\n if(!filter_var($value, FILTER_VALIDATE_EMAIL)){\n $validation['status'] = false;\n $validation['msg'][] = \"Please insert a valid email\";\n }\n break;\n }\n }\n \n return $validation;\n}", "title": "" }, { "docid": "f526a7e783db958c133bb4b105f434a4", "score": "0.51409066", "text": "public function processAssert(\n BrowserInterface $browser,\n Dashboard $dashboard,\n CustomerAccountLogin $customerAccountLogin\n ) {\n $dashboard->open();\n \\PHPUnit\\Framework\\Assert::assertTrue(\n strpos($browser->getUrl(), 'https://') !== false,\n 'Secure Url is not displayed on backend.'\n );\n\n $customerAccountLogin->open();\n \\PHPUnit\\Framework\\Assert::assertTrue(\n strpos($browser->getUrl(), 'https://') !== false,\n 'Secure Url is not displayed on frontend.'\n );\n }", "title": "" }, { "docid": "cd51887afe5009b6c0be9b33181407e7", "score": "0.5139886", "text": "public function validate()\n {\n Mage::dispatchEvent($this->_eventPrefix . '_validate_before', array(\n $this->_eventObject => $this\n ));\n\n // The errors\n $errors = array();\n\n // Validators\n $notEmpty = new Zend_Validate_NotEmpty;\n $digit = new Zend_Validate_Digits;\n $length = new Zend_Validate_StringLength;\n $card = new Zend_Validate_CreditCard;\n\n // Customer?\n if (!$id = $this->getData('customer_id')) {\n if (\n (!$customer = $this->getData('customer'))\n || !is_object($customer)\n || !$customer instanceof Mage_Customer_Model_Customer\n || !$id = $customer->getId()\n ) {\n $errors[] = Mage::helper('mbiz_cc')->__('Please specify the customer.');\n } else {\n $this->setData('customer_id', $customer->getId());\n }\n }\n\n // Token\n if (!$notEmpty->isValid($this->getData('token'))) {\n $errors[] = Mage::helper('mbiz_cc')->__('Please specify a token.');\n }\n\n // Date\n if (\n !$notEmpty->isValid($this->getData('dateval'))\n || !$digit->isvalid($this->getData('dateval'))\n || !$length->setMin(4)->setMax(4)->isValid($this->getData('dateval'))\n ) {\n $errors[] = Mage::helper('mbiz_cc')->__('Please specify a valid expiration date.');\n }\n\n // Cvv\n if (\n !$notEmpty->isValid($this->getData('cvv'))\n || !$digit->isValid($this->getData('cvv'))\n || !$length->setMin(3)->setMax(4)->isValid($this->getData('cvv'))\n ) {\n $errors[] = Mage::helper('mbiz_cc')->__('Please specify a valid card verification number.');\n }\n\n // Type\n if (!in_array($this->getData('type'), array('VI', 'AE', 'MC'))) {\n $errors[] = Mage::helper('mbiz_cc')->__('Please specify a valid card type.');\n }\n\n // Owner\n if (!$notEmpty->isValid($this->getData('owner'))) {\n $errors[] = Mage::helper('mbiz_cc')->__('Please specify an owner name.');\n }\n\n // Last digits\n if (\n !$notEmpty->isValid($this->getData('last_digits'))\n || !$digit->isValid($this->getData('last_digits'))\n || !$length->setMin(4)->setMax(4)->isValid($this->getData('last_digits'))\n ) {\n if ($this->getData('number')) {\n switch ($this->getType()) {\n case 'VI':\n $type = Zend_Validate_CreditCard::VISA;\n break;\n case 'AE':\n $type = Zend_Validate_CreditCard::AMERICAN_EXPRESS;\n break;\n case 'MC':\n $type = Zend_Validate_CreditCard::MASTERCARD;\n break;\n default:\n throw new Exception('Bad card type');\n }\n if (!$card->setType($type)->isValid($this->getData('number'))) {\n $errors[] = Mage::helper('mbiz_cc')->__('Please specify a card number or the four last digits.');\n } else {\n $this->setLastDigits(substr((string) $this->getData('number'), -4));\n }\n } else {\n $errors[] = Mage::helper('mbiz_cc')->__('Please specify a card number or the four last digits.');\n }\n }\n\n return $errors;\n }", "title": "" }, { "docid": "e95f34ea29e02319c6c6d6cee060c297", "score": "0.5103378", "text": "private function checkNaturalCustomerAction($customer_id)\n {\n //search the database\n\t\t$natural_customer = $this->getDoctrine()\n ->getRepository('StockAccountBundle:NaturalCustomer')\n ->find($customer_id);\n return $natural_customer != null;\n }", "title": "" }, { "docid": "99f3d60cfb0376dc07c417c4e40204fb", "score": "0.5103273", "text": "private function validateCustomer(string $customerEmail, $websiteId = null): int\n {\n /** @var Customer $customer */\n $customer = $this->customerFactory->create();\n\n if (isset($websiteId)) {\n $customer->setWebsiteId($websiteId);\n }\n $customer->loadByEmail($customerEmail);\n return (int)$customer->getId();\n }", "title": "" }, { "docid": "33590977b5eb4f2c29cbafeb65f9baf4", "score": "0.50836533", "text": "private function checkCompanyCustomerAction($customer_id)\n {\n $company_customer = $this->getDoctrine()\n ->getRepository('StockAccountBundle:CompanyCustomer')\n ->find($customer_id);\n if ($company_customer != null)\n return $company_customer;\n else\n return null;\n }", "title": "" }, { "docid": "4b575c6e617449ba30bc64a37daa7156", "score": "0.5078875", "text": "protected function _validateBilling()\n {\n if(!$this->_getCheckout()->getQuote()->getBillingAddress()->getFirstname()) {\n $this->_redirect('*/multishipping_address/selectBilling');\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "f679795c3820bdd3e715cf5b3ba79065", "score": "0.5052244", "text": "static function createCustomerVerification($customerId)\n {\n (new Verification([\n 'id_card' => 0,\n 'address' => 0,\n 'passport' => 0,\n 'work_guarantor' => 0,\n 'personal_guarantor' => 0,\n 'customer_id' => $customerId\n ]))->save();\n }", "title": "" }, { "docid": "cc06bd0822c3e2e0354b18bf231f3c3a", "score": "0.5041496", "text": "public function processAssert(\n CustomerAccountIndex $customerAccountIndex,\n CustomerAccountEdit $customerAccountEdit,\n Customer $customer\n ) {\n $customerName = $customer->getFirstname() . \" \" . $customer->getLastname();\n\n $customerAccountIndex->open();\n $infoBlock = $customerAccountIndex->getInfoBlock()->getContactInfoContent();\n $infoBlock = explode(PHP_EOL, $infoBlock);\n $nameInDashboard = $infoBlock[0];\n \\PHPUnit\\Framework\\Assert::assertTrue(\n $nameInDashboard == $customerName,\n 'Customer name in Contact info block is not matching the fixture.'\n );\n\n $customerAccountIndex->getInfoBlock()->openEditContactInfo();\n $nameInEdit = $customerAccountEdit->getAccountInfoForm()->getFirstName()\n . \" \" . $customerAccountEdit->getAccountInfoForm()->getLastName();\n \\PHPUnit\\Framework\\Assert::assertTrue(\n $nameInEdit == $customerName,\n 'Customer name on Account info tab is not matching the fixture.'\n );\n }", "title": "" }, { "docid": "c20cc5e79347b1b92c0320f5fd2875a8", "score": "0.5031095", "text": "function underwrite($customer) {\n\t\t$srcType = $this->objectType($customer);\n\t\tif ($this->representation->uri) {\n\t\t\tswitch ($srcType) {\n\t\t\t\tcase 'Business':\n\t\t\t\t\t$required = ['name', 'phone_number', 'tax_id', 'street_address', 'postal_code', 'person', 'person.name', 'person.dob', 'person.street_address', 'person.postal_code', 'person.tax_id'];\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'Person':\n\t\t\t\t\t$required = ['name', 'email_address', 'tax_id', 'street_address', 'postal_code', 'dob'];\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'Buyer':\n\t\t\t\t\t$required = ['name', 'email_address'];\n\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t// We didn't get a Buyer, Business, or Person.\n\t\t\t\t\t// Throw an error saying as much.\n\t\t\t\t\tthrow new InvalidArgument(\"Customer data must be of object type Buyer, Person, or Business. \" . $srcType . \" given.\");\n\t\t\t}\n\n\t\t\tforeach ($required as $val) {\n\t\t\t\tif (strstr($val, '.')) {\n\t\t\t\t\t$explode = explode('.', $val);\n\t\t\t\t\t$parent = $explode[0];\n\t\t\t\t\t$key = $explode[1];\n\n\t\t\t\t\tif (!array_key_exists($key, $customer->getItems()[$parent])) {\n\t\t\t\t\t\tthrow new InvalidArgument(\"$parent.$key field required on \" . $srcType . \" object.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (!array_key_exists($val, $customer->getItems())) {\n\t\t\t\t\t\tthrow new InvalidArgument(\"$val field required on \" . $srcType . \" object.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($srcType == 'Business' || $srcType == \"Person\") {\n\t\t\t\t$this->params['merchant'] = $customer->getItems();\n\t\t\t\t$this->params['merchant']['type'] = ($srcType == 'Business') ? 'business' : 'person';\n\t\t\t}\n\n\t\t\t$request = $this->representation->instance->client->put($this->representation->uri, array('Content-Type' => 'application/json'), json_encode($this->params))->send();\n\t\t\treturn $this->representation->replace($request->json());\n\t\t}\n\t\telse {\n\t\t\tthrow new InvalidArgument(\"Account URI not set to underwrite \" . $srcType . '.');\n\t\t}\n\t}", "title": "" }, { "docid": "438931a36dbf7eaed182c3691561fd56", "score": "0.503065", "text": "public function validate(ResourceDocument $document, \\Closure $next): ResourceDocument\n {\n $duplicates = collect((array) $document->get('data.attributes', []))\n ->intersectByKeys((array) $document->get('data.relationships', []))\n ->keys()\n ->map(fn($field) => $this->translator->resourceFieldExistsInAttributesAndRelationships($field));\n\n $document->errors()->push(...$duplicates);\n\n return $next($document);\n }", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.49853322", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.49853322", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.49853322", "text": "public function validate();", "title": "" }, { "docid": "66ad92b68847807ec4cf6e7c1b03cf7f", "score": "0.49828568", "text": "public function add_customer()\n\t{\n\n\t\t$this->form_validation->set_rules(\"name\",\"Customer Name\",\"required|trim\");\n\t\t$this->form_validation->set_rules(\"email\",\"Email Address\",\"required|trim|callback_unique_email\");\n\t\t$this->form_validation->set_rules(\"mobile_number\",\"Mobile Number\",\"required|trim|callback_unique_mobile_number\");\n\t\t$this->form_validation->set_rules(\"password\",\"Password\",\"required|trim\");\n\t\t$this->form_validation->set_rules(\"confirm_password\",\"Confirm Password\",\"required|trim|matches[password]\");\n\n\t\tif($this->form_validation->run())\n\t\t{\n\t\t\t$values = $this->input->post();\n\t\t\t\n\t\t\t$values['user_type'] = 'customer';\n\t\t\t$this->db->insert(\"customer_partner\",$values);\n\n\t\t\t$this->session->set_flashdata(\"insert_success\",\"Customer Successfully Added\");\n\n\t\t\tredirect(base_url().\"Customer/list_customer\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn validation_errors();\n\t\t}\n\t}", "title": "" }, { "docid": "afd2237122e5ca4224508ff55afe6618", "score": "0.49798355", "text": "public function newCustomer() {\n\n $customer = new Customer();\n\n if ($_SERVER['REQUEST_METHOD'] == \"POST\") {\n\n $validation = new Validation();\n $validation->required_field('name', \"Name is required.\");\n $validation->required_field('phone', \"Phone is required.\");\n $validation->required_field('address', \"Address is required.\");\n\n //validate the data\n $errors = $validation->run($_POST);\n\n if (count($errors) == 0) {\n $customer->setName($_POST['name']);\n $customer->setPhone($_POST['phone']);\n $customer->setAddress($_POST['address']);\n\n $customer = $this->customer_model->save($customer);\n\n $this->showCustomers();\n\n } else {\n include(\"view/header.php\");\n include(\"view/customer_new.php\");\n include(\"view/footer.php\");\n }\n } else {\n include(\"view/header.php\");\n include(\"view/customer_new.php\");\n include(\"view/footer.php\");\n }\n }", "title": "" }, { "docid": "b46241f0b1ad74ef8b98b17e8df16a68", "score": "0.49794924", "text": "public function validarSolicitacaoAcesso()\n\t{\n\t\t//verificar senha\n\t\t//Cadastro confirmado com sucesso”, o sistema deve apresentar a tela\n\t\t//Este link é inválido ou expirou! Por favor faça uma nova solicitação de acesso”;\n\t\t//redirecionar para login se verdadeiro\n\t}", "title": "" }, { "docid": "f9231db3be96b474591b3c1df41b5f2f", "score": "0.49786037", "text": "abstract public function validateClient($client);", "title": "" }, { "docid": "ebf376117b18d209d924ff034ff125a8", "score": "0.49783918", "text": "protected function validate() {}", "title": "" }, { "docid": "ebf376117b18d209d924ff034ff125a8", "score": "0.49783918", "text": "protected function validate() {}", "title": "" }, { "docid": "1bbb0c68886cb4a0704cb0a2b7debb6c", "score": "0.49759525", "text": "abstract function validate();", "title": "" }, { "docid": "bb28e17b773634aedb181dff245cf8c6", "score": "0.49724963", "text": "private function validatePoints(CustomerInterface $customer, array $points)\n {\n if ($this->em->getRepository('AppBundle:Company')->areOwnedOrShared($customer, $points)) {\n throw new HttpException(500, 'Route points are not valid.');\n }\n\n return true;\n }", "title": "" }, { "docid": "c0f18162b74da42ceff87c5b23b8f4d8", "score": "0.49561182", "text": "public function show($customer)\n {\n $this->authorize('view', $customer);\n return $customer;\n }", "title": "" }, { "docid": "4fc605c2b5a31f26fd5177634c1aac17", "score": "0.4951837", "text": "public abstract function validate();", "title": "" }, { "docid": "3241adacfc34a788a0d73a03d9e09133", "score": "0.49240854", "text": "public function checkCustomer($customerName,$id='') {\n\t\tif(isset($id) && !empty($id)) {\n\t\t\t$sql = $this->remoteDb->fetchOne('SELECT id FROM customers WHERE customer_name=\"'.trim($customerName).'\" AND id!='.$id.'');\n\t\t\treturn $sql;\n\t\t} else {\n\t\t\t$sql = $this->remoteDb->fetchOne('SELECT id FROM customers WHERE customer_name=\"'.trim($customerName).'\"');\n\t\t\treturn $sql;\n\t\t}\n\t}", "title": "" }, { "docid": "930acba8b757dcd0cb825c9df18a45a3", "score": "0.49223304", "text": "public function destroy(Customer $customer)\n {\n $this->authorize('customers');\n $customer->delete();\n return redirect(route('admin.user.index'))->withErrors(['عملیات با موفقیت انجام شد'], 'success');\n }", "title": "" }, { "docid": "9e2469c04b82dfb8f31de34c0c2d2eea", "score": "0.49139062", "text": "public function verifyCustomer($customer_id) : bool\n {\n $this->getCustomers();\n foreach ($this->customers as $cust) {\n if ($cust[\"id\"] == $customer_id) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "4eecdf8e49c6e2409733e651180379f9", "score": "0.49096033", "text": "public function edit(customer $customer)\n {\n //\n }", "title": "" }, { "docid": "b48212b19edac7313cfa870dbeb19854", "score": "0.4901632", "text": "public function updateCustomer(Customer $customer): bool\n {\n }", "title": "" }, { "docid": "fbd67a54c73fe195e3e8b3a71293016c", "score": "0.48917347", "text": "public static function customer_optIn($customer_id) {\n \t$customer = Customers::getAllInfo($customer_id, \"email\");\n\n \t// Check if the email is already registered\n \t$retval = Doctrine::getTable ( 'NewslettersSubscribers' )->findOneBy ( 'email', $customer['email'] );\n \tif(empty($retval)){\n \t\t// Save the new email address\n\t \t$subscriber = new NewslettersSubscribers();\n\t \t$subscriber['email'] = $customer['email'];\n\t \t$subscriber['customer_id'] = $customer_id;\n\t \t$subscriber['subscriptiondate'] = date('Y-m-d H:i:s');\n\t \tif($subscriber->trySave()){\n\t \t\treturn true;\n\t \t}\n \t}\n \treturn false;\n }", "title": "" }, { "docid": "108af8d14ec74975f4c71e31b34645f2", "score": "0.489104", "text": "public function destroy(Customer $customer)\n {\n $order = Order::all();\n foreach ($order as $item) {\n if ($customer->id == $item->customer_id) {\n $alert = 'You can not delete this customer because he has at least one order!';\n return redirect()->back()->with('alert', $alert);\n break;\n }\n }\n $customer->delete();\n return redirect()->route('admin.customer.index');\n }", "title": "" }, { "docid": "a301997e37f922c9cad864d9b2234597", "score": "0.4878919", "text": "function checkIfValid(Customer $customer, $books) {\n\t// type hint Customer class\n\treturn $customer->getAmountToBorrow() >= count($books);\n}", "title": "" }, { "docid": "b0a3dd0e145c48c97c946ba42888eef5", "score": "0.48747444", "text": "public function show(customer $customer)\n {\n //\n }", "title": "" }, { "docid": "1b9f40fccdaa01f8c7d0763c838887f7", "score": "0.4870689", "text": "function validateOnAdd( $entity ){\t\t\t\n\t\t//TODO unicidad (cliente )\n\t\t\n\t}", "title": "" }, { "docid": "cc9dc8c0d8027d3ffd43e53ae515bd6e", "score": "0.48663193", "text": "public function testViewingCustomerDetailPageWithValidCustomerID()\n {\n $response = $this->get('/customers/10');\n\n $response->assertStatus(200);\n $response->assertSee('Juanita&#039;s Order History');\n $response->assertSee('Date');\n $response->assertSee('# of Products');\n $response->assertSee('Total');\n $response->assertSee('<td colspan=\"2\">Lifetime Value</td>');\n\n $response->assertDontSee('Hoa Phan');\n }", "title": "" }, { "docid": "dc7c44e52d349da1e0602f50e3fb8fcb", "score": "0.486472", "text": "public function testValidateByAccountNumber()\n {\n $validationByAccountNumberOptions = new ValidationByAccountNumberOptions;\n $validationByAccountNumberOptions->accountNumber = $this->config['PersonalAccountNumber'];\n\n $result = $this->client->ValidationService->ValidateByAccountNumber($validationByAccountNumberOptions);\n\n $this->assertTrue($result->succeeded);\n }", "title": "" }, { "docid": "05b83994bcc08671bc5ad7004dc6efb1", "score": "0.48634952", "text": "public function customerid($customerId);", "title": "" }, { "docid": "1b090fc0a327de91b5cd5a2b4c373301", "score": "0.4863279", "text": "public function processCc()\n {\n $cc = $this->getDi()->ccRecordRecord;\n $this->form->toCcRecord($cc);\n $cc->user_id = $this->invoice->user_id;\n\n if($this->plugin->getConfig('use_maxmind'))\n {\n $checkresult = $this->plugin->doMaxmindCheck($this->invoice, $cc);\n if (!$checkresult->isSuccess())\n {\n $this->view->error = $checkresult->getErrorMessages();\n return;\n }\n }\n $result = $this->plugin->doBill($this->invoice, true, $cc);\n if ($result->isSuccess()) {\n if (($this->invoice->rebill_times > 0) && !$cc->pk())\n $this->plugin->storeCreditCard($cc, new Am_Paysystem_Result);\n $this->_response->redirectLocation($this->plugin->getReturnUrl());\n return true;\n } elseif ($result->isAction() && ($result->getAction() instanceof Am_Paysystem_Action_Redirect)) {\n $result->getAction()->process($this); // throws Am_Exception_Redirect (!)\n } else {\n $this->view->error = $result->getErrorMessages();\n }\n }", "title": "" }, { "docid": "254317be3ed9c182f0772ae293c26eb2", "score": "0.48601782", "text": "public function validate(){\n if(FriendlyUrl::getByUrl($this->url, false, true)){\n $this->errors['url'] = static::ERROR_URL;\n return false;\n }\n\n // check for other redirects with this url\n if(static::getByUrl($this->url)){\n $redirect = static::getByUrl($this->url);\n if($redirect->id != $this->id) {\n $this->errors['url'] = static::ERROR_URL;\n\n return false;\n }\n }\n\n return parent::validate();\n }", "title": "" }, { "docid": "9d7608509c68d23f008dc20cd78c36d2", "score": "0.48472998", "text": "public function beforeValidate()\n {\n // In case link Organization model is set, save it's name to link.\n if (!empty($this->linkOrganization)) {\n $this->linkOrganization = Organization::model()->findByPk($this->linkOrganization);\n $this->link = $this->linkOrganization->name;\n }\n\n return parent::beforeValidate();\n }", "title": "" }, { "docid": "c502ac080862c50af5b99ac806ca6f35", "score": "0.48463303", "text": "public static function customer_optOut($customer_id) {\n \t$customer = Customers::getAllInfo($customer_id, \"email\");\n\t $subscriber = Doctrine::getTable ( 'NewslettersSubscribers' )->findOneBy ( 'email', $customer['email'] );\n\t if($subscriber){\n\t \t$subscriber->delete();\n\t \treturn true;\n\t }else{\n\t \treturn false;\n\t }\n\t \n }", "title": "" }, { "docid": "fceddce04627c214519d3dfddf87312a", "score": "0.4844554", "text": "public function hookCreateAccount($params)\n {\n $newCustomer = $params['newCustomer'];\n if (!Validate::isLoadedObject($newCustomer)) {\n return false;\n }\n $postVars = $params['_POST'];\n if (empty($postVars) || empty($postVars['referralprogram'])) {\n return false;\n }\n $sponsorEmail = $postVars['referralprogram'];\n if (!Validate::isEmail($sponsorEmail) || $sponsorEmail == $newCustomer->email) {\n return false;\n }\n\n $sponsor = new Customer();\n if ($sponsor = $sponsor->getByEmail($sponsorEmail, null, $this->context)) {\n include_once(dirname(__FILE__).'/ReferralProgramModule.php');\n\n /* If the customer was not invited by the sponsor, we create the invitation dynamically */\n if (!$idReferralprogram = ReferralProgramModule::isEmailExists($newCustomer->email, true, false)) {\n $referralprogram = new ReferralProgramModule();\n $referralprogram->id_sponsor = (int) $sponsor->id;\n $referralprogram->firstname = $newCustomer->firstname;\n $referralprogram->lastname = $newCustomer->lastname;\n $referralprogram->email = $newCustomer->email;\n if (!$referralprogram->validateFields(false)) {\n return false;\n } else {\n $referralprogram->save();\n }\n } else {\n $referralprogram = new ReferralProgramModule((int) $idReferralprogram);\n }\n\n if ($referralprogram->id_sponsor == $sponsor->id) {\n $referralprogram->id_customer = (int) $newCustomer->id;\n $referralprogram->save();\n if ($referralprogram->registerDiscountForSponsored((int) $params['cookie']->id_currency)) {\n $cartRule = new CartRule((int) $referralprogram->id_cart_rule);\n if (Validate::isLoadedObject($cartRule)) {\n $data = [\n '{firstname}' => $newCustomer->firstname,\n '{lastname}' => $newCustomer->lastname,\n '{voucher_num}' => $cartRule->code,\n '{voucher_amount}' => (Configuration::get('REFERRAL_DISCOUNT_TYPE') == 2 ? Tools::displayPrice((float) Configuration::get('REFERRAL_DISCOUNT_VALUE_'.(int) $this->context->currency->id), (int) Configuration::get('PS_CURRENCY_DEFAULT')) : (float) Configuration::get('REFERRAL_PERCENTAGE').'%'),\n ];\n\n $cookie = $this->context->cookie;\n\n Mail::Send(\n (int) $cookie->id_lang,\n 'referralprogram-voucher',\n Mail::l('Congratulations!', (int) $cookie->id_lang),\n $data,\n $newCustomer->email,\n $newCustomer->firstname.' '.$newCustomer->lastname,\n strval(Configuration::get('PS_SHOP_EMAIL')),\n strval(Configuration::get('PS_SHOP_NAME')),\n null,\n null,\n dirname(__FILE__).'/mails/'\n );\n }\n }\n\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "09a72d51f0f1b60fa314c817c3acb1a5", "score": "0.48434258", "text": "function checkIfValid(Customer $customer, $books){\n return $customer->getAmountToBorrow() >= count($books);\n\n}", "title": "" }, { "docid": "05434dbcc31212aab8df15015177e3c4", "score": "0.4843402", "text": "public function validate()\n {\n try {\n \\Stripe\\Customer::all(['limit' => 1]);\n } catch(\\Stripe\\Error\\Card $e) {\n // Since it's a decline, \\Stripe\\Error\\Card will be caught\n } catch (\\Stripe\\Error\\RateLimit $e) {\n // Too many requests made to the API too quickly\n } catch (\\Stripe\\Error\\InvalidRequest $e) {\n // Invalid parameters were supplied to Stripe's API\n } catch (\\Stripe\\Error\\Authentication $e) {\n // Authentication with Stripe's API failed\n // (maybe you changed API keys recently)\n throw new \\Stripe\\Error\\Authentication($e->getMessage());\n } catch (\\Stripe\\Error\\ApiConnection $e) {\n // Network communication with Stripe failed\n } catch (\\Stripe\\Error\\Base $e) {\n // Display a very generic error to the user, and maybe send\n // yourself an email\n } catch (Exception $e) {\n // Something else happened, completely unrelated to Stripe\n }\n }", "title": "" }, { "docid": "db905f00b0ce293ec018212d959d6cb3", "score": "0.48409936", "text": "public function rules()\n {\n return [\n 'company_name' => ['required', 'max:191', 'unique:customers,company_name,' . Request::get('customer_id')],\n 'contact_number' => ['required', 'max:11', 'min:10', 'unique:customers,contact_number,' . Request::get('customer_id')],\n 'alternative_contact_number' => ['required', 'max:9', 'min:7', 'unique:customers,alternative_contact_number,' . Request::get('customer_id')],\n 'address' => ['required', 'max:191'],\n 'email' => ['required', 'unique:customers,email,' . Request::get('customer_id')],\n 'note' => ['max:255'],\n 'other_category' => ['max:50'],\n 'customer_type_id'=> ['required']\n ];\n }", "title": "" }, { "docid": "8e2cb9e734de2d8e45c4e82b71d48328", "score": "0.4833156", "text": "protected function validate()\n {\n /* do nada. */\n }", "title": "" }, { "docid": "8f8b0e403be5fb351377cd42e2349b6e", "score": "0.4824271", "text": "public function clientValidateAttribute($object,$attribute)\n\t{\n\t}", "title": "" }, { "docid": "c55fe203b2340bf7e4e1e0c83a4dc017", "score": "0.48234454", "text": "public function hookAdminCustomers($params)\n\t{\n\t\tinclude_once(dirname(__FILE__).'/ReferralProgramModule.php');\n\t\t\n\t\t$customer = new Customer((int)$params['id_customer']);\n\t\tif (!Validate::isLoadedObject($customer))\n\t\t\tdie (Tools::displayError('Incorrect object Customer.'));\n\n\t\tglobal $cookie;\n\t\t$friends = ReferralProgramModule::getSponsorFriend((int)$customer->id);\n\t\tif ($id_referralprogram = ReferralProgramModule::isSponsorised((int)$customer->id, true))\n\t\t{\n\t\t\t$referralprogram = new ReferralProgramModule((int)$id_referralprogram);\n\t\t\t$sponsor = new Customer((int)$referralprogram->id_sponsor);\n\t\t}\n\n\t\t$html = '\n\t\t<h2>'.$this->l('Referral program').'</h2>\n\t\t<h3>'.(isset($sponsor) ? $this->l('Customer\\'s sponsor:').' <a href=\"index.php?tab=AdminCustomers&id_customer='.(int)$sponsor->id.'&viewcustomer&token='.Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)($cookie->id_employee)).'\">'.$sponsor->firstname.' '.$sponsor->lastname.'</a>' : $this->l('No one has sponsored this customer.')).'</h3>';\n\n\t\tif ($friends AND sizeof($friends))\n\t\t{\n\t\t\t$html.= '<h3>'.sizeof($friends).' '.(sizeof($friends) > 1 ? $this->l('Sponsored customers:') : $this->l('Sponsored customer:')).'</h3>';\n\t\t\t$html.= '\n\t\t\t<table cellspacing=\"0\" cellpadding=\"0\" class=\"table\">\n\t\t\t\t<tr>\n\t\t\t\t\t<th class=\"center\">'.$this->l('ID').'</th>\n\t\t\t\t\t<th class=\"center\">'.$this->l('Name').'</th>\n\t\t\t\t\t<th class=\"center\">'.$this->l('Email').'</th>\n\t\t\t\t\t<th class=\"center\">'.$this->l('Registration date').'</th>\n\t\t\t\t\t<th class=\"center\">'.$this->l('Customers sponsored by this friend').'</th>\n\t\t\t\t\t<th class=\"center\">'.$this->l('Placed orders').'</th>\n\t\t\t\t\t<th class=\"center\">'.$this->l('Customer account created').'</th>\n\t\t\t\t</tr>';\n\t\t\t\tforeach ($friends AS $key => $friend)\n\t\t\t\t{\n\t\t\t\t\t$orders = Order::getCustomerOrders($friend['id_customer']);\n\t\t\t\t\t$html.= '\n\t\t\t\t\t<tr '.($key++ % 2 ? 'class=\"alt_row\"' : '').' '.((int)($friend['id_customer']) ? 'style=\"cursor: pointer\" onclick=\"document.location = \\'?tab=AdminCustomers&id_customer='.$friend['id_customer'].'&viewcustomer&token='.Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)($cookie->id_employee)).'\\'\"' : '').'>\n\t\t\t\t\t\t<td class=\"center\">'.((int)($friend['id_customer']) ? $friend['id_customer'] : '--').'</td>\n\t\t\t\t\t\t<td>'.$friend['firstname'].' '.$friend['lastname'].'</td>\n\t\t\t\t\t\t<td>'.$friend['email'].'</td>\n\t\t\t\t\t\t<td>'.Tools::displayDate($friend['date_add'], (int)($cookie->id_lang), true).'</td>\n\t\t\t\t\t\t<td align=\"right\">'.sizeof(ReferralProgramModule::getSponsorFriend($friend['id_customer'])).'</td>\n\t\t\t\t\t\t<td align=\"right\">'.($orders ? sizeof($orders) : 0).'</td>\n\t\t\t\t\t\t<td align=\"center\">'.((int)$friend['id_customer'] ? '<img src=\"'._PS_ADMIN_IMG_.'enabled.gif\" />' : '<img src=\"'._PS_ADMIN_IMG_.'disabled.gif\" />').'</td>\n\t\t\t\t\t</tr>';\n\t\t\t\t}\n\t\t\t$html.= '\n\t\t\t\t</table>';\n\t\t}\n\t\telse\n\t\t\t$html.= $customer->firstname.' '.$customer->lastname.' '.$this->l('has not sponsored any friends yet.');\n\t\treturn $html.'<br/><br/>';\n\t}", "title": "" }, { "docid": "3319627f40524c0587d2fbbb8d3fe552", "score": "0.48231813", "text": "public function verifyCustomerRegistration($token)\n {\n $customer = Customer::where('activate_token', $token)->first();\n if ($customer) {\n //JIKA ADA MAKA DATANYA DIUPDATE DENGNA MENGOSONGKAN TOKENNYA DAN STATUSNYA JADI AKTIF\n $customer->update([\n 'activate_token' => null,\n 'status' => 1\n ]);\n //REDIRECT KE HALAMAN LOGIN DENGAN MENGIRIMKAN FLASH SESSION SUCCESS\n return redirect(route('customer.login'))->with(['success' => 'Verifikasi Berhasil, Silahkan Login']);\n }\n //JIKA TIDAK ADA, MAKA REDIRECT KE HALAMAN LOGIN\n //DENGAN MENGIRIMKAN FLASH SESSION ERROR\n return redirect(route('customer.login'))->with(['error' => 'Invalid Verifikasi Token']);\n }", "title": "" }, { "docid": "900a31c67d6d93250b969de4a6c5152c", "score": "0.48176494", "text": "public function validateCertificate($validate = true) {\r\n\t\t$this->validate = $validate;\r\n\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "0871c5226212d9745da02ffb04fd8e0d", "score": "0.48121876", "text": "static function unsubscription_link($customer){\n return Mage::getModel('newsletter/subscriber')->loadByEmail($customer->getEmail())->getUnsubscriptionLink();\n }", "title": "" }, { "docid": "e394d0f18eafde9bcc076fbd326354ec", "score": "0.480998", "text": "private function submit($customer)\n\t{\n\t\t$customerDao = new DefaultCustomerDao($this->stormpath->getConnector());\n\t\t\n\t\t$status = new Status();\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$request = new \\Services_Stormpath_Authc_UsernamePasswordRequest($customer->getUserName(), $customer->getPassword());\n\t\t\t\n\t\t\t$authcResult = $this->stormpath->getApplication()->authenticateAccount($request);\n\t\t\t\n\t\t\t$account = $authcResult->getAccount();\n\t\t\t\n\t\t\t$user = User::constructWithAccount($account);\n\t\t\t\n\t\t\t$dbCustomer = $customerDao->getCustomerByUserName($customer->getUserName());\n\t\t\tif(empty($dbCustomer))\n\t\t\t\t$customerDao->saveCustomer($user);\n\t\t\tif($dbCustomer != null)\n\t\t\t\t$user->setId($dbCustomer->getId());\n\t\t\t\n\t\t\tif(!empty($user))\n\t\t\t{\n\t\t\t\t$status = new Status();\n\t\t\t\t$status->setStatus(Service::SUCCESS);\n\t\t\t\t$status->setObj(array(\"user\"=>$user));\n\t\t\t} \n\t\t} \n\t\tcatch(\\Exception $e)\n\t\t{\n\t\t\t$status = new Status();\n\t\t\t$status->setStatus(Service::FAILED);\n\t\t\t$status->setError(new Error(\"customer.errors\", \"help-block\", $e->getMessage()));\n\t\t}\n\t\t\n\t\treturn $status;\n\t\t\n\t}", "title": "" }, { "docid": "90a7c992ba40a3c92f9351a20397b50a", "score": "0.48085678", "text": "public function validate() {\n // Est-ce que l'ami existe\n $userid = intval($this->request->getData('id'));\n $user = new \\modules\\User\\User();\n $user->exists($userid);\n\n if($user->exists) { \n $friend = new Friend($this->user->infos);\n if($friend->validate($userid)) {\n $friend->sendEmail($user, 'validate'); \n }\n }\n $this->response->redirect('friend');\n }", "title": "" }, { "docid": "9664441402fdd31b0c6e675f5724151a", "score": "0.48016834", "text": "protected function customerId(WorkDocument $workDocument): void\n {\n \\Logger::getLogger(\\get_class($this))->debug(__METHOD__);\n if ($workDocument->issetCustomerID()) {\n $allCustomer = $this->auditFile->getMasterFiles()->getAllCustomerID();\n if (\\in_array($workDocument->getCustomerID(), $allCustomer) === false) {\n\n $msg = \\sprintf(\n AAuditFile::getI18n()->get(\n \"customerID_not_exits\"\n ), $workDocument->\n getCustomerID(), $workDocument->getDocumentNumber()\n );\n\n $this->auditFile->getErrorRegistor()->addValidationErrors($msg);\n $workDocument->addError($msg, WorkDocument::N_CUSTOMERID);\n \\Logger::getLogger(\\get_class($this))->info($msg);\n $this->isValid = false;\n }\n } else {\n $msg = \\sprintf(\n AAuditFile::getI18n()->get(\n \"customerID_not_defined_in_document\"\n ), $workDocument->getDocumentNumber()\n );\n $this->auditFile->getErrorRegistor()->addValidationErrors($msg);\n $workDocument->addError($msg, WorkDocument::N_CUSTOMERID);\n \\Logger::getLogger(\\get_class($this))->info($msg);\n $this->isValid = false;\n }\n }", "title": "" }, { "docid": "bd795f347fb047ffd8a4cad40353a0a2", "score": "0.48008698", "text": "public function valid_link($link)\n \t{\n \t\t//access temp_users table and look for link value\n \t\t$this->db->where('link',$link);\n \t\t$query = $this->db->get('temp_users');\n \t\n \t\t//check if a match was found\n \t\tif ($query->num_rows()==1)\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\telse return false;\n \t}", "title": "" }, { "docid": "8fd5c0f4024cc2ad58c1acfb3f6b8582", "score": "0.48008323", "text": "public function processAuthenticationFailure($customerId);", "title": "" }, { "docid": "6cc47c24f61cdaf3108a4b622e76f5e6", "score": "0.47985563", "text": "public function subscribeCustomer($customer)\n {\n $this->loadByCustomer($customer);\n\n if ($customer->getImportMode()) {\n $this->setImportMode(true);\n }\n\n if (!$customer->getIsSubscribed() && !$this->getId()) {\n // If subscription flag not set or customer is not a subscriber\n // and no subscribe below\n return $this;\n }\n\n if(!$this->getId()) {\n $this->setSubscriberConfirmCode($this->randomSequence());\n }\n\n /*\n * Logical mismatch between customer registration confirmation code and customer password confirmation\n */\n $confirmation = null;\n if ($customer->isConfirmationRequired() && ($customer->getConfirmation() != $customer->getPassword())) {\n $confirmation = $customer->getConfirmation();\n }\n\n $subscribed_on_confirm = false;\n if($customer->hasIsSubscribed()) {\n $status = $customer->getIsSubscribed() ? (!is_null($confirmation) ? self::STATUS_UNCONFIRMED : self::STATUS_SUBSCRIBED) : self::STATUS_UNSUBSCRIBED;\n } elseif (($this->getStatus() == self::STATUS_UNCONFIRMED) && (is_null($confirmation))) {\n $status = self::STATUS_SUBSCRIBED;\n $subscribed_on_confirm = true;\n } else {\n $status = ($this->getStatus() == self::STATUS_NOT_ACTIVE ? self::STATUS_UNSUBSCRIBED : $this->getStatus());\n }\n\n if($status != $this->getStatus()) {\n $this->setIsStatusChanged(true);\n }\n\n $this->setStatus($status);\n\n if(!$this->getId()) {\n $this->setStoreId($customer->getStoreId())\n ->setCustomerId($customer->getId())\n ->setEmail($customer->getEmail());\n } else {\n $this->setEmail($customer->getEmail());\n }\n\n $isSubscribed = Mage::app()->getRequest()->getParam( 'is_subscribed', 1 );\n if ( is_array( $isSubscribed ) ) {\n $groupString = implode( ',', $isSubscribed );\n $this->setNewsletterGroupId( $groupString );\n }\n else {\n $this->setNewsletterGroupId( $isSubscribed );\n }\n\n $this->save();\n $sendSubscription = $customer->getData('sendSubscription') || $subscribed_on_confirm;\n if (is_null($sendSubscription) xor $sendSubscription) {\n if ($this->getIsStatusChanged() && $status == self::STATUS_UNSUBSCRIBED) {\n $this->sendUnsubscriptionEmail();\n } elseif ($this->getIsStatusChanged() && $status == self::STATUS_SUBSCRIBED) {\n $this->sendConfirmationSuccessEmail();\n }\n }\n return $this;\n }", "title": "" }, { "docid": "9092ef6d8b2f20c9e2599c0dbecdb9ef", "score": "0.4796711", "text": "private function _validate(CustomerAddressModel $customerAddressModel)\n {\n $exception = new InputException();\n if ($customerAddressModel->getShouldIgnoreValidation()) {\n return $exception;\n }\n\n if (!\\Zend_Validate::is($customerAddressModel->getFirstname(), 'NotEmpty')) {\n $exception->addError(__('%fieldName is a required field.', ['fieldName' => 'firstname']));\n }\n\n if (!\\Zend_Validate::is($customerAddressModel->getLastname(), 'NotEmpty')) {\n $exception->addError(__('%fieldName is a required field.', ['fieldName' => 'lastname']));\n }\n\n if (!\\Zend_Validate::is($customerAddressModel->getStreetLine(1), 'NotEmpty')) {\n $exception->addError(__('%fieldName is a required field.', ['fieldName' => 'street']));\n }\n\n /* Custom Street Validations */\n if ($this->helper->getConfig(\"brazilcustomerattributes/general/line_number\") &&\n !\\Zend_Validate::is($customerAddressModel->getStreetLine(2), 'NotEmpty')) {\n $exception->addError(__('%fieldName is a required field.', ['fieldName' => 'number']));\n }\n\n if ($this->helper->getConfig(\"brazilcustomerattributes/general/line_neighborhood\") &&\n !\\Zend_Validate::is($customerAddressModel->getStreetLine(3), 'NotEmpty')) {\n $exception->addError(__('%fieldName is a required field.', ['fieldName' => 'neighborhood']));\n }\n\n if ($this->helper->getConfig(\"brazilcustomerattributes/general/line_complement\") &&\n !\\Zend_Validate::is($customerAddressModel->getStreetLine(4), 'NotEmpty')) {\n $exception->addError(__('%fieldName is a required field.', ['fieldName' => 'complement']));\n }\n $exception->addError(__('%fieldName is a required field.', ['fieldName' => 'complement']));\n\n\n if (!\\Zend_Validate::is($customerAddressModel->getCity(), 'NotEmpty')) {\n $exception->addError(__('%fieldName is a required field.', ['fieldName' => 'city']));\n }\n\n if (!\\Zend_Validate::is($customerAddressModel->getTelephone(), 'NotEmpty')) {\n $exception->addError(__('%fieldName is a required field.', ['fieldName' => 'telephone']));\n }\n\n $havingOptionalZip = $this->directoryData->getCountriesWithOptionalZip();\n if (!in_array($customerAddressModel->getCountryId(), $havingOptionalZip)\n && !\\Zend_Validate::is($customerAddressModel->getPostcode(), 'NotEmpty')\n ) {\n $exception->addError(__('%fieldName is a required field.', ['fieldName' => 'postcode']));\n }\n\n if (!\\Zend_Validate::is($customerAddressModel->getCountryId(), 'NotEmpty')) {\n $exception->addError(__('%fieldName is a required field.', ['fieldName' => 'countryId']));\n }\n\n if ($this->directoryData->isRegionRequired($customerAddressModel->getCountryId())) {\n $regionCollection = $customerAddressModel->getCountryModel()->getRegionCollection();\n if (!$regionCollection->count() && empty($customerAddressModel->getRegion())) {\n $exception->addError(__('%fieldName is a required field.', ['fieldName' => 'region']));\n } elseif (\n $regionCollection->count()\n && !in_array(\n $customerAddressModel->getRegionId(),\n array_column($regionCollection->getData(), 'region_id')\n )\n ) {\n $exception->addError(__('%fieldName is a required field.', ['fieldName' => 'regionId']));\n }\n }\n return $exception;\n }", "title": "" }, { "docid": "61bab4c66b9201363b551ebefb0f3646", "score": "0.47952044", "text": "function create($customer) {\n\t\t// Make sure the input is an object of some kind\n\t\tif (is_object($customer)) {\n\t\t\t// It is an object, now determine the type\n\t\t\t$srcType = $this->objectType($customer);\n\t\t\tswitch ($srcType) {\n\t\t\t\tcase 'Business':\n\t\t\t\t\t$required = ['name', 'phone_number', 'tax_id', 'street_address', 'postal_code', 'person', 'person.name', 'person.dob', 'person.street_address', 'person.postal_code', 'person.tax_id'];\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'Person':\n\t\t\t\t\t$required = ['name', 'email_address', 'tax_id', 'street_address', 'postal_code', 'dob'];\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'Buyer':\n\t\t\t\t\t$required = ['name', 'email_address'];\n\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t// We didn't get a Buyer, Business, or Person.\n\t\t\t\t\t// Throw an error saying as much.\n\t\t\t\t\tthrow new InvalidArgument(\"Customer data must be of object type Buyer, Person, or Business. \" . $srcType . \" given.\");\n\t\t\t}\n\n\t\t\tforeach ($required as $val) {\n\t\t\t\tif (strstr($val, '.')) {\n\t\t\t\t\t$explode = explode('.', $val);\n\t\t\t\t\t$parent = $explode[0];\n\t\t\t\t\t$key = $explode[1];\n\n\t\t\t\t\tif (!array_key_exists($key, $customer->getItems()[$parent])) {\n\t\t\t\t\t\tthrow new InvalidArgument(\"$parent.$key field required on \" . $srcType . \" object.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (!array_key_exists($val, $customer->getItems())) {\n\t\t\t\t\t\tthrow new InvalidArgument(\"$val field required on \" . $srcType . \" object.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->params['name'] = $customer->name;\n\t\t\t$this->params['email_address'] = $customer->email_address;\n\n\t\t\tif ($srcType == 'Business' || $srcType == \"Person\") {\n\t\t\t\t$this->params['merchant'] = $customer->getItems();\n\t\t\t\t$this->params['merchant']['type'] = ($srcType == 'Business') ? 'business' : 'person';\n\t\t\t}\n\n\t\t\t$this->params = array_merge($this->params, $customer->getItems());\n\t\t\t$request = $this->representation->instance->client->post('marketplaces/{MARKETPLACE_ID}/accounts', null, $this->params);\n\t\t\t$response = $request->send();\n\t\t\t$this->params = [];\n\t\t\t$this->representation->fill($response->json());\n\t\t\treturn $this->representation;\n\t\t}\n\t\telse {\n\t\t\tthrow new InvalidArgument(\"Customer data must be of object type Buyer, Person or Business.\");\n\t\t}\n\t}", "title": "" }, { "docid": "c5bf0f5ebe547643253674da04b34763", "score": "0.47894585", "text": "protected function _isAllowed() {\n return Mage::getSingleton('admin/session')->isAllowed( 'prominclinkorder/link_customer_to_order' );\n }", "title": "" }, { "docid": "ff9de4d11c6a17d802e0b643b438c113", "score": "0.47867256", "text": "function validate (&$controller, &$request, &$user)\n {\n\n return TRUE;\n\n }", "title": "" }, { "docid": "1da389a17402e4ba852ff6a859ddcb91", "score": "0.47837937", "text": "public function test(Customer $initialCustomer, Customer $customer)\n {\n // Preconditions\n $initialCustomer->persist();\n\n // Steps\n $this->objectManager->create(\n \\Magento\\Customer\\Test\\TestStep\\LoginCustomerOnFrontendStep::class,\n ['customer' => $initialCustomer]\n )->run();\n\n $this->customerAccountEdit->getAccountMenuBlock()->openMenuItem('Account Information');\n $this->customerAccountEdit->getAccountInfoForm()->SetChangeEmail(true);\n $this->customerAccountEdit->getAccountInfoForm()->fill($customer);\n $this->customerAccountEdit->getAccountInfoForm()->submit();\n }", "title": "" }, { "docid": "61d2bf13676fccb4ac5dc7d0aa9276df", "score": "0.4778955", "text": "public function isGenerated(Customer $customer) : bool;", "title": "" }, { "docid": "e1ff7080cce56933e482d9566744edcb", "score": "0.4777726", "text": "protected function validateClient ($link)\n {\n if (empty($link->client)) {\n $subject = 'Feedback link not associated with client!';\n $error = __FILE__ . ' @ ' . __LINE__;\n $meta = ['url' => $link];\n Notification::send(User::first(), new Slack($subject, $error, $meta));\n exit;\n }\n $this->client = $link->client;\n }", "title": "" }, { "docid": "d51d24a1b4b806ae7a82ba68d8c9d501", "score": "0.47773278", "text": "protected function _validate()\n {\n }", "title": "" }, { "docid": "8342b0ad37724424a58ae8a89b1ae28d", "score": "0.47745472", "text": "function check_requirements()\n\t{\n\t\tif (!$this->obj_customer->verify_id())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested customer (\". $this->obj_customer->id .\") does not exist - possibly the customer has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\n\t\t// verify that service-customer mapping is valid\n\t\tif (!$this->obj_customer->verify_id_service_customer())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested service (\". $this->obj_customer->id_service_customer .\") was not found and/or does not match the selected customer\");\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "03fae89a28d597863e78b9d616fa595f", "score": "0.4767032", "text": "public function isNewCustomer();", "title": "" }, { "docid": "9118bf88c626e6386fcb48e304a0b1c1", "score": "0.47640657", "text": "function registerValidators (&$validatorManager, &$controller, &$request,\n &$user)\n {\n // $validatorManager->setRequired('url', TRUE, 'You must enter a url to access');\n }", "title": "" }, { "docid": "638f7423360898c2b1f2bdff2db3a38f", "score": "0.4757821", "text": "public function execute()\n {\n /** @var \\Magento\\Framework\\Controller\\Result\\Redirect $resultRedirect */\n $resultRedirect = $this->resultRedirectFactory->create();\n $validFormKey = $this->formKeyValidator->validate($this->getRequest());\n\n if ($validFormKey && $this->getRequest()->isPost()) {\n $currentCustomerDataObject = $this->getCustomerDataObject($this->session->getCustomerId());\n $customerCandidateDataObject = $this->populateNewCustomerDataObject(\n $this->_request,\n $currentCustomerDataObject\n );\n\n try {\n $request = $this->customerRequestFactory->create(['customer' => $customerCandidateDataObject])\n ->createRequest();\n\n $validationResult = $this->evsRequest->validate($request);\n $currentCustomerDataObject->setCustomAttribute(\n Data::ATTRIBUTE_CODE_VERIFIED,\n (bool)$validationResult\n );\n $currentCustomerDataObject->setCustomAttribute(\n Data::ATTRIBUTE_CODE_ID,\n $validationResult\n );\n $this->customerRepository->save($currentCustomerDataObject);\n\n $path = 'magenmagic_ageverification/documents';\n if ($validationResult) {\n $this->messageManager->addSuccessMessage(__('Your age was successfully verified.'));\n $path = 'customer/account';\n }\n\n return $resultRedirect->setPath($path);\n } catch (InputException $e) {\n $this->messageManager->addErrorMessage($e->getMessage());\n foreach ($e->getErrors() as $error) {\n $this->messageManager->addErrorMessage($error->getMessage());\n }\n } catch (LocalizedException $e) {\n $this->messageManager->addErrorMessage($e->getMessage());\n } catch (\\Exception $e) {\n $this->messageManager->addExceptionMessage($e, __('We can\\'t process the request.'));\n }\n\n $this->session->setCustomerFormData($this->getRequest()->getPostValue());\n }\n\n return $resultRedirect->setPath('*/*');\n }", "title": "" }, { "docid": "47dc616584687d73d20c9f8ba3f53a8d", "score": "0.47556633", "text": "function addCustomer() {\nrequire(\"/home/course/cda540/u05/public_html/project/dbguest.php\");\n\n//It will import all variables such as $host , $user, $pass and $db\n\n//mysqli_connect() is to connect the database\n$link = mysqli_connect($host, $user, $pass, $db);\n\n//Check the connection. Give error message if any error\nif (!$link) die(\"Couldn't connect to MySQL\");\n\n\n//mysqli_select_db() is used to select the database\nmysqli_select_db($link, $db)\n or die(\"Couldn't open $db: \".mysqli_error($link));\n\n//mysqli_query will execute the query and stores into $result\n\n$result_fname=$_POST['firstName'];\n$result_lname=$_POST['lastName'];\n$result_phoneNumber=$_POST['phoneNumber'];\n$result_address =$_POST['address'];\n$check = $_POST['yesNo'];\n\n$result_check = mysqli_query($link, \"select * from CUSTOMER where fname='$_POST[firstName]' and lname='$_POST[lastName]' \");\n\nif ($result_check->num_rows> 0)\n{\n\tif ($_POST['yes']=='yes')\n\t{\n\techo '<span style=\"color:#008000;text-align:center;\"> With Consent : Customer has been added....</span>';\n\t$result_customer = mysqli_query($link, \"INSERT INTO CUSTOMER (lname,fname,address,phoneNumber) VALUES('$result_lname','$result_fname','$result_address','$result_phoneNumber')\");\n\t}\n\telse\n\t{\n\techo '<span style=\"color:#FF0000;text-align:center;\">Without Consent : Please provide different firstname/lastname.... </span>';\n\t}\n}\n\nelse\n{\n$result_customer = mysqli_query($link, \"INSERT INTO CUSTOMER (lname,fname,address,phoneNumber) VALUES('$result_lname','$result_fname','$result_address','$result_phoneNumber')\");\necho '<span style=\"color:#008000;text-align:center;\">Success!!! Added a new customer...</span>';\n}\n\n//Close the connection\nmysqli_close($link);\n\n}", "title": "" }, { "docid": "872ac974d4a9c5940b4aa0bb98960ef9", "score": "0.47553223", "text": "function add_customer()\n\t{\n\t\terror_reporting(0);\n\n\t\tif($this->scrap_wall->login_check_ajax() == TRUE)\n\t\t{\n\t\t\t// Some variables\n\t\t\t$user_id = $this->session->userdata('sv_user_id');\n\t\t\t$customer_name = $this->input->post('inpCustomerName');\n\t\t\t$customer_number = $this->input->post('inpCustomerNumber');\n\t\t\t$first_name = $this->input->post('inpName');\n\t\t\t$surname = $this->input->post('inpSurname');\n\t\t\t$email = $this->input->post('inpEmail');\n\t\t\t$customer_group = $this->input->post('inpCustomerGroup');\n\t\t\t$group_ids = $this->input->post('inpGroupIds');\n\t\t\t$username = $first_name.$surname.$this->scrap_string->random_string(5);\n\t\t\t$password = $this->scrap_string->random_string();\n\t\t\t$show_host_id\t\t\t= $this->scrap_web->get_show_host_id();\n\n\t\t\t// Scrappy web call\n\t\t\t$url_sample\t\t\t\t = 'customers/sample.json';\n\t\t\t$call_sample\t\t\t = $this->scrap_web->webserv_call($url_sample);\n\n\t\t\t// Validate\n\t\t\tif($call_sample['error'] == FALSE)\n\t\t\t{\n\t\t\t\t// Get show host id\n\t\t\t\t$show_host_id\t\t\t= $this->scrap_web->get_show_host_id();\n\n\t\t\t\t// Sample\n\t\t\t\t$json_sample\t\t\t= $call_sample['result'];\n\n\t\t\t\t// Change the data\n\t\t\t\t$ar_emails\t\t\t\t\t\t\t\t\t = array();\n\t\t\t\t$ar_emails['is_primary'] \t\t = TRUE;\n\t\t\t\t$ar_emails['email']\t\t\t\t\t\t\t = $email;\n\n\t\t\t\t$json_sample->name = $customer_name;\n\t\t\t\t$json_sample->customer_to_show_host->customer_name = $customer_name;\n\n\t\t\t\t$customer_to_show_host = $json_sample->customer_to_show_host;\n\t\t\t\t$customer_to_show_host->show_host_organization = $show_host_id;\n\t\t\t\t$customer_to_show_host->customer_number = $customer_number;\n\n\t\t\t\t// Customer user\n\t\t\t\t$json_sample->customer_owner->user->user_emails\t = array($ar_emails);\n\t\t\t\t$json_sample->customer_owner->user->firstname\t\t= $first_name;\n\t\t\t\t$json_sample->customer_owner->user->lastname\t\t= $surname;\n\t\t\t\t$json_sample->customer_owner->user->username\t\t= $username;\n\t\t\t\t$json_sample->customer_owner->user->password\t\t= sha1($password);\n\t\t\t\t$json_sample->time_zone->id = 6;\n\t\t\t\t$json_sample->customer_owner->user->clear_password = $password;\n\n\t\t\t\t// Recode\n\t\t\t\t$new_json\t\t\t\t= json_encode($json_sample);\n\n\t\t\t\t// Submit the new customer\n\t\t\t\t$new_customer\t\t\t= $this->scrap_web->webserv_call('customers/.json', $new_json, 'put');\n\n\t\t\t\t// Validate the result\n\t\t\t\tif($new_customer['error'] == FALSE)\n\t\t\t\t{\n\t\t\t\t\t// Some variables\n\t\t\t\t\t$json_new_customer = $new_customer['result'];\n\n\t\t\t\t\t// Existing Groups\n\t\t\t\t\t$ex_existing_groups = explode(':', $group_ids);\n\t\t\t\t\t$ar_existing_group_ids = array();\n\t\t\t\t\t$ar_existing_group_labels = array();\n\n\t\t\t\t\tforeach($ex_existing_groups as $existing_group)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!empty($existing_group))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ex_existing_group = explode('-', $existing_group);\n\t\t\t\t\t\t\tif(!in_array($ex_existing_group[0], $ar_existing_group_ids))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tarray_push($ar_existing_group_ids, $ex_existing_group[0]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tarray_push($ar_existing_group_labels, trim($ex_existing_group[1]));\n\n\t\t\t\t\t\t\t// Group info\n\t\t\t\t\t\t\t$url_group = 'fastsellcustomergroups/.json?id='.$ex_existing_group[0];\n\t\t\t\t\t\t\t$call_group = $this->scrap_web->webserv_call($url_group, FALSE, 'get', FALSE, FALSE);\n\n\t\t\t\t\t\t\tif($call_group['error'] == FALSE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$json_group = $call_group['result'];\n\n\t\t\t\t\t\t\t\t// Add the customer ids to the group\n\t\t\t\t\t\t\t\t$ar_customer_ids = array();\n\n\t\t\t\t\t\t\t\tforeach($json_group->customer_organizations as $current_customer)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tarray_push($ar_customer_ids, array('id' => $current_customer->id));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tarray_push($ar_customer_ids, array('id' => $json_new_customer->id));\n\t\t\t\t\t\t\t\t$json_group->customer_organizations = $ar_customer_ids;\n\n\t\t\t\t\t\t\t\t// Encode\n\t\t\t\t\t\t\t\t$json_group = json_encode($json_group);\n\n\t\t\t\t\t\t\t\t// Create the group\n\t\t\t\t\t\t\t\t$update_group = $this->scrap_web->webserv_call('fastsellcustomergroups/.json', $json_group, 'post');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// New groups\n\t\t\t\t\t$ex_text_groups = explode(',', $customer_group);\n\n\t\t\t\t\tforeach($ex_text_groups as $text_group)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!in_array(trim($text_group), $ar_existing_group_labels))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Sample group\n\t\t\t\t\t\t\t$url_sample_group = 'fastsellcustomergroups/sample.json';\n\t\t\t\t\t\t\t$call_sample_group = $this->scrap_web->webserv_call($url_sample_group);\n\n\t\t\t\t\t\t\tif($call_sample_group['error'] == FALSE)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$json_sample_group = $call_sample_group['result'];\n\n\t\t\t\t\t\t\t\t$json_sample_group->name = $text_group;\n\t\t\t\t\t\t\t\t$json_sample_group->show_host_organization->id = $show_host_id;\n\t\t\t\t\t\t\t\t$json_sample_group->customer_organizations = null;\n\n\t\t\t\t\t\t\t\t// Add the customer ids to the group\n\t\t\t\t\t\t\t\t$ar_customer_ids = array();\n\t\t\t\t\t\t\t\tarray_push($ar_customer_ids, array('id' => $json_new_customer->id));\n\t\t\t\t\t\t\t\t$json_sample_group->customer_organizations = $ar_customer_ids;\n\n\t\t\t\t\t\t\t\t// Encode\n\t\t\t\t\t\t\t\t$json_sample_group = json_encode($json_sample_group);\n\n\t\t\t\t\t\t\t\t// Create the group\n\t\t\t\t\t\t\t\t$new_group = $this->scrap_web->webserv_call('fastsellcustomergroups/.json', $json_sample_group, 'put');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\techo 'okitsdone';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Return the error message\n\t\t\t\t\t$json\t\t\t\t= $new_customer['result'];\n\t\t\t\t\techo $json->error_description;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo 9876;\n\t\t}\n\t}", "title": "" }, { "docid": "03d8b11c3299f73c53c08ee5760d560f", "score": "0.4754902", "text": "function validateLinks()\r\n {\r\n if (empty($this->handler->table_link) || empty($this->handler->field_link)) {\r\n trigger_error(\"The linked table is not set yet.\", E_USER_WARNING);\r\n return null;\r\n }\r\n if (empty($this->handler->field_object)) {\r\n $this->handler->field_object = $this->handler->field_link;\r\n }\r\n \r\n return true;\r\n }", "title": "" }, { "docid": "cfaea301699c2f3ed510db716dc5d3d0", "score": "0.47425568", "text": "public function store(ValidateRequest $request)\n {\n $this->customerService->store($request);\n return redirect()->route('customers.index');\n }", "title": "" }, { "docid": "29ba0b67fa0b1b9d4d781a135683aa45", "score": "0.47421038", "text": "function delete_customer()\n\t{\n\t\tif($this->scrap_wall->login_check_ajax() == TRUE)\n\t\t{\n\t\t\t// Some variables\n\t\t\t$customer_to_show_host_id = $this->input->post('customer_to_show_host_id');\n\n\t\t\t// Remove link\n\t\t\t$url_remove = 'customertoshowhosts/.json?id='.$customer_to_show_host_id;\n\t\t\t$call_remove = $this->scrap_web->webserv_call($url_remove, FALSE, 'delete');\n\n\t\t\tif($call_remove['error'] == FALSE)\n\t\t\t{\n\t\t\t\techo 'okitsdone';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Return the error message\n\t\t\t\t$json\t\t\t\t= $call_remove['result'];\n\t\t\t\techo $json->error_description;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo 9876;\n\t\t}\n\t}", "title": "" }, { "docid": "6747ba89e64c50def029bce2ea390eb4", "score": "0.47413802", "text": "private function createNaturalCustomerAction($customer)\n {\n\t\t//pass parameters\n\t\t$natural_customer = new NaturalCustomer();\n $natural_customer->setCustomerId($customer['id']);\n $natural_customer->setName($customer['name']);\n $natural_customer->setIdNumber($customer['id_number']);\n $natural_customer->setRegisterDate($customer['register_date']);\n $natural_customer->setGender($customer['gender']);\n $natural_customer->setAddress($customer['address']);\n $natural_customer->setOccupation($customer['occupation']);\n $natural_customer->setEducationalBackground($customer['educational_background']);\n $natural_customer->setCompanyOrOrganization($customer['company_or_organization']);\n $natural_customer->setTel($customer['tel']);\n $natural_customer->setAgentId($customer['agent_id']);\n $natural_customer->setBank($customer['bank']);\n $natural_customer->setFrozen(true);\n\t\t\n\t\t//instantiate database query\n $em = $this->getDoctrine()->getManager();\n $em->persist($natural_customer);\n $em->flush();\n\n return false;\n \n }", "title": "" }, { "docid": "c2256211657217445da9c7bf1048818a", "score": "0.47400647", "text": "public function destroy(customer $customer)\n {\n //\n }", "title": "" }, { "docid": "9f35c37487564779eea19be014560056", "score": "0.47372192", "text": "public function validate()\n {\n parent::validate();\n\n //extra validatie\n $this->validateBusNumber();\n }", "title": "" }, { "docid": "67a4f4770176e2820d6c9f7c93de86bc", "score": "0.47354388", "text": "public function beforeValidate($options = array())\n {\n if($this->data['Customer']['ShippingAddress']['same_shipping_address'])\n { \n // Copy the info from billing\n $this->data['Customer']['ShippingAddress']['zip_code'] = $this->data['Customer']['BillingAddress']['zip_code'];\n $this->data['Customer']['ShippingAddress']['city_name'] = $this->data['Customer']['BillingAddress']['city_name'];\n $this->data['Customer']['ShippingAddress']['street'] = $this->data['Customer']['BillingAddress']['street'];\n }\n\n if($this->ShippingAddress->save($this->data['Customer']['ShippingAddress']) && \n $this->BillingAddress->save($this->data['Customer']['BillingAddress']))\n {\n $this->data['Customer']['shipping_address_id'] = $this->ShippingAddress->id;\n $this->data['Customer']['billing_address_id'] = $this->BillingAddress->id;\n } else \n {\n return false;\n }\n \n // Remove spaces from string before validating it e.g. (12 34 56 78 => 12345678)\n $this->data['Customer']['phone_number'] = str_replace(' ', '', $this->data['Customer']['phone_number']);\n\n return true;\n }", "title": "" }, { "docid": "f51c1e4d5fed0e2db33c44191b797f23", "score": "0.4722067", "text": "public function edit(Customer $customer)\n {\n //\n }", "title": "" }, { "docid": "f51c1e4d5fed0e2db33c44191b797f23", "score": "0.4722067", "text": "public function edit(Customer $customer)\n {\n //\n }", "title": "" } ]
88ce78a855d020c25f60ebdf61d2c4f6
/ Initiate Fields Injection
[ { "docid": "b951de5bf922433ff036d38fbe10e458", "score": "0.5678192", "text": "public function archive_template_fields_injector() { \r\n\t wcff()->injector->inject_product_fields(current_action(), \"archive-product\");\r\n\t}", "title": "" } ]
[ { "docid": "9512b19704135e0d1727e6295d56de20", "score": "0.719677", "text": "public function initFields(): void\n {\n $this->fieldTitle();\n// $this->fieldPosition();\n// $this->fieldCategoryId();\n $this->fieldDescription();\n }", "title": "" }, { "docid": "e31e64c6d097b23ba38eab08b4863be9", "score": "0.7105022", "text": "public function initialize_fields() {\n\t\t\tWPS\\WP\\Fields::get_instance();\n\t\t}", "title": "" }, { "docid": "ab9217071e6e812b56e46a1578f92edf", "score": "0.7100838", "text": "public function __construct() {\n $this->fields = new Fields(); # allows for Fields 'knowlegdge' to be accessed by Validator\n }", "title": "" }, { "docid": "75d14114c23bd20d7a651a5a2d7b5bc5", "score": "0.69417304", "text": "public function initFields(): void\n {\n $this->fieldTitle();\n $this->fieldPosition();\n }", "title": "" }, { "docid": "6019f63b1cc9cd4eeb0528c9c4306974", "score": "0.69414604", "text": "public function setup() {\n\t\t\t$this->field = new Field(5,5);\n\t\t}", "title": "" }, { "docid": "88e54ccfd4991257c0a90940c50ba09b", "score": "0.67691195", "text": "public function defineFields()\n {\n }", "title": "" }, { "docid": "112183b3bab320cca844834e14db738c", "score": "0.663426", "text": "public function init()\n\t{\n\t\t// The user can define his own field of the database\n\t}", "title": "" }, { "docid": "61f03ae8e89e5c9281929b53fb1aec77", "score": "0.65699506", "text": "public function __construct()\n {\n $this->init();\n\n // Cache the field mappings\n }", "title": "" }, { "docid": "d669bebc7cb7025946dd86e0528cd890", "score": "0.6533112", "text": "public function init_fields() {\n\t\tadd_filter( 'ibx_wpfomo_types', array( $this, 'add_type' ), 10, 1 );\n\t\tadd_filter( 'ibx_wpfomo_field_fomo_type', array( $this, 'field_config' ), 0, 1 );\n\t\tadd_filter( 'ibx_wpfomo_metabox_fields', array( $this, 'render_fields' ), 0, 1 );\n\t}", "title": "" }, { "docid": "ec70e423b397d52051f5a660b790f762", "score": "0.65016174", "text": "protected function initFields()\n {\n $fields = static::fields();\n foreach($fields as $field => $opts) {\n if(!isset($this->_data[$field])) {\n $this->_data[$field] = isset($opts['value']) ? $opts['value'] : null;\n }\n }\n }", "title": "" }, { "docid": "1f35274f1e485b941fb9d162bdd43e98", "score": "0.6484087", "text": "public static function _init()\n {\n \\Lang::load('user');\n\n $a = \\Lang::get('field');\n // set the field labels\n\t\tforeach (\\Lang::get('field') as $field => $value)\n\t\t{\n\t\t\tisset(static::$_properties[$field]) and static::$_properties[$field]['label'] = $value;\n\t\t}\n\n }", "title": "" }, { "docid": "acb7022b24c90edc8020ef63dfab5034", "score": "0.6417412", "text": "public function __construct($fields) {\n\t\t$this->fields = $fields;\n\t}", "title": "" }, { "docid": "ca71c688b82f0cc7a73e1f66167fdbdb", "score": "0.6402123", "text": "private function initFieldsDefinition(): void\n {\n $this->fieldsDefinition = Phake::mock(FieldsDefinitionAbstract::class);\n\n Phake::when($this->fieldsDefinition)\n ->getField(Phake::anyParameters())\n ->thenReturn('lastName');\n }", "title": "" }, { "docid": "f5e7d88291f6e185c89a4829397697a4", "score": "0.6354147", "text": "public function prepareVars()\n {\n $this->vars['inputType'] = $this->pattern;\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n $this->vars['fieldId'] = $this->getId('input'); //fieldid for googleplaces.js\n }", "title": "" }, { "docid": "02a68bacebb9e131ddf07c6034d44a62", "score": "0.6349204", "text": "public function prepareVars()\n {\n //dd($this->formField);\n $this->vars['inputType'] = $this->pattern;\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }", "title": "" }, { "docid": "c2f05216e198e19442ed224c164a01c0", "score": "0.6346919", "text": "public function registerFields()\n {\n $fields = config('html.fields');\n\n foreach ($fields as $field) {\n $bindName = last(explode('\\\\',$field));\n $bindName = str_replace('Field','', $bindName);\n $this->app->bind(strtolower($bindName), function() use($field){\n return new $field;\n });\n }\n }", "title": "" }, { "docid": "e450d7a83567cb98bd201eeb72706826", "score": "0.632992", "text": "protected function init() {\n if (!static::$initialized) {\n if (!empty(static::$fieldsDefinition)) {\n foreach (static::$fieldsDefinition as $field) {\n static::$fields[$field] = true;\n }\n }\n static::$initialized = true;\n }\n }", "title": "" }, { "docid": "c88efea62b57e340abca6ba9056827cc", "score": "0.63055325", "text": "public function init_form_fields()\n {\n require 'init_form_fields.php';\n }", "title": "" }, { "docid": "de41ae364fe41f34bcd010cd1b0e89f3", "score": "0.62849635", "text": "function onInitializeField($name, $value) {}", "title": "" }, { "docid": "e563b09064badace64c9a64463185ee7", "score": "0.62767625", "text": "function __construct($input, $fields) {\n $this->input = $input;\n $this->fields = $fields;\n }", "title": "" }, { "docid": "0fb1d2b441641caa6a5189212b89dbaf", "score": "0.6252581", "text": "abstract function declareFields();", "title": "" }, { "docid": "196bef530ca2900e536fdfebd893c16b", "score": "0.62403536", "text": "function __construct($params)\n {\n $this->field = $params->field;\n }", "title": "" }, { "docid": "398895fc7c25265a514e6458dcd8c4e0", "score": "0.6240236", "text": "public function declare_fields();", "title": "" }, { "docid": "26e23d98cbd0174bc9692609224ca797", "score": "0.62101567", "text": "public function initField(){\n $this->field_id = DB::table('dx_lists_fields')->insertGetId(\n array(\n 'list_id' => $this->list_id, \n 'db_name' => $this->field_name, \n 'type_id' => 12, \n 'title_list' => $this->field_title, \n 'title_form' => $this->field_title,\n 'is_required' => $this->is_required,\n 'is_text_extract' => $this->is_text_extract\n )\n );\n }", "title": "" }, { "docid": "ce62dbf1ecbb6c0353866bcc5b2542c8", "score": "0.6187295", "text": "protected function fieldInit() {\r\n\t\t$this->hasInitialized = true;\r\n\t}", "title": "" }, { "docid": "cd98871caf9bc3e41d72ae334dd9627d", "score": "0.6178853", "text": "function myBlogFields() { $this->__construct(); }", "title": "" }, { "docid": "c8e0a1048e28de9633fb8e39e5d8bea7", "score": "0.6150639", "text": "public function __construct(){\n $this->fields = array();\n }", "title": "" }, { "docid": "cd09e61087c5fa713d31fee361de84b6", "score": "0.614775", "text": "public function __construct($fields)\n {\n $this->hydrate($fields);\n }", "title": "" }, { "docid": "8dc1ce1e68498b5af55f51488e57a0c3", "score": "0.6140639", "text": "private function _set_fields()\n\t{\n\t\t$this->form_data = new StdClass;\n $this->form_data->user_login = '';\n $this->form_data->date_from = '';\n $this->form_data->date_to = '';\n\t}", "title": "" }, { "docid": "9a0d717ab7238e8b7761df73662620e0", "score": "0.6133668", "text": "public function init_form_fields() {\n\t\t$this->form_fields = array(\n\t\t\t'shipping_method_article_codes' => array(\n\t\t\t\t'type' => 'twinfield_codes',\n\t\t\t),\n\t\t\t'shipping_method_subarticle_codes' => array(\n\t\t\t\t'type' => 'twinfield_codes',\n\t\t\t),\n\t\t\t'tax_classes_vat_codes' => array(\n\t\t\t\t'type' => 'twinfield_codes',\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "2c07590e1eac19cf45f58f270dc2e877", "score": "0.60803163", "text": "public function __construct($field)\n {\n $this->field = $field;\n }", "title": "" }, { "docid": "2c07590e1eac19cf45f58f270dc2e877", "score": "0.60803163", "text": "public function __construct($field)\n {\n $this->field = $field;\n }", "title": "" }, { "docid": "6877755b0d694e5700f58f33e1aa0705", "score": "0.60696393", "text": "public function __construct()\n {\n $this->pkName = 'petID';\n $this->inputColDefinitions(); //load the column definitions\n $this->inputBindTypes(); //load the bind types\n }", "title": "" }, { "docid": "7246385b62b69f2ad096784500cad18f", "score": "0.6069052", "text": "function _elgg_input_init() {\n\t// register an endpoint for live search / autocomplete.\n\telgg_register_page_handler('livesearch', 'input_livesearch_page_handler');\n\n\telgg_register_plugin_hook_handler('validate', 'input', '_elgg_htmlawed_filter_tags', 1);\n\n\telgg_register_plugin_hook_handler('unit_test', 'system', '_elgg_htmlawed_test');\n\n\telgg_register_plugin_hook_handler('view_vars', 'input/password', '_elgg_disable_password_autocomplete');\n}", "title": "" }, { "docid": "84809fb285d3c4f462bd22119bff914a", "score": "0.60601985", "text": "public function prepareFields() {\n $this->dbFields['companyid'] = \"\";\n $this->dbFields['username'] = \"\";\n $this->dbFields['password'] = \"\";\n $this->dbFields['account_status'] = \"\";\n $this->dbFields['emailaddress'] = \"\";\n $this->dbFields['firstname'] = \"\";\n $this->dbFields['surname'] = \"\";\n $this->dbFields['invoice_terms_days'] = \"\";\n $this->dbFields['quote_terms_days'] = \"\";\n $this->dbFields['account_enddate'] = \"\";\n $this->dbFields['createddate'] = \"\";\n $this->dbFields['company_name'] = \"\";\n $this->dbFields['company_abn'] = \"\";\n $this->dbFields['company_acn'] = \"\";\n $this->dbFields['company_suburb'] = \"\";\n $this->dbFields['company_postcode'] = \"\";\n $this->dbFields['company_state'] = \"\";\n $this->dbFields['company_acn'] = \"\";\n $this->dbFields['company_BSB'] = \"\";\n $this->dbFields['company_acctnumber'] = \"\";\n $this->dbFields['company_mobilephone'] = \"\";\n $this->dbFields['company_acctname'] = \"\";\n }", "title": "" }, { "docid": "9a1edd3ecb65c8083832f7584828dd45", "score": "0.6047474", "text": "public function init()\n\t{\n\t\t$this->dbFields = array(\n\t\t\t'defaultImage'=>'',\n\t\t\t'fbAppId'=>'',\n 'tagDescription'=>''\n\t\t);\n\t}", "title": "" }, { "docid": "ad201686a4a68b42aeb5b04cb54917eb", "score": "0.6038971", "text": "protected function init()\n {\n $defaultFields = $this->getDefaultFields();\n $filterFields = $this->getFilteredFields();\n $actualFields = array('id');\n\n if (!$filterFields || count($filterFields) <= 0) {\n $actualFields = $actualFields + $defaultFields;\n } else {\n foreach ($defaultFields as $field) {\n if (in_array($field, $filterFields)) {\n $actualFields[] = $field;\n }\n }\n }\n\n $propertyNameFilter = new PropertyName($actualFields, false);\n $this->addFilter('PropertyName', $propertyNameFilter);\n }", "title": "" }, { "docid": "5e22f8fa864645a604eb51545c905cb3", "score": "0.60278195", "text": "protected function initResultFields()\n {\n }", "title": "" }, { "docid": "2507a6ef106eab0a77e49c13fe515e6f", "score": "0.597241", "text": "abstract protected function buildFields();", "title": "" }, { "docid": "d6be0d90a6e2851bd2a69bd5e690520a", "score": "0.5970723", "text": "protected function usesCustomFields()\n {\n if (! isset($this->_field_facades)) {\n $this->initializeCustomFields();\n }\n }", "title": "" }, { "docid": "d5bb09a70c8169ea8c6cf29a472552d0", "score": "0.59625083", "text": "public function __construct()\n {\n if (3 == func_num_args()) {\n $this->name = func_get_arg(0);\n $this->options = func_get_arg(1);\n $this->fieldType = func_get_arg(2);\n }\n }", "title": "" }, { "docid": "28fc122c140f1b2aca1fedf01f062e99", "score": "0.59613746", "text": "function __construct()\n {\n $this->_initVars();\n }", "title": "" }, { "docid": "fd365c7462255e1af49b007eec0c519b", "score": "0.5961374", "text": "protected function initResultFields()\r\n {\r\n }", "title": "" }, { "docid": "fd365c7462255e1af49b007eec0c519b", "score": "0.5961374", "text": "protected function initResultFields()\r\n {\r\n }", "title": "" }, { "docid": "fd365c7462255e1af49b007eec0c519b", "score": "0.5961374", "text": "protected function initResultFields()\r\n {\r\n }", "title": "" }, { "docid": "797c8819a44184ba4859cc1e16730730", "score": "0.5952423", "text": "protected function init() {\n\t\t$this->fieldname = htmlspecialchars(stripslashes($_GET['field']));\n\t\t$this->value = htmlspecialchars(stripslashes($_GET['value']));\n\t\tif (isset($_GET['pid'])) {\n\t\t\t$this->id = intval($_GET['pid']);\n\t\t} else {\n\t\t\t$this->id = intval($_GET['id']);\n\t\t}\n\t\t$this->componentManager = GeneralUtility::makeInstance(\\Typoheads\\Formhandler\\Component\\Manager::class);\n\t\t$this->globals = GeneralUtility::makeInstance(\\Typoheads\\Formhandler\\Utility\\Globals::class);\n\t\t$this->utilityFuncs = GeneralUtility::makeInstance(\\Typoheads\\Formhandler\\Utility\\GeneralUtility::class);\n\t\t$this->globals->setAjaxMode(TRUE);\n\t\t$this->utilityFuncs->initializeTSFE($this->id);\n\t}", "title": "" }, { "docid": "8e520cc3c3278dc588941896e35543ad", "score": "0.5937275", "text": "protected function initTableFields()\r\n {\r\n }", "title": "" }, { "docid": "3d516232944ffbd3fe544e105b01fa13", "score": "0.59341294", "text": "public function setFields()\n {\n $this->fields = collect();\n\n foreach ($this->options as $key => $option) {\n if (!isset($option['type'])) continue;\n $this->fields->put($this->key().'.'.$key, $this->fieldManager->create($option['type'], $key, $this->getValue($key), $option));\n }\n }", "title": "" }, { "docid": "2cb34b4771ed58b8a1632338dfc384c0", "score": "0.5930445", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n $this->vars['delta'] = $this->model->powerblog_delta;\n }", "title": "" }, { "docid": "299956cf9bef4598a9afa6068430cf48", "score": "0.5926503", "text": "function init_form_fields() {\n\n\t\t\t\t$this->form_fields = include dirname(__FILE__).'/options.php';\n\n\t\t\t}", "title": "" }, { "docid": "5642c4d3782b4cba532bffd29c4f1971", "score": "0.59201854", "text": "public function prepareFields(): Result;", "title": "" }, { "docid": "a21534763c3853152c6db741e4334332", "score": "0.5917147", "text": "public function registerFields(){\n\t\t$this->registerFieldInt('id_hld_incident', 'Id Incidente');\n\t\t$this->registerFieldIntNullable('id_file', 'Id Archivo');\n\t\t$this->registerFieldString('tipo_doc', 'Tipo');\n\t\t$this->registerFieldStringNullable('valor_doc', 'Valor');\n\t\t$this->registerFieldString('titulo_doc', 'Título', true, true);\n\t\t$this->registerFieldStringNullable('desc_doc', 'Descripción', true, true);\n\t}", "title": "" }, { "docid": "a511147156a5a2000b6e1f72e5daae8b", "score": "0.590123", "text": "public function init_form_fields() {\n $this->form_fields = include 'bradesco-boleto-settings.php';\n }", "title": "" }, { "docid": "e3ea21e4d802a7e3132755fcab212660", "score": "0.58974206", "text": "public function init_form_fields() {\n\t $this->form_fields=array();\n\t}", "title": "" }, { "docid": "4cf72cccfcc33917188f541f51fe61e3", "score": "0.58969074", "text": "function _set_fields()\n\t{\n\t\t$this->form_data->user_id = '';\n\t\t$this->form_data->name = '';\n\t\t$this->form_data->address = '';\n\t\t$this->form_data->phone_number = '';\n\t}", "title": "" }, { "docid": "ac3507b50411caf407659c54fd75a03e", "score": "0.58821183", "text": "protected function afterGetFieldDefinition() : void\n {\n }", "title": "" }, { "docid": "70f7bbffeb162d01d81de350df75b659", "score": "0.586682", "text": "private function _loadFields() {\n\t\t$this->fields = $this->openDataFile($this->fieldsFile);\n\t}", "title": "" }, { "docid": "6716174cd140467c26e579b4efae56a2", "score": "0.58523947", "text": "function __construct( &$cms, $dbfields )\n\t\t{\n\t\tparent::__construct( $cms, $dbfields ) ;\n\t\t$this->module = $dbfields[\"module\"] ;\n\t\t$this->argument = $dbfields[\"argument\"] ;\n\t\t}", "title": "" }, { "docid": "71c998783d7a4a6dd34ab241f0a0dc1e", "score": "0.58427304", "text": "public function init()\n\t{\n\t\t$this->setDefinition(new InputDefinition());\n\t\t$this->setDescription($this->description());\n\t\t$this->setHelp($this->help());\n\t}", "title": "" }, { "docid": "0bd9913ceafb7869674500e39c678c3c", "score": "0.5838778", "text": "abstract public function fields();", "title": "" }, { "docid": "0bd9913ceafb7869674500e39c678c3c", "score": "0.5838778", "text": "abstract public function fields();", "title": "" }, { "docid": "bf64bdcd9fa0186b66a62b1dc9669653", "score": "0.5837897", "text": "function __construct()\n {\n parent::__construct();\n $this->_getVars();\n }", "title": "" }, { "docid": "875b8f24cc0554f4870d4b085d661c88", "score": "0.58372295", "text": "abstract public static function fields();", "title": "" }, { "docid": "ed131d0966d70e04ca7ce7da41a8db0f", "score": "0.58267397", "text": "protected function initialiseFields()\n {\n $this->addField('serial', 'Serial Number', true);\n // required field - model name\n $this->addField('model', 'Model Name', true, array('Model name of the Seed Unit', 'If not matched by an existing model, a new one will be created'));\n // required field - power cord type\n $this->addField('power', 'Power Cord Type', true, array('Power cord type of the Seed Unit', 'If not matched by an existing power cord type, a new one will be created'));\n // required field - warehouse\n $this->addField('warehouse', 'Warehouse', true, array('Warehouse where the Seed Unit is located', 'Must match an existing warehouse alias'));\n // optional date fields\n $this->addField('date', 'Date', false, array('Date when the Seed Unit arrived at the warehouse', 'Defaults to \"today\"'));\n $this->addField('time', 'Time', false, array('Time when the Seed Unit arrived at the warehouse', 'Defaults to \"now\"'));\n $this->addField('timezone', 'Timezone (UTC offset)', false, array('Timezone of the Date / Time Columns given as numeric offset to UTC', 'Defaults to +00:00 for UTC'));\n }", "title": "" }, { "docid": "0ea286501b71c64f1f0acce6ef4a5995", "score": "0.58241975", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->getFieldName();\n $this->vars['value'] = $value = $this->getLoadValue();\n $this->vars['availableColors'] = $this->availableColors;\n $this->vars['allowEmpty'] = $this->allowEmpty;\n $this->vars['showAlpha'] = $this->showAlpha;\n $this->vars['isCustomColor'] = !in_array($value, $this->availableColors);\n }", "title": "" }, { "docid": "3719f8e72083a12c8490707647d09664", "score": "0.58156395", "text": "function __construct() \n\t{\n\t\t$this->formParams = $this->createFormParams();\n\t}", "title": "" }, { "docid": "43254dbebbb37f945e4927ca22108853", "score": "0.5797496", "text": "public function init() {\n\t\tadd_action( 'graphql_register_types', array( $this, 'register_fields' ), 10, 0 );\n\t\tadd_filter( 'save_post', array( $this, 'clear_cache' ), 10, 1 );\n\n\t\t$this->update_settings();\n\t}", "title": "" }, { "docid": "b9e5c05583d728f44273635ebd856434", "score": "0.57879823", "text": "function __construct() {\n\n global $database;\n\n /* Setup the query to get the field names */\n $sql = \"SELECT * FROM \" . static::$table_name . \" LIMIT 1\";\n /* Run the query */\n $result_set = $database->query($sql);\n /* Get amount of fields */\n $fields_num = $database->num_fields($result_set);\n\n /* Setup the array field names */\n for($i=0; $i<$fields_num; $i++) {\n $result = $database->fetch_fields($result_set,$i);\n static::$db_fields[$i] = $result->name;\n }\n\n /* Setup variables */\n foreach(static::$db_fields as $field)\n $this->$field = $field;\n\n }", "title": "" }, { "docid": "62e8e94c504d667f7d3af6a71bf854ab", "score": "0.57868963", "text": "public function __construct()\n {\n if (4 == func_num_args()) {\n $this->tidligereNavnAdresse1Field = func_get_arg(0);\n $this->endringsDatoField = func_get_arg(1);\n $this->endringsTypeField = func_get_arg(2);\n $this->tidligerePostAdresseField = func_get_arg(3);\n }\n }", "title": "" }, { "docid": "2d7745fb5b43cd0e0b59e835acb60f27", "score": "0.5784492", "text": "public function __construct()\n {\n $this->defineColumns();\n $this->defineFields();\n }", "title": "" }, { "docid": "c894e0a9af06c303703d6352b70c8c26", "score": "0.5779604", "text": "protected function prepare()\n {\n $this->identifierIndex = array_search(\"_identifier_\", array_keys($this->fields));\n }", "title": "" }, { "docid": "f3815648639e9464a15b6c62ddb818a1", "score": "0.5779294", "text": "public function __construct() {\n\t\t\t/**\n\t\t\t * Sets up custom fields in ACF\n\t\t\t */\n\t\t\tadd_action( 'acf/init', array( $this, 'setup_acf' ), 9 );\n\t\t}", "title": "" }, { "docid": "ffbbe70e3786d944502dc8c59a2c97c1", "score": "0.57733554", "text": "public function init(){\n InputHelper::captureInput();\n }", "title": "" }, { "docid": "f3e30f0c8505341a52cb443c5562d0f0", "score": "0.5772518", "text": "protected function init()\n {\n $this->init_post = array(\n 'email_name' => 'string',\n 'email_email' => 'string',\n 'smtp_active' => 'boolean',\n 'smtp_host' => 'string',\n 'smtp_username' => 'string',\n 'smtp_password' => 'string',\n 'smtp_port' => 'int',\n 'email_admin_name' => 'string',\n 'email_admin_email' => 'string'\n );\n \n parent::init();\n }", "title": "" }, { "docid": "3497a6fc2f1091f8b1c13a1f31322db0", "score": "0.57647943", "text": "public function FormFieldsRequested()\n\t{\n\t\tnew GetFormFields;\n\t}", "title": "" }, { "docid": "25937668900b2fdfa5afaa6639ca3af1", "score": "0.5755265", "text": "public function init_form_fields() {\n\n\t\tparent::init_form_fields();\n\n\t\t$this->form_fields['id']['title'] = __( 'API Key', 'woocommerce-social-login' );\n\t\t$this->form_fields['secret']['title'] = __( 'API Secret', 'woocommerce-social-login' );\n\t}", "title": "" }, { "docid": "f4a7d00c7ce53abf059d32eb7bdff028", "score": "0.5745986", "text": "public function __construct()\n {\n if (7 == func_num_args()) {\n $this->authType = func_get_arg(0);\n $this->email = func_get_arg(1);\n $this->name = func_get_arg(2);\n $this->organizationRoleId = func_get_arg(3);\n $this->id = func_get_arg(4);\n $this->organizationRole = func_get_arg(5);\n $this->tagRoles = func_get_arg(6);\n }\n }", "title": "" }, { "docid": "9a65cab0dc13f59465de524bfbbff292", "score": "0.5737097", "text": "protected function initFields() {\n\t\t$taxonomies = $this->getTaxonomies();\n\t\tforeach ( $taxonomies as $taxonomy ) {\n\t\t\tadd_action( $taxonomy . '_add_form_fields', array( $this, 'hookAddFormInsertField' ), 10 );\n\t\t\tadd_action( $taxonomy . '_edit_form_fields', array( $this, 'hookEditFormInsertField' ), 10, 1 );\n\t\t}\n\t}", "title": "" }, { "docid": "db85b0330488eee3ddd06711df22a939", "score": "0.5732237", "text": "public function __construct($field)\n {\n\t$this->value= $field->getValue();\n }", "title": "" }, { "docid": "60e6bd6652e5c5e4f95d16179b96bf63", "score": "0.5732022", "text": "public function setup() {\n\t\t$this->db->loadSQLFile($this->moduleName, 'playfields');\n\t\t\n\t\t$this->commandAlias->register($this->moduleName, \"playfields\", \"playfield\");\n\t}", "title": "" }, { "docid": "58ff24d1b77e8335a11b8424573dd92f", "score": "0.5722771", "text": "abstract protected function search_engine_client_set_fields( $fields );", "title": "" }, { "docid": "a62a0a160f6af6df998f116be6d8150e", "score": "0.5722038", "text": "function __construct()\n {\n parent::__construct();\n $this->setTableName('t_meta_fields');\n $this->setPrimaryKey('pk_i_id');\n $this->setFields( array('pk_i_id', 's_name', 'e_type', 'b_required', 'b_searchable', 's_slug', 's_options') );\n }", "title": "" }, { "docid": "d75bf1e7ed6ceb1f09e79dfc45abb6d1", "score": "0.57204175", "text": "protected function initFieldNames()\n {\n $this->field_names = new FieldList(['places_id', 'place_name', 'long_place_name']);\n }", "title": "" }, { "docid": "d7a1ca74bc6ac29dbfd042c4ed5a8f56", "score": "0.5716407", "text": "protected function initializeCustomFields()\n {\n $this->_field_facades = [];\n $default_fields = $this->getDefaultFields();\n\n foreach ($default_fields as $id => $field) {\n $this->addFacade($id, $field);\n }\n\n $structure = $this->getStructure();\n\n // no structure yet? defer\n if (! $structure) {\n $this->_field_facades = null;\n\n return;\n }\n\n $native_fields = $this->getStructure()->getAllCustomFields();\n $native_prefix = $this->getCustomFieldPrefix();\n\n foreach ($native_fields as $field) {\n $settings = array_merge($field->getSettingsValues(), $field->toArray());\n\n $this->addFacade(\n $field->getId(),\n $settings,\n $native_prefix\n );\n }\n\n $this->setDataOnCustomFields($this->getValues());\n\n foreach ($this->_field_facades as $facade) {\n $facade->setContentType($this->getStructure()->getContentType());\n }\n\n $this->_custom_fields_loaded = true;\n }", "title": "" }, { "docid": "50a34c12bfa1aa8175827345d2b5d707", "score": "0.57155305", "text": "function __construct() {\n\t\t\n\t\t// settings\n\t\t// - these will be passed into the field class.\n\t\t$this->settings = array(\n\t\t\t'version'\t=> '1.0.0',\n\t\t\t'url'\t\t=> plugin_dir_url( __FILE__ ),\n\t\t\t'path'\t\t=> plugin_dir_path( __FILE__ )\n\t\t);\n\t\t\n\t\t\n\t\t// include field\n\t\tadd_action('acf/include_field_types', \tarray($this, 'include_field')); // v5\n\t\tadd_action('acf/register_fields', \t\tarray($this, 'include_field')); // v4\n\t}", "title": "" }, { "docid": "59ae12b32c8a3f517937660c1720558d", "score": "0.57154745", "text": "function user_setup()\n {\n // make use of the parent class user_setup()\n // function to set up the display of the fields\n\n parent::user_setup() ;\n }", "title": "" }, { "docid": "97c694aac7c8b16487b38ec54336c51c", "score": "0.5705276", "text": "abstract protected function addAdditionalFields();", "title": "" }, { "docid": "78323cda99be9c0dc50d7de1ba82443f", "score": "0.5704887", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n $this->vars['margin'] = $this->margin;\n $this->vars['step'] = $this->step;\n $this->vars['min'] = $this->min;\n $this->vars['max'] = $this->max;\n }", "title": "" }, { "docid": "53664a74d7301266d58c2bf77abd1155", "score": "0.5704301", "text": "private function setFields($fields)\n\t{\n\t\tif($this->placeholders['fields']==\"\" or trim($this->placeholders['fields']) == \"*\")\n\t\t{\n\t\t\t$this->placeholders['fields'] = $fields;\n\t\t}\n\t}", "title": "" }, { "docid": "68a330a6139a9212b63ca939ca3592ad", "score": "0.5703528", "text": "public function __construct()\n {\n $this->initBindings();\n $this->initIndent();\n $this->initStacks();\n\n $this->fieldStack = array();\n }", "title": "" }, { "docid": "a7fcacb937d938294ec66360f6dab5ee", "score": "0.56990504", "text": "public function initParamOptionsFields()\n {\n $options_fields = $this->set_options_fields();\n if (! empty($options_fields)) :\n $this->OptionsFields = (array)$options_fields;\n else :\n $this->OptionsFields = $this->getConfig('options_fields');\n endif;\n }", "title": "" }, { "docid": "ba05bbd08d95922ed824500471f4f787", "score": "0.5680577", "text": "public function fetch_fields(){}", "title": "" }, { "docid": "ab8aef5513c680b2d9cf73dee3fa6156", "score": "0.56759274", "text": "abstract protected function _getFormFields();", "title": "" }, { "docid": "ab7e97e6fb254d6620ec2e50e39b13e9", "score": "0.56756705", "text": "protected function init(): void\n {\n $this->assertIsModel();\n\n $this->_init();\n\n if ($this->idField) {\n $this->addField($this->idField, ['type' => 'integer', 'required' => true, 'system' => true]);\n\n $this->initEntityIdHooks();\n\n if (!$this->readOnly) {\n $this->initUserActions();\n }\n }\n }", "title": "" }, { "docid": "9b020b3852f038fb376336cd15b73895", "score": "0.5675561", "text": "public function set_fields($fields);", "title": "" }, { "docid": "ca3d652128684ffd6199955fe335c400", "score": "0.56685257", "text": "function makeFields() {\n\t\twhile (list($field, $value) = each($this->_required)) {\n\t\t\t$this->_options[$field] = $value;\n\t\t}\n\t\twhile (list($field, $value) = each($this->_optional)) {\n\t\t\t$this->_options[$field] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "c4008cd99fe4667ba724007bef8727ec", "score": "0.5668126", "text": "function __construct() {\n\t\tadd_action( 'init', array( __CLASS__, 'load_translation' ), 1 );\n\t\t// Register ACF fields\n\t\tadd_action( 'acf/include_field_types', array( __CLASS__, 'register_field_v5' ) );\n\t}", "title": "" }, { "docid": "af59b77cc8add7ca09b630856f53163c", "score": "0.56648225", "text": "public function init_form_fields()\n {\n parent::init_form_fields();\n\n $this->form_fields['security_sender']['default'] = '31HA07BC8142C5A171745D00AD63D182';\n $this->form_fields['user_login']['default'] = '31ha07bc8142c5a171744e5aef11ffd3';\n $this->form_fields['user_password']['default'] = '93167DE7';\n $this->form_fields['transaction_channel']['default'] = '31HA07BC8142C5A171744B56E61281E5';\n }", "title": "" }, { "docid": "924184863d0360423a6467e1e209d045", "score": "0.5662267", "text": "function setFields($fields) {\n $this->fields = $fields;\n }", "title": "" }, { "docid": "2ae4f6c0e11e80c5737b88ea1a09c698", "score": "0.5660529", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n\n if ($value = $this->getLoadValue()) {\n $this->vars['value'] = trim(implode(PHP_EOL, $value));\n } else {\n $this->vars['value'] = '';\n }\n }", "title": "" } ]
c9512fb3db623441c9e5634d6a845062
PROLABORE MONTAGEM DA LISTAGEM DOS PAGAMENTOS
[ { "docid": "58c8a36d7dc52c8ab448d6f666028a89", "score": "0.54344046", "text": "function MontagemDaListagemDosPagamentos($dataInicio, $dataFim, $idNome){\n\t\n\t\t$sql = \"SELECT \n\t\t\t\t\tpgto.id_pagto\n\t\t\t\t\t, pgto.valor_bruto\n\t\t\t\t\t, pgto.INSS\n\t\t\t\t\t, pgto.IR\n\t\t\t\t\t, pgto.ISS\n\t\t\t\t\t, pgto.valor_liquido\n\t\t\t\t\t, pgto.data_emissao\n\t\t\t\t\t, pgto.data_pagto \n\t\t\t\t\t, pgto.idLivroCaixa\n\t\t\t\t\t, pgto.desconto_dependentes\n\t\t\t\t\t, pj.id id\n\t\t\t\t\t, pj.nome nome\n\t\t\t\t\t, pj.cnpj cpf\n\t\t\t\t\t, pj.op_simples op_simples\n\t\t\t\tFROM \n\t\t\t\t\tdados_pagamentos pgto\n\t\t\t\t\tinner join dados_pj pj on pgto.id_pj = pj.id\n\t\t\t\tWHERE \n\t\t\t\t\tpgto.id_login='\" . $_SESSION[\"id_empresaSecao\"] . \"'\n\t\t\t\t\";\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t$resDatas = \"\";\n\t\tif($dataInicio != ''){\n\t\t\t$resDatas .= \" AND pgto.data_pagto >= '\" . $dataInicio . \"'\"; \n\t\t}\n\t\tif($dataFim != ''){\n\t\t\t$resDatas .= \" AND pgto.data_pagto <= '\" . $dataFim . \"'\"; \n\t\t}\n\t\n\t\tif ($_REQUEST[\"nome\"] != \"\"){\n\t\t\t$resColuna = \" HAVING 1=1 AND id = \". $idNome . \"\";\n\t\t}\n\t\t\t\t\n\t\t$resOrdem = \"\n\t\t\t\tORDER BY data_pagto DESC\n\t\t\t\t\n\t\t\t\t\";\n\t\t//LIMIT 0,12\n\t//\techo $sql . $resDatas . $resColuna . $resOrdem;\n\t\t\n\t\n\t\t$resultado = mysql_query($sql . $resDatas . $resColuna . $resOrdem)\n\t\tor die (mysql_error());\n\t\n\t\treturn $resultado;\n\t\n\t}", "title": "" } ]
[ { "docid": "69be3b8576aa9ce6406c14df861927f6", "score": "0.6091872", "text": "public function prosesan() \n\t{\n\n\t\t$this->papar->medan = $this->tanya->paparMedan('data_mm_prosesan');\n\t\t//echo '<pre>$this->papar->medan:<br>'; print_r($this->papar->medan); \n\n\t\t# Set pemboleubah utama\n\t\t$this->papar->url = dpt_url();\n\n\t\t# pergi papar kandungan\n\t\t$this->papar->baca('cari/index', 0);\n\t}", "title": "" }, { "docid": "c9538e87d0af48eccd6ef3f852dd8d78", "score": "0.5954961", "text": "function listarDetallePresParDif(){\n\t\t$this->procedimiento='pre.ft_partida_ejecucion_sel';\n\t\t$this->transaccion='PRE_DIFPAREJ_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n \n $this->capturaCount('total_monto','numeric');\n $this->capturaCount('total_mb','numeric'); \n $this->capturaCount('total_camo','numeric');\n $this->capturaCount('total_dif','numeric');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_partida_ejecucion','int4');\t\t\t\t \n $this->captura('nro_tramite','varchar');\n $this->captura('tipo_movimiento','varchar');\n $this->captura('monto','numeric');\n $this->captura('monto_mb','numeric'); \n $this->captura('tipo_cambio','numeric');\t\t\t\t\n $this->captura('tipo_cambio2','numeric');\n $this->captura('cambio_moneda','numeric');\n $this->captura('diferencia','numeric'); \n\t\t$this->captura('fecha_reg','timestamp');\n $this->captura('usr_reg','varchar');\t\t\n $this->captura('moneda','varchar');\t\t\n $this->captura('desc_pres','varchar');\n $this->captura('codigo_cc','text');\n $this->captura('codigo_categoria','varchar');\t\t\n $this->captura('codigo','varchar');\n $this->captura('nombre_partida','varchar');\n //Ejecuta la instruccion\n $this->armarConsulta();\n //echo($this->consulta);exit;\n $this->ejecutarConsulta();\n \n //Devuelve la respuesta\n return $this->respuesta; \n }", "title": "" }, { "docid": "f3e8ab8acc97158b787d9d48975aed51", "score": "0.59277934", "text": "private function getPuntosPersonasGuardia($inicio,$fecha) {\n\n $ndiasclave= Clave::count();\n $ndias = $fecha->diffInDays($inicio);\n $e=0;\n\n // localizo la posición del equipo que le toca guardia \n foreach ($this->arrayEquipos as $equipo) {\n \tif ($equipo == $this->equipoGuardia)\n \t\tbreak;\n \telse\n \t\t$e++;\n } \n \n // resto la posicón del equipo que le toca, los dias que tuvieron que pasar desde el genesis hasta que le tocara a este equipo por primera vez\n \n $ndias = $ndias - $e;\n\t\t\t\n $arrayAsignaciones = array();\n \n $z=0; // contador de puntos para ajustar persona;\n $r=0; // contador de puntos despachados ...\n $q=count($this->aPersonalGuardia); // numero de personas del equipo\n \t\t$x=0;\n\t\t\t\n for ( $i=1; $i <= $ndias; $i = $i+$ndiasclave ){\n \t\t\n \t\tif ( $x >= ($q-1) ) $x = 0;\n \t\telse $x++;\n \t\t\n } \n\n \n foreach ($this->aPuntosGuardia as $punto) {\n \t$obj = new \\stdClass();\n \t$obj->idpunto=$punto->idpunto;\n \t$obj->idpersona=null;\n \t$obj->idturno=$punto->idturno;\n \t\n \t$y=0;\n\t\t\t\t\n \tforeach ($this->aPersonalGuardia as $persona) {\n\n\t\t\t\t\tif ( $r >= $q ) \n\t\t\t\t\t\tbreak; // Si estan todos asignados salgo ...\n\n \t\tif ( $y == ($z + $x) ){ \n\n \t\t\t$obj->idpersona=$persona->idpersona;\n\n \t\t\tif ( $y >= ($q-1) ) { $x=0; $z=-1; } // si la asignada es la ultima reinicio contadores para seguir por el principio\n \t\t\tbreak;\n \t\t}\n \t\t$y++;\n \t\t\t\t\t\t\t \t\t\n \t}\n\t\t\t\t$arrayAsignaciones[]=$obj;\n\t\t\t\t$z++;\n\t\t\t\t$r++;\n \t\n \t\n \t \n }\n return \t$arrayAsignaciones;\t\t\n }", "title": "" }, { "docid": "a50d129387d813bb3c9e0d642a562663", "score": "0.58630794", "text": "public function parcela(){\n $desconto = $this->precoTotal / 10;\n return $desconto;\n }", "title": "" }, { "docid": "52e6227645f6f8a817cd109dc0ead3c6", "score": "0.5837188", "text": "function getAllParishes($codMun)\n\t{\n\t\t$urlPharm = 'http://services.sapo.pt/Pharmacy/GetPharmaciesAtServiceByMunicipalityId?municipalityId='.$codMun;\n\t\t$xmlPharm = new SimpleXMLElement($urlPharm, NULL, TRUE);\n\t\t\tforeach ($xmlPharm->GetPharmaciesAtServiceByMunicipalityIdResult->Pharmacies->Pharmacy as $pharm){\n\t\t\t\t\techo $pharm->Address->Parish,'<br>';\n\t\t\t}\n\t}", "title": "" }, { "docid": "aa60769e35052314a7a3ec10d17acd65", "score": "0.58059204", "text": "function listarMeses(){\n\t\t$this->procedimiento='ssig.ft_linea_avance_sel';\n\t\t$this->transaccion='SSIG_LMESES_SEL';\n\t\t\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t//$datos = $this->objParam->getParametro('id_plan');\n\t\t//var_dump(\"testear planes \",$this->objParam->getParametro('cod_plan'));exit;\t\n $this->setParametro('id_plan','id_plann','int4');\n\n\t\t$this->captura('id_linea_avance','int4');\n\t\t$this->captura('mes','varchar');\n\t\t$this->captura('aprobado_real','bool');\n\t\t$this->captura('cod_linea_avance','int4');\n\n\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": "ac52cc8d7ea7520d5a5015697f96885c", "score": "0.57909006", "text": "private function cargarApartamentoOmision() {\n $this->codigo = 0;\n $this->portal = 0;\n $this->piso = '';\n $this->letra = '';\n $this->tipo = '';\n $this->metros = 0;\n $this->terraza = 0;\n $this->coeficientefase = 0;\n $this->coeficientebloq = 0;\n $this->finca = 0;\n $this->registro = 0;\n $this->refcatastral = '';\n $this->metroscatastro = 0;\n $this->garajes = array();\n }", "title": "" }, { "docid": "2dee81e47212bee0bc6be54eec551c4b", "score": "0.57863003", "text": "function PESOS($numero){\r\r\n\t$numero=number_format($numero, 2,\".\",\"\");\r\r\n\tlist($entero,$decimal)=explode(\".\",$numero);\r\r\n\t$LETRAS=\"-- \".convertir($entero).\" PESOS \".$decimal.\"/100 MN\".\" --\";\r\r\n\treturn $LETRAS;}", "title": "" }, { "docid": "67119569af111a43ef65f9795e80466a", "score": "0.5780726", "text": "public function jeSpustenProduktCosi() ;", "title": "" }, { "docid": "1b74a0fdae7e61d33d3fd97ec04293a9", "score": "0.5728721", "text": "function PromedioFinal($alum_rut,$cur_id,$conect,$tipreg){\n\t\t\t$SQL = \"SELECT alumno.ape_pat, alumno.nombre_alu, subsector.nombre, Sum(to_number(trim(notas$nro_ano.promedio),'9999999999')) AS sumpromedio, curso.grado_curso, curso.letra_curso FROM alumno INNER JOIN ((((curso INNER JOIN ramo ON curso.id_curso = ramo.id_curso) INNER JOIN notas$nro_ano ON ramo.id_ramo = notas$nro_ano.id_ramo)INNER JOIN tiene$nro_ano ON notas$nro_ano.rut_alumno=tiene$nro_ano.rut_alumno AND notas$nro_ano.id_ramo=tiene$nro_ano.id_ramo) INNER JOIN subsector ON ramo.cod_subsector = subsector.cod_subsector) ON alumno.rut_alumno = notas$nro_ano.rut_alumno WHERE ((curso.id_curso=\" . $cur_id . \") AND (tiene$nro_ano.rut_alumno='\" . $alum_rut . \"') AND (ramo.modo_eval=1) AND (ramo.conex=2) AND notas$nro_ano.promedio not like ' %') GROUP BY alumno.ape_pat, alumno.nombre_alu, subsector.nombre, curso.grado_curso, curso.letra_curso, curso.id_curso, alumno.rut_alumno, ramo.modo_eval\";\n\t\t\t$rs_promedio = @pg_exec($conect,$SQL);\n\t\t\tif (!$rs_promedio){\n\t\t\t\terror('<B> ERROR :</b>Error al acceder a la BD. (13)</B>'.$SQL);\n\t\t\t\texit();\n\t\t\t}else{\n\t\t\t\tif (@pg_numrows($rs_promedio)!=0){\n\t\t\t\t\t$filprom = @pg_fetch_array($rs_promedio,0);\t\n\t\t\t\t\tif (!$filprom){\n\t\t\t\t\t\terror('<B> ERROR :</b>Error al acceder a la BD. (14)</B>');\n\t\t\t\t\t\texit();\n\t\t\t\t\t};\n\t\t\t\t\t$SumRamo = 0; /*--- HACE LA SUMATORIA DE LOS PROMEDIOS DE LAS NOTAS ---*/\n\t\t\t\t\t$Rojo = 0; /*--- CUENTA LA CANTIDAD DE RAMOS MENORES A CUATRO ---*/\n\t\t\t\t\t$count = 0; /*--- CUNTA LA CANTIDAD DE RAMOS ---*/\n\t\t\t\t\n\t\t\t\t\tif (Trim($tipreg)==\"2\"){ /*--- Trimestre ---*/\n\t\t\t\t\t\t$tipreg = 3;\n\t\t\t\t\t}else{ /*--- Semestre ---*/\n\t\t\t\t\t\t$tipreg = 2;\n\t\t\t\t\t};\n\n\t\t\t\t\tfor($i=0;$i<@pg_numrows($rs_promedio);$i++){\n\t\t\t\t\t\t$filprom = @pg_fetch_array($rs_promedio,$i);\n\t\t\t\t\t\tif (Trim($filprom['sumpromedio'])!=\"\"){\n\t\t\t\t\t\t\t//$Ramo[$i] = round(intval(Trim($filprom['sumpromedio'])) / $tipreg);\n\t\t\t\t\t\t\t$Ramo[$i] = intval(Trim($filprom['sumpromedio']));\n\t\t\t\t\t\t\tif ($Ramo[$i] < 40){ /*--- Ramos Rojos ---*/\n\t\t\t\t\t\t\t\t$Rojo = $Rojo + 1;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t$SumRamos = $SumRamos + $Ramo[$i]; /*--- Acumula los ramos---*/\n\t\t\t\t\t\t\t$count = $count + 1;\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\tif ($count!=0){\n\t\t\t\t\t $count = $count *2;\n\t\t\t\t\t\tif($institucion==9566){\n\t\t\t\t\t\t\t$PromedioFinal = intval($SumRamos / $count);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$PromedioFinal = round($SumRamos / $count);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$promFin=$PromedioFinal; /*--- Promedio final de ramos numericos ---*/\n\t\t\t\t\t};\n\t\t\t\t}else {\n\t\t\t\t $promFin=0;\n\t\t\t\t }\n\t\t\t\t$SQL1=\"Select sum(nota_final)as suma, count(ramo.id_ramo)as cantidad from situacion_final inner join ramo on situacion_final.id_ramo=ramo.id_ramo where ((ramo.id_curso=\" . $cur_id . \") AND (situacion_final.rut_alumno='\" . $alum_rut . \"') AND (ramo.modo_eval=1) AND (ramo.conex=1) AND situacion_final.prom_gral not like ' %')\";\n\t\t\t\t\t$prom = @pg_exec($conect,$SQL1);\n\t\t\t\t\t$filpromedio = @pg_fetch_array($prom,0);\n\t\t\t\t\t$SumRamo = $count + $filpromedio['cantidad'];\n\t\t\t\t\t$PromeFinal = $SumRamos + $filpromedio['suma'];\n\t\t\t\t\tif(($promFin!=0)and ($filpromedio['cantidad']!=0)) {\n\t\t\t\t\t$ProFinal=(($PromeFinal)/$SumRamo);\n\t\t\t\t\t}\n\t\t\t\t\tif(($promFin==0)and ($filpromedio['cantidad']!=0)) {\n\t\t\t\t\t$ProFinal=$PromeFinal;\n\t\t\t\t\t}\n\t\t\t\t\tif(($promFin!=0)and ($filpromedio['cantidad']==0)) {\n\t\t\t\t\t$ProFinal=$promFin;\n\t\t\t\t\t} \n\t\t\t\t\tif(($promFin==0)and ($filpromedio['cantidad']==0)) {\n\t\t\t\t\t$ProFinal=0;\n\t\t\t\t\t}\n\t\t\t\t\tif($institucion==9566){\n\t\t\t\t\t\treturn intval($ProFinal);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\treturn round($ProFinal);\n\t\t\t\t\t}\n\n\t\t\t};\n\n\t\t}", "title": "" }, { "docid": "cf7d6d693f81ad9313fc1ec36ac382af", "score": "0.5699816", "text": "function montarpiepagina() {\n \trequire_once ''.DIRECTORIOVIEWS.'/piepagina.php';\n \treturn $contenido;\n }", "title": "" }, { "docid": "2160779e036038eb5d14895913e72aa9", "score": "0.5668342", "text": "function preguntasAleatorias()\n {\n /*se utiliza un arreglo para guardar los modulos y se crea una bariable con el objero en este caso\n (mExamen) y se realiza la consulta */\n $modulos = [];\n $listM = $this->mExamen = $this->objPDO->modulos();\n foreach ($listM as $a) :\n array_push($modulos, $a->getModulo());\n endforeach;\n //al obrener los modulos se crean las preguntas aleatorias\n $preguntasAX = [];\n $preguntas = $this->mExamen = $this->objPDO->PreguntaAleatoria($modulos);\n foreach ($preguntas as $px) :\n array_push($preguntasAX, $px->getidPregunta());\n endforeach;\n var_dump($preguntasAX);\n }", "title": "" }, { "docid": "d067cf6d1cafbed16e1e58e6f57c1ce5", "score": "0.56668425", "text": "function\tpromediosGenerales($cod_prueba,\t$icfesRelacionado=null) {\r\n $db\t=\t&DB::instance();\r\n $sqlIcfesRelacionado\t=\t\"\";\r\n\r\n if\t(!is_blank($icfesRelacionado))\r\n $sqlIcfesRelacionado\t=\t\" AND EXISTS(\r\n SELECT * FROM a_estudiantes_icfes b\r\n WHERE b.tipo = $icfesRelacionado AND\r\n a.cod_interno = b.cod_interno) \";\r\n\r\n $consulta\t=\tsprintf(\"SELECT\r\n\t\t\t\t\t\t\tAVG(lenguaje) as LENGUAJE,\r\n\t\t\t\t\t\t\tAVG(matematica) as MATEMATICA,\r\n\t\t\t\t\t\t\tAVG(filosofia) as FILOSOFIA,\r\n\t\t\t\t\t\t\tAVG(biologia) as BIOLOGIA,\r\n\t\t\t\t\t\t\tAVG(quimica) as QUIMICA,\r\n\t\t\t\t\t\t\tAVG(fisica) as FISICA,\r\n\t\t\t\t\t\t\tAVG(idioma) as IDIOMA,\r\n\t\t\t\t\t\t\tAVG(interdisciplinar) as INTERDISCIPLINAR,\r\n\t\t\t\t\t\t\tCOUNT(*) as cantidad\r\n\t\t\t\t\t\t\tFROM a_estudiantes_icfes a\r\n\t\t\t\t\t\t\tWHERE tipo = '%s' %s\",\t$cod_prueba,\t$sqlIcfesRelacionado);\r\n\r\n $promedios\t=\t$db->fetch_array($consulta,\tfalse);\r\n if\t(empty($promedios))\r\n return\tnull;\r\n\r\n $consulta\t=\tsprintf(\"SELECT AVG(geografia) as GEOGRAFIA, AVG(historia) as HISTORIA, COUNT(*) AS COUNT_GEOG\r\n FROM a_estudiantes_icfes a where tipo = '%s' AND geografia IS NOT NULL and geografia <>0 %s \",\t$cod_prueba,\t$sqlIcfesRelacionado);\r\n $promedios\t=\t(array_merge($promedios,\t$db->fetch_array($consulta,\tfalse)));\r\n $consulta\t=\tsprintf(\"SELECT AVG(sociales) as SOCIALES, COUNT(*) as COUNT_SOCIALES\r\n FROM a_estudiantes_icfes a where tipo = '%s' AND sociales IS NOT NULL and sociales <>0 %s\",\t$cod_prueba,\t$sqlIcfesRelacionado);\r\n $promedios\t=\t(array_merge($promedios,\t$db->fetch_array($consulta,\tfalse)));\r\n return\t$promedios;\r\n }", "title": "" }, { "docid": "48938bf653345b46560fd9588c05f994", "score": "0.5657548", "text": "public function pruebaomar()\n {\n$copiafinal=array();\n $copiafinal[0]=\"ajuhdos\";\n $copiafinal[1]=\"fhhf\";\n $nom=array();\n $nom1='';\n $nom2='';\n $nom3='';\n $nom4='';\n $nom5='';\n for ($i=0; $i <count($copiafinal) ; $i++) {\n $a=$i+1;\n $nom[$a]= $copiafinal[$i];\n\n }\n\n\n }", "title": "" }, { "docid": "57f58566d89057c8828eeae0f67bf29f", "score": "0.56490886", "text": "public function buscaEquipamentosProjeto()\r\n {\r\n try {\r\n \r\n $sql = \"SELECT eproid, \r\n eprnome \r\n FROM equipamento_projeto \r\n ORDER BY eprnome\";\r\n \r\n $rs = pg_query($this->conn, $sql);\r\n \r\n $cont = 0;\r\n \r\n while ($rEquipamentos = pg_fetch_assoc($rs)) {\r\n \r\n $resultado[$cont]['eproid'] = $rEquipamentos['eproid'];\r\n $resultado[$cont]['eprnome'] = $rEquipamentos['eprnome'];\r\n \r\n $cont++;\r\n }\r\n\r\n return $resultado;\r\n \r\n } catch(Exception $e) {\r\n return \"erro\";\r\n }\r\n }", "title": "" }, { "docid": "6b8830dc44783c1821c5fa78ff9534b4", "score": "0.5627861", "text": "function imprimir_cupom_pagamento(){\n\n //BUSCANDO LOGOS\n // $logomarcas = $this->configuracoes_model->get_logomarcas();\n\n //PEGANDO DADOS DA CONTA DA FILIAL\n\n // $logo = $this->LoadWBMP(base_url().'>assets/img/logomarcas/'.$logomarcas[2]->imagem);\n\n $dados_filial = $this->geral_model->getDadosFilial();\n\n $parcela = $this->geral_model->getDadosCupom($_GET['idparcela']);\n\n\n\n // $cupom = '';\n\n // $cupom .= 'asdfasdfasdf';\n\n // $cupom .= PHP_EOL . '';\n // $cupom .= PHP_EOL . '';\n // $cupom .= PHP_EOL . '';\n // $cupom .= PHP_EOL . '';\n // $cupom .= 'asdfasdfasdf';\n // $cupom .= chr(27).chr(109);\n\n // $cupom['dados'] .= PHP_EOL . 'HORA ENTRADA: ' . $_GET['time'];\n // $cupom['dados'] .= PHP_EOL . 'HORA SAIDA: ' . $_GET['saida'];\n // $cupom['dados'] .= PHP_EOL . 'PERMANENCIA: ' . makeTimeFromSec((int) strtotime($_GET['saida']) - (int) strtotime($_GET['time']), 'hms');\n // $cupom['dados'] .= PHP_EOL . 'VALOR: R$ ' . number_format($_GET['valor_pagar'], 2, ',', '.');\n // $cupom['dados'] .= PHP_EOL . 'DESCONTO: R$ ' . number_format($_GET['desconto'], 2, ',', '.');\n // $cupom['dados'] .= PHP_EOL . 'VALOR PAGO: R$ ' . number_format($_GET['valor_pago'], 2, ',', '.');\n // $cupom['dados'] .= PHP_EOL . '';\n // $cupom['dados'] .= PHP_EOL . 'FUNCIONARIO: ' . $_GET['funcionario'];\n\n\n\n\n // $cupom['dados'] .= PHP_EOL . ''.chr(27).chr(119);\n //$cupom['dados'] .= PHP_EOL . '';\n // $cupom['dados'] .= PHP_EOL . ' O GRUPO AVELAR AGRADECE A';\n // $cupom['dados'] .= PHP_EOL . ' PREFERENCIA!';\n // $cupom['dados'] .= PHP_EOL . ' TEC-CAR E UM PRODUTO DA';\n //$cupom['dados'] .= PHP_EOL . ' TECTOTUM TECNOLOGIA.';\n\n // echo $cupom['dados'];\n // exit;\n\n // $CI =& get_instance();\n\n // $this->load->helper('file');\n // $path = APPLICATION_FOLDER . '\\\\temporary.txt';\n\n\n $url = 'http://localhost/sistema_plano/impressora/index.php/cupons/imprimir?';\n $url .= 'filial='.$dados_filial->nome_fantasia;\n $url .= '&data='.date('d/m/Y');\n $url .= '&hora='.date('H:i:s');\n $url .= '&cod_titular='.$parcela[0]->idcliente_titular;\n $url .= '&cod_parcela='.$parcela[0]->idparcela;\n $url .= '&valor='.number_format($parcela[0]->valor, 2, ',', '.');\n $url .= '&valor_pago='.number_format($parcela[0]->valor_pgto, 2, ',', '.');\n $url .= '&data_vencimento='.inverteData($parcela[0]->data_vencimento,'/');\n $url .= '&data_pagamento='.inverteData($parcela[0]->data_baixa_alteracao,'/');\n $url .= '&funcionario='.$parcela[0]->funcionario;\n $url .= '&cnpj='.$dados_filial->cnpj;\n $url .= '&telefone='.$dados_filial->telefone;\n $url .= '&logradouro='.$dados_filial->logradouro;\n $url .= '&numero='.$dados_filial->numero;\n $url .= '&bairro='.$dados_filial->bairro;\n $url .= '&cidade='.$dados_filial->cidade;\n $url .= '&estado='.$dados_filial->estado;\n\n echo redirect($url);\n // echo TRUE;\n\n\n\n //$url = 'http://www.google.com';\n\n //$url = 'http://www.google.com';\n\n\n\n // $this->output->set_output('<script src=\"'.$url.'\"></script>');\n\n // echo '<script src=\"'.$url.'\"></script>';\n\n\n\n\n // $this->output->set_output('<script src=\"'. $url.'\"></script>');\n\n\n\n // echo '<script>window.open(\"'.$url.'\")</script>';\n\n // $curl = curl_init();\n\n // curl_setopt($curl, CURLOPT_URL, $url);\n // curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n // curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n // curl_setopt($curl, CURLOPT_POST, true);\n // curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($cupom));\n\n // $response = urldecode(curl_exec($curl));\n\n // $error = curl_error($curl);\n // $errno = curl_errno($curl);\n\n // curl_close($curl);\n\n // echo $response;\n\n // write_file($path, $cupom);\n // // shell_exec('NET USE COM4 \\\\\\\\diogo-pc\\\\mp4200-th');\n // echo $this->msdos_print($path, 'COM5', TRUE, TRUE);\n}", "title": "" }, { "docid": "4814ce91eff6411419f44628fa62c3d3", "score": "0.5609455", "text": "public function listaPagosAprobacionAction() {\n $em = $this->getDoctrine()->getManager();\n \n $idPersona = $this->container->get('security.context')->getToken()->getUser()->getRhPersona()->getId();\n\n $dql_persona = \"SELECT p.id AS id, p.nombres AS nombre, p.apellido AS apellido, p.correoelectronico AS correo, p.descripcion AS descripcion,\"\n . \" p.direccion AS direccion, p.telefonoFijo AS Tfijo, p.telefonoMovil AS movil, p.estado As estado, p.tituloProfesional AS tprofesional, p.verificado As verificado \"\n . \" FROM DGAbgSistemaBundle:AbgPersona p WHERE p.id=\" . $idPersona;\n $result_persona = $em->createQuery($dql_persona)->getArrayResult();\n $nombreCorto = split(\" \", $result_persona[0]['nombre'])[0] . \" \" . split(\" \", $result_persona[0]['apellido'])[0];\n\n $dqlfoto = \"SELECT fot.src as src \"\n . \" FROM DGAbgSistemaBundle:AbgFoto fot WHERE fot.abgPersona=\" . $idPersona . \" and fot.estado=1 and (fot.tipoFoto=0 or fot.tipoFoto=1)\";\n $result_foto = $em->createQuery($dqlfoto)->getArrayResult();\n \n //$preguntas = $em->getRepository('DGAbgSistemaBundle:AbgPregunta')->findBy(array('estado' => 2));\n \n return $this->render('administracion/panelPagos.html.twig', array(\n /*'preguntas' => $preguntas,*/ \n 'nombreCorto' => $nombreCorto, \n 'abgFoto' => $result_foto, \n 'usuario' => $idPersona,\n 'abgPersona' => $result_persona\n ));\n }", "title": "" }, { "docid": "377c18b1865abfff259796317d8845a6", "score": "0.5608806", "text": "public function listar() \r\n {\r\n\t $materiaprimaDAO = new MateriaPrimaDAO;\r\n\t return $materiaprimaDAO->listar();\r\n }", "title": "" }, { "docid": "7663c365c1fe2afd9832f7c599904baa", "score": "0.55798906", "text": "public function obtenerComportamientos();", "title": "" }, { "docid": "413f0c849363fa224e7af1d7588c014e", "score": "0.55765367", "text": "public function calculo() {\n\t\t\n\t\t$parcelamento['total'] = self::calculo_valor_parcela();\n\t\t$parcelamento['juros'] = $this->juros;\n\t\t\n\t\t$this->preco_numero = self::limpar_preco($this->moeda_da_loja, $this->preco);\n\t\t\n\t\t$max_parcelas = intval( self::calculo_valor_parcela() / $this->parcela_minima );\n\t\tif( $max_parcelas < $this->qtd_parcelas ) {\n\t\t\t$this->qtd_parcelas = $max_parcelas;\n\t\t}\n\t\t\n\t\t$parcelamento['parcelas'] = array_map(function($parcela){\n\t\t\t$juros = false;\n\t\t\tif( $parcela == 1 && $this->parcelas_sem_juros >= 1 ){\n\t\t\t\t$valor = $this->preco_numero;\n\t\t\t} else if ( $parcela > $this->parcelas_sem_juros ){\n\t\t\t\t$valor = self::calculo_valor_parcela($parcela);//parcela($parcela);\n\t\t\t\t$juros = true;\n\t\t\t} else {\n\t\t\t\t$valor = $this->preco_numero / $parcela; // $this->qtd_parcelas ;\n\t\t\t}\n\t\t\treturn array(\n\t\t\t\t'parcela' => $parcela,\n\t\t\t\t'valor' => $valor,\n\t\t\t\t'juros' => $juros\n\t\t\t);\n\t\t},range(1, $this->qtd_parcelas ));\n\t\treturn $parcelamento;\n\t}", "title": "" }, { "docid": "e391d78242f527f724686f3f614b1343", "score": "0.55721885", "text": "function enleverParagraphe() {\r\n\t\tmysql_query(\"DELETE FROM if_page_para WHERE numpage='$this->numpage' AND numpara='$this->numpara'\");\r\n\t\tmysql_query(\"UPDATE if_page SET iduti_m='$this->id_m', hmodif='\".time().\"' WHERE numpage='$this->numpage'\");\r\n\t}", "title": "" }, { "docid": "fa1b491a8e9db1dfdf75f7ff54eac475", "score": "0.5553692", "text": "function monta_lista($sql,$cabecalho=\"\",$perpage,$pages,$soma,$alinha,$valormonetario=\"S\",$nomeformulario=\"\",$celWidth=\"\",$celAlign=\"\") {\r\n\t//$sql = Texto - sql que vai gerar a lista\r\n\t//$cabecaho = Vetor - contendo o nome que vai ser exibido, deve ter a mesma quantidade dos campos da sql\r\n\t//Parmetros de paginao\r\n\t//$perpage = Numrico - Registros por pgina\r\n\t//$pages = Numrico - Numrico - Mx de Paginas que sero mostradas na barrinha de paginao\r\n\t// $soma = Boleano - Mostra somatrio de campos numricos no fim da lista\r\n\t// $ordem = alinhamento dos títulos (left, rigth, center)\r\n\t// $valormonetario = Define se o valor a ser tratado é monetário (com casas decimais) ou numérico (sem casas decimais)\r\n\t//$nomeformulario = Caso seja necessário um formulário para acessar objetos dentro da tabela, informar o nome do formulário, que o componente irá criar um <form name=\"nomedoformularioinformado\">...</form>\r\n\t//Registro Atual (instanciado na chamada)\r\n\t//$sql = str_replace(\";\", \"\", $sql);\r\n\r\n\t/**************************************************************************************************\r\n\t -> NOVOS PARAMETROS (programador: Felipe Carvalho / data: 24/07/2009)\t\r\n\t $celWidth => array com o width(tamanho) de cada célula. Pode-se usar qualquer unidade (px, %, pt, etc)\t\t\r\n\t $celAlign => array com o alinhamento de cada célula.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t NOS DOIS PARAMETROS O TAMANHO DO ARRAY DEVE SER O MESMO DO\t\r\n\t NUMERO DE ELEMENTOS QUE IRAO COMPOR A LISTA.\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t PARAMETROS NAO OBRIGATORIOS!\r\n\t SE NAO FOREM INFORMADOS USA-SE O PADRAO DO COMPONENTE.\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t EXEMPLO:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t \t$cabecalho \t\t= array( \"Comando\", \"Ação\");\t\t\t\t\r\n\t\t$tamanho\t\t= array( '10%', '90%' );\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t$alinhamento\t= array( 'center', 'left' );\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t$db->monta_lista( $sql, $cabecalho, 25, 10, 'N', 'center', '', '', $tamanho, $alinhamento);\r\n\t**************************************************************************************************/\r\n\t\r\n\tif ($_REQUEST['numero']=='') $numero = 1; else $numero = intval($_REQUEST['numero']);\t\r\n\t//Controla o Order by\r\n\tif (!is_array($sql) && $_REQUEST['ordemlista']<>'')\r\n\t{\r\n\t\tif ($_REQUEST['ordemlistadir'] <> 'DESC') {$ordemlistadir = 'ASC';$ordemlistadir2 = 'DESC';} else {$ordemlistadir = 'DESC'; $ordemlistadir2 = 'ASC';}\r\n\t\t$subsql = substr($sql,0,strpos(trim(strtoupper($sql)),'ORDER '));\r\n\t\t$sql = (!$subsql ? $sql : $subsql).' order by '.$_REQUEST['ordemlista'].' '.$ordemlistadir;\r\n\t}\r\n\r\n if (is_array($sql)){\r\n $RS = $sql;\r\n\t}else{\r\n\t\t$sql = trim($sql);\r\n\t\t$char = substr($sql, -1); \r\n\t\tif ($char == \";\") $sql = substr($sql, 0, -1);\r\n\t\t\r\n\t\t$sqlCount = \"select \r\n\t\t\t\t\t\tcount(1)\r\n\t\t\t\t\t from (\" . $sql . \") rs\";\r\n\t\t\r\n\t\t$totalRegistro = $this->pegaUm($sqlCount);\r\n\t\t\r\n\t\t$sql = $sql . \" LIMIT {$perpage} offset \".($numero-1);\t\r\n\t\t\t\r\n\t\t$RS = $this->carregar($sql);\r\n }\r\n\t$nlinhas = count($RS);\r\n\t\r\n\tif (! $RS) $nl = 0; else $nl=$nlinhas;\r\n//\tif (($numero+$perpage)>$nlinhas) $reg_fim = $nlinhas; else $reg_fim = $numero+$perpage-1;\r\n\t$reg_fim = $nlinhas;\r\n\tif ($nl>0)\r\n\t{\r\n\t\t$total_reg = $totalRegistro;\r\n\t\t\r\n\t\t//monta o formulario da lista mantendo os parametros atuais da pgina\r\n\t\tprint '<form name=\"formlista\" method=\"post\"><input type=\"Hidden\" name=\"numero\" value=\"\" /><input type=\"Hidden\" name=\"ordemlista\" value=\"'.$_REQUEST['ordemlista'].'\"/><input type=\"Hidden\" name=\"ordemlistadir\" value=\"'.$ordemlistadir.'\"/>';\r\n\t\tforeach($_POST as $k=>$v){if ($k<>'ordemlista' and $k<>'ordemlistadir' and $k<>'numero') print '<input type=\"Hidden\" name=\"'.$k.'\" value=\"'.$v.'\"/>';}\r\n\t\tprint '</form>';\r\n\t\t\r\n\t\tif($nomeformulario != \"\")\r\n\t\t\tprint '<form name=\"'.$nomeformulario.'\" id=\"'.$nomeformulario.'\" enctype=\"multipart/form-data\" action=\"\" method=\"post\">';\r\n\t\t\t\r\n\t\tprint '<table width=\"95%\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" class=\"listagem\">';\r\n\t\t//Monta Cabealho\r\n\t\tif ( $cabecalho === null ) {\r\n\r\n\t\t}else if(is_array($cabecalho))\r\n\t\t{\r\n\t\t\tprint '<thead><tr>';\r\n\t\t\tfor ($i=0;$i<count($cabecalho);$i++)\r\n\t\t\t{\r\n\t\t\t\tif ($_REQUEST['ordemlista'] == ($i+1)) {\r\n\t\t\t\t\t$ordemlistadirnova = $ordemlistadir2;\r\n\t\t\t\t\t$imgordem = '<img src=\"../imagens/seta_ordem'.$ordemlistadir.'.gif\" width=\"11\" height=\"13\" align=\"middle\"> ';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$ordemlistadirnova = 'ASC';\r\n\t\t\t\t\t$imgordem = '';\r\n\t\t\t\t}\r\n\t\t\t\tprint '<td align=\"' . $alinha . '\" valign=\"top\" class=\"title\" style=\"border-right: 1px solid #c0c0c0; border-bottom: 1px solid #c0c0c0; border-left: 1px solid #ffffff;\" onmouseover=\"this.bgColor=\\'#c0c0c0\\';\" onmouseout=\"this.bgColor=\\'\\';\" onclick=\"ordena(\\''.($i+1).'\\',\\''.$ordemlistadirnova.'\\');\" title=\"Ordenar por '.$cabecalho[$i].'\">'.$imgordem.'<strong>'.$cabecalho[$i].'</strong></label>';\r\n\t\t\t}\r\n\t\t\tprint '</tr> </thead>';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tprint '<thead><tr>'; $i=0;\r\n\t\t\tforeach($RS[0] as $k=>$v)\r\n\t\t\t{\r\n\t\t\t\tif ($_REQUEST['ordemlista'] == ($i+1)) {\r\n\t\t\t\t\t$ordemlistadirnova = $ordemlistadir2;\r\n\t\t\t\t\t$imgordem = '<img src=\"../imagens/seta_ordem'.$ordemlistadir.'.gif\" width=\"11\" height=\"13\" align=\"middle\"> ';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$ordemlistadirnova = 'ASC';\r\n\t\t\t\t\t$imgordem = '';}\r\n\t\t\t\t\tprint '<td valign=\"top\" class=\"title\" onmouseover=\"this.bgColor=\\'#c0c0c0\\';\" onmouseout=\"this.bgColor=\\'\\';\" onclick=\"ordena(\\''.($i+1).'\\',\\''.$ordemlistadirnova.'\\');\" title=\"Ordenar por '.$k.'\">'.$imgordem.'<strong>'.$k.'</strong></label>';\r\n\t\t\t\t\t$i=$i+1;}\r\n\t\t\t\t\tprint '</tr> </thead>';\r\n\t\t}\r\n\t\t//Monta Listagem\r\n\t\t$totais = array();\r\n\t\t$tipovl = array();\r\n//\t\tfor ($i=($numero-1);$i<$reg_fim;$i++)\r\n\r\n\t\tfor ($i=0; $i < $reg_fim; $i++)\r\n\t\t{\r\n\t\t\t$c = 0;\r\n\t\t\tif (fmod($i,2) == 0) $marcado = '' ; else $marcado='#F7F7F7';\r\n\t\t\tprint '<tr bgcolor=\"'.$marcado.'\" onmouseover=\"this.bgColor=\\'#ffffcc\\';\" onmouseout=\"this.bgColor=\\''.$marcado.'\\';\">';\r\n\t\t\t\r\n\t\t\t// contador -> numero de celulas\r\n\t\t\t$numCel = 0;\r\n\t\t\tforeach($RS[$i] as $k=>$v) {\r\n\t\t\t\t// Setando o alinhamento da célula usando o array $celAlign.\r\n\t\t\t\t// Se não for passado o parâmetro, usa o padrão do componente.\r\n\t\t\t\tif(is_array($celAlign)) {\r\n\t\t\t\t\t$alignNumeric = $alignNotNumeric = $celAlign[$numCel];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$alignNumeric \t\t= 'right';\r\n\t\t\t\t\t$alignNotNumeric\t= 'left';\r\n\t\t\t\t}\r\n\t\t\t\t// Setando o tamanho da célula usando o array $celWidth.\r\n\t\t\t\t// Se não for passado o parâmetro, usa o padrão do componente.\r\n\t\t\t\t$width = (is_array($celWidth)) ? 'width=\"'.$celWidth[$numCel].'\"' : '';\r\n\t\t\t\t\r\n\t\t\t\tif (is_numeric($v))\r\n\t\t\t\t{\r\n\t\t\t\t\t//cria o array totalizador\r\n\t\t\t\t\tif (!$totais['0'.$c]) {$coluna = array('0'.$c => $v); $totais = array_merge($totais, $coluna);} else $totais['0'.$c] = $totais['0'.$c] + $v;\r\n\t\t\t\t\t//Mostra o resultado\r\n\t\t\t\t\tif (strpos($v,'.')) {$v = number_format($v, 2, ',', '.'); if (!$tipovl['0'.$c]) {$coluna = array('0'.$c => 'vl'); $tipovl = array_merge($totais, $coluna);} else $tipovl['0'.$c] = 'vl';}\r\n\t\t\t\t\tif ($v<0) print '<td align=\"'.$alignNumeric.'\" '.$width.' style=\"color:#cc0000;\" title=\"'.$cabecalho[$c].'\">('.$v.')'; else print '<td align=\"'.$alignNumeric.'\" '.$width.' style=\"color:#0066cc;\" title=\"'.$cabecalho[$c].'\">'.$v;\r\n\t\t\t\t\tprint ('<br>'.$totais[$c]);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tprint '<td align=\"'.$alignNotNumeric.'\" '.$width.' title=\"'.$cabecalho[$c].'\">'.$v;\r\n\t\t\t\t}\r\n\t\t\t\tprint '</td>';\r\n\t\t\t\t$c = $c + 1;\r\n\t\t\t\t$numCel++;\r\n\t\t\t}\r\n\t\t\tprint '</tr>';\r\n\t\t}\r\n\r\n\t\tif ($soma=='S'){\r\n\t\t\t//totaliza (imprime totais dos campos numericos)\r\n\t\t\tprint '<thead><tr>';\r\n\t\t\tfor ($i=0;$i<$c;$i++)\r\n\t\t\t{\r\n\t\t\t\tprint '<td align=\"right\" title=\"'.$cabecalho[$i].'\">';\r\n\r\n\t\t\t\tif ($i==0) print 'Totais: ';\r\n\t\t\t\tif (is_numeric($totais['0'.$i])) {\r\n\t\t\t\t\t\r\n\t\t\t\tif($valormonetario == 'S'){\r\n\t\t\t\t\t\t\tprint number_format($totais['0'.$i], 2, ',', '.'); \r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tprint $totais['0'.$i]; \r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\telse print $totais['0'.$i];\r\n\t\t\t\tprint '</td>';\r\n\t\t\t}\r\n\t\t\tprint '</tr>';\r\n\t\t\t//fim totais\r\n\t\t}\r\n\r\n\t\tprint '</table>';\r\n\r\n\t\tif($nomeformulario != \"\")\r\n\t\t\tprint '</form>';\r\n\t\t\r\n\t\tprint '<table width=\"95%\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" class=\"listagem\"><tr bgcolor=\"#ffffff\"><td><b>Total de Registros: ' . $totalRegistro . '</b></td><td>';\r\n\r\n\t\tinclude APPRAIZ.\"includes/paginacao.inc\";\r\n\t\tprint '</td></tr></table>';\r\n\t\tprint '<script language=\"JavaScript\">function ordena(ordem, direcao) {document.formlista.ordemlista.value=ordem;document.formlista.ordemlistadir.value=direcao;document.formlista.submit();} function pagina(numero) {document.formlista.numero.value=numero;document.formlista.submit();}</script>';\r\n\t}\r\n\telse\r\n\t{\r\n\t\tprint '<table width=\"95%\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" class=\"listagem\">';\r\n\t\tprint '<tr><td align=\"center\" style=\"color:#cc0000;\">Não foram encontrados Registros.</td></tr>';\r\n\t\tprint '</table>';\r\n\t}\r\n}", "title": "" }, { "docid": "7c16207a6373bad96411b5e1bb106cec", "score": "0.55106604", "text": "function totalDetallePresupuesto(){\n\t\t$this->procedimiento='pre.ft_partida_ejecucion_sel';\n\t\t$this->transaccion='PRE_TODETPRE_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n \n $this->setParametro('id_presupuesto', 'id_presupuesto', 'int4');\n $this->setParametro('id_partida', 'id_partida', 'int4');\n $this->setParametro('id_gestion', 'id_gestion', 'int4');\n //Definicion de la lista del resultado del query\n $this->captura('comprometido','numeric');\n $this->captura('ejecutado','numeric');\n $this->captura('pagado','numeric');\t\t\n\n\t\t//Ejecuta la instruccion\n $this->armarConsulta();\n //echo($this->consulta);exit;\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n }", "title": "" }, { "docid": "f81cce092c6fe37bba1e4c24586cbd6f", "score": "0.5499802", "text": "public function pagamentoAction()\n {\n $this->verificarPermissaoAcesso(false, true, false);\n $this->dadosProjeto();\n\n $diligencia = new Diligencia();\n $auth = Zend_Auth::getInstance();\n\n $diligencia = $diligencia->aberta($this->getRequest()->getParam('idpronac'));\n if ($diligencia->idTipoDiligencia == 645) {\n $this->_helper->getHelper('Redirector')\n ->setGotoSimple(\n 'responder',\n 'gerenciar',\n 'diligencia',\n ['idpronac' => $this->getRequest()->getParam('idpronac')]\n );\n return;\n }\n\n // se nao estiver no periodo de comprovaco, limitar a comprovantes recusados\n if ($this->view->vrSituacao) {\n $this->_helper->getHelper('Redirector')\n ->setGotoSimple(\n 'comprovantes-recusados',\n null,\n null,\n array('idpronac' => $this->getRequest()->getParam('idpronac')\n )\n );\n }\n\n $this->view->idpronac = $this->getRequest()->getParam('idpronac');\n\n $planilhaAprovacaoModel = new PlanilhaAprovacao();\n $planilhaItemModel = new PlanilhaItem();\n\n $resposta = $planilhaAprovacaoModel->buscarItensPagamento($this->view->idpronac); //Alysson - Altera��o da Query para n�o mostrar os itens excluidos\n\n $arrayA = array();\n $arrayP = array();\n\n if (is_object($resposta)) {\n foreach ($resposta as $val) {\n $modalidade = '';\n if ($val->idCotacao != '') {\n $modalidade = 'Cota&ccedil;&atilde;o';\n $idmod = 'cot'.$val->idCotacao.'_'.$val->idFornecedorCotacao;\n }\n if ($val->idDispensaLicitacao != '') {\n $modalidade = 'Dispensa';\n $idmod = 'dis'.$val->idDispensaLicitacao;\n }\n if ($val->idLicitacao != '') {\n $modalidade = 'Licita&ccedil;&atilde;o';\n $idmod = 'lic'.$val->idLicitacao;\n }\n if ($val->idContrato != '') {\n if ($modalidade != '') {\n $modalidade .= ' /';\n }\n $modalidade .= ' Contrato';\n $idmod = 'con'.$val->idContrato;\n }\n if ($modalidade == '') {\n $modalidade = '-';\n $idmod = 'sem';\n }\n\n $itemComprovacao = $planilhaItemModel->pesquisar($val->idPlanilhaAprovacao);\n\n if ($val->tpCusto == 'A') {\n $arrayA[$val->descEtapa][$val->uf.' '.$val->cidade][$val->idPlanilhaAprovacao] = array(\n $val->descItem, $val->Total, $val->tpDocumento, $itemComprovacao->vlComprovado, $modalidade, $idmod\n );\n }\n if ($val->tpCusto == 'P') {\n $arrayP[$val->Descricao][$val->descEtapa][$val->uf.' '.$val->cidade][$val->idPlanilhaAprovacao] = array(\n $val->descItem, $val->Total, $val->tpDocumento, $itemComprovacao->vlComprovado, $modalidade, $idmod\n );\n }\n }\n }\n\n $this->view->incFiscaisA = array('Administra&ccedil;&atilde;o do Projeto' =>$arrayA);\n $this->view->incFiscaisP = array('Custo por Produto' =>$arrayP);\n }", "title": "" }, { "docid": "51d484738d858d02f5ff7109fdfd6a46", "score": "0.54916763", "text": "function mostraPagina()\n\t\t{\n\t\t\n\t\t$this->aggiungiElemento($this->dammiMenu());\n\t\t$this->aggiungiElemento(\"Elenco interventi\" . \n\t\t\t\t\t$this->dammiTitoloGenitore($_GET['id_utente'] ? 'id_utente' : 'id_argomento'), \n\t\t\t\t\t\"titolo\");\n\t\t$this->aggiungiElemento($this->dammiTabella());\n\t\t$this->mostra();\n\t\t}", "title": "" }, { "docid": "b3939606f145936b3676ae9ac467e0ad", "score": "0.5462856", "text": "function magieblanche($perso)\n {\n $perso->recevoirDegats($this->magie);\n }", "title": "" }, { "docid": "0ffc845157f7ae6d387867d1c07f9311", "score": "0.54599655", "text": "function GrabarNotasFinales()\r\n {\r\n\r\n// $query_crear = sprintf(\"select f_createmp();\");\r\n\r\n $query_crear = $this->gsql->GrabarNotasFinales_select1();\r\n\r\n /* $query_crear = sprintf(\"create temp table webtablafinal\r\n (carnet char(9),carrera char(2),\r\n laboratorio numeric(3,0),zona numeric(3,0),examen numeric(3,0));\");*/\r\n\r\n $_SESSION[\"sNotas\"]->query($query_crear);\r\n\r\n//echo \"--->\",$query_crear; die;\r\n\r\n//$query_crear = sprintf(\"grant all on webtablafinal to usringnotas;\");\r\n\r\n $query_crear = $this->gsql->GrabarNotasFinales_grant1();\r\n\r\n $_SESSION[\"sNotas\"]->query($query_crear);\r\n\r\n // $notasfinales = pg_copy_to($_SESSION[\"sNotas\"]->Link_ID, \"webtablafinal\",\"|\");\r\n\r\n//echo \"los asignados suman: \".$this->mAsignados; die;\r\n\r\n for ($i = 0; $i < $this->mAsignados; $i++) {\r\n $notasfinales[$i] = implode(\"|\", $_SESSION[\"sVectorAprobacion\"][$i]);\r\n // echo $notasfinales[$i].\"<br>\";\r\n // echo $_SESSION[\"sVectorAprobacion\"][$i][0].\"<br>\";\r\n // echo $_SESSION[\"sVectorAprobacion\"][$i][1].\"<br>\";\r\n // echo $_SESSION[\"sVectorAprobacion\"][$i][2].\"<br>\";\r\n // echo $_SESSION[\"sVectorAprobacion\"][$i][3].\"<br>\";\r\n // echo $_SESSION[\"sVectorAprobacion\"][$i][4].\"<br>\";\r\n }\r\n\r\n//\t $array[0] = array ('008411139','05',70,45,10) ;\r\n// \t $array[1] = array ('008830661','05',70,45,10,11) ;\r\n\r\n $array[0] = array($_SESSION[\"sVectorAprobacion\"][0][0], $_SESSION[\"sVectorAprobacion\"][0][1], '40', $_SESSION[\"sVectorAprobacion\"][0][3], $_SESSION[\"sVectorAprobacion\"][0][4]);\r\n $array[1] = array($_SESSION[\"sVectorAprobacion\"][1][0], $_SESSION[\"sVectorAprobacion\"][1][1], $_SESSION[\"sVectorAprobacion\"][1][2], $_SESSION[\"sVectorAprobacion\"][1][3], $_SESSION[\"sVectorAprobacion\"][1][4]);\r\n\r\n $a[0] = implode(\"|\", $array[0]);\r\n $a[1] = implode(\"|\", $array[1]);\r\n\r\n// pg_copy_from($_SESSION[\"sNotas\"]->Link_ID,\"webtablafinal\",$notasfinales[0], \"|\");\r\n pg_copy_from($_SESSION[\"sNotas\"]->Link_ID, \"webtablafinal\", $a, \"|\");\r\n\r\n// $query_llenarasig = sprintf(\"select f_llenarasignaciondetalle\r\n// ('%s','%s','%s','%s','%s');\",\r\n// $_SESSION[\"sUsuarioDeSesion\"]->mUsuario,\r\n// $this->mCurso,\r\n// $this->mSeccion,\r\n// $this->mPeriodo,\r\n// $this->mAnio\r\n// );\r\n\r\n $query_llenarasig = $this->gsql->GrabarNotasFinales_select2($_SESSION[\"sUsuarioDeSesion\"]->mUsuario,\r\n $this->mCurso,\r\n $this->mSeccion,\r\n $this->mPeriodo,\r\n $this->mAnio\r\n );\r\n\r\n//echo \"query ->\".$query_llenarasig; die;\r\n\r\n $_SESSION[\"sNotas\"]->query($query_llenarasig);\r\n\r\n// $query_borrar = sprintf(\"drop table webtablafinal;\");\r\n\r\n $query_borrar = $this->gsql->GrabarNotasFinales_drop1();\r\n\r\n\r\n $_SESSION[\"sNotas\"]->query($query_borrar);\r\n\r\n//echo \"query ->\".$query_llenarasig; die;\r\n }", "title": "" }, { "docid": "8d18ab5890a2584b7d6c2e0a5ed75e5a", "score": "0.54390067", "text": "function getListaProfesoresPub()\n {\n $gesPersonaPub = new personas\\GestorPersonaPub();\n $cPersonasPub = $gesPersonaPub->getPersonas(array('profesor_stgr' => 't'));\n\n $aProfesores = array();\n $aAp1 = array();\n $aAp2 = array();\n $aNom = array();\n foreach ($cPersonasPub as $oPersona) {\n $id_nom = $oPersona->getId_nom();\n // comprobar situación\n $situacion = $oPersona->getSituacion();\n if ($situacion != 'A') {\n continue;\n }\n $ap_nom = $oPersona->getPrefApellidosNombre();\n $aProfesores[] = array('id_nom' => $id_nom, 'ap_nom' => $ap_nom);\n $aAp1[] = $oPersona->getApellido1();\n $aAp2[] = $oPersona->getApellido2();\n $aNom[] = $oPersona->getNom();\n }\n $multisort_args = array();\n $multisort_args[] = $aAp1;\n $multisort_args[] = SORT_ASC;\n $multisort_args[] = SORT_STRING;\n $multisort_args[] = $aAp2;\n $multisort_args[] = SORT_ASC;\n $multisort_args[] = SORT_STRING;\n $multisort_args[] = $aNom;\n $multisort_args[] = SORT_ASC;\n $multisort_args[] = SORT_STRING;\n $multisort_args[] = &$aProfesores; // finally add the source array, by reference\n call_user_func_array(\"array_multisort\", $multisort_args);\n $aOpciones = array();\n foreach ($aProfesores as $aClave) {\n $clave = $aClave['id_nom'];\n $val = $aClave['ap_nom'];\n $aOpciones[$clave] = $val;\n }\n return $aOpciones;\n }", "title": "" }, { "docid": "52bb0e63b0c939691f192e091aea7e19", "score": "0.54320574", "text": "function pagar_material(){\n\n // echo '<pre>';\n // print_r($_POST);\n // exit;\n\n $this->load->model('lojamodel');\n $query = $this->lojamodel->verifica_caixa();\n if ($query) {\n if ($_POST['status'] == 'false') {\n $status = 0;\n } else if ($_POST['status'] == 'true') {\n $status = 1;\n }\n $data = array(\n 'idemprestimo_parcela' => $_POST['idemprestimo_parcela'],\n 'status' => $status,\n 'data_pgto' => inverteData($_POST['data_pgto'], '/'),\n 'pgCobrador' => $_POST['pgCobrador'],\n 'pgUser' => $this->syssession->getSess('userId'),\n 'pgHorario' => date(\"Y-m-d H:i:s\"),\n 'pgCaixa' => $query[0]->idcaixa\n );\n\n if($update_parcela = $this->geral_model->update_parcelas_materiais($data)){\n //REMOVENDO DA REMARCACAO\n // $this->geral_model->limpa_remarcacao_parcelas($_POST['idparcela']);\n\n }\n\n } else {\n echo '<span id=\"childrenOfDialog\">&nbsp;&nbsp;&nbsp;&nbsp;</span>';\n echo '<script>alert(\"O caixa está fechado, é necessario abrir para acessar este módulo!\");';\n echo '$(\"#childrenOfDialog\").parents(\".ui-dialog-content:first\").dialog(\"close\");';\n echo '</script>';\n }\n\n\n }", "title": "" }, { "docid": "3f9c1e016005fd5f70b49931bce11b92", "score": "0.5422642", "text": "function ListarAprobados($mUsuario)\r\n {\r\n\r\n $query_datos = $this->gsql->ListarAprobados_select1($mUsuario,\r\n $this->mCurso,\r\n $this->mCarrera/*$this->mSeccion*/,\r\n $this->mPeriodo,\r\n $this->mAnio,\r\n $this->mIndex\r\n );\r\n\r\n\r\n//echo \"query datos --\",$query_datos,\"--\"; die;\r\n\r\n $_SESSION[\"sNotas\"]->query($query_datos);\r\n\r\n $vector_acta = pg_copy_to($_SESSION[\"sNotas\"]->Link_ID, \"weblistadoaprobado\", \"|\");\r\n\r\n// $query_datos = sprintf(\"drop table weblistadoaprobado;\");\r\n\r\n $query_datos = $this->gsql->ListarAprobados_drop1();\r\n\r\n\r\n $_SESSION[\"sNotas\"]->query($query_datos);\r\n\r\n /* print_r($_SESSION[\"sNotas\"]);\r\n echo \" hasta aqui sesion <br>\";\r\n print_r(get_declared_classes());\r\n echo \" hasta aqui clases <br>\"; */\r\n\r\n for ($i = 1; $i <= $this->mAsignados; $i++) {\r\n $_SESSION[\"Aprobado\"][$i - 1] = explode(\"|\", $vector_acta[$i - 1]);\r\n }\r\n\r\n /* echo $_SESSION[\"Acta\"][1][1].\"<br>\"; carnet\r\n echo $_SESSION[\"Acta\"][1][8].\"<br>\"; lab\r\n echo $_SESSION[\"Acta\"][2][7].\"<br>\"; zona\r\n echo $_SESSION[\"Acta\"][2][9].\"<br>\"; die; examen */\r\n\r\n }", "title": "" }, { "docid": "f7a33ada37d8a9f14873155187313786", "score": "0.54127455", "text": "function listarDetallePartidaEjecucion(){\n\t\t$this->procedimiento='pre.ft_partida_ejecucion_sel';\n\t\t$this->transaccion='PRE_DETPAREJE_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n //$this->setCount(false);\n \n $this->setParametro('desde', 'desde', 'date');\n $this->setParametro('hasta', 'hasta', 'date');\n //Definicion de la lista del resultado del query\n $this->captura('moneda','varchar');\n $this->captura('desc_pres','varchar');\n $this->captura('codigo_cc','text'); \n $this->captura('codigo_categoria','varchar');\n $this->captura('nro_tramite','varchar');\n $this->captura('nombre_partida','varchar');\n $this->captura('codigo','varchar');\n $this->captura('id_presupuesto','int4');\n $this->captura('id_partida','int4');\n $this->captura('id_moneda','int4');\n $this->captura('comprometido','numeric');\n\t\t$this->captura('comprometido_mb','numeric');\n $this->captura('ejecutado','numeric');\n\t\t$this->captura('ejecutado_mb','numeric');\n $this->captura('pagado','numeric'); \n\t\t$this->captura('pagado_mb','numeric'); \n $this->captura('saldo','numeric');\n\t\t$this->captura('saldo_mb','numeric');\n $this->captura('desde', 'date');\n $this->captura('hasta', 'date');\n //$this->captura('id_proceso_wf', 'integer');\n\t\t\n\n\t\t//Ejecuta la instruccion\n $this->armarConsulta();\n //echo($this->consulta);exit;\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n }", "title": "" }, { "docid": "ba75932c330ade43d4672098593c3eed", "score": "0.540684", "text": "public abstract function perimetro();", "title": "" }, { "docid": "a20bd097259a1522e05bbb4ccc5d96d1", "score": "0.5406322", "text": "public function partidas_aope($aper_id){\n $programa=$this->model_ptto_sigep->apertura_id($aper_id);\n $ope_fort=$this->model_ptto_sigep->acciones_operativas($programa[0]['aper_programa'],4);\n $ope_fun=$this->model_ptto_sigep->acciones_operativas($programa[0]['aper_programa'],3);\n $proy_inv=$this->model_ptto_sigep->acciones_operativas($programa[0]['aper_programa'],1);\n\n $tabla ='';\n $tabla .='<style>\n table{\n font-size: 9px;\n width: 100%;\n max-width:1550px;\n overflow-x: scroll;\n }\n th{\n padding: 1.4px;\n text-align: center;\n font-size: 10px;\n }\n </style>';\n\n $tabla .='<font size=3><center>'.$programa[0]['aper_programa'].''.$programa[0]['aper_proyecto'].''.$programa[0]['aper_actividad'].' - '.$programa[0]['aper_descripcion'].'</center></font>';\n if(count($ope_fort)!=0){\n $nro_ofort=0;\n $tabla .='OPERACI&Oacute;N DE FORTALECIMIENTO<hr>';\n foreach($ope_fort as $row){\n $nro_pi++;\n $tabla .='<div>'.$nro_ofort.'.- '.$row['aper_programa'].' '.$row['aper_proyecto'].' '.$row['aper_actividad'].' - '.$row['proy_nombre'].'</div>';\n $partidas=$this->model_ptto_sigep->partidas_accion($row['aper_id'],2);\n if(count($partidas)!=0){\n $tabla .=' <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\">\n <thead>\n <tr class=\"modo1\" align=center>\n <th bgcolor=\"#1c7368\" style=\"width:1%;\"><font color=#fff>NRO.</font></th>\n <th bgcolor=\"#1c7368\" style=\"width:10%;\"><font color=#fff>PARTIDA</font></th>\n <th bgcolor=\"#1c7368\" style=\"width:30%;\" colspan=\"5\"><font color=#fff>DETALLE PARTIDA</font></th>\n <th bgcolor=\"#1c7368\" style=\"width:15%;\"><font color=#fff>PROGRAMADO</font></th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n $monto=0;\n foreach($partidas as $row){\n $nro++;\n $tabla .='<tr class=\"modo1\">\n <td align=center style=\"height:20%;\">'.$nro.'</td>\n <td align=center style=\"height:20%;\">'.$row['codigo'].'</td>\n <td align=left style=\"height:20%;\" colspan=\"5\">'.mb_convert_encoding($row['nombre'], 'cp1252', 'UTF-8').'</td>\n <td align=right style=\"height:20%;\">'.$row['monto'].'</td>\n </tr>';\n $monto=$monto+$row['monto'];\n }\n $tabla .='</tbody>\n <tr class=\"modo1\">\n <td colspan=7 style=\"height:20%;\"><strong>TOTAL</strong></td>\n <td align=right style=\"height:20%;\">'.$monto.'</td>\n </tr>\n </table>';\n }\n $tabla .='<br>';\n }\n }\n\n if(count($ope_fun)!=0){\n $nro_ofun=0;\n $tabla .='OPERACI&Oacute;N DE FUNCIONAMIENTO<hr>';\n foreach($ope_fun as $row){\n $nro_pi++;\n $tabla .='<div>'.$nro_ofun.'.- '.$row['aper_programa'].' '.$row['aper_proyecto'].' '.$row['aper_actividad'].' - '.mb_convert_encoding($row['proy_nombre'], 'cp1252', 'UTF-8').'</div>';\n $partidas=$this->model_ptto_sigep->partidas_accion($row['aper_id'],2);\n if(count($partidas)!=0){\n $tabla .=' <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\">\n <thead>\n <tr class=\"modo1\" align=center>\n <th bgcolor=\"#1c7368\" style=\"width:1%;\"><font color=#fff>NRO.</font></th>\n <th bgcolor=\"#1c7368\" style=\"width:10%;\"><font color=#fff>PARTIDA</font></th>\n <th bgcolor=\"#1c7368\" style=\"width:30%;\" colspan=\"5\"><font color=#fff>DETALLE PARTIDA</font></th>\n <th bgcolor=\"#1c7368\" style=\"width:15%;\"><font color=#fff>PROGRAMADO</font></th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n $monto=0;\n foreach($partidas as $row){\n $nro++;\n $tabla .='<tr class=\"modo1\">\n <td align=center style=\"height:20%;\">'.$nro.'</td>\n <td align=center style=\"height:20%;\">'.$row['codigo'].'</td>\n <td align=left style=\"height:20%;\" colspan=\"5\">'.mb_convert_encoding($row['nombre'], 'cp1252', 'UTF-8').'</td>\n <td align=right style=\"height:20%;\">'.$row['monto'].'</td>\n </tr>';\n $monto=$monto+$row['monto'];\n }\n $tabla .='</tbody>\n <tr class=\"modo1\">\n <td colspan=7 style=\"height:20%;\"><strong>TOTAL</strong></td>\n <td align=right style=\"height:20%;\">'.$monto.'</td>\n </tr>\n </table>';\n }\n $tabla .='<br>';\n }\n }\n\n if(count($proy_inv)!=0){\n $nro_pi=0;\n $tabla .='PROYECTO DE INVERSI&Oacute;N<hr>';\n foreach($proy_inv as $row){\n $nro_pi++;\n $tabla .='<div>'.$nro_pi.'.- '.$row['aper_programa'].' '.$row['aper_proyecto'].' '.$row['aper_actividad'].' - '.$row['proy_nombre'].'</div>';\n $partidas=$this->model_ptto_sigep->partidas_accion($row['aper_id'],2);\n if(count($partidas)!=0){\n $tabla .=' <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\">\n <thead>\n <tr class=\"modo1\" align=center>\n <th bgcolor=\"#1c7368\" style=\"width:1%;\"><font color=#fff>NRO.</font></th>\n <th bgcolor=\"#1c7368\" style=\"width:10%;\"><font color=#fff>PARTIDA</font></th>\n <th bgcolor=\"#1c7368\" style=\"width:30%;\" colspan=\"5\"><font color=#fff>DETALLE PARTIDA</font></th>\n <th bgcolor=\"#1c7368\" style=\"width:15%;\"><font color=#fff>PROGRAMADO</font></th>\n </tr>\n </thead>\n <tbody>';\n $nro=0;\n $monto=0;\n foreach($partidas as $row){\n $nro++;\n $tabla .='<tr class=\"modo1\">\n <td align=center style=\"height:20%;\">'.$nro.'</td>\n <td align=center style=\"height:20%;\">'.$row['codigo'].'</td>\n <td align=left style=\"height:20%;\" colspan=\"5\">'.mb_convert_encoding($row['nombre'], 'cp1252', 'UTF-8').'</td>\n <td align=right style=\"height:20%;\">'.$row['monto'].'</td>\n </tr>';\n $monto=$monto+$row['monto'];\n }\n $tabla .='</tbody>\n <tr class=\"modo1\">\n <td colspan=7 style=\"height:20%;\"><strong>TOTAL</strong></td>\n <td align=right style=\"height:20%;\">'.$monto.'</td>\n </tr>\n </table>';\n }\n $tabla .='<br>';\n }\n }\n\n return $tabla;\n }", "title": "" }, { "docid": "2d40a0328d57d41bd82affb128bfb6fe", "score": "0.5389271", "text": "public function labas()\n {\n echo \"Labas, Tavo automobilis yra {$this->spalva}.\";\n }", "title": "" }, { "docid": "31e9266357be5f8536a55c682d0159b7", "score": "0.5383539", "text": "function listaNiveles($configuracion,$tema,$registro,$total)\r\n {\r\n ?>\r\n <table width=\"100%\" align=\"center\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" >\r\n <tr class=\"cuadro_plano\">\r\n <td align=\"center\">\r\n <?\r\n\r\n $nivel=0;\r\n $totalCreditosPlan=0;\r\n $espaciosBasico=0;\r\n $espacioComplementario=0;\r\n $espacioIntrinseco=0;\r\n for($a=0; $a<$total; $a++)\r\n {\r\n\r\n #Mestra los niveles del plan de estudios\r\n if($nivel!=$registro[$a][2])\r\n {\r\n\r\n echo \"NIVEL \".$registro[$a][2];\r\n\r\n #Muestra los espacios academicos del nivel\r\n $nivelEspacio=$registro[$a][2];\r\n \r\n\r\n $this->listaEspacios($configuracion,$tema,$registro,$total,$nivelEspacio);\r\n //echo \"N&uacute;mero de Cr&eacute;ditos:\". $espacio;\r\n $nivel++;\r\n\r\n\r\n }\r\n\r\n else{}\r\n\r\n #cuenta la suma de creditos del plan \r\n $totalCreditosPlan=$totalCreditosPlan+$registro[$a][3];\r\n\r\n #descuenta los creditos que pertenecen a la misma electiva\r\n if($registro[$a][9]==$registro[$a-1][9] and $registro[$a][8]==3)\r\n {\r\n $totalCreditosPlan=$totalCreditosPlan-$registro[$a][3];\r\n }\r\n\r\n #Calcula numero de creditos de espacios academicos obligatorios basicos\r\n\r\n if($registro[$a][8]==1)\r\n {\r\n\r\n $espaciosBasico=$espaciosBasico+$registro[$a][3];\r\n\r\n\r\n\r\n }\r\n\r\n else{} \r\n\r\n #Calcula numero de creditos de creditos de espacios academicos obligatorios complementarios\r\n\r\n if($registro[$a][8]==2)\r\n {\r\n\r\n $espacioComplementario=$espacioComplementario+$registro[$a][3];\r\n\r\n }\r\n\r\n else{}\r\n\r\n #Calcula numero de creditos de espacios academicos electivos intrinsecos\r\n\r\n if($registro[$a][8]==3 and $registro[$a][9]!=$registro[$a-1][9])\r\n {\r\n\r\n $espacioIntrinseco=$espacioIntrinseco+$registro[$a][3];\r\n\r\n }\r\n\r\n else{}\r\n #Calcula numero de creditos de espacios academicos electivos extrinsecos\r\n\r\n if($registro[$a][8]==4)\r\n {\r\n\r\n $espacioExtrinseco=$espacioExtrinseco+$registro[$a][3];\r\n\r\n }\r\n\r\n else{}\r\n\r\n }\r\n ?>\r\n </td>\r\n </tr>\r\n </table>\r\n <?\r\n #muestra mensaje al final del plan de estudios\r\n $porcentajeBasico=($espaciosBasico*100)/$totalCreditosPlan;\r\n $porcentajeComplementario=($espacioComplementario*100)/$totalCreditosPlan;\r\n $porcentajeIntrinseco=($espacioIntrinseco*100)/$totalCreditosPlan;\r\n ?>\r\n <tr>\r\n <td align=\"center\">\r\n <table class='cuadro_plano cuadro_brown' >\r\n <tr>\r\n <td align=\"center\" colspan=\"3\">\r\n <p class=\"textoNivel0\">TOTAL CREDITOS DEL PLAN DE ESTUDIOS:</p>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td align=\"center\" colspan=\"3\">\r\n <p class=\"textoNivel0\"><h2><?echo $totalCreditosPlan?></h2></p>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td align=\"center\">\r\n <p class=\"textoNivel0\" align=\"left\"></p>\r\n </td>\r\n <td align=\"center\">\r\n <p class=\"textoNivel0\">Cr&eacute;ditos</p>\r\n </td>\r\n <td align=\"center\">\r\n <p class=\"textoNivel0\">Porcentaje</p>\r\n </td>\r\n </tr> \r\n <tr>\r\n <td align=\"center\">\r\n <p class=\"textoNivel0\" align=\"left\">Obligatorios B&aacute;sicos:</p>\r\n </td>\r\n <td align=\"center\">\r\n <p class=\"textoNivel0\"><?echo \"<strong>\".$espaciosBasico?></strong></p>\r\n </td> <td align=\"center\">\r\n <p class=\"textoNivel0\"><?echo number_format($porcentajeBasico,1).\"%\"?></p>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td align=\"center\">\r\n <p class=\"textoNivel0\" align=\"left\">Obligatorios Complementarios:</p>\r\n </td>\r\n <td align=\"center\">\r\n <p class=\"textoNivel0\"><?echo \"<strong>\".$espacioComplementario?></strong></p>\r\n </td> <td align=\"center\">\r\n <p class=\"textoNivel0\"><?echo number_format($porcentajeComplementario,1).\"%\"?></p>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td align=\"center\">\r\n <p class=\"textoNivel0\" align=\"left\">Electivos Intr&iacute;nsecos:</p>\r\n </td>\r\n <td align=\"center\">\r\n <p class=\"textoNivel0\"><?echo \"<strong>\".$espacioIntrinseco?></strong></p>\r\n </td> <td align=\"center\">\r\n <p class=\"textoNivel0\"><?echo number_format($porcentajeIntrinseco,1).\"%\"?></p>\r\n </td>\r\n </tr>\r\n </table>\r\n </td>\r\n <td>\r\n\r\n </td>\r\n </tr>\r\n <?\r\n\r\n\r\n\r\n }", "title": "" }, { "docid": "7353301ee529cfaab33c2479ad05f9c7", "score": "0.5381946", "text": "function PalabraDistritosPoblados($cadena)\n{\n\n\n $PalabraDisPobla = array(\n'abangares',\n'acosta',\n'aguirre',\n'alajuela',\n'alajuelita',\n'alfaro ruiz',\n'alvarado',\n'aserri',\n'atenas',\n'bagaces',\n'barva',\n'belen',\n'buenos aires',\n'canas',\n'carrillo',\n'cartago',\n'corredores',\n'coto brus',\n'curridabat',\n'desamparados',\n'dota',\n'el guarco',\n'escazu',\n'esparza',\n'flores',\n'garabito',\n'goicoechea',\n'golfito',\n'grecia',\n'guacimo',\n'guatuso',\n'heredia',\n'hojancha',\n'jimenez',\n'la cruz',\n'la union',\n'leon cortes',\n'liberia',\n'limon',\n'los chiles',\n'matina',\n'montes de oro',\n'mora',\n'moravia',\n'nandayure',\n'naranjo',\n'nicoya',\n'oreamuno',\n'orotina',\n'osa',\n'palmares',\n'paraiso',\n'parrita',\n'perez zeledon',\n'poas',\n'pococi',\n'puntarenas',\n'puriscal',\n'san carlos',\n'san jose',\n'san mateo',\n'san rafael',\n'san ramon',\n'santa ana',\n'santa barbara',\n'santa cruz',\n'santo domingo',\n'sarapiqui',\n'siquirres',\n'talamanca',\n'tarrazu',\n'tibas',\n'tilaran',\n'turrialba',\n'turrubares',\n'upala',\n'valverde vega',\n'vazquez de coronado',\n'acapulco',\n'aguabuena',\n'aguacaliente',\n'aguas claras',\n'aguas zarcas',\n'alajuela',\n'alajuelita',\n'alegria',\n'alfaro',\n'angeles',\n'anselmo llorente',\n'arancibia',\n'arenal',\n'aserri',\n'asuncion',\n'atenas',\n'bagaces',\n'bahia ballena',\n'barbacoas',\n'barranca',\n'barrantes',\n'baru',\n'barva',\n'batan',\n'bebedero',\n'bejuco',\n'belen',\n'belen de nosarita',\n'bijagua',\n'bolivar',\n'bolson',\n'boruca',\n'brasil',\n'bratsi',\n'briolley',\n'brisas',\n'brunka',\n'buenavista',\n'buenos aires',\n'cabo velas',\n'cachi',\n'cahuita',\n'cajon',\n'calle blancos',\n'canas',\n'canas dulces',\n'candelaria',\n'candelarita',\n'cangrejal',\n'cano negro',\n'canoas',\n'capellades',\n'carara',\n'cariari',\n'carmen',\n'carmona',\n'carrandi',\n'carrillos',\n'carrizal',\n'cartagena',\n'cascajal',\n'catedral',\n'ceiba',\n'cervantes',\n'chacarita',\n'changena',\n'chira',\n'chires',\n'chirripo',\n'chomes',\n'cinco esquinas',\n'cipreses',\n'cirri sur',\n'cobano',\n'colima',\n'colinas',\n'colon',\n'colorado',\n'concepcion',\n'copey',\n'corralillo',\n'corredor',\n'cot',\n'cote',\n'coyolar',\n'cuajiniquil',\n'curena',\n'curridabat',\n'curubande',\n'cutris',\n'damas',\n'daniel flores',\n'delicias',\n'desamparaditos',\n'desamparados',\n'desmonte',\n'diria',\n'dos rios',\n'duacari',\n'dulce nombre',\n'dulce nombre de jesus',\n'el amparo',\n'el roble',\n'escazu',\n'escobal',\n'espiritu santo',\n'esquipulas',\n'filadelfia',\n'florencia',\n'florida',\n'fortuna',\n'frailes',\n'garita',\n'general',\n'germania',\n'golfito',\n'granadilla',\n'granja',\n'gravilias',\n'grecia',\n'grifo alto',\n'guacima',\n'guacimal',\n'guacimo',\n'guadalupe',\n'guadalupe (arenilla)',\n'guaitil',\n'guapiles',\n'guayabo',\n'guaycara',\n'hacienda vieja',\n'hatillo',\n'heredia',\n'hojancha',\n'horquetas',\n'hospital',\n'huacas',\n'ipis',\n'isla del coco',\n'jaco',\n'jardin',\n'jesus',\n'jesus maria',\n'jimenez',\n'juan vinas',\n'juntas',\n'la cruz',\n'la cuesta',\n'la isabel',\n'la suiza',\n'la virgen',\n'laguna',\n'laurel',\n'legua',\n'leon xiii',\n'lepanto',\n'libano',\n'liberia',\n'limon',\n'limoncito',\n'llano bonito',\n'llano grande',\n'llanos de santa lucia',\n'llanuras del gaspar',\n'llorente',\n'los chiles',\n'los guido',\n'macacona',\n'mansion',\n'manzanillo',\n'mastate',\n'mata de platano',\n'mata redonda',\n'matama',\n'matina',\n'mayorga',\n'merced',\n'mercedes',\n'mercedes sur',\n'miramar',\n'mogote',\n'monte romo',\n'monte verde',\n'monterrey',\n'nacascolo',\n'naranjito',\n'naranjo',\n'nicoya',\n'nosara',\n'occidental',\n'oriental',\n'orosi',\n'orotina',\n'pacayas',\n'pacuarito',\n'palmar',\n'palmares',\n'palmera',\n'palmichal',\n'palmira',\n'paquera',\n'para',\n'paracito',\n'paraiso',\n'paramo',\n'parrita',\n'patalillo',\n'patarra',\n'pavas',\n'pavon',\n'pavones',\n'pejibaye',\n'penas blancas',\n'picagres',\n'piedades',\n'piedades norte',\n'piedades sur',\n'piedras blancas',\n'piedras negras',\n'pilas',\n'pitahaya',\n'pital',\n'pittier',\n'platanares',\n'pocora',\n'pocosol',\n'porozal',\n'porvenir',\n'potrero cerrado',\n'potrero grande',\n'pozos',\n'puente de piedra',\n'puerto carrillo',\n'puerto cortes',\n'puerto jimenez',\n'puerto viejo',\n'puntarenas',\n'puraba',\n'purral',\n'quebrada grande',\n'quebrada honda',\n'quebradilla',\n'quepos',\n'quesada',\n'rancho redondo',\n'ribera',\n'rio azul',\n'rio blanco',\n'rio cuarto',\n'rio jimenez',\n'rio naranjo',\n'rio nuevo',\n'rio segundo',\n'rita',\n'rivas',\n'rodriguez',\n'rosario',\n'roxana',\n'sabalito',\n'sabana redonda',\n'sabanilla',\n'sabanillas',\n'salitral',\n'salitrillos',\n'samara',\n'san andres',\n'san antonio',\n'san cristobal',\n'san diego',\n'san felipe',\n'san francisco',\n'san francisco dos rios',\n'san gabriel',\n'san ignacio de acosta',\n'san isidro',\n'san isidro del general',\n'san jeronimo',\n'san joaquin de flores',\n'san jorge',\n'san jose',\n'san jose de la montana',\n'san josecito',\n'san juan',\n'san juan de dios',\n'san juan de mata',\n'san juan grande',\n'san lorenzo',\n'san luis',\n'san marcos',\n'san mateo',\n'san miguel',\n'san nicolas',\n'san pablo',\n'san pedro',\n'san rafael',\n'san rafael abajo',\n'san rafael arriba',\n'san ramon',\n'san roque',\n'san sebastian',\n'san vicente',\n'san vito',\n'sanchez',\n'santa ana',\n'santa barbara',\n'santa cecilia',\n'santa cruz',\n'santa elena',\n'santa eulalia',\n'santa lucia',\n'santa maria',\n'santa rita',\n'santa rosa',\n'santa teresita',\n'santiago',\n'santo domingo',\n'santo tomas',\n'sarapiqui',\n'sarchi norte',\n'sarchi sur',\n'sardinal',\n'savegre',\n'sierpe',\n'sierra',\n'siquirres',\n'sixaola',\n'tabarcia',\n'tacares',\n'tamarindo',\n'tambor',\n'tapezco',\n'tarbaca',\n'tarcoles',\n'tayutic',\n'tejar',\n'telire',\n'tempate',\n'tierra blanca',\n'tierras morenas',\n'tigra',\n'tilaran',\n'tirrases',\n'tobosi',\n'toro amarillo',\n'tres equis',\n'tres rios',\n'trinidad',\n'tronadora',\n'tucurrique',\n'tuis',\n'tures',\n'turrialba',\n'turrucares',\n'ulloa',\n'union',\n'upala',\n'uruca',\n'valle la estrella',\n'varablanca',\n'veintisiete de abril',\n'venado',\n'venecia',\n'volcan',\n'volio',\n'vuelta de jorco',\n'yolillal',\n'zapotal',\n'zapote',\n'zaragoza',\n'zarcero'\n\n\n );\n\n\n return in_array($cadena, $PalabraDisPobla);\n\n \n}", "title": "" }, { "docid": "a234b25338c882c2222b1a3d551cdc27", "score": "0.5381486", "text": "function mostraPagina()\n\t\t{\n\t\t\n\t\t$this->aggiungiElemento($this->dammiMenu());\n\t\t$this->aggiungiElemento(\"Elenco documenti\" . $this->dammiTitoloGenitore('id_utente'), \"titolo\");\n\t\t$this->aggiungiElemento($this->dammiTabella());\n\t\t$this->mostra();\n\t\t}", "title": "" }, { "docid": "865dd2fd05803174da7c0b22858d99d2", "score": "0.53810716", "text": "public function afficheParcAction()\n {\n $user = $this->getUser();\n //create our entity manager: get the service doctrine\n $em=$this->getDoctrine();\n //repository help you fetch (read) entities of a certain class.\n $repository=$em->getRepository(Parc::class);\n //find *all* 'Projet' objects\n $parcs=$repository->findAll();\n\n $em=$this->getDoctrine();\n //repository help you fetch (read) entities of a certain class.\n $repository=$em->getRepository(Promenade::class);\n //find *all* 'Projet' objects\n $promenade=$repository->findAll();\n\n $em = $this->getDoctrine()->getManager();\n $cPanier=$em->getRepository(ContenuPanier::class)->getProduitPanier($user,0);\n $panier=$em->getRepository(Panier::class)->findPanier($user);\n\n if(empty($panier))\n {\n $panier=new Panier();\n $panier->setSomme(0);\n }\n //create our entity manager: get the service doctrine\n $em=$this->getDoctrine();\n //repository help you fetch (read) entities of a certain class.\n $repository=$em->getRepository(Avis::class);\n //find *all* 'Projet' objects\n $avis=$repository->findAll();\n\n //render a template with the list of objects\n return $this->render('PetSitterDresseurBundle:Dresseur:Parcs.html.twig', array(\n 'user' => $user,\n 'Parc'=>$parcs,\n 'promenade'=>$promenade,\n 'avis'=>$avis,\n 'cPanier'=>$cPanier,\n 'panier'=>$panier\n\n ));\n }", "title": "" }, { "docid": "dd4e9cded0e1211edabeb071621f857d", "score": "0.5381051", "text": "function actividad1($numero)\n{\n\t$lista[] = 2;\n\t/* Agregar $, eliminación del int */\n\tfor ($i = 3; $i <= $numero; $i++)\n\t{\n\t\t/* Punto y coma */\n\t\t$es = TRUE;\n\t\tforeach ($lista as $j)\n\t\t{\n\t\t\t/* Cambio de = por ==, agregado de parentesis, eliminación del then, agregado de llaves */\n\t\t\tif ($i % $j == 0)\n\t\t\t{\n\t\t\t\t$es = FALSE;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif ($es)\n\t\t\t$lista[] = $i;\n\t}\n\treturn $lista;\n}", "title": "" }, { "docid": "b960494999513a5cc889249c853cdf16", "score": "0.53760076", "text": "function listarPermiso(){\n\t\t$this->procedimiento='asis.ft_permiso_sel';\n\t\t$this->transaccion='ASIS_PMO_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_permiso','int4');\n\t\t$this->captura('nro_tramite','varchar');\n\t\t$this->captura('id_funcionario','int4');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('fecha_solicitud','date');\n\t\t$this->captura('id_tipo_permiso','int4');\n\t\t$this->captura('motivo','text');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\n $this->captura('desc_tipo_permiso','text');\n $this->captura('desc_funcionario','text');\n $this->captura('hro_desde','time');\n $this->captura('hro_hasta','time');\n $this->captura('asignar_rango','varchar');\n $this->captura('documento','varchar');\n\n\n //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": "ed6da6dd41bdea4408e661bf187ff773", "score": "0.537199", "text": "function mostraPagina()\n\t\t{\n\t\t\n\t\t$this->aggiungiElemento($this->dammiMenu());\n\t\t$this->aggiungiElemento(\"Elenco categorie articoli\", \"titolo\");\n\t\t$this->aggiungiElemento($this->dammiTabella());\n\t\t$this->mostra();\n\t\t}", "title": "" }, { "docid": "e0d40f3a88fd400b4351ce623ffe786e", "score": "0.5368661", "text": "function getParishesMap($codMun)\n\t{\n\t\t$urlPharm = 'http://services.sapo.pt/Pharmacy/GetPharmaciesAtServiceByMunicipalityId?municipalityId='.$codMun;\n\t\t$xmlPharm = new SimpleXMLElement($urlPharm, NULL, TRUE);\n\t\tforeach ($xmlPharm->GetPharmaciesAtServiceByMunicipalityIdResult->Pharmacies->Pharmacy as $pharm)\n\t\t{\n\t\t\t\techo $pharm->Address->ParishId, ' :: ', $pharm->Address->Parish,'<br>';\n\t\t\t\t$s[intval($pharm->Address->ParishId)]=(string)$pharm->Address->Parish;\n\t\t}\n\t\t\treturn $s;\n\t}", "title": "" }, { "docid": "5ff30d5f126e5a5d317a6786780bd529", "score": "0.5360217", "text": "public function cargar_gc_pro($atrib){\n try{\n \n \n $pdo = AccesoDB::getCon();\n\n \n $sql = 'select id_gc, (:atrib * factor_gc)-cant_reb_gc gc from global_comp where :atrib between desde_gc and hasta;';\n \n \n $stmt = $pdo->prepare($sql);\n $stmt->bindParam(\":atrib\", $atrib, PDO::PARAM_INT);\n $stmt->execute();\n $response = $stmt->fetchAll();\n return $response;\n } catch (Exception $e) {\n echo\"-1\";\n //echo\"<script type=\\\"text/javascript\\\">alert('Error, comuniquese con el administrador\". $e->getMessage().\" '); window.location='../../index.html';</script>\";\n }\n }", "title": "" }, { "docid": "5d6c5af61b1dea6adb2a402a7e64c51f", "score": "0.5360208", "text": "function crearTablaMigracion() {\n\t\t\t$cnx= conectar_postgres();\n\t\t\t$cons = \"CREATE TABLE consumo.codproductosMigracion2( compania character varying(60) , almacenppal character varying(30) , autoid integer , codigo1 character varying(12), codigo2 character varying(30), codigo3 character varying(12), nombreprod1 character varying(100), nombreprod2 character varying(100), unidadmedida character varying(150), presentacion character varying(140), tipoproducto character varying(40), grupo character varying(150), bodega character varying(40), estante character varying(10), nivel character varying(10), usuariocre character varying(50), fechacre timestamp without time zone, usuariomod character varying(50), fechaultmod timestamp without time zone, estado character varying(2), max integer, min integer, vriva double precision, actualizaventa double precision, anio integer , clasificacion character varying(800), cum character varying(30), control character varying(10), somatico character varying(10), riesgo character varying(20), reginvima character varying(200), pos integer, codsecretaria character varying(13),error text)WITH ( OIDS=FALSE)\";\t\n\t\t\t$res = @pg_query($cnx, $cons);\n\t\t\t\tif (!$res) {\n\t\t\t\t\n\t\t\t\t\techo \"<p class='error1'> Error de ejecucion </p>\".pg_last_error().\"<br>\";\n\t\t\t\t\techo \"<p class= 'subtitulo1'>Comando SQL </p> <br>\".$cons.\"<br>\"; \t\t\t\t\n\t\t\t\t\techo \"<br><br>\";\t\t\t\n\t\t\t\t\t//echo \"<br><br>\";\n\t\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "9e53dcc09425833223338f24598e5f3d", "score": "0.5354147", "text": "function ExistenciaMasProduccionMenosPedidos() {\n\t\t$tipo=0;\n\t\t$pedaut=1;\n\t\t$fechaini='2012-06-01';\n\t\t$fechafin='2012-08-01';\n\t\t$fpedidosini=\"\";\n\t\t$fpedidosfin=\"\";\n\t\t$fventasini=\"\";\n\t\t$fventasfin=\"\";\n\t\t$cveartini=\"POWEBLACK\";\n\t\t$cveartfin=\"POWEBORINC\";\n\t\t$linea_cve=\"\";\n\t\t$marca_cve=\"\";\n\t\t$t=1;\n\t\t\n\t\t$theProcedure=(empty($pedaut)||$pedaut==0?'prcExistProdPed':'prcExistProdPed_Aut');\n\t\t$sql=\"SELECT * FROM ${theProcedure}(\n\t\t\t'${fechaini}', '${fechafin}', \n\t\t\t$t, \n\t\t\t'${cveartini}', '${cveartfin}' ) Corte\n\t\t\tWHERE Tipo IN(0,2) \";\n\n\t\tif (!empty($linea_cve)) {\n\t \t$sql.=\" AND linea='${linea_cve}' \";\n\t\t}\n\t\tif (!empty($marca_cve)) {\n\t \t$sql.=\" AND marca='${marca_cve}' \";\n\t\t}\n\t\t\n\t\t$sql.=\" ORDER BY cveart, tipo, ocorte \";\n\t \n\t\t$this->set('sql', $sql);\n\t\t$this->set('rs', $this->SystemTable->query($sql) );\n\t\t\n\t}", "title": "" }, { "docid": "a43af9bf56a2905551455196a0a16012", "score": "0.5352334", "text": "protected function armaColeccionMapeoCarac() {\n $dao = new PGDAO();\n $where = $this->strZpTprop();\n $strSql = $this->COLECCIONMAPEOCARAC . \" WHERE tipoprop in (\" . $where . \");\";\n// echo \"*** \".$strSql.\" ****\";\n $arrayRet = $this->leeDBArray($dao->execSql($strSql));\n return $arrayRet;\n }", "title": "" }, { "docid": "e907112afb6e3de4874406484348df28", "score": "0.5339879", "text": "public function listadoAltoImpacto() {\n\t\t\t$consulta = $this->conexion->prepare('SELECT ID, FECHA, AVISO, REGIONAL, FALLA, PRIORIDAD FROM comunicacion_avisos WHERE ESTADO = ? ORDER BY PRIORIDAD ASC, FECHA ASC');\n\t\t\t$consulta->bindValue(1, 1, PDO::PARAM_INT);\n\t\t\t$consulta->execute();\n\t\t\treturn $consulta->fetchAll(PDO::FETCH_ASSOC);\n\t\t}", "title": "" }, { "docid": "f96aee743ee8a1e8588b28cc12e103e6", "score": "0.5333476", "text": "public function permisos()\n {\n\n $this->Attach['modulo']='permisos';\n $this->Attach['data']=$this->Dm->getDataWhere('permisos.permiso as id, persona.nombre, ruta.modulo','permisos, persona, ruta', \"permisos.persona=persona.id AND permisos.ruta=ruta.ruta\");\n $this->LoadView('pagina');\n }", "title": "" }, { "docid": "b1238fcb65621c97a8d8e0ad05aab182", "score": "0.5326474", "text": "function getListaFormasPago(){\n\n $output = array();\n\n $query = \"SELECT \n id_forma_pago AS id_forma_pago,\n descripcion AS descripcion\n FROM \n generales.tb_formas_pago\";\n\n $result = pg_query($query) or die('La consulta fallo: ' . pg_last_error()); \n\n if(pg_num_rows($result)>0){\n\n $i = 0; \n while($row = pg_fetch_array($result, null)){ \n $output['listaFormasPago'][$i]['id_forma_pago'] = $row['id_forma_pago'];\n $output['listaFormasPago'][$i]['descripcion'] = $row['descripcion'];\n $i++; \n } \n\n // Liberando el conjunto de resultados\n pg_free_result($result); \n\n }\n\n return $output; \n\n }", "title": "" }, { "docid": "1550c2af82c147f48571917c3afa29d1", "score": "0.53261775", "text": "public function get_datos_parteproceso_migracion($radicadox,$radicadoxsignotanterior){\n\n $listar = $this->db->prepare(\"SELECT * FROM parte WHERE (id_proceso = '$radicadox' OR id_proceso = '$radicadoxsignotanterior')\n ORDER BY nombre_sujeto\");\n\n /*GROUP BY nombre_sujeto*/\n\n $listar->execute();\n\n return $listar;\n\n }", "title": "" }, { "docid": "8038f49346b76dbe9f7d0d5b643c4d6a", "score": "0.5320045", "text": "public function obtenirListeGpm() {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t$stmt = $this->connexion->query(\"SELECT * from groupeMotopropulseur where gmpStatut = 1\");\n\n\t\t\t\t$stmt->execute();\n\t\t\t\treturn $stmt->fetchAll();\n\n\t\t\t}\n\t\t\tcatch(Exception $exc) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a6c597756d69b444b907e5aeeb98cb19", "score": "0.53195757", "text": "function listarPartidaEjecucion(){\n\t\t$this->procedimiento='pre.ft_partida_ejecucion_sel';\n\t\t$this->transaccion='PRE_PAREJE_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_partida_ejecucion','int4');\n\t\t$this->captura('id_int_comprobante','int4');\n\t\t$this->captura('id_moneda','int4');\n $this->captura('moneda','varchar');\n\t\t$this->captura('id_presupuesto','int4');\n $this->captura('desc_pres','varchar');\n $this->captura('codigo_cc','text');\n\n $this->captura('codigo_categoria','varchar');\n\t\t$this->captura('id_partida','int4');\n $this->captura('codigo','varchar');\n $this->captura('nombre_partida','varchar');\n\t\t$this->captura('nro_tramite','varchar');\n\t\t$this->captura('tipo_cambio','numeric');\n\t\t$this->captura('columna_origen','varchar');\n\t\t$this->captura('tipo_movimiento','varchar');\n\t\t$this->captura('id_partida_ejecucion_fk','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha','date');\n\t\t$this->captura('monto_mb','numeric');\n\t\t$this->captura('monto','numeric');\n\t\t$this->captura('valor_id_origen','int4');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\n\t\t//Ejecuta la instruccion\n $this->armarConsulta();\n //echo($this->consulta);exit;\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "02696df51911750f1c413ce0f78325f2", "score": "0.5313555", "text": "function get_pembpes()\r\n\t{\r\n\t\t$sql = \"SELECT a.id_permintaan,a.nota_minta,a.tgl_minta,a.id_unit,a.id_bagian,b.nm_unit,c.nm_bagian\r\n\t\t\t\tFROM tbl_permintaan as a\r\n\t\t\t\tjoin tbl_unit as b on a.id_unit=b.id_unit\r\n\t\t\t\tjoin tbl_bagian as c on a.id_bagian=c.id_bagian\r\n\t\t\t\tWHERE a.selesai_minta = 'P'\";\r\n\t\t$data = $this->db->query($sql);\r\n\t\treturn $data->result();\r\n\t}", "title": "" }, { "docid": "0f4d04478ba73341af348ecf3e184915", "score": "0.5312516", "text": "function imgd_listado_asociados(){\n \n\n}", "title": "" }, { "docid": "d1660c7b22aca1b6d7aa16cd56231c48", "score": "0.53116846", "text": "function prikazi_placeno($idstete){\n\n\t$conn_amso = pg_connect (\"host=localhost dbname=amso user=zoranp\");\n\tif(!$conn_amso){\n\t\techo \"Greška otvaranja konekcije prema SQL serveru\";\n\t}\n\t$conn_stete = pg_connect (\"host=localhost dbname=stete user=zoranp\");\n\tif(!$conn_stete){\n\t\techo \"Greška otvaranja konekcije prema SQL serveru\";\n\t}\n\n\n\t$sql_dohvati_podatke_za_predmet=\"SELECT poz.novi_broj_predmeta,i.datum_naloga as datum_naloga, sp.brsp as brsp\n\tFROM predmet_odstetnog_zahteva poz\n\tINNER JOIN isplate i ON (poz.id=i.idstete)\n\tLEFT OUTER JOIN sudski_postupak sp ON (poz.sudski_postupak_id=sp.idsp)\n\tWHERE poz.id=$idstete\n\tORDER BY i.datum_naloga asc\";\n\n\t$rezultat_dohvati_podatke_za_predmet = pg_query($conn_stete, $sql_dohvati_podatke_za_predmet);\n\t$niz_dohvati_podatke_za_predmet = pg_fetch_all($rezultat_dohvati_podatke_za_predmet);\n\n\t//najmanji datum naloga iz isplata\n\t$datum_naloga=$niz_dohvati_podatke_za_predmet[0]['datum_naloga'];\n\t\n\t$godina_nalog=substr($datum_naloga, 0,4);\n\t\n\t$godina=$godina_nalog;\n\tif($niz_dohvati_podatke_za_predmet){\n\n\t\t$br = count($niz_dohvati_podatke_za_predmet);\n\n\t\tfor($i = 0; $i < $br; $i++)\n\t\t{\n\t\t\t$novi_broj_predmeta = $niz_dohvati_podatke_za_predmet[$i]['novi_broj_predmeta'];\n\t\t\n\t\t\t\t\t\t\n\t\t\t//podaci iz glavne knjige\n\n\t\t\t$provera_placanja_upit = \"WITH provera_placanja AS(\";\n\n\t\t\t$provera_placanja_upit .= \"SELECT gk.duguje, gk.datknjiz, gk.partner, gk.opisdok, gk.vrstadok,p.naziv,p.adresa, p.mesto, gk.brdok\n\t\t\tFROM g$godina gk inner join partneri p on gk.partner=p.sifra\n\t\t\tWHERE gk.konto LIKE '430%'\n\t\t\tAND (brojdok='$novi_broj_predmeta')\n\t\t\tAND gk.potrazuje=0\n\t\t\t\";\n\n\t\t\tfor ($i = $godina + 1; $i <= date('Y'); $i++) {\n\n\t\t\t\t$provera_placanja_upit .= \" UNION ALL SELECT gk.duguje, gk.datknjiz, gk.partner, gk.opisdok, gk.vrstadok,p.naziv,p.adresa, p.mesto, gk.brdok\n\t\t\t\tFROM g$i gk inner join partneri p on gk.partner=p.sifra\n\t\t\t\tWHERE gk.konto LIKE '430%'\n\t\t\t\tAND (brojdok='$novi_broj_predmeta')\n\t\t\t\tAND gk.potrazuje=0\";\n\t\t\t}\n\n\t\t\t$provera_placanja_upit .= \")\";\n\t\t\t$provera_placanja_upit .= \"SELECT sum(duguje) AS suma, MAX(datknjiz) AS datum_isplate FROM provera_placanja\";\n\n\t\t\t$rez_provera_placanja = pg_query($conn_amso, $provera_placanja_upit);\n\t\t\t$niz_provera_placanja = pg_fetch_array($rez_provera_placanja);\n\t\t\t$ukupan_br=count($niz_provera_placanja);\n\n\t\t\tif(!empty($niz_provera_placanja)){\n\n\t\t\t\t$niz_slanje = array();\n\n\t\t\t\t$niz_slanje['suma'] = number_format($niz_provera_placanja['suma'], 2);\n\t\t\t\t$niz_slanje['datum_isplate'] = $niz_provera_placanja['datum_isplate'];\n\n\t\t\t}\n\t\t}\n\t\t\n\t} //kraj if empty\n\t\n\treturn $niz_slanje;\n \n}", "title": "" }, { "docid": "01e9d9bc034ba5847cde3bdc252d5d19", "score": "0.5309515", "text": "function APLICA_ANTICIPOS($sufijo){\r\r\n\t//APLICACION DE ANTICIPOS\r\r\n\t$sql=mysql_query(\"SELECT * FROM \".$sufijo.\"_ANTICIPOS WHERE MONTO>0 \");\r\r\n\twhile ($dato = mysql_fetch_assoc($sql)) {\r\r\n\t$NUM_PAGO=$dato[NUMERODEPAGO];\r\r\n\t$NUM_COBRO=$dato[NUMERODECOBRO];\r\r\n\tif($dato[TIPO]=='INGRESO'){$TIPO='INGRESO';}\r\r\n\tif($dato[TIPO]=='DESCUENTO'){$TIPO='DESCUENTO';}\r\r\n\t$anticipo=$dato[MONTO];\r\r\n\t\t$sql2=mysql_query(\"SELECT * FROM \".$sufijo.\"_COBROS WHERE UNICO_IDENT='$dato[UNICO_IDENT]' and PORCUBRIR>0 ORDER BY FECHADECOBRO ASC\");\r\r\n\t\twhile ($dato2 = mysql_fetch_assoc($sql2)) {\r\r\n\t\t$porcubrir=$dato2[PORCUBRIR];\r\r\n\t\t$concepto_anti=$dato2[CONCEPTODECOBRO];\r\r\n\t\t$cubrir=0;\r\r\n\t\tif ($anticipo >= $porcubrir){$cubrir=$porcubrir;}else{$cubrir=$anticipo;}\r\r\n\t\tif($cubrir>0){\r\r\n\t\tmysql_query(\"UPDATE \".$sufijo.\"_ANTICIPOS SET MONTO=MONTO - '$cubrir' WHERE NUMERODEPAGO='$NUM_PAGO' AND TIPO='$TIPO' \");\r\r\n\t\tmysql_query(\"UPDATE \".$sufijo.\"_COBROS SET PORCUBRIR=PORCUBRIR - '$cubrir' WHERE NUMERODECOBRO ='$dato2[NUMERODECOBRO]' \");\r\r\n\t\tmysql_query(\"INSERT into \".$sufijo.\"_APLICA (UNICO,UNICO_IDENT,FECHA_PAGO,TIPO,COBRO,FECHA_COBRO,MONTO,CUENTA,CONCEPTO) VALUES ('$dato[NUMERODEPAGO]','$dato[UNICO_IDENT]','$dato[FECHADEPAGO]','$TIPO','$dato2[NUMERODECOBRO]','$dato2[FECHADECOBRO]','$cubrir','$dato2[CUENTADECOBRO]','$concepto_anti') \");\r\r\n\t\t\t\t$anticipo=$anticipo-$cubrir;}\r\r\n\t\t}\r\r\n\t}\r\r\n}", "title": "" }, { "docid": "d1a23e4f12ab63645ddd81d9b1429e90", "score": "0.5308973", "text": "public function listaPreguntasAprobacionAction() {\n $em = $this->getDoctrine()->getManager();\n \n $idPersona = $this->container->get('security.context')->getToken()->getUser()->getRhPersona()->getId();\n\n $dql_persona = \"SELECT p.id AS id, p.nombres AS nombre, p.apellido AS apellido, p.correoelectronico AS correo, p.descripcion AS descripcion,\"\n . \" p.direccion AS direccion, p.telefonoFijo AS Tfijo, p.telefonoMovil AS movil, p.estado As estado, p.tituloProfesional AS tprofesional, p.verificado As verificado \"\n . \" FROM DGAbgSistemaBundle:AbgPersona p WHERE p.id=\" . $idPersona;\n $result_persona = $em->createQuery($dql_persona)->getArrayResult();\n $nombreCorto = split(\" \", $result_persona[0]['nombre'])[0] . \" \" . split(\" \", $result_persona[0]['apellido'])[0];\n\n $dqlfoto = \"SELECT fot.src as src \"\n . \" FROM DGAbgSistemaBundle:AbgFoto fot WHERE fot.abgPersona=\" . $idPersona . \" and fot.estado=1 and (fot.tipoFoto=0 or fot.tipoFoto=1)\";\n $result_foto = $em->createQuery($dqlfoto)->getArrayResult();\n \n //$preguntas = $em->getRepository('DGAbgSistemaBundle:AbgPregunta')->findBy(array('estado' => 2));\n \n return $this->render('centropreg/panelAprobacionPreguntas.html.twig', array(/*'preguntas' => $preguntas,*/ 'nombreCorto' => $nombreCorto, 'abgFoto' => $result_foto, 'abgPersona' => $result_persona));\n }", "title": "" }, { "docid": "932f7d3be411c335128d4aac2b4a3613", "score": "0.530484", "text": "public function registrosPorPagina(){\r\n\t\t\treturn 10;\r\n\t\t}", "title": "" }, { "docid": "79f0dbae8888bc408056d96028c948bb", "score": "0.53043306", "text": "function procurartemas($procurar)\n\t{\n\t\tinclude_once($this->locaplic.\"/admin/php/xml.php\");\n\t\t$tipo = \"\";\n\t\t$this->xml = \"\";\n\t\tif($this->menutemas != \"\")\n\t\t{\n\t\t\tforeach($this->pegaListaDeMenus() as $menu)\n\t\t\t{\n\t\t\t\tif(!isset($menu[\"url\"])){$menu[\"url\"] = \"\";} //para efeitos de compatibilidade entre vers&otilde;es do i3geo\n\t\t\t\t$ondexml = $menu[\"arquivo\"];\n\t\t\t\tif($menu[\"url\"] != \"\"){$ondexml = $menu[\"url\"];}\n\t\t\t\t$this->xml[] = simplexml_load_file($ondexml);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinclude_once(dirname(__FILE__).\"/../admin/php/classe_arvore.php\");\n\t\t\t$arvore = new Arvore($this->locaplic,$this->idioma);\n\t\t\t$temas = $arvore->procuraTemas($procurar,$this->perfil);\n\t\t\tunset($arvore);\n\t\t\treturn($temas);\n\t\t}\n\t\t$resultado = array();\n\t\t$texto = array();\n\t\tforeach ($this->xml as $xml)\n\t\t{\n\t\t\t$listadetemas = array();\n\t\t\t$subgrupo = array();\n\t\t\tforeach($xml->GRUPO as $grupo)\n\t\t\t{\n\t\t\t\t$incluigrupo = TRUE;\n\t\t\t\t$temp = $this->ixml($grupo,\"PERFIL\");\n\t\t\t\tif ($temp != \"\")\n\t\t\t\t{\n\t\t\t\t\t$incluigrupo = FALSE;\n\t\t\t\t\t$perfis = str_replace(\",\",\" \",$temp);\n\t\t\t\t\t$perfis = explode(\" \",$perfis);\n\t\t\t\t\tif ($this->array_in_array($this->perfil,$perfis))\n\t\t\t\t\t{$incluigrupo = TRUE;}\n\t\t\t\t}\n\t\t\t\tif ($incluigrupo == TRUE)\n\t\t\t\t{\n\t\t\t\t\tforeach($grupo->SGRUPO as $sgrupo)\n\t\t\t\t\t{\n\t\t\t\t\t\t$incluisgrupo = TRUE;\n\t\t\t\t\t\tif ($this->perfil != \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp = $this->ixml($sgrupo,\"PERFIL\");\n\t\t\t\t\t\t\t$perfis = str_replace(\",\",\" \",$temp);\n\t\t\t\t\t\t\t$perfis = explode(\" \",$perfis);\n\t\t\t\t\t\t\tif (!$this->array_in_array($this->perfil,$perfis))\n\t\t\t\t\t\t\t{$incluisgrupo = FALSE;}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($incluisgrupo == TRUE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach($sgrupo->TEMA as $tema)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$inclui = TRUE;\n\t\t\t\t\t\t\t\tif ($this->perfil != \"\")\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$temp = $this->ixml($tema,\"PERFIL\");\n\t\t\t\t\t\t\t\t\t$perfis = str_replace(\",\",\" \",$temp);\n\t\t\t\t\t\t\t\t\t$perfis = explode(\" \",$perfis);\n\t\t\t\t\t\t\t\t\tif (!$this->array_in_array($this->perfil,$perfis))\n\t\t\t\t\t\t\t\t\t{$inclui = FALSE;}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ($inclui == TRUE)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$down = \"nao\";\n\t\t\t\t\t\t\t\t\t$temp = $this->ixml($tema,\"DOWNLOAD\");\n\t\t\t\t\t\t\t\t\tif (($temp == \"sim\") || ($temp == \"SIM\"))\n\t\t\t\t\t\t\t\t\t{$down = \"sim\";}\n\t\t\t\t\t\t\t\t\t$link = $this->ixml($tema,\"TLINK\");\n\t\t\t\t\t\t\t\t\t$tid = $this->ixml($tema,\"TID\");\n\n\t\t\t\t\t\t\t\t\tif(!isset($texto[$tid]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$texto[$tid] = array(\"tid\"=>$tid,\"nome\"=>($this->ixml($tema,\"TNOME\")),\"link\"=>$link,\"download\"=>$down);\n\t\t\t\t\t\t\t\t\t\t$p1 = $this->removeAcentos($procurar);\n\t\t\t\t\t\t\t\t\t\t$p1 = $this->removeAcentos(htmlentities($p1));\n\t\t\t\t\t\t\t\t\t\t$pp1 = $this->removeAcentos($this->ixml($tema,\"TNOME\"));\n\t\t\t\t\t\t\t\t\t\t$pp1 = $this->removeAcentos($pp1);\n\t\t\t\t\t\t\t\t\t\t$pp1 = $this->removeAcentos(htmlentities($pp1));\n\t\t\t\t\t\t\t\t\t\tif (stristr($pp1,$p1) || stristr($this->ixml($tema,\"TNOME\"),htmlentities($procurar)))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$listadetemas[] = $texto[$tid];\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\tif($this->ixml($tema,\"TAGS\") != \"\")\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$pp1 = $this->ixml($tema,\"TAGS\");\n\t\t\t\t\t\t\t\t\t\t\t$pp1 = $this->removeAcentos($pp1);\n\t\t\t\t\t\t\t\t\t\t\tif (stristr($pp1,$p1))\n\t\t\t\t\t\t\t\t\t\t\t{$listadetemas[] = $texto[$tid];}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (count($listadetemas) > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$subgrupo[] = array(\"subgrupo\"=>($this->ixml($sgrupo,\"SDTIPO\")),\"temas\"=>$listadetemas);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$listadetemas = array();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tif (count($subgrupo) > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$resultado[] = array(\"grupo\"=>($this->ixml($grupo,\"GTIPO\")),\"subgrupos\"=>$subgrupo);\n\t\t\t\t\t}\n\t\t\t\t\t$subgrupo = array();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ($resultado);\n\t}", "title": "" }, { "docid": "b76df40d841171975f4220e9441f997e", "score": "0.5300809", "text": "public function puestos()\n\t{\n\t\t\t$this->load->model(\"general_model\");\n\t\t\t$arrParam = array();\n\t\t\t$data['info'] = $this->general_model->get_puesto($arrParam);\n\n\t\t\t$data[\"view\"] = 'puesto';\n\t\t\t$this->load->view(\"layout\", $data);\n\t}", "title": "" }, { "docid": "0f9b5635b399194127ff570840985323", "score": "0.52862996", "text": "function listarConceptoIngasMasPartida(){\n //Definicion de variables para ejecucion del procedimientp\n $this->procedimiento='param.f_concepto_ingas_sel';\n $this->transaccion='PM_CONIGPAR_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n \n //Definicion de la lista del resultado del query\n $this->captura('id_concepto_ingas','int4');\n $this->captura('desc_ingas','varchar');\n $this->captura('tipo','varchar');\n $this->captura('movimiento','varchar');\n $this->captura('sw_tes','varchar');\n $this->captura('id_oec','int4');\n $this->captura('estado_reg','varchar');\n $this->captura('id_usuario_reg','int4');\n $this->captura('fecha_reg','timestamp');\n $this->captura('fecha_mod','timestamp');\n $this->captura('id_usuario_mod','int4');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n $this->captura('activo_fijo','varchar');\n $this->captura('almacenable','varchar');\n $this->captura('desc_partida','text');\n\t\t$this->captura('id_grupo_ots','varchar');\n\t\t$this->captura('filtro_ot','varchar');\n\t\t$this->captura('requiere_ot','varchar');\n \n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n \n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "b8861019d3fb639d032fb93c13c3d33d", "score": "0.52861434", "text": "function Partie_gagnee($tableau_affichage, &$partie_gagnee, $nb_bombes, $nb_cases_horizontales, $nb_cases_verticales)\n{\n $nb_cases_masquees = 0;\n\n for( $y =0 ; $y < $nb_cases_verticales; $y++)\n {\n for( $x =0 ; $x < $nb_cases_horizontales ; $x++)\n {\n if( $tableau_affichage[$x][$y] == 'M' )\n {\n $nb_cases_masquees++;\n }\n }\n }\n\n if( $nb_cases_masquees == $nb_bombes)\n {\n $partie_gagnee=true;\n }\n}", "title": "" }, { "docid": "cfc270c501d6d3d99e2d202e808e8b45", "score": "0.52857184", "text": "function procurartemas2($procurar)\n\t{\n\t\tinclude_once(dirname(__FILE__).\"/../admin/php/classe_arvore.php\");\n\t\t$arvore = new Arvore($this->locaplic,$this->idioma);\n\t\t$temas = $arvore->procuraTemas($procurar,$this->perfil);\n\t\tunset($arvore);\n\t\treturn($temas);\n\t}", "title": "" }, { "docid": "54dddc23ae2054b50e162d55f8b702fb", "score": "0.5281196", "text": "function listarPlanPago(){\n\t\t$this->procedimiento='tes.f_plan_pago_sel';\n\t\t$this->transaccion='TES_PLAPA_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_plan_pago','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('nro_cuota','numeric');\n\t\t$this->captura('monto_ejecutar_total_mb','numeric');\n\t\t$this->captura('nro_sol_pago','varchar');\n\t\t$this->captura('tipo_cambio','numeric');\n\t\t$this->captura('fecha_pag','date');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('fecha_dev','date');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('tipo_pago','varchar');\n\t\t$this->captura('monto_ejecutar_total_mo','numeric');\n\t\t$this->captura('descuento_anticipo_mb','numeric');\n\t\t$this->captura('obs_descuentos_anticipo','text');\n\t\t$this->captura('id_plan_pago_fk','int4');\n\t\t$this->captura('id_obligacion_pago','int4');\n\t\t$this->captura('id_plantilla','int4');\n\t\t$this->captura('descuento_anticipo','numeric');\n\t\t$this->captura('otros_descuentos','numeric');\n\t\t$this->captura('tipo','varchar');\n\t\t$this->captura('obs_monto_no_pagado','text');\n\t\t$this->captura('obs_otros_descuentos','text');\n\t\t$this->captura('monto','numeric');\n\t\t$this->captura('id_comprobante','int4');\n\t\t$this->captura('nombre_pago','varchar');\n\t\t$this->captura('monto_no_pagado_mb','numeric');\n\t\t$this->captura('monto_mb','numeric');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('id_cuenta_bancaria','int4');\n\t\t$this->captura('otros_descuentos_mb','numeric');\n\t\t$this->captura('forma_pago','varchar');\n\t\t$this->captura('monto_no_pagado','numeric');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('fecha_tentativa','date');\n\t\t$this->captura('desc_plantilla','varchar');\n\t\t$this->captura('liquido_pagable','numeric');\n\t\t$this->captura('total_prorrateado','numeric');\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": "7afa9ed96892a5febdd49c7bc1b29972", "score": "0.5281162", "text": "public function Permisos(){\n\n if( $proyectos = $this->getPermisos() ){\n// echo '<pre>'; print_r($proyectos); echo '</pre>';\n\n foreach($proyectos as $index => $proyecto ){\n\n //datos para la notificacion\n\t /**\n\t * ||dato|| para datos que no remplazan\n\t * {{dato}} para dato que sera remplazado\n\t */\n\t $remplazar = array(\n\t \"||proyecto||\" => $proyecto['proyecto'],\n\t \"||cliente||\" => $proyecto['cliente'],\n \"{{title}}\" => $proyecto['proyecto_nombre'],\n \"{{cliente_nombre}}\" => $proyecto['cliente_nombre'],\n \"{{cliente_imagen}}\" => $this->admin.$proyecto['cliente_imagen'],\n\t \"{{menssage}}\" => \"El proyecto \".$proyecto['proyecto_nombre'],\n\t \"{{permisos}}\" => \"\",\n\t \"{{bcc}}\" => array(\n\t\t array(\n\t\t\t \"email\" => \"[email protected]\",\n\t\t\t \"name\" => \"Paola Quesada\"\n\t\t ),\n\t\t array(\n\t\t\t \"email\"=> \"[email protected]\",\n\t\t\t \"name\" => \"Maria Fernada Esquivel\"\n\t\t )\n\t ),\n );\n\n\t //notificaciones de expirados\n\t\t\t\tforeach( $proyecto['expirados'] as $f => $expirado ){\n\t\t\t\t\t$remplazar_expirados = $remplazar;\n\n\t\t\t\t\tif( $mensaje = $this->ComponerPermiso($expirado, \"expirado\") ){\n\t\t\t\t\t\t$remplazar_expirados[\"{{permisos}}\"] = $mensaje;\n\n\t\t\t\t\t\t$to = array();\n\t\t\t\t\t\tforeach( $expirado['emails'] as $fila => $email ){\n\t\t\t\t\t\t\t$to[] = $email['email'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$remplazar_expirados[\"{{to}}\"] = $to;\n\n\t\t\t\t\t\t$remplazar_expirados[\"{{menssage}}\"] .= \" tiene el siguiente permiso expirado.\";\n\t\t\t\t\t\t$remplazar_expirados[\"{{subject}}\"] = \"Permiso Expirado: \".$expirado['nombre'];\n\n\t\t\t\t\t\t$this->Notificar($remplazar_expirados, \"permisos\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t //notificaciones de recordatorios\n\t foreach( $proyecto[\"recordatorios\"] as $f => $recordatorio ){\n\t\t\t\t\t$remplazar_recordatorios = $remplazar;\n\n\t\t if( $mensaje = $this->ComponerPermiso($recordatorio, \"recordatorio\") ){\n\t\t\t\t\t\t$remplazar_recordatorios[\"{{permisos}}\"] = $mensaje;\n\n\t\t\t $to = array();\n\t\t\t foreach( $recordatorio['emails'] as $fila => $email ){\n\t\t\t\t $to[] = $email['email'];\n\t\t\t }\n\t\t\t $remplazar_recordatorios[\"{{to}}\"] = $to;\n\n\t\t\t $remplazar_recordatorios[\"{{menssage}}\"] .= \" tiene el siguiente recordatorio sobre un permiso.\";\n\t\t\t $remplazar_recordatorios[\"{{subject}}\"] = \"Recordatorio para: \".$recordatorio['nombre'];\n\n\t\t\t $this->Notificar($remplazar_recordatorios, \"permisos\");\n\t\t }\n\t }\n\n }\n\n return true;\n }else{\n\t echo 'error';\n }\n\n return false;\n }", "title": "" }, { "docid": "08e047a8f053e39d365d551728ac0671", "score": "0.52807224", "text": "function mostraPagina()\n\t\t{\n\t\t// costruiamo la tabella\n\t\t$tabella = $this->creaTabella();\n\t\t\t\n\t\t// prepara la pagina, ossia il contenitore della tabella\n\t\t$this->aggiungiElemento($this->dammiMenu());\n\t\t$this->aggiungiElemento(\"Tabella organismi\", \"titolo\");\n\t\t$this->aggiungiElemento($tabella);\n\t\t\n\t\t// manda in output l'intera pagina\n\t\t$this->mostra();\n\t\t}", "title": "" }, { "docid": "7374c8d4c668b49d992a1726dba68743", "score": "0.5280199", "text": "public function prepara()\n\t{\n\n\t\t// pega codigo do comando LF\n\t\t$lf = \"\\n\";\n\n\t\t// conta linhas de cabecalho e Rodape\n\t\tif (empty($this->_conteudoSecao[\"cabecalho\"]))\n\t\t{\n\t\t\t$linhasCabecalho = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// se ultimo caracter do cabecalho nao for quebra de linha, adiciona\n\t\t\tif (substr($this->_conteudoSecao[\"cabecalho\"], -1) <> $lf)\n\t\t\t\t$this->_conteudoSecao[\"cabecalho\"] .= $lf;\n\t\t\t$linhasCabecalho = substr_count($this->_conteudoSecao[\"cabecalho\"], $lf);\n\t\t}\n\n\t\tif (empty($this->_conteudoSecao[\"rodape\"]))\n\t\t{\n\t\t\t$linhasRodape = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//remove quebra de linha se houver no final do rodape\n\t\t\t$this->_conteudoSecao[\"rodape\"] = trim($this->_conteudoSecao[\"rodape\"], $lf);\n\t\t\t$linhasRodape = substr_count($this->_conteudoSecao[\"rodape\"], $lf);\n\t\t\t$linhasRodape++;\n\t\t}\n\n\t\t$textoLinhas = explode($lf, $this->_conteudoSecao[\"documento\"]);\n\n\t\t$linha = 1;\n\t\t$textoFinal = \"\";\n\t\t$linhasDocumento = $this->_linhas - $linhasCabecalho - $linhasRodape;\n\t\tforeach ($textoLinhas as $textoLinha)\n\t\t{\n\t\t\t//adiciona cabecalho na primeira linha\n\t\t\tif ($linha == 1)\n\t\t\t\t$textoFinal .= $this->_conteudoSecao[\"cabecalho\"];\n\n\t\t\t// concatena linha\n\t\t\t$textoFinal .= $textoLinha . $lf;\n\t\t\t$linha++;\n\n\t\t\t// se estourou adiciona rodape\n\t\t\tif ($linha >= $linhasDocumento)\n\t\t\t{\n\t\t\t\t$textoFinal .= $this->_conteudoSecao[\"rodape\"];\n\t\t\t\t$textoFinal .= \"<FF>\";\n\t\t\t\t$linha = 1;\n\t\t\t}\n\t\t}\n\n\t\tfor ($linha = $linha - 1; $linha < $linhasDocumento; $linha++)\n\t\t\t$textoFinal .= $lf;\n\n\t\t//adiciona rodape ultima pagina\n\t\t$textoFinal .= $this->_conteudoSecao[\"rodape\"];\n\t\t$textoFinal .= \"<FF>\";\n\n\t\t$this->_textoFinal = $textoFinal;\n\t}", "title": "" }, { "docid": "a3b52d92c5d0cdc24aa0dceea1392971", "score": "0.5267261", "text": "public function getPostruns();", "title": "" }, { "docid": "15be3457cdb15d4db6a2d90e66a41b5e", "score": "0.52664137", "text": "function gerarComponentesCurricularesPendentes() {\n\n $matricula=$this->numeroMatriculaAluno;\n $con = BD::conectar();\n // OBTEM TODOS OS COMPONENTES CURRICULARES DA MATRIZ CURRICULAR DA MATRICULA DO ALUNO\n $query=sprintf(''\n . ' SELECT'\n . ' CC.`siglaCurso`, CC.`idMatriz`, CC.`siglaDisciplina`'\n . ' FROM'\n . ' `ComponenteCurricular` CC, `MatriculaAluno` MA'\n . ' WHERE'\n . ' CC.`siglaCurso` = MA.`siglaCurso`'\n . ' and CC.`idMatriz` = MA.`idMatriz`'\n . \" and MA.`matriculaAluno` = '%s'\"\n . ' ORDER BY CC.`periodo`, CC.`siglaDisciplina`',\n mysql_real_escape_string($matricula));\n \n $result=mysql_query($query,$con);\n\n $this->SetY($this->GetY()+7);\n //Desce um pouco o cursor\n\n $tamanGomoN1 = 20;\n $tamanGomoN3 = 15;\n $tamanGomoN4 = 15;\n $tamanGomoN5 = 15;\n $tamanGomoN6 = 15;\n $tamanGomoN2 = $this->larguraMaxima - ($tamanGomoN1 + $tamanGomoN3 + $tamanGomoN4\n + $tamanGomoN5 + $tamanGomoN6 );\n\n $fonteMedia = 9;\n $espacamentoHorizontalMedio = 2.5;\n $fonteGrande = 9;\n $espacamentoHorizontalGrande = 4;\n\n $this->SetFont('Arial','B',$fonteGrande);\n\n //Cabeçalho, Linha 1, Nome da tabela\n $txt='DISCIPLINAS PENDENTES';\n $this->SetFillColor(210);\n $this->Cell($this->larguraMaxima, $espacamentoHorizontalGrande, $txt, 1, 1, 'C', 1);\n //Cabeçalho, Linha 2, Colunas\n $this->SetFillColor(255);\n $txt='Período';\n $this->Cell($tamanGomoN1, $espacamentoHorizontalGrande, $txt, 1, 0, 'C');\n $txt='Disciplina';\n $this->Cell($tamanGomoN2, $espacamentoHorizontalGrande, $txt, 1, 0, 'C');\n $txt='CRED';\n $this->Cell($tamanGomoN3, $espacamentoHorizontalGrande, $txt, 1, 0, 'C');\n $txt='CH';\n $this->Cell($tamanGomoN4, $espacamentoHorizontalGrande, $txt, 1, 0, 'C');\n $txt='TIPO';\n $this->Cell($tamanGomoN5 + $tamanGomoN6, $espacamentoHorizontalGrande, $txt, 1, 1, 'C');\n\n $this->SetFont('Arial','',$fonteMedia);\n while($row = mysql_fetch_array($result,MYSQL_ASSOC)) {\n $siglaCurso = $row['siglaCurso'];\n $idMatriz = $row['idMatriz'];\n $siglaDisciplina = $row['siglaDisciplina'];\n $componenteCur = ComponenteCurricular::obterComponenteCurricular($siglaCurso, $idMatriz, $siglaDisciplina);\n \n //Se não há quitação, entao este componente curricular esta na lista de Componentes Pendentes\n if($componenteCur->obterQuitacao($this->matriculaAluno) == null){\n //$periodoLetivo = Periodoletivo::obterPeriodoLetivo($componenteCur->getPeriodo()) ;\n $txt = $componenteCur->getPeriodo().'º';//$periodoLetivo->getSiglaPeriodoLetivo();\n $this->Cell($tamanGomoN1, $espacamentoHorizontalGrande, $txt, 1, 0, 'C');\n $txt=$componenteCur->getSiglaDisciplina().' - '.$componenteCur->getNomeDisciplina();\n $this->Cell($tamanGomoN2, $espacamentoHorizontalGrande, $txt, 1, 0, 'L');\n $txt=$componenteCur->getCreditos();\n $this->Cell($tamanGomoN3, $espacamentoHorizontalGrande, $txt, 1, 0, 'C');\n $txt=$componenteCur->getCargaHoraria();\n $this->Cell($tamanGomoN4, $espacamentoHorizontalGrande, $txt, 1, 0, 'C');\n $txt=$componenteCur->getTipoComponenteCurricular();\n $this->Cell($tamanGomoN5 + $tamanGomoN6, $espacamentoHorizontalGrande, $txt, 1, 1, 'C');\n\t\t\t\t\n if($this->GetY() > $this->alturaDaQuebraDePagina){\n $this->addPage();\n }\n }\n }\n }", "title": "" }, { "docid": "aff0a54e8835b6559de05753911106e2", "score": "0.52648807", "text": "function preparaLinhas($nomeTemporario)\r\n{\r\n\t$linhas = file($nomeTemporario);\r\n\t\t//faz um loop enquanto tiver linhas\r\n\t\tfor ($x=0; $x < count($linhas); $x++){\r\n\t\t\t//verirfica se a linhas está formatada regularmente\r\n\t\t\t//echo $qtd.'<br>';\r\n\t\t\tif (verificaLinha($linhas[$x], 22)) {\r\n\t\t\t\t//separa os dados das linhas\r\n\t\t\t\t$dados = explode(';',$linhas[$x]);\r\n\t\t\t\t//aramazena valores na var\r\n\t\t\t\t$matrizDados[] = $dados;\r\n\t\t\t}\t\r\n\t\t}\r\n\treturn $matrizDados;\r\n}", "title": "" }, { "docid": "3a63241e16d52cad64b3ef53b047e7b0", "score": "0.5256812", "text": "function CalcularEquipos($jugadores) {\n $media = 0;\n usort($jugadores, function($a, $b) {\n return strcmp($a->puntuacion, $b->puntuacion);\n });\n\n $jugadoresORD = $this->MezclarArrayPorPuntos($jugadores);\n// echo \"<pre> SIN ORDERNAR POR MAYOR:\";\n// var_dump($jugadoresORD);\n// echo \"</pre>\";\n $jugadoresORD = array_reverse($jugadoresORD);\n// echo \"<pre> ORDENADOS POR MAYOR\";\n// var_dump($jugadoresORD);\n// echo \"</pre>\";\n\n /* aleatoriamente invertiremos las posiciones de los jugadores que tengan la misma puntuación */\n// if ($alt == 1) {\n// for ($i = 0; $i < count($jugadoresORD); $i++) {\n// if ($i != count($jugadoresORD) - 1) {\n// if ($jugadoresORD[$i]->puntuacion == $jugadoresORD[$i + 1]->puntuacion) {\n// $tmp = $jugadoresORD[$i];\n// $jugadoresORD[$i] = $jugadoresORD[$i + 1];\n// $jugadoresORD[$i + 1] = $tmp;\n// }\n// }\n// }\n// }\n\n\n foreach ($jugadoresORD as $jugador) {\n $media += $jugador->puntuacion;\n }\n\n $media = ($media / 2);\n\n// echo \"Media Total : \".$media;\n// echo \"<br>\";\n $equipos = $this->algoritmoNivel($media, $jugadoresORD);\n\n return $equipos;\n }", "title": "" }, { "docid": "a9fdd1a7cab22085ed5baf878eaaf4c4", "score": "0.52554107", "text": "public function crear_barra_progreso()\n {\n }", "title": "" }, { "docid": "7b3c1d3bf3a606f470325091da326818", "score": "0.5248711", "text": "function Procedure() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n $w_chave = $_REQUEST['w_chave'];\r\n $p_sq_arquivo = $_REQUEST['p_sq_arquivo'];\r\n $p_sq_sistema = $_REQUEST['p_sq_sistema'];\r\n $p_sq_sp_tipo = $_REQUEST['p_sq_sp_tipo'];\r\n $p_nome = upper($_REQUEST['p_nome']);\r\n if ($w_troca>'') {\r\n // Se for recarga da página\r\n $w_sq_arquivo = $_REQUEST['w_sq_arquivo'];\r\n $w_sq_sistema = $_REQUEST['w_sq_sistema'];\r\n $w_sq_sp_tipo = $_REQUEST['w_sq_sp_tipo'];\r\n $w_nome = $_REQUEST['w_nome'];\r\n $w_descricao = $_REQUEST['w_descricao'];\r\n } elseif ($O=='L') {\r\n // Recupera todos os registros para a listagem\r\n $sql = new db_getProcedure; $RS = $sql->getInstanceOf($dbms,$w_cliente,null,$p_sq_arquivo,$p_sq_sistema,$p_sq_sp_tipo,$p_nome);\r\n SortArray($RS,'nm_procedure','asc');\r\n } elseif (!(strpos('AEV',$O)===false) && $w_troca=='') {\r\n // Recupera os dados do Endereço informado\r\n $sql = new db_getProcedure; $RS = $sql->getInstanceOf($dbms,$w_cliente,$w_chave,null,null,null,null);\r\n foreach($RS as $row) {\r\n $w_sq_arquivo = f($row,'sq_arquivo');\r\n $w_sq_sistema = f($row,'sq_sistema');\r\n $w_sq_sp_tipo = f($row,'sq_sp_tipo');\r\n $w_nome = f($row,'nm_procedure');\r\n $w_descricao = f($row,'ds_procedure');\r\n break;\r\n }\r\n } \r\n Cabecalho();\r\n head();\r\n if (!(strpos('IAEP',$O)===false)) {\r\n ScriptOpen('JavaScript');\r\n ValidateOpen('Validacao');\r\n if (!(strpos('IA',$O)===false)) {\r\n Validate('w_sq_sistema','Sistema','SELECT','1','1','18','1','1');\r\n Validate('w_sq_arquivo','Arquivo','SELECT','1','1','18','1','1');\r\n Validate('w_sq_sp_tipo','Tipo SP','SELECT','1','1','18','1','1');\r\n Validate('w_nome','Nome Procedure','1','1','2','30','1','1');\r\n Validate('w_descricao','Descrição','1','1','5','4000','1','1');\r\n Validate('w_assinatura',$_SESSION['LABEL_ALERTA'],'1','1','3','30','1','1');\r\n } elseif ($O=='E') {\r\n Validate('w_assinatura',$_SESSION['LABEL_ALERTA'],'1','1','3','30','1','1');\r\n ShowHTML(' if (confirm(\\'Confirma a exclusão deste registro?\\')) ');\r\n ShowHTML(' { return (true); }; ');\r\n ShowHTML(' { return (false); }; ');\r\n } elseif ($O=='P') {\r\n Validate('p_nome','Nome','1','','3','15','1','1');\r\n ShowHTML(' if (theForm.p_nome.value==\\'\\' && theForm.p_sq_sistema.selectedIndex==0 && theForm.p_sq_arquivo.selectedIndex==0 && theForm.p_sq_sp_tipo.selectedIndex==0) {');\r\n ShowHTML(' alert(\\'Você deve escolher pelo menos um critério de filtragem!\\');');\r\n ShowHTML(' return false;');\r\n ShowHTML(' }');\r\n Validate('P4','Linhas por página','1','1','1','4','','0123456789');\r\n } \r\n ShowHTML(' theForm.Botao[0].disabled=true;');\r\n ShowHTML(' theForm.Botao[1].disabled=true;');\r\n if ($O=='P') ShowHTML(' theForm.Botao[2].disabled=true;');\r\n ValidateClose();\r\n ScriptClose();\r\n } \r\n ShowHTML('</HEAD>');\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n if ($w_troca>'') {\r\n BodyOpen('onLoad=\\'document.Form.'.$w_troca.'.focus()\\';');\r\n } elseif (!(strpos('IA',$O)===false)) {\r\n BodyOpen('onLoad=\\'document.Form.w_sq_sistema.focus()\\';');\r\n } elseif ($O=='E') {\r\n BodyOpen('onLoad=\\'document.Form.w_assinatura.focus()\\';');\r\n } else {\r\n BodyOpen('onLoad=\\'this.focus()\\';');\r\n } \r\n ShowHTML('<B><FONT COLOR=\"#000000\">'.$w_TP.'</FONT></B>');\r\n ShowHTML('<HR>');\r\n ShowHTML('<div align=center><center>');\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n if ($O=='L') {\r\n // Exibe a quantidade de registros apresentados na listagem e o cabeçalho da tabela de listagem\r\n ShowHTML('<tr><td>');\r\n if ($P1==0)ShowHTML('<a accesskey=\"I\" class=\"SS\" href=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=I&w_chave='.$w_chave.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\"><u>I</u>ncluir</a>&nbsp;');\r\n if ($p_nome.$p_sq_sistema.$p_sq_arquivo.$p_sq_sp_tipo>'') ShowHTML('<a accesskey=\"F\" class=\"SS\" href=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=P&P1='.$P1.'&P2='.$P2.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\"><u><font color=\"#BC5100\">F</u>iltrar (Ativo)</font></a></font>');\r\n else ShowHTML('<a accesskey=\"F\" class=\"SS\" href=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=P&P1='.$P1.'&P2='.$P2.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\"><u>F</u>iltrar (Inativo)</a>');\r\n ShowHTML(' <td align=\"right\">'.exportaOffice().'<b>Registros: '.count($RS));\r\n ShowHTML('<tr><td align=\"center\" colspan=3>');\r\n ShowHTML(' <TABLE class=\"tudo\" WIDTH=\"100%\" bgcolor=\"'.$conTableBgColor.'\" BORDER=\"'.$conTableBorder.'\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\">');\r\n ShowHTML(' <td><b>Sistema</b></td>');\r\n ShowHTML(' <td><b>Arquivo</b></td>');\r\n ShowHTML(' <td><b>Tipo SP</b></td>');\r\n ShowHTML(' <td><b>Nome Procedure</b></td>');\r\n ShowHTML(' <td><b>Descrição</b></td>');\r\n ShowHTML(' <td class=\"remover\"><b>Operações</b></td>');\r\n ShowHTML(' </tr>');\r\n if (count($RS)<=0) {\r\n // Se não foram selecionados registros, exibe mensagem\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=6 align=\"center\"><b>Não foram encontrados registros.</b></td></tr>');\r\n } else {\r\n // Lista os registros selecionados para listagem\r\n $RS1 = array_slice($RS, (($P3-1)*$P4), $P4);\r\n foreach ($RS1 as $row){\r\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\r\n ShowHTML(' <td>'.f($row,'sg_sistema').'</td>');\r\n ShowHTML(' <td><A class=\"HL\" HREF=\"'.$w_dir.'dc_consulta.php?par=ARQUIVO&R='.$w_pagina.$par.'&O=NIVEL2&w_chave='.f($row,'sq_sistema').'&w_sq_arquivo='.f($row,'chave').'&P1='.$P1.'&P2='.$P2.'&P3=1&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\" Title=\"Nome\" target=\"'.f($row,'nm_arquivo').'\">'.lower(f($row,'nm_arquivo')).'</A>&nbsp');\r\n ShowHTML(' <td>'.f($row,'nm_sp_tipo').'</td>');\r\n ShowHTML(' <td><A class=\"HL\" HREF=\"'.$w_dir.'dc_consulta.php?par=PROCEDURE&R='.$w_pagina.$par.'&O=NIVEL2&w_chave='.f($row,'sq_sistema').'&w_sq_procedure='.f($row,'chave').'&P1='.$P1.'&P2='.$P2.'&P3=1&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\" Title=\"Nome\" target=\"'.f($row,'nm_procedure').'\">'.lower(f($row,'nm_procedure')).'</A>&nbsp');\r\n ShowHTML(' <td>'.f($row,'ds_procedure').'</td>');\r\n ShowHTML(' <td class=\"remover\" align=\"top\" nowrap>');\r\n if ($P1==0) {\r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=A&w_chave='.f($row,'chave').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\">AL</A>&nbsp');\r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=E&w_chave='.f($row,'chave').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET').'\">EX</A>&nbsp');\r\n } \r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.'ProcTab&R='.$w_pagina.$par.'&O=L&w_chave='.f($row,'chave').'&P1='.$P1.'&P2='.$P2.'&P3=1&P4='.$P4.'&TP='.$TP.' - Tabelas&SG='.$SG.MontaFiltro('GET').'\" Target=\"_blank\" Title=\"Definir ligação com tabelas\">Tab</A>&nbsp');\r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.'ProcSP&R='.$w_pagina.$par.'&O=L&w_chave='.f($row,'chave').'&P1='.$P1.'&P2='.$P2.'&P3=1&P4='.$P4.'&TP='.$TP.' - SP&SG='.$SG.MontaFiltro('GET').'\" Target=\"_blank\" Title=\"Definir ligação com SP\">SP</A>&nbsp');\r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.'ProcParam&R='.$w_pagina.$par.'&O=L&w_chave='.f($row,'chave').'&P1='.$P1.'&P2='.$P2.'&P3=1&P4='.$P4.'&TP='.$TP.' - Parâmetros&SG='.$SG.MontaFiltro('GET').'\" Target=\"_blank\" Title=\"Manipular os parâmetros desta Procedure\">Par</A>&nbsp');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n } \r\n }\r\n ShowHTML(' </center>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </td>');\r\n ShowHTML('<tr><td align=\"center\" colspan=3>');\r\n if ($R>'') { \r\n MontaBarra($w_dir.$w_pagina.$par.'&R='.$R.'&O='.$O.'&P1='.$P1.'&P2='.$P2.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET'),ceil(count($RS)/$P4),$P3,$P4,count($RS));\r\n } else {\r\n MontaBarra($w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O='.$O.'&P1='.$P1.'&P2='.$P2.'&TP='.$TP.'&SG='.$SG.MontaFiltro('GET'),ceil(count($RS)/$P4),$P3,$P4,count($RS));\r\n }\r\n ShowHTML('</tr>');\r\n //Aqui começa a manipulação de registros \r\n } elseif (!(strpos('IAEV',$O)===false)) {\r\n if (!(strpos('EV',$O)===false)) $w_Disabled=' DISABLED ';\r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST','return(Validacao(this));',null,$P1,$P2,$P3,$P4,$TP,$SG,$w_pagina.$par,$O);\r\n ShowHTML(MontaFiltro('POST'));\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td align=\"center\">');\r\n ShowHTML(' <table width=\"97%\" border=\"0\">');\r\n ShowHTML(' <tr>');\r\n SelecaoSistema('<u>S</u>istema:','S',null,$w_sq_sistema,$w_cliente,'w_sq_sistema',null,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'w_sq_arquivo\\'; document.Form.submit();\"');\r\n SelecaoArquivo('<u>A</u>rquivo:','A',null,$w_cliente,$w_sq_arquivo,$w_sq_sistema,'w_sq_arquivo',null,null);\r\n SelecaoTipoSP('<u>T</u>ipo SP:','T',null,$w_sq_sp_tipo,null,'w_sq_sp_tipo',null,null);\r\n ShowHTML(' <tr><td valign=\"top\"><b><u>N</u>ome:</b><br><input '.$w_Disabled.' accesskey=\"N\" type=\"text\" name=\"w_nome\" class=\"sti\" SIZE=\"30\" MAXLENGTH=\"30\" VALUE=\"'.$w_nome.'\"></td>');\r\n ShowHTML(' <tr><td valign=\"top\" colspan=2><b><u>D</u>escrição:</b><br><textarea '.$w_Disabled.' accesskey=\"D\" name=\"w_descricao\" class=\"sti\" ROWS=5 COLS=75>'.$w_descricao.'</TEXTAREA></td>');\r\n ShowHTML(' <tr><td align=\"LEFT\" colspan=2><b>'.$_SESSION['LABEL_CAMPO'].':<BR> <INPUT ACCESSKEY=\"A\" class=\"sti\" type=\"PASSWORD\" name=\"w_assinatura\" size=\"30\" maxlength=\"30\" value=\"\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=2><hr>');\r\n if ($O=='E') {\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Excluir\">');\r\n } else {\r\n if ($O=='I') ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Incluir\">');\r\n else ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Atualizar\">');\r\n } \r\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$w_pagina.$par.'&w_chave='.$w_chave.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'&O=L'.MontaFiltro('GET')).'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } elseif (!(strpos('P',$O)===false)) {\r\n // filtragem de fluxo de dados\r\n AbreForm('Form',$w_dir.$w_pagina.$par,'POST','return(Validacao(this));',null,$P1,$P2,$P3,null,$TP,$SG,$R,'L');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td><div align=\"justIfy\"><font size=2>Informe nos campos abaixo os valores que deseja filtrar e clique sobre o botão <i>Aplicar filtro</i>. Clicando sobre o botão <i>Remover filtro</i>, o filtro existente será apagado.</div><hr>');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td align=\"center\">');\r\n ShowHTML(' <table width=\"70%\" border=\"0\">');\r\n ShowHTML(' <tr>');\r\n SelecaoSistema('<u>S</u>istema:','S',null,$p_sq_sistema,$w_cliente,'p_sq_sistema',null,'onChange=\"document.Form.action=\\''.$w_dir.$w_pagina.$par.'\\'; document.Form.O.value=\\''.$O.'\\'; document.Form.w_troca.value=\\'p_sq_arquivo\\'; document.Form.submit();\"');\r\n SelecaoArquivo('<u>A</u>rquivo:','A',null,$w_cliente,$p_sq_arquivo,Nvl($p_sq_sistema,0),'p_sq_arquivo',null,null);\r\n SelecaoTipoSP('<u>T</u>ipo SP:','T',null,$p_sq_sp_tipo,null,'p_sq_sp_tipo',null,null);\r\n ShowHTML(' <tr><td valign=\"top\"><b><u>N</u>ome:</b><br><input '.$w_disabled.' accesskey=\"N\" type=\"text\" name=\"p_nome\" class=\"sti\" SIZE=\"30\" MAXLENGTH=\"30\" VALUE=\"'.$p_nome.'\"></td>');\r\n ShowHTML(' <tr><td valign=\"top\"><b><U>L</U>inhas por página:<br><INPUT ACCESSKEY=\"L\" '.$w_Disabled.' class=\"sti\" type=\"text\" name=\"P4\" size=\"4\" maxlength=\"4\" value=\"'.$P4.'\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\" height=\"1\" bgcolor=\"#000000\">');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Aplicar filtro\">');\r\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$w_pagina.$par.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&O=I&SG='.$SG).'\\';\" name=\"Botao\" value=\"Incluir\">');\r\n ShowHTML(' <input class=\"STB\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$w_pagina.$par.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&O=P&SG='.$SG).'\\';\" name=\"Botao\" value=\"Limpar campos\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n //ShowHTML ' history.back(1);'\r\n ScriptClose();\r\n } \r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Rodape();\r\n}", "title": "" }, { "docid": "89a3562a550a116737e818aa9122163c", "score": "0.5247627", "text": "function balise_APROPOS_dist($p) {\n\t//recupere un eventuel argument \n\t$premier = interprete_argument_balise(1, $p);\n\t//s'il y en a 1, on traite la chose\n\tif ($premier != ''){\n\t$p->code = 'calcul_info_apropos(' . $premier . ')';\n\t}else{\n\t//si pas d\\'argument, on affiche la liste des plugins\n\t$p->code = 'calcul_info_apropos(\"listes\")';\n\t}\n\t$p->interdire_scripts = false;\n\treturn $p;\n}", "title": "" }, { "docid": "64a308534bdcd655da02cf1bf17d7b69", "score": "0.52464986", "text": "function puissance_plapla($id_planete, $pseudo) {\r\n\r\n\t@include(\"include/units.php\");\r\n\t@include(\"../include/units.php\");\r\n\t\r\n\t$reponse2 = mysql_query(\"SELECT race FROM sg_perso WHERE pseudo='$pseudo'\");\r\n\t$donnees2 = mysql_fetch_array($reponse2);\r\n\t$race = $donnees2['race'];\r\n\t\r\n\t\t//print_rr (${'vaisseaux_'.$race});\r\n\t\t//print_rr(${'liste_'.$race});\r\n\t\t$count = ${'liste_'.$race};\r\n\t\t\r\n\t\t\r\n\t\t$nb_spatial = count($count);\r\n\t\t\r\n\t\t$nb_terrestre = count(${'liste_terrestre_'.$race});\t\r\n\t\t\r\n\t\tfor ($i=0; $i<$nb_spatial; $i++) {\r\n\t\t\t$vaisseau_type = (${'liste_'.$race}[$i]);\r\n\t\t\t$puissance_unique_vaisseau_terrestre[] = ${'vaisseaux_'.$race}[$vaisseau_type][\"Puissance\"];\t\r\n\t\t\t$vaisseau_nombre_terrestre[$i] = \"0\";\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\tfor ($i=0; $i <$nb_terrestre; $i++) {\r\n\t\t\t$terrestre_type = (${'liste_terrestre_'.$race}[$i]);\r\n\t\t\t$puissance_unique_terrestre_terrestre[] = ${'terrestre_'.$race}[$terrestre_type][\"Puissance\"];\r\n\t\t\t$terrestre_nombre_terrestre[$i] = \"0\";\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t$reponse_sg_terrestre_units = mysql_query(\"SELECT * FROM sg_planete_units WHERE id_planete='$id_planete'\");\t\r\n\twhile($donnees_sg_terrestre_units = mysql_fetch_array($reponse_sg_terrestre_units)) {\r\n\t\t\tif ($donnees_sg_terrestre_units['unit'] == 'spatial') {\r\n\t\t\t\t$type_spatial_terrestre = $donnees_sg_terrestre_units['type'];\r\n\t\t\t\t$vaisseau_nombre_terrestre[$type_spatial_terrestre] = $donnees_sg_terrestre_units['nombre'];\r\n\t\t\t} else {\r\n\t\t\t\t$type_terrestre_terrestre = $donnees_sg_terrestre_units['type'];\r\n\t\t\t\t$terrestre_nombre_terrestre[$type_terrestre_terrestre] = $donnees_sg_terrestre_units['nombre'];\r\n\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t}\r\n\t$count1 = count($vaisseau_nombre_terrestre);\r\n\t$count2 = count($terrestre_nombre_terrestre);\r\n\t\r\n\t//print_rr($puissance_unique_terrestre);\r\n\t//print_rr ($vaisseau_nombre_terrestre);\r\n\t//print_rr ($terrestre_nombre_terrestre);\r\n\t\r\n\t$puissance_terrestre = \"0\";\r\n\tfor ($i=0; $i<$count1; $i++) {\r\n\t\t@$puissance_terrestre = $puissance_terrestre + $vaisseau_nombre_terrestre[$i] * $puissance_unique_vaisseau_terrestre[$i];\r\n\t}\r\n\tfor ($i=0; $i<$count2; $i++) {\r\n\t\t@$puissance_terrestre = $puissance_terrestre + $terrestre_nombre_terrestre[$i] * $puissance_unique_terrestre_terrestre[$i];\r\n\t}\r\n\treturn number_format($puissance_terrestre, 0, ',', ' ');\r\n\r\n}", "title": "" }, { "docid": "89aebec79625884701f501e7edb5e8ba", "score": "0.5233487", "text": "public function esSabadoNoche();", "title": "" }, { "docid": "9049a211a360025d19e2a3c20051fa59", "score": "0.5233054", "text": "public function getP() {\n\t\t//\n\t}", "title": "" }, { "docid": "cca77bd661a79ce2f60946a7de765204", "score": "0.5230482", "text": "function valor_maximo_minimo(){\r\n $maximo = max(getPromedios());\r\n $minimo = min(getPromedios());\r\n return array($maximo,$minimo);\r\n }", "title": "" }, { "docid": "dcae88d0b266e9df226dbe36ba05126f", "score": "0.52291155", "text": "function affProgrammation()\n\t{\n\t\tglobal $bdd;\n\n\t\t$reponse = $bdd->query('SELECT * FROM youbiweb_prog_structure ORDER BY nom DESC');\n\t\t$donnees = $reponse->fetch();\n\t\t$nomFin = $donnees['nom'];\n\n\t\t$reponse = $bdd->query('SELECT * FROM youbiweb_prog_structure ORDER BY nom ASC');\n\n\t\tfor ($i = 1;$donnees = $reponse->fetch();$i++)\n\t\t\techo ' <li><a title=\"'.$donnees['nom'].'\" href=\"javascript:{ affChg(\\'content\\'); affPage(\\'prog.php?langId='.$donnees['langId'].'\\'); }\">'.$donnees['nom'].'</a></li>'.\"\\n\";\n\t}", "title": "" }, { "docid": "4530ace283bbca449f9472ee6972781e", "score": "0.52232224", "text": "function ordPuntosDesc() {\n $deporte=new deportes_model();\n\n //Uso metodo del modelo de deportes\n $datos=$deporte->ordPuntosDesc();\n\n //Llamado a la vista: mostrar la pantalla\n require_once(\"views/deportes_view.phtml\");\n }", "title": "" }, { "docid": "89a2cb25d2aa8c77eb5dc93733ff3e0d", "score": "0.5221074", "text": "function mostraPagina()\n\t\t{\n\t\t// costruiamo la tabella\n\t\t$tabella = $this->creaTabella();\n\t\t\t\n\t\t// prepara la pagina, ossia il contenitore della tabella\n\t\t$this->aggiungiElemento($this->dammiMenu());\n\t\t$this->aggiungiElemento(\"Tabella corsi\", \"titolo\");\n\t\t$this->aggiungiElemento($tabella);\n\t\t\n\t\t// manda in output l'intera pagina\n\t\t$this->mostra();\n\t\t}", "title": "" }, { "docid": "4e2306b81e4af833656f83e86448a80e", "score": "0.5220607", "text": "public function list_programas_poa($aper_id,$tp_id){\n $programa=$this->model_ptto_sigep->apertura_id($aper_id);\n\n $tabla ='';\n $proyectos=$this->model_ptto_sigep->acciones_operativas($programa[0]['aper_programa'],$tp_id);\n $nro=0;\n foreach($proyectos as $row){\n $nro++;\n $fase = $this->model_faseetapa->get_id_fase($row['proy_id']);\n $fase_gest = $this->model_faseetapa->fase_etapa_gestion($fase[0]['id'],$this->session->userdata(\"gestion\"));\n $aper=$this->model_ptto_sigep->partidas_proyecto($row['aper_id']);\n $tabla .= '<tr height=\"70\">';\n $tabla .= '<td align=center><img id=\"load'.$row['proy_id'].'\" style=\"display: none\" src=\"'.base_url().'/assets/img/loading.gif\" width=\"30\" height=\"30\" title=\"CARGANDO UE\"></td>';\n $tabla .= '<td align=center><a href=\"'.site_url(\"\").'/rep/accion/'.$aper_id.'/'.$row['proy_id'].'\" id=\"myBtn'.$row['proy_id'].'\"><img src=\"' . base_url() . 'assets/img/folder3.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>';\n $tabla .='<td align=center><a href=\"javascript:abreVentana(\\''.site_url(\"\").'/rep/rep_accion/'.$aper_id.'/'.$row['proy_id'].'\\');\" title=\"REPORTE CUADRO COMPARATIVO POR PARTIDAS\"><img src=\"' . base_url() . 'assets/ifinal/pdf.png\" WIDTH=\"35\" HEIGHT=\"35\"/></a></td>';\n $tabla .= '<td align=center>'.$row['aper_programa'].''.$row['aper_proyecto'].''.$row['aper_actividad'].'</td>';\n $tabla .= '<td>'.$row['proy_nombre'].'</td>';\n $tabla .= '<td>'.$row['tp_tipo'].'</td>';\n $tabla .= '<td>'.$row['proy_sisin'].'</td>';\n $tabla .= '<td>'.$row['fun_nombre'].' '.$row['fun_paterno'].' '.$row['fun_materno'].'</td>';\n $tabla .= '<td>'.$row['ue'].'</td>';\n $tabla .= '<td>'.$row['ur'].'</td>';\n\n $nc=$this->model_faseetapa->calcula_nc($fase[0]['pfec_fecha_inicio']); //// calcula nuevo/continuo\n $ap=$this->model_faseetapa->calcula_ap($fase[0]['pfec_fecha_inicio'],$fase[0]['pfec_fecha_fin']);\n $nro_fg_act = $this->model_faseetapa->nro_fasegestion_actual($fase[0]['id'],$this->session->userdata('gestion'));\n $fase_gest = $this->model_faseetapa->fase_etapa_gestion($fase[0]['id'],$this->session->userdata(\"gestion\"));\n $tabla .='<td>'.$fase[0]['descripcion'].'</td>';\n $tabla .='<td>* '.$fase[0]['fase'].'<br>* '.$fase[0]['etapa'].'</td>';\n $tabla .='<td>'.$nc.'</td>';\n $tabla .='<td>'.$ap.'</td>';\n $tabla .='<td>'.number_format($fase[0]['pfec_ptto_fase'], 2, ',', '.').' Bs.</td>';\n $tabla .='<td>';\n if($nro_fg_act!=0 && ($fase_gest[0]['estado']==1 || $fase_gest[0]['estado']==2)){\n $tabla .=''.number_format($fase_gest[0]['pfecg_ppto_total'], 2, ',', '.').' Bs.';\n }\n elseif ($nro_fg_act==0) {\n $tabla .= '<font color=\"red\">la gestion no esta en curso</font>';\n }\n $tabla .='</td>';\n $tabla .='<td>';\n if($this->model_faseetapa->verif_fase_etapa_gestion($fase[0]['id'],$this->session->userdata(\"gestion\"))!=0){ \n if($this->model_faseetapa->nro_ffofet($fase_gest[0]['ptofecg_id'])!=0){\n $techo=$this->model_faseetapa->techo_presupuestario($fase_gest[0]['ptofecg_id']);\n $tabla .= ''.number_format($techo[0]['suma_techo'], 2, ',', '.').' Bs.';\n }\n else{$tabla .= \"<font color=red>S/T</font>\";}\n }\n $tabla .='</td>';\n $tabla .= '</tr>\n <script>\n document.getElementById(\"myBtn'.$row['proy_id'].'\").addEventListener(\"click\", function(){\n document.getElementById(\"load'.$row['proy_id'].'\").style.display = \"block\";\n });\n </script>';\n }\n\n return $tabla;\n }", "title": "" }, { "docid": "32042bae101b023e2063b102957f8d97", "score": "0.52145225", "text": "function pedidos($print){\n\t\t$plantillaPrincipal=file_get_contents('views/principal.html');\n\t\t$plantillaPrincipal=str_replace('{Titulo}','Pedidos - Golden Eagle',$plantillaPrincipal);\n\t\t$contenido=file_get_contents('views/cont_Pedidos.html');\n\t\t\n\t\t$contenido=str_replace('{tblPedidos}',$this->listaPedidos('pendiente'),$contenido);\n\t\t\n\t\t$opciones=$this->modUser->obtieneDivisiones();\n $contenido=str_replace('{Divisiones}',$opciones,$contenido);\n\t\t\n\t\t$plantillaPrincipal=str_replace('{contenido}',$contenido,$plantillaPrincipal);\n\t\tif($print===1)\n\t\t\techo $plantillaPrincipal;\n\t\telse\n\t\t\treturn $plantillaPrincipal;\n\t}", "title": "" }, { "docid": "cc3475e22405be703c82cd5a3f936069", "score": "0.5208926", "text": "function obtener_arreglo_parciales($id_materia_periodo_lectivo){\n $arr_parciales=array(\"\"=>\"-- Seleccione un Parcial --\");\n\n $sQuery=\"SELECT DISTINCT p.id,p.nombre FROM ul_parcial p, ul_grupo_parcial gp, ul_materia_periodo_lectivo mpl, \".\n \"ul_subparcial sp WHERE mpl.id=$id_materia_periodo_lectivo and mpl.id_periodo_lectivo=gp.id_periodo_lectivo \".\n \"and p.id_grupo_parcial=gp.id and sp.id_parcial=p.id ORDER BY p.id\";\n $result=$this->sDB->fetchTable($sQuery,true);\n if(is_array($result) && count($result)>0){\n foreach($result as $fila){\n $arr_parciales[$fila['id']]=$fila['nombre'];\n }\n }\n return $arr_parciales;\n\n }", "title": "" }, { "docid": "c435e823b1eb88f4392297c7455c7bd4", "score": "0.52070445", "text": "protected function armaColeccionMapeoTprop() {\n $dao = new PGDAO();\n $result = $this->leeDBArray($dao->execSql($this->COLECCIONMAPEOTPROP));\n return $result;\n }", "title": "" }, { "docid": "3bc5c7914799b66438f9c9271a4b6e1d", "score": "0.5205033", "text": "function ImprimeLinha($l_solic,$l_cad,$l_tram,$l_conc,$l_atraso,$l_aviso,$l_valor,$l_custo,$l_acima,$l_chave,$l_chave_aux) {\r\n extract($GLOBALS);\r\n if($p_tipo == 'PDF' || $p_tipo == 'WORD'){\r\n $w_embed = 'WORD'; \r\n }\r\n if ($w_embed != 'WORD') ShowHTML(' <td align=\"right\"><a class=\"hl\" href=\"javascript:lista('.$l_chave_aux.', \\''.$l_chave.'\\', -1, -1, -1, -1);\" onMouseOver=\"window.status=\\'Exibe os contratos.\\'; return true\" onMouseOut=\"window.status=\\'\\'; return true\">'.number_format($l_solic,0,',','.').'</a>&nbsp;</font></td>'); else ShowHTML(' <td align=\"right\">'.number_format($l_solic,0,',','.').'&nbsp;</font></td>');\r\n if ($l_cad>0 && $w_embed != 'WORD') ShowHTML(' <td align=\"right\"><a class=\"hl\" href=\"javascript:lista('.$l_chave_aux.', \\''.$l_chave.'\\', 0, -1, -1, -1);\" onMouseOver=\"window.status=\\'Exibe os contratos.\\'; return true\" onMouseOut=\"window.status=\\'\\'; return true\">'.number_format($l_cad,0,',','.').'</a>&nbsp;</font></td>'); else ShowHTML(' <td align=\"right\">'.number_format($l_cad,0,',','.').'&nbsp;</font></td>');\r\n if ($l_tram>0 && $w_embed != 'WORD') ShowHTML(' <td align=\"right\"><a class=\"hl\" href=\"javascript:lista('.$l_chave_aux.', \\''.$l_chave.'\\', -1, 0, -1, -1);\" onMouseOver=\"window.status=\\'Exibe os contratos.\\'; return true\" onMouseOut=\"window.status=\\'\\'; return true\">'.number_format($l_tram,0,',','.').'</a>&nbsp;</font></td>'); else ShowHTML(' <td align=\"right\">'.number_format($l_tram,0,',','.').'&nbsp;</font></td>');\r\n if ($l_conc>0 && $w_embed != 'WORD') ShowHTML(' <td align=\"right\"><a class=\"hl\" href=\"javascript:lista('.$l_chave_aux.', \\''.$l_chave.'\\', -1, -1, 0, -1);\" onMouseOver=\"window.status=\\'Exibe os contratos.\\'; return true\" onMouseOut=\"window.status=\\'\\'; return true\">'.number_format($l_conc,0,',','.').'</a>&nbsp;</font></td>'); else ShowHTML(' <td align=\"right\">'.number_format($l_conc,0,',','.').'&nbsp;</font></td>');\r\n if ($l_aviso>0 && $w_embed != 'WORD') ShowHTML(' <td align=\"right\"><font size=\"1\" color=\"red\"><b>'.number_format($l_aviso,0,',','.').'&nbsp;</font></td>'); else ShowHTML(' <td align=\"right\"><b>'.$l_aviso.'&nbsp;</font></td>');\r\n if ($_SESSION['INTERNO']=='S' && substr(f($RS_Menu_Origem,'sigla'),0,3)!='GCA') {\r\n ShowHTML(' <td align=\"right\">'.number_format($l_valor,2,',','.').'&nbsp;</font></td>');\r\n ShowHTML(' <td align=\"right\">'.number_format($l_custo,2,',','.').'&nbsp;</font></td>');\r\n } \r\n ShowHTML(' </tr>');\r\n}", "title": "" }, { "docid": "5765b9a0338d9c4a7d09883853090c51", "score": "0.5201339", "text": "function pemrograman(){\n\t\t// Ketika fungsi pemrograman dipanggil, maka dia akan mengeluarkan data yang berisi \"echo \".. ..\" \n\t\techo \"MENGHILANGKAN INDEX.PHP PADA CODEIGNITER | MALASNGODING.COM\";\n\t}", "title": "" }, { "docid": "2cec4da98118c3632ee5bd7b81b6f805", "score": "0.51993734", "text": "public function pintarFilaNotasPeriodosAlumnoExcell($alumno,$periodo,$profesor_id,$asignatura_id,$fila_inicial,$columna_inicial,$tipo,$colegio){\n $em= $this->getEntityManager();\n $formula_periodo_academico=\"\";\n $componentes=$em->getRepository(\"NetpublicCoreBundle:Grupo\")->getNotaAlumnoPeriodos($alumno->getId(),$profesor_id,$periodo, $asignatura_id);\n $this->pintarExcell($columna_inicial, $fila_inicial,$fila_inicial);\n $columna_inicial++;\n $this->pintarExcell($columna_inicial, $fila_inicial,\"$alumno\"); \n $columna_inicial++;\n $this->pintarExcell($columna_inicial, $fila_inicial,\"{$alumno->getSede()}\"); \n \n $columna_inicial++;\n $promedio=0;\n $nro_periodos=0;\n $ponderado_total=0;\n foreach ($componentes as $componente) { \n $dim_comp=$componente->getDimension();\n if($dim_comp){\n $promedio=$promedio+$componente->getNota();\n $formula_periodo_academico=$formula_periodo_academico.Util::getColumnaLetra($columna_inicial).$fila_inicial.'+';\n $nro_periodos++;\n $this->pintarExcell($columna_inicial, $fila_inicial,$componente->getNota());\n $columna_inicial++;\n }\n }\n if($nro_periodos>0){\n $promedio=$promedio/$nro_periodos;\n }\n $this->pintarExcell($columna_inicial, $fila_inicial,'=('.$formula_periodo_academico.'0)/'.$nro_periodos);\n \n $valor_minimo_deficiente=$colegio->getValorMinimoDeficiente();\n $valor_maximo_deficiente=$colegio->getValorMaximoDeficiente();\n $valor_minimo_insuficiente=$colegio->getValorMinimoInsuficiente();\n $valor_maximo_insuficiente=$colegio->getValorMaximoInsuficiente();\n $valor_minimo_aceptable=$colegio->getValorMinimoAceptable();\n $valor_maximo_aceptable=$colegio->getValorMaximoAceptable();\n $valor_minimo_sobresaliente=$colegio->getValorMinimoSobresaliente();\n $valor_maximo_sobresaliente=$colegio->getValorMaximoSobresaliente();\n $indexDesempeno=-1;\n if($promedio>=$valor_minimo_deficiente && $promedio<$valor_maximo_deficiente){\n $indexDesempeno=\"BAJO\";\n for ($index = 0; $index <= $columna_inicial+1; $index++) {\n $this->setBackgroundColor(\"f44800\",Util::getColumnaLetra($index).($fila_inicial));\n }\n }\n if($promedio>=$valor_minimo_insuficiente && $promedio<$valor_maximo_insuficiente){\n $indexDesempeno=\"BÁSICO\";\n }\n if($promedio>=$valor_minimo_aceptable && $promedio<$valor_maximo_aceptable){\n $indexDesempeno=\"ALTO\";\n }\n if($promedio>=$valor_minimo_sobresaliente && $promedio<=$valor_maximo_sobresaliente){\n $indexDesempeno=\"SUPERIOR\";\n for ($index = 0; $index <= $columna_inicial+1; $index++) {\n $this->setBackgroundColor(\"98fc66\",Util::getColumnaLetra($index).($fila_inicial));\n }\n } \n if($indexDesempeno==-1){\n $indexDesempeno=\"No determinado\";\n }\n $columna_inicial++;\n $this->pintarExcell($columna_inicial, $fila_inicial,$indexDesempeno);\n \n \n }", "title": "" }, { "docid": "8ea7e81bdff97a0231bdcd1a4aeaaba7", "score": "0.5196028", "text": "function ajouterParagraphe() {\r\n\t\tmysql_query(\"INSERT INTO if_page_para (numpage,numpara,ordre,colonne,liste,type_titre) VALUES ('$this->numpage','$this->numpara','$this->ordre','$this->colonne','$this->liste','$this->typeTitre')\");\r\n\t\tmysql_query(\"UPDATE if_page SET iduti_m='$this->id_m', hmodif='\".time().\"' WHERE numpage='$this->numpage'\");\r\n\t}", "title": "" }, { "docid": "6329964cb4d6321b50f8d58a2cd92bd8", "score": "0.5193224", "text": "public function gravaInicioProcessoRenomearL8($_usuario, $_passagem, $_data_inicial, $_status, $caracter_chave)\n\t{\n\t\t// SQL para consulta //\n\t\t$_SQL = \"INSERT INTO processos_Landsat8(proc_caracter_chave, proc_passagem, proc_data_inicial, proc_status, proc_login_operador, proc_exibir_info, proc_tipo) \n\t\tvalues('$caracter_chave', '$_passagem', '$_data_inicial', '$_status', '$_usuario', 'SIM', 'RENOMEAR')\";\n\t\t//--echo $_SQL.\"<br />\";\n\t\t// Abre a conexao com a base de dados //\n\t\tself::objetoAbreConexao();\n\t\t// executa o SQL //\n\t\tmysql_query($_SQL) or die(mysql_error());\n\t\t// Fecha a conexao com a base de dados //\n\t\tself::objetoFechaConexao();\n\t}", "title": "" }, { "docid": "fc70960c11487ceef1d395bd295f56fe", "score": "0.5188337", "text": "public static function getPapas()\n\t{\n\t\treturn DB::table('menu')\n\t\t ->whereNull('padreid')\n\t\t ->orderBy('orden')\n\t\t ->get();\n\t}", "title": "" }, { "docid": "e3373740032a96ea620779b40645ea3c", "score": "0.51826054", "text": "function totalPartidaEjecucion(){\n\t\t$this->procedimiento='pre.ft_partida_ejecucion_sel';\n\t\t$this->transaccion='PRE_TOPAREJE_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n\t\t\t\t\n //Definicion de la lista del resultado del query\n $this->captura('comprometido','numeric');\n $this->captura('ejecutado','numeric');\n $this->captura('pagado','numeric');\n\t\t$this->captura('devengar','numeric');\n\n\t\t//Ejecuta la instruccion\n $this->armarConsulta();\n //echo($this->consulta);exit;\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n }", "title": "" }, { "docid": "0e7bdca786d16643ea38d18bdef713c5", "score": "0.5182351", "text": "function mantotab()\n {\n $sql=$this->menu[\"fuente\"]; // 20070818\n $sql_result = @pg_exec($this->connection,$sql);\n if (pg_last_error($this->connection)!=\"\")\n {\n error_log($this->dame_tiempo().\" src/php/soldatos.php error al leer la fuente\\r\".pg_last_error($this->connection),3,\"/var/tmp/errores.log\");\n $this->Enviaemail(\"Opcion: \".$this->titulos.\"<br>Error: \".pg_last_error($this->connection).\"<br>Query: \".$sql.\"<br>\".\"Usuario=\".$_SESSION[\"parametro1\"]);\n echo \"Error al leer la base de datos reportar a sistemas\";\n die(\"Error al leer la base de datos reportar a sistemas\");\n }\n $num = pg_numrows($sql_result);\n if ( $num == 0 && \n \t\t ( \n \t\t strpos($this->movto_mantto,\"s\")!==false \n \t\t|| strpos($this->movto_mantto,\"u\")!==false\n \t\t|| strpos($this->movto_mantto,\"d\")!==false \n \t\t|| strpos($this->movto_mantto,\"cc\")!==false \n \t )\n \t) \n \t{\n\t \t};\n if ( $num >= $this->menu[\"limite\"] )\n {menerror(\"El limite de registros para mostrar fue rebasado, limite:\".$this->menu[\"limite\"]); };\n \n\tif ($num != 0 )\n\t{\n $reg= new logmenus($this->connection); //20070623\n $reg->registra($this->idmenu ,trim(@$this->camposm[\"tabla\"].\" \".$this->filtro.\" regs=\".$num));//20070623\n $reg=null; //20070623\n }\n if ( strpos($this->movto_mantto,\"i\")!==false \n || strpos($this->movto_mantto,\"s\")!==false \n || strpos($this->movto_mantto,\"S\")!==false \n || strpos($this->movto_mantto,\"B\")!==false \n || strpos($this->movto_mantto,\"u\")!==false\n || strpos($this->movto_mantto,\"e\")!==false \n || strpos($this->movto_mantto,\"I\")!==false // 20070115 solo altas en automatico\n ) \n { $this->campo_cap($sql_result,$this->metada); } \n \n if ( strpos($this->movto_mantto,\"i\")!==false \n || strpos($this->movto_mantto,\"s\")!==false \n || strpos($this->movto_mantto,\"u\")!==false\n || strpos($this->movto_mantto,\"U\")!==false \n || strpos($this->movto_mantto,\"d\")!==false \n || strpos($this->movto_mantto,\"cc\")!==false \n || strpos($this->movto_mantto,\"S\")!==false \n || strpos($this->movto_mantto,\"B\")!==false \n ) \n {\n \t\techo $this->inicio_tab($this->menu[\"table_width\"],$this->menu[\"table_height\"],$this->menu[\"table_align\"],$num);\t \t \n \t\techo $this->filas_ing($sql_result, $num, $this->metada); \t\t//20070623 \n \t\techo \"</table>\"; \t\t\n \t\techo \"</div>\"; \t\t\n \t }\n }", "title": "" }, { "docid": "8c1f03485755e2b4727f630ea2a0f39e", "score": "0.51801556", "text": "function modificarPlanPago(){\n\t\t$this->procedimiento='tes.f_plan_pago_ime';\n\t\t$this->transaccion='TES_PLAPA_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_plan_pago','id_plan_pago','int4');\n\t\t\n\t\t\n\t\t$this->setParametro('tipo_pago','tipo_pago','varchar');\n\t\t$this->setParametro('monto_ejecutar_total_mo','monto_ejecutar_total_mo','numeric');\n\t\t$this->setParametro('obs_descuentos_anticipo','obs_descuentos_anticipo','text');\n\t\t$this->setParametro('id_plan_pago_fk','id_plan_pago_fk','int4');\n\t\t$this->setParametro('id_obligacion_pago','id_obligacion_pago','int4');\n\t\t$this->setParametro('id_plantilla','id_plantilla','int4');\n\t\t$this->setParametro('descuento_anticipo','descuento_anticipo','numeric');\n\t\t$this->setParametro('otros_descuentos','otros_descuentos','numeric');\n\t\t$this->setParametro('tipo','tipo','varchar');\n\t\t$this->setParametro('obs_monto_no_pagado','obs_monto_no_pagado','text');\n\t\t$this->setParametro('obs_otros_descuentos','obs_otros_descuentos','text');\n\t\t$this->setParametro('monto','monto','numeric');\n\t\t$this->setParametro('id_comprobante','id_comprobante','int4');\n\t\t$this->setParametro('nombre_pago','nombre_pago','varchar');\n\t\t$this->setParametro('monto_no_pagado_mb','monto_no_pagado_mb','numeric');\n\t\t$this->setParametro('id_cuenta_bancaria','id_cuenta_bancaria','int4');\n\t\t$this->setParametro('forma_pago','forma_pago','varchar');\n\t\t$this->setParametro('monto_no_pagado','monto_no_pagado','numeric');\n $this->setParametro('fecha_tentativa','fecha_tentativa','date');\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": "41df243150b0aaffd1d85e786aa9a6c7", "score": "0.5177849", "text": "public function vistaTablaEmprendimiento($pagina=1){\r\n\t\t$zona = new Zona ();\r\n\t\t$zonaBSN = new ZonaBSN ();\r\n\t\t$local = new Localidad();\r\n\t\t$localaBSN = new LocalidadBSN();\r\n\t\t$tipopropBSN = new Tipo_empBSN();\r\n\t\t$tipo_empBSN = new Tipo_empBSN();\r\n\t\t$config= CargaConfiguracion::getInstance();\r\n\t\t$registros=$config->leeParametro('regemp_adm');\r\n\t\t\r\n\t\t$fila=0;\r\n\t\tprint \"<script type='text/javascript' language='javascript'>\\n\";\r\n\t\tprint \"function envia(opcion,id){\\n\";\r\n\t\tprint \" document.forms.lista.id_emp.value=id;\\n\";\r\n\t\tprint \" \tsubmitform(opcion);\\n\";\r\n\t\tprint \"}\\n\";\r\n\t\tprint \"function filtra(){\\n\";\r\n\t\tprint \" document.lista.action='lista_emprendimiento.php?i=';\\n\";\r\n\t\tprint \" document.forms.lista.fid_zona.value=document.forms.lista.aux_zona.value;\\n\";\r\n\t\tprint \" document.forms.lista.fid_loca.value=document.forms.lista.aux_loca.value;\\n\";\r\n\t\tprint \" document.forms.lista.fid_tipo_emp.value=document.forms.lista.aux_emp.value;\\n\";\r\n//\t\tprint \"alert(document.forms.lista.operacion.value);\\n\";\r\n\t\tprint \" document.lista.submit();\\n\";\r\n\t\tprint \"}\\n\";\r\n\t\tprint \"function limpiafiltro(){\\n\";\r\n\t\tprint \" document.lista.action='lista_emprendimiento.php?i=';\\n\";\r\n\t\tprint \" document.forms.lista.fid_zona.value=0;\\n\";\r\n\t\tprint \" document.forms.lista.fid_loca.value=0;\\n\";\r\n\t\tprint \" document.forms.lista.fid_tipo_emp.value=0;\\n\";\r\n\t\tprint \" document.lista.submit();\\n\";\r\n\t\tprint \"}\\n\";\r\n\t\tprint \"function paginar(pagina){\\n\";\r\n//\t\tprint \" document.lista.action='lista_propiedad.php?i=';\\n\";\t\t\r\n\t\tprint \" document.forms.lista.pagina.value=pagina;\\n\";\r\n\t\tprint \" filtra();\\n\";\r\n//\t\tprint \" document.lista.submit();\\n\";\r\n\t\tprint \"}\\n\";\r\n\t\t\r\n\t\tprint \"</script>\\n\";\r\n\r\n\t\tprint \"<span class='pg_titulo'>Listado de Emprendimientos</span><br><br>\\n\";\r\n\t\t\r\n\t\tprint \"<form name='lista' method='POST' action='respondeMenu.php'>\";\r\n\r\n\t\t$menu=new Menu();\r\n\t\t$menu->dibujaMenu('lista');\r\n//\t\t$menu->dibujaMenu('lista','opcion');\r\n\r\n// Filtro\t\t\r\n\t\tprint \" <table class='cd_tabla' width='100%'>\\n\";\r\n\t\tprint \" <tr>\\n\";\r\n\t\tprint \" <td colspan='3' class='cd_lista_filtro' style='text-align: left; padding-left: 10px;'>Filtrar por </td>\";\r\n\t\tprint \"\t</tr>\";\r\n\r\n\t\tprint \"<tr><td class='cd_celda_texto' width='33%'>Zona</td>\";\r\n\t\tprint \"<td class='cd_celda_texto' width='33%'>Localidad</td>\";\r\n\t\tprint \"<td class='cd_celda_texto' width='33%'>Tipo de Emprendimiento</td></tr>\";\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tprint \"<tr><td width='33%'>\";\r\n\t\tif(isset($_POST['fid_zona']) && $_POST['fid_zona']!=0){\r\n\t\t\t$aux_zona=$_POST['fid_zona'];\r\n\t\t}else{\r\n\t\t\t$aux_zona=0;\t\t\t\r\n\t\t}\r\n\t\tif(isset($_POST['fid_loca']) && $_POST['fid_loca']!=0){\r\n\t\t\t$aux_loca=$_POST['fid_loca'];\r\n\t\t}else{\r\n\t\t\t$aux_loca=0;\t\t\t\r\n\t\t}\r\n\t\tif(isset($_POST['fid_tipo_emp']) && $_POST['fid_tipo_emp']!=0){\r\n\t\t\t$aux_emp=$_POST['fid_tipo_emp'];\r\n\t\t}else{\r\n\t\t\t$aux_emp=0;\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$zona1BSN = new ZonaBSN ();\r\n\t\t$zona1BSN->comboZona($aux_zona,$aux_loca,1,'aux_zona','aux_loca');\r\n\t\t\r\n\t\tprint \"</td>\\n\";\r\n\t\tprint \"<td width='33%'>\";\r\n\t\tprint \"<div id='localidad'>\";\r\n\t\t$loca = new Localidad();\r\n\t\t$loca->setId_loca($aux_loca);\r\n\t\t$loca->setId_zona($aux_zona);\r\n\t\t$locaBSN = new LocalidadBSN($loca);\r\n\t\t$locaBSN->comboLocalidad($aux_loca,$aux_zona,1,'aux_loca');\r\n\t\tprint \"</div>\";\r\n\t\tprint \"</td>\\n\";\r\n\r\n\t\tprint \"<td width='33%'>\";\r\n\t\t$tipo_empBSN->comboTipoEmp($aux_emp,1,'aux_emp');\r\n\t\tprint \"</td></tr>\";\r\n\r\n\t\tprint \"<tr><td></td><td class='row' align='right'><input class='boton_form' type='button' onclick='javascript:filtra();' value='Enviar'></td>\\n\";\r\n\t\tprint \"<td class='row' align='right'><input class='boton_form' type='button' onclick='javascript:limpiafiltro();' value='Limpiar Filtro'></td>\\n\";\r\n\t\tprint \"</tr>\\n\";\r\n\t\tprint \"</table>\\n\";\r\n\r\n\t\t\r\n// Fin Filtro\t\t\r\n\t\t\r\n\t\tprint \" <table class='cd_tabla' width='100%'>\\n\";\r\n\t\tprint \" <tr>\\n\";\r\n\t\tprint \" <td class='cd_lista_titulo' colspan='4'>&nbsp;</td>\\n\";\r\n\t\tprint \" <td class='cd_lista_titulo'>Nombre</td>\\n\";\r\n\t\tprint \" <td class='cd_lista_titulo'>Zona</td>\\n\";\r\n\t\tprint \" <td class='cd_lista_titulo'>Localidad</td>\\n\";\r\n\t\tprint \" <td class='cd_lista_titulo'>Ubicacion</td>\\n\";\r\n\t\tprint \" <td class='cd_lista_titulo'>Logo</td>\\n\";\r\n\t\tprint \" <td class='cd_lista_titulo'>Tipo Emp.</td>\\n\";\r\n\t\tprint \"\t </tr>\\n\";\r\n\r\n\t\t$evenBSN=new EmprendimientoBSN();\r\n//\t\t$arrayEven=$evenBSN->cargaColeccionForm();\r\n\t\t$arrayEven=$evenBSN->cargaColeccionFiltro($aux_zona,$aux_loca,$aux_emp,-1,$pagina);\r\n\r\n\t\t$cantreg=$evenBSN->cantidadRegistrosFiltro($aux_zona,$aux_loca,$aux_emp,-1);\r\n\t\t$cantr=$cantreg/$registros;\r\n\t\t$cante=$cantreg%$registros;\r\n\t\tif($cante !=0 ){\r\n\t\t\t$paginas = intval($cantr + 1);\r\n\t\t}else{\r\n\t\t\t$paginas = $cantr;\r\n\t\t}\r\n//\t\t$paginas=intval($cantreg%$registros)+1;\r\n//\t\techo \"$cantr - $cante - $registros<br>\";\r\n\t\tif(sizeof($arrayEven)==0){\r\n\t\t\tprint \"No existen datos para mostrar\";\r\n\t\t} else {\r\n\t\t\tforeach ($arrayEven as $Even){\r\n\t\t\t\tif($fila==0){\r\n\t\t\t\t\t$fila=1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$fila=0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tprint \"<tr>\\n\";\r\n\t\t\t\tprint \"\t <td class='row\".$fila.\"'>\";\r\n\t\t\t\tprint \" <a href='javascript:envia(32,\".$Even['id_emp'].\");' border='0'>\";\r\n\t\t\t\tprint \" <img src='images/building_edit.png' alt='Editar' title='Editar' border=0></a></td>\";\r\n\t\t\t\tprint \"\t <td class='row\".$fila.\"'>\";\r\n\t\t\t\tprint \" <a href='javascript:envia(33,\".$Even['id_emp'].\");' border=0 onclick=\\\"return confirm('Esta seguro que quiere eliminar este registro?');\\\">\";\r\n\t\t\t\tprint \" <img src='images/delete.png' alt='Borrar' title='Borrar' border=0></a></td>\";\r\n\t\t\t\tprint \"\t <td class='row\".$fila.\"'>\";\r\n\t\t\t\tprint \" <a href='javascript:envia(34,\".$Even['id_emp'].\");' border=0>\";\r\n\t\t\t\tprint \" <img src='images/book_edit.png' alt='Editar Caracteristicas' title='Editar Caracteristicas' border=0></a>\";\r\n\t\t\t\tprint \" </td>\\n\";\r\n\t\t\t\tprint \"\t <td class='row\".$fila.\"'>\";\r\n\t\t\t\tif($Even['activa']==1){\r\n\t\t\t\t\tprint \" <a href='javascript:envia(36,\".$Even['id_emp'].\");' border=0>\";\r\n\t\t\t\t\tprint \" <img src='images/web_no.png' alt='No Publicar en Web' title='No Publicar en Web' border=0></a>\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tprint \" <a href='javascript:envia(35,\".$Even['id_emp'].\");' border=0>\";\r\n\t\t\t\t\tprint \" <img src='images/web.png' alt='Publicar en web' title='Publicar en Web' border=0></a>\";\r\n\t\t\t\t}\r\n\t\t\t\tprint \" </td>\\n\";\r\n\r\n\t\t\t\tprint \"\t <td class='row\".$fila.\"'>\".$Even['nombre'].\"</td>\\n\";\r\n\t\t\t\tprint \"\t <td class='row\".$fila.\"'>\";\r\n\t\t\t\t$zonaBSN->setId ( $Even ['id_zona'] );\r\n\t\t\t\t$zonaBSN->cargaById( $Even['id_zona'] );\r\n\t\t\t\tprint $zonaBSN->getObjeto()->getNombre_zona();\r\n\t\t\t\tprint \"</td>\\n\";\r\n\t\t\t\tprint \"\t <td class='row\".$fila.\"'>\";\r\n\t\t\t\t$localaBSN->setId($Even['id_loca']);\r\n\t\t\t\t$localaBSN->cargaById( $Even['id_loca'] );\r\n\t\t\t\tprint $localaBSN->getObjeto()->getNombre_loca();\r\n\t\t\t\tprint \"</td>\\n\";\r\n\t\t\t\tprint \"\t <td class='row\".$fila.\"'>\".$Even['ubicacion'].\"</td>\\n\";\r\n\t\t\t\tprint \"\t <td class='row\".$fila.\"'>\".$Even['logo'].\"</td>\\n\";\r\n\t\t\t\tprint \"\t <td class='row\".$fila.\"'>\";\r\n\t\t\t\t$tipopropBSN->setId($Even['id_tipo_emp']);\r\n\t\t\t\t$tipopropBSN->cargaById($Even['id_tipo_emp']);\r\n\t\t\t\tprint $tipopropBSN->getObjeto()->getTipo_emp();\r\n\t\t\t\tprint \"</td>\\n\";\r\n\t\t\t\tprint \"\t</tr>\\n\";\r\n\t\t\t}\r\n\t\t\tprint \"<tr><td align='center' colspan='19'>\";\r\n\t\t\tif($pagina>1){\r\n\t\t\t\tprint \" <a href='javascript:paginar(1);'>\";\r\n\t\t\t\tprint \" <img src='images/resultset_first.png' alt='Inicio' title='Inicio' border='0'></a>&nbsp;\";\r\n\t\t\t\tif($pagina>2){\r\n\t\t\t\t\tprint \" <a href='javascript:paginar(\". ($pagina - 1) .\");'>\";\r\n\t\t\t\t\tprint \" <img src='images/resultset_previous.png' alt='Anterior' title='Anterior' border='0'></a>&nbsp;-&nbsp;\";\r\n\t\t\t\t}\r\n\t\t\t\tfor($x=$pagina-5;$x<$pagina;$x++){\r\n\t\t\t\t\tif($x>0){\r\n\t\t\t\t\t\tprint \"<a href='javascript:paginar(\". $x .\");'>$x</a>&nbsp;-&nbsp;\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n print \"<span style='font-weight: bold; color:#FFF; background-color:#99BBEA;'>&nbsp;$pagina&nbsp;</span>-&nbsp;\";\r\n\t\t\tif($pagina<$paginas){\r\n\t\t\t\tfor($x=$pagina+1;$x<$pagina+5;$x++){\r\n\t\t\t\t\tif($x<=$paginas){\r\n\t\t\t\t\t\tprint \"<a href='javascript:paginar(\". $x .\");'>\".$x.\"</a>&nbsp;-&nbsp;\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif($pagina < $paginas-1){\r\n\t\t\t\t\tprint \" <a href='javascript:paginar(\". ($pagina + 1) .\");'>\";\r\n\t\t\t\t\tprint \" <img src='images/resultset_next.png' alt='Siguiente' title='Siguiente' border='0'></a>&nbsp;\";\r\n\t\t\t\t}\r\n\t\t\t\tprint \" <a href='javascript:paginar($paginas);'>\";\r\n\t\t\t\tprint \" <img src='images/resultset_last.png' alt='Ultima' title='Ultima' border='0'></a>&nbsp;\";\r\n\t\t\t}\r\n\t\t\tprint \"</td></tr>\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tprint \" </table>\\n\";\r\n\t\tprint \"<input type='hidden' name='id_emp' id='id_emp' value=''>\";\r\n\t\tprint \"<input type='hidden' name='fid_tipo_emp' id='fid_tipo_emp' value=''>\";\r\n\t\tprint \"<input type='hidden' name='fid_zona' id='fid_zona' value=''>\";\r\n\t\tprint \"<input type='hidden' name='fid_loca' id='fid_loca' value=''>\";\r\n\t\tprint \"<input type='hidden' name='pagina' id='pagina' value='$pagina'>\";\r\n\r\n\t\tprint \"</form>\";\r\n\t}", "title": "" }, { "docid": "b217769f0ef6ebbe7bdc7a9c2e8a5578", "score": "0.5176649", "text": "public function temAproveitamentoMinimo() {\n\n return $this->lAproveitamentoMinimo;\n }", "title": "" }, { "docid": "4924ad61a9d70516efe73dbd778089e1", "score": "0.5173942", "text": "public function agregarTrainpe()\n\t{\n\t\t$sql = \"CALL SP01_TRA_USUTRA_GUARDAR('$this->PU04IDTRA','$this->PU01CEDUSU');\";\n\t\t$result = $this->conexion->consultaRetorno($sql);\n\t\treturn $result;\n \n \n\t}", "title": "" }, { "docid": "a7f6e6e7b2cac70286deecd7b2da228e", "score": "0.5173761", "text": "function _proteins() {\n if (!$this->has_arg('visit')) $this->_error('No visit specified');\n \n $rows = $this->db->pq(\"SELECT distinct pr.acronym, max(pr.proteinid) as proteinid FROM protein pr\n INNER JOIN blsession bl ON bl.proposalid = pr.proposalid\n INNER JOIN proposal p ON bl.proposalid = p.proposalid\n WHERE pr.acronym is not null AND p.proposalcode || p.proposalnumber || '-' || bl.visit_number LIKE :1 GROUP BY pr.acronym ORDER BY lower(pr.acronym)\", array($this->arg('visit')));\n \n $proteins = array();\n foreach ($rows as &$r) {\n $proteins[$r['PROTEINID']] = $r['ACRONYM'];\n $r['PROTEINID'] = intval($r['PROTEINID']);\n }\n \n $this->_output($this->has_arg('array') ? $proteins : $rows);\n }", "title": "" }, { "docid": "c567986d1d1b37da93ea76d2228ea86e", "score": "0.5169461", "text": "static public function poblacionencuestadaporgenero ($id_encuesta){\n \n $html = '<center><h1>Población encuestada según género </h1></center>\n <table class=\"tablas\">\n <tr>\n <th width=\"30%\">Cantidad de Respuestas</th>\n <th width=\"40%\">Género</th>\n <th width=\"30%\">%</th>\n </tr> ';\n \n $Item = ItemQuery::create()->filterByIdEncuesta($id_encuesta)->where('Item.Texto like ?', '%Sexo%')->findOne();\n if (count($Item) > 0) {\n $id_item = $Item->getId();\n $Masculino = OpcionRespuestaQuery::create()->filterByIdItem($id_item)->where('OpcionRespuesta.Opcion like ?', '%Masculino%')->findOne();\n $Femenino = OpcionRespuestaQuery::create()->filterByIdItem($id_item)->where('OpcionRespuesta.Opcion like ?', '%Femenino%')->findOne();\n if (count($Masculino) > 0 && count($Femenino) > 0) {\n $id_respuesta_masculino = $Masculino->getId();\n $id_respuesta_femenino = $Femenino->getId();\n $CantidadHombres = RespuestaItemQuery::create()->filterByIdItem($id_item)->where('RespuestaItem.IdOpcion = '.$id_respuesta_masculino )->count();\n $CantidadMujeres = RespuestaItemQuery::create()->filterByIdItem($id_item)->where('RespuestaItem.IdOpcion = '.$id_respuesta_femenino )->count();\n $Total = $CantidadHombres+$CantidadMujeres;\n $porcentaje_h = round(($CantidadHombres*100)/$Total,2);\n $porcentaje_m = round(($CantidadMujeres*100)/$Total,2);\n \n }\n } \n \n $html .= ' <tr>\n <td width=\"30%\"><center>'. $CantidadHombres .'</center></td>\n <td width=\"40%\"><center>Masculino</center></td>\n <td width=\"30%\"><center>'. $porcentaje_h.'%</center></td>\n </tr> \n <tr>\n <td width=\"30%\"><center>'. $CantidadMujeres .'</center></td>\n <td width=\"40%\"><center>Femenino</center></td>\n <td width=\"30%\"><center>'. $porcentaje_m.'%</center></td>\n </tr> \n <tr>\n <td width=\"30%\" style=\"background-color: #0c131b; color:white; border : 1px solid #979696;\"><center><b>'.$Total .'</b></center></td>\n <td width=\"40%\" style=\"background-color: #0c131b; color:white; border : 1px solid #979696;\"><center><b>Total</b></center></td>\n <td width=\"30%\" style=\"background-color: #0c131b; color:white; border : 1px solid #979696;\"><center><b>100%</b></center></td>\n </tr> \n </table> \n <br>\n <br>'; \n \n \n return $html;\n \n }", "title": "" }, { "docid": "a8df9d699ec05451438a9399818eb368", "score": "0.5169026", "text": "public static function cambiar_propietario($data, $acc = 'P') {\n $data = (object) $data;\n $objeto = $data->objeto;\n $fecha = $data->fecha;\n if ($acc == 'P') { // Pagar\n $conec = new ADO();\n $ven_id = $objeto->vph_ven_id;\n $sql = \"update venta set ven_int_id='$objeto->vph_int_id_nuevo' where ven_id=$ven_id\";\n // echo \"$sql;<br>\";\n $conec->ejecutar($sql);\n $sql = \"update interno_deuda set ind_int_id='$objeto->vph_int_id_nuevo' where ind_tabla='venta' and ind_tabla_id=$ven_id and ind_estado='Pendiente'\";\n // echo \"$sql;<br>\"; \n $conec->ejecutar($sql);\n $sql = \"update venta set ven_co_propietario='$objeto->vph_cop_id_nuevo' where ven_id=$ven_id\";\n // echo \"$sql;<br>\";\n $conec->ejecutar($sql);\n $sql_up = \"update venta_propietarios_historial set vph_estado='Pagado' where vph_id='$objeto->vph_id'\";\n // echo \"$sql_up;<br>\";\n $conec->ejecutar($sql_up);\n\t\t\t\n\t\t\t$venta = FUNCIONES::objeto_bd_sql(\"select * from venta where ven_id='$ven_id'\");\t\t\t\n\t\t\tif ($venta->ven_multinivel == 'si') {\n\t\t\t\n\t\t\t\t$afiliado = FUNCIONES::objeto_bd_sql(\"select * from vendedor \n\t\t\t\twhere vdo_venta_inicial='$venta->ven_id' and vdo_int_id='$objeto->vph_int_id'\");\n\t\t\t\t\n\t\t\t\tif ($afiliado) {\n\t\t\t\t\t$log = $afiliado->vdo_log . \"|Cambio de propietario; anterior:$afiliado->vdo_int_id - nuevo:$objeto->vph_int_id_nuevo\";\n\t\t\t\t\t$sql_upd = \"update vendedor set vdo_int_id='$objeto->vph_int_id_nuevo',vdo_log='$log'\n\t\t\t\t\twhere vdo_venta_inicial='$venta->ven_id' and vdo_int_id='$objeto->vph_int_id'\";\n\t\t\t\t\t\n\t\t\t\t\t$conec->ejecutar($sql_upd);\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t}\n } else {// Anular\n $conec = new ADO();\n $ven_id = $objeto->vph_ven_id;\n $sql = \"update venta set ven_int_id='$objeto->vph_int_id' where ven_id=$ven_id\";\n // echo \"$sql;<br>\";\n $conec->ejecutar($sql);\n $sql = \"update interno_deuda set ind_int_id='$objeto->vph_int_id' where ind_tabla='venta' and ind_tabla_id=$ven_id and ind_estado='Pendiente'\";\n // echo \"$sql;<br>\"; \n $conec->ejecutar($sql);\n $sql = \"update venta set ven_co_propietario='$objeto->vph_cop_id' where ven_id=$ven_id\";\n // echo \"$sql;<br>\";\n $conec->ejecutar($sql);\n $sql_up = \"update venta_propietarios_historial set vph_estado='Anulado' where vph_id='$objeto->vph_id'\";\n // echo \"$sql_up;<br>\";\n $conec->ejecutar($sql_up);\n }\n }", "title": "" } ]
ef8eb695a980ea8940f5d1d739b10876
output stats to command line
[ { "docid": "1b5e53e2b620db7cf2306189b6a363d1", "score": "0.50917184", "text": "protected function outputStats(array $stats, $versionStats, OutputInterface $output, $moduleStats)\n {\n $output->writeln(\"\");\n\n $table = new Table($output);\n\n if ($moduleStats) {\n $table->setHeaders(array('CMS', '# Installations', '# Modules'));\n } else {\n $table->setHeaders(array('CMS', '# Installations'));\n }\n\n foreach ($stats as $system => $cmsStats) {\n if ($moduleStats) {\n $table->addRow(array($system, $cmsStats['amount'], $cmsStats['amountmodules']));\n } else {\n $table->addRow(array($system, $cmsStats['amount']));\n }\n }\n\n $table->render();\n\n // Render version stats if enabled\n if ($versionStats) {\n $output->writeln(\"\");\n $output->writeln(\"<info>Version specific stats:</info>\");\n\n foreach ($stats as $system => $cmsStats) {\n $output->writeln(sprintf(\"%s:\", $system));\n\n $table = new Table($output);\n $table->setHeaders(array('Version', '# Installations'));\n\n uksort(\n $cmsStats['versions'],\n function ($a, $b) {\n return version_compare($a, $b);\n }\n );\n\n foreach ($cmsStats['versions'] as $version => $amount) {\n $table->addRow(array($version, $amount));\n }\n\n $table->render();\n }\n }\n\n // Render version stats if enabled\n if ($moduleStats) {\n $output->writeln(\"\");\n $output->writeln(\"<info>Module specific stats:</info>\");\n\n foreach ($stats as $system => $cmsStats) {\n // Skip module output if not supported\n if ($cmsStats[\"modules\"] === false) {\n continue;\n }\n\n $output->writeln(sprintf(\"%s:\", $system));\n\n $table = new Table($output);\n $table->setHeaders(array('Module', '# Installations'));\n\n uksort(\n $cmsStats['modules'],\n function ($a, $b) {\n return version_compare($a, $b);\n }\n );\n\n foreach ($cmsStats['modules'] as $module => $amountmodules) {\n $table->addRow(array($module, $amountmodules));\n }\n\n $table->render();\n }\n }\n }", "title": "" } ]
[ { "docid": "3f0f1694f25aab649d8cbdfd538c0301", "score": "0.63548034", "text": "public function stats()\n\t{\n\t\t$stats = $this->util_model->getStats();\n\t\t\n\t\t$this->output\n\t\t\t->set_content_type('application/json')\n\t\t\t->set_output($stats);\n\t}", "title": "" }, { "docid": "3f0f1694f25aab649d8cbdfd538c0301", "score": "0.63548034", "text": "public function stats()\n\t{\n\t\t$stats = $this->util_model->getStats();\n\t\t\n\t\t$this->output\n\t\t\t->set_content_type('application/json')\n\t\t\t->set_output($stats);\n\t}", "title": "" }, { "docid": "227fb50d1d2dd1844846a69f7752dd10", "score": "0.63146657", "text": "function help() {\n echo \"usage: test.php [--help] [--stats FILE]\\n\"\n .\" [--loc] [--comments] [--labels] [--jumps]\\n\\n\"\n .\"optional arguments:\\n\"\n .\" -h, --help show this help message and exit\\n\"\n .\" --stats FILE specify output file with collected statistics\\n\"\n .\" --loc statistics - count number of lines of code\\n\"\n .\" --comments statistics - count number of comments\\n\"\n .\" --labels statistics - count number of specific labels\\n\"\n .\" --jumps statistics - count number of jump instructions\\n\";\n exit(0); \n}", "title": "" }, { "docid": "32761d5b7f0c77fbef3e0ffcbbf82f48", "score": "0.60593617", "text": "public function stats()\n\t{\n\t\t$stat = View::factory('profiler/stats');\n\t\t// echo $stat;\n\t}", "title": "" }, { "docid": "61da8453691bcca9a17dac54f6d46722", "score": "0.596503", "text": "public function stats_show() {\n\t\t\tstats::show();\n\t\t}", "title": "" }, { "docid": "ea3116f7d161463467a10ea675dbec47", "score": "0.5932732", "text": "public function _cliUsage()\n\t{\n\t\t$usage = [\n\t\t\t\"The framework cli usage:\\n\",\n\t\t\t\"\\t--route <route> the route uri string\\n\",\n\t\t\t\"\\t--params <query_string> set \\$_GET parameters\\n\",\n\t\t];\n\n\t\tforeach ($usage as $line)\n\t\t{\n\t\t\tprint $line;\n\t\t}\n\t}", "title": "" }, { "docid": "afedd8d3068172a4cd619388c81aa7eb", "score": "0.5927323", "text": "function awstats() {\n\t $this->awfile = paramload('SHELL','prpath') . \"awstats012005.example.com.txt\"; \n\t $this->aw = new awfile($this->awfile); \n }", "title": "" }, { "docid": "d64ccd8ce1c38618dfb02f1bde3911d0", "score": "0.5907089", "text": "function spizer_usage()\n{\n if (! isset($argv)) $argv = $_SERVER['argv'];\n \n echo <<<USAGE\nSpizer - the flexible web spider, v. 0.1\nUsage: {$argv[0]} [options] <Start URL>\n\nWhere [options] can be:\n --delay | -d <seconds> Number of seconds to delay between requests\n --log | -l <log file> Send messages to file instead of to stdout\n --savecookies | -s Save and resend cookies throughout session\n --help | -h Show this help message\n\n\nUSAGE;\n}", "title": "" }, { "docid": "7ee1da1875c3e88fe8610386dde9c017", "score": "0.58596516", "text": "function printUsage() {\n\t\n\techo \"syscall.php [command] [options]\\n\";\n\techo \"command:\\n\";\n\techo \"\\t-\\tList all syscalls in cache\\n\";\n\techo \"\\tget\\tGet syscall with index INDEX\\n\";\n\techo \"\\tcall\\tGet syscall with rax/eax ID\\n\";\n\techo \"\\teax\\tGet syscall with rax/eax ID\\n\";\n\techo \"\\trax\\tGet syscall with rax/eax ID\\n\";\n\techo \"\\tcache\\tCache the list of syscalls from data (http://syscalls.kernelgrok.com/)\\n\";\n\techo \"options:\\n\";\n\techo \"\\t-m64\\t64bit ABI\\n\";\n\techo \"\\t-m32\\t32bit ABI\\n\";\n\techo \"\\t-b16\\tCall id is hex value\\n\";\n\techo \"\\t-b10\\tCall id is decimal value\\n\";\n\techo \"\\t-djson\\tData format is json\\n\";\n\techo \"\\t-dhtml\\tData format is html\\n\";\n}", "title": "" }, { "docid": "a7f9eb16dbacead52ce800bfd38c661c", "score": "0.58417505", "text": "protected function printStats()\n {\n $wordCount = $this->countWordsProcessed();\n $str = \"\\nIt took {$this->time} to process the game board.\\nFound {$wordCount} words.\\n\";\n $str .= $this->formatWordsFound();\n self::writeToLog($str);\n }", "title": "" }, { "docid": "1ac65e6490f28d283243d96c21a7105f", "score": "0.5824996", "text": "public function printStats() {\n\t\t$html = new Html(\"\");\n\t\t$html->printChallengeStats($this->challengeName, $this->challengeAmount, $this->challengeDescription);\n\t}", "title": "" }, { "docid": "ac15c3e52fa329f9bbd6a705b1008e55", "score": "0.5779791", "text": "function driver_stats($option = array());", "title": "" }, { "docid": "0944b612fcbf9ffc2ced99fc68098112", "score": "0.56510216", "text": "public function get(){\n $cmd = sprintf(\"python socrates_cli.py --log --specs\");\n\t\techo shell_exec($cmd);\n\t}", "title": "" }, { "docid": "eae3f6f3cd9d873f2f7be20c657acb89", "score": "0.56394655", "text": "protected function help()\n\t{\n\t\t$this->out('Getsocialdata ' . self::VERSION);\n\t\t$this->out();\n\t\t$this->out('Usage: php -f bin/getdata.php -- [switches]');\n\t\t$this->out();\n\t\t$this->out('Switches: -h | --help Prints this usage information.');\n\t\t$this->out();\n\t\t$this->out();\n\t}", "title": "" }, { "docid": "c5c0c01cc3f68968213334d682e609da", "score": "0.56270975", "text": "public function Stats($args = [])\n {\n $this->GetClient()->Get($this->GetUrl().\"/stats\", $args);\n }", "title": "" }, { "docid": "95649785f7f8e2d766938bb308a3a0ff", "score": "0.55799085", "text": "private function washCommandHelp(){\n echo \"The PHP Farm - a simple command line animals app\" . PHP_EOL;\n echo PHP_EOL;\n echo \"Command Usage:\" . PHP_EOL;\n echo \" [wash | w] <name=> gives a shower to a animal by name\" . PHP_EOL;\n echo PHP_EOL;\n echo \"Examples:\" . PHP_EOL;\n echo \" php Main.php [wash | w] name=my_animal_name\" . PHP_EOL;\n }", "title": "" }, { "docid": "d59fb68fa5cd36ab2643c38e8ca9f104", "score": "0.5555755", "text": "function stats()\n {\n echo '<h2>Summary</h2>';\n echo '<p>';\n echo '<strong>Engine</strong>: ' . w3_get_engine_name($this->_config->get_string('objectcache.engine')) . '<br />';\n echo '<strong>Caching</strong>: ' . ($this->_caching ? 'enabled' : 'disabled') . '<br />';\n\n if (!$this->_caching) {\n echo '<strong>Reject reason</strong>: ' . $this->cache_reject_reason . '<br />';\n }\n\n echo '<strong>Total calls</strong>: ' . $this->cache_total . '<br />';\n echo '<strong>Cache hits</strong>: ' . $this->cache_hits . '<br />';\n echo '<strong>Cache misses</strong>: ' . $this->cache_misses . '<br />';\n echo '<strong>Total time</strong>: '. round($this->time_total, 4) . 's';\n echo '</p>';\n\n echo '<h2>Cache info</h2>';\n\n if ($this->_debug) {\n echo '<table cellpadding=\"0\" cellspacing=\"3\" border=\"1\">';\n echo '<tr><td>#</td><td>Status</td><td>Source</td><td>Data size (b)</td><td>Query time (s)</td><td>ID:Group</td></tr>';\n\n foreach ($this->debug_info as $index => $debug) {\n echo '<tr>';\n echo '<td>' . ($index + 1) . '</td>';\n echo '<td>' . ($debug['cached'] ? 'cached' : 'not cached') . '</td>';\n echo '<td>' . ($debug['internal'] ? 'internal' : 'persistent') . '</td>';\n echo '<td>' . $debug['data_size'] . '</td>';\n echo '<td>' . round($debug['time'], 4) . '</td>';\n echo '<td>' . sprintf('%s:%s', $debug['id'], $debug['group']) . '</td>';\n echo '</tr>';\n }\n\n echo '</table>';\n } else {\n echo '<p>Enable debug mode.</p>';\n }\n }", "title": "" }, { "docid": "78e9eb0f5dd877ad71d9ba4ce01542db", "score": "0.55339766", "text": "function main ($argc, $argv)\n {\n $rc = 1;\n\n // 3 args (+progname) required\n if ($argc != 4)\n {\n usage ();\n printf (\"ERROR: 3 args required.\\n\");\n }\n\n else\n {\n // Store args\n $commandLine = new CommandLine_sgstats2phone ($argc, $argv);\n\n // Extract args\n $commandLine->extractArgs ();\n\n // Validate args\n if (($argStatus = $commandLine->validateArgs ()) != 0)\n {\n usage ();\n $commandLine->printArgErrorMessage ($argStatus);\n }\n\n else\n {\n // Store the args in the sendGrid object\n $sendGrid = new SendGrid ($commandLine->argPhone, // 3034029500\n $commandLine->argUser, // [email protected]\n $commandLine->argApiKey); // MySecretApiKey\n\n // Get the SendGrid stats for the current day (via REST/XML)\n if ($sendGrid->statsGet () != 0)\n {\n printf (\"ERROR: sendGrid->statsGet()\\n\");\n }\n else\n {\n // Assemble the text-to-speech text, setup params to pass to curl\n $sendGrid->assembleStats ();\n\n // Send stats to phone\n if (SendGridCurl::issueRequest ($sendGrid->get_statsParams()) == 0)\n {\n // Successful\n $rc = 0;\n }\n }\n }\n }\n\n exit ($rc);\n }", "title": "" }, { "docid": "bfd604389bd226169a52523cb96ce774", "score": "0.55292237", "text": "function get_profiling($args)\n\t{ \n\t\t$con = new Console_Getopt;\n\t\tarray_shift($args);\n\t\t\n\t\t$shortoptions = 'acg:hiIlmMrRsStTuUO:vzZ';\n\t\t$retval = $con->getopt( $args, $shortoptions);\n\t\tif(is_object($retval)) {\n\t\t\tusage();\n\t\t}\n\t\t\n\t\t$opt['O'] = 20;\n\t\tforeach ($retval[0] as $kv_array) {\n\t\t\t$opt[$kv_array[0]] = $kv_array[1];\n\t\t}\n\t\t\n\t\t$DATA = Profiler::_get_pprofp();\n\n\t\t$cfg = array();\n\t\t$this->parse_info('HEADER', $DATA, $cfg);\n\n\t\t$callstack = array();\n\t\t$calls = array();\n\t\t$indent_cur = 0;\n\t\t$file_hash = array();\n\t\t$this->mem = array();\n\t\t$t_rtime = 0;\n\t\t$t_stime = 0;\n\t\t$t_utime = 0;\n\t\t$c_rtimes = array();\n\t\t$this->c_stimes = array();\n\t\t$this->c_utimes = array();\n\t\t$rtimes = array();\n\t\t$this->stimes = array();\n\t\t$this->utimes = array();\n\t\t$rtotal = 0;\n\t\t$stotal = 0;\n\t\t$utotal = 0;\n\t\t$last_memory = 0;\n\n\t\t$symbol_hash = array();\n\t\t$symbol_type = array();\n\n\t\twhile($line = fgets($DATA)) {\n\t\t\t$line = rtrim($line);\n\t\t\tif(preg_match(\"/^END_TRACE/\", $line)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlist($token, $data) = preg_split(\"/ /\",$line, 2);\n\t\t\tif($token == '!') {\n\t\t\tlist ($index, $file) = preg_split(\"/ /\", $data, 2);\n\t\t\t$file_hash[$index] = $file;\n\t\t\tcontinue;\n\t\t\t}\n\t\t\tif( $token == '&') {\n\t\t\t\tlist ($index, $name, $type) = preg_split(\"/ /\", $data, 3);\n\t\t\t\t$symbol_hash[$index] = $name;\n\t\t\t$symbol_type[$index] = $type;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif( $token == '+') {\n\t\t\t\tlist($index, $file, $line) = preg_split(\"/ /\",$data, 3);\n\t\t\t\tif(array_key_exists('i',$opt) && $symbol_type[$index] == 1) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\t\n\t\t\t\t$index_cur = $index;\n\t\t\t\t$calls[$index_cur]++;\n\t\t\t\tarray_push($callstack, $index_cur);\n\t\t\t\tif(array_key_exists('T', $opt)) {\n\t\t\t\t\tif(array_key_exists('c', $opt)) {\n\t\t\t\t\t $retstring .= sprintf(\"%2.02f \", $rtotal/1000000);\n\t\t\t\t\t}\n\t\t\t\t\t$retstring .= str_repeat(\" \", $indent_cur).$symbol_hash[$index_cur].\"\\n\";\n\t\t\t\tif(array_key_exists('m', $opt)) {\n\t\t\t\t$retstring .= str_repeat(\" \", $indent_cur).\"C: $file_hash[$file]:$line M: $memory\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\telseif(array_key_exists('t', $opt)) {\n\t\t\t\t\tif ( $indent_last == $indent_cur && $index_last == $index_cur ) {\n\t\t\t\t\t\t$repcnt++;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ( $repcnt ) {\n\t\t\t\t\t\t\t$repstr = ' ('.++$repcnt.'x)';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(array_key_exists('c', $opt)) {\n\t\t\t\t\t\t\t$retstring .= sprintf(\"%2.02f \", $rtotal/1000000);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$retstring .= str_repeat(\" \", $indent_last).$symbol_hash[$index_last].$repstr.\"\\n\";\n\t\t\t\tif(array_key_exists('m', $opt)) {\n\t\t\t\t $retstring .= str_repeat(\" \", $indent_cur).\"C: $file_hash[$file_last]:$line_last M: $memory\\n\";\n\t\t\t\t}\n\t\t\t\t\t\t$repstr = '';\n\t\t\t\t\t\t$repcnt = 0;\n\t\t\t\t\t\t$index_last = $index_cur;\n\t\t\t\t\t\t$indent_last = $indent_cur;\n\t\t\t\t$file_last = $file;\n\t\t\t\t$line_last = $line;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t$indent_cur++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif( $token == '@') {\n\t\t\t\tlist($file_no, $line_no, $ut, $st, $rt) = preg_split(\"/ /\", $data);\n\t\t\t\t$top = array_pop($callstack);\n\t\t\t\t$this->utimes[$top] += $ut;\n\t\t\t\t$utotal += $ut;\n\t\t\t\t$this->stimes[$top] += $st;\n\t\t\t\t$stotal += $st;\n\t\t\t\t$rtimes[$top] += $rt;\n\t\t\t\t$rtotal += $rt;\n\t\t\t\tarray_push($callstack, $top);\n\t\t\tforeach ($callstack as $stack_element) {\n\t\t\t\t\t$this->c_utimes[$stack_element] += $ut;\n\t\t\t\t\t$this->c_stimes[$stack_element] += $st;\n\t\t\t\t\t$c_rtimes[$stack_element] += $rt;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($token == '-') {\n\t\t\t\tlist ($index, $memory) = preg_split(\"/ /\", $data, 2);\n\t\t\t\tif(array_key_exists('i',$opt) && $symbol_type[$index] == 1)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$this->mem[$index] += ($memory - $last_memory);\n\t\t\t\t$last_memory = $memory;\n\t\t\t\t$indent_cur--;\n\t\t\t\t$tmp = array_pop($callstack);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\t$this->parse_info('FOOTER', $DATA, $cfg);\n\t\t$sort = 'by_time';\n\t\tif(array_key_exists('l', $opt)) { $sort = 'by_calls'; }\n\t\tif(array_key_exists('m', $opt)) { $sort = 'by_mem'; }\n\t\tif(array_key_exists('a', $opt)) { $sort = 'by_name'; }\n\t\tif(array_key_exists('v', $opt)) { $sort = 'by_avgcpu'; }\n\t\tif(array_key_exists('r', $opt)) { $sort = 'by_rtime'; }\n\t\tif(array_key_exists('R', $opt)) { $sort = 'by_c_rtime'; }\n\t\tif(array_key_exists('s', $opt)) { $sort = 'by_stime'; }\n\t\tif(array_key_exists('S', $opt)) { $sort = 'by_c_stime'; }\n\t\tif(array_key_exists('u', $opt)) { $sort = 'by_utime'; }\n\t\tif(array_key_exists('U', $opt)) { $sort = 'by_c_utime'; }\n\t\tif(array_key_exists('Z', $opt)) { $sort = 'by_c_time'; }\n\t\tif( !count($symbol_hash)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$retstring .= sprintf(\"\n\t\tTrace for %s\n\t\tTotal Elapsed Time = %4.2f\n\t\tTotal System Time = %4.2f\n\t\tTotal User Time\t= %4.2f\n\t\t\", $cfg['caller'], $rtotal/1000000, $stotal/1000000, $utotal/1000000);\n\t\t\n\t\t$retstring .= \"\\n\n\t\t\t\t Real\t\t User\t\tSystem\t\t\t secs/\tcumm\n\t\t%Time (excl/cumm) (excl/cumm) (excl/cumm) Calls\tcall\ts/call Memory Usage Name\n\t\t--------------------------------------------------------------------------------------\\n\";\n\t\t$l = 0;\n\t\t$itotal = 0;\n\t\t$percall = 0;\n\t\t$cpercall = 0;\n\n\t\tuksort($symbol_hash, $sort);\n\t\tforeach (array_keys($symbol_hash) as $j) {\n\t\t\tif(array_key_exists('i', $opt) && $symbol_type[$j] == 1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($l++ < $opt['O']) {\n\t\t\t\t$pcnt = 100*($this->stimes[$j] + $this->utimes[$j])/($utotal + $stotal + $itotal);\n\t\t\t\t$c_pcnt = 100* ($this->c_stimes[$j] + $this->c_utimes[$j])/($utotal + $stotal + $itotal);\n\t\t\t\t$rsecs = $rtimes[$j]/1000000;\n\t\t\t\t$ssecs = $this->stimes[$j]/1000000;\n\t\t\t\t$usecs = $this->utimes[$j]/1000000;\n\t\t\t\t$c_rsecs = $c_rtimes[$j]/1000000;\n\t\t\t\t$c_ssecs = $this->c_stimes[$j]/1000000;\n\t\t\t\t$c_usecs = $this->c_utimes[$j]/1000000;\n\t\t\t\t$ncalls = $calls[$j];\n\t\t\tif(array_key_exists('z', $opt)) {\n\t\t\t\t\t$percall = ($usecs + $ssecs)/$ncalls;\n\t\t\t\t\t$cpercall = ($c_usecs + $c_ssecs)/$ncalls;\n\t\t\t\t\t\tif($utotal + $stotal) {\n\t\t\t\t\t$pcnt = 100*($this->stimes[$j] + $this->utimes[$j])/($utotal + $stotal);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$pcnt = 100;\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(array_key_exists('Z', $opt)) {\n\t\t\t\t\t$percall = ($usecs + $ssecs)/$ncalls;\n\t\t\t\t\t$cpercall = ($c_usecs + $c_ssecs)/$ncalls;\n\t\t\t\t\t\tif($utotal + $stotal) {\n\t\t\t\t\t$pcnt = 100*($this->c_stimes[$j] + $this->c_utimes[$j])/($utotal + $stotal);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$pcnt = 100;\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(array_key_exists('r', $opt)) {\n\t\t\t\t\t$percall = ($rsecs)/$ncalls;\n\t\t\t\t\t$cpercall = ($c_rsecs)/$ncalls;\n\t\t\t\t\t\tif($rtotal) {\n\t\t\t\t\t$pcnt = 100*$rtimes[$j]/$rtotal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$pcnt = 100;\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(array_key_exists('R', $opt)) {\n\t\t\t\t\t$percall = ($rsecs)/$ncalls;\n\t\t\t\t\t$cpercall = ($c_rsecs)/$ncalls;\n\t\t\t\t\t\tif($rtotal) {\n\t\t\t\t\t$pcnt = 100*$c_rtimes[$j]/$rtotal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$pcnt = 100;\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(array_key_exists('u', $opt)) {\n\t\t\t\t\t$percall = ($usecs)/$ncalls;\n\t\t\t\t\t$cpercall = ($c_usecs)/$ncalls;\n\t\t\t\t\t\tif($utotal) {\n\t\t\t\t\t$pcnt = 100*$this->utimes[$j]/$utotal;\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$pcnt = 100;\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(array_key_exists('U', $opt)) {\n\t\t\t\t\t$percall = ($usecs)/$ncalls;\n\t\t\t\t\t$cpercall = ($c_usecs)/$ncalls;\n\t\t\t\t\t\tif($utotal) {\n\t\t\t\t\t$pcnt = 100*$this->c_utimes[$j]/$utotal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$pcnt = 100;\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(array_key_exists('s', $opt)) {\n\t\t\t\t\t$percall = ($ssecs)/$ncalls;\n\t\t\t\t\t$cpercall = ($c_ssecs)/$ncalls;\n\t\t\t\t\t\tif($stotal) {\n\t\t\t\t\t$pcnt = 100*$this->stimes[$j]/$stotal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$pcnt = 100;\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(array_key_exists('S', $opt)) {\n\t\t\t\t\t$percall = ($ssecs)/$ncalls;\n\t\t\t\t\t$cpercall = ($c_ssecs)/$ncalls;\n\t\t\t\t\t\tif($stotal) {\n\t\t\t\t\t$pcnt = 100*$this->c_stimes[$j]/$stotal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$pcnt = 100;\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t//\t\t$cpercall = ($c_usecs + $c_ssecs)/$ncalls;\n\t\t\t\t$mem_usage = $this->mem[$j];\n\t\t\t\t$name = $symbol_hash[$j];\n\t\t\t\t$retstring .= sprintf(\"%3.01f %2.02f %2.02f %2.02f %2.02f %2.02f %2.02f %4d %2.04f %2.04f %12d %s\\n\", \n\t\t\t\t\t\t\t\t$pcnt, $rsecs, $c_rsecs, $usecs, $c_usecs, $ssecs, $c_ssecs, $ncalls, $percall, $cpercall, $mem_usage, $name);\n\t\t\t\treturn $retstring;\n\t\t\t}\n\t\t}\n\t\treturn $retstring;\n\t}", "title": "" }, { "docid": "7e845f259af32eec2d6a2d9ec7d70401", "score": "0.5527379", "text": "private function aliveCommandHelp(){\n echo \"The PHP Farm - a simple command line animals app\" . PHP_EOL;\n echo PHP_EOL;\n echo \"Command Usage:\" . PHP_EOL;\n echo \" [alive | a] <name=> checks if an animal is alive by name\" . PHP_EOL;\n echo PHP_EOL;\n echo \"Examples:\" . PHP_EOL;\n echo \" php Main.php [alive | a] name=my_animal_name\" . PHP_EOL;\n }", "title": "" }, { "docid": "f137740bbe1d540cbe86b52441168b2a", "score": "0.5509792", "text": "public function usageHelp()\t{\r\n\t\treturn <<<USAGE\r\nUsage: php -f export.php -- [options]\r\n\r\n --profile <identifier> Profile ID from System > Import/Export > Profiles\r\n\r\nUSAGE;\r\n\t}", "title": "" }, { "docid": "64a22d976204cafc3fec815698f5bb85", "score": "0.5500323", "text": "public function printUsage()\n {\n echo $this->_locale->sprintf(\"USAGE\", basename(__FILE__)), \"\\n\";\n }", "title": "" }, { "docid": "c2ebf98438f6ee86f55a06132d57fbd2", "score": "0.5496121", "text": "public function displayManPage()\n {\n print $this->getUsageStatement() . \"\\n\\n\";\n foreach($this->scriptOptions as $option) {\n printf(\n \" -%1s | --%-15s : %s\\n\",\n str_replace(':', '', $option[1]),\n str_replace(':', '', $option[0]),\n $option[2]\n );\n }\n\n print \"\\n\\n\\n\";\n }", "title": "" }, { "docid": "0affa35bb6b51769ae5d8b19cb0c81ea", "score": "0.54764265", "text": "public function usageHelp()\n {\n return <<<USAGE\nUsage:\n php -f export.php [--attr1 val1 --attr2 val2] [--images|--skus]\n --skus Export sku,name csv (could be used in Import to delete products)\n --images Export images\nThe script export sku,name (if --sku) or images (if --media) for products with attr1 = val1 AND attr2 = val2; If you want to use LIKE condition, put % in val\n\nExample\n To get a list with images:\n php exportskus.php --name 'My%' --images | sort -u \n To get a csv with sku,name:\n php exportskus.php --name 'My%' --skus > skutodelete.csv\n\n\nUSAGE;\n }", "title": "" }, { "docid": "82920a1cb5a92105f57f494a293dee79", "score": "0.5462921", "text": "function print_usage()\r\n{\r\n global $argc, $argv;\r\n global $timeout;\r\n ?>\r\n ERROR - Insufficient arguments specified.\r\n check_nagiosxiserver - Copyright (c) 2010 Nagios Enterprises, LLC.\r\n Portions Copyright(c) others (see source code).\r\n\r\n Usage:\r\n <?php echo $argv[0]; ?>\r\n <option>\r\n\r\n Options:\r\n\r\n --address=\r\n <addres> The address of the Nagios XI server\r\n\r\n --url=\r\n <url> The URL used to access the Nagios XI web interface\r\n\r\n --username=\r\n <username> The username used for accessing the server\r\n\r\n --ticket=\r\n <ticket> The ticket used for accessing the server\r\n\r\n --timeout=\r\n <seconds> Seconds before plugin times out (default=<? echo $timeout; ?>)\r\n\r\n --debug=<0/1> Enables/disables debugging output\r\n\r\n --mode=\r\n <mode> Operating mode of the plugin. Valid modes include:\r\n daemons Checks the status of the core Nagios XI daemons to ensure\r\n they're running properly.\r\n jobs Checks the status of the core Nagios XI jobs to ensure\r\n they're running properly.\r\n iowait Checks the I/O wait CPU statistics.\r\n load Checks the 1,5,15 minutes load statistics.\r\n\r\n --warn=\r\n <warning> The warning values used for some modes (iowait, load)\r\n\r\n --crit=\r\n <critical> The critical values used for some modes (iowait, load)\r\n\r\n\r\n This plugin checks the status of a remote Nagios XI server.\r\n\r\n<?php\r\n\t\texit(3);\r\n\t}", "title": "" }, { "docid": "15c6745f20ba7da1e7c953e6bff98030", "score": "0.543314", "text": "public static function output() {}", "title": "" }, { "docid": "99dc9ada9dd03e6c08f647b4dabd1c84", "score": "0.54310846", "text": "public function getStandardOutput();", "title": "" }, { "docid": "82a6a196fb3d08d1e73e379be929ac45", "score": "0.54271233", "text": "function printUsage()\n{\n\techo \"yourCMDB Exporter\\n\";\n\techo \"Usage: exporter.php <export taskname>\\n\";\n\techo \"<export taskname> is the name of the export task to execute defined in exporter-configuration.xml\\n\\n\";\n}", "title": "" }, { "docid": "9db95bf43ef5066a2de12566f0fb6b94", "score": "0.5424507", "text": "protected function showUsageAndExit() {\n\t\t\techo 'Usage: cli_mnogosearch.phpsh [-n] [-w]\n\nThis script reindexes TYPO3 web sites as defined by current TYPO3 configuration.\nIt accepts the following options:\n\n-c Only check and create database if necessary. Do not reindex.\n-d Display generated indexer configuration and exit.\n-n Force reindexing of new URLs (normally should be set)\n-p pid Process indexing configuration only from this pid\n-w Create statistic for misspelled words. Useful only if\n. Ispell dictionaries are included to mnoGoSearch\n. configuration (see mnoGoSearch documentation)\n--dry-run Show what will be done (not applicable to -d and -E)\n-h, --help, -? Display this help message\n-x Pass the argument to mnoGoSearch indexer\n-v level Be verbose. Level is 0-5. Default is 0 (complete silence)\n-z Remove all indexed data from the database\n';\n\t\t\texit(1);\n\t}", "title": "" }, { "docid": "7396db43b1c4d5a173cce40e12d7a5c6", "score": "0.5409968", "text": "function statistic( $args, $assoc_args ) {\n\t\t$pinfo = new MBInfoPInfo();\n\t\t$uniprot = $args[0];\n\t\tif (!empty($uniprot)) {\n\t\t\t$protein = $pinfo->get_record($uniprot);\n\t\t\tif (empty($protein)) {\n\t\t\t\tWP_CLI::success( $uniprot . \" not found.\" );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$list = $pinfo->search_referred_pages($protein);\n\t\t\tvar_dump($list);\n\t\t\t$cnt = count($list);\n\t\t\tWP_CLI::line( \"$cnt page found for $uniprot\" );\n\t\t} else {\n\t\t\t$ans = $pinfo->get_info();\n\t\t\t$cnt = $ans['count'];\n\t\t\tWP_CLI::line( \"$cnt protein records\" );\n\t\t}\n\n\t\tWP_CLI::success( \"Done!\" );\n\t}", "title": "" }, { "docid": "82d2ab0af6550678533fee72c60500fc", "score": "0.5404407", "text": "public function showResults()\n {\n $tracker = Tracker::getInstance();\n\n $tracker->outputStats();\n if (count($tracker->getFailures())) {\n $tracker->output(\"\\nFAILURES\\n\", null, null, true);\n $tracker->outputFailures();\n }\n\n if (count($tracker->getErrors())) {\n $tracker->output(\"\\nERRORS\\n\");\n $tracker->outputErrors();\n }\n\n $tracker->output(\"\\n\");\n\n if (count($tracker->getFailures())) {\n return;\n }\n\n if ($this->coverageDirectory()) {\n $tracker->output('Generating coverage report as html...' . \"\\n\");\n $this->_generateCoverageHtml();\n return $tracker->output('Done' . \"\\n\");\n }\n\n if ($this->showCoverage()) {\n $this->_generateCoverageCommandLine();\n return;\n }\n }", "title": "" }, { "docid": "4a15a66d6dc176ddd9f61c724dbd091c", "score": "0.5377284", "text": "function cliout($data){\n print ($this->cli) ? $data : \"\";\n\t}", "title": "" }, { "docid": "7ae087dbd6b8babd6e7fe29fe51d433d", "score": "0.5374295", "text": "function output(){}", "title": "" }, { "docid": "db840f48c2ca7d988aafbcde71f57d77", "score": "0.5374025", "text": "private function help() {\n echo \"The PHP Farm - a simple command line animals app\" . PHP_EOL;\n echo PHP_EOL;\n echo \"Usage:\" . PHP_EOL;\n echo \" php Main.php [command]\" . PHP_EOL;\n echo PHP_EOL;\n echo \"Available Commands:\" . PHP_EOL;\n echo \" [list | l] list all available animals\" . PHP_EOL;\n echo \" [create | c] <name=> <type=> create a animal with name\" . PHP_EOL;\n echo \" [delete | d] <name=> delete a animal\" . PHP_EOL;\n echo \" [search | s] <name=> search a animal\" . PHP_EOL;\n echo \" [food | f] <name=> give food to a animal\" . PHP_EOL;\n echo \" [wash | w] <name=> give a shower to a animal\" . PHP_EOL;\n echo \" [alive | a] <name=> show if a animal is alive\" . PHP_EOL;\n echo \" [help | h] help about commands\" . PHP_EOL;\n echo PHP_EOL;\n echo \"Flags:\" . PHP_EOL;\n echo \" -v, --version show the app version\" . PHP_EOL;\n echo PHP_EOL;\n echo \"Use php Main.php [command] --help for more information about a command.\" . PHP_EOL;\n }", "title": "" }, { "docid": "b8af15cf404ef5fb0127c66e31289ec6", "score": "0.5370098", "text": "protected function displayUsageAndExit()\n {\n echo 'Usage:' . PHP_EOL .\n 'php Dispatch.php -c ABTest [-a <compareApiCalls|compareFrontend>] ' .\n '[--url=<primary url> --url=<primary url>] ' .\n '[--log-level=<log level>] [--max-fail-count=<fail count>]' .\n '[--ignore-cache]' . PHP_EOL . PHP_EOL;\n exit(1);\n }", "title": "" }, { "docid": "2f68862f9375534c90264c9ea0ca8ec4", "score": "0.5365019", "text": "public function displayHelp()\n\t{\n\t\t$obj = MpmCommandLineWriter::getInstance();\n\t\t$obj->addText('./migrate.php list [page] [per page]');\n\t\t$obj->addText(' ');\n\t\t$obj->addText('This command is used to display a list of all the migrations available. Each migration is listed by number and timestamp. You will need the migration number in order to perform an up or down migration.');\n\t\t$obj->addText(' ');\n\t\t$obj->addText('Since a project may have a large number of migrations, this command is paginated. The page number is required. If you do not enter it, the command will assume you want to see page 1.');\n\t\t$obj->addText(' ');\n\t\t$obj->addText('If you do not provide a per page argument, this command will default to 30 migrations per page.');\n\t\t$obj->addText(' ');\n\t\t$obj->addText('Valid Examples:');\n\t\t$obj->addText('./migrate.php list', 4);\n\t\t$obj->addText('./migrate.php list 2', 4);\n\t\t$obj->addText('./migrate.php list 1 15', 4);\n\t\t$obj->write();\n\t}", "title": "" }, { "docid": "8462a961b8976a3bb48dbf3a7e27480c", "score": "0.5360517", "text": "public function stats()\n {\n ?>\n\n <p>\n <strong>Redis Status:</strong> <?php echo $this->redis_status() ? 'Connected' : 'Not Connected'; ?><br />\n <strong>Redis Client:</strong> <?php echo $this->redis_client; ?><br />\n <strong>Cache Hits:</strong> <?php echo $this->cache_hits; ?><br />\n <strong>Cache Misses:</strong> <?php echo $this->cache_misses; ?>\n </p>\n\n <ul>\n <?php foreach ($this->cache as $group => $cache) : ?>\n <li><?php printf('%s - %sk', strip_tags($group), number_format(strlen(serialize($cache)) / 1024, 2)); ?></li>\n <?php endforeach; ?>\n </ul><?php\n }", "title": "" }, { "docid": "64765e0c5e943e4547fa8a67469abcff", "score": "0.5360241", "text": "function usage($status=0){\n\t\tprintf(\"Usage: %s [\\\"string\\\"] or -(to read from stdin)\\n\", $_SERVER['argv'][0]);\n\t\texit($status);\n\t}", "title": "" }, { "docid": "fa55a33e686f1675b22b4fcb0cd135dd", "score": "0.53558964", "text": "function printUseage() {\n echo( \"parseSdml.php -i <input.sdml> [-x <token to exclude>,<token>,<...>] [-n] [-p<MySql root password>] [-d]\\n\" );\n }", "title": "" }, { "docid": "55f29a3c1c961d4986ff8327b588f801", "score": "0.5348336", "text": "public function usageHelp()\n {\n global $argv;\n $self = basename($argv[0]);\n return <<<USAGE\n\nOrders exporter\n\nExport orders to CSV file and upload it via FTP\n\nUsage: php -f $self -- [options]\n\nOptions:\n\n help This help\n export Export orders\n\nUSAGE;\n }", "title": "" }, { "docid": "69e3fc546564e9a8a3ef51dcdad26675", "score": "0.53430533", "text": "public function output_results() {\n\t\tif ( empty( $this->results ) ) {\n\t\t\t$this->results = $this->calculate_results();\n\t\t}\n\n\t\tforeach ( $this->results as $group => $tests ) {\n\t\t\techo \"$group: \\n\\n\";\n\t\t\techo \" --------\\n\";\n\n\t\t\tforeach ( $tests as $test => $result ) {\n\t\t\t\techo \"$test: \\n\\n\";\n\t\t\t\techo \" --------\\n\";\n\t\t\t\techo \" Range: {$result['min']} - {$result['max']} seconds\\n\";\n\t\t\t\techo \" Median: {$result['median']} seconds\\n\";\n\t\t\t\techo \" Mean: {$result['mean']} seconds\\n\";\n\t\t\t\techo \" SD: {$result['sd']} seconds\\n\\n\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9d9814b1478b9f4d6818156b5f3cd3d8", "score": "0.53334135", "text": "function usage($exit = 0)\n{\n echo \"php nbayes.php --train DIR --db DBFILE\\n\";\n echo \"php nabyes.php --classify DIR --db DBFILE\\n\";\n echo \"php nabyes.php --top-terms [-n N] --db DBFILE\\n\";\n echo \"\\n\";\n echo \"The training directory should contain two or more subdirectories,\\n\";\n echo \"each containing files to be trained on. The subdirectory names\\n\";\n echo \"are taken as the class labels for the examples contained under\\n\";\n echo \"them (the file names are irrelevant).\\n\";\n echo \"\\n\";\n echo \"The test directory should contain only a collection of files to\\n\";\n echo \"be classified.\\n\";\n echo \"\\n\";\n echo \"The DBFILE passed to the train command will be overwritten with\\n\";\n echo \"training data, and the same path should be passed to the classify\\n\";\n echo \"command.\\n\";\n exit($exit);\n}", "title": "" }, { "docid": "7614ec343c7b0c1f105228b53f4f14d8", "score": "0.53320384", "text": "function cliprogress($args, $options, $console) {\n $total = isset($options['total']) ? $options['total'] : 100;\n $usleep = isset($options['usleep']) ? $options['usleep'] : 10000;\n $progress = new ProgressBar($console, $total);\n for ($i = 0; $i < $total; $i++) {\n $progress->incr();\n usleep($usleep);\n }\n $progress->stop();\n }", "title": "" }, { "docid": "024fc45b2b8d5429226c918b30736c09", "score": "0.5319816", "text": "function zg_ai_show_bot_brief_stats($bot) {\n $clan_leader = $bot->is_clan_leader ? '*' : ' ';\n zg_fetch_user_extra_attributes($bot);\n $stats = sprintf('%-8s (level %03d %-8s) inf:%9s engy:%4d/%4d acts:%3d/%3d ' .\n '$$$:%9s last acc:%15s', $bot->phone_id, $bot->level,\n substr($bot->meta, 3), number_format($bot->experience),\n $bot->energy, $bot->energy_max, $bot->actions, $bot->actions_max,\n number_format($bot->money),\n zg_format_date($bot->last_access)) . PHP_EOL;\n $stats .= sprintf('loc:%-20s clan:%3s%1s ini:%-12s end:%-12s elo:%-12s ' .\n 'luck:%4d',\n $bot->location, $bot->clan_acronym, $clan_leader,\n \"{$bot->total_initiative}({$bot->initiative}x{$bot->extra_initiative})\",\n \"{$bot->total_endurance}({$bot->endurance}x{$bot->extra_endurance})\",\n \"{$bot->total_elocution}({$bot->elocution}x{$bot->extra_elocution})\",\n $bot->luck) . PHP_EOL;\n $stats .= PHP_EOL;\n return $stats;\n}", "title": "" }, { "docid": "33f477fd1b2ae05dbb7a67a7ab3646af", "score": "0.53187686", "text": "public function campaignStats($opt = array()) {\n return $this->send($opt, 'campaignStats');\n}", "title": "" }, { "docid": "b2d726c6d82ed2ae2ef1179a9e0735f8", "score": "0.53134763", "text": "function _printStats($stats, $prefix = '') {/*{{{*/\n $out = '';\n foreach ($stats as $name => $value) {\n if (is_array($value)) {\n $out .= $prefix.$name.\":\\n\";\n $out .= $this->_printStats($value, $prefix.\"\\t\");\n } else {\n $out .= \"{$prefix}{$name}: $value\\n\";\n }\n }\n return $out;\n }", "title": "" }, { "docid": "54a40f8bebe540bf87411538fe141a01", "score": "0.5300691", "text": "function display()\n {\n // How chatty should the program be.\n if ($this->verbose > 1) {\n echo \"Welcome to the Console_Getargs example2 script!\\n\";\n } \n \n if ($this->verbose > 0) {\n echo basename($this->file) . ' has ';\n }\n \n // Spit out the number of lines.\n echo $this->countLines();\n \n if ($this->verbose > 0) {\n echo ' lines.';\n }\n \n echo \"\\n\";\n \n // If the user wants to highlight ceratin words do it.\n if (count($this->findWords)) {\n // Chattyness.\n if ($this->verbose) {\n echo \"Searching for:\\t\";\n settype($this->findWords, 'array');\n foreach ($this->findWords as $word) {\n echo $word . ', ';\n }\n echo \"\\n\";\n }\n \n // Spit out the requested number of lines.\n echo $this->find($this->getFirstXLines());\n } else {\n // Just output the lines.\n echo $this->getFirstXLines();\n }\n }", "title": "" }, { "docid": "a435b35a849b47500f5491f541694927", "score": "0.5300094", "text": "function cliprogress($args, $options, $console)\n {\n $total = isset($options['total']) ? $options['total'] : 100;\n $usleep = isset($options['usleep']) ? $options['usleep'] : 10000;\n $progress = new ProgressBar($console, $total);\n for ($i = 0; $i < $total; $i++) {\n $progress->incr();\n usleep($usleep);\n }\n $progress->stop();\n }", "title": "" }, { "docid": "cf59edf17362cb8ea635ed04f3dc82d5", "score": "0.5284377", "text": "public function stats()\n {\n }", "title": "" }, { "docid": "25945ae98d863a200ad15f42cd12ec9e", "score": "0.52833265", "text": "function stats() {\n\t\techo '<h2>Summary</h2>';\n\t\techo '<p>';\n\t\techo '<strong>Engine</strong>: ' . Cache::engine_name( $this->_config->get_string( array( 'fragmentcache', 'engine' ) ) ) . '<br />';\n\t\techo '<strong>Caching</strong>: ' . ( $this->_caching ? 'enabled' : 'disabled' ) . '<br />';\n\n\t\tif ( !$this->_caching ) {\n\t\t\techo '<strong>Reject reason</strong>: ' . $this->cache_reject_reason . '<br />';\n\t\t}\n\n\t\techo '<strong>Total calls</strong>: ' . $this->cache_total . '<br />';\n\t\techo '<strong>Cache hits</strong>: ' . $this->cache_hits . '<br />';\n\t\techo '<strong>Cache misses</strong>: ' . $this->cache_misses . '<br />';\n\t\techo '<strong>Total time</strong>: '. round( $this->time_total, 4 ) . 's';\n\t\techo '</p>';\n\n\t\techo '<h2>Cache info</h2>';\n\n\t\tif ( $this->_debug ) {\n\t\t\techo '<table cellpadding=\"0\" cellspacing=\"3\" border=\"1\">';\n\t\t\techo '<tr><td>#</td><td>Status</td><td>Source</td><td>Data size (b)</td><td>Query time (s)</td><td>ID:Group</td></tr>';\n\n\t\t\tforeach ( $this->debug_info as $index => $debug ) {\n\t\t\t\techo '<tr>';\n\t\t\t\techo '<td>' . ( $index + 1 ) . '</td>';\n\t\t\t\techo '<td>' . ( $debug['cached'] ? 'cached' : 'not cached' ) . '</td>';\n\t\t\t\techo '<td>' . ( $debug['internal'] ? 'internal' : 'persistent' ) . '</td>';\n\t\t\t\techo '<td>' . $debug['data_size'] . '</td>';\n\t\t\t\techo '<td>' . round( $debug['time'], 4 ) . '</td>';\n\t\t\t\techo '<td>' . sprintf( '%s:%s', $debug['id'], $debug['group'] ) . '</td>';\n\t\t\t\techo '</tr>';\n\t\t\t}\n\n\t\t\techo '</table>';\n\t\t} else {\n\t\t\techo '<p>Enable debug mode.</p>';\n\t\t}\n\t}", "title": "" }, { "docid": "11d890b0c549e463afbd2a62ac02b4f0", "score": "0.52828246", "text": "public function getConsoleUsage()\n {\n return [\n ];\n }", "title": "" }, { "docid": "fff504f2f50c00d05b0d8368e3923283", "score": "0.52719826", "text": "function helpPrint() {\r\n echo \"--help - Napoveda\r\n--input=filename.ext - Vstupni xml soubor\r\n--output=filename.ext - Vystupni xml soubor\r\n--header='text' - Hlavicka vlozena na zacetek vystupniho souboru\r\n--etc=num - Maximalni počet sloupcu vzniklych ze stejnojmennych podelementu\r\n-a - Nebudou se generovat sloupce z atributu\r\n-b - Vice stejnych alelementu se bude brat jako jeden element (Nelze kombinovat s '--etc')\r\n-g - Vystupem je XML s relacema\r\n\";\r\n}", "title": "" }, { "docid": "78253baf3ccfd464ac47c78577c153f4", "score": "0.52660024", "text": "function mapit_admin_get_stats() {\n global $mapit_client;\n $params = func_get_args();\n $result = $mapit_client->call('MaPit.admin_get_stats', $params);\n return $result;\n}", "title": "" }, { "docid": "d778f3224fd59e3bd6c6e3e10f991f83", "score": "0.5255717", "text": "protected function displayUsage()\n {\n $message = \"Usage: php recipesuggest.php <recipe file> <ingredients file>\";\n $this->log(\\Monolog\\Logger::INFO, $message);\n $this->log(\\Monolog\\Logger::INFO, '');\n\n return 1;\n }", "title": "" }, { "docid": "97a48b3862f4922dc3a6cea42236cba0", "score": "0.5252119", "text": "function Usage()\n{\n\techo \"Usage: {$_SERVER['SCRIPT_FILENAME']} [-1] regex-pattern replacement-text file\\n\";\n}", "title": "" }, { "docid": "d94b4b7e0b9e3ab3c19ff1a20f35da19", "score": "0.52484345", "text": "public function output();", "title": "" }, { "docid": "d94b4b7e0b9e3ab3c19ff1a20f35da19", "score": "0.52484345", "text": "public function output();", "title": "" }, { "docid": "d94b4b7e0b9e3ab3c19ff1a20f35da19", "score": "0.52484345", "text": "public function output();", "title": "" }, { "docid": "d94b4b7e0b9e3ab3c19ff1a20f35da19", "score": "0.52484345", "text": "public function output();", "title": "" }, { "docid": "066b9deff9398660de444bc209208bb1", "score": "0.5242569", "text": "protected function printSummary() {\n $this->printHeader1('Summary');\n $this->output->writeln('1. Consolidating configuration');\n $this->output->writeln('2. Checking packages');\n $this->output->writeln('3. Updating packages');\n $this->output->writeln('4. Report');\n $this->output->writeln('');\n }", "title": "" }, { "docid": "1ede47fdbb4fa228296e9afb226c9fba", "score": "0.523635", "text": "public function print_help($args) {\n\t\tprint $GLOBALS['i18n']['framework']['cli_test_help'];\n\t}", "title": "" }, { "docid": "a1dc7fdc30fdda15b2d65bd24c67f7ae", "score": "0.5235777", "text": "function handle_stat_options($opt) {\n if (array_key_exists('stats', $opt)) {\n // open file for statistics\n $stat_file = fopen($opt['stats'], 'w');\n if (! $stat_file) {\n error(\"ERROR: \".$e.\"\\n\", ERR_OUTFILE);\n }\n return $stat_file;\n } elseif (array_key_exists('loc', $opt) or array_key_exists('comments', $opt) or\n array_key_exists('labels', $opt) or array_key_exists('jumps', $opt)) {\n error(\"ERROR: argument [--stats FILE] is missing!\\n\", ERR_PARAM);\n }\n\n return null;\n}", "title": "" }, { "docid": "47e0f82c7eefad0bf53d94b86245dbe7", "score": "0.5235188", "text": "public function usageHelp() {\r\r\n return <<<USAGE\r\r\nUsage: php -f inventory.php -- [options]\r\r\n php -f inventory.php \r\r\n \r\r\nUSAGE;\r\r\n }", "title": "" }, { "docid": "e1dcddea73da49ff05aa849d38ecaace", "score": "0.5220639", "text": "public function displayHelp()\n\t{\n\t\t$obj = MpmCommandLineWriter::getInstance();\n\t\t$obj->addText('./migrate.php latest [--force]');\n\t\t$obj->addText(' ');\n\t\t$obj->addText('This command is used to migrate up to the most recent version. No arguments are required.');\n\t\t$obj->addText(' ');\n\t\t$obj->addText('If the --force option is provided, then the script will automatically skip over any migrations which cause errors and continue migrating forward.');\n\t\t$obj->addText(' ');\n\t\t$obj->addText('Valid Examples:');\n\t\t$obj->addText('./migrate.php latest', 4);\n\t\t$obj->addText('./migrate.php latest --force', 4);\n\t\t$obj->write();\n\t}", "title": "" }, { "docid": "a0f72372871e5551622774be8d41a4a7", "score": "0.5213141", "text": "function printHelp(){\n\techo PHP_EOL;\n\techo \"Usage: \".PHP_EOL;\n\techo \"php hashCLI.php hash [password]: To hash the password. \".PHP_EOL;\n\techo \"php hashCLI.php check [password] [hash]: To check if the hash corresponds to the password. \".PHP_EOL;\n\techo \"php hashCLI.php help: For help. \".PHP_EOL;\n}", "title": "" }, { "docid": "19b7c224db8601500234d400f42a39fe", "score": "0.5205872", "text": "public function usageHelp() {\r\r\n return <<<USAGE\r\r\nUsage: php -f inventory.php -- [options]\r\r\n php -f inventory.php \r\r\n\r\r\n\r\r\nUSAGE;\r\r\n }", "title": "" }, { "docid": "54321f36490014718be13e6b52723462", "score": "0.51713866", "text": "function displayUsage()\n{\n echo \"\\n\";\n echo \"Daemon for deleting activities older than one month\\n\";\n echo \"\\n\";\n echo \"Usage:\";\n echo \"\\cron7.php [options]\\n\";\n echo \"\\n\";\n echo \"\\toptions:\\n\";\n echo \"\\t\\t--help display this help message\\n\";\n echo \"\\n\";\n}", "title": "" }, { "docid": "e109b3ba0968c1cdb16380d0bba9cf76", "score": "0.51704293", "text": "protected function outputProfile($startTime, OutputInterface $output)\n {\n $output->writeln(\"\");\n\n $endTime = microtime(true);\n\n $output->writeln('Execution time: ' . ($endTime - $startTime) . ' seconds');\n $output->writeln('Memory consumption: ' . self::parseSizeUnit(memory_get_usage(true)));\n }", "title": "" }, { "docid": "b065360d324e9a4f35914300d5a5f2c1", "score": "0.51702636", "text": "function uwr_stats($input) {\n\tglobal $uwr_stats_aArt;\n\tglobal $uwr_stats_allParams;\n\tglobal $uwr_stats_fehler;\n\n\t// set default arguments\n\t$uwr_stats_allParams = array(\n\t\t'start' => \"\",\n\t\t'ende' => \"\",\n\t\t'name' => \"Gesamt\",\n\t\t'target' => \"\",\n\t\t'saison' => 0,\n\t\t);\n\t$uwr_stats_aArt = array();\n\t$uwr_stats_fehler = FALSE;\n\t$output = \"\";\n\t\n\t// parse and check parameters\n\t$rv = parseParams($input);\n\tif ($uwr_stats_fehler) {\n\t\treturn \"Fehlerhafte Parameter (1) [{$rv}]\";\n\t}\n\t// target nicht gesetzt\n\tif ('' == $uwr_stats_allParams['target'] && \"Gesamt\" == $uwr_stats_allParams['name']) {\n\t\t$uwr_stats_fehler = TRUE;\n\t}\n\tif ($uwr_stats_fehler) {\n\t\treturn $uwr_stats_allParams['name'] . \"Fehlerhafte Parameter (2)\";\n\t}\n\n\t// ``saison'' gesetzt (setze ``start'' und ``ende'')\n\tif ($uwr_stats_allParams['saison']) {\n\t\t$uwr_stats_allParams['start'] = $uwr_stats_allParams['saison'] . \"-09-01\";\n\t\t$uwr_stats_allParams['ende'] = ($uwr_stats_allParams['saison'] + 1).\"-08-31\";\n\t}\n\n\t// ``start'' nicht gesetzt (auf unendlich setzen)\n\tif ('' == $uwr_stats_allParams['start']) {\n\t\t$uwr_stats_allParams['start'] = \"1900-01-01\";\n\t\t$uwr_stats_allParams['ende'] = \"2200-01-01\";\n\t}\n\t$DateA=date_create($uwr_stats_allParams['start']);\n\t// ``ende'' nicht eintegragen (auf ``start'' +1 Jahr setzen)\n\tif ('' == $uwr_stats_allParams['ende']) {\n\t\t$uwr_stats_allParams['ende'] = $DateA->format('d.m') . \".\" . ($DateA->format('Y')+1);\n\t}\n\t$DateE=date_create($uwr_stats_allParams['ende']);\n\n\t$SuchString = build_filter($DateA->format('Y-m-d'), $DateE->format('Y-m-d'));\n\n\t// build output\n\tif (\"Gesamt\" != $uwr_stats_allParams['name']) {\n\t\tswitch($uwr_stats_allParams['name']) {\n\t\tcase 'torschuetzen':\n\t\t\t$output = getListOfGoalsForAllScorers($SuchString,'N');\n\t\t\tbreak;\n\t\tcase 'torschuetzenS':\n\t\t\t$output = getListOfGoalsForAllScorers($SuchString,'S');\n\n\t\t\t// one individual game\n\t\t\tif (isset($uwr_stats_aArt) && count($uwr_stats_aArt) == 1 && is_numeric($uwr_stats_aArt[0]))\n\t\t\t{\n\t\t\t\t// load game data\n\t\t\t\t$dbr = wfGetDB(DB_SLAVE);\n\t\t\t\t$sql = \"SELECT * FROM `stats_games` WHERE {$SuchString}\";\n\t\t\t\t$res = $dbr->query($sql);\n\t\t\t\t$row = $res->fetchRow();\n\t\t\t\t$res->free();\n\t\t\t\t$totalGoals = $row['Tore'];//$row[5];\n\n\t\t\t\tif (!$totalGoals) {\n\t\t\t\t\t$output .= '<i>keine</i>';\n\t\t\t\t} else {\n\t\t\t\t\t$num_rows = count($row) / 2; // both, assoc and numbered array!\n\n\t\t\t\t\t$accountedGoals = 0;\n\t\t\t\t\tfor ($c = NUM_NONPLAYER_COLS; $c < $num_rows; $c++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$g = $row[$c];\n\t\t\t\t\t\tif ($g != 255)\n\t\t\t\t\t\t\t$accountedGoals += $g;\n\t\t\t\t\t}\n\t\t\t\t\t$mrxGoals = $totalGoals - $accountedGoals;\n\t\t\t\t\tif ($mrxGoals > 0) {\n\t\t\t\t\t\t$mrx = '';\n\t\t\t\t\t\tif ($output) {\n\t\t\t\t\t\t\t$mrx = \", \";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$mrx .= 'Mr. X';\n\t\t\t\t\t\tif ($mrxGoals > 1) {\n\t\t\t\t\t\t\t$mrx .= \" {$mrxGoals}\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$output .= $mrx;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'torschuetzenG':\n\t\t\t$output = getListOfGoalsForAllScorers($SuchString,'G');\n\t\t\tbreak;\n\t\tcase 'mitspieler':\n\t\t\t$output = getListOfGoalsForAllScorers($SuchString,'M');\n\t\t\tbreak;\n\t\tcase 'gesamtbilanz':\n\t\t\t$output = getListOfGesamtbilanz($SuchString); //doofes Englisch\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$players = explode(',', $uwr_stats_allParams['name']);\n\t\t\tif (1 == count($players)) {\n\t\t\t\t// single player stats\n\t\t\t\t$player = $players[0];\n\t\t\t\tif ('Turniere' == $uwr_stats_allParams['target']) {\n\t\t\t\t\t// if `Art' is not set, default should be NOT IN ('BUL', 'LL', '2BL', 'REL')\n\t\t\t\t\t$SuchString = build_filter($DateA->format('Y-m-d'), $DateE->format('Y-m-d'));\n\t\t\t\t\t$output = getListOfTournamentsForPlayer($player, $SuchString);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$output = getNumGoalsForPlayer($player, $SuchString);\n\t\t\t} else {\n\t\t\t\t// list of players\n\t\t\t\t$output = getListOfGoalsForPlayers($players, $SuchString);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t} else { // Gesamt == name\n\t\t// whole team stats\n\t\tswitch ($uwr_stats_allParams['target']) {\n\t\tcase 'Tore':\n\t\tcase 'Gegentore':\n\t\t\t$output = getNumGoals($uwr_stats_allParams['target'], $SuchString);\n\t\t\tbreak;\n\t\tcase 'Gewonnen':\n\t\tcase 'Unentschieden':\n\t\tcase 'Verloren':\n\t\tcase 'All':\n\t\t\t$output = getNumGUVA($uwr_stats_allParams['target'], $SuchString);\n\t\t\tbreak;\n\t\tcase 'SerieG':\n\t\t\t$output = getSeriesWon($SuchString);\n\t\t\tbreak;\n\t\tcase 'SerieV':\n\t\t\t$output = getSeriesLost($SuchString);\n\t\t\tbreak;\n\t\tcase 'Turniere':\n\t\t\t// if `Art' is not set, default should be NOT IN ('BUL', 'LL', '2BL', 'REL')\n\t\t\t$SuchString = build_filter($DateA->format('Y-m-d'), $DateE->format('Y-m-d'));\n\t\t\t$output = getListOfTournamentsForPlayer(false, $SuchString);\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t//$output = mysql_num_rows($sqlres).\" : \".$uwr_stats_allParams['name'].\" : \".$uwr_stats_allParams['target'];\n\n\t// return the output\n\treturn $output;\n}", "title": "" }, { "docid": "4bda5696b4bcfd7873f19ecce7229d53", "score": "0.5169889", "text": "function write_statcounter()\n\t{\n\t\tprint(\"<!-- Start of StatCounter Code -->\\n\");\n\t\tprint(\"<script type=\\\"text/javascript\\\" language=\\\"javascript\\\">\\n\");\n\t\tprint(\"<!--\\n\"); \n\t\tprint(\"var sc_project=1583330;\\n\"); \n\t\tprint(\"var sc_invisible=1;\\n\"); \n\t\tprint(\"var sc_partition=14;\\n\"); \n\t\tprint(\"var sc_security=\\\"3bc361e8\\\";\\n\"); \n\t\tprint(\"//-->\\n\");\n\t\tprint(\"</script>\\n\");\n\n\t\tprint(\"<script type=\\\"text/javascript\\\" language=\\\"javascript\\\" src=\\\"http://www.statcounter.com/counter/counter.js\\\"></script><noscript><a href=\\\"http://www.statcounter.com/\\\" target=\\\"_blank\\\"><img src=\\\"http://c15.statcounter.com/counter.php?sc_project=1583330&java=0&security=3bc361e8&invisible=1\\\" alt=\\\"free web tracker\\\" border=\\\"0\\\"></a> </noscript>\\n\");\n\t\tprint(\"<!-- End of StatCounter Code -->\\n\");\n\t}", "title": "" }, { "docid": "45d9b56b590760839bcd753924a66aee", "score": "0.516821", "text": "public function cli_help() {}", "title": "" }, { "docid": "cd56f3f7fb63306a993592bd19655e56", "score": "0.5167245", "text": "function run()\n\t{\n\t\t$bits=new ocp_tempcode();\n\t\t$map=array();\n\t\t$url=get_base_url();\n\t\tlist($rank,$links,$speed)=getAlexaRank($url);\n\t\t$map['Google PageRank']=getPageRank($url);\n\t\t$map['Alexa rank']=$rank;\n\t\t$map['Back links']=protect_from_escaping('<a title=\"Show back links\" href=\"http://www.google.co.uk/search?as_lq='.urlencode($url).'\">'.$links.'</a>');\n\t\t$map['Speed']=$speed;\n\t\tforeach ($map as $key=>$val)\n\t\t{\n\t\t\t$bits->attach(do_template('BLOCK_SIDE_STATS_SUBLINE',array('KEY'=>$key,'VALUE'=>is_null($val)?'':$val)));\n\t\t}\n\t\t$section=do_template('BLOCK_SIDE_STATS_SECTION',array('SECTION'=>'Meta stats','CONTENT'=>$bits));\n\n\t\treturn $section;\n\t}", "title": "" }, { "docid": "763c62d0270b0a5fc0eb6dfcfd4ba835", "score": "0.51632166", "text": "public static function usage()\n {\n ob_start(); \n?>\n \n The Memberlist Plugin simply outputs a\n list of 15 members of your site.\n\n {exp:webservices}\n\n This is an incredibly simple Plugin.\n\n<?php\n $buffer = ob_get_contents();\n ob_end_clean();\n return $buffer;\n }", "title": "" }, { "docid": "17063cb9aeee6fabf2b640bb0344037f", "score": "0.5145084", "text": "public function printUsage($file = null)\n {\n if (!$this->_usage)\n return;\n\n if (is_null($file))\n echo $this->getUsage();\n else\n fwrite($file, $this->getUsage());\n }", "title": "" }, { "docid": "ff70ba3e0d53e3c4019fc3251da82505", "score": "0.51379", "text": "public static function getStats() {\n $result = lC_Restrict_shipping_Admin::stats($_GET['bid'], $_GET['type'], $_GET['month'], $_GET['year']);\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n\n echo json_encode($result);\n }", "title": "" }, { "docid": "2ad9c211f2f45c10a13bf7a655b7a3ac", "score": "0.51323634", "text": "protected function _generateCoverageCommandLine()\n {\n $coverage = xdebug_get_code_coverage();\n ksort($coverage);\n\n foreach ($coverage as $file => $lines) {\n $this->_addToCoverageList($file, $lines);\n }\n\n foreach ($this->_coverage as $file => $lines) {\n $coverage = $this->_addToCoverage($file, $lines);\n $sizes[] = strlen($file);\n }\n\n $tracker = Tracker::getInstance();\n\n $file_pad = max($sizes) + 4;\n $pad = 10;\n\n $header = str_pad('FILE', $file_pad) . str_pad('LINES', $pad) . str_pad('COVERED', $pad) . str_pad('PERCENT', $pad). \"\\n\";\n $tracker->output($header, 'white', 'black', true);\n\n $tracker->output(str_pad('All', $file_pad));\n $tracker->output(str_pad($tracker->getTotalLines(), $pad));\n $tracker->output(str_pad($tracker->getCoveredLines(), $pad));\n $total_coverage = $tracker->getTotalCoverage();\n $tracker->output(str_pad($total_coverage, $pad), $this->_getColorForCoverage($total_coverage));\n $tracker->output(\"\\n\");\n\n foreach ($tracker->getCoverages() as $coverage) {\n $tracker->output(str_pad($coverage->getFile(), $file_pad));\n $tracker->output(str_pad($coverage->getLineCount(), $pad));\n $tracker->output(str_pad($coverage->getCoveredLineCount(), $pad));\n $total_coverage = $coverage->getPercentCovered();\n $tracker->output(str_pad($total_coverage, $pad), $this->_getColorForCoverage($total_coverage));\n $tracker->output(\"\\n\");\n }\n $tracker->output(\"\\n\");\n }", "title": "" }, { "docid": "49093500dff58f10cc5b59c5298b9e6b", "score": "0.5128579", "text": "public function showUsage()\n {\n echo 'Usage: '.\\Quik\\CommandAbstract::GREEN.'quik splash [options]'.\\Quik\\CommandAbstract::NC.PHP_EOL;\n echo ' It takes time to lookup your IP address and remember how the magento'.PHP_EOL;\n echo ' maintenance command is structured. Now just run `quick splash`.'.PHP_EOL;\n echo PHP_EOL;\n echo 'Options:'.PHP_EOL;\n echo ' -h, --help Show this message'.PHP_EOL;\n echo ' -o, --ff Disable the maintenance page.'.PHP_EOL;\n echo PHP_EOL;\n }", "title": "" }, { "docid": "f0d0e9dead12a39e81131cf844f3f1ca", "score": "0.51262677", "text": "public static function stats(): array;", "title": "" }, { "docid": "953f5d9cb07794bbfdee8778054fe28a", "score": "0.5117955", "text": "function getStats() {\r\n\t\t$response = $this->sendCommand('stats');\r\n\t\t$stats = new stats($response);\r\n\r\n\t\treturn $stats;\r\n\t}", "title": "" }, { "docid": "c66fce383f4a2e5a757f267555a13fe1", "score": "0.51158756", "text": "protected static function showHelp() {\n $help = \"Usage: php scriptname start|stop|restart|status\\r\\n\";\n exit($help);\n }", "title": "" }, { "docid": "18bf5c84761a0cf3c1292a9c6fef2d94", "score": "0.51082915", "text": "public function statistics()\n {\n $this->load->library('installer_lib');\n $db = $this->load->database('default', true);\n\n $data = array(\n 'bonfire_version' => BONFIRE_VERSION,\n 'php_version' => phpversion(),\n 'server' => $this->input->server('SERVER_SOFTWARE'),\n 'dbdriver' => $db->dbdriver,\n 'dbserver' => @mysql_get_server_info($db->conn_id),\n 'dbclient' => preg_replace('/[^0-9\\.]/','', mysql_get_client_info()),\n 'curl' => $this->installer_lib->cURL_enabled(),\n 'server_hash' => md5($this->input->server('SERVER_NAME').$this->input->server('SERVER_ADDR').$this->input->server('SERVER_SIGNATURE'))\n );\n\n $data_string = '';\n\n foreach($data as $key=>$value)\n {\n $data_string .= $key.'='.$value.'&';\n }\n rtrim($data_string, '&');\n\n $url = 'http://cibonfire.com/stats/collect';\n\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POST, count($data));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\n $result = curl_exec($ch);\n\n curl_close($ch);\n\n //die(var_dump($result));\n }", "title": "" }, { "docid": "67c40858194d97177d8a50d628cdd61b", "score": "0.51062185", "text": "private function createCommandHelp() {\n echo \"The PHP Farm - a simple command line animals app\" . PHP_EOL;\n echo PHP_EOL;\n echo \"Command Usage:\" . PHP_EOL;\n echo \" [create | c] <name=> <type=> creates a animal with name\" . PHP_EOL;\n echo PHP_EOL;\n echo \"Examples:\" . PHP_EOL;\n echo \" php Main.php [create | c] name=my_animal_name\" . PHP_EOL;\n echo \" php Main.php [create | c] name=my_animal_name type=pig\" . PHP_EOL;\n }", "title": "" }, { "docid": "e240db8b44c7b8bab447a903a11bf879", "score": "0.5101934", "text": "public function show_boardStats($output_method = 'echo')\n {\n return $this->call_method(\"show/boardStats\",\n array('output_method' => $output_method,\n )\n );\n }", "title": "" }, { "docid": "36625b2ab39ba47b7dd52ed5650090c3", "score": "0.5095577", "text": "function zg_ai_show_brief_stats() {\n $data = [];\n $stats = '';\n\n $sql = 'select users.id from users\n where meta like \"ai_%\"\n order by experience desc;';\n $result = db_query($sql);\n while ($item = db_fetch_object($result)) {\n $data[] = (int) $item->id;\n }\n\n $bots = zg_fetch_users_by_ids($data);\n foreach ($bots as $bot) {\n $stats .= zg_ai_show_bot_brief_stats($bot);\n }\n\n return $stats;\n}", "title": "" }, { "docid": "e8ded30acc421cc0979ac9331537c5d9", "score": "0.5092415", "text": "private function searchCommandHelp(){\n echo \"The PHP Farm - a simple command line animals app\" . PHP_EOL;\n echo PHP_EOL;\n echo \"Command Usage:\" . PHP_EOL;\n echo \" [search | s] <name=> searchs a animal by name\" . PHP_EOL;\n echo PHP_EOL;\n echo \"Examples:\" . PHP_EOL;\n echo \" php Main.php [search | s] name=my_animal_name\" . PHP_EOL;\n }", "title": "" }, { "docid": "7597ccd66230a9e7b93a853234850b4b", "score": "0.5087767", "text": "function generator_help() {\n echo \"Usage:\\n\";\n echo \"Generate Controller:\\n\";\n echo \"php script/generate.php controller controller_name [view1 view2 ...]\\n\";\n echo \"for more controller info php script/generate.php controller\\n\\n\";\n echo \"Generate Model:\\n\";\n echo \"php script/generate.php model ModelName\\n\";\n echo \"for more model info php script/generate.php model\\n\\n\";\n echo \"Generate Mailer:\\n\";\n echo \"php script/generate.php mailer MailerName [view1 view2 ...]\\n\";\n echo \"for more mailer info php script/generate.php mailer\\n\\n\";\n echo \"Generate Scaffold:\\n\";\n echo \"php script/generate.php scaffold ModelName [controller_name] [view1 view2 ...]\\n\";\n echo \"for more scaffold info php script/generate.php scaffold\\n\\n\"; \n echo \"Generate Plugin:\\n\";\n echo \"php script/generate.php plugin plugin_name\\n\";\n echo \"for more plugin info php script/generate.php plugin\\n\\n\"; \n }", "title": "" }, { "docid": "10ebeb989b174e67131c33a4ba65bd27", "score": "0.5080146", "text": "public function gatherSpeedData()\n {\n $speedTotals = array();\n\n $speedTotals['total'] = $this->getReadableTime((microtime(true) - $this->startTime) * 1000);\n $speedTotals['allowed'] = ini_get(\"max_execution_time\");\n\n $this->output['speedTotals'] = $speedTotals;\n }", "title": "" }, { "docid": "c37bd5f477c600b81919e2469083f58d", "score": "0.5072769", "text": "public function usageHelp()\n {\n return\n <<<USAGE\n Usage: php generateFeed.php -- [options]\nUSAGE;\n }", "title": "" }, { "docid": "1c73bc8e8500d7a655d07bca49abac2e", "score": "0.5071974", "text": "public function info(string $output, ...$args): void\n {\n if (!$this->output) {\n return;\n }\n\n $this->output->info(vsprintf($output, $args));\n }", "title": "" }, { "docid": "12461533229ff4f968e3514a71953980", "score": "0.5069855", "text": "public function memoryUsageAction(): void{\n Terminal::logInfo('Memory peak cli usage: ' .$this->sizeBautify(memory_get_peak_usage()));\n }", "title": "" }, { "docid": "af65fabe2239f45088bd881aa75b164b", "score": "0.50614357", "text": "function showHelp()\n{\n $help = <<<EOD\n\nbulk_convert - Command-line tool to convert fonts data for the tc-lib-pdf-font library.\n\nUsage:\n bulk_convert.php [ options ]\n\nOptions:\n\n -o, --outpath\n Output path for generated font files (must be writeable by the\n web server). Leave empty for default font folder.\n\n -h, --help\n Display this help and exit.\n\nEOD;\n fwrite(STDOUT, $help);\n exit(0);\n}", "title": "" }, { "docid": "70a4556ca07d3501dedaf6ce3780736d", "score": "0.5057399", "text": "private function foodCommandHelp(){\n echo \"The PHP Farm - a simple command line animals app\" . PHP_EOL;\n echo PHP_EOL;\n echo \"Command Usage:\" . PHP_EOL;\n echo \" [food | f] <name=> gives food to a animal by name\" . PHP_EOL;\n echo PHP_EOL;\n echo \"Examples:\" . PHP_EOL;\n echo \" php Main.php [food | f] name=my_animal_name\" . PHP_EOL;\n }", "title": "" }, { "docid": "87ef5ddec2bd728188c30c3cec6b6a70", "score": "0.5043284", "text": "public function output() {}", "title": "" }, { "docid": "814abc582bf011e23361da18be9bb0c1", "score": "0.5040575", "text": "public static function report($st)\n\t{\n\t\tif ( !isset(self::$cli) ){\n\t\t\tglobal $argv;\n\t\t\tself::$cli = isset($argv) ? 1 : false;\n\t\t}\n\t\tif ( self::$cli ){\n\t\t\tif ( is_string($st) ){\n\t\t\t\techo $st.\"\\n\";\n }\n\t\t\telse{\n\t\t\t\tvar_dump($st).\"\\n\";\n }\n\t\t}\n\t\telse{\n\t\t\tif ( is_string($st) ){\n\t\t\t\tarray_push(self::$info,$st);\n }\n\t\t\telse{\n\t\t\t\tarray_push(self::$info,print_r($st,true));\n }\n\t\t}\n\t}", "title": "" }, { "docid": "5f8a285b15a55bb11c7f83a017508382", "score": "0.5039383", "text": "function console() {\n\t\t$args = func_get_args();\n\t\t$message = '['.date('m/d,H:i:s').'] '.call_user_func_array('formatText', $args) . CRLF;\n\t\techo $message;\n\t\t//doLog($message);\n\t\tflush();\n\t}", "title": "" }, { "docid": "3aff80a7c0ebe827cd8e8b182cb003a3", "score": "0.5037452", "text": "function showHelp()\n{\n $myName = basename(__FILE__);\n echo \"Usage:\\n\";\n echo sprintf(\" %s \\033[32m{tool name}\\033[0m\\n\", $myName);\n echo PHP_EOL;\n echo \" Tool names:\\n\";\n echo PHP_EOL;\n echo sprintf(\" * %s\\n\", 'Convert SASS/SCSS to CSS:');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'sass2css');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'scss2css');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'sasstocss');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'scsstocss');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'sass');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'scss');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'css');\n echo PHP_EOL;\n echo sprintf(\" * %s\\n\", 'Dump autoload classes map:');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'dumpautoload');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'dump');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'autoload');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'classmap');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'autoloadmap');\n echo sprintf(\" \\033[33m%s\\033[0m\\n\", 'autoloadclassmap');\n exit(0);\n}", "title": "" }, { "docid": "bd0f9120e1a37e39c999eb8971156dce", "score": "0.5031564", "text": "public function write()\n {\n $stats = array('hits' => $this->hits, 'misses' => $this->misses);\n\n file_put_contents($this->getFilename(), serialize($stats));\n }", "title": "" }, { "docid": "6c676ec6b686842b8dc1b275c6f0b68f", "score": "0.50162697", "text": "public static function output( $atts = array() );", "title": "" }, { "docid": "05fb1e4f50bb871b56765e195ad5008a", "score": "0.5015724", "text": "public function stream_stat() {}", "title": "" }, { "docid": "e9f4ccf9678b0c3bb43e2fc8a157116d", "score": "0.50072515", "text": "function prof_print()\n{\n global $prof_timing, $prof_names;\n $size = count($prof_timing);\n for ($i = 0; $i < $size - 1; $i++) {\n echo \"<b>{$prof_names[$i]}</b><br>\";\n echo sprintf(\"&nbsp;&nbsp;&nbsp;%f<br>\", $prof_timing[$i + 1] - $prof_timing[$i]);\n }\n echo \"<b>{$prof_names[$size - 1]}</b><br>\";\n}", "title": "" } ]
69e59e44e0da5e49c8136cd01c29c782
Get the page ==
[ { "docid": "84fc2b6a73d4d06ec7933e4935243d1d", "score": "0.0", "text": "public function getPage($url = \"\")\n {\n try {\n $header_str = \"Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 \n (KHTML, like Gecko) Chrome/24.0.1312.27 Safari/537.17 \";\n $ctx = stream_context_create(array(\n 'http' => array(\n 'timeout' => 1,\n 'method' => \"GET\",\n 'header' => \"Accept-language: en\\r\\n\" .\n \"Cookie: foo=bar\\r\\n\" .\n \"User-Agent: \" . $header_str . \"\\r\\n\"\n )));\n return file_get_contents($url, false, $ctx);\n } catch (\\Exception $ex) {\n return false;\n }\n }", "title": "" } ]
[ { "docid": "db6155b2cac5942329dbfd1de11404cd", "score": "0.7936305", "text": "public function getPage() { \n\t\treturn $this->page;\n\t}", "title": "" }, { "docid": "4308bedc73f93d13d0297a8db4ae0770", "score": "0.79005796", "text": "public function page() {\n return $this->page;\n }", "title": "" }, { "docid": "e84d012bda52d00f6c04bc92882e9814", "score": "0.78820914", "text": "function getPage() {\n\t\treturn $this->page;\n\t}", "title": "" }, { "docid": "805f0b33708fa6477770a960fec4be7c", "score": "0.78805757", "text": "public function getPage(){\n return $this->page;\n }", "title": "" }, { "docid": "f4795fe18ac7f98f3400d2f3e0803497", "score": "0.7862486", "text": "protected function GetPage() {\r\n\t\t\treturn $this->page;\r\n\t\t}", "title": "" }, { "docid": "16831034c46c98956e41ce85fb2c299c", "score": "0.7849285", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "fd1131e5e0ea7fbb375f3e11437c2679", "score": "0.7830043", "text": "public function getPage() {\r\n\t\treturn $this->page;\r\n\t}", "title": "" }, { "docid": "d9eaab777547862ee18fbf32ceae9b46", "score": "0.7805372", "text": "public function page()\n {\n return $this->page;\n }", "title": "" }, { "docid": "3879f977916188b847584423ab23268a", "score": "0.77893347", "text": "public function getPage() {\n\t\treturn $this->page;\n\t}", "title": "" }, { "docid": "cd564ed5001401455fe54006bf633d66", "score": "0.7788925", "text": "public function get_page()\n\t{\n\t\treturn $this->page;\n\t}", "title": "" }, { "docid": "efbbc0bb2f39acc886e5c314860d4f2d", "score": "0.77875173", "text": "public function getPage() {\n if ($this->getParameter('page')) {\n return $this->getParameter('page');\n }\n\n return 1;\n }", "title": "" }, { "docid": "84f92b81ceb0da429300f569ddea5ffb", "score": "0.7782868", "text": "protected function getPage () \n {\n $key = \"page\";\n\n $result = $this->helper->checkRequestMethod($key);\n return $result;\n }", "title": "" }, { "docid": "84f92b81ceb0da429300f569ddea5ffb", "score": "0.7782868", "text": "protected function getPage () \n {\n $key = \"page\";\n\n $result = $this->helper->checkRequestMethod($key);\n return $result;\n }", "title": "" }, { "docid": "f78591189493790997325e3c37efc3bb", "score": "0.7768325", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "f78591189493790997325e3c37efc3bb", "score": "0.7768325", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "f78591189493790997325e3c37efc3bb", "score": "0.7768325", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "f78591189493790997325e3c37efc3bb", "score": "0.7768325", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "f78591189493790997325e3c37efc3bb", "score": "0.7768325", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "f78591189493790997325e3c37efc3bb", "score": "0.7768325", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "f78591189493790997325e3c37efc3bb", "score": "0.7768325", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "f78591189493790997325e3c37efc3bb", "score": "0.7768325", "text": "public function getPage()\n {\n return $this->page;\n }", "title": "" }, { "docid": "6ea99c4421a1eaab7155f9f81eb6c50c", "score": "0.77436286", "text": "public function getPage() {\n return $this->page;\n }", "title": "" }, { "docid": "71da4d275b267c85ebdea7f4dc833df3", "score": "0.7733322", "text": "public function getPage() {\n \n $page = 1;\n \n if(isset($_GET['page'])) {\n $page = $_GET['page'];\n }//end if\n \n return $page;\n \n }", "title": "" }, { "docid": "175402ce3f2af7b8c6bba76142c00d1c", "score": "0.7714667", "text": "public function getPage(): int {\n return $this->page;\n }", "title": "" }, { "docid": "b2bec705a3d95bc5084b1b9811127937", "score": "0.7678527", "text": "public function getPage() : int;", "title": "" }, { "docid": "d429fef168b67956a2475696205a8932", "score": "0.7666327", "text": "public function getPage(){\n $page = $this->_getParam('page');\n\tif(!isset($page)){\n\t\t$start = 1;\n\t} else {\n\t\t$start = $page ;\n\t}\n\treturn $start;\n }", "title": "" }, { "docid": "bd72f2c11065db31b91892b85924ca17", "score": "0.76500547", "text": "public function getPage()\n {\n return ($this->pageLink);\n }", "title": "" }, { "docid": "abb9bd27bc5d57ecdb056a25092a9ef1", "score": "0.76313096", "text": "public function getPage(): int;", "title": "" }, { "docid": "abb9bd27bc5d57ecdb056a25092a9ef1", "score": "0.76313096", "text": "public function getPage(): int;", "title": "" }, { "docid": "8f35dc2a75e11c6e40e3eac2a1f60832", "score": "0.7562126", "text": "public function getPage() {\r\n\r\n\t\t$this->errorReset();\r\n\r\n\t\treturn $this->page;\r\n\t}", "title": "" }, { "docid": "0b2f8c580294059a4d24cd99bc739715", "score": "0.7537747", "text": "public function getPage() : int\n {\n return $this->page;\n }", "title": "" }, { "docid": "bffc7e7af8e97e4f14e720a39c69355f", "score": "0.7531701", "text": "public function getPage() {\n\t\t$page = $this->_page ? $this->_page : null;\n\t\tif(!$page && $this->_pagefile) $page = $this->_pagefile->page;\n\t\treturn $page;\n\t}", "title": "" }, { "docid": "e5765239f20dd93dfa36ffed9083613a", "score": "0.75315505", "text": "public function getPage();", "title": "" }, { "docid": "e5765239f20dd93dfa36ffed9083613a", "score": "0.75315505", "text": "public function getPage();", "title": "" }, { "docid": "e5765239f20dd93dfa36ffed9083613a", "score": "0.75315505", "text": "public function getPage();", "title": "" }, { "docid": "37cbe001334a76d982e0ec1728ca9d03", "score": "0.75193673", "text": "public function getPage()\n {\n return $this->getAttribute('page', 1);\n }", "title": "" }, { "docid": "9cddad2c2db82254b21e93577ff47f62", "score": "0.7497765", "text": "public function getPage(): int\n {\n return $this->page;\n }", "title": "" }, { "docid": "9cddad2c2db82254b21e93577ff47f62", "score": "0.7497765", "text": "public function getPage(): int\n {\n return $this->page;\n }", "title": "" }, { "docid": "9cddad2c2db82254b21e93577ff47f62", "score": "0.7497765", "text": "public function getPage(): int\n {\n return $this->page;\n }", "title": "" }, { "docid": "483fe273e2a8a820cc2dce71ec2e7de1", "score": "0.74657965", "text": "public function getPage()\n {\n return $this->currentPage;\n }", "title": "" }, { "docid": "3a3ba8cdca0d8b3bf813c903bab77c94", "score": "0.7410401", "text": "public function getPage () {}", "title": "" }, { "docid": "eb7c5370bc793e982a0bc74b265d3c51", "score": "0.73481643", "text": "public function get_page() {\r\n if (isset($this->page)) {\r\n return $this->page;\r\n }\r\n return NULL;\r\n }", "title": "" }, { "docid": "efb78e77a6a8eba9f51045a19e4bd8a3", "score": "0.73397064", "text": "public function page()\n {\n if (is_null($this->page)) {\n $this->parseQueryString();\n $this->page = (isset($this->get['page'])) ? (int) $this->get['page'] : 1;\n }\n\n return $this->page;\n }", "title": "" }, { "docid": "fb5a30209bbd7adb6b11b9d51b461e97", "score": "0.7327996", "text": "public static function Page()\n {\n return self::$currentPage;\n }", "title": "" }, { "docid": "9e3f08755845a73737110cf08e24bf32", "score": "0.7321373", "text": "public function getCurrentPage()\r\n {\r\n $page = (int) $this->_request->getParam(self::PAGE_PARM_NAME);\r\n return $page ? $page : 1;\r\n }", "title": "" }, { "docid": "268ade981600b077bf23086cbee2b543", "score": "0.729265", "text": "public function currentPage()\n\t{\n\t\treturn $this->number;\n\t}", "title": "" }, { "docid": "a0f36aadaa3b58e3053fb6b5c46cab32", "score": "0.7273978", "text": "public function page()\n {\n return $this->pager()->page();\n }", "title": "" }, { "docid": "fa9d89cd29e52ccaddcc0d3cbd168bd0", "score": "0.7262188", "text": "public function getCurrentPageNumber();", "title": "" }, { "docid": "3fcada20100603bb52a134874dd763d2", "score": "0.72494847", "text": "public function getCurrentPage()\n {\n\n }", "title": "" }, { "docid": "a2d4df2f03b9957b33a4e31012c01973", "score": "0.7248908", "text": "private function getPage() {\n\t\t$url = $_SERVER['REQUEST_URI'];\n\t\t$parts = explode(\"/\", $url);\n\t\t$page = $parts[count($parts) - 1];\n\t\t$page = strpos($page, \"?\") ? substr($page, 0, strpos($page, \"?\")) : $page;\n\t\treturn $page;\n\t}", "title": "" }, { "docid": "f1d22b217c67f00597c3d70149d21244", "score": "0.722871", "text": "public static function currentPage() \n\t{\n\t\t$page = htmlspecialchars($_GET['page'] ?? 1);\n\n\t\treturn ($page < 1 || $page > 46) ? 1 : $page;\n\t}", "title": "" }, { "docid": "ec88447828d2bb84a880a9927f03e7f3", "score": "0.72240937", "text": "public function getPage(): int {\n return $this->eBook->getPage()[0];\n }", "title": "" }, { "docid": "ebdba05fb9cf77f4f40386cb94af3074", "score": "0.7221006", "text": "function currentPage(){\r\n\t\tif(isset($_GET['page'])){\r\n \tif(is_numeric($_GET['page'])){\r\n \t\tif($_GET['page'] > 0){\r\n \t$page = round($_GET['page']);\r\n \treturn $page;\r\n \t\t}\r\n \t}\r\n }\r\n return 1;\r\n\t}", "title": "" }, { "docid": "c7d48f25881064c8da2c996888946046", "score": "0.7210594", "text": "public function getPage() {\n $xpathObject = $this->getDomPath();\n return $this->getNodesValue($xpathObject, self::ABS_PAGE);\n }", "title": "" }, { "docid": "26613c29261e3536ff8d2d8a4fcfb885", "score": "0.71889395", "text": "public function page() :int\n {\n return (int) $this->request->get('page') ?: static::DEFAULT_PAGE;\n }", "title": "" }, { "docid": "26b7d5cddb9af5300315823618cbc591", "score": "0.7183209", "text": "protected function getCurrentPage()\n {\n return (int)$this->start_page_number;\n }", "title": "" }, { "docid": "60a389bb7d64e2b40a31125c48c46c45", "score": "0.7177901", "text": "function set_page() {\n\t\t$page = (!empty($_REQUEST[$this->get_var])) ? (int)$_REQUEST[$this->get_var] : 0;\n\t\treturn $page;\n\t}", "title": "" }, { "docid": "0c732312a6fed01d91ac1dbfd69e2697", "score": "0.7160198", "text": "public function getCurrentPage(): int\n {\n return $this->page;\n }", "title": "" }, { "docid": "63957ad5c4803ba0fd23dcdc922a1aea", "score": "0.7154204", "text": "protected function getActivePage(){\n return\n $this->oModel['page_size'] > 0\n ? (int)($this->oModel['offset'] / $this->oModel['page_size'])\n : 1;\n }", "title": "" }, { "docid": "57dc150b53868e258fa40084a626b07c", "score": "0.71209604", "text": "public function getCurrentPage() {\n return $this->request->input('page', 1);\n }", "title": "" }, { "docid": "7ea6606166d9b76b3ef5344b840e76b9", "score": "0.711759", "text": "public function getPage(): string {\n if (is_null($this->page)) {\n $this->get();\n }\n\n return $this->page ?? '';\n }", "title": "" }, { "docid": "101ce1a3a4ec8b50265c3c86b567e99e", "score": "0.7112547", "text": "function get_page() {\n\t$page = 1;\n\n\t//Check to see if a page was specified in the request\n\t$input_page = filter_input( INPUT_GET, 'page', FILTER_SANITIZE_NUMBER_INT );\n\tif( ! empty( $input_page ) ) {\n\n\t\tif( $input_page > 1 ) {\n\t\t\t$page = $input_page;\n\t\t}\n\t}\n\n\treturn $page;\n}", "title": "" }, { "docid": "4265c4017818fa3465c9c58b292f72ca", "score": "0.7078166", "text": "public function getPage(): Page\n {\n return $this->page;\n }", "title": "" }, { "docid": "377c93a5c1917b995abfd7a06f6f146c", "score": "0.70724154", "text": "public function getPage() {\n\t}", "title": "" }, { "docid": "e26d89b7271e958e053b068ffed347a8", "score": "0.70386636", "text": "protected function getPage()\n {\n return $this->pageRepository->getById($this->request->getParam('page_id'));\n }", "title": "" }, { "docid": "580ec9eb89327b58a22ac11f09a57dab", "score": "0.70102036", "text": "public function pagedGet($page);", "title": "" }, { "docid": "f6d23d0fe68749606a55f8f125970ed3", "score": "0.7004895", "text": "public function page()\n {\n return $this->post ?: $this->post = Post::find(Wordpress::id());\n }", "title": "" }, { "docid": "429f27ff4b6bd96e35f92b89ecaa36b1", "score": "0.6983301", "text": "public function getCurrentPage(): int {\n\n\t\treturn $this->page;\n\t}", "title": "" }, { "docid": "629a7acb5851648662edb908004dd3e1", "score": "0.6981417", "text": "public function getCurrentPage()\n {\n return $this->getData('current_page') ? $this->getData('current_page') : 1;\n }", "title": "" }, { "docid": "629a7acb5851648662edb908004dd3e1", "score": "0.6981417", "text": "public function getCurrentPage()\n {\n return $this->getData('current_page') ? $this->getData('current_page') : 1;\n }", "title": "" }, { "docid": "629a7acb5851648662edb908004dd3e1", "score": "0.6981417", "text": "public function getCurrentPage()\n {\n return $this->getData('current_page') ? $this->getData('current_page') : 1;\n }", "title": "" }, { "docid": "629a7acb5851648662edb908004dd3e1", "score": "0.6981417", "text": "public function getCurrentPage()\n {\n return $this->getData('current_page') ? $this->getData('current_page') : 1;\n }", "title": "" }, { "docid": "bc633169c928089a3f99102db8f573fc", "score": "0.6976799", "text": "public function getCurrentPage(){\r\n\t\treturn $this->currentPage;\r\n\t}", "title": "" }, { "docid": "2b56487ae767346052894b4950acef73", "score": "0.6953245", "text": "public function getCurrentPage()\n {\n return (int)$this->pageInputOption->getValue();\n }", "title": "" }, { "docid": "72ac0b75ed6a27b61b61b43e65d6382c", "score": "0.69485027", "text": "public function getCurrentPage() {\n\t\treturn $this->getLastChild();\n\t}", "title": "" }, { "docid": "fa80b127f38c039771b3e7e0f2dfc7ef", "score": "0.69261855", "text": "public function getPage() {\n return $this->isPaginated() ? $this->constraints->getPage() : null;\n }", "title": "" }, { "docid": "767a165a6683c99ae2d35d3366742c3a", "score": "0.69189966", "text": "public function getCurrentPage()\n {\n return end($this->_corePages);\n }", "title": "" }, { "docid": "e6b6d0f20e8d33dd593ef41c023ba92f", "score": "0.69181836", "text": "public function getPage()\n {\n return session()->get($this->getSessionKey(static::TYPE_PAGE));\n }", "title": "" }, { "docid": "3b4ff5b52da520b9b02863f6fb7d3c73", "score": "0.69036216", "text": "public function getCurrentPage() {\n return $this->getPageForItem($this->getStart());\n }", "title": "" }, { "docid": "7d784c33c629420cc63d0475a1d5de8b", "score": "0.68940395", "text": "public function GetCurrentPage()\n\t{\n\t\treturn $this->currentPage;\n\t}", "title": "" }, { "docid": "b9ab5dc2bae78d225fa28832f34237e2", "score": "0.687276", "text": "function &GetPage()\r\n\t{\r\n\t\tglobal $__psp__Page;\r\n\t\t\r\n\t\treturn $GLOBALS[$__psp__Page];\t\r\n\t}", "title": "" }, { "docid": "17485524d14d9c1c2cb7e9f134d892c5", "score": "0.68607324", "text": "public function getCurrentPage() {\n return $this->currentpage;\n }", "title": "" }, { "docid": "1548f28de88681f855e9a245abf5b1f8", "score": "0.68538326", "text": "public function getCurrentPage()\n\t{\n\t\treturn $this->current_page;\n\t}", "title": "" }, { "docid": "475b739f333ff2ca257bfe783e990bfa", "score": "0.6846157", "text": "public function check_page(){\r\n\t\t\tif(isset($_GET['page']) && filter_var($_GET['page'],FILTER_VALIDATE_INT,array('min-rage'=>1))){\r\n\t\t\t\t$page=$_GET['page'];\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse $page=1;\r\n\t\t\treturn $page;\r\n\t\t}", "title": "" }, { "docid": "504aeefeb04964fff4a39d4a67cefb59", "score": "0.68313956", "text": "public function getUrlPage()\n {\n return $this->url_page;\n }", "title": "" }, { "docid": "ed030f7663f97e07fc8fcbd55d5555de", "score": "0.68241584", "text": "function page_num () {\n\t\treturn ($this->_page_num);\n\t}", "title": "" }, { "docid": "a3ac5eff05e701e2441cd6258f82889e", "score": "0.6822747", "text": "public function getNextpage() : ?int;", "title": "" }, { "docid": "5b84e7117865c59c30cdaf2d9d5e35e6", "score": "0.6819038", "text": "private function getCompletePage()\n {\n $jsonPages = $this->getJsonPages();\n //echo $jsonPages.'<br>';\n if (file_exists($jsonPages)) {\n $strJson = file_get_contents($jsonPages);\n $pages = json_decode($strJson, true);\n //print_r($pages);\n //echo '<pre>';\n //echo 'url : '.$this->server->getUrl().'<br>';\n foreach ($pages as $page) {\n if ($this->server->getUrl() == $page['url']) {\n return $page; // yup just the first page\n }\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "f7006166999b685ded3f8c016a5aa3be", "score": "0.6809113", "text": "public function getCurrentPageIndex(): int;", "title": "" }, { "docid": "34a7151e4c5402420ecd6747a1c06f53", "score": "0.68035793", "text": "public function current_page();", "title": "" }, { "docid": "24f7ae090c006eaa3923d702fa805795", "score": "0.67886466", "text": "public function getPageNumber()\n {\n return $this->pageNumber;\n }", "title": "" }, { "docid": "4699eaf5776582abd9bebabf7998dd89", "score": "0.67866945", "text": "public function getPage() {\n\t\treturn Mage::registry('cms_page');\n\t}", "title": "" }, { "docid": "db04a8155ae0ac25f9806111bbcb740d", "score": "0.6770433", "text": "function\tgetPage()\n{\n return (empty($_GET['p']) ? 'home' : $_GET['p']);\n}", "title": "" }, { "docid": "c0f5ef996034a8b6453bb59956886119", "score": "0.6764448", "text": "public function getContentPage() {\n\t\treturn $this->getCurrentPage();\n\t}", "title": "" }, { "docid": "5283623da0258b7e437f344c53095ddd", "score": "0.67643404", "text": "public function getCurrentPage()\n\t{\n\t\treturn $this->currentPage;\n\t}", "title": "" }, { "docid": "637897cd6a16afa4697687898a143065", "score": "0.6753306", "text": "public function getCurrentPage() {\n\t\treturn $this->currentPage;\n\t}", "title": "" }, { "docid": "93b4b4821697e3062b1bdc5ae485cb0e", "score": "0.6752814", "text": "public function getCurrentPage()\n {\n return $this->currentPage;\n }", "title": "" }, { "docid": "93b4b4821697e3062b1bdc5ae485cb0e", "score": "0.6752814", "text": "public function getCurrentPage()\n {\n return $this->currentPage;\n }", "title": "" }, { "docid": "eddd5819a8d785b606f5d68d82b490f7", "score": "0.6745965", "text": "public function Page() {\n return get_post( get_the_ID() );\n }", "title": "" }, { "docid": "d4db583b8645e3934bc92d41f3e1038a", "score": "0.6743427", "text": "private function current_page()\n {\n $page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;\n\n return $page;\n }", "title": "" }, { "docid": "3508e5221ce5ab85258d2438b2e92062", "score": "0.6740214", "text": "protected function getPaginationPage()\n {\n return request('page', 1);\n }", "title": "" } ]
3260559ec7a7aaa7fb01c4109786f466
get settings for hook generates value if not yet set.
[ { "docid": "ef140341efbc9bbb894c92045e96701f", "score": "0.0", "text": "public function getHookConfig($module, $areaid = null)\n {\n $default = [\n 'forum' => null,\n // 0 - only admin is allowed to enable comments (create topic)\n // 1 - object owner is allowed to enable comments (create topic)\n // 2 - topic is created automatically with first comment\n 'topic_mode' => 2,\n // none - nothing happens to topic when object is deleted\n // lock - topic is locked\n // delete - topic is removed\n 'delete_action' => 'none',\n ];\n // module settings\n $settings = $this->variableApi->get($this->getOwner(), 'hooks', false);\n // this provider config\n $config = array_key_exists(str_replace('.', '-', $this->area), $settings['providers']) ? $settings['providers'][str_replace('.', '-', $this->area)] : null;\n // no configuration for this module return default\n if (null == $config) {\n return $default;\n } else {\n $default['forum'] = array_key_exists('forum', $config) ? $config['forum'] : $default['forum'];\n $default['topic_mode'] = array_key_exists('topic_mode', $config) ? $config['topic_mode'] : $default['topic_mode'];\n $default['delete_action'] = array_key_exists('delete_action', $config) ? $config['delete_action'] : $default['delete_action'];\n }\n // module provider area module area settings\n if (array_key_exists($module, $config['modules']) && array_key_exists('areas', $config['modules'][$module]) && array_key_exists(str_replace('.', '-', $areaid), $config['modules'][$module]['areas'])) {\n $subscribedModuleAreaSettings = $config['modules'][$module]['areas'][str_replace('.', '-', $areaid)];\n if (array_key_exists('settings', $subscribedModuleAreaSettings)) {\n $default['forum'] = array_key_exists('forum', $subscribedModuleAreaSettings['settings']) ? $subscribedModuleAreaSettings['settings']['forum'] : $default['forum'];\n $default['topic_mode'] = array_key_exists('topic_mode', $subscribedModuleAreaSettings['settings']) ? $subscribedModuleAreaSettings['settings']['topic_mode'] : $default['topic_mode'];\n $default['delete_action'] = array_key_exists('delete_action', $subscribedModuleAreaSettings['settings']) ? $subscribedModuleAreaSettings['settings']['delete_action'] : $default['delete_action'];\n }\n }\n\n return $default;\n }", "title": "" } ]
[ { "docid": "e3ba0287a88679c977ade168e03ef684", "score": "0.657723", "text": "abstract public function get_settings();", "title": "" }, { "docid": "078eb65447f136b52562ee6915fa2b99", "score": "0.63125837", "text": "function on_load_options_page_get_settings() {\r\n\t//Numeric userid\r\n\tif( isset( $_GET['userid'] ) AND is_numeric( $_GET['userid'] ) ) {\r\n\t if( ! get_userdata( (int) $_GET['userid'] ) ) {\r\n\t\techo '<strong>'.__( 'The requested user does not exist.' , 'post-pay-counter' ).'</strong>';\r\n\t\treturn;\r\n\t }\r\n\r\n\t $settings = PPC_general_functions::get_settings( (int) $_GET['userid'], true );\r\n\r\n\t //User who never had personalized settings is being set, get rid of only-general settings\r\n\t if( $settings['userid'] == 'general' ) {\r\n\t\t $settings['userid'] = (int) $_GET['userid'];\r\n\t }\r\n\r\n\t /**\r\n\t * Filters general settings on new user's custom settings.\r\n\t *\r\n\t * When a user's settings are customized for the first time, general settings are taken and stripped of the only general ones (i.e. non-customizable options, such as the Miscellanea box).\r\n\t * It's crucial that all non-personalizable settings indexes are unset before handling/saving the user's settings.\r\n\t *\r\n\t * ~ This was changed in 2.516, with only user settings different from general ones are stored. ~\r\n\t *\r\n\t * @since\t2.0\r\n\t * @param\t$settings array PPC general settings\r\n\t */\r\n\t //$settings = apply_filters( 'ppc_unset_only_general_settings_personalize_user', $settings );\r\n\r\n\t//General\r\n\t} else {\r\n\t $settings = PPC_general_functions::get_settings( 'general' );\r\n\t}\r\n\r\n\t/**\r\n\t * Filters selected options page settings, final.\r\n\t *\r\n\t * They are stored in a class var and used throghout all the functions that need to know **what** settings we are displaying and using in the plugin options page.\r\n\t *\r\n\t * @since\t2.0\r\n\t * @param\t$settings PPC options settings\r\n\t */\r\n\t$settings = apply_filters( 'ppc_selected_options_settings', $settings );\r\n\r\n\tself::$options_page_settings = $settings; //store in class var\r\n }", "title": "" }, { "docid": "e4e31a9e4e74e9a6c2751be5468f4556", "score": "0.62589073", "text": "function egw_settings($hook_data);", "title": "" }, { "docid": "6fa2afe594b6350fbd058c7db99fa9bc", "score": "0.61949325", "text": "function get_setting() {\n global $CFG;\n return (isset($CFG->{$this->name}) ? $CFG->{$this->name} : NULL);\n }", "title": "" }, { "docid": "1cbe97c4afa6fee6320058c1b700c7fd", "score": "0.6137166", "text": "function opalservice_get_settings() {\n\n\t$settings = get_option( 'opalservice_settings' );\n\n\treturn (array) apply_filters( 'opalservice_get_settings', $settings );\n\n}", "title": "" }, { "docid": "1bb5050eb72b8b47b11e0bdd9bfffdb9", "score": "0.60717064", "text": "function getSettings();", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.60695213", "text": "public function getSettings();", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.60695213", "text": "public function getSettings();", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.60695213", "text": "public function getSettings();", "title": "" }, { "docid": "b17906485bb172798dfb82d6144d81ce", "score": "0.60611266", "text": "function simplehooks_get_option( $hook = null, $field = null, $all = false ) {\r\n\r\n\tstatic $options = array();\r\n\r\n\t$options = $options ? $options : get_option( Genesis_Simple_Hooks()->settings_field );\r\n\r\n\tif ( $all ) {\r\n\t\treturn $options;\r\n\t}\r\n\r\n\tif ( ! array_key_exists( $hook, (array) $options ) )\r\n\t\treturn '';\r\n\r\n\t$option = isset( $options[$hook][$field] ) ? $options[$hook][$field] : '';\r\n\r\n\treturn wp_kses_stripslashes( wp_kses_decode_entities( $option ) );\r\n\r\n}", "title": "" }, { "docid": "f3975e5345470885b885a76ae3f1b02b", "score": "0.6055477", "text": "public function get_settings()\n\t{\n\t\treturn $this->_EE->db->select('settings')\n\t\t ->where('enabled', 'y')\n\t\t ->where('class', 'Deployment_hooks_ext')\n\t\t ->limit(1)\n\t\t ->get('extensions');\n\t}", "title": "" }, { "docid": "e02ed61788c64e3c361c8358552bf377", "score": "0.6048601", "text": "public function get_callback() {\n\t\t$stored_configs = get_site_option( WP_SMUSH_PREFIX . self::OPTION_NAME, false );\n\n\t\tif ( false === $stored_configs ) {\n\t\t\t$stored_configs = array( $this->get_basic_config() );\n\t\t\tupdate_site_option( WP_SMUSH_PREFIX . self::OPTION_NAME, $stored_configs );\n\t\t}\n\t\treturn $stored_configs;\n\t}", "title": "" }, { "docid": "2f85842acb09827856eff67acd1d7ab8", "score": "0.6008765", "text": "public function get_settings()\n\t{\n\t\treturn $this->settings;\n\t}", "title": "" }, { "docid": "3e07359cfaa2796f1edbb4e34d25ce96", "score": "0.6006254", "text": "public function post_save_settings()\n {\n return ($fn = $this->get_bridge_method(__FUNCTION__))\n ? $this->call_ft($fn, $this->settings())\n : null;\n }", "title": "" }, { "docid": "932ebf3b9956bca41cb2d94849c7008b", "score": "0.5987895", "text": "public static function settings() {\n\t\tglobal $wpdb;\n\t\t\n\t\t$data = $wpdb->get_results(\"SELECT * FROM `ffi_be_settings` WHERE `ID` = '1'\");\n\t\treturn $data[0];\n\t}", "title": "" }, { "docid": "3c2648e4db2c20a8064e9ef071c3c4e6", "score": "0.5944115", "text": "public function getSettings()\n {\n if (array_key_exists(\"settings\", $this->_propDict)) {\n return $this->_propDict[\"settings\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "4f471164d4a75957febff854fe4371b1", "score": "0.58937085", "text": "public function getSetting()\n {\n return $this->setting;\n }", "title": "" }, { "docid": "4f471164d4a75957febff854fe4371b1", "score": "0.58937085", "text": "public function getSetting()\n {\n return $this->setting;\n }", "title": "" }, { "docid": "b67f4daf2f2c6aaf57e5c91cc9273a63", "score": "0.588321", "text": "public function get_settings () {\n\t\t# constant defined\n\t\tif (defined('SETTINGS')) {\n\t\t\tif ($this->settings === null || $this->settings === false) {\n\t\t\t\t$this->settings = json_decode(SETTINGS);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t# cache check\n\t\t\tif($this->settings === null) {\n\t\t\t\ttry { $settings = $this->Database->getObject(\"settings\", 1); }\n\t\t\t\tcatch (Exception $e) { $this->Result->show(\"danger\", _(\"Database error: \").$e->getMessage()); }\n\t\t\t\t# save\n\t\t\t\tif ($settings!==false)\t {\n\t\t\t\t\t$this->settings = $settings;\n\t\t\t\t\tdefine(SETTINGS, json_encode($settings));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2a60409c236ed644a82cf6bf6a27c272", "score": "0.58537275", "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// Get settings with help of our extension\n\t\tif ( ! class_exists('flickr_ext'))\n\t\t{\n\t\t\trequire_once(PATH_THIRD . 'flickr/ext.flickr.php');\n\t\t}\n\n\t\t$this->ext = new flickr_ext();\n\t\t$this->cache['settings'] = $this->ext->get_settings();\n\t}", "title": "" }, { "docid": "c30a41c32dee61db850603ab3ea234c0", "score": "0.5834361", "text": "function shiftr_get_setting( string $key = '' ) {\n return get_option( 'shiftr_' . $key );\n}", "title": "" }, { "docid": "6321bf40d37fdae708d5dff2a0995d23", "score": "0.58269", "text": "static function get_settings($hook_data)\n\t{\n\t\tif (!isset($hook_data['setup']))\n\t\t{\n\t\t\ttranslation::add_app('infolog');\n\t\t\t$infolog = new infolog_bo();\n\t\t\t$types = $infolog->enums['type'];\n\t\t}\n\t\tif (!isset($types))\n\t\t{\n\t\t\t$types = array(\n\t\t\t\t'task' => 'Tasks',\n\t\t\t);\n\t\t}\n\t\t$settings = array();\n\t\t$settings['infolog-types'] = array(\n\t\t\t'type' => 'multiselect',\n\t\t\t'label' => 'InfoLog types to sync',\n\t\t\t'name' => 'infolog-types',\n\t\t\t'help' => 'Which InfoLog types should be synced with the device, default only tasks.',\n\t\t\t'values' => $types,\n\t\t\t'default' => 'task',\n\t\t\t'xmlrpc' => True,\n\t\t\t'admin' => False,\n\t\t);\n\t\t$settings['infolog-cat-action'] = array(\n\t\t\t'type' => 'select',\n\t\t\t'label' => 'Action when category is an EMail address',\n\t\t\t'name' => 'infolog-cat-action',\n\t\t\t'help' => 'Allows to modify responsible users from devices not supporting them, by setting EMail address of a user as category.',\n\t\t\t'values' => array(\n\t\t\t\t'none' => lang('none'),\n\t\t\t\t'add' => lang('add user to responsibles'),\n\t\t\t\t'replace' => lang('add user to responsibles, removing evtl. previous category user'),\n\t\t\t\t'set' => lang('set user as only responsible, removing all existing responsibles'),\n\t\t\t\t'set-user' => lang('set user as only responsible user, but keeping groups'),\n\t\t\t),\n\t\t\t'default' => 'none',\n\t\t\t'xmlrpc' => True,\n\t\t\t'admin' => False,\n\t\t);\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "de9a9c79443706209eae3d22b4be8bb2", "score": "0.5810202", "text": "function get_setting($setting, $default = '')\n{\n return Admin::getSetting($setting, $default);\n}", "title": "" }, { "docid": "64b042e7acdcc224f2651c8fc6c35ca4", "score": "0.5800263", "text": "public function getSetting()\n\t{\n\t\treturn $this->_settings;\n\t}", "title": "" }, { "docid": "30e6da70fa2dcb4e95f42f61765f9ba6", "score": "0.5775774", "text": "function _eck_property_settings_callback($form, $form_state) {\n return $form['property']['settings'];\n}", "title": "" }, { "docid": "2128fae9d66289e70d305f6f29823e54", "score": "0.57623595", "text": "function community_directory_get_settings() {\n $settings = get_option( 'community_directory_settings' );\n\n if ( empty( $settings ) ) {\n // Update old settings with new single option.\n $settings = array();\n\n update_option( 'community_directory_settings', $settings );\n }\n\n return apply_filters( 'community_directory_get_settings', $settings );\n}", "title": "" }, { "docid": "24acfe259a87933034a6368fe8685c6d", "score": "0.5762251", "text": "function _get_setting($name) {\r\n if (isset($this->settings[$name])) {\r\n return $this->settings[$name];\r\n }\r\n return '';\r\n }", "title": "" }, { "docid": "15064222d712f481720377b20e7ee874", "score": "0.57503796", "text": "static function settings($hook_data)\n\t{\n\t\t$settings = array();\n\n\t\tif ($GLOBALS['egw_info']['user']['apps']['importexport'])\n\t\t{\n\t\t\t$definitions = new importexport_definitions_bo(array(\n\t\t\t\t'type' => 'export',\n\t\t\t\t'application' => 'resources'\n\t\t\t));\n\t\t\t$options = array(\n\t\t\t\t'~nextmatch~'\t=>\tlang('Old fixed definition')\n\t\t\t);\n\t\t\t$default_def = 'export-resources';\n\t\t\tforeach ((array)$definitions->get_definitions() as $identifier)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$definition = new importexport_definition($identifier);\n\t\t\t\t}\n\t\t\t\tcatch (Exception $e)\n\t\t\t\t{\n\t\t\t\t\t// permission error\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif ($title = $definition->get_title())\n\t\t\t\t{\n\t\t\t\t\t$options[$title] = $title;\n\t\t\t\t}\n\t\t\t\tunset($definition);\n\t\t\t}\n\t\t\t$settings['nextmatch-export-definition'] = array(\n\t\t\t\t'type' => 'select',\n\t\t\t\t'values' => $options,\n\t\t\t\t'label' => 'Export definition to use for nextmatch export',\n\t\t\t\t'name' => 'nextmatch-export-definition',\n\t\t\t\t'help' => lang('If you specify an export definition, it will be used when you export'),\n\t\t\t\t'run_lang' => false,\n\t\t\t\t'xmlrpc' => True,\n\t\t\t\t'admin' => False,\n\t\t\t\t'default'=> isset($options[$default_def]) ? $default_def : false,\n\t\t\t);\n\t\t}\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "c4bd76e3fad61fe37f8b456e78650605", "score": "0.573562", "text": "private function getSettings()\n {\n $configurationManager = GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Extbase\\\\Configuration\\\\ConfigurationManager');\n\n $typoScript = $configurationManager->getConfiguration(\n \\TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT\n );\n\n $settings = $typoScript['plugin.']['tx_hfu_opus.']['settings.'];\n\n return $settings;\n }", "title": "" }, { "docid": "15e48b07abf0efc32c4eef2c737700c2", "score": "0.57324713", "text": "function getSettingValue($setting)\n{\n // get default language\n $set = DB::queryFirstRow(\n \"SELECT `valeur` FROM \".prefix_table(\"misc\").\" WHERE type = %s AND intitule = %s\",\n \"admin\",\n $setting\n );\n\n return $set['valeur'];\n}", "title": "" }, { "docid": "54cafc3cfdf874cbffce0de104950636", "score": "0.5730783", "text": "public function get_plugin_settings() {\n\t\treturn $this->plugin_settings->get_settings( parent::get_plugin_settings() );\n\t}", "title": "" }, { "docid": "5fc591dae14b36b1565e595c6fa0cd1c", "score": "0.5726992", "text": "function eckextend_property_callback($form, &$form_state) {\n return $form['property']['settings'];\n}", "title": "" }, { "docid": "50e5899e081a29187d3437de9092cd16", "score": "0.57247156", "text": "public static function getToolSettings()\n {\n return self::$SETTINGS;\n }", "title": "" }, { "docid": "916435605cab66ddfd2f15d3f0e7d0e7", "score": "0.57202375", "text": "function morpheus_get_settings() {\r\n $settings = array_fill_keys( $this->settings, '' );\r\n // Now set the more specific defaults\r\n return $settings;\r\n }", "title": "" }, { "docid": "fe38e50e57d8a7f60be750cf16c384ff", "score": "0.57170755", "text": "public function get_settings() {\n\t\t$prefix = 'thimpress_events_';\n\n\t\t$allow_register_event = wpems_get_option( 'allow_register_event' );\n\n\t\treturn apply_filters( 'event_admin_setting_page_' . $this->id, array(\n\t\t\t// Currency\n\t\t\tarray(\n\t\t\t\t'type' => 'section_start',\n\t\t\t\t'id' => 'auth_currency_settings',\n\t\t\t\t'title' => __( 'General Options', 'wp-events-manager' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'yes_no',\n\t\t\t\t'title' => __( 'Event registration', 'wp-events-manager' ),\n\t\t\t\t'desc' => __( 'Allows user register events', 'wp-events-manager' ),\n\t\t\t\t'id' => $prefix . 'allow_register_event',\n\t\t\t\t'default' => 'yes'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'select',\n\t\t\t\t'title' => __( 'Currency', 'wp-events-manager' ),\n\t\t\t\t'desc' => __( 'This controls what the currency prices', 'wp-events-manager' ),\n\t\t\t\t'id' => $prefix . 'currency',\n\t\t\t\t'options' => wpems_currencies(),\n\t\t\t\t'default' => 'USD',\n\t\t\t\t'class' => 'setting-currency' . ( $allow_register_event == 'no' ? ' hide-if-js' : '' ) . apply_filters( 'tp_event_currency_setting_fields_class', '' )\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'select',\n\t\t\t\t'title' => __( 'Currency Position', 'wp-events-manager' ),\n\t\t\t\t'desc' => __( 'This controls the position of the currency symbol', 'wp-events-manager' ),\n\t\t\t\t'id' => $prefix . 'currency_position',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'left' => __( 'Left', 'wp-events-manager' ) . ' ' . '(£99.99)',\n\t\t\t\t\t'right' => __( 'Right', 'wp-events-manager' ) . ' ' . '(99.99£)',\n\t\t\t\t\t'left_space' => __( 'Left with space', 'wp-events-manager' ) . ' ' . '(£ 99.99)',\n\t\t\t\t\t'right_space' => __( 'Right with space', 'wp-events-manager' ) . ' ' . '(99.99 £)',\n\t\t\t\t),\n\t\t\t\t'default' => 'left',\n\t\t\t\t'class' => 'setting-currency-position' . ( $allow_register_event == 'no' ? ' hide-if-js' : '' ) . apply_filters( 'tp_event_currency_setting_fields_class', '' )\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'title' => __( 'Thousand Separator', 'wp-events-manager' ),\n\t\t\t\t'id' => $prefix . 'currency_thousand',\n\t\t\t\t'default' => ',',\n\t\t\t\t'class' => 'setting-currency-thousand' . ( $allow_register_event == 'no' ? ' hide-if-js' : '' ) . apply_filters( 'tp_event_currency_setting_fields_class', '' )\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'title' => __( 'Decimal Separator', 'wp-events-manager' ),\n\t\t\t\t'id' => $prefix . 'currency_separator',\n\t\t\t\t'default' => '.',\n\t\t\t\t'class' => 'setting-currency-separator' . ( $allow_register_event == 'no' ? ' hide-if-js' : '' ) . apply_filters( 'tp_event_currency_setting_fields_class', '' )\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'number',\n\t\t\t\t'title' => __( 'Number of Decimals', 'wp-events-manager' ),\n\t\t\t\t'id' => $prefix . 'currency_num_decimal',\n\t\t\t\t'atts' => array( 'step' => 'any' ),\n\t\t\t\t'default' => '2',\n\t\t\t\t'class' => 'setting-number-decimals' . ( $allow_register_event == 'no' ? ' hide-if-js' : '' ) . apply_filters( 'tp_event_currency_setting_fields_class', '' )\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'title' => __( 'Google Map API Key', 'wp-events-manager' ),\n\t\t\t\t'id' => $prefix . 'google_map_api_key',\n\t\t\t\t'desc' => __( 'Refer on https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key', 'wp-events-manager' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'type' => 'section_end',\n\t\t\t\t'id' => 'auth_currency_settings'\n\t\t\t),\n\t\t) );\n\t}", "title": "" }, { "docid": "29cd1f800a6e3bbdd5fe2ba150561084", "score": "0.57118666", "text": "function getsettings() {\r\n global $lib;\r\n\r\n return $lib->db->get_row(\"com_qrecycle_setting\");\r\n}", "title": "" }, { "docid": "fdda9cdeb87193ac4cc47407618a2705", "score": "0.57090455", "text": "public function settings() {\r\n\t\treturn $this->_settings;\r\n\t}", "title": "" }, { "docid": "9cb4775ccf42f196eb5e30d8728b8291", "score": "0.5704788", "text": "protected function getSettings() {\n return $this->pluginSettingsStorage->get();\n }", "title": "" }, { "docid": "ab14cbfa1c442800aeb25e54ece28e4a", "score": "0.5703853", "text": "public function getSettings()\n\t{\n\t\treturn $this->settings;\n\t}", "title": "" }, { "docid": "015cbcc7128d7a26eab61803b2ce1d71", "score": "0.5684947", "text": "private function getSettings() {\n\t\t$code = (version_compare(VERSION, '3.0', '<') ? '' : $this->type . '_') . $this->name;\n\t\t\n\t\t$settings = array();\n\t\t$settings_query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"setting WHERE `code` = '\" . $this->db->escape($code) . \"' ORDER BY `key` ASC\");\n\t\t\n\t\tforeach ($settings_query->rows as $setting) {\n\t\t\t$value = $setting['value'];\n\t\t\tif ($setting['serialized']) {\n\t\t\t\t$value = (version_compare(VERSION, '2.1', '<')) ? unserialize($setting['value']) : json_decode($setting['value'], true);\n\t\t\t}\n\t\t\t$split_key = preg_split('/_(\\d+)_?/', str_replace($code . '_', '', $setting['key']), -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\t\t\t\n\t\t\t\tif (count($split_key) == 1)\t$settings[$split_key[0]] = $value;\n\t\t\telseif (count($split_key) == 2)\t$settings[$split_key[0]][$split_key[1]] = $value;\n\t\t\telseif (count($split_key) == 3)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]] = $value;\n\t\t\telseif (count($split_key) == 4)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]] = $value;\n\t\t\telse \t\t\t\t\t\t\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]][$split_key[4]] = $value;\n\t\t}\n\t\t\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "8092cdec7ec91cb4de9cd4cc8b56de5d", "score": "0.5671503", "text": "function jet_woo_builder_shop_settings() {\n\treturn Jet_Woo_Builder_Shop_Settings::get_instance();\n}", "title": "" }, { "docid": "5999bf8082513063e03302cc3d628a5c", "score": "0.5666505", "text": "public function save_settings()\n {\n return ($fn = $this->get_bridge_method(__FUNCTION__))\n ? $this->call_ft($fn, $this->settings())\n : $this->settings();\n }", "title": "" }, { "docid": "ffa9756c084c6b60207b9276ef2fbd6b", "score": "0.5664913", "text": "function clpp_get_options($settings){\r\n\treturn get_option($settings);\r\n}", "title": "" }, { "docid": "44e5d91fd2232db8e8ae40c6ca7bd3bc", "score": "0.5656596", "text": "function get_settings_value( $key = '' ) {\n\t\tif ( isset( $this->settings_data[$key] ) ) return $this->settings_data[$key];\n\t}", "title": "" }, { "docid": "e8672309e15b0671b0dc60075de01722", "score": "0.5650591", "text": "function getSetting($setting){\n return $this->_settings[$setting];\n }", "title": "" }, { "docid": "79ce538109713a36d4ba330ea3ce4d5b", "score": "0.5631035", "text": "function get_user_setting()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER_SETTING);\r\n }", "title": "" }, { "docid": "cff27f1e7b94a8e780c923d134e36685", "score": "0.56304", "text": "function colabs_get_settings() {\n // Set the default to a blank string\n $settings = array_fill_keys( $this->settings, '' );\n // Now set the more specific defaults\n $settings['number'] = 3;\n return $settings;\n }", "title": "" }, { "docid": "dbc9629e680e8147a9edf665d368d084", "score": "0.5620073", "text": "public static function driftadm_get_settings() {\n\n $settings['menu_title'] = array(\n 'id' => 'menu_title',\n 'name' => __( 'Menu Title', 'drift-adm'),\n 'description' => __( 'Shown above the main Wordpress Menu.', 'drift-adm' ),\n 'type' => 'string',\n 'input_type' => 'text',\n 'section' => 'main_settings'\n );\n \n $settings['adm_theme'] = array(\n 'id' => 'adm_theme',\n 'name' => __( 'Theme', 'drift-adm' ),\n 'description' => __( 'Dark theme may cause layout errors on 3rd party plugin screens.', 'drift-adm' ),\n 'type' => 'boolean',\n 'input_type' => 'radio',\n 'radio_choices' => 2,\n 'choices' => self::$themes,\n 'section' => 'main_settings'\n );\n\n $settings['disable_wptoolbar'] = array(\n 'id' => 'disable_wptoolbar',\n 'name' => __( 'WP toolbar', 'drift-adm' ),\n 'description' => __( 'Disables default toolbar on front-end.', 'drift-adm' ),\n 'type' => 'boolean',\n 'input_type' => 'bool',\n 'section' => 'main_settings'\n );\n\n $settings['disable_wpfooter'] = array(\n 'id' => 'disable_wpfooter',\n 'name' => __( 'WP footer', 'drift-adm' ),\n 'description' => __( 'Disables the version and welcome message from footer.', 'drift-adm' ),\n 'type' => 'boolean',\n 'input_type' => 'bool',\n 'section' => 'main_settings'\n );\n \n $settings['login_bg_type'] = array(\n 'id' => 'login_bg_type',\n 'name' => __( 'Login Background', 'drift-adm' ),\n 'description' => __( 'Dimensions for the image to appear entirely are 400x400.', 'drift-adm' ),\n 'type' => 'string',\n 'input_type' => 'upload_img',\n 'section' => 'login_settings'\n );\n \n $settings['login_bg_img'] = array(\n 'id' => 'login_bg_img',\n 'name' => '',\n 'description' => '',\n 'type' => 'string',\n //'input_type' => 'hidden',\n 'section' => 'login_settings'\n );\n \n $settings['login_bg_color'] = array(\n 'id' => 'login_bg_color',\n 'name' => '',\n 'description' => '',\n 'type' => 'string',\n //'input_type' => 'hidden',\n 'section' => 'login_settings'\n );\n\n $settings['login_logo'] = array(\n 'id' => 'login_logo',\n 'name' => __( 'Login logo', 'drift-adm' ),\n 'description' => __( 'A logo to display on top of your login background.', 'drift-adm' ),\n 'type' => 'string',\n 'input_type' => 'login_logo',\n 'section' => 'login_settings'\n );\n\n return $settings;\n }", "title": "" }, { "docid": "d62c844f210ca21af6859cdd3e8ace81", "score": "0.5614314", "text": "public function getSettings($field)\n\t{\n\t\t$value = Mage::getStoreConfig('google/adwordsremarketingtags/' . $field);\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "af28870f476458f29892fd80021c4da2", "score": "0.5614232", "text": "public function get_setting_post() {\n try {\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 $setting_type = !empty($this->post_data['setting_type']) ? $this->post_data['setting_type'] : '';\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\n if (empty($this->user_id) || empty($setting_type)){\n $this->bad_request();\n }\n\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 'key' => 3\n );\n\n // 3 = if setting call for notification settings\n // 2 = if setting call for the data security \n // 1 = Share record\n if ($setting_type == 3) {\n $permission_data['module'] = 14;\n } else if (is_array($setting_type) && in_array(2, $setting_type)) {\n $permission_data['module'] = 17;\n } else if ($setting_type == 1) {\n $permission_data['module'] = 21;\n }\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 $setting_where = array(\n 'setting_user_id' => $this->user_id,\n 'setting_type' => $setting_type\n );\n\n\t\t\tif (!empty($clinic_id)) {\n\t\t\t $setting_where['setting_clinic_id'] = $clinic_id;\n\t\t\t}\n if(is_array($setting_type) && count($setting_type) > 0)\n $get_setting_data = $this->Common_model->get_user_setting($setting_where);\n else\n $get_setting_data = $this->Common_model->get_single_row(TBL_SETTING, '', $setting_where);\n if($setting_type == 1) {\n $setting_data_arr = json_decode($get_setting_data['setting_data']);\n $arr = array_column($setting_data_arr, 'name','id');\n if(empty($arr[8])){\n $res = array_slice($setting_data_arr, 0, 2, true) +\n array(8 => ['id'=>8,'name'=>'Only Diagnosis','status'=>'2']) +\n array_slice($setting_data_arr, 2, count($setting_data_arr) - 1, true) ;\n $get_setting_data['setting_data'] = json_encode(array_values($res));\n }\n $setting_data_arr = json_decode($get_setting_data['setting_data']);\n $arr = array_column($setting_data_arr, 'name','id');\n if(empty($arr[9])){\n $res = array_slice($setting_data_arr, 0, 4, true) +\n array(9 => ['id'=>9,'name'=>'Generic','status'=>'2']) +\n array_slice($setting_data_arr, 4, count($setting_data_arr) - 1, true) ;\n $get_setting_data['setting_data'] = json_encode(array_values($res));\n }\n }\n if($setting_type == 3) {\n $setting_data_arr = json_decode($get_setting_data['setting_data']);\n $arr = array_column($setting_data_arr, 'name','id');\n if(empty($arr[21])) {\n $whasapp_setting = [];\n $whasapp_setting[] = (object)[\n 'id' => 21,\n 'name' => 'patient_app_whatsapp_status',\n 'status' => \"1\",\n ];\n $whasapp_setting[] = (object)[\n 'id' => 22,\n 'name' => 'patient_can_whatsapp_status',\n 'status' => \"1\",\n ];\n $whasapp_setting[] = (object)[\n 'id' => 23,\n 'name' => 'patient_reschedule_whatsapp_status',\n 'status' => \"1\",\n ];\n $setting_data_arr = array_merge($setting_data_arr, $whasapp_setting);\n $get_setting_data['setting_data'] = json_encode($setting_data_arr);\n }\n if(empty($arr[24])) {\n $google_sync_setting = [];\n $google_sync_setting[] = (object)[\n 'id' => 24,\n 'name' => 'google_sync_status',\n 'status' => \"1\",\n ];\n $setting_data_arr = array_merge($setting_data_arr, $google_sync_setting);\n $get_setting_data['setting_data'] = json_encode($setting_data_arr);\n }\n if(empty($arr[25])) {\n $whasapp_setting = [];\n $whasapp_setting[] = (object)[\n 'id' => 25,\n 'name' => 'patient_book_notification_status',\n 'status' => \"1\",\n ];\n $whasapp_setting[] = (object)[\n 'id' => 26,\n 'name' => 'patient_cancel_notification_status',\n 'status' => \"1\",\n ];\n $whasapp_setting[] = (object)[\n 'id' => 27,\n 'name' => 'patient_reschedule_notification_status',\n 'status' => \"1\",\n ];\n $setting_data_arr = array_merge($setting_data_arr, $whasapp_setting);\n $get_setting_data['setting_data'] = json_encode($setting_data_arr);\n }\n $setting_where = array(\n 'setting_user_id' => $this->user_id,\n 'setting_type' => 12 //Patient register welcome email sms setting\n );\n $get_patient_setting_data = $this->Common_model->get_single_row(TBL_SETTING, '', $setting_where);\n if(empty($get_patient_setting_data)){\n $patient_setting_data = [\n [\"id\"=>1, \"name\"=>\"patient_register_sms_status\", \"status\"=>\"2\"],\n [\"id\"=>2, \"name\"=>\"patient_register_email_status\", \"status\"=>\"2\"],\n [\"id\"=>3, \"name\"=>\"patient_register_whatsapp_status\", \"status\"=>\"2\"],\n ];\n $insert_setting_array = array(\n 'setting_user_id' => $this->user_id,\n 'setting_data' => json_encode($patient_setting_data),\n 'setting_type' => 12,\n 'setting_data_type' => 1,\n 'setting_created_at' => $this->utc_time_formated\n );\n $this->Common_model->insert(TBL_SETTING, $insert_setting_array);\n $get_patient_setting_data = $this->Common_model->get_single_row(TBL_SETTING, '', $setting_where);\n }\n }\n if(!empty($get_patient_setting_data))\n $this->my_response['patient_setting_data'] = $get_patient_setting_data;\n if (!empty($get_setting_data)) {\n $this->my_response['status'] = true;\n $this->my_response['message'] = lang('common_detail_found');\n $this->my_response['data'] = $get_setting_data;\n } else {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('common_detail_not_found');\n }\n\n $this->send_response();\n } catch (ErrorException $ex) {\n $this->error = $ex->getMessage();\n $this->store_error();\n }\n }", "title": "" }, { "docid": "4e4e0db00d68a9856618f0c9cd33ca49", "score": "0.5613518", "text": "function getSetting($id) {\n\t\t\tglobal $bigtree;\n\t\t\t$id = sqlescape($id);\n\t\t\t$f = sqlfetch(sqlquery(\"SELECT * FROM bigtree_settings WHERE id = '$id'\"));\n\t\t\t// If the setting is encrypted, we need to re-pull just the value.\n\t\t\tif ($f[\"encrypted\"]) {\n\t\t\t\t$f = sqlfetch(sqlquery(\"SELECT AES_DECRYPT(`value`,'\".sqlescape($bigtree[\"config\"][\"settings_key\"]).\"') AS `value`, system FROM bigtree_settings WHERE id = '$id'\"));\n\t\t\t}\n\n\t\t\t$value = json_decode($f[\"value\"],true);\n\t\t\tif (is_array($value)) {\n\t\t\t\treturn BigTree::untranslateArray($value);\n\t\t\t} else {\n\t\t\t\treturn $this->replaceInternalPageLinks($value);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3b38885b5da7185775c16d0d4b40c5e4", "score": "0.5607309", "text": "function c($setting_name) {\n return get_instance()->config->item($setting_name);\n}", "title": "" }, { "docid": "5f2363c44985f1029ca16834bb7fb0c4", "score": "0.5582204", "text": "public function extraSettingHandler()\n {\n }", "title": "" }, { "docid": "7743c185e21fc2bc142dbd9e10bf4199", "score": "0.5573861", "text": "function cp_get_themeoption_value($para_val='',$get_option=''){\n\t\t$cp_general_settings = get_option($get_option);\n\t\tif($cp_general_settings <> ''){\n\t\t\t$cp_logo = new DOMDocument ();\n\t\t\t$cp_logo->loadXML ( $cp_general_settings );\n\t\t\treturn cp_find_xml_value($cp_logo->documentElement,$para_val);\n\t\t}else{\n\t\t\treturn $para_val;\n\t\t}\n\t}", "title": "" }, { "docid": "52119ee46d4e292cb19d92ca52e48a00", "score": "0.55729043", "text": "public function getSiteSettings();", "title": "" }, { "docid": "806ff62a97e1cdc0f1652b842863aa8f", "score": "0.5564489", "text": "public static function get_config () {\n\t\t\n\t\treturn self::get_instance()->settings;\n\t\t\n\t}", "title": "" }, { "docid": "10c67a798b40169ff56509417cfadbc4", "score": "0.55534774", "text": "public function getSetting($key = '');", "title": "" }, { "docid": "3495a4c3bdba581e97a37b191940a1d3", "score": "0.5543575", "text": "public function get($key) {\n if(array_key_exists($key, $this->settings)) {\n return $this->settings[$key];\n }\n return;\n }", "title": "" }, { "docid": "4db797c65e60ace3f5b6c0623f159649", "score": "0.55405104", "text": "function simplehooks_option($hook = null, $field = null) {\r\n\r\n\techo simplehooks_get_option( $hook, $field );\r\n\r\n}", "title": "" }, { "docid": "426a64ee093206e08aecb52aa8289a8a", "score": "0.55367637", "text": "function entity_settings_get_info($type = NULL, $setting = NULL, $reset = FALSE) {\n /** @var string $cid */\n $cid = 'entity_settings_info';\n /** @var string $hook */\n $hook = 'entity_setting_info';\n\n // Cached since used very often.\n static $drupal_static_fast;\n if (!isset($drupal_static_fast)) {\n $drupal_static_fast[$cid] = &drupal_static(__FUNCTION__);\n }\n $entity_settings_info = &$drupal_static_fast[$cid];\n if ($reset) {\n $entity_settings_info = array();\n entity_toolbox_cache_clear($cid);\n }\n if (empty($entity_settings_info)) {\n if ($cache = entity_toolbox_cache_get($cid)) {\n $entity_settings_info = $cache->data;\n }\n else {\n // Invokes and alters hook_entity_settings_info.\n $invoke = invoke_and_alter($hook);\n $buffer = array();\n foreach ($invoke as $entity_type => $settings) {\n $r_buffer = !empty($settings['regexp']) ? $settings['regexp'] : NULL;\n if (isset($r_buffer)) {\n unset($settings['regexp']);\n }\n foreach ($settings as $sid => $s_info) {\n $s_info += array(\n 'model' => concat($sid, '%entity_type%'),\n 'label' => machine_name2sentence($sid),\n 'description' => '',\n 'group' => 'global',\n );\n $buffer[$entity_type][$sid] = $s_info;\n }\n if ($entity_type == '*') {\n $buffer[$entity_type]['regexp'] = TRUE;\n }\n else {\n $buffer[$entity_type]['regexp'] = isset($r_buffer) ? $r_buffer : FALSE;\n }\n }\n\n $entity_settings_info = $buffer;\n entity_toolbox_cache_set($cid, $entity_settings_info);\n }\n }\n\n if (isset($type)) {\n $type_settings_info = !empty($entity_settings_info[$type]) ? $entity_settings_info[$type] + $entity_settings_info['*'] : $entity_settings_info['*'];\n\n return isset($setting) ? $type_settings_info[$setting] : $type_settings_info;\n }\n else {\n return $entity_settings_info;\n }\n}", "title": "" }, { "docid": "ae9b403c24214c82f41a45af61534add", "score": "0.55354553", "text": "public function GetSetting()\n\t{\n\t\treturn $this->_settings;\n\t}", "title": "" }, { "docid": "77b86957dd3ad91d2af792c190aeff26", "score": "0.55303603", "text": "function settings()\n\t\t{\n\t\t\tglobal $FNS;\n\n\t\t\t// set the base url so we can use it as the default for both fields\n\t\t\t$r = $FNS->create_url('');\n\t\t\t\n\t\t\t$settings = array();\n\t\t\t\n\t\t\t$settings['first_redirect'] = $r;\n\t\t\t$settings['normal_redirect'] = $r;\n\t\t\t\n\t\t\treturn $settings;\n\n\t\t}", "title": "" }, { "docid": "b7b56a93fd0a2d34f6f71ce7e3d47210", "score": "0.55233234", "text": "public function getSettings_post()\r\n\t{\r\n\t\t$SettingData = $this->Settings_model->getSettings($this->SessionUserID);\r\n\t\tif($SettingData){\r\n\t\t\t$this->Return['Data'] = $SettingData;\r\n\t\t}\t\r\n\t}", "title": "" }, { "docid": "7f4bb5b89a74bcd9e0b4c0e628137cc6", "score": "0.55024546", "text": "static function get_settings( $setting=false )\n {\n $rul_settings = array();\n\n // Setting this to 1 will make it so that you can redirect (login and logout) to any valid http or https URL, even outside of your current domain\n // Setting this to 2 will make it so that you can redirect (login and logout) to any URL you want (include crazy ones like data:), essentially bypassing the WordPress functions wp_sanitize_redirect() and wp_validate_redirect()\n // Setting this to 3 will make it so that you can only redirect (login and logout) to a local URL (one on the same domain). If you make use of the siteurl or homeurl custom variables, do not set this to 3\n $rul_settings['rul_local_only'] = 1;\n\n // Allow a POST or GET \"redirect_to\" variable to take precedence over settings within the plugin\n $rul_settings['rul_allow_post_redirect_override'] = false;\n\n // Allow a POST or GET logout \"redirect_to\" variable to take precedence over settings within the plugin\n $rul_settings['rul_allow_post_redirect_override_logout'] = false;\n\n // Set this to true if you're using a plugin such as Gigya that bypasses the regular WordPress redirect process (and only allow one fixed redirect URL)\n // Then, set that plugin to redirect to http://www.yoursite.com/wp-content/plugins/peters-login-redirect/wplogin_redirect_control.php\n // For more troubleshooting with this setting, make sure the paths are set correctly in wplogin_redirect_control.php\n $rul_settings['rul_use_redirect_controller'] = false;\n\n // To edit the redirect settings in the WordPress admin panel, users need this capability\n // Typically editors and up have \"manage_categories\" capabilities\n // See http://codex.wordpress.org/Roles_and_Capabilities for more information about out of the box capabilities\n $rul_settings['rul_required_capability'] = 'manage_categories';\n\n $rul_settings_from_options_table = rulRedirectFunctionCollection::get_settings_from_options_table();\n\n // Merge the default settings with the settings form the database\n // Limit the settings in case there are ones from the database that are old\n foreach( $rul_settings as $setting_name => $setting_value )\n {\n if( isset( $rul_settings_from_options_table[$setting_name] ) )\n {\n $rul_settings[$setting_name] = $rul_settings_from_options_table[$setting_name];\n }\n }\n if( !$setting )\n {\n return $rul_settings;\n }\n elseif( $setting && isset( $rul_settings[$setting] ) )\n {\n return $rul_settings[$setting];\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "5fe3df02b38255ad018ece070176422f", "score": "0.5496786", "text": "function getSettings($settings) {\r\n $this->reduceSettings();\r\n return array_merge_recursive($settings, $this->settings_array);\r\n }", "title": "" }, { "docid": "a731422e9f209cda3351cfc5c7f3cb11", "score": "0.5493532", "text": "function theme_settings_global_vars() {\n\n global $theme_settings;\n $theme_settings['currency'] = get_theme_mod( 'realestatepro_currency', esc_attr__( '$' ));\n $theme_settings['rental_period'] = get_theme_mod( 'realestatepro_rental_period', esc_attr__( ' pw' ));\n $theme_settings['buy_min_price'] = get_theme_mod( 'realestatepro_buy_min_price', 100000);\n $theme_settings['buy_max_price'] = get_theme_mod( 'realestatepro_buy_max_price', 2000000);\n $theme_settings['buy_increments'] = get_theme_mod( 'realestatepro_buy_increments', 25000);\n $theme_settings['rent_min'] = get_theme_mod( 'realestatepro_rent_min', 250);\n $theme_settings['rent_max'] = get_theme_mod( 'realestatepro_rent_max', 3500);\n $theme_settings['rent_increments'] = get_theme_mod( 'realestatepro_rent_increments', 250);\n\n \n}", "title": "" }, { "docid": "4528da8fb6070ff1c6239c34a5b1edc1", "score": "0.5489769", "text": "public function getSetting(string $name);", "title": "" }, { "docid": "54a3b0d90a06cc9d95f8223c49a774f8", "score": "0.5489264", "text": "public function get_settings() {\n\t\t$settings = parent::get_settings();\n\n\t\t$settings[] = 'multisafepay_connect';\n\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "04147a71385def22eb4af9501f840320", "score": "0.5482484", "text": "function get_wicket_settings(){\n $settings = [];\n $environment = get_option('wicket_admin_settings_environment');\n switch ($environment[0]) {\n case 'prod':\n $settings['api_endpoint'] = get_option('wicket_admin_settings_prod_api_endpoint');\n $settings['jwt'] = get_option('wicket_admin_settings_prod_secret_key');\n $settings['person_id'] = get_option('wicket_admin_settings_prod_person_id');\n $settings['parent_org'] = get_option('wicket_admin_settings_prod_parent_org');\n $settings['wicket_admin'] = get_option('wicket_admin_settings_prod_wicket_admin');\n break;\n default:\n $settings['api_endpoint'] = get_option('wicket_admin_settings_stage_api_endpoint');\n $settings['jwt'] = get_option('wicket_admin_settings_stage_secret_key');\n $settings['person_id'] = get_option('wicket_admin_settings_stage_person_id');\n $settings['parent_org'] = get_option('wicket_admin_settings_stage_parent_org');\n $settings['wicket_admin'] = get_option('wicket_admin_settings_stage_wicket_admin');\n break;\n }\n return $settings;\n}", "title": "" }, { "docid": "2227ff4a5a75a41f4536f6b1e6f730df", "score": "0.5482371", "text": "public function load_settings_values() {\n\t\t\tparent::load_settings_values();\n\n\t\t\tif ( false === $this->setting_option_values ) {\n\t\t\t\t$this->setting_option_values = get_option( 'learndash_custom_label_settings' );\n\t\t\t}\n\n\t\t\tif ( ( isset( $_GET['action'] ) ) && ( 'ld_reset_settings' === $_GET['action'] ) && ( isset( $_GET['page'] ) ) && ( $_GET['page'] === $this->settings_page_id ) ) {\n\t\t\t\tif ( ( isset( $_GET['ld_wpnonce'] ) ) && ( ! empty( $_GET['ld_wpnonce'] ) ) ) {\n\t\t\t\t\tif ( wp_verify_nonce( $_GET['ld_wpnonce'], get_current_user_id() . '-' . $this->setting_option_key ) ) {\n\t\t\t\t\t\tif ( ! empty( $this->setting_option_values ) ) {\n\t\t\t\t\t\t\tforeach ( $this->setting_option_values as $key => $val ) {\n\t\t\t\t\t\t\t\t$this->setting_option_values[ $key ] = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$this->save_settings_values();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$reload_url = remove_query_arg( array( 'action', 'ld_wpnonce' ) );\n\t\t\t\t\t\twp_safe_redirect( $reload_url );\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}", "title": "" }, { "docid": "cf70e21c9e9022cf20a51f3583499ac7", "score": "0.5480506", "text": "public function getData()\n {\n return $this->settings;\n }", "title": "" }, { "docid": "5250baafffd360bded5a065609c4d2f9", "score": "0.546856", "text": "function get_settings() {\n $option = get_option( 'fbgr2wp_settings', array() );\n\n // return if no configuration found\n if ( !isset( $option['app_id'] ) || !isset( $option['app_secret'] ) || !isset( $option['group_id'] ) ) {\n return false;\n }\n\n // no app id or app secret\n if ( empty( $option['app_id'] ) || empty( $option['app_secret'] ) ) {\n return false;\n }\n\n // no group id\n if ( empty( $option['group_id'] ) ) {\n return false;\n }\n\n return $option;\n }", "title": "" }, { "docid": "e303779ec8239e45591b164a0513d2a4", "score": "0.546403", "text": "function get_serialised_settings() {\n\t\t\t$settings = array();\n\t\t\tforeach ( $this->settings as $key => $val ) {\n\t\t\t\t$value = $this->get_setting( WP_SMUSH_PREFIX . $key );\n\t\t\t\tif ( 'auto' == $key && $value === false ) {\n\t\t\t\t\t$settings[ $key ] = 1;\n\t\t\t\t} else {\n\t\t\t\t\t$settings[ $key ] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$settings = maybe_serialize( $settings );\n\n\t\t\treturn $settings;\n\t\t}", "title": "" }, { "docid": "276fe9a45f44b6f8d802e702b2030043", "score": "0.5463273", "text": "function hookRegisterSettings() {\n\t\tforeach(fsCalendar::$plugin_options as $k => $v) {\n\t\t\tregister_setting('fse', $k);\n\t\t}\n\t\t/*register_setting('fse_global', 'fse_number');\n\t\tregister_setting('fse_global', 'fse_df_wp');\n\t\tregister_setting('fse_global', 'fse_df');\n\t\tregister_setting('fse_global', 'fse_tf_wp');\n\t\tregister_setting('fse_global', 'fse_tf');\n\t\tregister_setting('fse_global', 'fse_ws_wp');\n\t\tregister_setting('fse_global', 'fse_ws');\n\t\tregister_setting('fse_global', 'fse_df_admin');\n\t\tregister_setting('fse_global', 'fse_df_admin_sep');\n\t\tregister_setting('fse_global', 'fse_template');\n\t\tregister_setting('fse_global', 'fse_template_lst');\n\t\tregister_setting('fse_global', 'fse_show_enddate');\n\t\tregister_setting('fse_global', 'fse_groupby');\n\t\tregister_setting('fse_global', 'fse_groupby_header');\n\t\tregister_setting('fse_global', 'fse_page_create_notice');\n\t\t\n\t\tregister_setting('fse_sp', 'fse_page');\n\t\tregister_setting('fse_sp', 'fse_page_mark');\n\t\tregister_setting('fse_sp', 'fse_page_hide');\n\t\t\n\t\tregister_setting('fse_admin', 'fse_adm_gc_enabled');\n\t\tregister_setting('fse_admin', 'fse_adm_gc_mode');\n\t\tregister_setting('fse_admin', 'fse_adm_gc_show_week');\n\t\tregister_setting('fse_admin', 'fse_adm_gc_show_sel');\n\t\t\n\t\tregister_setting('fse_fc', 'fse_fc_tit_week_fmt');\n\t\tregister_setting('fse_fc', 'fse_fc_tit_month_fmt');\n\t\tregister_setting('fse_fc', 'fse_fc_tit_day_fmt');\n\t\tregister_setting('fse_fc', 'fse_fc_col_week_fmt');\n\t\tregister_setting('fse_fc', 'fse_fc_col_month_fmt');\n\t\tregister_setting('fse_fc', 'fse_fc_col_day_fmt');\n\t\tregister_setting('fse', 'fse_load_jquery');\n\t\tregister_setting('fse', 'fse_load_jqueryui');*/\n\t\t\n\t\t// add_settings_section($id, $title, $callback, $pagename\n\t\t\n\t\t// We do not need sections. We need different pages!\n\t\tadd_settings_section('fse_global', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array($this, 'hookSettingHeader_Global1'), \n\t\t\t\t\t\t\t 'fse_global');\n\t\t{\n\t\t\t// add_settings_field($id, $title, $callback, $pagename, $section);\n\t\t\tadd_settings_field('fse_number', \n\t\t\t\t\t\t\t __('Number of events<br /><small>Number of events to display by default.</small>', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_number'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global');\n\t\t\tadd_settings_field('fse_df', \n\t\t\t\t\t\t\t __('Date Format', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_df'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global');\n\t\t\tadd_settings_field('fse_tf', \n\t\t\t\t\t\t\t __('Time Format', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_tf'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global');\n\t\t\tadd_settings_field('fse_ws', \n\t\t\t\t\t\t\t __('Weeks starts on', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_ws'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global');\n\t\t\tadd_settings_field('fse_show_enddate', \n\t\t\t\t\t\t\t __('Show end date', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_show_enddate'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global');\n\t\t\tadd_settings_field('fse_allday_hide_time', \n\t\t\t\t\t\t\t __('Show time for all-day events', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_allday_hide_time'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global');\n\t\t}\n\t\t\n\t\tadd_settings_section('fse_global5', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingHeader_Global5'), \n\t\t\t\t\t\t\t 'fse_global');\n\t\t{\n\n\t\t}\n\t\t\t\t\t\n\t\tadd_settings_section('fse_global2', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingHeader_Global2'), \n\t\t\t\t\t\t\t 'fse_global');\n\t\t{\n\t\t\tadd_settings_field('fse_template', \n\t\t\t\t\t\t\t __('Template', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_template'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global2');\n\t\t\t\t\t\t\t \n\t\t\tadd_settings_field('fse_template_lst', \n\t\t\t\t\t\t\t __('Template for Listoutput', fsCalendar::$plugin_textdom).'<br /><small>'.__('The whole template is automatically surrounded by the &lt;li&gt; tag when a grouped list of events is created.', fsCalendar::$plugin_textdom).'</small>', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_template_lst'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global2');\n\t\t}\n\t\t\n\t\tadd_settings_section('fse_global3', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingHeader_Global3'), \n\t\t\t\t\t\t\t 'fse_global');\n\t\t{\n\t\t\tadd_settings_field('fse_groupby', \n\t\t\t\t\t\t\t __('Group by', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_groupby'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global3');\n\t\t\tadd_settings_field('fse_groupby_header', \n\t\t\t\t\t\t\t __('Header Format', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_groupby_header'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global3');\n\t\t}\n\t\t\n\t\tadd_settings_section('fse_global4', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingHeader_Global4'), \n\t\t\t\t\t\t\t 'fse_global');\n\t\t{\n\t\t\tadd_settings_field('fse_load_jquery', \n\t\t\t\t\t\t\t __('Loading of jQuery library', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_load_jquery'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global4');\n\t\t\tadd_settings_field('fse_load_jqueryui', \n\t\t\t\t\t\t\t __('Loading of jQuery UI library', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_load_jqueryui'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global4');\n\t\t\tadd_settings_field('fse_load_fc_libs', \n\t\t\t\t\t\t\t __('Loading of FullCalendar files', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_load_fc_libs'), \n\t\t\t\t\t\t\t 'fse_global', 'fse_global4');\n\t\t}\n\t\t\n\t\tadd_settings_section('fse_pagination', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingVoid'), \n\t\t\t\t\t\t\t 'fse_pagination');\n\t\t{\n\t\t\tadd_settings_field('fse_pagination', \n\t\t\t\t\t\t\t __('Enable pagination by default', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_pagination'), \n\t\t\t\t\t\t\t 'fse_pagination', 'fse_pagination');\n\t\t\tadd_settings_field('fse_pagination_prev_text', \n\t\t\t\t\t\t\t __('Text for prev link', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_pagination_prev_text'), \n\t\t\t\t\t\t\t 'fse_pagination', 'fse_pagination');\n\t\t\tadd_settings_field('fse_pagination_next_text', \n\t\t\t\t\t\t\t __('Text for next link', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_pagination_next_text'), \n\t\t\t\t\t\t\t 'fse_pagination', 'fse_pagination');\n\t\t\tadd_settings_field('fse_pagination_usedots', \n\t\t\t\t\t\t\t __('Appearance', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_pagination_usedots'), \n\t\t\t\t\t\t\t 'fse_pagination', 'fse_pagination');\n\t\t\tadd_settings_field('fse_pagination_end_size', \n\t\t\t\t\t\t\t __('Number of pages at the beginning/end', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_pagination_end_size'), \n\t\t\t\t\t\t\t 'fse_pagination', 'fse_pagination');\n\t\t\tadd_settings_field('fse_pagination_mid_size', \n\t\t\t\t\t\t\t __('Number of pages before/after current page', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_pagination_mid_size'), \n\t\t\t\t\t\t\t 'fse_pagination', 'fse_pagination');\n\t\t}\n\t\t\n\t\tadd_settings_section('fse_admin', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingVoid'), \n\t\t\t\t\t\t\t 'fse_admin');\n\t\t{\n\t\t\tadd_settings_field('fse_df_admin', \n\t\t\t\t\t\t\t __('Date Format for Admin Interface', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_df_admin'), \n\t\t\t\t\t\t\t 'fse_admin', 'fse_admin');\n\t\t\tadd_settings_field('fse_adm_gc_enabled', \n\t\t\t\t\t\t\t __('Date chooser', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_adm_gc_enabled'), \n\t\t\t\t\t\t\t 'fse_admin', 'fse_admin');\n\t\t\tadd_settings_field('fse_adm_default_start_time', \n\t\t\t\t\t\t\t __('Default start time', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_adm_default_start_time'), \n\t\t\t\t\t\t\t 'fse_admin', 'fse_admin');\n\t\t\tadd_settings_field('fse_adm_default_end_time', \n\t\t\t\t\t\t\t __('Default end time', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_adm_default_end_time'), \n\t\t\t\t\t\t\t 'fse_admin', 'fse_admin');\n\t\t\tadd_settings_field('fse_adm_gc_mode', \n\t\t\t\t\t\t\t __('Mode', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_adm_gc_mode'), \n\t\t\t\t\t\t\t 'fse_admin', 'fse_admin');\n\t\t\tadd_settings_field('fse_adm_gc_show_week', \n\t\t\t\t\t\t\t __('Week number', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_adm_gc_show_week'), \n\t\t\t\t\t\t\t 'fse_admin', 'fse_admin');\n\t\t\tadd_settings_field('fse_adm_gc_show_sel', \n\t\t\t\t\t\t\t __('Month/Year Selector', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_adm_gc_show_sel'), \n\t\t\t\t\t\t\t 'fse_admin', 'fse_admin');\n\t\t}\n\t\t\n\t\tadd_settings_section('fse_sp', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingHeader_SinglePage'), \n\t\t\t\t\t\t\t 'fse_sp');\n\t\t{\n\t\t\tadd_settings_field('fse_sp', \n\t\t\t\t\t\t\t __('Single view page', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_page'), \n\t\t\t\t\t\t\t 'fse_sp', 'fse_sp');\n\t\t}\n\t\t\n\t\tadd_settings_section('fse_fc', \n\t\t\t\t\t\t\t '', \n\t\t\t\t\t\t\t array(&$this, 'hookSettingHeader_Fc'), \n\t\t\t\t\t\t\t 'fse_fc');\n\t\t{\n\t\t\tadd_settings_field('fse_fc_tit_month_fmt', \n\t\t\t\t\t\t\t __('Title format month view', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_fc_tit_month_fmt'), \n\t\t\t\t\t\t\t 'fse_fc', 'fse_fc');\n\t\t\tadd_settings_field('fse_fc_tit_week_fmt', \n\t\t\t\t\t\t\t __('Title format week view', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_fc_tit_week_fmt'), \n\t\t\t\t\t\t\t 'fse_fc', 'fse_fc');\n\t\t\tadd_settings_field('fse_fc_tit_day_fmt', \n\t\t\t\t\t\t\t __('Title format day view', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_fc_tit_day_fmt'), \n\t\t\t\t\t\t\t 'fse_fc', 'fse_fc');\n\t\t\tadd_settings_field('fse_fc_col_month_fmt', \n\t\t\t\t\t\t\t __('Colum header format month view', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_fc_col_month_fmt'), \n\t\t\t\t\t\t\t 'fse_fc', 'fse_fc');\n\t\t\tadd_settings_field('fse_fc_col_week_fmt', \n\t\t\t\t\t\t\t __('Colum format week view', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_fc_col_week_fmt'), \n\t\t\t\t\t\t\t 'fse_fc', 'fse_fc');\n\t\t\tadd_settings_field('fse_fc_col_day_fmt', \n\t\t\t\t\t\t\t __('Colum format day view', fsCalendar::$plugin_textdom), \n\t\t\t\t\t\t\t array(&$this, 'hookSettingOption_fse_fc_col_day_fmt'), \n\t\t\t\t\t\t\t 'fse_fc', 'fse_fc');\n\t\t}\n\t}", "title": "" }, { "docid": "97da61093686eb31e6a24f4e24ac32d5", "score": "0.5459125", "text": "function wpo_settings( $unique, $key = false, $default = false ) {\n\t\treturn Options::settings( $unique, $key, $default );\n\t}", "title": "" }, { "docid": "1f778e1f6fbf1010b4de7f352e142839", "score": "0.5446476", "text": "public function init_settings() {\n $this->settings = [\n 'cache' => false,\n 'debug_data_block_name' => 'Debug',\n 'rendered_expire_time' => 7*60*60*24,\n 'json_url' => false,\n 'json_headers' => false,\n ];\n\n // loop through the settings and execute possible filters from functions\n foreach ( $this->settings as $key => $value ) {\n $this->settings[ $key ] = apply_filters( 'dustpress/settings/'. $key, $value );\n }\n\n // A hook to prevent DustPress error to appear in Yoast's sitemap\n add_filter( 'wpseo_build_sitemap_post_type', array( $this, 'disable' ), 1, 1 );\n\n // A hook to prevent DustPress error to appear when using WP Rest API\n add_action( 'rest_api_init', array( $this, 'disable' ), 1, 1 );\n\n // A hook to prevent DustPress error to appear when generating robots.txt\n add_action( 'do_robotstxt', array( $this, 'disable' ), 1, 1 );\n\n return null;\n }", "title": "" }, { "docid": "49c0e48ff3b5ee6887e864afc003edc1", "score": "0.5445583", "text": "function theme_options() {\n\tif ( !function_exists( 'of_get_option' ) ) {\n\t\tfunction of_get_option($name, $default = false) {\n\t\t\t$optionsframework_settings = get_option('optionsframework');\n\t\t\t\n\t\t\t// Gets the unique option id\n\t\t\t$option_name = $optionsframework_settings['id'];\n\t\t\tif ( get_option($option_name) ) {\n\t\t\t\t$options = get_option($option_name);\n\t\t\t}\n\t\t\tif ( isset($options[$name]) ) {\n\t\t\t\treturn $options[$name];\n\t\t\t} else {\n\t\t\t\treturn $default;\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "10efae88826264b4014bf1180b6216dc", "score": "0.5444311", "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": "aa2b71c3b2e11aeeafa968e800c62c1e", "score": "0.5441932", "text": "public function getSiteSetting(){ \n\t\t$this->Setting->recursive = 0;\n\t\t$settings = $this->Setting->find('all',array(\n\t\t\t'order' => array('Setting.sort_order ASC')\n\t\t));\n\n\t\tif (count($settings)) { \n\t\t\tforeach ($settings as $s) {\n\t\t\t\t$value = (empty($s['Setting']['value']))? $s['Setting']['default'] : $s['Setting']['value'];\n\t\t\t\tConfigure::write(\"Setting.{$s['Setting']['name']}\",$value); \n\t\t\t}\n\t\t} \n }", "title": "" }, { "docid": "b97ee9ac59dbfe00e0a29b36df652128", "score": "0.54379636", "text": "function get_subject_setting($setting) {\n\tstatic $return;\n\tif (!is_array($return)) {\n\t\t$return = array();\n\t}\n\n\tif ($return[$setting]) {\n\t\treturn $return[$setting];\n\t}\n\n\t$return[$setting] = elgg_get_plugin_setting($setting, PLUGIN_ID);\n\n\treturn $return[$setting];\n}", "title": "" }, { "docid": "210dfac3d0aba49173341b055f47b1e3", "score": "0.5434814", "text": "public function get_loader_setting($setting_value, $setting_id){\n\t\t\treturn ($this->page_enabled && !$this->is_customize && isset($this->page_settings[$setting_id])) ? $this->page_settings[$setting_id] : $setting_value;\n\t\t}", "title": "" }, { "docid": "e7eca2cd09ce743710601542838222a2", "score": "0.5431838", "text": "function thewire_tools_get_notification_settings($user_guid = 0) {\n\t\n\t$user_guid = (int) $user_guid;\n\tif (empty($user_guid)) {\n\t\t$user_guid = elgg_get_logged_in_user_guid();\n\t}\n\t\n\t$user = get_user($user_guid);\n\tif (empty($user)) {\n\t\treturn [];\n\t}\n\t\n\tif (elgg_is_active_plugin('notifications')) {\n\t\t$saved = elgg_get_plugin_user_setting('notification_settings_saved', $user->guid, 'thewire_tools');\n\t\tif (!empty($saved)) {\n\t\t\t$settings = elgg_get_plugin_user_setting('notification_settings', $user->guid, 'thewire_tools');\n\t\t\t\n\t\t\tif (!empty($settings)) {\n\t\t\t\treturn string_to_tag_array($settings);\n\t\t\t}\n\t\t\t\n\t\t\treturn [];\n\t\t}\n\t}\n\t\n\t// default elgg settings\n\t$settings = (array) $user->getNotificationSettings();\n\tif (empty($settings)) {\n\t\treturn [];\n\t}\n\t\n\t$result = [];\n\tforeach ($settings as $method => $value) {\n\t\tif (!empty($value)) {\n\t\t\t$result[] = $method;\n\t\t}\n\t}\n\t\n\treturn $result;\n}", "title": "" }, { "docid": "7b8723235c5424f74dc9a29d36f9b8c1", "score": "0.542907", "text": "function foundation_q_get_settings(){\n $settings = unserialize( FOUNDATION_SETTINGS );\n return $settings;\n}", "title": "" }, { "docid": "bf3ffa09c3831ee7d29ab6df8bb69e45", "score": "0.5427102", "text": "public function settings()\n\t\t {\n\t\t\n\t\t\t // Get settings.\n\t\t\t // Be certain channel_id is array.\n\t\t\t $query\t= ee()->db\n\t\t\t\t\t->select('settings')\n\t\t\t\t\t->where('class',$this->package_name.'_ext')\n\t\t\t\t\t->limit(1)\n\t\t\t\t\t->get('extensions');\n\t\t\t\t\t\n\t\t\t\t\tif($query->num_rows()>0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->settings = unserialize($query->row()->settings);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( isset($this->settings['channel_id']) && ! is_array($this->settings['channel_id']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->settings['channel_id'] = array();\n\t\t\t\t\t\t} \n\t\t\t\t\t\t\n\t\t\t\t\t} \n\t\t\n\t\t\treturn $this->settings;\n\t\t\t\n\t\t }", "title": "" }, { "docid": "b6892243aa1bd13e64f71959b0b52b9d", "score": "0.541741", "text": "function getSetting($key, $setting_type)\n{\n return App\\Settings::getSetting($key, $setting_type);\n}", "title": "" }, { "docid": "bca0e502058bd8859122cfcc53cd0f59", "score": "0.5414671", "text": "function get_job_alert_setting () {\n\t\t$default\t=\tarray(\n\t\t\t'mail' \t\t=> 100,\n\t\t\t'recurring'\t=> 'daily',\n\t\t\t'job'\t\t=> 5\n\t\t);\n\t\treturn get_option( 'je_job_alert_setting', $default);\n\t}", "title": "" }, { "docid": "2f65ce8c7e4f2f55991b794b7286ae18", "score": "0.54135936", "text": "public function getSettings(): string {\n return $this->_settings;\n }", "title": "" }, { "docid": "5ee374801dfb50f9eaa1f5109b393f02", "score": "0.54067326", "text": "function sm_settings($name)\n\t\t{\n\t\t\tglobal $sm;\n\t\t\treturn $sm['_s'][$name];\n\t\t}", "title": "" }, { "docid": "e27690a22b7b13f7391ba592ce950b31", "score": "0.5397498", "text": "public function getFieldSettings($setting_name, $module = 'smart_date_recur') {\n $entity_type = $this->entity_type->getString();\n $bundle = $this->bundle->getString();\n $field_name = $this->field_name->getString();\n $bundle_fields = \\Drupal::getContainer()->get('entity_field.manager')->getFieldDefinitions($entity_type, $bundle);\n $field_def = $bundle_fields[$field_name];\n if ($field_def instanceof FieldConfigInterface) {\n $value = $field_def->getThirdPartySetting($module, $setting_name);\n }\n elseif ($field_def instanceof BaseFieldDefinition) {\n // TODO: Document that for custom entities, you must enable recurring\n // functionality by adding ->setSetting('allow_recurring', TRUE)\n // to your field definition.\n $value = $field_def->getSetting($setting_name);\n }\n else {\n // Not sure what other method we can provide to define this.\n $value = FALSE;\n }\n return $value;\n }", "title": "" }, { "docid": "1e8a3ec6295baf7f646dc479418024e0", "score": "0.53820914", "text": "private static function getSettings()\n {\n $settings = fetch_row(\"SELECT `encryption_key`, `notification_email_address`, `terms_and_conditions`,\n `success_message`, `fail_message`, `success_email_body`, `fail_email_body`, `processed_message`, `payment_type`\n FROM `pmt_settings`\n WHERE `id` = '1'\n LIMIT 1\");\n\n return $settings;\n }", "title": "" }, { "docid": "405f9f8bdf36e014e5bea149cb74e57b", "score": "0.53793794", "text": "function pl_getset_option($key, $default = false) {\n\t\n\tglobal $global_pagelines_settings;\n\t\n\tif( is_array($global_pagelines_settings) && isset($global_pagelines_settings[$key]) )\n\t\treturn $global_pagelines_settings[$key];\n\n\telse{\t\n\t\tplupop( $key, $default );\n\t\treturn $default;\n\t}\n}", "title": "" }, { "docid": "56c1bb786655710b4e7b7c1a49cd1123", "score": "0.5379019", "text": "function grab_settings($site_id=FALSE)\n\t{\n\n\t\t$settings = array();\n\n\t\tif (isset($this->EE->session->cache['Tagger_Settings']) == TRUE)\n\t\t{\n\t\t\t$settings = $this->EE->session->cache['Tagger_Settings'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->EE->db->select('settings');\n\t\t\t$this->EE->db->where('module_name', 'Tagger');\n\t\t\t$query = $this->EE->db->get('exp_modules');\n\t\t\tif ($query->num_rows() > 0) $settings = unserialize($query->row('settings'));\n\t\t}\n\n\t\t$this->EE->session->cache['Tagger_Settings'] = $settings;\n\n\t\tif ($site_id)\n\t\t{\n\t\t\t$settings = isset($settings['site:'.$site_id]) ? $settings['site:'.$site_id] : array();\n\t\t}\n\n\t\t$conf = $this->EE->config->item('tagger_defaults');\n\t\t$settings = array_merge($conf, $settings);\n\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "b67254d43bf7dd9535a20302336b424a", "score": "0.53727543", "text": "function woocommerceSettingsAddon() { \n return Woocommerce_Addon_Settings::instance();\n}", "title": "" }, { "docid": "e47800b077d66f793a8d73d1846f1805", "score": "0.53721386", "text": "private function __settings() {\n\t\tif (!$this->settings = Plugin::getAllSettings('redirector')) {\n\t\t\tFlash::set('error', __('Unable to retrieve plugin settings.'));\n\t\t\tredirect(get_url('setting'));\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "517534a56e873d0447c578b904622a9a", "score": "0.53709894", "text": "function mbb_get_theme_settings( $key = '' ) {\n\t$mbb_theme_settings = get_option( 'mbb_theme_settings' );\n\tif ( ! empty( $mbb_theme_settings ) ) {\n\t\tif ( ! empty( $key ) && ! empty( $mbb_theme_settings[ $key ] ) ) {\n\t\t\treturn $mbb_theme_settings[ $key ];\n\t\t}\n\n\t\treturn $mbb_theme_settings;\n\t}\n}", "title": "" }, { "docid": "feb9dae5653da53b2f80cb827683aeec", "score": "0.5364356", "text": "public function meta_generator_config() {\n\t\t$_language = new Language();\n\t\t$_language->load($this->route);\n\t\t\n\t\t$_config = new Config();\n\t\t$_config->load($this->config_file);\n\t\t$generator_setting = ($_config->get($this->codename . '_meta_generator_setting')) ? $_config->get($this->codename . '_meta_generator_setting') : array();\n\t\t\t\t\n\t\tforeach ($generator_setting['sheet'] as $sheet) {\n\t\t\tif (substr($sheet['name'], 0, strlen('text_')) == 'text_') {\n\t\t\t\t$generator_setting['sheet'][$sheet['code']]['name'] = $_language->get($sheet['name']);\n\t\t\t}\n\t\t\t\t\n\t\t\tforeach ($sheet['field'] as $field) {\n\t\t\t\tif (substr($field['name'], 0, strlen('text_')) == 'text_') {\n\t\t\t\t\t$generator_setting['sheet'][$sheet['code']]['field'][$field['code']]['name'] = $_language->get($field['name']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (substr($field['description'], 0, strlen('help_')) == 'help_') {\n\t\t\t\t\t$generator_setting['sheet'][$sheet['code']]['field'][$field['code']]['description'] = $_language->get($field['description']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\tforeach ($sheet['button_popup'] as $button_popup) {\n\t\t\t\tif (substr($button_popup['name'], 0, strlen('text_')) == 'text_') {\n\t\t\t\t\t$generator_setting['sheet'][$sheet['code']]['button_popup'][$button_popup['code']]['name'] = $_language->get($button_popup['name']);\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\tforeach ($button_popup['field'] as $field) {\n\t\t\t\t\tif (substr($field['name'], 0, strlen('text_')) == 'text_') {\n\t\t\t\t\t\t$generator_setting['sheet'][$sheet['code']]['button_popup'][$button_popup['code']]['field'][$field['code']]['name'] = $_language->get($field['name']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\t\t\t\n\t\treturn $generator_setting;\n\t}", "title": "" }, { "docid": "4a49428c631964cc2bf3fffbe7ae2ff9", "score": "0.53564006", "text": "public function settings($value) {\n return $this->configFactory->get('sfgov_vaccine.settings')->get($value);\n }", "title": "" }, { "docid": "965aaf68f433d71693e52e7e433b1581", "score": "0.5354894", "text": "function mehtryx_php_debug_get_option(){\n\t// add options here...not used at this time.\n\t$defaults = array( 'first' => false, 'second' => '');\n\t$options = get_option( 'mehtryx_php_debug_config' );\n\tif ( is_array( $options ) ) \n\t\treturn array_merge( $defaults, $options );\n\telse\n\t\treturn $defaults;\n}", "title": "" }, { "docid": "f2cf2ba6d4dc01446180ade9863a6e5a", "score": "0.5354007", "text": "function kvell_edge_option_get_value($name) {\n global $kvell_php_global_options;\n global $kvell_php_global_Framework;\n\n if (array_key_exists($name, $kvell_php_global_Framework->edgtOptions->options)) {\n if (isset($kvell_php_global_options[$name])) {\n return $kvell_php_global_options[$name];\n } else {\n return $kvell_php_global_Framework->edgtOptions->getOption($name);\n }\n } else {\n global $post;\n\n if (!empty($post)) {\n $value = get_post_meta($post->ID, $name, true);\n }\n if (isset($value) && $value !== \"\") {\n return $value;\n } else {\n return $kvell_php_global_Framework->edgtMetaBoxes->getOption($name);\n }\n }\n}", "title": "" }, { "docid": "2c7d50f63d3e067315ed4be072c5985a", "score": "0.53512824", "text": "function wpautomate_theme_opt($keyname) {\n $theme_options = get_option( 'theme_options' );\n return $theme_options[$keyname];\n}", "title": "" }, { "docid": "aa3c09db7399cc3b604981751f43dd54", "score": "0.53458303", "text": "protected function getTypoScriptSettings() {\n\t\t$objectFactory = $this->getObjectFactory();\n\t\t$typoScript = $objectFactory->getAllTypoScript();\n\t\treturn $typoScript;\n\t}", "title": "" } ]
f737f1371c2ed358e43c4498e0e59114
Create Entitlement Grants Upload URL
[ { "docid": "31393e143ed8c8852dd50455561105ea", "score": "0.5716573", "text": "public function createEntitlementUrl(string $manifest, string $type = 'bulk_drops_grant'): Result\n {\n return $this->post('entitlements/upload', [\n 'manifest_id' => $manifest,\n 'type' => $type,\n ]);\n }", "title": "" } ]
[ { "docid": "0dd7541a0fe39057f56086001caa3b0a", "score": "0.5906372", "text": "private function getUrlEnpoint()\n {\n return $this->useAccount\n ? self::ACCOUNT_UPLOAD_ENPOINT\n : self::FREE_UPLOAD_ENPOINT;\n }", "title": "" }, { "docid": "f8466eaaab40d2376b7151b5513c227f", "score": "0.5732844", "text": "public function generateAuthorizationURL();", "title": "" }, { "docid": "9e61051ebc004b41b7bd36e82828934b", "score": "0.56781703", "text": "function AWARDS_IMAGE_UPLOAD_URL()\n\t{\n\t\treturn asset('admin/uploads/awards/image').\"/\";\n\t}", "title": "" }, { "docid": "4aa91f7ac53a52348cc65942486e631e", "score": "0.5634024", "text": "function createUploadedResourceUrl($url) {\n\n\tif (stristr($url, 'public://')) {\n\t\t$url = str_replace('public://', '/sites/dev-elvis.mos.org/files/', $url);\n\t}\n\n\treturn $url;\n}", "title": "" }, { "docid": "afdd405613c76c2cfce87a42f92bb05e", "score": "0.56248367", "text": "function USER_UPLOAD_URL()\n\t{\n\t\treturn STATIC_SITE_URL().'admin/uploads/user/profile_image'.\"/\";\n\t}", "title": "" }, { "docid": "e23161f717fdf7d90c0db22da3b29a14", "score": "0.5457813", "text": "function SOCIAL_MEDIA_UPLOAD_URL()\n\t{\n\t\treturn asset('admin/uploads/social').\"/\";\n\t}", "title": "" }, { "docid": "1b6c2b8a6a3168ca0b50fe66559fe2df", "score": "0.54048777", "text": "private function get_create_signature_url() {\n return new \\moodle_url('/blocks/quickmail/signatures.php', [\n 'courseid' => $this->course->id\n ]);\n }", "title": "" }, { "docid": "b76098b877b40d003526ac202c3ed94d", "score": "0.5395711", "text": "function BUSINESS_PAYMENTS_MEDIA_UPLOAD_URL()\n\t{\n\t\treturn asset('admin/uploads/business_payments').\"/\";\n\t}", "title": "" }, { "docid": "791eb229e89fa068b2716d69cee0e0a2", "score": "0.53659755", "text": "function SETTING_USER_COVER_UPLOAD_URL()\n\t{\n\t\treturn STATIC_SITE_URL().'admin/uploads/setting/user_cover'.\"/\";\n\t}", "title": "" }, { "docid": "75ef7a960c943e1a760b3d0a4760064a", "score": "0.5344205", "text": "function BANNER_UPLOAD_URL()\n\t{\n\t\treturn STATIC_SITE_URL().'admin/uploads/banner'.\"/\";\n\t}", "title": "" }, { "docid": "4bbdb17a0e18d8f96349a321fb80729e", "score": "0.5338639", "text": "public function generatePaymentURL(): string;", "title": "" }, { "docid": "9ad1090dfb9e6afe5918a037fadd60c6", "score": "0.52887046", "text": "abstract protected function getAuthorizationUrl();", "title": "" }, { "docid": "0e660417e64dad37b5805f55d2488df6", "score": "0.5287215", "text": "function CMS_UPLOAD_URL()\n\t{\n\t\treturn asset('admin/uploads/cms').\"/\";\n\t\t\n\t}", "title": "" }, { "docid": "a98114761e353cb6d2bfaea268b5994e", "score": "0.5233163", "text": "function SAMPLES_UPLOAD_URL()\n\t{\n\t\treturn STATIC_SITE_URL().'admin/samples'.\"/\";\n\t}", "title": "" }, { "docid": "73a23dd5f8971cd021efb8feea6ad14d", "score": "0.5228042", "text": "protected function getUploadPath()\n {\n return 'upload/resource/attach';\n }", "title": "" }, { "docid": "cfd3cfabc3f40a649d84b6b47c0a1df2", "score": "0.52141535", "text": "public function buildBackendUri() {}", "title": "" }, { "docid": "f3bb2ab6e2a916a4560ff6b75201f3d5", "score": "0.52110296", "text": "function upload_image_by_url($fetch, $to) {\r\n global $QINIU_ACCESS_KEY, $QINIU_SECRET_KEY, $BUCKET;\r\n $fetch = urlsafe_base64_encode($fetch);\r\n $to = urlsafe_base64_encode($BUCKET . ':' . $to); \r\n $url = 'http://iovip.qbox.me/fetch/'. $fetch .'/to/' . $to; \r\n $access_token = generate_access_token($QINIU_ACCESS_KEY, $QINIU_SECRET_KEY, $url); \r\n $header[] = 'Content-Type: application/json'; \r\n $header[] = 'Authorization: QBox '. $access_token; \r\n $con = send($url, $header);\r\n return $con;\r\n}", "title": "" }, { "docid": "def06f2a0d18f7a921e7fb49819be8b9", "score": "0.52085143", "text": "protected function generateURL()\n {\n $options = http_build_query(array_slice($this->options,0,5));\n $this->baseUrl = sprintf($this->baseUrl,$this->uID,$this->api,$options);\n return $this->baseUrl;\n }", "title": "" }, { "docid": "f54df648c04f46d1f801192573fd59f0", "score": "0.5191232", "text": "public function imageUrl()\n {\n return implode(DIRECTORY_SEPARATOR, [Yii::$app->urlManagerFrontend->baseUrl, self::UPLOAD_FOLDER, $this->type, $this->filename]);\n }", "title": "" }, { "docid": "ece33fc805cc1f13eeb68a727ef6a677", "score": "0.51895994", "text": "function upload_url($uri = \"\")\n\t{\n\t\t$url = strrev(strstr(strrev(trim(base_url(), \"/\")), \"/\"));\n\t\t$upload_url = $url.\"upload_files\".DIRECTORY_SEPARATOR;\n\t\treturn $upload_url.ltrim($uri, \"/\");\n\t}", "title": "" }, { "docid": "5ad5da9b843062d238684a3f00a64d6d", "score": "0.5155999", "text": "public function getImageUploadUrl()\n {\n return $this->getUrl('catalog/product_gallery/upload');\n }", "title": "" }, { "docid": "d159ef23f2abc6c86c4d2fff41695790", "score": "0.51539683", "text": "public function populateUploadLink()\n\t\t\t{\n\t\t\t\t$this->upload_link = false;\n\t\t\t\tif($this->CFG['site']['is_module_page'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$module = $this->CFG['site']['is_module_page'];\n\t\t\t\t\t}\n\t\t\t\telseif(chkAllowedModule(array(strtolower($this->CFG['admin']['site_menu_default_upload_link']))))\n\t\t\t\t\t{\n\t\t\t\t\t\t$module = $this->CFG['admin']['site_menu_default_upload_link'];\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($this->CFG['site']['modules_arr'] as $value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(chkAllowedModule(array(strtolower($value))))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$module = $value;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif(empty($module))\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\tif(isset($this->CFG['page_url'][$module.'uploadpopup']['normal']))\n\t\t\t\t\t$this->upload_link = getUrl($module.'uploadpopup', '', '', 'members', $module);\n\t\t\t}", "title": "" }, { "docid": "09fddb1eb5801919c9f54dde73d5b8f5", "score": "0.51457983", "text": "function gen_correct_upload_url() {\n return WP_CONTENT_BASE_URL . '/content/uploads';\n}", "title": "" }, { "docid": "1d6dc5056b5c82212223ce1349c45916", "score": "0.5130794", "text": "public function getCreationURL()\n {\n $customerURL = self::getCustomerURL();\n return $customerURL . 'creation/';\n }", "title": "" }, { "docid": "600f9cc583f66c6dc46a81eaecb3c29d", "score": "0.51272976", "text": "function CATEGORY_UPLOAD_URL()\n\t{\n\t\treturn asset('admin/uploads/category').\"/\";\n\t}", "title": "" }, { "docid": "942cacab9096444cef2fa68ad8ff1d70", "score": "0.51069653", "text": "function SETTING_HOME_PAGE_BANNER_UPLOAD_URL()\n\t{\n\t\treturn STATIC_SITE_URL().'admin/uploads/setting/home_page_banner'.\"/\";\n\t}", "title": "" }, { "docid": "24f2cc66348c1573b63b603f3dea5489", "score": "0.5098636", "text": "public function get_create_url() : string\n {\n }", "title": "" }, { "docid": "7e6eacf6befd5a08cc2bf2bf7f73c8ce", "score": "0.5098051", "text": "public function getUploadUrl() {\n\t\treturn $this->getFilesUrl($this->getUploadSegment());\n\t}", "title": "" }, { "docid": "b3df4864f854ae236c40c19c0272927b", "score": "0.5090358", "text": "public function get_url() {\n\t\t$url = '';\n\t\tif ($this->size) {\n\t\t\t$url .= (empty($url) ? '?' : '&') . 's=' . $this->size;\n\t\t}\n\t\tif ($this->rating) {\n\t\t\t$url .= (empty($url) ? '?' : '&') . 'r=' . $this->rating;\n\t\t}\n\t\tif ($this->default) {\n\t\t\t$url .= (empty($url) ? '?' : '&') . 'd=' . $this->default;\n\t\t}\n\t\treturn self::GRAVATAR_URL . $this->id . $url;\n\t}", "title": "" }, { "docid": "bf49fe3ba011ed193e0e2d59b861c5f0", "score": "0.5088639", "text": "function Trigger_ImageUpload(&$tNG) {\r\n $uploadObj = new tNG_ImageUpload($tNG);\r\n $uploadObj->setFormFieldName(\"image_illustrate\");\r\n $uploadObj->setDbFieldName(\"image_illustrate\");\r\n $uploadObj->setFolder(\"../uploads/services/{SESSION.kt_login_id}/\");\r\n $uploadObj->setMaxSize(5000);\r\n $uploadObj->setAllowedExtensions(\"jpg, jpe, jpeg, png, gif, bmp\");\r\n $uploadObj->setRename(\"auto\");\r\n return $uploadObj->Execute();\r\n}", "title": "" }, { "docid": "4896f7f8af3a6f89e9f93c081d430318", "score": "0.5083668", "text": "public function it_can_be_uploaded_as_a_url()\n {\n Storage::fake();\n\n $user = User::factory()->create();\n\n $response = $this->actingAs($user)->post(\"/dashboard/{$user->id}/image\", [\n 'image_url' => 'https://upload.wikimedia.org/wikipedia/commons/f/fb/Kalmia_Latifolia.jpg'\n ]);\n\n $this->assertDatabaseHas('avatars', [\n 'user_id' => auth()->id()\n ]);\n }", "title": "" }, { "docid": "be305c791d3e226d4f0d0981e51eee68", "score": "0.5076949", "text": "function USER_UPLOAD_BUSINESS_PHOTO_URL()\n\t{\t\n\t\treturn STATIC_SITE_URL().'admin/uploads/user/business_photos'.\"/\";\n\t}", "title": "" }, { "docid": "57b1f7bfdb08bd16890a89a7b91d781a", "score": "0.50698566", "text": "function curl_upload_file($file, $botlib_url) {\r\n $cmd = \"$curl --url $botlib_url\";\r\n}", "title": "" }, { "docid": "85dc84050507c0e02fa8c7cc50ff77fe", "score": "0.50632566", "text": "public function step_2_manage_upload()\n {\n }", "title": "" }, { "docid": "e42522654060f9395e1bd09948b5c5a6", "score": "0.5062104", "text": "public function alterAttachmentSrc()\n {\n return $this->getPublicBucketUrl() . '/wp-content/uploads';\n }", "title": "" }, { "docid": "614daf530dc4f3ac32d982e70f02ef78", "score": "0.5061193", "text": "function USER_UPLOAD_BUSINESS_URL()\n\t{\t\n\t\treturn STATIC_SITE_URL().'admin/uploads/user/business_logo'.\"/\";\t\t\n\t}", "title": "" }, { "docid": "80ce03d93297cf6f69be5bdb57413011", "score": "0.5049207", "text": "public function uploadAction(){\r\n \t//Then get the refer url\r\n global $user;\r\n \tif(!$user->uid){\r\n \t\tgotoUrl('');\r\n \t}\r\n \tif(key_exists('sn', $_POST) && $_POST['sn'] != ''){\r\n \t\t$this->_imageInstance->uploadImage($_POST['sn']);\r\n \t}else if(key_exists('pid', $_POST)){\r\n \t\t$productModel = Product_Model::getInstance();\r\n \t\t$product = $productModel->getProduct(null, array('id'=>$_POST['pid']));\r\n \t\tif($product){\r\n \t\t\t$this->_imageInstance->uploadImage($product->sn);\r\n \t\t}else{\r\n \t\t\t//no product exists, still not saved.\r\n \t\t\t$this->_imageInstance->uploadImage($_POST['pid']);\r\n \t\t}\r\n \t}\r\n }", "title": "" }, { "docid": "08e298956cee59d295307751907db2a3", "score": "0.5047234", "text": "public function process_get_attachmentment_url( $url ){\n $attachment_ID = $this->get_attachment_id_from_src( $url );\n $s3_upload = get_post_meta($attachment_ID, '_' . self::DOMAIN . '_upload' , true);\n if($s3_upload == 'true'){\n $url = $this->s3_base_url. '/' . $this->wp_relative_upload_url( $url );\n }\n return $url;\n }", "title": "" }, { "docid": "6a0b100a856b19b8886d0a7ea714e590", "score": "0.5042372", "text": "function Trigger_ImageUpload(&$tNG) {\r\n $uploadObj = new tNG_ImageUpload($tNG);\r\n $uploadObj->setFormFieldName(\"mbpro_avatar\");\r\n $uploadObj->setDbFieldName(\"mbpro_avatar\");\r\n $uploadObj->setFolder(\"../uploads/avatar/{SESSION.kt_login_id}/\");\r\n $uploadObj->setResize(\"true\", 100, 0);\r\n $uploadObj->setMaxSize(5000);\r\n $uploadObj->setAllowedExtensions(\"jpg, jpe, jpeg, png, bmp\");\r\n $uploadObj->setRename(\"auto\");\r\n return $uploadObj->Execute();\r\n}", "title": "" }, { "docid": "17a6b1a95e62160d89c37c9992ae013d", "score": "0.50402474", "text": "function addurl()\n\t{\n\t\tglobal $mainframe;\n\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken( 'request' ) or jexit( 'Invalid Token' );\n\n\t\t$return\t\t= JRequest::getVar( 'return-url', null, 'post', 'base64' );\n\t\t$filename\t= JRequest::getVar( 'file-url-data', null, 'post' );\n\t\t$altname\t= JRequest::getVar( 'file-url-display', null, 'post', 'string' );\n\t\t$ext\t\t= JRequest::getVar( 'file-url-ext', null, 'post', 'alnum' );\n\n\t\tjimport('joomla.utilities.date');\n\n\t\t// check if the form fields are not empty\n\t\tif (!$filename || !$altname)\n\t\t{\n\t\t\tJError::raiseNotice(1, JText::_( 'FLEXI_WARNFILEURLFORM' ));\n\t\t\tif ($return) {\n\t\t\t\t$mainframe->redirect(base64_decode($return).\"&\".JUtility::getToken().\"=1\");\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// we verifiy the url prefix and add http if any\n\t\tif (!eregi(\"^http|^https|^ftp\", $filename)) { $filename\t= 'http://'.$filename; }\n\t\t\n\t\t$db \t= &JFactory::getDBO();\n\t\t$user\t= &JFactory::getUser();\n\t\t$config = &JFactory::getConfig();\n\n\t\t$tzoffset = $config->getValue('config.offset');\n\t\t$date = & JFactory::getDate( 'now', -$tzoffset);\n\n\t\t$obj = new stdClass();\n\t\t$obj->filename \t\t\t= $filename;\n\t\t$obj->altname \t\t\t= $altname;\n\t\t$obj->url\t\t\t\t= 1;\n\t\t$obj->secure\t\t\t= 1;\n\t\t$obj->ext\t\t\t\t= $ext;\n\t\t$obj->hits\t\t\t\t= 0;\n\t\t$obj->uploaded\t\t\t= $date->toMySQL();\n\t\t$obj->uploaded_by\t\t= $user->get('id');\n\n\t\t$db->insertObject('#__flexicontent_files', $obj);\n\n\t\t$mainframe->enqueueMessage(JText::_( 'FLEXI_FILE_ADD_SUCCESS' ));\n\n\t\t$option = JRequest::getVar('option');\n\t\t$filter_item = $mainframe->getUserStateFromRequest( $option.'.fileselement.items', 'items', '', 'int' );\n\t\tif($filter_item) {\n\t\t\t$session = JFactory::getSession();\n\t\t\t$files = $session->get('fileselement.'.$filter_item, null);\n\n\t\t\tif(!$files) {\n\t\t\t\t$files = array();\n\t\t\t}\n\t\t\t$files[] = $db->insertid();\n\t\t\t$session->set('fileselement.'.$filter_item, $files);\n\t\t}\n\n\t\t// REDIRECT\n\t\tif ($return) {\n\t\t\t$mainframe->redirect(base64_decode($return).\"&\".JUtility::getToken().\"=1\");\n\t\t}\n\t}", "title": "" }, { "docid": "80a8cbb68ccc0b91e27d14d106a75b06", "score": "0.50387186", "text": "public function getWasUrl() \n {\n // return a default image placeholder if your source avatar is not found\n $avatar = isset($this->upload_file) ? $this->upload_file : '';\n return \\Yii::$app->params['uploadUrl'] . $avatar;\n }", "title": "" }, { "docid": "fe05e8ccbfab05ab5a46bdd087af8425", "score": "0.5024804", "text": "function newSubmission($firstName, $lastName, $fileToUpload, $description, $copyright, $access) {\n\t$jsonArray = file(\"galleryinfo.json\");\n\t$jsonString = \"\";\n\tforeach ($jsonArray as $line) $jsonString .= $line;\n\t$phparray = json_decode($jsonString, true);\n\t$phparray[] = array(\"firstName\" => $firstName, \"lastName\" => $lastName, \"fileToUpload\"=> $fileToUpload, \"description\" => $description, \"copyright\" => $copyright, \"access\" => $access, \"approved\" => false);\n\tfile_put_contents(\"galleryinfo.json\", json_encode($phparray, JSON_PRETTY_PRINT));\n}", "title": "" }, { "docid": "72708bf4684515bd8d361524b3074809", "score": "0.50232863", "text": "private function buildFileUrl(){\n\t\treturn $this->buildDownloadUrl(self::WORKFLOW_FILE_URL, self::WORKFLOW_FILE_EXTENSION);\n\t}", "title": "" }, { "docid": "78481cb46d9d41527a20a0a40e231221", "score": "0.5020165", "text": "private function getFileUploadUrl($entityTypeCode)\n {\n switch ($entityTypeCode) {\n case CustomerMetadataInterface::ENTITY_TYPE_CUSTOMER:\n $url = 'customer/file/customer_upload';\n break;\n\n case AddressMetadataInterface::ENTITY_TYPE_ADDRESS:\n $url = 'customer/file/address_upload';\n break;\n\n default:\n $url = '';\n break;\n }\n return $url;\n }", "title": "" }, { "docid": "f6625be60c54136336a31437155ecd7c", "score": "0.5007271", "text": "public function getCreationOkURL()\n {\n $customerURL = self::getCustomerURL();\n return $customerURL . 'success/';\n }", "title": "" }, { "docid": "0bd00a97a1608431be1d26e04651388a", "score": "0.49960345", "text": "public function getAdditionnalUrlPart(): string\n {\n return $this->object->getData('groupCode') . '/sell?token=' . $this->object->getData('token');\n }", "title": "" }, { "docid": "18fdd1cbda921684a51dc0fe262b4c02", "score": "0.49824452", "text": "private function uploadFolder()\n {\n return \"instagram/{$this->InstagramUserID}\";\n }", "title": "" }, { "docid": "84777e896c255706a58fce2bab209c19", "score": "0.49780658", "text": "function PicUrl($id, $size)\n{\n global $config;\n $f = MakePicFileBaseName($id, $size);\n return $config[\"UploadUrl\"] . \"pics/\" . $f;\n}", "title": "" }, { "docid": "78a3ae11ab7f6335b711e4d4356de677", "score": "0.49746603", "text": "public static function GetUploadsUrl(){\n // $url = asset('storage');\n /* Local Url */\n // $url = 'http://localhost/travoo-api/storage/uploads/';\n /* Travooo Site Url */\n $url = 'storage.travooo.com/';\n \n return $url;\n }", "title": "" }, { "docid": "6ebd6415a274fc1b17351a4c21100487", "score": "0.49711576", "text": "function BLOG_UPLOAD_URL()\n\t{\n\t\treturn asset('admin/uploads/blog').\"/\";\n\t}", "title": "" }, { "docid": "ed11b119fe5a57012c865629fb2bdab7", "score": "0.49618703", "text": "function get_file_url($entity, $fieldname, $size = NULL) {\r\n \r\n // handle icons seperately\r\n if ($fieldname == 'icon') {\r\n $path = \"icon/$entity->guid/\";\r\n }\r\n else {\r\n $path = \"files/$entity->guid/$fieldname/\";\r\n }\r\n \r\n // return file path\r\n\t$file = $entity->$fieldname;\r\n\tif ($file) {\r\n if ($size) {\r\n $path .= \"$size/\";\r\n }\r\n $path = elgg_get_site_url() . $path . $file;\r\n return $path;\r\n\t}\r\n\r\n\treturn '';\r\n}", "title": "" }, { "docid": "6fd8f7ad83aa4363fc2880889357bc50", "score": "0.49561363", "text": "public static function createUploadUrl($success_path, $options=array()) {\n $req = new CreateUploadURLRequest();\n $resp = new CreateUploadURLResponse();\n\n if (!is_string($success_path)) {\n throw new \\InvalidArgumentException('$success_path must be a string');\n }\n\n $req->setSuccessPath($success_path);\n\n if (array_key_exists('max_bytes_per_blob', $options)) {\n $val = $options['max_bytes_per_blob'];\n if (!is_int($val)) {\n throw new \\InvalidArgumentException(\n 'max_bytes_per_blob must be an integer');\n }\n if ($val < 1) {\n throw new \\InvalidArgumentException(\n 'max_bytes_per_blob must be positive.');\n }\n $req->setMaxUploadSizePerBlobBytes($val);\n }\n\n if (array_key_exists('max_bytes_total', $options)) {\n $val = $options['max_bytes_total'];\n if (!is_int($val)) {\n throw new \\InvalidArgumentException(\n 'max_bytes_total must be an integer');\n }\n if ($val < 1) {\n throw new \\InvalidArgumentException(\n 'max_bytes_total must be positive.');\n }\n $req->setMaxUploadSizeBytes($val);\n }\n\n if (array_key_exists('gs_bucket_name', $options)) {\n $val = $options['gs_bucket_name'];\n if (!is_string($val)) {\n throw new \\InvalidArgumentException('gs_bucket_name must be a string');\n }\n $req->setGsBucketName($val);\n } else {\n $bucket = BlobstoreService::getDefaultGoogleStorageBucketName();\n\n if (!$bucket) {\n throw new \\InvalidArgumentException(\n 'Application does not have a default Cloud Storage Bucket, ' .\n 'gs_bucket_name must be specified');\n }\n $req->setGsBucketName($bucket);\n }\n\n $extra_options = array_diff(array_keys($options),\n self::$create_upload_url_options);\n\n if (!empty($extra_options)) {\n throw new \\InvalidArgumentException('Invalid options supplied: ' .\n implode(',', $extra_options));\n }\n\n try {\n ApiProxy::makeSyncCall('blobstore', 'CreateUploadURL', $req, $resp);\n } catch (ApplicationError $e) {\n throw BlobstoreService::ApplicationErrorToException($e);\n }\n return $resp->getUrl();\n }", "title": "" }, { "docid": "59af2a704a007d6142cc803d37975d6c", "score": "0.4955171", "text": "public function getURLAttribute()\n {\n return url('/uploads/'.$this->image_name.'.'.$this->image_extension);\n }", "title": "" }, { "docid": "59af2a704a007d6142cc803d37975d6c", "score": "0.4955171", "text": "public function getURLAttribute()\n {\n return url('/uploads/'.$this->image_name.'.'.$this->image_extension);\n }", "title": "" }, { "docid": "795ab33eea13933e1ee49b03e9410b54", "score": "0.4955076", "text": "public function getImageUploadUrlAction(Request $request)\n {\n\n $contentType = $request->query->get('content-type');\n $ext = $request->query->get('ext');\n if( empty($contentType) || empty($ext) )\n {\n return UniversalHelper::getAjaxResponse(false,\"content-type and ext are required query params\");\n }\n\n $kuber = $this->get('kuber');\n $s3params = $kuber->getImageUploadUrlForHelpGuides( $contentType, $ext );\n\n return UniversalHelper::getAjaxResponse(true, [\n 'imageUrl' => $s3params['imageUrl'],\n 'signedUrl' => $s3params['signedUrl'],\n ]);\n }", "title": "" }, { "docid": "13a6b42616a0c1cc2f749db3bc0c3ef8", "score": "0.49547192", "text": "function getExternalUrl() {\n // Return the direct image.\n $parts = $this->parameters;\n return 'http://'. $parts['u'] . $this->base_url .'images/' . $parts['p'] .'/'. $parts['s'];\n }", "title": "" }, { "docid": "c2d00918555ebcdf7598e7dff806e4f5", "score": "0.49516276", "text": "protected function productBackImageUpload($request) {\n\n if ($request->hasFile('back_image')) {\n $productImage = $request->file('back_image');\n $imageExtension = $productImage->getClientOriginalExtension();\n $imageName = 'pi_'.rand(111, 999999).time().'.'.$imageExtension;\n $directory = 'uploads/product-image/';\n $image = Image::make($productImage);\n $image->resize(650, 700)->save($directory . $imageName); \n $imageUrl_back = $directory . $imageName;\n }else{\n $imageUrl_back = \"\";\n }\n return $imageUrl_back;\n }", "title": "" }, { "docid": "f9db15d854a5e9ec5532e2fe884a621f", "score": "0.49450678", "text": "public function getCreateCompanyAccountUrl()\n {\n return $this->getUrl('company/account/create');\n }", "title": "" }, { "docid": "efa9407622e0e0d3cdc98bc7d29098f3", "score": "0.49434328", "text": "function getBlobUrl($accountName,$container,$blob,$resourceType,$permissions,$expiry,$_signature)\n {\n /* Create the signed query part */\n $_parts = array();\n $_parts[] = (!empty($expiry))?'se=' . urlencode($expiry):'';\n $_parts[] = 'sr=' . $resourceType;\n $_parts[] = (!empty($permissions))?'sp=' . $permissions:'';\n $_parts[] = 'sig=' . urlencode($_signature);\n $_parts[] = 'sv=2014-02-14';\n\n /* Create the signed blob URL */\n $_url = 'https://'\n .$accountName.'.blob.core.windows.net/'\n . $container . '/'\n . $blob . '?'\n . implode('&', $_parts);\n\n return $_url;\n }", "title": "" }, { "docid": "8f97ae460c5b4578d5c176aa512f9493", "score": "0.4942677", "text": "public function getBaseAuthorizationUrl()\n {\n return 'https://www.fitbit.com/oauth2/authorize';\n }", "title": "" }, { "docid": "b07377e598ff223b248ab0ea98a54b2f", "score": "0.49349293", "text": "public function getSignedURL($validFor = \"15 minutes\"): string\n {\n return (string)$this->s3->createPresignedRequest(\n $this->s3->getCommand(\"GetObject\", [\n \"Bucket\" => $this->space_name,\n \"Key\" => $this->_filename,\n ]),\n $validFor\n )->getUri();\n }", "title": "" }, { "docid": "f809cc171aca96eeca1bca5609813018", "score": "0.49319103", "text": "public function alupload(){\n \t//die();\n \trequire_once(PLUGINS_PATH.'/aliyun/autoload.php');\n\n\t\t// 阿里云主账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维,请登录 https://ram.console.aliyun.com 创建RAM账号。\n\t\t$accessKeyId = \"LTAIBUQrnfEHh9hH\";\n\t\t$accessKeySecret = \"PfipJYzbcfjVHUSTYEcA1Cgi0eQeUx\";\n\t\t// Endpoint以杭州为例,其它Region请按实际情况填写。\n\t\t$endpoint = \"https://oss-cn-huhehaote-internal.aliyuncs.com\";\n\t\t// 存储空间名称\n\t\t$bucket= \"bogosignb5\";\n\t\t// 文件名称\n\t\t$object = \"o_1dh1029i61nnj1vkvr5e1es.ipa\";\n\t\t// <yourLocalFile>由本地文件路径加文件名包括后缀组成,例如/users/local/myfile.txt\n\t\t$filePath = \"upload/super_signature_ipa/o_1dh1029i61nnj1vkvr5e1es51paja.ipa\";\n\n\t\ttry{\n\t\t $ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint);\n\n\t\t $ossClient->uploadFile($bucket, $object, $filePath);\n\t\t} catch(OssException $e) {\n\t\t printf(__FUNCTION__ . \": FAILED\\n\");\n\t\t printf($e->getMessage() . \"\\n\");\n\t\t return;\n\t\t}\n\t\tprint(__FUNCTION__ . \": OK\" . \"\\n\");\n }", "title": "" }, { "docid": "570f0a88a37e50998a60116ef42ee5c7", "score": "0.49247414", "text": "public function getURL()\n\t{\n\t\treturn $this->_config['service'] .\n\t\t\t\t'?gravatar_id=' . md5(strtolower(trim($this->email))) .\n\t\t\t\t'&s=' . $this->_config['size'] .\n\t\t\t\t'&r=' . $this->_config['rating'];\n\t}", "title": "" }, { "docid": "a76ceacc5a7d4122ab11511804d056ac", "score": "0.49223876", "text": "private function url () {\t\t\n\t\treturn 'http://'.$this->defaults['url'].$this->region.$this->defaults['uri'].\"?\".$this->query_string.\"&Signature=\".$this->signature();\n\t}", "title": "" }, { "docid": "48c52140af0244e4b26d018ca3d3ad32", "score": "0.4910949", "text": "public function upload_ac_media_url() {\n\n\t\tif ( !wp_verify_nonce( $_POST['upload_ac_media_url_nonce'], 'upload_ac_media_url' ) ) {\n\t\t\twp_send_json_error( new WP_Error( 'upload_ac_media_url_nonce_error', __( \"Shenanigans are afoot. Bailing on upload...\" ) ), 401 );\n\t\t}\n\n\t\tif ( empty( $_POST['media_url'] ) || !filter_var( $_POST['media_url'], FILTER_VALIDATE_URL ) ) {\n\t\t\twp_send_json_error(new WP_Error( 'upload_ac_media_url_malformed_url_error', __( $_POST['media_url'] ) ), 400 );\n\t\t}\n\n\t\tif ( !current_user_can( 'author' ) && !current_user_can( 'administrator' ) ) {\n \t\twp_send_json_error( new WP_Error( 'upload_ac_media_url_permission_error', __( \"You don't have permission to play with that...\" ) ), 401 );\n \t}\n\n\t\t$id = self::process_media_url_upload( $_POST['media_url'], 0 );\n\n \tif ( !$id )\n\t\t\twp_send_json_error( new WP_Error( 'upload_ac_media_url_error', __( \"There was a problem with saving the URL.\" ) ), 400 );\n\n\t\twp_send_json_success( $id , 201 );\n\t}", "title": "" }, { "docid": "ccd401f7aa0ec9ebafd3a8aec34ba44d", "score": "0.4909625", "text": "function ssp_setup_upload_credentials() {\n\n\t\t$podmotor_account_id = get_option( 'ss_podcasting_podmotor_account_id', '' );\n\t\t$podmotor_account_email = get_option( 'ss_podcasting_podmotor_account_email', '' );\n\t\t$podmotor_array = ssp_podmotor_decrypt_config( $podmotor_account_id, $podmotor_account_email );\n\n\t\t$bucket = $podmotor_array['bucket'];\n\t\t$show_slug = $podmotor_array['show_slug'];\n\t\t$access_key_id = $podmotor_array['credentials_key'];\n\t\t$secret = $podmotor_array['credentials_secret'];\n\n\t\t$policy = base64_encode(\n\t\t\tjson_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'expiration' => date( 'Y-m-d\\TH:i:s.000\\Z', strtotime( '+1 day' ) ),\n\t\t\t\t\t// ISO 8601 - date('c'); generates incompatible date, so better do it manually\n\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\tarray( 'bucket' => $bucket ),\n\t\t\t\t\t\tarray( 'acl' => 'public-read' ),\n\t\t\t\t\t\tarray( 'starts-with', '$key', '' ),\n\t\t\t\t\t\tarray( 'starts-with', '$Content-Type', '' ),\n\t\t\t\t\t\t// accept all files\n\t\t\t\t\t\tarray( 'starts-with', '$name', '' ),\n\t\t\t\t\t\t// Plupload internally adds name field, so we need to mention it here\n\t\t\t\t\t\tarray( 'starts-with', '$Filename', '' ),\n\t\t\t\t\t\t// One more field to take into account: Filename - gets silently sent by FileReference.upload() in Flash http://docs.amazonwebservices.com/AmazonS3/latest/dev/HTTPPOSTFlash.html\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t$signature = base64_encode( hash_hmac( 'sha1', $policy, $secret, true ) );\n\t\t$episodes_url = SSP_CASTOS_EPISODES_URL;\n\n\t\treturn compact( 'bucket', 'show_slug', 'episodes_url', 'access_key_id', 'policy', 'signature' );\n\n\t}", "title": "" }, { "docid": "f05d2159952f77ea1427d1034c1ab3a1", "score": "0.49091148", "text": "public function getCreationSamplesPostURL()\n {\n $customerURL = self::getCustomerURL();\n return $customerURL . 'creationsamplespost/';\n }", "title": "" }, { "docid": "c6a980a8025cff6b0c36a8c97a5ed131", "score": "0.49018264", "text": "private function saveFileFromUrl($uid) {\n\t\t$source = $this->request->data['Attachment']['url'];\n\t\t$ext = pathinfo($source, PATHINFO_EXTENSION);\n\t\t$filename = String::uuid() . '.' . $ext;\n\t\t$dest = 'uploads' . DS . $uid . DS . $filename;\n\t\tfile_put_contents($dest, file_get_contents($source));\n\n\t\t$this->request->data['Attachment']['url'] = DS . $dest;\n\t}", "title": "" }, { "docid": "2c78f07cce27538d6afa43a87f8313c4", "score": "0.4900701", "text": "public function getFileUploadUrl()\n\t{\n\t\treturn Mage::helper('wordpress')->getFileUploadUrl();\n\t}", "title": "" }, { "docid": "17719f25fc472edc224d56548e78a510", "score": "0.48966357", "text": "public function getCreationSamplesURL()\n {\n $customerURL = self::getCustomerURL();\n return $customerURL . 'creationsamples/';\n }", "title": "" }, { "docid": "0d0e34d6d5542d06916e50c10d9b88e6", "score": "0.48941365", "text": "function get_uploads_url($user_id=0){\r\n\t\t$upload_dir = wp_upload_dir();\t\t\r\n\t\t$upload_base_url = $upload_dir['baseurl'] . '/bfi_thumb/';\r\n\r\n\t\t/*if ($user_id > 0) {\r\n\t\t\treturn $upload_base_url . $user_id . '/';\r\n\t\t}*/\r\n\t\treturn $upload_base_url;\r\n\t}", "title": "" }, { "docid": "5bc59b62465860f12ff7f11cb894dd01", "score": "0.48686364", "text": "public function GetSignedInUrl ();", "title": "" }, { "docid": "ed7c00a0396c3e3978fb325c4c92e8ee", "score": "0.4868134", "text": "function hook_file_download_access_alter(&$grants, $file_item, $entity_type, $entity) {\n // For our example module, we always enforce the rules set by node module.\n if (isset($grants['node'])) {\n $grants = array('node' => $grants['node']);\n }\n}", "title": "" }, { "docid": "954557bc7881a9755f4d983ce0775c7c", "score": "0.48681152", "text": "abstract public function getProfileURL();", "title": "" }, { "docid": "1cc5ac84791918922c59d5420bcb1230", "score": "0.48639706", "text": "public function getSecureBaseMediaUrl();", "title": "" }, { "docid": "01c486ee437a493addf24d20280630b9", "score": "0.48587117", "text": "function gratavarUrl($email) {\n\n\treturn \"http://www.gravatar.com/avatar/\" . md5($email) . \"?s=100\";\n}", "title": "" }, { "docid": "6ae273f7db873f053184c8e65ae7007c", "score": "0.48563758", "text": "function create_dp_url($url = null)\n {\n if (isset($url)) {\n return ADMIN_URI.$url;\n }\n return ADMIN_URI;\n }", "title": "" }, { "docid": "e320a4ccab698710b2cd79746e385b26", "score": "0.48515707", "text": "public function getAccessTokenUrl();", "title": "" }, { "docid": "81c5aabd9278b55790a1a3f85244a20e", "score": "0.48492077", "text": "public function ossUploadFile() {\n //$oss->uploadFile()\n }", "title": "" }, { "docid": "fbf1af7a6dee4e20c6cd65226118530e", "score": "0.48474285", "text": "protected function getUploadDir() {\n \treturn '/bundles/Immaginiuser';\n }", "title": "" }, { "docid": "b879cd53968c7269a79136dbb3b2cef5", "score": "0.48468447", "text": "protected function create_facebook_request_url($url){\n\n\t\t$base_url = 'https://graph.facebook.com/v2.7';\n\n\t\t$params = array(\n\t\t\t'id' => $url,\n\t\t\t'access_token' => $this->get_access_token()\n\t\t);\n\n\t\t$url = $base_url . '?' . http_build_query($params);\n\n\t\terror_log($url);\n\n\t\treturn $url;\n\n\t}", "title": "" }, { "docid": "aadc5379c65899f0be61c5c7eeaaa629", "score": "0.484541", "text": "function get_quota_url()\r\n {\r\n return $this->get_url(array(\r\n self :: PARAM_ACTION => self :: ACTION_VIEW_QUOTA,\r\n self :: PARAM_CATEGORY_ID => null));\r\n }", "title": "" }, { "docid": "812dda7a2423c088b0e210cb31c9d6d0", "score": "0.48450074", "text": "public function urlAuthorize()\n\t{\n\t\treturn 'https://unsplash.com/oauth/authorize';\n\t}", "title": "" }, { "docid": "bcc7115452a996c38ca1ed65e85ec407", "score": "0.48347118", "text": "public function getImageUploadUrl()\n {\n $frontUrl = UsniAdaptor::app()->getFrontUrl();\n $route = str_replace(APPLICATION_PATH, '', $this->imageUploadPath);\n return StringUtil::replaceBackSlashByForwardSlash($frontUrl . $route);\n }", "title": "" }, { "docid": "f130ef84052671e1e231ea2d8d74bc5e", "score": "0.48277634", "text": "function create_signed_url($asset_path, $private_key_filename, $key_pair_id, $expires){\n\t// Build the policy.\n\t$canned_policy = '{\"Statement\":[{\"Resource\":\"' . $asset_path . '\",\"Condition\":{\"DateLessThan\":{\"AWS:EpochTime\":'. $expires . '}}}]}';\n\n\t/*$canned_policy = '\n\t{\n\t\t\"Id\": \"Policy1440586376040\",\n\t\t\"Version\": \"2012-10-17\",\n\t\t\"Statement\": [\n\t\t\t{\n\t\t\t\t\"Sid\": \"Stmt1440586363543\",\n\t\t\t\t\"Action\": [\n\t\t\t\t\t\"s3:GetObject\"\n\t\t\t\t],\n\t\t\t\t\"Effect\": \"Allow\",\n\t\t\t\t\"Resource\": \"arn:aws:s3:::direct2consumer/*\",\n\t\t\t\t\"Principal\": {\n\t\t\t\t\t\"CanonicalUser\": [\n\t\t\t\t\t\t\"8a09356196995b1dc7ea047cf369b33d7ecdeb9c0e65fbdebcd3f52d17c2979c6fc14c8e7f7afa5f39d8ed644c677480\"\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}'; */\n\t \n\t// Sign the policy.\n\t$signature = rsa_sha1_sign($canned_policy, $private_key_filename);\n\n\t// Make the signature contains only characters that \n\t// can be included in a URL.\n\t$encoded_signature = url_safe_base64_encode($signature);\n\n\t// Combine the above into a properly formed URL name\n\treturn $asset_path . '?Expires=' . $expires . '&Signature=' . $encoded_signature . '&Key-Pair-Id=' . $key_pair_id;\n}", "title": "" }, { "docid": "54598afce52faff939ccec9b1f3d0db4", "score": "0.48236576", "text": "function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"Filedata\");\n $uploadObj->setDbFieldName(\"email\");\n $uploadObj->setFolder(\"../upload/\");\n $uploadObj->setResize(\"true\", 200, 200);\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "baa856cd4679862065341633251d8884", "score": "0.48188096", "text": "function type_url_form_file()\n{\n}", "title": "" }, { "docid": "334988fd3fe5e2a0ab618ef2961e583c", "score": "0.4816944", "text": "function makeFullURLForFiles($data) {\n\n if(is_array($data['files']) && !empty($data['files'])) {\n foreach($data['files'] as $data_key => $file) {\n $data['files'][$data_key] = $this->data_url . $this->encode($file);\n }\n } \n return $data;\n }", "title": "" }, { "docid": "1aa282fa7df73c87257aff3cbf823c2c", "score": "0.48105648", "text": "function bigbluebuttonbn_getJoinURL( $meetingID, $userName, $PW, $SALT, $URL ) {\n $url_join = $URL.\"api/join?\";\n $params = 'meetingID='.urlencode($meetingID).'&fullName='.urlencode($userName).'&password='.urlencode($PW);\n return ($url_join.$params.'&checksum='.sha1(\"join\".$params.$SALT) );\n}", "title": "" }, { "docid": "1aa282fa7df73c87257aff3cbf823c2c", "score": "0.48105648", "text": "function bigbluebuttonbn_getJoinURL( $meetingID, $userName, $PW, $SALT, $URL ) {\n $url_join = $URL.\"api/join?\";\n $params = 'meetingID='.urlencode($meetingID).'&fullName='.urlencode($userName).'&password='.urlencode($PW);\n return ($url_join.$params.'&checksum='.sha1(\"join\".$params.$SALT) );\n}", "title": "" }, { "docid": "59b891b9f6f5280f2755236d7716cb6e", "score": "0.48103747", "text": "private function proccesssignup($user_object, $address_object){\n //Get driving license or passport file extension\n $drivingLicenseOrPassportFileExt = pathinfo($_FILES[\"drivingLicenseOrPassportFile\"][\"name\"], PATHINFO_EXTENSION);\n //Upload driving license or passport and store file name, so it can be used to unlink if error takes place\n $drivingLicenseOrPassportFileName = \"\";\n $drivingLicenseOrPassportFileObject = array();\n //Set a flag to store if upload was successfull\n $drivingLicenseOrPassportFileUploadStatus = false;\n //Check if the file type is either pdf|doc\n if($drivingLicenseOrPassportFileExt == \"pdf\" || $drivingLicenseOrPassportFileExt == \"doc\"){\n //User is uploading a document type either pdf or doc\n $drivingLicenseOrPassportFileName = $this->uploadAndResizeDocument(\"drivingLicenseOrPassportFile\", \"account_documents\", $user_object['id'], \"proof_of_id\");\n //Set upload flag to true\n if($drivingLicenseOrPassportFileName != false){\n $drivingLicenseOrPassportFileUploadStatus = true;\n //echo \"<br>drivingLicenseOrPassportFileUploadStatus true\";\n $drivingLicenseOrPassportFileObject = array(\n \"image_url\" => $drivingLicenseOrPassportFileName,\n \"document_type\" => \"proof_of_id\",\n \"approved\" => '0',\n \"userid\" => $user_object['id']\n );\n }\n //Check if the file type is either jpg|png|jpeg\n }else if($drivingLicenseOrPassportFileExt == \"jpg\" || $drivingLicenseOrPassportFileExt == \"png\" || $drivingLicenseOrPassportFileExt == \"jpeg\"){\n //User is uploading a image\n $drivingLicenseOrPassportFileName = $this->uploadAndResizeImage(\"drivingLicenseOrPassportFile\", \"account_documents\", $user_object['id'], \"proof_of_id\");\n //Set upload flag to true\n if($drivingLicenseOrPassportFileName != false){\n $drivingLicenseOrPassportFileUploadStatus = true;\n //echo \"<br>drivingLicenseOrPassportFileUploadStatus true\";\n $drivingLicenseOrPassportFileObject = array(\n \"image_url\" => $drivingLicenseOrPassportFileName,\n \"document_type\" => \"proof_of_id\",\n \"approved\" => '0',\n \"userid\" => $user_object['id']\n );\n }\n }else{\n //This means user may have tweaked the file using some plugin or malicious attack/attempt to upload invalid file and fool the system\n $drivingLicenseOrPassportFileUploadStatus = false;\n //Set file name for deletion\n $drivingLicenseOrPassportFileName = \"proof_of_id_\".$user_object['id'].\".\".$drivingLicenseOrPassportFileExt;\n }\n\n //Get utility bill file extension\n $utilityBillFileExt = pathinfo($_FILES[\"utilityBillFile\"][\"name\"], PATHINFO_EXTENSION);\n //Upload utility bill and store file name, so it can be used to unlink if error takes place\n $utilityBillFileFileName = \"\";\n $utilityBillFileFileObject = array();\n //Set a flag to store if upload was successfull\n $utilityBillFileStatus = false;\n //Check if the file type is either pdf|doc\n if($utilityBillFileExt == \"pdf\" || $utilityBillFileExt == \"doc\"){\n //User is uploading a document type either pdf or doc\n $utilityBillFileFileName = $this->uploadAndResizeDocument(\"utilityBillFile\", \"account_documents\", $user_object['id'], \"utility_bill\");\n //Set upload flag to true\n if($utilityBillFileFileName != false){\n $utilityBillFileStatus = true;\n //echo \"<br>utilityBillFileStatus true\";\n $utilityBillFileFileObject = array(\n \"image_url\" => $utilityBillFileFileName,\n \"document_type\" => \"utility_bill\",\n \"approved\" => '0',\n \"userid\" => $user_object['id']\n );\n }\n //Check if the file type is either jpg|png|jpeg\n }else if($utilityBillFileExt == \"jpg\" || $utilityBillFileExt == \"png\" || $utilityBillFileExt == \"jpeg\"){\n //User is uploading a image\n $utilityBillFileFileName = $this->uploadAndResizeImage(\"utilityBillFile\", \"account_documents\", $user_object['id'], \"utility_bill\");\n //Set upload flag to true\n if($utilityBillFileFileName != false){\n $utilityBillFileStatus = true;\n //echo \"<br>utilityBillFileStatus true\";\n $utilityBillFileFileObject = array(\n \"image_url\" => $utilityBillFileFileName,\n \"document_type\" => \"utility_bill\",\n \"approved\" => '0',\n \"userid\" => $user_object['id']\n );\n }\n }else{\n //This means user may have tweaked the file using some plugin or malicious attack/attempt to upload invalid file and fool the system\n $utilityBillFileStatus = false;\n //Set file name for deletion\n $utilityBillFileFileName = \"utility_bill\".$user_object['id'].\".\".$utilityBillFileExt;\n }\n\n //Get bank statement file extension\n $bankStatementFileExt = pathinfo($_FILES[\"bankStatementFile\"][\"name\"], PATHINFO_EXTENSION);\n //Upload bank statement and store file name, so it can be used to unlink if error takes place\n $bankStatementFileName = \"\";\n $bankStatementFileObject = array();\n //Set a flag to store if upload was successfull\n $bankStatementFileStatus = false;\n //Check if the file type is either pdf|doc\n if($bankStatementFileExt == \"pdf\" || $bankStatementFileExt == \"doc\"){\n //User is uploading a document type either pdf or doc\n $bankStatementFileName = $this->uploadAndResizeDocument(\"bankStatementFile\", \"account_documents\", $user_object['id'], \"bank_statement\");\n //Set upload flag to true\n if($bankStatementFileName != false){\n $bankStatementFileStatus = true;\n //echo \"<br>bankStatementFileStatus true\";\n $bankStatementFileObject = array(\n \"image_url\" => $bankStatementFileName,\n \"document_type\" => \"bank_statement\",\n \"approved\" => '0',\n \"userid\" => $user_object['id']\n );\n }\n //Check if the file type is either jpg|png|jpeg\n }else if($bankStatementFileExt == \"jpg\" || $bankStatementFileExt == \"png\" || $bankStatementFileExt == \"jpeg\"){\n //User is uploading a image\n $bankStatementFileName = $this->uploadAndResizeImage(\"bankStatementFile\", \"account_documents\", $user_object['id'], \"bank_statement\");\n //Set upload flag to true\n if($bankStatementFileName != false){\n $bankStatementFileStatus = true;\n //echo \"<br>bankStatementFileStatus true\";\n $bankStatementFileObject = array(\n \"image_url\" => $bankStatementFileName,\n \"document_type\" => \"bank_statement\",\n \"approved\" => '0',\n \"userid\" => $user_object['id']\n );\n }\n }else{\n //This means user may have tweaked the file using some plugin or malicious attack/attempt to upload invalid file and fool the system\n $bankStatementFileStatus = false;\n //Set file name for deletion\n $bankStatementFileName = \"bank_statement\".$user_object['id'].\".\".$bankStatementFileExt;\n }\n //Check to make sure all three files have been uploaded successfully\n //$drivingLicenseOrPassportFileUploadStatus, $utilityBillFileStatus, $bankStatementFileStatus\n if($drivingLicenseOrPassportFileUploadStatus == true && $utilityBillFileStatus == true && $bankStatementFileStatus == true){\n //Do some magic here\n echo \"<hr>All three files have been uploaded successfully\";\n //Insert user object into db\n if($this->UserModel->insertIntoUser($user_object)){\n echo \"<br>User inserted successfully\";\n if($this->AddressModel->insertIntoAddress($address_object)){\n echo \"<br>Address inserted successfully\";\n \n $amount_to_update = $this->currencyExchanger(0);\n //$amount_to_update = 10;\n $docProofIDInserted = false;\n if($this->DocumentModel->insertIntoDocument($drivingLicenseOrPassportFileObject)){\n echo \"<br>proof_of_id inserted successfully\";\n $docProofIDInserted = true;\n }\n\n $docUtilityBillInserted = false;\n if($this->DocumentModel->insertIntoDocument($utilityBillFileFileObject)){\n echo \"<br>proof_of_id inserted successfully\";\n $docUtilityBillInserted = true;\n }\n\n $docBankStatementInserted = false;\n if($this->DocumentModel->insertIntoDocument($bankStatementFileObject)){\n echo \"<br>proof_of_id inserted successfully\";\n $docBankStatementInserted = true;\n }\n\n //Check if all documents objects have been inserted\n //Send login credentials to be verified and log the user into the system\n if($docProofIDInserted == true && $docUtilityBillInserted == true && $docBankStatementInserted == true){\n $this->session->set_flashdata('reg_success', 'User have been added successfully!');\n }else{\n $this->session->set_flashdata('reg_error', 'Could not add user!');\n }\n redirect('admin/users'); \n }\n }\n }else{\n //Delete / unlink files something went wrong and files/documents couldn't be uploaded\n //Delete proof_of_id\n $this->deletefile(\"assets/account_documents\", $drivingLicenseOrPassportFileName);\n //echo \"<br>Deleting \" .$drivingLicenseOrPassportFileName;\n //Delete utility_bill\n $this->deletefile(\"assets/account_documents\", $utilityBillFileFileName);\n //echo \"<br>Deleting \" .$utilityBillFileFileName;\n //Delete bank_statement\n $this->deletefile(\"assets/account_documents\", $bankStatementFileName);\n //echo \"<br>Deleting \" .$bankStatementFileName;\n }\n }", "title": "" }, { "docid": "bb0db3bac3e9a724ca5c19d08921b358", "score": "0.48092642", "text": "function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"rsocial_img\");\n $uploadObj->setDbFieldName(\"rsocial_img\");\n $uploadObj->setFolder(\"../dados/\");\n $uploadObj->setResize(\"false\", 32, 32);\n $uploadObj->setMaxSize(1024);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"custom\");\n $uploadObj->setRenameRule(\"icon{rs_upload.arquivo}.{KT_ext}\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "1595c1510bc22e37cd5da15e956bbd0a", "score": "0.48059556", "text": "function crearUpload ($accessToken, $recursos) {\n\t\t$curl = curl_init($recursos->links[13]->href);\n\t\tcurl_setopt($curl, CURLOPT_POST, true);\n\t\tcurl_setopt($curl, CURLOPT_HEADER, true);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, array('X-Gestiona-Access-Token: ' . $accessToken)); \n\n\t\t$response = curl_exec($curl);\n\t\t$http_status_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\n\t\tcurl_close($curl);\n\n\t\tif ($http_status_code == 201) {\n\t\t\t$headers = explode(\"Location: \", $response);\n\t\t\t$headers = explode(\"\\n\", $headers[1]);\n\t\t\t$location = $headers[0];\n\n\t\t\treturn $location;\n\t\t} else if ($http_status_code == 401) {\n\t\t\tdie(\"Error al crear el upload, no tiene autorización\");\n\t\t} else {\n\t\t\tdie(\"Error al crear el upload: \" . $http_status_code);\n\t\t}\n\t}", "title": "" }, { "docid": "5d01f5a6afc1916fbd31b6965d09728a", "score": "0.48037624", "text": "protected function getBaseUrl() : string\n {\n return '/permissions/';\n }", "title": "" }, { "docid": "eb3b719342aff9a4aebf0aa14518b688", "score": "0.4799078", "text": "public function getAuthorizationURL() {\n\t\t$url = self::AUTH_ENDPOINT . \"?client_id=\" . $this->app_id;\n\t\t$url .= \"&agency_name=\" . $this->agency_name;\n\t\t$url .= \"&environment=\" . $this->environment;\n\t\t$url .= \"&redirect_uri=\" . $this->redirect_uri;\n\t\t$url .= \"&state=\" . $this->state;\n\t\t$url .= \"&scope=\" . $this->scope;\n\t\t$url .= \"&response_type=\" . self::RESPONSE_TYPE;\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "4a29db76ef84f6e46e691f9d8cfe4bcc", "score": "0.4797196", "text": "public function getInspirationFileUrl()\n {\n try {\n return $this->storeManager->getStore()->getBaseUrl(\\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA).'/inspirations/'.$this->getName();\n } catch (NoSuchEntityException $e) {\n return '';\n }\n }", "title": "" }, { "docid": "cc31abb5395d5fe4cd7745d526988283", "score": "0.47955272", "text": "function DATABASE_BACKUP_UPLOAD_URL()\n\t{\n\t\treturn url('admin/uploads/database_backup').\"/\";\n\t}", "title": "" }, { "docid": "f3fd82571d2e2b726e26ea3ca22bb641", "score": "0.47952357", "text": "public function upload();", "title": "" }, { "docid": "f3fd82571d2e2b726e26ea3ca22bb641", "score": "0.47952357", "text": "public function upload();", "title": "" }, { "docid": "f0174f670193254c27b7f5e21fe14547", "score": "0.4792186", "text": "public function actionUploadGoogleCloud()\n {\n $keyFilePath = getStoragePath() . '\\key\\YiiGroup-797194353469.json';\n $storage = new StorageClient([\n 'projectId' => 'valued-ceiling-167301',\n 'keyFile' => json_decode(file_get_contents($keyFilePath), true)\n\n ]);\n $bucket = $storage->bucket('yiibucket');\n\n $fileParam = 'file';\n $fileInstance = UploadedFile::getInstanceByName($fileParam);\n $fileObj = File::create($fileInstance);\n\n //dd($fileInstance);\n\n $filename = implode('.', [\n date('d') . Yii::$app->security->generateRandomString(),\n $fileObj->getExtension()\n ]);\n $filePath = implode('/', [1, date('mY'), $filename]);\n\n // Using Predefined ACLs to manage object permissions, you may\n // upload a file and give read access to anyone with the URL.\n $bucket->upload(\n fopen($fileInstance->tempName, 'r'),\n [\n 'name' => $filePath,\n 'predefinedAcl' => 'publicRead'\n ]\n );\n\n $baseUrl = 'https://storage.googleapis.com/yiibucket/';\n $imageUrl = $baseUrl . $filePath;\n $res = ['link' => $imageUrl];\n\n // Response data\n Yii::$app->response->format = Yii::$app->response->format = Response::FORMAT_JSON;\n\n return $res;\n }", "title": "" } ]
344217be9fdfe1aeeceeff49e1af29eb
Gets the collection of history entities.
[ { "docid": "85ad46c51955d810eaa5266dddaeae98", "score": "0.79012114", "text": "public function getHistory()\n {\n return $this->history;\n }", "title": "" } ]
[ { "docid": "886303aa11762d69b890c18218c5c982", "score": "0.7974264", "text": "public function getHistory() {\r\n return $this->getReferenceTo()->history;\r\n }", "title": "" }, { "docid": "a576f2c88d0fbe970cd8086fecbee632", "score": "0.79623383", "text": "public function history()\n {\n return $this->morphMany(History::class, 'historyable')\n ->latest();\n }", "title": "" }, { "docid": "4e7974591876b4a7bcf8aa23b463ba1e", "score": "0.7810742", "text": "public function getHistory()\n\t{\n\t\treturn $this->history;\n\t}", "title": "" }, { "docid": "5f2a6548870cbdb430a4b82640455a38", "score": "0.7727671", "text": "function getHistory() {\n\t\treturn $this->History->find('all', array('order' => 'History.time ASC'));\n\t}", "title": "" }, { "docid": "cd63134c819998292bf538bde2289cd7", "score": "0.7605999", "text": "public function getHistoryItems();", "title": "" }, { "docid": "737831ba2b9130154389181ade95fd77", "score": "0.7548652", "text": "public function history()\n {\n return $this->hasMany(History::class);\n }", "title": "" }, { "docid": "043fbd16e102279394316139bb7cbee5", "score": "0.75231504", "text": "public function getEventHistory()\n {\n return $this->eventHistory;\n }", "title": "" }, { "docid": "8bcac0ba77cc9a37493fa961233d3090", "score": "0.75127935", "text": "public function getHistory(): array\n {\n return App::$db->getData()['history'] ?? [];\n }", "title": "" }, { "docid": "4787dd752e0e9130b994888c44a95011", "score": "0.7426279", "text": "public function getHistory () {}", "title": "" }, { "docid": "8bcdb9ae0f0770afa685e2ea3c535995", "score": "0.7349093", "text": "public function history()\n\t{\n\t\treturn $this->hasMany(get_class($this), $this->getCurrentIDColumn(), $this->getKeyName());\n\t}", "title": "" }, { "docid": "48fec1c010fbe3d08a6ed5f365f876d1", "score": "0.72955304", "text": "public function history()\n\t{\n\t\treturn $this->hasMany('Src\\Core\\Entities\\InvoiceHistory', 'extrato_id', 'id');\n\t}", "title": "" }, { "docid": "d21172fa896e910aea843ebb8e07a752", "score": "0.7220689", "text": "public function getHistory() {\n\t\t$value = $this->get('_user', 'history'); \n\t\tif(!is_array($value)) $value = array();\n\t\treturn $value; \n\t}", "title": "" }, { "docid": "7d596b797261ca589a0aa14edba0e342", "score": "0.7209029", "text": "public function getQuoteHistory()\n {\n $history = null;\n\n if ($this->getQuote() && $this->getQuote()->getEntityId()) {\n $quoteId = $this->getQuote()->getEntityId();\n $this->historyManagement->updateSystemLogsStatus($quoteId);\n $history = $this->historyManagement->getQuoteHistory($quoteId);\n }\n\n return $history;\n }", "title": "" }, { "docid": "e25140cc4228c50b83602abe3f5b64e3", "score": "0.7167395", "text": "public function getHistoryAttribute()\n\t{\n\t\t$history = array();\n\t\tif ($this->replies->count() > 0) {\n\t\t\t$history = $this->replies;\n\t\t}\n\t\tif ($this->logs->count() > 0) {\n\t\t\tif (count($history) == 0) {\n\t\t\t\t$history = $this->logs;\n\t\t\t} else {\n\t\t\t\t$history->merge($this->logs);\n\t\t\t}\n\t\t}\n\n\t\tif (count($history) > 0) {\n\t\t\t$history = $history->sortBy(function($historyObject) {\n\t\t\t\treturn $historyObject->created_at;\n\t\t\t});\n\t\t}\n\n\t\treturn $history;\n\t}", "title": "" }, { "docid": "f00babf6848d9c20976ab375b1253ad1", "score": "0.7076424", "text": "public function listHistory()\n {\n return $this->readline->listHistory();\n }", "title": "" }, { "docid": "1a0926f913fe4bcde7864773cbeffcf2", "score": "0.7055134", "text": "public function getManagerHistory()\n {\n return $this->ManagerHistory;\n }", "title": "" }, { "docid": "39b9402fa3894a4fc68aa1dc22dd3fbe", "score": "0.7020701", "text": "private function getHistory()\r\n\t{\r\n\t\treturn $this->page->get('//page/history');\r\n\t}", "title": "" }, { "docid": "1a3b2947e5933fd7f201de39e39acc5c", "score": "0.6880743", "text": "public function histories()\n {\n return $this->hasMany('App\\History', 'user_id');\n }", "title": "" }, { "docid": "e10f77d383d95d65d0144aa8dcfa0111", "score": "0.6766961", "text": "public function getQueryHistory(): array\n {\n return $this->queryHistory;\n }", "title": "" }, { "docid": "3a27fde572ab95fe6744d3ed04340c53", "score": "0.67367184", "text": "public function getCustomerHistory()\n\t\t{\n\t\t\treturn $this->history;\n\t\t}", "title": "" }, { "docid": "9369fd8caf00d461ad1b43f38cd4bb09", "score": "0.67360324", "text": "public function getVersionHistory()\n {\n if ($this->_versionHistory == null)\n {\n $this->_versionHistory = new VersionHistory($this);\n }\n return $this->_versionHistory;\n }", "title": "" }, { "docid": "c27500f34b27e83cc70f5d46be31dcb7", "score": "0.669497", "text": "public function GetArticleViewHistory()\n {\n if (is_null($this->aArticleViewHistory)) {\n $this->aArticleViewHistory = array();\n $iMaxQueueLength = 100;\n $shop = $this->getShopService()->getActiveShop();\n if ($shop->fieldDataExtranetUserShopArticleHistoryMaxArticleCount < $iMaxQueueLength && $shop->fieldDataExtranetUserShopArticleHistoryMaxArticleCount > 0) {\n $iMaxQueueLength = $shop->fieldDataExtranetUserShopArticleHistoryMaxArticleCount;\n }\n\n if ($this->IsLoggedIn()) {\n // fetch from user\n $iNumRecsAdded = 0;\n $oHistoryList = $this->GetFieldDataExtranetUserShopArticleHistoryList();\n while (($oHistoryItem = $oHistoryList->Next()) && $iNumRecsAdded <= $iMaxQueueLength) {\n $this->aArticleViewHistory[] = $oHistoryItem->sqlData;\n }\n } else {\n // fetch from cookie\n $aTmpHist = null;\n if (array_key_exists(TdbDataExtranetUser::COOKIE_NAME_HISTORY, $_COOKIE)) {\n $sHistory = base64_decode($_COOKIE[TdbDataExtranetUser::COOKIE_NAME_HISTORY]);\n $aTmpHist = json_decode($sHistory, true);\n }\n if (is_array($aTmpHist)) {\n reset($aTmpHist);\n foreach ($aTmpHist as $iKey => $aHistItemData) {\n $oHistoryItem = TdbDataExtranetUserShopArticleHistory::GetNewInstance();\n $oHistoryItem->LoadFromRow($aHistItemData);\n $this->aArticleViewHistory[] = $oHistoryItem->sqlData;\n }\n }\n }\n }\n\n $historyList = array();\n foreach ($this->aArticleViewHistory as $item) {\n $historyList[] = TdbDataExtranetUserShopArticleHistory::GetNewInstance($item);\n }\n\n return $historyList;\n }", "title": "" }, { "docid": "b79468b138fd937cc25f9abaee2159a5", "score": "0.6673947", "text": "public function getQuoteHistory()\n {\n return $this->historyLogInformation->getQuoteHistory();\n }", "title": "" }, { "docid": "418bd710db31081fa351a7c50ba7d8ed", "score": "0.6659829", "text": "protected function getHistoryData()\n {\n $history = $this->engine->getHistory();\n foreach ($history as &$result) {\n $result = (object) array(\n 'pscores' => $result[0],\n 'dscores' => $result[1],\n 'state' => $this->stateToText($result[2])\n );\n }\n\n return $history;\n }", "title": "" }, { "docid": "58b2600261ddd5f0b3ea91b6d973a6cf", "score": "0.66438025", "text": "public function getNoteHistory()\n {\n return $this->note_history;\n }", "title": "" }, { "docid": "c7e20da56bedefbe056a583b293aede2", "score": "0.6525583", "text": "function getHistory()\n\t{\t\n\t\tif( $GLOBALS['appshore']->db )\n\t\t{\n\t\t\t$history = getManyAssocArrays('SELECT distinct label, opname, filter FROM history WHERE user_id = \"'.\n\t\t\t\t$GLOBALS['appshore_data']['current_user']['user_id'].'\" '.'ORDER BY history_date DESC LIMIT 10');\n\t\t\t\t\n\t\t\tif( $history) \t\n\t\t\t{\n\t\t\t\tforeach( $history as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tlist($history[$key]['name']) = explode( '.', $value['opname']);\n\n\t\t\t\t\t//$history[$key]['label'] = filter_var(trim($history[$key]['label']), FILTER_SANITIZE_SPECIAL_CHARS);\n\t\t\t\t\t$history[$key]['label_slash'] = filter_var(trim($history[$key]['label']), FILTER_SANITIZE_SPECIAL_CHARS);\n\t\t\t\t\t$history[$key]['label_short'] = mb_substr(trim($history[$key]['label']), 0, 16);\n\n\t\t\t\t\t$history[$key]['filter'] = filter_var(trim($history[$key]['filter']), FILTER_SANITIZE_SPECIAL_CHARS);\n\t\t\t\t\t$history[$key]['filter_slash'] = $history[$key]['filter'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\treturn $history;\t\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "fddf6ca67c1377c8d328a0167a01175b", "score": "0.64943445", "text": "public function getTitleHistory()\n {\n return $this->title_history;\n }", "title": "" }, { "docid": "3183c947985e997425247d82b1717715", "score": "0.64359325", "text": "public function getInvHistories()\n {\n return $this->hasMany(InvHistory::className(), ['warehouse_id' => 'warehouse_id']);\n }", "title": "" }, { "docid": "70bac6da89549e26939a2a0cd397ca68", "score": "0.64328957", "text": "public function getStatusHistoryList(){\n return $this->_get(13);\n }", "title": "" }, { "docid": "686ffe926be03e902bd971dc0c8b1a74", "score": "0.6419457", "text": "public function getHistoricOrders()\n {\n return $this\n ->owner\n ->Orders()\n ->filter(array(\n \"Status\" => Order::config()->historic_statuses\n ));\n }", "title": "" }, { "docid": "a2d2d8109f0e3cbc37a72e196fc74a46", "score": "0.64188653", "text": "public function getAll()\r\n\t{\r\n\t\t//Ensure the user has permissions to modify the page.\r\n\t\tif ($this->page->permissions->has(PERMISSION_HISTORY_GET))\r\n\t\t{\r\n\t\t\t//Get the history element and create the array which will house the versions.\r\n\t\t\t$oHistory = $this->getHistory();\r\n\t\t\t$aHistory = array();\r\n\r\n\t\t\t//Travers all the version and write them to the array.\r\n\t\t\tfor ($oVersion = $oHistory->firstChild, $iIndex = 0; $oVersion != null; $oVersion = $oVersion->nextSibling, $iIndex++)\r\n\t\t\t{\r\n\t\t\t\t//Return this versions information.\r\n\t\t\t\t$aHistory[] = $this->toArray($oVersion, $iIndex);\r\n\t\t\t}\r\n\r\n\t\t\t//Return the history array containing the versions.\r\n\t\t\treturn $aHistory;\r\n\t\t}\r\n\t\telse throw new Exception(EXCEPTION_ACCESS_DENIED);\r\n\t}", "title": "" }, { "docid": "336e1ca748bb92c859d959de1737f9d2", "score": "0.6375172", "text": "public function getTransactionsHistory(): GetTransactionsHistory\n {\n return new GetTransactionsHistory($this->_provider);\n }", "title": "" }, { "docid": "80cf7f262f7e9548e40645b66b221543", "score": "0.6373027", "text": "function getHistory(){\n\n }", "title": "" }, { "docid": "03f9aa86da81f9ec541066a57447363f", "score": "0.6349868", "text": "public function history()\n {\n return $this->belongsTo('App\\Models\\Bid\\Bid', 'bid_id');\n }", "title": "" }, { "docid": "58d4d615ae5f3a18aa199a672cf7c7a3", "score": "0.6338343", "text": "public function histories()\n {\n if(!$this->historyManager){\n throw new UnconfiguredException(sprintf(\"El '%s' no esta configurado para usar esta caracteristica.\", HistoryManager\\HistoryManager::class));\n }\n return $this->historyManager;\n }", "title": "" }, { "docid": "dd123618fb6840903ef8f9a9fa33b044", "score": "0.6307071", "text": "public function GetQueryHistory();", "title": "" }, { "docid": "c739d57f3706d75e825e1e302fd59125", "score": "0.6305744", "text": "public function allianceHistory()\n {\n if ($this->allianceHistory) {\n $this->isIdProvided();\n\n $data = (new Request(\"/corporations/{$this->corporationId}/alliancehistory/\"))\n ->execute();\n foreach ($data as &$record) {\n $record = new CorporationAllianceHistoryRecord($record);\n }\n\n $this->allianceHistory = $data;\n }\n\n return $this->allianceHistory;\n }", "title": "" }, { "docid": "1525522afacafdf13776da83fe6fd5b4", "score": "0.6287701", "text": "protected function getHistory()\n {\n $requestHistoryIndex = $this->historyIndex - 1;\n return $this->requestHistory[$requestHistoryIndex]['request'];\n }", "title": "" }, { "docid": "68f509a50909a58745b8d1c541f92e6c", "score": "0.62625664", "text": "public function history(): \\Illuminate\\Database\\Eloquent\\Builder\n {\n return static::where('related_type', $this->related_type)\n ->where('is_current', true)\n ->where('related_id', $this->related_id)\n ->whereNotNull('related_id')\n ->orderByDesc('id')\n ->where('id', '!=', $this->id);\n }", "title": "" }, { "docid": "2b6179e354ba9639823553939bf9bd73", "score": "0.6261282", "text": "function getAll(){\r\n\t\treturn $this->db->get('transactions_history');\r\n\t}", "title": "" }, { "docid": "46f8f0658fdfb90914eeb20245c2302b", "score": "0.6258138", "text": "public function get_history( )\n\t{\n\t\tcall(__METHOD__);\n\n\t\t$history = array_reverse($this->_history);\n\n\t\t// run through the history and attach the player username to the move they made\n\t\tforeach ($history as $i => & $item) {\n\t\t\tunset($item['game_id']);\n\t\t\tunset($item['move_date']);\n\n\t\t\t$item['color'] = (0 == ($i % 2)) ? 'white' : 'black';\n\t\t\t$item['username'] = $this->_players[$item['color']]['object']->username;\n\n\t\t\t// find out which square the piece was placed on\n\t\t\tif ($i) {\n\t\t\t\tfor ($j = 0; $j < 16; ++$j) {\n\t\t\t\t\tif ($history[$i - 1]['board'][$j] != $item['board'][$j]) {\n\t\t\t\t\t\t$item['index'] = $j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tunset($item); // kill the reference\n\n\t\treturn $history;\n\t}", "title": "" }, { "docid": "13be7959616d1f3d5dbf0ef6033840b8", "score": "0.62036693", "text": "public function GetTxHistory()\n {\n if (empty($this->tx_history)) {\n $tx_list = App::$db->prepare(\n 'SELECT\n transaction.*,\n pair.*,\n COALESCE(pair.pair_curr_a, pair.pair_curr_b, transaction.tx_transfer_curr_id) investment_currency\n FROM transaction\n LEFT JOIN pair\n ON transaction.tx_pair_id = pair.pair_id\n WHERE\n transaction.tx_port_id = :port_id\n AND :curr_id IN(pair.pair_curr_a, pair.pair_curr_b, transaction.tx_transfer_curr_id)\n ORDER BY transaction.tx_timestamp'\n );\n $tx_list->execute([\n 'port_id' => $this->portfolio->infos['id'],\n 'curr_id' => $this->currency->infos['id']\n ]);\n foreach ($tx_list->fetchAll(PDO::FETCH_ASSOC) as $tx) {\n $tx = new Transaction($tx);\n $this->tx_history[] = $tx;\n $this->balance += $tx->UpdateBalance($this->currency, $this->balance);\n }\n }\n return $this->tx_history;\n }", "title": "" }, { "docid": "945c6d01469c90b9d152042dceb2083e", "score": "0.6189755", "text": "public static function &getNavigationHistory()\n {\n if (self::$isInitialized === false)\n throw new SystemException(SystemException::EX_NOCONTEXT);\n \n return self::$navigationHistory;\n }", "title": "" }, { "docid": "40280891ef905316973fab6d7a71bf83", "score": "0.61689246", "text": "function getHistory() {\r\n $user = getCurrentUserID();\r\n $history = query(\"SELECT title, person, updated FROM history WHERE user_id = \" . str($user) . \" ORDER BY updated desc LIMIT 25;\", true);\r\n return $history;\r\n}", "title": "" }, { "docid": "7d334c8c1bbe496f3481e2a9547a8061", "score": "0.6159466", "text": "public function userHistory()\n {\n return $this->hasOneThrough('App\\models\\History', 'App\\models\\User', 'supplier_id','user_id','id','id');\n }", "title": "" }, { "docid": "4b15b53a294a57b7c88373e1c1026254", "score": "0.61528647", "text": "public function toHistory() {\r\n $old_var = clone $this->getReferenceTo();\r\n // TODO: use reference?\r\n $this->getReferenceTo()->history[] = $old_var;\r\n }", "title": "" }, { "docid": "d25da49d989eabf9e540c9889dfa52ee", "score": "0.6113696", "text": "public function personalHistory()\n {\n return $this->hasMany('App\\PersonalHistory');\n }", "title": "" }, { "docid": "1417e3073b0103c4fda579412206b6b1", "score": "0.61082083", "text": "public function getAccountHistory($parameters = [])\n {\n return $this->get('getAccountHistory', $parameters);\n }", "title": "" }, { "docid": "ce6754122747df2c7e6e2e88af234b38", "score": "0.6103466", "text": "public function getContainingHistory()\n {\n throw new NotImplementedException();\n }", "title": "" }, { "docid": "ce3799d95af3c7f709298a8c3554d2bb", "score": "0.6044186", "text": "public function getHistoryHeaders()\n {\n return $this->getHistory()->getHeaders();\n }", "title": "" }, { "docid": "d97b83e4048c30bac4effc57ded4f850", "score": "0.6038579", "text": "public function familyHistory()\n {\n return $this->hasMany('App\\FamilyHistory');\n }", "title": "" }, { "docid": "e3d61e37586fd0bcaab1ebd612636b1a", "score": "0.6021726", "text": "public function history (Request $request) {\n $keys = $request->user()->histories->pluck('id');\n\n $data = \\App\\Entities\\Learn\\History::with('lesson.course.skill')\n ->whereIn('id', $keys)->orderBy('created_at', 'desc')\n ->get();\n\n $data = $data->map(function ($item, $key) {\n return [\n 'id' => $item->hashid,\n 'lesson' => $item->lesson->title,\n 'lesson_order' => $item->lesson->order,\n 'course' => $item->lesson->course->title,\n 'course_slug' => $item->lesson->course->slug,\n 'course_icon' => $item->lesson->course->icon,\n 'course_color' => $item->lesson->course->color,\n 'skill' => $item->lesson->course->skill->name,\n 'skill_slug' => $item->lesson->course->skill->slug,\n 'date' => $item->created_human\n ];\n });\n\n return (new Resource(\n $data\n ));\n }", "title": "" }, { "docid": "589742f08430ed50ab2223b84c8b468c", "score": "0.59488523", "text": "public function getAll()\n {\n /** @var LogEntry[] $logs */\n $logs = $this->getORM()->find('LogEntry', '1', [], 'log_id DESC');\n /** @var Users $users */\n $users = $this->loadModel('Users');\n foreach ($logs as $key => $log)\n {\n if ($log->user !== null)\n {\n $logs[$key]->user = $users->getById($log->user);\n }\n }\n return $logs;\n }", "title": "" }, { "docid": "b1d5c839198712d73be8be3993feeee3", "score": "0.5938858", "text": "public function history($optional = [])\n {\n return $this->apiCall('get', '/channels.history');\n }", "title": "" }, { "docid": "f728ef08b969d8e3d0426908a74a9888", "score": "0.59327805", "text": "public function getHistoryInfo()\r\n {\r\n return [\r\n 'default' => [\r\n 'hash' => 'Problem',\r\n 'id' => $this->getId(),\r\n 'data' => null\r\n ],\r\n 'delete' => [\r\n 'hash' => 'Client',\r\n 'id' => $this->client->getId(),\r\n 'data' => $this->getTitle()\r\n ],\r\n\r\n // the final hash will be generated by the DataStore::getHistoryInfo() function\r\n ];\r\n }", "title": "" }, { "docid": "20fbeab413457e79e76c2e117708d0f0", "score": "0.59086084", "text": "public function getAllEntities()\n {\n return $this->getRepository()->findAll();\n }", "title": "" }, { "docid": "d0296e798bc761f8c398fab2c5575a24", "score": "0.5906667", "text": "public function getHistory(array $historyDetails)\n {\n $response = $this->client->request(\"GET\", \"user/history\", $historyDetails);\n return $this->getBodyContent($response);\n }", "title": "" }, { "docid": "41f8c60c801ab63aa1b787d5a2f6daaf", "score": "0.59042805", "text": "public function history($options = [])\n {\n $options = array_replace([\n 'offset' => 0,\n 'count' => 0\n ], $options);\n $options['roomId'] = $this->getChannelId();\n\n static::send('channels.history', 'GET', $options);\n if (!static::getSuccess()) {\n return false;\n }\n\n $response = static::getResponse();\n $messages = new \\ATDev\\RocketChat\\Messages\\Collection();\n\n if (isset($response->messages)) {\n foreach ($response->messages as $message) {\n $messages->add(Message::createOutOfResponse($message));\n }\n }\n\n return $messages;\n }", "title": "" }, { "docid": "4da15570a61f83650fe0a23201204a54", "score": "0.585993", "text": "public function history() {\n\t\tif(isset($this->request->params['slug'])) {\n\n\t\t\t//Get single record from the database where the slug matches the URL\n\t\t\t$album = Albums::first(array(\n\t\t\t\t'with' => 'Archives',\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'Archives.slug' => $this->request->params['slug'],\n\t\t\t\t)\n\t\t\t));\n\n\t\t\tif($album) {\n\n\t\t\t\t$album_works = Components::find('all', array(\n\t\t\t\t\t'fields' => 'archive_id2',\n\t\t\t\t\t'conditions' => array('archive_id1' => $album->id),\n\t\t\t\t));\n\n\t\t\t\t$archives_histories = array();\n\n\t\t\t\tif ($album_works->count()) {\n\n\t\t\t\t\t//Get all the work IDs in a plain array\n\t\t\t\t\t$work_ids = $album_works->map(function($aw) {\n\t\t\t\t\t\treturn $aw->archive_id2;\n\t\t\t\t\t}, array('collect' => false));\n\n\t\t\t\t\t$archives_histories = ArchivesHistories::find('all', array(\n\t\t\t\t\t\t'with' => 'Users',\n\t\t\t\t\t\t'conditions' => array('archive_id' => $work_ids),\n\t\t\t\t\t\t'order' => 'start_date DESC'\n\t\t\t\t\t));\n\n\t\t\t\t}\n\n\t\t\t\t//Send the retrieved data to the view\n\t\t\t\treturn compact('album', 'archives_histories');\n\n\t\t\t}\n\t\t}\n\n\t\t//since no record was specified, redirect to the index page\n\t\t$this->redirect(array('Albums::index'));\n\t}", "title": "" }, { "docid": "94f693520212402ea8eab0f1be8d26c4", "score": "0.5851157", "text": "public function couponHistories() {\n return $this->hasMany(CouponHistory::class, 'ch_coupon_code', 'coupon_code');\n }", "title": "" }, { "docid": "c54ea31fb9b980cbd7e54cf3cb4ffd44", "score": "0.58382475", "text": "public function revisions()\n\t{\n\t\treturn $this->hasMany(Revision::class)->latest();\n\t}", "title": "" }, { "docid": "f5d3073cfcb03ff981fdc953d16bdd6c", "score": "0.58028275", "text": "public function getContragentHistory($request) {\n return $this->contragentRepo->getContragentHistory($request->id);\n }", "title": "" }, { "docid": "8717c6173863d859fcda1079e9406a59", "score": "0.57982254", "text": "public function problemHistories()\n {\n return $this->hasMany('App\\ProblemHistory', 'participant');\n }", "title": "" }, { "docid": "2d3d55eb4c20fdef7344d8b5305807cf", "score": "0.5790059", "text": "public function getHistoryInfo()\n {\n return [\n 'default' => [\n 'hash' => 'Client',\n 'id' => $this->client->getId(),\n 'data' => null\n ],\n\n // the final hash will be generated by the DataStore::getHistoryInfo() function\n ];\n }", "title": "" }, { "docid": "dda229613637e73d918e15609d5e2bdf", "score": "0.577757", "text": "public function getHistory(rtGuardUser $user)\n {\n return $this->call('get_history', $user->getEmailAddress());\n }", "title": "" }, { "docid": "5c31b880c2e5f1453073c0bc174156c3", "score": "0.57603586", "text": "public function getEntities()\n {\n return $this->entities;\n }", "title": "" }, { "docid": "79f6a07bb269a2719aabddb7e7a3a57a", "score": "0.5758133", "text": "function get_history($id)\n\t{\n\t\tglobal $log;\n $log->debug(\"Entering get_history(\".$id.\") method ...\");\n\n\t\t$entityIds = $this->getRelatedContactsIds();\n\t\t$entityIds = implode(',', $entityIds);\n\n\t\t$userNameSql = getSqlForNameInDisplayFormat(array('first_name'=>'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users');\n\n\t\t$query = \"SELECT DISTINCT(vtiger_activity.activityid), vtiger_activity.subject, vtiger_activity.status, vtiger_activity.eventstatus,\n\t\t\t\tvtiger_activity.activitytype, vtiger_activity.date_start, vtiger_activity.due_date, vtiger_activity.time_start, vtiger_activity.time_end,\n\t\t\t\tvtiger_crmentity.modifiedtime, vtiger_crmentity.createdtime, vtiger_crmentity.description,\n\t\t\t\tcase when (vtiger_users.user_name not like '') then $userNameSql else vtiger_groups.groupname end as user_name\n\t\t\t\tFROM vtiger_activity\n\t\t\t\tINNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_activity.activityid\n\t\t\t\tLEFT JOIN vtiger_seactivityrel ON vtiger_seactivityrel.activityid = vtiger_activity.activityid\n\t\t\t\tLEFT JOIN vtiger_cntactivityrel ON vtiger_cntactivityrel.activityid = vtiger_activity.activityid\n\t\t\t\tLEFT JOIN vtiger_contactdetails ON vtiger_contactdetails.contactid = vtiger_cntactivityrel.contactid\n\t\t\t\tLEFT JOIN vtiger_groups ON vtiger_groups.groupid = vtiger_crmentity.smownerid\n\t\t\t\tLEFT JOIN vtiger_users ON vtiger_users.id=vtiger_crmentity.smownerid\n\t\t\t\tWHERE (vtiger_activity.activitytype != 'Emails')\n\t\t\t\tAND (vtiger_activity.status = 'Completed'\n\t\t\t\t\tOR vtiger_activity.status = 'Deferred'\n\t\t\t\t\tOR (vtiger_activity.eventstatus = 'Held' AND vtiger_activity.eventstatus != ''))\n\t\t\t\tAND vtiger_crmentity.deleted = 0 AND (vtiger_seactivityrel.crmid = $id\";\n\n\t\tif(!empty ($entityIds)){\n\t\t\t$query .= \" OR vtiger_cntactivityrel.contactid IN (\".$entityIds.\"))\";\n\t\t} else {\n\t\t\t$query .= \")\";\n\t\t}\n\n\t\t//Don't add order by, because, for security, one more condition will be added with this query in include/RelatedListView.php\n\t\t$log->debug(\"Exiting get_history method ...\");\n\t\treturn getHistory('Accounts',$query,$id);\n\t}", "title": "" }, { "docid": "ad06b0b5035d127e03c6e061f29d45ec", "score": "0.5751307", "text": "public function getDeleteHistory() {\r\n\t\t$this->db->from('inventory_delete_history');\r\n\t\t$this->db->join('users', 'users.user_id = inventory_delete_history.user_id');\r\n\t\t$this->db->order_by('delete_date', 'DESC');\r\n\t\t\r\n\t\t$query = $this->db->get();\r\n\t\t$data = array();\r\n\t\tif($query->num_rows() > 0) {\r\n\t\t\tforeach($query->result_array() as $row) { \r\n\t\t\t\t$data[] = $row;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $data; //array\r\n\t}", "title": "" }, { "docid": "800c3f9aa619ad1c580dff5d7b8fc339", "score": "0.57399815", "text": "public function getLogs()\n {\n return $this->hasMany(\n Logs::className(),\n [\n self::ACTION_ID => self::ACTION_ID\n ]\n );\n }", "title": "" }, { "docid": "e625840e6c2e89c437ddfdaaf1d21a49", "score": "0.5739419", "text": "public function transistionHistory()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = cus_id, localKey = cus_id)\n return $this->hasMany('App\\TransistionHitory','cus_id','cus_id');\n }", "title": "" }, { "docid": "4ff8c41f3f3e30064ceeeea4b4d19b7b", "score": "0.573876", "text": "public function getAllSQLHistories()\n {\n return $this->data_source->getAllSQLHistories();\n }", "title": "" }, { "docid": "e6fbc170afb3b12d76dacaafdb7b50b2", "score": "0.573834", "text": "public function getRevisions()\n {\n return $this->revisions->sortBy('created_at');\n }", "title": "" }, { "docid": "416dd5f2e2387084613976db7c5a18ce", "score": "0.5722552", "text": "public function getJobHistoriesDAO()\n {\n $user = $this->getUserDAO();\n return $user->jobHistories;\n }", "title": "" }, { "docid": "959bb6dca82b21ab0413a8265caae8e2", "score": "0.5687556", "text": "function &statusHistory()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n $statusType = new eZOrderStatusType();\r\n\r\n $statusType->getByName( \"intl-initial\" );\r\n\r\n $db->array_query( $status_array, \"SELECT ID FROM eZTrade_OrderStatus\r\n WHERE OrderID='$this->ID'\r\n ORDER BY Altered\" );\r\n $ret = array();\r\n foreach ( $status_array as $status )\r\n {\r\n $ret[] = new eZOrderStatus( $status[$db->fieldName( \"ID\" )] );\r\n }\r\n return $ret;\r\n\r\n }", "title": "" }, { "docid": "7e8af369ef2bf2dadd77911421b421d6", "score": "0.56854093", "text": "public function history()\n {\n $breaks = Breaks::UserId()->latest()->paginate(7);\n return view('employee.breaks_history',compact('breaks'));\n }", "title": "" }, { "docid": "4565017dc2bab9415f23865953c9c5a1", "score": "0.56736803", "text": "public function getEntities() {\n return $this->_entities;\n }", "title": "" }, { "docid": "7fbf12de9431b0f8a75ab2488f3f649c", "score": "0.56657284", "text": "public function history_get(){\n// $time = \"14/02/2016 9:25:59 am\";\n// print_r(strtotime($time));\n// exit();\n// $commoId = $this->get(\"CommoId\");\n//\n// $n = $this->get(\"n\");\n// $role = \"Product\";\n// $commoKey = $this->PR_KeyMap->getCommoKey($commoId, $role);\n// $History = $this->PRH_->getLastNPrices($commoKey,$n);\n// print_r($History);\n\n// $userId = $this->get(\"user_id\");\n//\n// $n = $this->get(\"n\");\n// $History = $this->PEH_->getLastNPersons($userId,$n);\n// print_r($History);\n\n// $userId = $this->get(\"user_id\");\n// $n = $this->get(\"n\");\n// $History = $this->HH_->getLastNHeads($userId,$n);\n// print_r($History);\n\n// $userId = $this->get(\"user_id\");\n// $date = $this->get(\"date\");\n// $History = $this->HH_->getHeadHistorySince($userId,$date);\n// print_r($History);\n\n// $childId = $this->get(\"child_id\");\n// $n = $this->get(\"n\");\n// $role = \"Doctor\";\n// $childKey = $this->C_KMP->getChildKey($childId, $role);\n// $History = $this->MRH_->getLastNMR($childKey,$n);\n// print_r($History);\n }", "title": "" }, { "docid": "e4310c623e1c48f6e3bc99256e2fc241", "score": "0.5664813", "text": "public function getEntities()\n {\n return $this->_entities;\n }", "title": "" }, { "docid": "8cb9fc6bdefa9cb2eb77f62bc3b7281d", "score": "0.566017", "text": "public function getEntities() {\n $entities = array();\n\n $result = $this->queryAll(\"SELECT * FROM entity\");\n foreach ($result as $entity)\n $entities[] = new Entity(); // add in the constructor the values get by the entity array\n\n return $entities;\n }", "title": "" }, { "docid": "0775f30f9e8729931d43516303c7dfae", "score": "0.56588924", "text": "public function all()\n {\n // Reading from cache first\n $cacheKey = $this->_cacheKey->getAll();\n if ($this->_cache->has($cacheKey)) {\n return $this->_cache->get($cacheKey);\n }\n \n $prepSql = \"SELECT {$this->_columnNames} FROM `{$this->_tableName}` ORDER BY `id` DESC\";\n $bindings = [];\n \n $entityList = $this->_retrieveEntityList($prepSql, $bindings);\n \n // Now that we have retrieved the Entity, let's add it to the cache\n $this->_cache->set($cacheKey, $entityList);\n \n return $entityList;\n }", "title": "" }, { "docid": "c1f7ea22a09b8a099240bce335cb2fe9", "score": "0.5653058", "text": "public function getEntities()\n {\n return $this->_entities;\n }", "title": "" }, { "docid": "c1f7ea22a09b8a099240bce335cb2fe9", "score": "0.5653058", "text": "public function getEntities()\n {\n return $this->_entities;\n }", "title": "" }, { "docid": "9edf73a793c2bd523133bca4ea84b8ac", "score": "0.56500137", "text": "public function getEntities(): array\n {\n return $this->entities;\n }", "title": "" }, { "docid": "e1d6a8e87c564fb143a1f8d2e4635160", "score": "0.5650013", "text": "public function getUserHistory($user): array\n {\n return App::$db->getRowsWhere('history', $conditions = ['user' => $user]) ?? [];\n }", "title": "" }, { "docid": "1503c8d87376fe48b3390d919c2ea253", "score": "0.5644245", "text": "public static function collectionName()\n {\n return 'history';\n }", "title": "" }, { "docid": "ee2700fdc0332550ffe8cc04cef264a9", "score": "0.56374204", "text": "public function historyOf()\n {\n if (class_exists($class = $this->revisionable_type)) {\n return $class::find($this->revisionable_id);\n }\n\n return false;\n }", "title": "" }, { "docid": "17815f530391719151ead2907fb205fc", "score": "0.56238544", "text": "public function getHistoric(){ return $this->historic; }", "title": "" }, { "docid": "acf5f8b4c9904cf43ff62ccb5835d904", "score": "0.561784", "text": "public function prevRevisions()\n {\n return $this->hasMany('ArticleRevision', 'article_id')->whereStatus('REVISED');\n }", "title": "" }, { "docid": "81dc5435b57a4ec47465aee79e116190", "score": "0.561742", "text": "public function domainTransferHistory($domainName) {\n $historyList = $this->execute('Domain/Transfer/History', array('Domain' => $domainName), 'history');\n return is_array($historyList) ? $historyList : array();\n }", "title": "" }, { "docid": "a209fa5ee19f953a590260a980763de9", "score": "0.56060696", "text": "public function getHistory($filters = array())\n\t{\n\t\tif (empty($this->_pub))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (!isset($this->_tblHistory))\n\t\t{\n\t\t\t$this->_tblHistory = new Tables\\CurationHistory($this->_db);\n\t\t}\n\n\t\t$history = $this->_tblHistory->getRecords($this->_pub->version_id, $filters);\n\n\t\treturn $history;\n\t}", "title": "" }, { "docid": "57ae68177915506c652a81cbeb9218fa", "score": "0.5605972", "text": "function getUserHistory(){\n\t\t\t//Declaracion de variables\n\t\t\t$returnJson=\"[\";\n\t\t\t//Ciclo for para iterar por el historial\n\t\t\tfor($i=0; $i<sizeof($this->userHistory); $i++){\n\t\t\t\t$returnJson=$returnJson.$this->userHistory[$i]->getJsonString();\n\t\t\t\t//si no estamos al final entonces meter la coma\n\t\t\t\tif($i!=(sizeof($this->userHistory)-1)){$returnJson=$returnJson.\",\";}\n\t\t\t}\n\t\t\t$returnJson=$returnJson.\"]\";\n\t\t\treturn $returnJson;\n\t\t}", "title": "" }, { "docid": "c144b3755212d3ea72638447229cc33e", "score": "0.5598493", "text": "public function getHistoryInfo()\n {\n return [\n 'default' => [\n 'hash' => 'DocTemplate',\n 'id' => $this->getId(),\n 'data' => null\n ],\n\n // the final hash will be generated by the DataStore::getHistoryInfo() function\n ];\n }", "title": "" }, { "docid": "3a9b9579d64617f32d98e93df2b8cd3b", "score": "0.5598049", "text": "public function historyAction()\n {\n $renderer = $this->getServiceLocator()->get('ViewRenderer');\n $view = new ViewModel(array('history' => $this->getHistoryData()));\n $view->setTemplate('application/index/history');\n\n return new JsonModel(array('html' => $renderer->render($view)));\n }", "title": "" }, { "docid": "dbaf966fe7f93f46f3904831475486e6", "score": "0.5597518", "text": "public function getOrchestrationLogOlds()\n {\n return $this->hasMany(OrchestrationLogOld::className(), ['provider_id' => 'id']);\n }", "title": "" }, { "docid": "9615e50e270b9d2a885ad00d3d2296d9", "score": "0.559391", "text": "public function getAllLogs()\n {\n return ModelLog::\n with('user')\n ->where('content_id', '=', $this->id)\n ->where('content_type', '=', class_basename($this))\n ->get();\n }", "title": "" }, { "docid": "dc99b14e6f403ccb9fea8a3403c90283", "score": "0.5589425", "text": "public function getEntities()\n {\n if (!$this->loaded) {\n $this->load();\n }\n\n return $this->entities;\n }", "title": "" }, { "docid": "331964fafe0daa1b0ba1692365a3a5c9", "score": "0.55872506", "text": "public function getHistoryBody()\n {\n $body = $this->getHistory()->getBody();\n return json_decode( $body, true );\n }", "title": "" } ]
e88f87e96f47f0d49e7a5886ab79c619
This is the index method action, it handles: ANY METHOD mountpoint ANY METHOD mountpoint/ ANY METHOD mountpoint/index
[ { "docid": "5785634d56d694268bab7c825aa59e6d", "score": "0.0", "text": "public function indexAction() : object\n {\n $page = $this->di->get(\"page\");\n $session = $this->di->get(\"session\");\n $data = [\n \"title\" => \"Väder\",\n \"forecast\" => $session->has(\"forecast\") ? $session->get(\"forecast\") : \"\",\n \"month\" => $session->has(\"month\") ? $session->get(\"month\") : \"\",\n \"error\" => $session->has(\"error\") ? $session->get(\"error\") : \"\",\n \"location\" => \"\",\n ];\n $page->add(\"osln/weather/default\", $data);\n $session->delete(\"error\");\n return $page->render();\n }", "title": "" } ]
[ { "docid": "0a50045b63a900ba7deaf83e211e0bca", "score": "0.6827031", "text": "protected abstract function index();", "title": "" }, { "docid": "d143ca8b3ca5737e15839a584e1b435e", "score": "0.67927957", "text": "abstract protected function index();", "title": "" }, { "docid": "19b018a8c2368ebeb93d6ce8dc42fb3f", "score": "0.67053455", "text": "public abstract function index();", "title": "" }, { "docid": "19b018a8c2368ebeb93d6ce8dc42fb3f", "score": "0.67053455", "text": "public abstract function index();", "title": "" }, { "docid": "c19335499631c547f5c0ec56efc50b9e", "score": "0.6694096", "text": "public function actionIndex()\n {\n $this->actionNot_found();\n }", "title": "" }, { "docid": "429dc556699d23db5de96136f0685bb2", "score": "0.6659329", "text": "abstract function index();", "title": "" }, { "docid": "f771e27dab8bc90c8a6b2a338fee2ebc", "score": "0.6651946", "text": "public function indexAction() {\t}", "title": "" }, { "docid": "162ca1d3c54140ebffb1cd3996b837c2", "score": "0.6644836", "text": "public function index()\n {\n /*INDEX-METHOD-HERE*/\n }", "title": "" }, { "docid": "691c61341597d73884ff03a4372d3b93", "score": "0.66421014", "text": "abstract public function index();", "title": "" }, { "docid": "691c61341597d73884ff03a4372d3b93", "score": "0.66421014", "text": "abstract public function index();", "title": "" }, { "docid": "691c61341597d73884ff03a4372d3b93", "score": "0.66421014", "text": "abstract public function index();", "title": "" }, { "docid": "691c61341597d73884ff03a4372d3b93", "score": "0.66421014", "text": "abstract public function index();", "title": "" }, { "docid": "691c61341597d73884ff03a4372d3b93", "score": "0.66421014", "text": "abstract public function index();", "title": "" }, { "docid": "549290e2ce6dbcada2098205d1484786", "score": "0.6640455", "text": "private function index() {\n switch ($_SERVER[\"REQUEST_METHOD\"]) {\n case \"POST\":\n $this->post();\n break;\n case \"GET\":\n $this->get();\n break;\n case \"PUT\":\n $this->put();\n break;\n case \"DELETE\":\n $this->delete();\n break;\n }\n }", "title": "" }, { "docid": "6e3f6a3c3a85552355330fe3352c5db7", "score": "0.66032094", "text": "function index(){}", "title": "" }, { "docid": "5f0dcd599be9947bce2dab5f8e2b3599", "score": "0.6576986", "text": "public function indexAction() {}", "title": "" }, { "docid": "3fdcb3f92e3019078b17ffbb6c4b72be", "score": "0.6570388", "text": "abstract public function indexAction();", "title": "" }, { "docid": "5fd4315de7d51aeca59af43df071f1c0", "score": "0.65372264", "text": "public function action_index(){\n\t\t$this->action_object(substr(get_class($this), 0, -11));\n\t}", "title": "" }, { "docid": "03fde6318a65be495d9099bad755ee8d", "score": "0.65140355", "text": "public function indexAction() {\n $this->getAction();\n }", "title": "" }, { "docid": "eccba07e77f684551ff39cfae2d492e0", "score": "0.6504953", "text": "public function indexAction() {\n\n\t}", "title": "" }, { "docid": "0584293712663233550da7e1b2e48d1e", "score": "0.64789647", "text": "public function indexAction() {\n }", "title": "" }, { "docid": "7f648e0c926e137b97b7d60a6fa23474", "score": "0.6467182", "text": "protected function apiIndex()\n {\n $index = Str::studly(class_basename($this->argument('name')));\n\n $this->callSilent('api:index', [\n 'name' => \"{$index}IndexAction\",\n ]);\n\n $this->callSilent('api:responder', [\n 'name' => \"{$index}IndexResponder\",\n ]);\n }", "title": "" }, { "docid": "f29709817ec3db2d44ad77fdc0a55269", "score": "0.64561546", "text": "public function _index()\n\t{\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "a9c31042156c14ae31a8bc68f721b368", "score": "0.6454472", "text": "public function index () {\r\n $method = strtoupper($_SERVER['REQUEST_METHOD']);\r\n \r\n switch ($method) {\n case 'GET':\n $this->view();\n break;\n case 'POST':\r\n $this->insert();\r\n break;\r\n case 'PUT':\r\n $this->update();\r\n break;\r\n case 'DELETE':\r\n $this->delete();\r\n break;\n default:\n break;\n }\r\n }", "title": "" }, { "docid": "28e9769c66166aaa4ea961e3f6d4880b", "score": "0.64356065", "text": "abstract function index_Action();", "title": "" }, { "docid": "28f53e65aaba3785f9965146cccfee50", "score": "0.6393188", "text": "public function indexAction() {\n \n }", "title": "" }, { "docid": "261c9291f9a82aee51721d3cd2fcafc6", "score": "0.63856405", "text": "public function indexAction();", "title": "" }, { "docid": "1fa797c8e50513fa2342b89877596d8d", "score": "0.638409", "text": "public function indexAction() {\n }", "title": "" }, { "docid": "9d99d045f291e2a00819b719ee279d79", "score": "0.63680613", "text": "public function index(){\n print \"Action not found\";\n }", "title": "" }, { "docid": "e513850c42e2868fe52b94d519726d83", "score": "0.6353284", "text": "public function indexAction()\n {}", "title": "" }, { "docid": "4681a86f832f3b945baebee362157902", "score": "0.63527155", "text": "public function doIndex()\n {\n $this->index();\n }", "title": "" }, { "docid": "cbc72954f505642439132be6e410af45", "score": "0.63485765", "text": "public function executeIndex()\n {\n\n }", "title": "" }, { "docid": "1c863843d20ea435f3ca56a1082513cf", "score": "0.63407975", "text": "public function index(){}", "title": "" }, { "docid": "1c863843d20ea435f3ca56a1082513cf", "score": "0.63407975", "text": "public function index(){}", "title": "" }, { "docid": "1c863843d20ea435f3ca56a1082513cf", "score": "0.63407975", "text": "public function index(){}", "title": "" }, { "docid": "bb1d9e24b89e6a210d01cda67e4b4dce", "score": "0.63311815", "text": "public function indexAction(){\n\t\t\n\t}", "title": "" }, { "docid": "c599ebb831bca005727db70df780ebba", "score": "0.6322466", "text": "public function indexAction() {\n\t\t// TODO Auto-generated AdminAdminController::indexAction() default\n\t}", "title": "" }, { "docid": "4ac939d4403431f79524f02e3380ace4", "score": "0.6315929", "text": "public final function indexAction() {\n\t\t$this->_forward('get');\n\t}", "title": "" }, { "docid": "8faab81067e1cf717d86923720a35734", "score": "0.629565", "text": "public function index_get() {\n $action = $this->get('action');\n switch ($action) {\n case \"discountlist\":\n $this->discountlist();\n break;\n case \"listdiscountcoupon\":\n $this->discountlist();\n break;\n case \"retrieve_get\":\n $this->retrieve_get();\n break;\n case \"listdiscountcouponbycategory\":\n $this->listdiscountcouponbycategory();\n break;\n // case \"listdiscountcoupon\":\n // $this->listdiscountcoupon();\n // break;\n case \"listdiscountcouponfilterbyname\":\n $this->listdiscountcouponfilterbyname();\n break;\n case \"listdiscountcouponbytenant\":\n $this->listdiscountcouponbytenant();\n break;\n default:\n $this->not_found();\n break;\n }\n }", "title": "" }, { "docid": "399e4170abf7e8db3825e7aa2ce15543", "score": "0.6284525", "text": "public function indexAction() {\n\t\t\n\t\t// also access via $this->getRequest();\n\t\t$action = $_GET['action'];\n\t\n\t\tif (!empty($action)) {\n\t\t\tif ($action != 'indexAction')\t {\n\t\t\t\tif (method_exists($this, $action)) {\t\t\t\n\t\t\t\t\t$reflection = new ReflectionMethod($this, $action);\t\t\t\t\n\t\t\t\t\tif ($reflection->isPublic()) {\n\t\t\t\t\t\t$this->{$action}();\n\t\t\t\t\t} else {\n\t \t\t\tthrow new RuntimeException($this->__('The called method is not public.'));\n\t \t\t}\n\t \t\t} else {\n\t \t\t\tthrow new RuntimeException($this->__('The called method not exist.'));\n\t \t\t}\n\t \t} else {\n\t \t\tthrow new RuntimeException($this->__('indexAction method call not allowed.'));\n\t \t}\n\t } else {\n\t \t$this->_redirectUrl(Mage::helper('core/url')->getHomeUrl());\t\n\t }\n\t}", "title": "" }, { "docid": "01ef2d95502588c2e9efef3bce1d7fee", "score": "0.62576467", "text": "public function action_index() {\n }", "title": "" }, { "docid": "d24e188b8c640a282f280aa825a9ac46", "score": "0.6241715", "text": "abstract public function index(): void;", "title": "" }, { "docid": "d24e188b8c640a282f280aa825a9ac46", "score": "0.6241715", "text": "abstract public function index(): void;", "title": "" }, { "docid": "6207e8afc465599ddb01460b82193bef", "score": "0.6241016", "text": "public function index() {\n\t\t//this method is intentionally left blank\n\t}", "title": "" }, { "docid": "59ef33b1a791fc615f251506834d19f0", "score": "0.6239721", "text": "public function indexAction() : string\n {\n // Deal with the action and return a response.\n return \"index ffs!\";\n }", "title": "" }, { "docid": "2ba08c1aa78a76fa30167653272bfeae", "score": "0.62390995", "text": "public function indexAction()\n {\n \n }", "title": "" }, { "docid": "3a01ec40e84d0b37ddc6824c86849b53", "score": "0.6229325", "text": "function __call($methodName, $args)\n {\n return $this->_forward('index');\n }", "title": "" }, { "docid": "4c81f10d5593fcfd2f381fb0c29819f1", "score": "0.62236077", "text": "public function indexAction() \n {}", "title": "" }, { "docid": "38c551891a2510dc998c42717a5eae06", "score": "0.6217975", "text": "public function actionIndex()\n {\n }", "title": "" }, { "docid": "69fc6fb94cafd47d751087bbcf396518", "score": "0.62043685", "text": "public function indexAction() {\n\n }", "title": "" }, { "docid": "bf62ef717d18896ed1127a60cc1e2adc", "score": "0.6202874", "text": "public function indexAction(){\n\n\t}", "title": "" }, { "docid": "4b3da79ba39d218b6fdc2f2b1a6fd72c", "score": "0.6192048", "text": "public function indexAction()\n {\n return $this->doIndex();\n }", "title": "" }, { "docid": "61e25f17bfcad7555516a67f6d445d1a", "score": "0.6186922", "text": "public function indexAction()\n {\n $this->listentriesAction();\n }", "title": "" }, { "docid": "14ffc5bd3a6b00605a8e2a3a1b8b86eb", "score": "0.6185364", "text": "function index(){\r\n\t\t$this->action_index(new Param(),true);\r\n }", "title": "" }, { "docid": "22c0562103c9c91f04a40b8af0e8671a", "score": "0.6177916", "text": "public function indexAction()\n {\n\t\t// Action Body\n }", "title": "" }, { "docid": "3abd5ef963b746a343e17ef1ebb82c3f", "score": "0.6172211", "text": "public function indexAction() {\n //PESQUISAR\n }", "title": "" }, { "docid": "6b2de2e0e149c49c67359062dab01de4", "score": "0.61708254", "text": "public function indexAction()\r\n\t{\r\n\t}", "title": "" }, { "docid": "b89c24d7711fa9713ec47e04092abc43", "score": "0.6169649", "text": "protected function index()\n {\n // TODO: Implement index() method.\n }", "title": "" }, { "docid": "a4ee126076ea54e8f3201e3c43e51031", "score": "0.61665595", "text": "public function indexAction()\n {\n }", "title": "" }, { "docid": "a4ee126076ea54e8f3201e3c43e51031", "score": "0.61665595", "text": "public function indexAction()\n {\n }", "title": "" }, { "docid": "a4ee126076ea54e8f3201e3c43e51031", "score": "0.61665595", "text": "public function indexAction()\n {\n }", "title": "" }, { "docid": "a4ee126076ea54e8f3201e3c43e51031", "score": "0.61665595", "text": "public function indexAction()\n {\n }", "title": "" }, { "docid": "2f65e66b7e924ddb450a1b53d733da89", "score": "0.61523855", "text": "public function indexAction()\r\n {\r\n }", "title": "" }, { "docid": "9e070a956c74fd9a1f81abc71bbdffd5", "score": "0.61521834", "text": "public function indexAction()\n {\n \n }", "title": "" }, { "docid": "9e070a956c74fd9a1f81abc71bbdffd5", "score": "0.61521834", "text": "public function indexAction()\n {\n \n }", "title": "" }, { "docid": "f96c6b23b44806649ac52ae6bcf27bc2", "score": "0.61499536", "text": "public function indexAction ()\n {\n }", "title": "" }, { "docid": "e55c9b4f05eb84ca7cbf8f36f675eaee", "score": "0.61462635", "text": "public function indexAction ()\r\n {\r\n }", "title": "" }, { "docid": "a2bd3ef433d204219b6d3511710c01b0", "score": "0.6144605", "text": "abstract static function indexAction($args =null);", "title": "" }, { "docid": "9abab88fb3a38f52fcaa083edefdb107", "score": "0.6138017", "text": "public function indexAction()\n {\n $this->tableAction();\n }", "title": "" }, { "docid": "a69c2f42e0fcbd1c0b1f6d13cdff2713", "score": "0.61310786", "text": "public function indexAction()\n {\n\t\t\n }", "title": "" }, { "docid": "31be54410c7dcfe064af39b58c15a7c4", "score": "0.6123754", "text": "public function actionIndex()\n\t{\n\n\t}", "title": "" }, { "docid": "31be54410c7dcfe064af39b58c15a7c4", "score": "0.6123754", "text": "public function actionIndex()\n\t{\n\n\t}", "title": "" }, { "docid": "a345ba4a756f5e902a01288b2148a16f", "score": "0.6121868", "text": "public function indexAction() : string\n {\n // Deal with the action and return a response.\n return \"Index!!\";\n }", "title": "" }, { "docid": "91432098d91071e4a163ab24f1a2e111", "score": "0.6111321", "text": "public function fooAction()\n {\n // are working when you browse to /index/index/foo\n return array();\n }", "title": "" }, { "docid": "1b781c727a5005c84b9a85c4c9c14027", "score": "0.6109464", "text": "public function index() {}", "title": "" }, { "docid": "2e42503d55824f0e5ba1fe3b836c57d4", "score": "0.6104084", "text": "public function indexAction()\n {\n $this->_forward('list');\n }", "title": "" }, { "docid": "2e42503d55824f0e5ba1fe3b836c57d4", "score": "0.6104084", "text": "public function indexAction()\n {\n $this->_forward('list');\n }", "title": "" }, { "docid": "00c4f1ca8db83222a90cfaafec2a3116", "score": "0.610248", "text": "public function actionIndex()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "b0eff79a3e40f9ac84d23eaf1d4beb34", "score": "0.6100232", "text": "public function GET($index);", "title": "" }, { "docid": "38c4bccf33dc751b139e26fa1efdcf2e", "score": "0.6100106", "text": "public function index()\n\t{}", "title": "" }, { "docid": "38c4bccf33dc751b139e26fa1efdcf2e", "score": "0.6100106", "text": "public function index()\n\t{}", "title": "" }, { "docid": "497d1859e6279ead7b94e16ed80d0753", "score": "0.609295", "text": "public function indexAction() \n\t{\n\n\t}", "title": "" }, { "docid": "5f5006a9bd4e22d954c0174992aa81f7", "score": "0.60858583", "text": "public function indexAction() {\n\t//\t$this->_forward('requests');//default action\n\t}", "title": "" }, { "docid": "8650bb1143ea0c97f215d0364e662d71", "score": "0.60852885", "text": "public function index()\n {\n $this->muse();\n }", "title": "" }, { "docid": "f83f809d8f4e88d4f648fb1a677804ee", "score": "0.60843384", "text": "public function indexAction()\r\n {\r\n \r\n \r\n }", "title": "" }, { "docid": "0b313a46a5a6d50c88e6da875743785f", "score": "0.6075589", "text": "public function index()\n {\n return $this->handleIndexAction();\n }", "title": "" }, { "docid": "84f9fdd1b54e38a486a348308d190115", "score": "0.60727984", "text": "public function index() {\n\t\t//\n\t}", "title": "" }, { "docid": "84f9fdd1b54e38a486a348308d190115", "score": "0.60727984", "text": "public function index() {\n\t\t//\n\t}", "title": "" }, { "docid": "84f9fdd1b54e38a486a348308d190115", "score": "0.60727984", "text": "public function index() {\n\t\t//\n\t}", "title": "" }, { "docid": "84f9fdd1b54e38a486a348308d190115", "score": "0.60727984", "text": "public function index() {\n\t\t//\n\t}", "title": "" }, { "docid": "84f9fdd1b54e38a486a348308d190115", "score": "0.60727984", "text": "public function index() {\n\t\t//\n\t}", "title": "" }, { "docid": "84f9fdd1b54e38a486a348308d190115", "score": "0.60727984", "text": "public function index() {\n\t\t//\n\t}", "title": "" }, { "docid": "84f9fdd1b54e38a486a348308d190115", "score": "0.60727984", "text": "public function index() {\n\t\t//\n\t}", "title": "" }, { "docid": "84f9fdd1b54e38a486a348308d190115", "score": "0.60727984", "text": "public function index() {\n\t\t//\n\t}", "title": "" }, { "docid": "84f9fdd1b54e38a486a348308d190115", "score": "0.60727984", "text": "public function index() {\n\t\t//\n\t}", "title": "" }, { "docid": "b941e7056e8464d10d6e90e3db21ca4d", "score": "0.6066545", "text": "public function index()\t{\n\t\t//\n\t}", "title": "" }, { "docid": "b5c6386345fc0669ca304e3b27fe9abb", "score": "0.60559154", "text": "public function actionIndex()\n {\n return $this->runDispatch();\n }", "title": "" }, { "docid": "57eaf1c801f9bd9f533976f7d6fedb53", "score": "0.60556096", "text": "public function index()\t\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "856974ce451b710d8543d4a48cae7c88", "score": "0.6055009", "text": "public function indexAction ()\n {\n $this->_forward('list');\n }", "title": "" }, { "docid": "d04f1828e452d85d69c0598aa64df599", "score": "0.6052885", "text": "public function index() {\n //\n\t}", "title": "" }, { "docid": "e8ba83130b2da09ed4b5d580d1d39557", "score": "0.6052285", "text": "public function index() {\n\t\t\n\n\t\t}", "title": "" } ]
360dbe51995fbc5c54819aa903ea1c14
Returns table name mapped in the model.
[ { "docid": "7a2c8323e06ef5f2f3e445b53d009c94", "score": "0.0", "text": "public function getSource()\n {\n return 'department';\n }", "title": "" } ]
[ { "docid": "856a0e61f155ff589216bde42f7d6b30", "score": "0.8361667", "text": "public function getTableName() : string {\n $reflection = new \\ReflectionClass($this);\n return $this->convertToUnderscore(rtrim($reflection->getShortName(), 'Model'));\n }", "title": "" }, { "docid": "8459abe97b9fd4b4b8b223f60feb6491", "score": "0.83050853", "text": "public function getTableName(): string\n {\n return static::TABLE ?: (static::MODEL)::getTableName();\n }", "title": "" }, { "docid": "d822fd426c2b1902d95bb4f3d06afbc5", "score": "0.81549835", "text": "public function getTableName()\n\t{\n\t\treturn $this->model->getTableName();\n\t}", "title": "" }, { "docid": "ff1c5060d43e471d411e0f712476cc1b", "score": "0.80567676", "text": "public static function getTableName()\n {\n $model = new static();\n\n return $model->getTable();\n }", "title": "" }, { "docid": "03705af10d2a13a1d008084f1227cfe4", "score": "0.7921803", "text": "public function tablename($model) {\n foreach($this->models as $table => $modelname) {\n if($modelname == $model) {\n return (is_string($table)) ? $table : $model;\n }\n }\n }", "title": "" }, { "docid": "79ba1ea41306e7bff5ceb1af81c3f8ae", "score": "0.79186064", "text": "public function getTableName() {\n\t\treturn static::$table_name;\n\t}", "title": "" }, { "docid": "29c6aedefd7345257b8096b098bcb9e5", "score": "0.78666747", "text": "public function getTable(): string\n\t{\n\t\t$class = class_basename($this);\n\n\t\treturn $this->table ?? Str::snake(Str::plural($class));\n\t}", "title": "" }, { "docid": "db53f27c8f5080f3c96d037081bc33a4", "score": "0.78576475", "text": "public function getTableName()\n {\n return $this->table_name;\n }", "title": "" }, { "docid": "5e1b794635648b5fd2f11b7f9c38a080", "score": "0.7849162", "text": "private static function _tablename() {\n $table = strtolower(get_called_class());\n ApplicationSql::check_table($table);\n return $table;\n }", "title": "" }, { "docid": "240eb7e2f5e8746f69dd686572696c05", "score": "0.784297", "text": "public static function tableName() {\r\n $tableName = $this->table_name;\r\n return '{{%'.($tableName).'}}';\r\n }", "title": "" }, { "docid": "9ccb5fda02fa436e766b181583ff0fd1", "score": "0.78422105", "text": "public function getTableName(): string\n {\n return $this->tableNameCache ??\n ($this->tableNameCache = $this->dataMapper->getDataMap($this->selfReference->objectType)->getTableName());\n }", "title": "" }, { "docid": "e8fa9c82ebe63b82afa303109667b634", "score": "0.77992624", "text": "public function getTableName()\n {\n return $this->table;\n }", "title": "" }, { "docid": "34f8068efcfb98cafd1372c279a34d34", "score": "0.77909094", "text": "public function tableName()\n\t{\n\t\treturn $this->tableNamePrefix().$this->rawTableName();\n\t}", "title": "" }, { "docid": "0cce661392dce846b6011ae2174ae24d", "score": "0.7786875", "text": "public function getTableName()\n {\n return $this->name;\n }", "title": "" }, { "docid": "2b32952a277a82669d8283a5c0cd9688", "score": "0.7781298", "text": "public function getTableName();", "title": "" }, { "docid": "884717ed5d86ad274d292a641b482d9f", "score": "0.77571225", "text": "public function getModelTableName(): mixed\n {\n return $this->getContainer()->call([$this->getObjectClass(), 'defaultTableName']);\n }", "title": "" }, { "docid": "8e1a2e2f18da928623081244f4b4b42a", "score": "0.77263", "text": "public function getTableName()\n {\n $reflection = new \\ReflectionClass($this);\n return strtolower($reflection->getShortName());\n }", "title": "" }, { "docid": "32e24f29fd22cb705d2ab6ab686f9638", "score": "0.77168393", "text": "protected function getTableName()\n {\n return strtolower($this->getPackageName()) . 's';\n }", "title": "" }, { "docid": "b32de562cdaf12396db263bc7ec17444", "score": "0.77046543", "text": "protected function _table()\n {\n return $this->_model()->getTable();\n }", "title": "" }, { "docid": "d044cbd063acf83b89d4e1d98213dea6", "score": "0.77037776", "text": "public function getTableName()\n\t{\n\t\treturn $this->table;\n\t}", "title": "" }, { "docid": "d1c48fa9f88996b5eb57a3e825ab56e7", "score": "0.7702229", "text": "public static function getTableName()\n {\n return ((new self)->getTable());\n }", "title": "" }, { "docid": "0414863f17531b945c79be9657795fe4", "score": "0.7695454", "text": "protected function getTableName()\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "4c96da32a462630735559ec9e17536f2", "score": "0.76930827", "text": "public static function getTableName() {\n return self::$tableName;\n }", "title": "" }, { "docid": "4c96da32a462630735559ec9e17536f2", "score": "0.76930827", "text": "public static function getTableName() {\n return self::$tableName;\n }", "title": "" }, { "docid": "e3ef8fae08df058065aea7813fb1e48b", "score": "0.7692176", "text": "protected function tableName(): string\n {\n return static::TABLE_ALIAS ? static::TABLE . ' as ' . static::TABLE_ALIAS : static::TABLE;\n }", "title": "" }, { "docid": "5e5903aa07de0422301ba40915c34e14", "score": "0.7690683", "text": "public function getTableName()\n {\n return $this->_name;\n }", "title": "" }, { "docid": "6f81966a05cf5fc16702d19af184496f", "score": "0.7690501", "text": "protected function getTableName()\n {\n if (isset($this->tableName)) {\n return $this->tableName;\n } else {\n return get_class($this->entity);\n }\n }", "title": "" }, { "docid": "1c782aaa6d81ccc3fd52cc793dd34105", "score": "0.76812077", "text": "public function getTableName() {\r\n\t\treturn $this->_name;\r\n\t}", "title": "" }, { "docid": "5cd2712ec8d720cb06203552eb26b2a3", "score": "0.76758724", "text": "protected static function getTableName() {\n\t\t$obj = static::create();\n\t\t$name = $obj->buildTableName();\n\t\tunset($obj);\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "cf3b58040e1f1638285ede090ba0dce5", "score": "0.7669696", "text": "public function getTableName()\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "cf3b58040e1f1638285ede090ba0dce5", "score": "0.7669696", "text": "public function getTableName()\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "cf3b58040e1f1638285ede090ba0dce5", "score": "0.7669696", "text": "public function getTableName()\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "cf3b58040e1f1638285ede090ba0dce5", "score": "0.7669696", "text": "public function getTableName()\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "edabb869ab5300bde252f10f5f5f19ca", "score": "0.7660076", "text": "function getTablename(): string\n {\n\n if (!is_null($this->tablename)) {\n $tblname = $this->tablename;\n } else {\n $p = preg_split(\"/[\\\\\\]/\", strtolower(get_class($this)));\n $clsname = array_pop($p);\n $tblname = self::pluralize($clsname);\n unset ($clsname);\n }\n\n return $tblname;\n }", "title": "" }, { "docid": "c791f2b36c0dec0fb14222fce3c5d531", "score": "0.7653953", "text": "private function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "c791f2b36c0dec0fb14222fce3c5d531", "score": "0.7653953", "text": "private function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "44a354d173a427c5daf7a58182f38bf1", "score": "0.7653728", "text": "public function getTableName()\n {\n return $this->db->prefix . $this->pluginPrefix . $this->tableName;\n }", "title": "" }, { "docid": "37af891a7ec59a216dfd3bd3924be66d", "score": "0.7651651", "text": "public function get_name() {\n\n\t\treturn $this->table_name;\n\t}", "title": "" }, { "docid": "2c428f6a33fa1d105d950175684509b9", "score": "0.7638863", "text": "public function getTableName() {\n return $this->tableName;\n }", "title": "" }, { "docid": "78ea25a0d518939d5b600f7f50bc201d", "score": "0.7634191", "text": "public function getTable()\n {\n if (isset($this->table)) return $this->table;\n return str_replace('\\\\', '', snake_case(class_basename($this)));\n }", "title": "" }, { "docid": "37f6cee8e39c9cf77227830ea042d420", "score": "0.76259696", "text": "public function getTableName()\n\t{\n\t\treturn $this->_name;\n\t}", "title": "" }, { "docid": "3011c7cb0e47aa3671888ec2f6ef26c3", "score": "0.76140714", "text": "public function getTable()\n\t{\n\t\t//check if the table name variable contains a value\n\t\tif ( empty($this->table) ) \n\t\t{\n\t\t\t//if table is not set yet, get a table name from this class instance\n\t\t\t$this->table = strtolower(StringUtility::singular(get_class($this)));\n\n\t\t}\n\n\t\t//return the formed table name\n\t\treturn $this->table;\n\n\t}", "title": "" }, { "docid": "0fa37992d41e9c39dfe799f32530f5db", "score": "0.7614032", "text": "public function getTableName(){\r\n\t\treturn $this->tableName;\r\n\t}", "title": "" }, { "docid": "6adac161ed0c965daa2b96e787c98db7", "score": "0.75904775", "text": "public static function tableName()\n {\n return self::$tableName;\n }", "title": "" }, { "docid": "a70f3dcbc9673b54f2c9eb9f19ba7a73", "score": "0.75877225", "text": "public function getName()\n {\n return $this->table->getName();\n }", "title": "" }, { "docid": "d0d15226b64695d75ebdfa4ce92d667a", "score": "0.7574794", "text": "public static function getTableName();", "title": "" }, { "docid": "0e6738210c4d8e95baf7c1da0c980aed", "score": "0.75740236", "text": "private function determineTableName()\n {\n $annotations = $this->inspector->getClassAnnotations();\n $name = self::parseTableName($this->entity);\n if ($annotations->hasAnnotation('@table')) {\n $name = $annotations->getAnnotation('@table')->getValue();\n }\n return $name;\n }", "title": "" }, { "docid": "e3062822ef80f95d11bdfb15ec22263d", "score": "0.75671285", "text": "public function getTableName() {\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "d4ff4b30b55ca8d551a711c7458a8302", "score": "0.75609326", "text": "private function getTableName() {\n if ($this->resource) {\n return \"dkan_datastore_{$this->resource->getId()}\";\n }\n else {\n return \"\";\n }\n }", "title": "" }, { "docid": "49357289dd352eec05d15c1d8f682482", "score": "0.75553894", "text": "protected function getModelName()\n {\n return ucwords(str_singular(camel_case($this->meta['table'])));\n }", "title": "" }, { "docid": "cea6a42ff45f6c31928e81061a7af7f5", "score": "0.7552552", "text": "public function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "a5eef774902af5b86a34f2385ad3e232", "score": "0.75475055", "text": "public static function getTableAlias()\n {\n return static::$strTable;\n }", "title": "" }, { "docid": "87310cfc09a8706368a1651bd6c5db47", "score": "0.7537593", "text": "public function getTable()\n {\n return $this->model->getTable();\n }", "title": "" }, { "docid": "93759d1fae776b8e69d21ce7a29e07db", "score": "0.752035", "text": "public function getTableName()\n {\n return $this->_tableName;\n }", "title": "" }, { "docid": "93759d1fae776b8e69d21ce7a29e07db", "score": "0.752035", "text": "public function getTableName()\n {\n return $this->_tableName;\n }", "title": "" }, { "docid": "5e3239c9874b88edb1e726381a91835a", "score": "0.7514452", "text": "function table_name()\n {\n return self::TABLE_NAME;\n }", "title": "" }, { "docid": "e7e3a04b83edfb2b20676c6c9bf3bb5c", "score": "0.7513137", "text": "public function getTable()\n {\n if (static::$table !== null) {\n return static::$table;\n }\n $split = explode('\\\\', get_class($this));\n return strtolower($split[count($split) - 1]);\n }", "title": "" }, { "docid": "dfe0c12612fa46cfa88762fb9fd50966", "score": "0.75104177", "text": "public function getTableName(): string;", "title": "" }, { "docid": "dfe0c12612fa46cfa88762fb9fd50966", "score": "0.75104177", "text": "public function getTableName(): string;", "title": "" }, { "docid": "4bf9b1ba6ae28a74eb63086854e675b0", "score": "0.7509988", "text": "public function getTable()\n\t{\n\t\tif (!isset($this->table)) {\n\t\t\treturn str_replace('\\\\', '', Str::snake(Str::plural(class_basename(new parent))));\n\t\t}\n\n\t\treturn $this->table;\n\t}", "title": "" }, { "docid": "020467c59375f12d9484769ed7a9af47", "score": "0.75007886", "text": "public static function getTableName()\n {\n return '';\n }", "title": "" }, { "docid": "5c463c7b7eb451817c23b65a45eafadf", "score": "0.74618083", "text": "public abstract function getTableName();", "title": "" }, { "docid": "78b5e403dc35498b66b3c4b6dcc3c69e", "score": "0.7449013", "text": "public function getTable() {\n return $this->tableName;\n }", "title": "" }, { "docid": "9536857fe3196993e74dc0d0982b8ae6", "score": "0.74391246", "text": "public function modelname($table) {\n foreach($this->models as $tablename => $modelname) {\n if((is_string($table) && $table == $tablename) || $modelname == $table) {\n return $modelname;\n }\n }\n }", "title": "" }, { "docid": "eeb8cb1fff1ed9275620b9cf82beb69c", "score": "0.7429922", "text": "public function singular_table_name()\n{\n\tif ( ! $this->singular_table_name )\n\t{\n\t\t$this->singular_table_name = strtolower($this->inflector->singularize($this->table_name()));\n\t}\n\t\n\treturn $this->singular_table_name;\n}", "title": "" }, { "docid": "f3640f096991e3bdb83a8e6ef99ce5b0", "score": "0.74298906", "text": "protected function getTableName() {\n\t\treturn ( ( substr( $this->sTableName, 0, strlen( $this->getPrefix() ) ) !== $this->getPrefix() ) ? ( $this->getPrefix() . $this->sTableName ) : $this->sTableName );\n\t}", "title": "" }, { "docid": "8deaa5b9f33af549945dd3bc6bd0ae4c", "score": "0.74278414", "text": "public function getTableName() {\n\t\t\n\t\t$this->initTableName();\n\t\t\n\t\treturn $this->_sPrefixedTableName;\n\t}", "title": "" }, { "docid": "9a3a79614b12b027f93c117d9555f517", "score": "0.7416661", "text": "public function getTableName()\n {\n if (null == $this->tableName) {\n $this->tableName = $this->determineTableName();\n }\n return $this->tableName;\n }", "title": "" }, { "docid": "c461dfd12e5ac7c6d8dd13c2e525d886", "score": "0.74151325", "text": "public function getTableName() {\n return $this->_name . \"_\" . (intval(fmod($this->hash, 10)) + 1);\n }", "title": "" }, { "docid": "dd471a7b73abaacd7b3d1494a0aeff05", "score": "0.74092925", "text": "public function getTable(): string\n {\n return $this->table;\n }", "title": "" }, { "docid": "dd471a7b73abaacd7b3d1494a0aeff05", "score": "0.74092925", "text": "public function getTable(): string\n {\n return $this->table;\n }", "title": "" }, { "docid": "d769b29dd2664defba0028df7a379caf", "score": "0.7403259", "text": "public function getTable()\n {\n return $this->getModel()->getTable();\n }", "title": "" }, { "docid": "969ef122e25ee14b94068879ea8639e2", "score": "0.74012244", "text": "protected function table_name($table_name = NULL)\n{\t\n\tif ( empty($this->table_name) || $table_name )\n\t{\t\n\t\t$this->table_name = $table_name ? $table_name : $this->inflector->pluralize(str_replace('_model', '', strtolower(get_class($this))));\n\t}\t\n\t\n\treturn $this->table_name;\n}", "title": "" }, { "docid": "45728fb97550d19fbec0cd04cce83d67", "score": "0.73756385", "text": "public static function getTableName()\n\t{\n\t\t$splitter = new Splitter(self::getClassName());\n\n\t\t$tableName = $splitter->format();\n\t\t$tableName = Pluralize::pluralize($tableName);\n\n\t\treturn $tableName;\n\t}", "title": "" }, { "docid": "718f2d963c057dfedba0b8c03713db94", "score": "0.73754233", "text": "public function getTable()\r\n {\r\n return $this->tablename;\r\n }", "title": "" }, { "docid": "c63b7641b12cede1fd766b49417070d2", "score": "0.7353781", "text": "abstract public function getTableName();", "title": "" }, { "docid": "2ca1b3b124459d0eb6b08b8bf5b4bc26", "score": "0.7349746", "text": "public function table($name='')\r\n {\r\n if(!empty($name)){\r\n return strtolower($name);\r\n }else if($this->table_name !== ''){\r\n return $this->table_name;\r\n }else{\r\n return strtolower($this->class_name).'s';\r\n }\r\n }", "title": "" }, { "docid": "1b34b431a3be6619ee662230442fa278", "score": "0.7348123", "text": "public static function tableName()\n {\n $name = static::class;\n if ($pos = strrchr($name, '\\\\')) {\n $name = (substr($pos, 1));\n }\n $name = str_replace('Search', '', $name);\n $name_a = preg_split('#([A-Z][^A-Z]*)#', $name, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n $name = strtolower(implode('_', $name_a));\n return $name;\n }", "title": "" }, { "docid": "7ada835582e4ff3e24674c336881bd36", "score": "0.7346714", "text": "static function tableName() {\n\t\tif (static::$tableName) return static::$tableName;\n\t\t$tname = get_called_class(); // get the class name\n\t\t$tname = preg_replace(\"/(?<!^)([A-Z])/\", \"_$1\", $tname); // convert camelcase to underscores\n\t\t$tname = strtolower( $tname ); // all lowercase\n\t\treturn static::plural($tname); // return the plural version\n\t}", "title": "" }, { "docid": "816288a6ac5b02d17ce8eabc6ed29ef5", "score": "0.7343478", "text": "public static function table(){\n $calling_class = get_called_class();\n $default_table = strtolower($calling_class) . 's';\n \n $table = isset(static::$table) ? static::$table : $default_table;\n return $table;\n }", "title": "" }, { "docid": "d45835b626ff70161d5f838a7093dfcc", "score": "0.7342169", "text": "protected static function table() \n {\n $path = explode('\\\\', static::class);\n return lcfirst(array_pop($path));\n }", "title": "" }, { "docid": "97650fde6bde103621d86fc73f16149c", "score": "0.7324887", "text": "protected function getTableName()\n {\n if ($this->option('table')) {\n return trim($this->option('table'));\n }\n\n return str_plural(snake_case(class_basename($this->argument('name'))));\n }", "title": "" }, { "docid": "4837a651905a1fa64155be2ea6e6abe9", "score": "0.7311974", "text": "public function getTable()\n {\n return $this->fullAlias();\n }", "title": "" }, { "docid": "9c1248f150a1e8688aa1581f9bd83608", "score": "0.73047274", "text": "public function getTable(): string\n {\n return Config::get('flow.steps.table_name', parent::getTable());\n }", "title": "" }, { "docid": "9329851104d801a15519cdb952f7f5ec", "score": "0.72935414", "text": "public static function getTableName()\n {\n return with(new static)->getTable();\n }", "title": "" }, { "docid": "9329851104d801a15519cdb952f7f5ec", "score": "0.72935414", "text": "public static function getTableName()\n {\n return with(new static)->getTable();\n }", "title": "" }, { "docid": "9329851104d801a15519cdb952f7f5ec", "score": "0.72935414", "text": "public static function getTableName()\n {\n return with(new static)->getTable();\n }", "title": "" }, { "docid": "9329851104d801a15519cdb952f7f5ec", "score": "0.72935414", "text": "public static function getTableName()\n {\n return with(new static)->getTable();\n }", "title": "" }, { "docid": "ad7f21cab4a1404a87af24feeac48a35", "score": "0.72827697", "text": "public function table()\n {\n return $this->table;\n }", "title": "" }, { "docid": "ad7f21cab4a1404a87af24feeac48a35", "score": "0.72827697", "text": "public function table()\n {\n return $this->table;\n }", "title": "" }, { "docid": "aa1a390c6afe08bc8624b8085642e350", "score": "0.72809464", "text": "public function getTableName()\r\n\t{\r\n\t\t$TablePara = $this->getTableArray();\r\n $tablename = '';\r\n\t\tfor($i=0,$nt = count($TablePara);$i<$nt;$i++)\r\n\t\t{\r\n\t\t\t$tablename .= $TablePara[$i][0].\" `\".$TablePara[$i][1].\"`,\";\r\n\t\t}\r\n\t\t$tablename = substr($tablename,0,-1);\r\n\t\treturn $tablename;\r\n\t}", "title": "" }, { "docid": "a10dcabd780ad77e2305e9c159cc7d0e", "score": "0.72719854", "text": "public function getTable($name)\n {\n if (isset($this->params['table'])) {\n return $this->params['table'];\n }\n return Inflector::underscore($name);\n }", "title": "" }, { "docid": "95cb4f8a6e3ed9bc7d9d5a8d627d2bb3", "score": "0.726934", "text": "static function get_table_name()\n\t{\n\n return self :: TABLE_NAME;\n\t}", "title": "" }, { "docid": "30c1d1872bc69847e0ba18bdbe07a360", "score": "0.7268823", "text": "public function table()\n\t{\n\t\treturn '(=tableName)';\n\t}", "title": "" }, { "docid": "d32ea682cd686f9f2d7628ebbab807b0", "score": "0.72638506", "text": "public function table()\n\t{\n\t\t$table = parent::table();\n\n\t\t$table = $this->prefix\n\t\t\t? $this->prefix.$table\n\t\t\t: $table;\n\n\t\treturn $table;\n\t}", "title": "" }, { "docid": "a0c2d32f7350afacd9b850e47e038718", "score": "0.7262781", "text": "public function getTableAttribute()\n {\n return 'mx_' . $this->handle;\n }", "title": "" }, { "docid": "9b3e119645bcf419de6487cc0f718326", "score": "0.7253913", "text": "public function get_table() {\n return $this->table;\n }", "title": "" }, { "docid": "67a88098570f4724fcf56bf51e6006d3", "score": "0.7252992", "text": "public function table() {\n return $this->wpdb()->prefix . $this->prefix . $this->table_name();\n }", "title": "" }, { "docid": "a3c5e84c429111dc8bcd7364b86f836d", "score": "0.7251705", "text": "abstract protected function getTableName();", "title": "" }, { "docid": "a2c984bc09db8527876c96bc40aabd86", "score": "0.72355205", "text": "public static function getTableName()\n\t{\n\t\tif(static::$tableName != '')\n\t\t{\n\t\t\treturn static::$tableName;\n\t\t}\n\n\t\treturn 'b_tasks_task_dep';\n\t}", "title": "" }, { "docid": "1f4f48364404aafaa10bf359a6b8698c", "score": "0.72295964", "text": "public function getFQTableName()\n {\n return static::FQ_TABLE_NAME;\n }", "title": "" } ]
ddedde97c46dfd546b3aac4281866d3b
Returns true if a next chunk exists
[ { "docid": "b4c67a90f07748001c7cbc9bd9a5e09e", "score": "0.82291335", "text": "public function hasNextChunk()\n\t{\n\t\treturn $this->index + 1 < $this->getMaxChunks();\n\t}", "title": "" } ]
[ { "docid": "b22e259e2581ca410e544916f1c2622a", "score": "0.7806745", "text": "public function hasChunk()\n {\n return ($this->counter++ < self::MAX_CHUNKS);\n }", "title": "" }, { "docid": "cc877c1b62b3a9570314bbaa9d6a8384", "score": "0.76166046", "text": "public function hasChunk()\n\t{\n\t\treturn $this->getMaxChunks() == 1;\n\t}", "title": "" }, { "docid": "b738f9852186f75fa4bc4f2e24a2487a", "score": "0.7592105", "text": "protected function shouldLoadNextChunk()\n {\n return $this->isNotBooted()\n || ($this->valid() && $this->offset >= $this->chunkSize);\n }", "title": "" }, { "docid": "19d3440570aa23faec9f8c33e4362401", "score": "0.7362452", "text": "public function hasPreviousChunk()\n\t{\n\t\treturn $this->index - 1 >= 0;\n\t}", "title": "" }, { "docid": "c9fab3466dbf7a071a07b6bffa070454", "score": "0.7345649", "text": "public function has_next();", "title": "" }, { "docid": "f871b6b074ad0f1176728259c2ebf7ef", "score": "0.69084716", "text": "public function shouldChunk(): bool\n {\n return $this->chunkSize > 0;\n }", "title": "" }, { "docid": "05d94d649dbb921a69ba0d391869f2ef", "score": "0.6891103", "text": "protected final function loadNext() : bool {\r\n $this->throwIfDisposed();\r\n\r\n $this->_buffer = \\fread($this->_resource, $this->_bufferSize);\r\n\r\n return false !== $this->_buffer;\r\n }", "title": "" }, { "docid": "434bd31095d8fd762f37c8f8c14f6eb3", "score": "0.68838465", "text": "public function hasChunks()\n\t{\n\t\treturn $this->getMaxChunks() > 0;\n\t}", "title": "" }, { "docid": "1fa09103cdcf99f8630ff3792d95e225", "score": "0.6813528", "text": "public function isLastChunk()\n {\n return true;\n }", "title": "" }, { "docid": "75f778d6dc17677d1361ca4630229e44", "score": "0.679533", "text": "public function isFirstChunk()\n {\n return true;\n }", "title": "" }, { "docid": "d39877c579ce91c0c992f4e5be570202", "score": "0.67225033", "text": "public function hasNext(){\n if(!empty($this->next)){\n return true;\n }else{ \n if($this->reader->next()){\n $this->next = $this->reader->expand();\n return true;\n }else{\n return false;\n }\n }\n }", "title": "" }, { "docid": "1855aea7e5d2193e22aa355302e28f6e", "score": "0.6704205", "text": "function chunkLoaded($name) {\r\n\t\treturn isset($this->chunkCache[$name]);\r\n\t}", "title": "" }, { "docid": "b5785953321349f180811656774d4ab9", "score": "0.6673622", "text": "public function reachedEnd()\n {\n $currentChunkSize = count($this->chunk);\n\n return ($currentChunkSize < $this->chunkSize)\n && $currentChunkSize - 1 == $this->offset;\n }", "title": "" }, { "docid": "c0a713b4715928da621075e3f353abfd", "score": "0.66186947", "text": "public function hasMoreToProcess()\n {\n if ($this->_pointer < $this->getLength()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "4a1cc7dd0d3d56f69329cb58895aa317", "score": "0.6536027", "text": "public function hasNext(): bool;", "title": "" }, { "docid": "4a1cc7dd0d3d56f69329cb58895aa317", "score": "0.6536027", "text": "public function hasNext(): bool;", "title": "" }, { "docid": "f54ff410997e054614457c969ebdd6d7", "score": "0.6454449", "text": "public function eof()\n {\n return ($this->_pointer >= $this->getSize());\n }", "title": "" }, { "docid": "69a6a6636e7b6fb243c743ee11a4d5ba", "score": "0.6427933", "text": "public function valid()\n {\n $currentChunkSize = count($this->chunk);\n\n return is_null($this->chunkOffset)\n || $currentChunkSize == $this->chunkSize\n || $this->offset < $currentChunkSize;\n }", "title": "" }, { "docid": "cda54241dd6fbd0815efdf9ec7c8de0d", "score": "0.64184535", "text": "public function hasNext(): bool\n {\n return empty($this->report_footer) && empty($this->report_record_count);\n }", "title": "" }, { "docid": "d0737dcbe737099befdfda4c1eef5597", "score": "0.641753", "text": "public function hasNext(){\n return !feof($this->handle);\n }", "title": "" }, { "docid": "6333749922bacc8d2932f3611de8d869", "score": "0.6313371", "text": "function hasMore ()\n {\n return isset($this->response) && !isset($this->response['next']);\n }", "title": "" }, { "docid": "385ed8a6d0e57d9191411b92257f9b39", "score": "0.626789", "text": "public function hasNext()\n\t{\n\t\treturn ($this->current != $this->head || $this->counter == 0);\n\t}", "title": "" }, { "docid": "fd4fa09da35c0ac95b34befd4d8874d2", "score": "0.6252776", "text": "public function hasNext(){\n\t\treturn ($this->getPosition() < $this->getCount());\n\t}", "title": "" }, { "docid": "53a42ac439e9833db1d3b83c4244c5a6", "score": "0.6232887", "text": "public function eof(): bool\n {\n $this->expandBuffer(1);\n return \\strlen($this->buffer) <= 0; //There was no way to expand the buffer, basically\n }", "title": "" }, { "docid": "63f1eb826f3d5c64c19ae4c2ef21a20d", "score": "0.61682206", "text": "public function hasNext ()\n {\n return (boolean) sizeof($this->_container);\n }", "title": "" }, { "docid": "e349b1dcf4c95ee4fd6228d96210a384", "score": "0.6145548", "text": "public function valid() {\n\t// if we are at the last record our file handle should point to the eof.\n\t// feof will return true in this case, we wan't the opposite.\n\t$currentPosition = ftell($this->fileHandle);\n\t$size = $this->fileInfo->getSize();\n\t\n\tif ($currentPosition >= $size) {\n\t return false;\n\t} else {\n\t return true;\n\t}\n }", "title": "" }, { "docid": "1c300aebde071e6fc89208acbe96a8c3", "score": "0.61364347", "text": "public function next() {\n $this->loggerM->trace ( \"Enter: \" . count ( $this->tableDataM ) );\n $thereAreMoreRows = true;\n if ($this->rowIdxM == (count ( $this->tableDataM ) - 1)) {\n $thereAreMoreRows = false;\n } else {\n if ($this->rowIdxM != - 1) {\n next ( $this->tableDataM );\n }\n $this->rowIdxM ++;\n }\n $this->loggerM->trace ( \"Exit\" );\n return $thereAreMoreRows;\n }", "title": "" }, { "docid": "a6903809a6513759f476ceb52f096969", "score": "0.6131478", "text": "public function isEof()\n {\n return !$this->hasChunk();\n }", "title": "" }, { "docid": "357354c864c36073a04ad4a22119de8e", "score": "0.6127779", "text": "public function next()\n {\n Container::getContext()->getSubstitute()->clear();\n $this->position++;\n\n if ($this->position < $this->length) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a2295860304f8f07cfbe243392d0eefa", "score": "0.6126034", "text": "public function eof() {\n return 0 == sizeof($this->_data);\n }", "title": "" }, { "docid": "5e252b66b2f66632782945363d29a5e3", "score": "0.60953134", "text": "public function isLoaded(int $offset)\n {\n // Check that a chunk is loaded\n if ($this->isNotBooted()) {\n return false;\n }\n\n // The beginning of the chunk\n $chunkStart = $this->chunkOffset * $this->chunkSize;\n\n return $offset >= $chunkStart\n && $offset <= $this->offset + $chunkStart;\n }", "title": "" }, { "docid": "309e08abb7c1207f7d4bf6ff5d772878", "score": "0.60887355", "text": "public function hasNextPage()\n {\n $p = $this->getCurrentPage() + 1;\n return (! empty($this->array[$p]) ? true : false);\n }", "title": "" }, { "docid": "ea5ba0e730df0bb15bf0fe65de552559", "score": "0.60654986", "text": "public function next() {\n\n if ($this->rowIdx < $this->count) {\n $this->row=$this->rows[$this->rowIdx++];\n return true;\n }\n else {\n $this->rowIdx=0;\n return false;\n }\n\n }", "title": "" }, { "docid": "3ed23bf2480ee2f812affb37609caa82", "score": "0.60489804", "text": "public function offsetExists(mixed $offset): bool\n {\n if (!is_int($offset)) {\n throw new InvalidArgumentException(\n \"Tried to access file chunk with a non-integer key.\"\n );\n }\n\n if ($this->mode === FileIterableInterface::MODE_CHUNK) {\n fseek($this->file, $this->chunkSize * $offset);\n return !$this->feof();\n }\n\n $this->mapToLine($offset);\n return isset($this->lineMap[$offset]);\n }", "title": "" }, { "docid": "1770527c6511759418aa82dc0722a432", "score": "0.6008262", "text": "public function canContinue(): bool\n {\n $limit =\n (int) ($this->configRepository->get('fibonacci.max_fibonacci_elements')\n ?? $this->redisSchemaDictionary->getRedisElementsMax());\n\n return $this->getSequenceLength() < $limit;\n }", "title": "" }, { "docid": "ede4441bb96ad63874013af079028052", "score": "0.5944484", "text": "public function eof()\n {\n return (strlen($this->buffer) === $this->position);\n }", "title": "" }, { "docid": "591dedbdf515603c1edf84a773bc5732", "score": "0.594234", "text": "public function has_next()\n\t{\n\t\t$next = self::factory()\n\t\t\t\t->where($this->_left_column, '>', $this->left())\n\t\t\t\t->where($this->_parent_column, '=', $this->{$this->_parent_column})\n\t\t\t\t->order_by($this->_left_column, 'ASC')\n\t\t\t\t->find();\n\t\t\n\t\tif ($next->pk())\n\t\t{\n\t\t\treturn $next;\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "174b8b8cc4d8e61d0d6e74cbf35efbb8", "score": "0.5940941", "text": "public function next() {\n\t\t\tif ($this->reader->isReady()) {\n\t\t\t\tforeach ($this->rules as $rule) {\n\t\t\t\t\t$tuple = $rule->process($this->reader);\n\t\t\t\t\tif ($tuple !== null) {\n\t\t\t\t\t\t$this->current = $tuple;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->current = null;\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "867cdf743f266e94a13ca936cd26d228", "score": "0.5937593", "text": "public function hasNextSibling(): bool {\r\n return null !== $this -> nextSibling;\r\n }", "title": "" }, { "docid": "56d6c14ce8483e91e2b8eb3a252eb39b", "score": "0.59316653", "text": "public function has_next_page() {\r\n\t\treturn $this->next_page() <= $this->total_pages() ? true : false; \r\n\t}", "title": "" }, { "docid": "7c86804cb1ba83f76455505582aef60b", "score": "0.5909154", "text": "public function isEOF(): bool\n {\n return 0 === $this->getRemainingBytes();\n }", "title": "" }, { "docid": "13f0150cf45723da80ebdc6f7e874a56", "score": "0.58931607", "text": "public function hasNext();", "title": "" }, { "docid": "13f0150cf45723da80ebdc6f7e874a56", "score": "0.58931607", "text": "public function hasNext();", "title": "" }, { "docid": "13f0150cf45723da80ebdc6f7e874a56", "score": "0.58931607", "text": "public function hasNext();", "title": "" }, { "docid": "13f0150cf45723da80ebdc6f7e874a56", "score": "0.58931607", "text": "public function hasNext();", "title": "" }, { "docid": "13f0150cf45723da80ebdc6f7e874a56", "score": "0.58931607", "text": "public function hasNext();", "title": "" }, { "docid": "13f0150cf45723da80ebdc6f7e874a56", "score": "0.58931607", "text": "public function hasNext();", "title": "" }, { "docid": "66ea4cb1f4100a955399e7acd8de89b5", "score": "0.5878395", "text": "private function isValid(): bool\n {\n return !feof($this->stream);\n }", "title": "" }, { "docid": "345f5fa6d15e5f1b433bd9624605c991", "score": "0.5867103", "text": "public function hasNext() {\n\n // Check to see if we have fetched a record previously. In this case,\n // short-cuircuit this to prevent hasNext() from forwarding the result\n // pointer every time we call it.\n if ($this->_record) return TRUE;\n\n $this->_record= $this->_rs->next();\n return !empty($this->_record);\n }", "title": "" }, { "docid": "c9fb2ae8893714a48352fe258ab8efa8", "score": "0.58615804", "text": "public function hasNext()\n {\n return !$this->isLast();\n }", "title": "" }, { "docid": "7648ef1bf33c207169f58e02dfe452ab", "score": "0.5828032", "text": "public function nextResult($link)\n {\n return false;\n }", "title": "" }, { "docid": "4f7545a20988c0941fc19921595bfec0", "score": "0.5828003", "text": "public function nextRowset(): bool\n {\n return true;\n }", "title": "" }, { "docid": "6caea670ea08d7a0c3e1630e1547d323", "score": "0.5823521", "text": "public function hasNext(): bool\n {\n return !empty($this->entries) && ($this->getStartIndex() + $this->getItemsPerPage() - 1 < $this->getTotalResults());\n }", "title": "" }, { "docid": "4caa575044643c1ec2712a8c8ad3234b", "score": "0.5816309", "text": "public function ensureContent()\n {\n while ($this->offset >= $this->bufferLength) {\n if (!$this->increaseLength()) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "bd5394a80000ae0c51ced8f22828395e", "score": "0.5811473", "text": "protected function hasCollectedAllChunks()\n {\n return $this->totalChunks === count($this->store->foreverKeys());\n }", "title": "" }, { "docid": "87e8c586d73e2c7802d2597168055ce2", "score": "0.58024275", "text": "public function next() { \n\n\t\t$this->send_command('next'); \n\t\treturn true;\n\n\t}", "title": "" }, { "docid": "e98e619258b314e14e0f7db98a5c1323", "score": "0.57965654", "text": "public function isLast() {\n return !isset($this->next);\n }", "title": "" }, { "docid": "1923af19c3e52fe2dfce7c57c5bef1be", "score": "0.57900083", "text": "public function moveNext() : bool {\r\n\t\tif (!$this->EOF) {\r\n\t\t\t$this->_currentRow++;\r\n\t\t\tif ($this->_fetch()) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->EOF = true;\r\n\t\t/* -- tested error handling when scrolling cursor -- seems useless.\r\n\t\t$conn = $this->connection;\r\n\t\tif ($conn && $conn->raiseErrorFn && ($errno = $conn->ErrorNo())) {\r\n\t\t\t$fn = $conn->raiseErrorFn;\r\n\t\t\t$fn($conn->databaseType,'MOVENEXT',$errno,$conn->ErrorMsg().' ('.$this->sql.')',$conn->host,$conn->database);\r\n\t\t}\r\n\t\t*/\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "9a164b19a379bc34c310f8a8178ce864", "score": "0.57878476", "text": "public function hasNext()\n\t{\n\t\treturn !$this->todo->isEmpty();\n\t}", "title": "" }, { "docid": "bd326290258e29997f0cb5b85d63904f", "score": "0.57788473", "text": "public function isReady() : bool {\n\t\t\treturn (($this->position >= 0) && ($this->position < $this->length));\n\t\t}", "title": "" }, { "docid": "f03ed3686fa0ffdae30578b4ece14199", "score": "0.57745034", "text": "public function hasNextHandler() {\n return $this->handlerIndex <= count($this->handlers) - 1;\n }", "title": "" }, { "docid": "9f943d1aef11b03e5f46308012a1da8e", "score": "0.5762772", "text": "private function feof()\n {\n return $this->eof == true;\n }", "title": "" }, { "docid": "a9c2986fcd284e4f47fb8f44ca40f092", "score": "0.57422733", "text": "public function valid() {\n\t\treturn ($this->current < count($this->data));\n\t}", "title": "" }, { "docid": "ee92842bf9a4c76ae34ae7ffed39f0aa", "score": "0.57243663", "text": "public function eof() {\n\t\t\treturn $this->remain == '';\n\t\t}", "title": "" }, { "docid": "80c79af602a3b2afd28b16c390ae9c06", "score": "0.5705112", "text": "public function has_previous(){\n\n\t\treturn $this->previous() >= 1 ? true : false;\n\n\n\t}", "title": "" }, { "docid": "abc26a7c1ffaf82a4764a43d6e0a56f3", "score": "0.5680443", "text": "public function hasStart(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "6a6cdb1c2fc73c5460ccf8b06c6953d6", "score": "0.5672731", "text": "public function hasMoreTokens() {\n return (!empty($this->_stack) || $this->_ofs < $this->_len);\n }", "title": "" }, { "docid": "6b333768e750c6886d82f583c8ebf0ef", "score": "0.56598383", "text": "public function canShowNext()\n {\n return $this->getNextNode() !== null;\n }", "title": "" }, { "docid": "b01da93083217a2ef79658481219181b", "score": "0.5659125", "text": "public function isEnd()\n {\n if ($this->next >= count($this->steps)) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "668d1fdcb0bf046510f5182d269474a4", "score": "0.5657533", "text": "private function feof(): bool\n {\n $currentPosition = ftell($this->file);\n fread($this->file, 1);\n $end = feof($this->file);\n fseek($this->file, $currentPosition);\n return $end;\n }", "title": "" }, { "docid": "e757ec8364f28d22abc5916ec1fb85ad", "score": "0.56485903", "text": "public function valid() {\n if ( ! empty( $this->buffer ) ) {\n return true;\n }\n\n // Buffer is empty let's refill it\n $this->buffer = $this->thriftSQLQuery->fetch( self::BUFFER_ROWS );\n\n // Buffer is full again!\n if ( ! empty( $this->buffer ) ) {\n return true;\n }\n\n $this->thriftSQLQuery->close();\n return false;\n }", "title": "" }, { "docid": "7559da455980c69eee7e98a3f324c4dd", "score": "0.5636606", "text": "public function hasEnd(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "7a2ac4127441b5abff599d563a022d3f", "score": "0.56355613", "text": "public function next() \n {\n if($this->_currentIndex + 1 >= strlen($this->_string)) {\n return false;\n }\n \n $this->_currentIndex++;\n return true; \n }", "title": "" }, { "docid": "9c74e77eb3a1062af4c6e12d1c4949c6", "score": "0.56266356", "text": "public function next() {\n\t\t\t\n\t\t\t$this->clean ();\n\t\t\n\t\t\tif (isset ( $this->_rowSet [$this->_pointer] )) {\n\t\t\t\t\n\t\t\t\n\t\t\t\t$this->loadFromArray ( $this->_rowSet [$this->_pointer] );\n\t\t\t\t\n\t\t\t\tforeach ( $this->_bindObjects as $object ) {\n\t\t\t\t\t\n\t\t\t\t\t$object->clean();\n\t\t\t\t\t$object->loadFromArray ( $this->_rowSet [$this->_pointer] );\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\t\n\t\t\t\t$this->_pointer ++;\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e051c0d5d7442ab5f024e947b833933b", "score": "0.5625297", "text": "public function next()\n\t{\n\t\treturn $this->getNextChunk();\n\t}", "title": "" }, { "docid": "3b51477916bc5e4f22b7c62765cfac7c", "score": "0.56233704", "text": "public function nextMile() {\n\t\t$this->moveDistance(1.60934);\n\n\t\treturn $this->isAtEnd();\n\t}", "title": "" }, { "docid": "f46c495cdb81be34d160ea705a1a8b62", "score": "0.56057525", "text": "function next()\n{\n\t//::if(!$this->_is_open) return false;\n\n\tif($this->_move_count>0){\n\t\treturn $this->_read();\n\t}\n\n\t$this->_move_count++;\n\t$this->_row_num++;\n\treturn $this->_row_status;\n}", "title": "" }, { "docid": "458568055a9056cdb8be4b4a69ae4700", "score": "0.56019074", "text": "public function has_async_content(): bool {\n\t\treturn $this->has_async_content ?? false;\n\t}", "title": "" }, { "docid": "9e38c156fe8f3a2f3746f55afc348312", "score": "0.5595049", "text": "public function nextRowset(): bool\n {\n return $this->stmt->nextRowset();\n }", "title": "" }, { "docid": "60bf8537f04b6137952627f72692247a", "score": "0.5589041", "text": "public function nextRecordSet() : bool {\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "e91b7de250ba5398265a937636f3f1b6", "score": "0.5579087", "text": "protected function needs_content()\n {\n return $this->content_len - $this->content_len_read > 0;\n }", "title": "" }, { "docid": "b658a152e20d2fe15034c273925b6cde", "score": "0.55763805", "text": "public function next() {\n\t\t$value = next($this->_data);\n\t\treturn key($this->_data) !== null ? $value : false;\n\t}", "title": "" }, { "docid": "5f564f27c5e3c4fe74559815b8788be6", "score": "0.55643266", "text": "public function valid(): bool\n {\n $this->ensureIteratorPosition();\n\n return !$this->feof($this->file);\n }", "title": "" }, { "docid": "1416fcab18812f06143b9cc4659d6502", "score": "0.55477107", "text": "public function valid() {\n if ($this->flags & self::READ_AHEAD) {\n return $this->current() !== false;\n }\n return !$this->eof();\n }", "title": "" }, { "docid": "e78a28152311919c63a4159bfa9a4fc7", "score": "0.5546204", "text": "public function nextTokenIsAdjacent(): bool\n {\n return $this->token === null\n || ($this->lookahead !== null\n && ($this->lookahead->position - $this->token->position) === strlen($this->token->value));\n }", "title": "" }, { "docid": "6fd4a4d672f5720b5680d1fdea381272", "score": "0.55424935", "text": "public function isNext(...$args): bool\n\t{\n\t\treturn (bool) $this->scan($args, true, false); // onlyFirst\n\t}", "title": "" }, { "docid": "23c685c2db25fe3719c449d6c371034d", "score": "0.55359507", "text": "private function moveToNextLine(): bool\n {\n if ($this->currentLineNb >= $this->numberOfParsedLines - 1) {\n return false;\n }\n\n $this->currentLine = $this->lines[++$this->currentLineNb];\n\n return true;\n }", "title": "" }, { "docid": "2354c22e7dcfc8b74ff1a410ac43d42d", "score": "0.5530724", "text": "public function nextBoolean(): bool;", "title": "" }, { "docid": "2c45a9825e7ac614c7c1ca1397075601", "score": "0.5529848", "text": "public function hasProgress(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "25eb25dd5507aa8444ef8d702082383c", "score": "0.5528563", "text": "public function offsetExists($offset) : bool\n {\n return isset($this->blocks[$offset]);\n }", "title": "" }, { "docid": "08572c9cdceac06f7aea4529499d2bbe", "score": "0.5528172", "text": "public function isEOF(): bool\n\t{\n\t\treturn $this->current->is('eof');\n\t}", "title": "" }, { "docid": "bd553d4edbfed63062127f3bce394c80", "score": "0.55250037", "text": "public function getNextChunk()\n\t{\n\t\treturn $this->getChunk(++$this->index * $this->size);\n\t}", "title": "" }, { "docid": "aed3989d03bc3578b96c3f7352ce87af", "score": "0.5524475", "text": "public function eof(): bool;", "title": "" }, { "docid": "7a080064615b59a072d068179e5d7f50", "score": "0.5503371", "text": "protected function isNext()\n {\n return $this->maxRandClient > 0 || ($this->maxRandClient <= 0 && count($this->clients) > 0);\n }", "title": "" }, { "docid": "f0eb2cfd31a0d62a8298cc14515a2a6f", "score": "0.54970354", "text": "function hasMore() {\n return $this->position < count($this->names);\n }", "title": "" }, { "docid": "c7dd2eee6a2c0da5d41a93d6939d37a0", "score": "0.54956466", "text": "public function haveData() {\n return strlen($this->wBuf_) > 0;\n }", "title": "" }, { "docid": "020e5864ec3af151164d508a39cceddc", "score": "0.5491496", "text": "public function valid()\n {\n return $this->pointer >= 0 && $this->pointer < $this->count();\n }", "title": "" }, { "docid": "879297d6c3c9253bb0f596d35f3d3dfd", "score": "0.5489376", "text": "public function hasFinish(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "bd80472ea09194968172c55c2552c846", "score": "0.54891026", "text": "protected function _assumedNextLine($start)\n {\n $line = $this->_nextLine();\n\n return strpos($line, $start) === 0;\n }", "title": "" }, { "docid": "efef4b61b50305ecb34cf0ef408680dc", "score": "0.548812", "text": "function next()\r\n\t{\r\n\t\tif ($this->first)\r\n\t\t{\r\n\t\t\t$record =& reset($this->data);\r\n\t\t\t$this->first = false;\r\n\t\t\t$this->counter = 0;\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\t$record =& next($this->data);\r\n\t\t\t$this->counter++;\r\n\t\t} \r\n\t\tif (is_array($record))\r\n\t\t{\r\n\t\t\t$this->record =& $record;\r\n\t\t\t$this->prepare();\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->record = null;\r\n\t\t\treturn false;\r\n\t\t} \r\n\t}", "title": "" } ]
0e70df8b20c22fcbee078db9a32d351c
Send the email verification notification.
[ { "docid": "69a21d48f210b2cd84f7d16646b48dc5", "score": "0.8672753", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmailQueuedNotification());\n }", "title": "" } ]
[ { "docid": "ba1a98a2554784d9ade239a4c0f144fe", "score": "0.9116436", "text": "public function sendVerificationEmail(){\n\n $this->notify(new VerifyEmail($this));\n }", "title": "" }, { "docid": "674c20a8b6740498856c09978d432bca", "score": "0.9107338", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new Notifications\\VerifyEmail);\n }", "title": "" }, { "docid": "14d8f9c0fcae364e10f3e37aff97030e", "score": "0.9061689", "text": "public function sendEmailVerificationNotification() {\n $this->notify(new VerifyEmail());\n }", "title": "" }, { "docid": "7832ba3b41c7522925f8be58792edc5b", "score": "0.9052946", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail());\n }", "title": "" }, { "docid": "dfc956a18491f47c2c9e3c77a298f8c7", "score": "0.9042597", "text": "public function sendEmailVerificationNotification() {\n $this->notify(new CustomVerifyEmail($this->email));\n }", "title": "" }, { "docid": "6d120e4d6632a01fcc49b46f96529d19", "score": "0.9040214", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "title": "" }, { "docid": "6d120e4d6632a01fcc49b46f96529d19", "score": "0.9040214", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "title": "" }, { "docid": "6d120e4d6632a01fcc49b46f96529d19", "score": "0.9040214", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "title": "" }, { "docid": "6d120e4d6632a01fcc49b46f96529d19", "score": "0.9040214", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "title": "" }, { "docid": "d605052f26284a3b88ff1623652b89c0", "score": "0.8984029", "text": "public function sendEmailVerificationNotification()\n {\n //TODO\n }", "title": "" }, { "docid": "2977e39294c295f569b2516e13f66b05", "score": "0.89642537", "text": "public function sendEmailVerificationNotification()\n {\n try {\n $this->notifyNow(new VerifyEmail());\n } catch (\\Exception $e) {\n Log::error($e);\n }\n }", "title": "" }, { "docid": "88d3d8facb9e05e6de72604f7e06c990", "score": "0.8960583", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new UserVerifyEmailNotification);\n }", "title": "" }, { "docid": "af477a5bef32ce8c2b36f26e06bfa99c", "score": "0.8955491", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail($this));\n }", "title": "" }, { "docid": "b40b4ccd4c616922c47380e0b9ec1b39", "score": "0.8955199", "text": "public function sendEmailVerificationNotification()\n {\n $verify = app()['config']['api-auth.notifications.verify'];\n $this->notify(new $verify());\n }", "title": "" }, { "docid": "38e8f415a6f7f6c1a92b397d13ce0d4a", "score": "0.8860878", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new SubscriberVerifyEmail);\n }", "title": "" }, { "docid": "7f1d5691679bbbbde0b2ce2f2f474187", "score": "0.8860845", "text": "public function sendEmailVerifyNotification(): void\n {\n $this->notify(new VerifyEmailNotification());\n }", "title": "" }, { "docid": "adeb3e3e4b13bc5074b7306068efdf28", "score": "0.88484657", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new SellerVerifyEmail);\n }", "title": "" }, { "docid": "c6ce96c1eaeab6083ee065365a8922a1", "score": "0.881386", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new SchoolVerifyEmail);\n }", "title": "" }, { "docid": "6543b48b04e6bf42a5022086fe481e7d", "score": "0.86645806", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new EmailVerification('buyer'));\n }", "title": "" }, { "docid": "1018be16bdc3c3795913b36174770a0e", "score": "0.8563811", "text": "public function sendEmailVerificationNotification(): void\n {\n $this->notify(new NewUserVerification());\n }", "title": "" }, { "docid": "dd06a836e803fc63620fa38bcd2ff57e", "score": "0.85319424", "text": "public function sendEmailVerification()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "a176f361771a05f1f98e0f5cf3e6e672", "score": "0.8201682", "text": "public function sendEmailVerifyNotification(): void;", "title": "" }, { "docid": "9fc86062cd96bbfdb231f6092d58d280", "score": "0.80402446", "text": "public function sendEmail()\n {\n $mailService = new MailService;\n $mailService->sendEmailVerification();\n }", "title": "" }, { "docid": "f75b30506398d01ba97eeee758e418b1", "score": "0.7784008", "text": "private function sendVerificationMail() {\n\t\t$user_name = $_SESSION['login_key']['user_name'];\n\t\t$user_email = $_SESSION['login_key']['user_email'];\n\t\t$user_token = $_SESSION['login_key']['user_token'];\n\t\t// string email to hex code\n\t\t$encodeEmail = bin2hex($user_email);\n\n\t\t$user_details = [\n\t\t\t'Name' \t => $user_name,\n\t\t\t'Email' => $user_email,\n\t\t\t'Token' => $user_token,\n\t\t\t'Verify_Id' => $encodeEmail\n\t\t];\n\n\t /*\n\t * dynamically create the email template\n\t * accountVerifyEmailTemplate is a function\n\t * @param array $user_details\n\t */\n\t\t$html_mail_template = accountVerifyEmailTemplate($user_details);\n\t\t$mail_subject = '[PHP OOP Registration] Verify Your Account';\n\n\t\t// mailEngine External_Class method\n\t\tif($this->mailEngine($user_name, $user_email, $html_mail_template, $mail_subject)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "da75a83c2bf2d51551e30ae3c431259e", "score": "0.7575987", "text": "public function sendPhoneVerificationNotification()\n {\n $this->notify(new \\App\\Notifications\\VerifyPhone());\n }", "title": "" }, { "docid": "2c17c1ce3037e5c4df9efa644eac9360", "score": "0.7514023", "text": "private function resendVerificationEmail()\n {\n $this->resp->result = 0;\n $AuthUser = $this->getVariable(\"AuthUser\");\n $EmailSettings = $this->getVariable(\"EmailSettings\");\n\n if ($EmailSettings->get(\"data.email_verification\")) {\n // Don't force to create new hash for the verification\n // Send the link with same hash if the hash is available\n $AuthUser->sendVerificationEmail(false);\n }\n\n $this->resp->result = 1;\n $this->resp->msg = __(\"Email sent!\");\n $this->jsonecho();\n }", "title": "" }, { "docid": "901f24c4e24c87e7843433c6f98247e8", "score": "0.7308517", "text": "public function sendNotificationEmail() {\n if ($this->getProperty('passwordnotifymethod') == 'e') {\n $placeholders = array(\n 'uid' => $this->object->get('username'),\n 'pwd' => $this->newPassword,\n 'ufn' => $this->profile->get('fullname'),\n 'sname' => $this->modx->getOption('site_name'),\n 'saddr' => $this->modx->getOption('emailsender'),\n 'semail' => $this->modx->getOption('emailsender'),\n 'surl' => $this->modx->getOption('url_scheme') . $this->modx->getOption('http_host'),\n );\n $message = $this->modx->getChunk($this->modx->getOption('lms.new_student_email_web'), $placeholders);\n $this->object->sendEmail($message);\n }\n }", "title": "" }, { "docid": "2880c3c7ae6e6c7abf916e020c536f9f", "score": "0.7277623", "text": "protected function sendEmailNotification()\r\n {\r\n $emailPartials = array('text' => $this->getEmailTextPartialName(), \r\n 'html' => $this->getEmailHtmlPartialName());\r\n $mailFrom = array('email' => sfConfig::get('app_sf_guard_plugin_default_from_email'),\r\n 'name' => sfConfig::get('app_sf_guard_plugin_default_from_name'));\r\n EmailHelpers::sendEmail($emailPartials, \r\n $this->getEmailPartialParameters(), \r\n $mailFrom, \r\n $this->getSubscriber()->getSfGuardUser()->getEmailAddress(), \r\n $this->getEmailSubject());\r\n }", "title": "" }, { "docid": "1c6dd3a70a85244bc0ef5f427f216dfa", "score": "0.7176205", "text": "public function sendVerificationEmail()\n {\n $user = Auth::user();\n\n event(new UserResendVerification($user));\n\n return redirect('/');\n }", "title": "" }, { "docid": "b5313385cf303e703c9459b6f2863785", "score": "0.71209264", "text": "public function emailVerification() {\n\t\tif($this->request->is('post') && $this->UserAuth->canUseRecaptha('emailVerification') && !$this->request->is('ajax')) {\n\t\t\t$this->request->data['Users']['captcha'] = (isset($this->request->data['g-recaptcha-response'])) ? $this->request->data['g-recaptcha-response'] : \"\";\n\t\t}\n\t\t$userEntity = $this->Users->newEntity($this->request->data, ['validate'=>'forEmailVerification']);\n\t\tif($this->request->is('post')) {\n\t\t\t$errors = $userEntity->errors();\n\t\t\tif(empty($errors)) {\n\t\t\t\t$email = $userEntity['email'];\n\t\t\t\t$user = $this->Users->findByUsernameOrEmail($email, $email)->first();\n\t\t\t\tif(!empty($user)) {\n\t\t\t\t\tif($user['email_verified'] == 0) {\n\t\t\t\t\t\t$this->Users->sendVerificationMail($user);\n\t\t\t\t\t\t$this->Flash->success(__('We have sent an email to you, please confirm your email address'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->Flash->success(__('Your email is already verified'));\n\t\t\t\t\t}\n\t\t\t\t\t$this->redirect(['action'=>'login']);\n\t\t\t\t} else {\n\t\t\t\t\t$this->Flash->error(__('Incorrect Email/Username'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->set(compact('userEntity'));\n\t}", "title": "" }, { "docid": "99d2a28f9b60b5494102efa51370a017", "score": "0.71130353", "text": "public function sendPhoneVerificationNotification()\n {\n $otpToken = $this->otpToken()->updateOrCreate(\n ['otp_authenticable_id' => $this->id, 'otp_authenticable_type' => get_class($this)],\n ['otp' => OtpToken::generateOTP(), 'expires_at' => Carbon::now()->addMinutes(OtpAuthentication::getOtpExpireDuration())]\n );\n\n if (! OtpAuthentication::getIsBlockSms()) {\n $this->notify(new VerifyPhone($otpToken->otp));\n }\n }", "title": "" }, { "docid": "5fdb595950ae821d207a7a1bb73f4bab", "score": "0.71016693", "text": "public function sendEmailVerificationNotification($token, $expiration)\n {\n $this->notify(new EmailVerification($token, $expiration));\n }", "title": "" }, { "docid": "81353c81b62d5df5f7103fdc4125568a", "score": "0.7086063", "text": "public function notifyEmail()\n {\n }", "title": "" }, { "docid": "e2f8269d2c5da125776562359b55497f", "score": "0.70791894", "text": "protected function sendVerificationEmail ($email, $token, $name) {\n $mail = new PHPMailer(true);\n try {\n //Server settings\n $mail->SMTPDebug = 0; // Enable verbose debug output\n $mail->isSMTP(); // Set mailer to use SMTP\n $mail->Host = $this->settings[\"signup_verification\"][\"smtp_host\"]; // Specify main and backup SMTP servers\n $mail->SMTPAuth = true; // Enable SMTP authentication\n $mail->Username = $this->settings[\"signup_verification\"][\"email_username\"]; // SMTP username\n $mail->Password = $this->settings[\"signup_verification\"][\"email_password\"]; // SMTP password\n $mail->SMTPSecure = $this->settings[\"signup_verification\"][\"email_security\"]; // Enable TLS encryption, `ssl` also accepted\n $mail->Port = $this->settings[\"signup_verification\"][\"email_port\"]; // TCP port to connect to\n\n //Recipients\n $mail->setFrom($this->settings[\"signup_verification\"][\"email_username\"], 'no-reply');\n $mail->addAddress($email); // Add a recipient\n\n $link = $this->full_url . $this->router->urlFor('api_verify_user', [\"activate_token\" => $token]);\n $body = $this->view->fetch(\"signup_verification/activation_verification_email.twig\", [\"link\"=> $link, \"name\"=> $name]);\n\n // Content\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = 'Email Varification';\n $mail->Body = $body;\n $mail->AltBody = 'Thank you for signing up. Please click on the following link '.$link.' to activate your account. if you can\\'t click on the link, please copy and paste it in your browser.';\n\n $mail->send();\n // echo 'Message has been sent';\n } catch (Exception $e) {\n // echo \"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\";\n }\n\n return true;\n }", "title": "" }, { "docid": "82061ea9a5dcb4306e52a5f6841a75f8", "score": "0.70224756", "text": "public function sendMobileVerificationNotification()\n {\n $this->notify(new VerifyMobile);\n }", "title": "" }, { "docid": "493837f06220da30bdc4a3443c28d8ee", "score": "0.6967352", "text": "public function sendEmailNotification(){\n\n\t}", "title": "" }, { "docid": "5e68136a55a877f7a10b9df0c9b7a97a", "score": "0.6942478", "text": "#[OpenApi\\Operation(tags: ['Auth'], security: 'AccessTokenSecurityScheme')]\n #[OpenApi\\Parameters(factory: BaseParameters::class)]\n #[OpenApi\\Response(factory: NoContentResponse::class, statusCode: 204)]\n #[OpenApi\\Response(factory: UnauthorizedResponse::class, statusCode: 401)]\n #[OpenApi\\Response(factory: ForbiddenResponse::class, statusCode: 403)]\n #[\n OpenApi\\Response(\n factory: TooManyRequestsResponse::class,\n statusCode: 429\n )\n ]\n public function sendVerificationEmail() {\n $this->checkEnabled();\n\n authUser()->sendEmailVerificationNotification();\n\n return response()->noContent();\n }", "title": "" }, { "docid": "6403e82cbfe503a3a3527e6aee679623", "score": "0.69214755", "text": "public function sendUserEmailVerification($user) {\n $mail=new P2Mail;\n $mail->to=$user->verifyEmail;\n $mail->from=Yii::app()->params['adminEmail'];\n\n $mail->body=$this->renderMail('verifyemail',array(\n 'mail'=>$mail,\n 'verificationUrl' => $this->getController()->createAbsoluteUrl('/p2/p2User/verifyemail',array(\n 'token' => $user->createToken( Yii::app()->params['p2.activationPeriod']),\n )),\n 'user'=>$user,\n ));\n $mail->send();\n }", "title": "" }, { "docid": "a22e64069c1881525824d0cf206ff5d7", "score": "0.6870557", "text": "private function _sendVerificationEmail($user_name, $user_id, $user_email, $user_activation_hash)\n {\n // Email kezelő osztály behívása\n include(LIBS . '/simple_mail_class.php');\n\n $subject = Config::get('email.verification.subject');\n $link = Config::get('email.verification.link');\n $html = '<html><body><h3>Kedves ' . $user_name . '!</h3><p>A ' . $user_email . ' e-mail címmel regisztráltál a ---. Regisztrációd megtörtént, de jelenleg passzív.</p><a href=\"' . BASE_URL . 'regisztracio/' . $user_id . '/' . $user_activation_hash . '\">' . $link . '</a><p>Az aktiválást követően a ----- oldalára jutsz, ahol bejelentkezhetsz a felhasználó neveddel és jelszavaddal. Annak érdekében, hogy segíthessünk a számodra leginkább megfelelő munka megtalálásában, töltsd ki a felhasználói profilodat. </p><p>Üdvözlettel:<br>A Multijob Diákszövetkezet csapata</p></body></html>';\n \n $from_email = Config::get('email.from_email');\n $from_name = Config::get('email.from_name');\n \n // Létrehozzuk a SimpleMail objektumot\n $mail = new \\System\\Libs\\SimpleMail();\n $mail->setTo($user_email, $user_name)\n ->setSubject($subject)\n ->setFrom($from_email, $from_name)\n ->addMailHeader('Reply-To', '[email protected]', 'Mail Bot')\n ->addGenericHeader('MIME-Version', '1.0')\n ->addGenericHeader('Content-Type', 'text/html; charset=\"utf-8\"')\n ->addGenericHeader('X-Mailer', 'PHP/' . phpversion())\n ->setMessage($html)\n ->setWrap(78);\n \n // final sending and check\n if($mail->send()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "90192f3e1794cd190c61cca847ec34a2", "score": "0.6861028", "text": "public function confirmEmail() {\n $this->verified = true;\n $this->token = null;\n $this->save();\n }", "title": "" }, { "docid": "7dc25d6a43f360bdea847f7c93328e4f", "score": "0.6839236", "text": "function sendVerifyMail($email, $name)\n { \n \n $this->email->to($email);\n $this->email->from('[email protected]', 'SAIK Taxi Infosystem');\n\n $this->email->subject('Documents Verified');\n $from = 'SAIK Taxi Infosystem';\n // message\n $message = \"Hello \".$name.\", <br>\";\n $message .= \"<br>Your documents have been verified\";\n $message .= \"<br>Please login to continue\";\n $message .= \"<br><br>Thank You<br>\";\n\n $this->email->set_header('MIME-Version', '1.0');\n $this->email->set_header('Content-type', 'text/html; charset=UTF-8');\n $this->email->set_header('Content-type', 'text/html; charset=iso-8859-1');\n /*$this->email->set_header('From', $from);*/\n $this->email->set_header('X-Priority', '3');\n\n $this->email->message($message);\n\n if($this->email->send())\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "72d8089b08f4ab76bd038c8ff3dabef5", "score": "0.6806415", "text": "public function markEmailAsVerified()\n {\n $this->setEmailVerifiedAt(now());\n $em = app('em');\n $em->flush();\n }", "title": "" }, { "docid": "6525db40c26c19bcbc2cc9e8ca754c32", "score": "0.67985445", "text": "function sendVerificationEmail($userEmail,$fname,$token)\n\t{\n\n\t\n\n\t\t$mail = new PHPMailer(true);\n\t\t\n\t\ttry {\n\t\t //Server settings\n\t\t $mail->SMTPDebug = 0; // Enable verbose debug output\n\t\t $mail->isSMTP(); // Send using SMTP\n\t\t $mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through\n\t\t $mail->SMTPAuth = true; // Enable SMTP authentication\n\t\t $mail->Username = '[email protected]'; // SMTP username\n\t\t $mail->Password = '3^04QJr*I'; // SMTP password\n\t\t $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged\n\t\t $mail->Port = 465; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above\n\n\t\t //Recipients\n\t\t $mail->setFrom('[email protected]', 'Need2Kno');\n\t\t $mail->addAddress($userEmail); // Add a recipient\n\t\t\n\t\t // Attachments\n\t\t //$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments\n\t\t //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name\n\n\t\t // Content\n\t\t $mail->isHTML(true); // Set email format to HTML\n\t\t $mail->Subject = 'New Need2Kno Account Registration';\n\t\t $mail->Body = '<!DOCTYPE html>\n\t\t\t\t\t<html lang=\"en\">\n\t\t\t\t\t<head>\n\t\t\t\t\t\t<meta charset=\"utf-8\">\n\t\t\t\t\t\t<title>New Account </title>\n\t\t\t\t\t</head>\n\t\t\t\t\t<body>\n\t\t\t\t\t\t<div class=\"wrapper\">\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\tHello '.$fname.',\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\tThis Email address has been used to register a new Need2Kno account.\n\t\t\t\t\t\t\tIf this is valid, Thank you for registering and please click the link below to verify your registration to our site.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<a href=https://localhost/SeniorProject/html/Verification.php?token='.$token.'>Click here to verify</a>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</body>\n\t\t\t\t\t</html>' ;\n\n\t\t $mail->send();\n\t\t // echo 'Message has been sent';\n\t\t} catch (Exception $e) {\n\t\t // echo \"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\";\n\t\t}\n\n\t}", "title": "" }, { "docid": "b7c57effada1d2a6d97f66750f20a436", "score": "0.6793978", "text": "function send_verification($email) {\r\n\tglobal $EMAIL_DB;\r\n\t$code = mt_rand(10000,99999);\r\n\t\r\n\t// Apply generated verification code to email in verification list\r\n\t$EMAIL_DB[2][$email] = $code;\r\n\temail_send(\r\n\t\t$email,\r\n\t\t'Please verify your email to recieve notifications from the Minecraft Mod Index',\r\n\t\t\"<p>Your email was used to sign up for a notification on the <a href='\" . URL_INDEX . \"'>Minecraft Mod Index</a>.\r\n\t\t If this was you, please <a href='\"\r\n\t\t .URL_EMAIL\r\n\t\t .URL_EMAIL_ADDRESS.$email\r\n\t\t .URL_EMAIL_VERIFY.$code\r\n\t\t .'\\'>click here to verify</a>. Otherwise, please ignore this email.</p>'\r\n\t);\r\n}", "title": "" }, { "docid": "da26e000538f888d175cea4fcee67f1d", "score": "0.67933714", "text": "function sendVerificationEmail($app, $first_name, $last_name, $email, $username, $hash) {\r\n //problems connecting due to an unreliable internet \r\n //connection, consider increasing the max_execution_time \r\n //setting in the php.ini file on your server, to a value \r\n //such as 120 (instead of the default value 30). \r\n\r\n $mail = new PHPMailer;\r\n\r\n //$mail->SMTPDebug = 3; // Enable verbose debug output\r\n\r\n $mail->isSMTP(); // Set mailer to use SMTP\r\n\r\n $config = new Config;\r\n\r\n //NOTE Some ISPs may block the use of other stmp mail servers - The want theirs to be used.\r\n $mail->Host = $config->smtp_main_server; // Specify main and backup SMTP servers\r\n $mail->SMTPAuth = true; // Enable SMTP authentication\r\n $mail->Username = $config->smtp_username; // SMTP username\r\n $mail->Password = $config->smtp_password; // SMTP password\r\n $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted\r\n $mail->Port = 587; // TCP port to connect to\r\n\r\n $mail->setFrom($config->smtp_username, $config->app_name);\r\n $recipientFullName = $first_name . ' ' . $last_name;\r\n $mail->addAddress($email, $recipientFullName); // Add a recipient\r\n //$mail->addAddress('[email protected]'); // Name is optional\r\n //$mail->addReplyTo('[email protected]', 'Information');\r\n //$mail->addCC('[email protected]');\r\n //$mail->addBCC('[email protected]');\r\n //$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments\r\n //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name\r\n $mail->isHTML(true); // Set email format to HTML\r\n\r\n if($config->server_host == \"localhost\"){\r\n //when locally hosted\r\n $path = \"/churchmegaapp/www/verify-activate.php\";\r\n }else{\r\n //when internet hosted\r\n $path = \"/verify-activate.php\";\r\n }\r\n //NOTE SERVER HOST MUST BE PRECEEDED BY \r\n //THE PROTOCOL 'http://' OR 'https://'\r\n //TO AVOID YAHOO WAHALA WHEN SENDING \r\n //EMAIL TO YAHOO ACCOUNT - NEVER FORGET THIS!!!\r\n $url = 'http://'.$config->server_host\r\n . $path\r\n . '?'\r\n . 'email='.$email.'&'\r\n . 'username='.$username.'&'\r\n . 'activation-hash='.$hash;\r\n \r\n $mail->Subject = 'Email Verification';\r\n $main_body_desc = 'Your account has been successfully created. In order for your account to be activated for use '\r\n . 'we have to verify that the email address you provided to us is valid.'\r\n . '<p>'\r\n . 'Please note that if a newer verification email has been sent then this one becomes invalid.'\r\n . '</p>';\r\n\r\n $mail->Body = '<h3>Thanks, ' . $recipientFullName . '</h3>'\r\n . $main_body_desc\r\n . '<p>'\r\n . 'Please click <a href=\"' . $url . '\">here</a> to activate your account.'\r\n . '</p>';\r\n\r\n //AltBody for the case of non-HTML mail clients\r\n $mail->AltBody = '<h3>Thanks, ' . $recipientFullName . '</h3>'\r\n . $main_body_desc\r\n . '<p>'\r\n . 'Please copy the link below to open in your brower so as to'\r\n . 'activate your account.'\r\n . '</p>'\r\n . '<p>'\r\n . $url\r\n . '</p>';\r\n\r\n if (!$mail->send()) {\r\n //echo 'Message could not be sent.';\r\n //echo 'Mailer Error: ' . $mail->ErrorInfo;\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}", "title": "" }, { "docid": "7139312660c9b5c7f89f272fd5d53fd2", "score": "0.67705333", "text": "public function sendActivationEmail(): void\n {\n $url = 'http://' . $_SERVER['HTTP_HOST'] . '/signup/activate/' . $this->activation_token;\n\n $html_body = View::getTemplate('Signup/activation-email.html', [\n 'url' => $url,\n 'username' => $this->username\n ]);\n $plaintext_body = View::getTemplate('Signup/activation-email.txt', [\n 'url' => $url,\n 'username' => $this->username\n ]);\n\n Mail::send($this->email, 'Account activation', $html_body, $plaintext_body);\n }", "title": "" }, { "docid": "c13873e8efefb2126fef1eb35c0989d2", "score": "0.6770259", "text": "public function sendActivationEmail()\n {\n $url = 'http://'.$_SERVER['HTTP_HOST'].'/signup/activate/'.$this->activation_token;\n\n $text = View::getTemplate('Signup/activation_email.txt', ['url' => $url]);\n $html = View::getTemplate('Signup/activation_email.html', ['url' => $url]);\n\n Mail::send(Config::BRAND_NAME, $this->email, $this->name, \"Account Activation\", $text, $html);\n }", "title": "" }, { "docid": "743c5ef28f8a76b58cceeb5d5a796609", "score": "0.67517793", "text": "public function sendVerificationEmail($user_id, $user_email, $user_activation_hash)\n {\n \trequire './model/inc/mail.php';\n $link = EMAIL_VERIFICATION_URL.''.urlencode($user_id).'-'.urlencode($user_activation_hash);\n $emailmessage = EMAIL_VERIFICATION_CONTENT.' <a href=\"'.$link.'\" target=\"_blank\" >'.$link.'</a>';\n $mail = new mail_sender(encryptIt('send_'.random_string(2)) , $emailmessage ,$user_email);\n }", "title": "" }, { "docid": "1d74d1a6a1371f27227139292963ffab", "score": "0.6696529", "text": "function sendVerificationEmail($email_address, $code) {\n\t\t// Email info\n\t\t$email = array(\n\t\t\t'recipient'\t\t\t=> $email_address,\n\t\t\t'code'\t\t\t\t=> $code,\n\t\t\t'subject'\t\t\t=> 'Confirm your email address.',\n\t\t);\n\t\t// Send email\n\t\t$send = Mail::send('emails.verify_email', ['email' => $email], function($m) use ($email) {\n\t\t\t// Add sender details\n\t\t\t$m->from('[email protected]', 'DashDonate.org');\n\t\t\t// Add recipient details\n\t\t\t$m->to($email['recipient'])->subject($email['subject']);\n\t\t\t// Set email priority\n\t\t\t$m->priority(1);\n\t\t});\n\t\t// Check for failures\n\t\tif (Mail::failures()) {\n\t\t\t// Return response to sending\n\t\t\treturn json_encode('x');\n\t\t}\n\t\t// Return response to sending\n\t\treturn json_encode(true);\n\t}", "title": "" }, { "docid": "091fdb17ca745b8d8e8fa793d647723a", "score": "0.6689786", "text": "public function email_verification() {\n $data['title'] = \"Partner Email Verification\";\n $data['main_content'] = 'partner_email_verification';\n $this->load->view('includes/partner_template', $data);\n }", "title": "" }, { "docid": "8ec43a6c0e06e8e8f92125ce7423cd22", "score": "0.6655326", "text": "public static function emailVerification()\n {\n Route::get('email/verify', 'VerificationController@show')->name('verification.notice');\n Route::get('email/verify/{id}', 'VerificationController@verify')->name('verification.verify');\n Route::get('email/resend', 'VerificationController@resend')->name('verification.resend');\n }", "title": "" }, { "docid": "3e9ccbbd2abf95bd8020717faac67ef8", "score": "0.6622456", "text": "public function sendUserVerification($user) {\n $mail=new P2Mail;\n $mail->to=$user->eMail;\n $mail->from=Yii::app()->params['adminEmail'];\n\n $mail->body=$this->renderMail(\n 'register',\n array(\n 'mail'=>$mail,\n 'user'=>$user,\n 'verificationUrl' => $this->getController()->createAbsoluteUrl('/p2/p2User/verify',\n array(\n 'token' => $user->createToken( Yii::app()->params['p2.activationPeriod']),\n )),),\n true);\n $mail->send();\n }", "title": "" }, { "docid": "1202d077911b1f3e510f13b29e971669", "score": "0.6610905", "text": "private static function sendVerificationEmail($user_name, $user_email, $user_activation_hash){\n \t\t\n\t\t$url = self::config('app.baseurl') . '/' . self::config('auth.routes.verification')\n\t\t\t. '/' . urlencode($user_activation_hash) . \"?user_name=\" . urlencode(Encryption::encrypt($user_name));\n\t\t\n\t\t$subject = self::config('email.verification.subject');\n\t\t$body = self::config('email.verification.content') . ' <a href=\"'.$url.'\">'.$url.'</a>';\n\t\t\n\t\t$mail = new EmailSender();\n\t\t$mail->setTo($user_email);\n\t\t$mail->setSubject($subject);\n\t\t$mail->setBodyHtml($body);\n\t\t$mail_sent = $mail->go(true);\n\t\t\n\t\tif ($mail_sent) {\n\t\t\tSession::add(Session::SESSION_FEEDBACK_POSITIVE, Text::get('FEEDBACK_VERIFICATION_MAIL_SENDING_SUCCESSFUL'));\n\t\t\treturn true;\n\t\t} else {\n\t\t\tSession::add(Session::SESSION_FEEDBACK_NEGATIVE, Text::get('FEEDBACK_VERIFICATION_MAIL_SENDING_ERROR'));\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "84a4f9b718dd87ec2daeb3a10d3745e2", "score": "0.6609043", "text": "public function resendVerification()\n {\n App::instance()->addMessage(\n sprintf(i('We sent you another activation Link on %s'), App::instance()->user->get('email')),\n \"success\"\n );\n User::sendActivationLink(App::instance()->user->get('id'));\n App::instance()->redirectBack();\n }", "title": "" }, { "docid": "8ded5d4fbd726e07b0a5149382173db1", "score": "0.65779096", "text": "function sendEmailVerification($arg = 'default'){\n if($this->checkError()){\n\n switch($arg){\n case 'default':\n if($this->addVerificationIntoDb()){\n return true;\n }\n else{\n return false;\n }\n break;\n\n case 'recover':\n\n if($this->addVerificationIntoDb('recover')){\n return true;\n }\n else{\n return false;\n }\n break;\n\n }\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "4714540fd09e8b149f76aeeeedc2eadb", "score": "0.6558644", "text": "public function verifyAction()\n\t{\n\t\t$this->layout('layout/2column-leftbar');\n\t\tif ($this->dxController()->getModuleOptions('dxuser')->getEnableEmailVerification())\n\t\t{\n\t\t\t$viewData = array();\n\t\t\t$viewData['enableRegistration'] = $this->dxController()->getModuleOptions('zfcuser_module_options')->getEnableRegistration();\n\t\t\t$email = urldecode($this->getEvent()->getRouteMatch()->getParam('email'));\n\t\t\t$code = $this->getEvent()->getRouteMatch()->getParam('code');\n\t\t\t$user = $this->getUserService()->getUserByEmail($email);\n\t\t\tif ($user)\n\t\t\t{\n\t\t\t\tif ($this->dxController()->getAuth()->hasIdentity())\n\t\t\t\t{\n\t\t\t\t\t$viewData['hasIdentity'] = TRUE;\n\t\t\t\t\t$user = $this->getUserService()->getUserById($this->dxController()->getAuth()->getIdentity()->getId());\n\t\t\t\t\tif (!$email == $user->getEmail())\n\t\t\t\t\t{\n\t\t\t\t\t\treturn $this->redirect()->toRoute($this->dxController()->getModuleOptions()->getRouteMain());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($user->isEmailVerified())\n\t\t\t\t{\n\t\t\t\t\t$viewData['alreadyVerified'] = TRUE;\n\t\t\t\t}\n\t\t\t\t$data = array(\n\t\t\t\t\t'code' => $code,\n\t\t\t\t\t'email' => $email,\n\t\t\t\t\t'user' => $user\n\t\t\t\t);\n\t\t\t\t$viewData['success'] = $this->getUserService()->verifyEmail($data);\n\t\t\t\treturn new ViewModel($viewData);\n\t\t\t}\n\t\t}\n\t\treturn $this->redirect()->toRoute($this->dxController()->getModuleOptions()->getRouteMain());\n\t}", "title": "" }, { "docid": "eae87ca9499f8e61cb07e2471251058e", "score": "0.65581065", "text": "public function send($verifyRoute, $changed = false) {\n\t\t$data = array(\n\t\t\t'user' => User::getIndex($this->user_uid),\n\t\t\t'verification_key' => $this->verification_key,\n\t\t\t'verify_url' => Config::get('app.cors_url').'/'.$verifyRoute\n\t\t);\n\n\t\t$template = $changed ? 'emails.email-verification' : 'emails.user-verification';\n\t\t$this->subject = $changed ? 'SWAMP Email Verification' : 'SWAMP User Verification';\n\t\t$this->recipient = User::getIndex($this->user_uid);\n\n\t\tMail::send($template, $data, function($message) {\n\t\t $message->to($this->email, $this->recipient->getFullName());\n\t\t $message->subject($this->subject);\n\t\t});\n\t}", "title": "" }, { "docid": "16b67cdbdb4cbd201c0d37205dc821af", "score": "0.65556234", "text": "public function sendVerifiedNotificationEmail($status, $to_name, $to_email, $from_name, $from_email, $note)\n\t{\n\t\t//need a reset code\n\t\t$random_string = substr(str_shuffle('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'), 0 , 10);\n\t\t$resetCode = md5($random_string);\n\t\t\n\t\t//insert the site\n\t\t$security_db_ns = NS_MODULES.'\\security\\models\\common\\security_db';\n\t\t$security_db = new $security_db_ns;\n\t\t$security_db->setResetCode($resetCode,$to_email);\n\t\t$common_email = new \\core\\modules\\send_email\\models\\common\\common;\n\t\t\n\t\t$template = $common_email->renderEmailTemplate('personal_verification', array('to_name' => $to_name, 'status' => ucfirst($status), 'note' => $note));\n\t\t//subject\t\t\n\t\t$subject = $template['subject'];\n\t\t\n\t\t$message = $template['html'];\n\t\t\n\t\t\n\t\t//cc\n\t\t$cc = '';\n\t\t\n\t\t//bcc\n\t\tif(SYSADMIN_BCC_NEW_USERS)\n\t\t{\n\t\t\t$bcc = SYSADMIN_EMAIL;\n\t\t} else {\n\t\t\t$bcc = '';\n\t\t}\n\t\t\n\t\t//html\n\t\t$html = true;\n\t\t$fullhtml = false;\n\t\t\n\t\t//unsubscribe link\n\t\t$unsubscribelink = false;\n\t\n\t\t//generic for the sendmail\n\t\t$generic = \\core\\app\\classes\\generic\\generic::getInstance();\n\t\t//var_dump($message);\n\t\t$generic->sendEmail($to_name,$to_email,$from_name,$from_email,$subject,$message,$cc,$bcc,$html,$fullhtml,$unsubscribelink);\n\t\t\n\t\treturn;\n\t}", "title": "" }, { "docid": "83e29a236f2c4d1350a3f936300f9938", "score": "0.65542513", "text": "public function testEmailCanBeVerified()\n {\n $token = str_random(40);\n factory(EmailVerification::class)->create([\n 'token' => Hash::make($token),\n 'user_id' => $this->user->id,\n ]);\n\n $response = $this->get(route('email.verify', $token));\n\n $response->assertRedirect(route('home'));\n $response->assertSessionHas('status', trans('user.email.verified'));\n\n $this->assertDatabaseHas($this->user->getTable(), ['email_verified' => 1]);\n }", "title": "" }, { "docid": "82105154a16e816aedd02eb914b230e5", "score": "0.6543838", "text": "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'verified' => User::VERIFIED_YES,\n 'active' => User::ACTIVE_YES,\n 'email' => $this->email,\n ]);\n\n if ($user) {\n if (!User::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n }\n\n if ($user->save(false)) {\n return (new Mailer())->sendPasswordEmail($user);\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "a5178eaacfd87b553e643ba6c414ba2a", "score": "0.6535882", "text": "function action_resendVerification()\n {\n $this->template->title = \"Require Verification\";\n /* Require login */\n $this->requireLogin();\n\n /* Get logged in account */\n $account = $this->auth->getAccount();\n /* Generate new code */\n try {\n $vcode = $account->generateVerifyCode(Model_Verificationcode::TYPE_VALIDATE_EMAIL);\n }\n catch (Verification_Exceeds_Exception $e) \n {\n $this->addError(__('Too many verification codes have been sent already! Please check your inbox again (or junk mail)'));\n $this->template->content = \"\";\n return;\n }\n\n /* Send email */\n $account->sendValidateEmail($vcode->original_code);\n\n $this->addMessage(__('A verification email has been sent to your email address.', array('mail'=>$account->email))); \n return $this->request->redirect('/user/verifyMenu');\n }", "title": "" }, { "docid": "eab6f4f4ccfd1dc1d4c142875cd23b35", "score": "0.65254223", "text": "protected function sendVerificationEmail($user) {\n\t\t$email_slug = 'SIGNUP_BUYER';\n\t\tif ( $user->isFreelancer() ) {\n\t\t\t$email_slug = 'SIGNUP_FREELANCER';\n\t\t}\n\n\t\t$token = hash_hmac('sha256', str_random(40), config('auth.password.key'));\n\n\t\tUserToken::where('user_id', $user->id)->where('type', UserToken::TYPE_VERIFY_ACCOUNT)->delete();\n\n\t\t$user_token = new UserToken;\n\t\t$user_token->user_id = $user->id;\n\t\t$user_token->type = UserToken::TYPE_VERIFY_ACCOUNT;\n\t\t$user_token->token = $token;\n\t\t$user_token->save();\n\n\t\t$verification_url = $this->generateVerifyUrl($token);\n\n\t\treturn EmailTemplate::send($user, $email_slug, 0, [\n\t\t\t'USER' => $user->fullname(),\n\t\t\t'URL' => $verification_url\n\t\t]);\n\t}", "title": "" }, { "docid": "2927f70ceb79ee6c2b353633bdee382e", "score": "0.6523813", "text": "public function approveEmail()\n\t{\n\t\t$this->verified = true;\n\t\t$this->token = null;\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "173f7d0f760ec88af3df6e094d7fc7ca", "score": "0.651409", "text": "public function verifyEmailAction()\n {\n $request = $this->getRequest();\n\n $id = $request->getParam('id', null);\n if (!$id) {\n throw new LogicException('No user id specified');\n }\n\n $key = $request->getParam('key', null);\n if (!$key) {\n throw new LogicException('No email verification key specified');\n }\n\n $service = new UserService();\n $user = $service->get($id);\n\n if ($user->profile->emailIsVerified()) {\n $this->_helper->flashMessenger->addMessage('Your email address is already verified');\n return;\n }\n\n $service->verifyEmail($user, $key);\n\n $this->_helper->flashMessenger->addMessage('Email verified');\n $this->_helper->redirector->gotoUrlAndExit('/');\n }", "title": "" }, { "docid": "2e87f92961de0e8bc88a7a11049561b2", "score": "0.6513824", "text": "function SignupMail($name, $email, $verificationcode)\n { \n /*$admindata = $this->getAdmin();*/\n $this->email->from('[email protected]', 'SAIK Taxi');\n $this->email->to($email);\n\n $this->email->subject('SAIK Taxi Application Confirmation');\n\n // Send mail \n $to = $email;\n // subject \n $sub = 'SAIK Taxi Application Confirmation'; \n // From\n $from = \"[email protected]\";\n\n //$messag = \"Hello \".$first_name.\", <br> <br>\";\n $message = \"Welcome to SAIK Taxi Application!<br> <br>\";\n $message .= \"<br>Your Name: \".$name;\n $message .= \"<br>Your Email: \".$email;\n $message .= \"<br><br>Have a Good Day!<br>\";\n $message .= \"<br><br>The SAIK Taxi Application Team<br>\";\n\n // To send HTML mail, the Content-type header must be set\n\n $this->email->set_header('MIME-Version', '1.0');\n $this->email->set_header('Content-type', 'text/html; charset=UTF-8');\n $this->email->set_header('Content-type', 'text/html; charset=iso-8859-1');\n $this->email->set_header('From', $from);\n $this->email->set_header('X-Priority', '3');\n\n $this->email->message($message);\n if($this->email->send())\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "d2684d14e7e45e5d17e0c8117979a3e0", "score": "0.650545", "text": "public function markEmailAsVerified(): bool;", "title": "" }, { "docid": "60d0753be2e6743d0f94b6708a85ecc7", "score": "0.64951617", "text": "private function verifyNewEmail()\n {\n if ($new_email = $this->verification->new_email) {\n $this->update(['email' => $new_email]);\n\n \\DB::update('update shop set seller_email=\"'.$new_email.'\" where user_id = ?', [$this->id]);\n }\n }", "title": "" }, { "docid": "97b908cec4bd561a7dd8910fdc2506e4", "score": "0.64917874", "text": "function request_new_verification_token(Request $request){\n $request->user()->sendEmailVerificationNotification();\n\n return back()->with('message', 'Verification link sent!');\n }", "title": "" }, { "docid": "487b8eece3e00e72092628c80cacbc3c", "score": "0.6475046", "text": "public function testSendingVerificationCode()\n {\n Notification::fake();\n $user = $this->userFactory()->create();\n // $this->assertFailed([\n // 'email' => $user->email,\n // ], 403);\n $user->email_verified_at = Time::currentTime();\n $user->save();\n $decayMinutes = $this->guardConfig()['email']['decay_minutes'];\n $this->assertThrottle($this->assertSucceed([\n 'email' => $user->email,\n ]), 1, 0, $decayMinutes * 60);\n $keys = Redis::keys('password_reset_token:' . $user->getAuthIdentifier() . ':*');\n $this->assertFalse(empty($keys));\n $token = substr(strrchr($keys[0], ':'), 1);\n Notification::assertSentTo(\n $user,\n ResetPassword::class,\n function ($notification, $channels) use ($token) {\n return $notification->token == $token;\n }\n );\n $user = $this->userFactory()->state('new')->create([\n 'email' => '[email protected]',\n ]);\n $this->assertSucceed([\n 'email' => $user->email,\n ], false);\n $this->assertThrottle($this->assertFailed([\n 'email' => $user->email,\n ], 429), 1, 0, $decayMinutes * 60);\n $this->assertFailed([\n 'email' => '[email protected]',\n ], 404);\n $this->assertFailed([\n 'email' => 'not_email',\n ], 422);\n }", "title": "" }, { "docid": "4733a0b7bb5181b1d93ed7492f884c44", "score": "0.64651954", "text": "function send_verification_mail($username,$address,$hash_key)\n\t\t{\n\t\t\t$link = \"http://localhost/codeigniter/index.php\" . '/verifyemail?key='. $hash_key;\n\n\t\t\t// subject to be send at the particular email ids\n\t\t\t$subject = 'Verify your email id for project.com';\n\t\t\t// message in which the link will be mentioned\n\n\t\t\t$message = 'Hi '.$username.'! Welcome to the MyForum. Please verify your email by clicking the link: '.$link;\n\n\t\t\t$result = $this->email\n\t\t\t->from('[email protected]')\n\t\t\t->to($address)\n\t\t\t->subject($subject)\n\t\t\t->message($message)\n\t\t\t->send();\n\n // var_dump($result);\n // echo '<br />';\n // echo $this->email->print_debugger();\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "6462efa82e280db3bdc725f140877e83", "score": "0.6445197", "text": "public function sendActivationEmail()\n {\n return $this->notify(new AccountActivation($this));\n }", "title": "" }, { "docid": "fa45a831ed2f8d884ee7fceae670e30d", "score": "0.64435637", "text": "public function sendNotification()\n {\n if ($this->owner->scenario === User::SCENARIO_SIGNUP) {\n return;\n }\n\n \\One::app()->mailer->compose([\n 'html' => 'newUserNotification-html',\n 'text' => 'newUserNotification-text',\n ], ['username' => $this->owner->username, 'password' => $this->owner->tmpPassword])\n ->setFrom([\\One::app()->params['adminEmail'] => \\One::app()->name . ' No-Replay'])\n ->setTo($this->owner->email)\n ->setSubject('New User Account Notification - ' . \\One::app()->name)->send();\n }", "title": "" }, { "docid": "0fbc01c7aaeb5dc9c2d9e60caaa570b1", "score": "0.6438146", "text": "public function VerifyEmail($user_id)\n\t{\n\t\t$this->id = $user_id;\n\t\t$this->saveField('verified', 1);\n\t}", "title": "" }, { "docid": "7189b8c1f5f18e433300fc27ee6b0ab2", "score": "0.6406203", "text": "public function sendVerificationCode()\n {\n\n }", "title": "" }, { "docid": "ccd5239d302e5f954e5d23b9438aee14", "score": "0.63913757", "text": "public function verifiedEmail(User $user)\n {\n $this->_prepareEmail($user, __d('wasabi_core', 'Email address verified'));\n $this->_email->template('Wasabi/Core.User/verfied');\n $this->_email->viewVars([\n 'user' => $user,\n 'instanceName' => Config::getInstanceName()\n ]);\n }", "title": "" }, { "docid": "17aa268b8c8a4fc790048990b73b226a", "score": "0.63804924", "text": "public function sendConfirmEmail(){\n\n $digits = 6;\n $code = str_pad(rand(0, pow(10, $digits)-1), $digits, '0', STR_PAD_LEFT);\n\n ProfileVerification::insert([\n 'user' => Auth::user()->id,\n 'key' => 'email',\n 'value' => Auth::user()->email ,\n 'code' => $code,\n 'verified' => 'N'\n ]);\n\n return redirect()->back()->with([\n 'message' => 'Email confirmation code sent successfully',\n 'alert-type' => 'success',\n ]);\n\n }", "title": "" }, { "docid": "30ada3123239b5abd83269c83a1bcdc6", "score": "0.63800687", "text": "protected function sendMail()\n {\n $userEmail = $this->getUser()->get_email();\n \n $title = Translation::getInstance()->getTranslation(\n 'SubmissionSubmitConfirmationEmailTitle', \n array('ASSIGNMENT_TITLE' => $this->getPublication()->get_content_object()->get_title()), \n Manager::context());\n \n $content = array();\n \n $content[] = '<link rel=\"stylesheet\"' .\n ' href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css\"' .\n ' integrity=\"sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7\"' .\n ' crossorigin=\"anonymous\">';\n \n $content[] = '<style>body { padding: 20px; } .assignment-success-check { display: block; font-size: 80px;' .\n ' margin: 0 auto 20px; width: 80px;}</style>';\n \n $content[] = $this->renderConfirmationMessage(\n Translation::getInstance()->getTranslation(\n 'SubmissionSubmitConfirmationEmailContent', \n array(\n 'ASSIGNMENT_TITLE' => $this->getPublication()->get_content_object()->get_title(), \n 'COURSE' => $this->get_course()->get_title()), \n Manager::context()));\n \n $content = implode(PHP_EOL, $content);\n \n $mail = new Mail($title, $content, $userEmail);\n \n $mailerFactory = new MailerFactory(Configuration::getInstance());\n $mailer = $mailerFactory->getActiveMailer();\n \n $mailer->sendMail($mail);\n }", "title": "" }, { "docid": "f72e4df923a6f5956aa236e299afa747", "score": "0.63692415", "text": "protected function getEmailVerifiedMessage()\n\t{\n\t\treturn 'Thank you for signing up at ToGoList, your account is activated.';\n\t}", "title": "" }, { "docid": "e4f54f958c9afe7b796e75926041a40f", "score": "0.6368663", "text": "public function sendEmailVerification(User $user)\r\n {\r\n $message = $this->message;\r\n $rightImage = $message->embed(Swift_Image::fromPath($this->assetsHelper->getUrl('image17.jpg', 'email')));\r\n extract($this->getSocialMediaImages($message));\r\n $twigParams = array(\r\n \"token\" => $user->getVerificationToken(UserVerificationToken::TYPE_EMAIL),\r\n \"user\" => $user,\r\n \"rightImage\" => $rightImage,\r\n \"logoMain\" => $logoMain,\r\n \"facebook\" => $facebook,\r\n \"twitter\" => $twitter,\r\n \"googlePlus\" => $googlePlus,\r\n \"rss\" => $rss,\r\n \"vimeo\" => $vimeo,\r\n \"pinterest\" => $pinterest,\r\n \"linkedIn\" => $linkedIn,\r\n \"instagram\" => $instagram\r\n );\r\n $mailTemplate = $this->twig->render('YilinkerCoreBundle:Email:verify_account.html.twig', $twigParams);\r\n $message->setSubject(\"Yilinker Account Confirmation\")\r\n ->setTo($user->getEmail())\r\n ->setBody($mailTemplate, 'text/html');\r\n\r\n \r\n return $this->container->get(\"swiftmailer.mailer.verification\")->send($message);\r\n }", "title": "" }, { "docid": "3c2966f911cb516f0293b1b9b7fb8c31", "score": "0.6343189", "text": "private function sendEmail(): void\n {\n if (!$this->tokenizer->validate($this->user->email_confirm_token)) {\n $this->user->setEmailConfirmToken($this->tokenizer->generate());\n $this->user->updateAttributes([\n 'email_confirm_token' => $this->user->email_confirm_token,\n 'date_confirm' => $this->user->date_confirm,\n ]);\n }\n\n $sent = Yii::$app->mailer\n ->compose('registration', ['user' => $this->user])\n ->setTo($this->email)\n ->setSubject(Yii::t('app', 'Registration'))\n ->send();\n\n if (!$sent) {\n throw new UserException(Yii::t('app', 'An error occurred while sending a message to activate account'));\n }\n }", "title": "" }, { "docid": "cc64f1c02af03e5bfc165afc27454c88", "score": "0.6342928", "text": "function sendActivationConfirmationNotification() {\n\t\t$template = new EmailTemplate();\n\t\t# create mail object\n\t\t$mail = getMailInstance();\n\t\t$view = new Zend_View();\n\t\t$session = SessionWrapper::getInstance();\n\t\n\t\t// assign values\n\t\t$template->assign('firstname', $this->getFirstName());\n\t\t$subject = \"Account Activation\";\n\t\t$save_toinbox = true;\n\t\t$type = \"useraccount\";\n\t\t$subtype = \"profile_activated\";\n\t\t$message_contents = \"<p>This is to confirm that your Account has been successfully activated. </p>\n\t\t<p>You can login anytime at \".$view->serverUrl($view->baseUrl('user/login')).\" using any of your identities(email or username) and the password you provided during registration. </p>\n\t\t<p>If you happen to forget your login credentials, go to \".$view->serverUrl($view->baseUrl('user/recoverpassword')).\". For any other issues, questions or feedback, please feel free to contact us.</p>\";\n\t\t$template->assign('contents', $message_contents);\n\t\n\t\t$mail->clearRecipients();\n\t\t$mail->clearSubject();\n\t\t$mail->setBodyHtml('');\n\t\n\t\t// configure base stuff\n\t\t$mail->addTo($this->getEmail(), $this->getName());\n\t\t// set the send of the email address\n\t\t$mail->setFrom(getDefaultAdminEmail(), getDefaultAdminName());\n\t\n\t\t$subject = sprintf($this->translate->_('profile_email_subject_invite_confirmation'), getAppName());\n\t\t$mail->setSubject($subject);\n\t\t// render the view as the body of the email\n\t\n\t\t$html = $template->render('default.phtml');\n\t\t$mail->setBodyHtml($html);\n\t\t// debugMessage($html); // exit();\n\t\t\t\n\t\ttry {\n\t\t\t$mail->send();\n\t\t} catch (Exception $e) {\n\t\t\t$session->setVar(ERROR_MESSAGE, 'Email notification not sent! '.$e->getMessage());\n\t\t}\n\t\n\t\t$mail->clearRecipients();\n\t\t$mail->clearSubject();\n\t\t$mail->setBodyHtml('');\n\t\t$mail->clearFrom();\n\t\n\t\tif($save_toinbox){\n\t\t\t# save copy of message to user's application inbox\n\t\t\t$message_dataarray = array(\n\t\t\t\t\t\"senderid\" => DEFAULT_ID,\n\t\t\t\t\t\"subject\" => $subject,\n\t\t\t\t\t\"contents\" => $message_contents,\n\t\t\t\t\t\"html\" => $html,\n\t\t\t\t\t\"type\" => $type,\n\t\t\t\t\t\"subtype\" => $subtype,\n\t\t\t\t\t\"refid\" => $this->getID(),\n\t\t\t\t\t\"recipients\" => array(\n\t\t\t\t\t\t\tmd5(1) => array(\"recipientid\" => $this->getID())\n\t\t\t\t\t)\n\t\t\t); // debugMessage($message_dataarray);\n\t\t\t// process message data\n\t\t\t$message = new Message();\n\t\t\t$message->processPost($message_dataarray);\n\t\t\t$message->save();\n\t\t}\n\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "881ab6c44b6579d4fba95ecae04d0beb", "score": "0.6338285", "text": "public function mail() {\n\t\techo\">> email sent\";\n\t}", "title": "" }, { "docid": "73d2fd1de3661d92a36c34176b21db2c", "score": "0.6330982", "text": "function sendPhoneVerificationEmail($number)\n {\n \t$length = 4;\n \t$ret = openssl_random_pseudo_bytes($length, $cstrong);\n $ret = bin2hex($ret);\n \n #bind code to number\n $as = User::where(\"phone\", $number)->first();\n $as->update(['vcode' => $ret]);\n \n #send code to email\n $title = $number.\" needs this verification code to signup\";\n $this->sendEmail(\"[email protected]\",$title,['code' => $ret, 'number' => $number],'emails.verify_phone','view');\n }", "title": "" }, { "docid": "95c29dbf9b5bba751560c2e6ad0e6e62", "score": "0.6314748", "text": "public function sendMailConfirmation() \n {\n try{\n $mail= new PHPMailer\\PHPMailer\\PHPMailer();\n\n $mail->isSMTP(); // Paramétrer le Mailer pour utiliser SMTP \n $mail->Host = 'smtp.gmail.com'; // Spécifier le serveur SMTP\n $mail->SMTPAuth = true; // Activer authentication SMTP\n $mail->Username = '[email protected]'; // Votre adresse email d'envoi\n $mail->Password = 'AR3n96f4aQ'; // Le mot de passe de cette adresse email\n $mail->SMTPSecure = 'ssl'; // Accepter SSL\n $mail->Port = 465; \n\n $mail->setFrom('[email protected]', 'AFPA LISAE');\n $mail->addAddress($_POST['mail']); // Personnaliser l'adresse d'envoi \n $mail->addReplyTo('[email protected]', 'Information'); // L'adresse de réponse\n $mail->Subject = 'Confirmation de votre Mail - AFPA-LISAE';\n $link = \"http://lisae.alafpa.fr/view/registration/confirm-registration.php?mail=\" . $this->_mail; \n //$link = \"http://www.lisae.fr:8081/view/registration/confirm-registration.php?mail=\" . $this->_mail; //script\".'?verification_code='.urlencode($user_activation_hash); // verification code exemple\n $mail->Body = \"Veuillez confirmer votre adresse en mail en cliquant sur ce lien:<br><br>\". ' '.$link; // Creation page: \"LISAE/registration/confirm-registration\"\n $mail->isHTML(true);\n $mail->setLanguage('fr');\n\n if ($mail->send()) {\n echo 'Confirmation Message has been sent.';\n }else {\n echo 'Message was not sent.<br>';\n echo 'Mailer error: ' . $mail->ErrorInfo; \n }\n\n } catch (Exception $e) {\n var_dump($e->getLine());\n throw new LisaeException(\"ERROR\" . $e->getLine());\n }\n }", "title": "" }, { "docid": "8a646c5faf605bde1f11e47fe8fd0bfa", "score": "0.6313628", "text": "public function testPasswordResetSendEmail()\n {\n $user = factory(User::class)->create();\n $this->expectsNotification($user, ResetPassword::class);\n $response = $this->post('/password/email', ['email' => $user->email]);\n $response->assertStatus(302);\n }", "title": "" }, { "docid": "700cf8cbf4896aa11a1bd9607b8f632e", "score": "0.63112336", "text": "function SendVerificationEmail($token, $user) {\r\n\trequire_once(\"../data/utility.php\");\r\n\trequire_once(\"../data/config.php\");\r\n\t$link = \"http://\".SERVER_IP.\"/verify.php?token=$token\";\r\n\t$body = \"Welcome to the SharpeConcepts Project.\r\nPlease visit the following link to verify your email address.\r\n$link\";\r\n\tSendEmail(\"Welcome to the SharpeConceptsProject\",$body,$user[\"'Email'\"]);\r\n}", "title": "" }, { "docid": "c9cee4f0c85bee7d7dc8299b91f1b128", "score": "0.6297583", "text": "public function markEmailAsVerified() {\n $this->verifiedAt = new DateTime();\n return true;\n }", "title": "" }, { "docid": "20e9ab754d0cae139c241f66f889a564", "score": "0.62931377", "text": "public function send()\r\n {\r\n try {\r\n if ($this->eyewitnessEmailHeartBeat()) {\r\n if (config('eyewitness.send_queued_emails')) {\r\n $this->sendQueuedMail();\r\n } else {\r\n $this->sendImmediateMail();\r\n }\r\n }\r\n } catch (Exception $e) {\r\n LogFacade::error('Unable to send Eyewitness.io email for token: '.config('eyewitness.app_token').' : '.$e->getMessage());\r\n }\r\n }", "title": "" }, { "docid": "124e35d8b461db385159f942c02e990a", "score": "0.62838703", "text": "public function verify(ApiVerifyEmailRequest $request)\n {\n if (! setting('reg_email_confirmation')) {\n return $this->errorNotFound();\n }\n\n $this->verifySignature($request);\n\n if ($request->user()->hasVerifiedEmail()) {\n return $this->emailAlreadyVerifiedResponse();\n }\n\n if ($request->user()->markEmailAsVerified()) {\n event(new Verified($request->user()));\n }\n\n return $this->respondWithSuccess();\n }", "title": "" }, { "docid": "8dba39df08ee761e851f676ac7532cee", "score": "0.6275784", "text": "protected function sendImmediateMail()\r\n {\r\n Mail::send('eyewitness::email', ['timestamp' => time()], function ($message) {\r\n $message->to(config('eyewitness.app_token').'@eyew.io', 'Eyewitness.io');\r\n $message->subject('Ping Eyewitness');\r\n });\r\n }", "title": "" }, { "docid": "1f5db8022590bc8e6a34540e51d473f2", "score": "0.62754107", "text": "public function verifyEmail(){\n $data = ['email'=>$this->email];\n $rule = ['email'=>'bail|required|email|exists:subscribers,email'];\n $v = Utility::validateData($data,$rule);\n if($v->fails()){\n return back()->withErrors($v->messages()->all());\n }else{\n $subscriber = User::where('email', $this->email)->first();\n if ($subscriber):\n $subscriber->token = str_random(40).time();\n $subscriber->update();\n $subscriber->notify(new ResetSubscriberPassword($subscriber->token));\n return redirect('signin')->with('success', 'Password Reset Token sent to your email, Check your email');\n else:\n return redirect('signin')->with('error', 'Problem generating token for this email');\n endif;\n }\n }", "title": "" }, { "docid": "dfb4cff9db2d45b1c4c261ed570c1be9", "score": "0.6262343", "text": "public function dispatchEmailNotification()\n\t{\n\t\tif(!$this->send_message)\n\t\t\treturn;\n\t\t$comments=!empty($this->comments) ? \"Here is what the reviewer had to say: \\\"\".$this->comments.\"\\\"\\n\\n\" : '';\n\t\tswitch($this->status)\n\t\t{\n\t\t\tcase 'active':\n\t\t\t\t$subject='Search Bitcoin - Website Approved';\n\t\t\t\t$text=file_get_contents('/usr/share/nginx/www/backend/protected/models/approved.txt');\n\t\t\t\t$text=str_replace(\n\t\t\t\t\tarray('%c', '%d'),\n\t\t\t\t\tarray($comments, $this->url), \n\t\t\t\t\t$text\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'rejected':\n\t\t\t\t$subject='Search Bitcoin - Website Submission Request';\n\t\t\t\t$text=file_get_contents('/usr/share/nginx/www/backend/protected/models/rejected.txt');\n\t\t\t\t$text=str_replace(\n\t\t\t\t\tarray('%c', '%d'),\n\t\t\t\t\tarray($comments, $this->url), \n\t\t\t\t\t$text\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tdefault;\n\t\t\t\treturn;\n\t\t}\n\t\tspl_autoload_unregister(array('YiiBase','autoload'));\n\t\trequire 'Mail.php';\n\t\t$headers=array(\n\t\t\t'From'=>'[email protected]',\n\t\t\t'To'=>$this->email_address,\n\t\t\t'Subject'=>$subject,\n\t\t);\n\t\t$smtp=Mail::factory(\n\t\t\t'smtp',\n\t\t\tarray(\n\t\t\t\t'host'=>'ssl://smtp.gmail.com',\n\t\t\t\t'port'=>'465',\n\t\t\t\t'auth'=>true,\n\t\t\t\t'debug'=>false,\n\t\t\t\t'username'=>'[email protected]',\n\t\t\t\t'password'=>'hsDSKsD6SaFfukLa',\n\t\t\t)\n\t\t);\n\t\t$mail=$smtp->send($headers['To'], $headers, $text);\n\t\tif(PEAR::isError($mail))\n\t\t\tthrow new CException(\"An error occurred while trying to send an email. Details: \".$mail->getMessage());\n\t\tspl_autoload_register(array('YiiBase','autoload'));\n\t}", "title": "" }, { "docid": "54fb14d02e312ea214dca0cdf95ac487", "score": "0.6261542", "text": "protected function getVerifyEmailSentMessage()\n\t{\n\t\treturn 'We have sent you a confirmation email, '\n\t\t.'click the link provided in the email to activate your account.';\n\t}", "title": "" }, { "docid": "1ef4680e6afce7bc9310799002b35b96", "score": "0.6260508", "text": "public function verify()\n {\n $this->verified = 1;\n $this->email_token = null;\n $this->save();\n }", "title": "" }, { "docid": "1ae934ed3e8dd875ab2a95934271d13f", "score": "0.62593216", "text": "public function verifyemail() {\n\n\treturn $this->owner->customise(new ArrayData(array(\n 'Title' => _t('EmailVerifiedMember.VERIFYEMAILHEADER', 'Verify your email'),\n 'Content' =>\n '<p>' . _t('EmailVerifiedMember.VERIFYBEFORELOGON','You need to verify the link in the email we sent you before you can log on.') . '</p>' .\n\t\t'<p>' . _t('EmailVerifiedMember.USEFORMBELOW','Use the form below if you would like us to resend the link.') . '</p>',\n 'Form' => $this->owner->VerifyEmailForm(),\n\t)))->renderWith(array('Security_verifyemail', 'Security', $this->owner->stat('template_main'), $this->owner->stat('template')));\n }", "title": "" }, { "docid": "2f5addbe0df8f7bc646cda6978a1aa5d", "score": "0.6254715", "text": "public function markEmailAsVerified(): bool\n {\n return $this->set($this->VERIFYCOLUMN, Chronos::date()->getDateTime())\n ->save();\n }", "title": "" }, { "docid": "a88c633b09fcd5f6556c5cf04c18a3c4", "score": "0.62465817", "text": "public function sendEmail(): void\n {\n if (!$this->tokenizer->validate($this->user->email_confirm_token)) {\n $this->user->setEmailConfirmToken($this->tokenizer->generate());\n $this->user->updateAttributes([\n 'email_confirm_token' => $this->user->email_confirm_token,\n 'date_confirm' => $this->user->date_confirm,\n ]);\n }\n\n $sent = Yii::$app->mailer\n ->compose('registration', ['user' => $this->user])\n ->setTo($this->email)\n ->setSubject(Yii::t('app', 'Registration'))\n ->send();\n\n if (!$sent) {\n throw new UserException(Yii::t('app', 'An error occurred while sending a message to activate account'));\n }\n }", "title": "" }, { "docid": "fd344737421523332a88d80b61b66104", "score": "0.6239095", "text": "public function send_verification_link(Request $request)\n {\n $request->validate([\n 'id' => 'required|exists:users,id',\n ]);\n\n $user = User::find($request->id);\n\n $password = random_key(); // defined in helper\n $user->password = bcrypt($password); \n $user->save();\n\n $public_id = $user->public_id; \n\n $url = $user->email_verification_link();\n Mail::to($user)->send(new UserAdded($password, $public_id, $url));\n\n return response()->json([\n 'status' => 'success'\n ]);\n }", "title": "" }, { "docid": "e381d5ac66aaf3319c0269c96020f5fb", "score": "0.62273437", "text": "public function email_member($data){\n //check the email type\n if($data['type'] = \"register\"){\n // send the registration email\n { \n $mail = new PHPMailer(true); \n $base_url = URLROOT ;\n $mail_body = \"\n <p>Hi \".$data['name'].\",</p>\n <p>Thanks for Registration with us.</p>\n <p>Please Open <a href= '\".URLROOT.\"/users/emailconfirmation/\".$data['code'].\"'>this link </a> to verified your email address. OR copy and paste the following link in your address bar. </p>\" . URLROOT.\"users/emailconfirmation/\".$data['code'].\"\n <p>Best Regards,<br />Your Ginseng Team</p>\n \";\n //Server setting\n $mail->IsSMTP();\n $mail->Host = SMTPHOST; \n $mail->Port = SMTPPORT; \n $mail->SMTPAuth = true; \n $mail->Username = SMTPUSER;\n $mail->Password = SMTPPASS;\n $mail->SMTPSecure = 'tls'; \n // Reciepents setting\n $mail->setFrom('[email protected]', 'Ritesh Rijal');\n $mail->addAddress($data['email'], $data['name']); // Add a recipient \n $mail->WordWrap = 50; //Sets word wrapping on the body of the message to a given number of characters\n $mail->IsHTML(true); //Sets message type to HTML \n $mail->Subject = 'Ginsengrestaurant Email Verification'; //Sets the Subject of the message\n $mail->Body = $mail_body; //An HTML or plain text message body\n if($mail->Send()){\n return true;\n } else {\n return false;\n } \n }\n } else if($data['type'] = \"resetpassword\"){\n\n }\n\n }", "title": "" }, { "docid": "12596497286c02a6a7ba7791c8f3ba6e", "score": "0.6225717", "text": "public function verified()\n {\n $this->verified = 1;\n $this->email_token = null;\n $this->save();\n }", "title": "" } ]
2310152fa65fe9d80b791b53d65e8d6f
Get the value of estado
[ { "docid": "394aaa4220a869989b912274acd05e94", "score": "0.6111089", "text": "public function getEstado()\n {\n return $this->estado;\n }", "title": "" } ]
[ { "docid": "95dd89dcc64e0eca7a72fee39d8553b1", "score": "0.7515832", "text": "public function estado(){\n $total = count($this->cuota->viviendas) * $this->cuota->importe;\n $total = $total == 0 ? 1 : $total;\n $cobrado = $this->recibos()->where('estado',2)->sum('importe');\n return round(($cobrado * 100) / $total);\n }", "title": "" }, { "docid": "72cff578fb8465eb39dff3518a26c365", "score": "0.7197058", "text": "public function getTempoEstimadoEtapa()\n {\n return $this->tempo_estimado_etapa;\n }", "title": "" }, { "docid": "c8a7691a8631e253d43bced55534166c", "score": "0.67969644", "text": "public function obtenerEstadisticas(){\r\n return $this->estadisticas;\r\n }", "title": "" }, { "docid": "3b91acb863aa2756a12c11dd4038374f", "score": "0.65768456", "text": "public function getValor()\r\n {\r\n return $this->getContraApresentacao() ? 0.00 : $this->valor;\r\n }", "title": "" }, { "docid": "b52468c05fc9d56c65cff9bc91acae6f", "score": "0.65184647", "text": "public function getEstudiante()\n {\n if (!is_null($this->estudiante))\n {\n return \"{$this->estudiante->nomb_estu} {$this->estudiante->pape_estu} {$this->estudiante->sape_estu}\";\n }\n }", "title": "" }, { "docid": "e04706db7a466fa00fc9ebb92e403978", "score": "0.6490158", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "e04706db7a466fa00fc9ebb92e403978", "score": "0.6490158", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "e04706db7a466fa00fc9ebb92e403978", "score": "0.6490158", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "e04706db7a466fa00fc9ebb92e403978", "score": "0.6490158", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "e04706db7a466fa00fc9ebb92e403978", "score": "0.6490158", "text": "public function getValor()\n {\n return $this->valor;\n }", "title": "" }, { "docid": "18b6daf0f059f21f20d16ed89945588c", "score": "0.6456346", "text": "public function obtenerValor() {\r\n return $this->valor;\r\n }", "title": "" }, { "docid": "18b6daf0f059f21f20d16ed89945588c", "score": "0.6456346", "text": "public function obtenerValor() {\r\n return $this->valor;\r\n }", "title": "" }, { "docid": "d6ffba2a6e01c798c35fae831eb02b2c", "score": "0.64267725", "text": "public function getValor() {\n return $this->valor;\n }", "title": "" }, { "docid": "f94c1b5969f120a3e4fb9af1acd77358", "score": "0.6390071", "text": "public function getValor_comision()\n {\n return $this->valor_comision;\n }", "title": "" }, { "docid": "5218f3d47d9636b0b4663414d5cb73bc", "score": "0.6388147", "text": "public function obtenerValor() {\n return $this->valor;\n }", "title": "" }, { "docid": "8b9a37a5d5a0b901c2fe88c33d193e13", "score": "0.637446", "text": "public function getValorCalificacion(){\n\t\treturn $this->valor_calificacion;\n\t}", "title": "" }, { "docid": "cb3799a24908a578a2a0e44491aca3ad", "score": "0.6374377", "text": "public static function mostrarEstado($estado){\n $value= 'Pendiente';\n\n if($estado== 'Confirmado'){\n $value= 'Pendiente';\n }elseif($estado== 'Preparando'){\n $value='En preparación';\n }elseif($estado== 'Empacado'){\n $value= 'Preparado para Enviar';\n }elseif($estado== 'Enviado'){\n $value= 'Enviado';\n }\n\n return $value;\n }", "title": "" }, { "docid": "d1e45d3b360f8aa30239ac43e1476ead", "score": "0.6321777", "text": "public function getValorUnitario()\n {\n return $this->valor_unitario;\n }", "title": "" }, { "docid": "12cb87998bc432a7118302747cf6d62c", "score": "0.63176686", "text": "public function getValorUnitario()\r\n {\r\n return $this->valorUnitario;\r\n }", "title": "" }, { "docid": "0ac32ca73acbab7329fcbcc9e149b412", "score": "0.6294374", "text": "public function getSaldoEstoque()\n {\n return $this->saldo_estoque;\n }", "title": "" }, { "docid": "a8dc6fafd29717b903c712b2ba34f7f4", "score": "0.6290864", "text": "public function getTotalEstoque()\n {\n return $this->total_estoque;\n }", "title": "" }, { "docid": "409bbb7b07548660001f9cf7435d264c", "score": "0.62784904", "text": "public function getEstado(){\n\t\treturn $this->estado;\n\t}", "title": "" }, { "docid": "ab9b2c58ccf6d14ae43e9dea60ab6bc5", "score": "0.6255129", "text": "public function getCreditado(): float\n {\n return $this->creditado;\n }", "title": "" }, { "docid": "2841ac216e9b05cec0b304515fda0a31", "score": "0.6211634", "text": "public function getValorCobrado()\r\n {\r\n return $this->valorCobrado;\r\n }", "title": "" }, { "docid": "93e0648a2c71e2bb32cb75fb786cad91", "score": "0.6188296", "text": "public function getValorTotalEstimado() {\n\n $oDaoLicLicitem = new cl_liclicitem();\n\n /**\n * Busca o valor estimado por item com a seguinte prescedência:\n * - Orçamento de Processo de Compras (Quando houver), se estiver julgado irá trazer o valor do vencedor, caso contrário irá trazer o valor zerado\n * - Solicitação de Compras\n */\n $sCampos = \" sum(case when pcorcamjulg.pc24_orcamitem is null then pc11_quant * solicitem.pc11_vlrun else pc23_valor end) as total\";\n $sWhere = $this->montaWhereEstimado();\n $sSqlBuscaValor = $oDaoLicLicitem->sql_query_valor_estimado($sCampos, $sWhere);\n\n return $this->executaConsulta($sSqlBuscaValor);\n }", "title": "" }, { "docid": "c8a5cc4a37ca2f081257b0da7fdcac65", "score": "0.6177596", "text": "public function getEstados(){\n\n\t\t//Retorna os dados dos Contatoss\n\t\treturn TableFactory::getInstance('CepUf')->getEstados();\n\t}", "title": "" }, { "docid": "630648a122a6b57e55bdb35fed759fd8", "score": "0.61754507", "text": "public function getEstado(){\n return $this->estado;\n }", "title": "" }, { "docid": "6beb7111a6fe1ff652089e9054d163bf", "score": "0.6127227", "text": "public function getEstado()\r\n\t{\r\n\t\treturn($this->estado);\r\n\t}", "title": "" }, { "docid": "c59e433cf1127acedbc912c62725e973", "score": "0.6125146", "text": "public function getMaiorValor() {\n\n return $this->iMaiorValor;\n }", "title": "" }, { "docid": "4d570efcaa2dec9dd56d495186e18738", "score": "0.61232513", "text": "public function getEstado()\n {\n return $this->estado;\n }", "title": "" }, { "docid": "c427120e2a209aaf6cc82852072de82f", "score": "0.6123096", "text": "public function getEstado_5(){\n return $this->estado_5;\n }", "title": "" }, { "docid": "c388ffa89aa679858a89f4c41e1fe28c", "score": "0.6111816", "text": "public function getEstado_1(){\n return $this->estado_1;\n }", "title": "" }, { "docid": "67829592588fd160710f6c00b3deb382", "score": "0.6105994", "text": "public function getEstado_envio()\r\n\t{\r\n\t\treturn($this->estado_envio);\r\n\t}", "title": "" }, { "docid": "ff60ee8de3033ab92cb7e68a79e836dc", "score": "0.60948634", "text": "public function getEstado()\n {\n return $this->estado;\n }", "title": "" }, { "docid": "ff60ee8de3033ab92cb7e68a79e836dc", "score": "0.60948634", "text": "public function getEstado()\n {\n return $this->estado;\n }", "title": "" }, { "docid": "ff60ee8de3033ab92cb7e68a79e836dc", "score": "0.60948634", "text": "public function getEstado()\n {\n return $this->estado;\n }", "title": "" }, { "docid": "ff60ee8de3033ab92cb7e68a79e836dc", "score": "0.60948634", "text": "public function getEstado()\n {\n return $this->estado;\n }", "title": "" }, { "docid": "ff60ee8de3033ab92cb7e68a79e836dc", "score": "0.60948634", "text": "public function getEstado()\n {\n return $this->estado;\n }", "title": "" }, { "docid": "d5a5ec921d5c9131a158f9ec4bee15e2", "score": "0.6094242", "text": "public function getEstado() {\n\n $comando=$this->comandos1[DaoControl::$ESTADO];\n $comando=$this->procesarComando($comando,\"\");\n $respuesta= $this->enviarComando($comando);\n return $this->procesarRespuesta($respuesta);\n\n }", "title": "" }, { "docid": "15a338789a43d9c354123c180aa17b04", "score": "0.6087748", "text": "public function getEstado() {\r\n return $this->estado;\r\n }", "title": "" }, { "docid": "8295dee497f29b55f88a40adcdb14d21", "score": "0.6073687", "text": "public function getResultado()\n {\n return $this->resultado;\n }", "title": "" }, { "docid": "43ee0e77e9a3aa9d2b766e1ff42438b1", "score": "0.6053032", "text": "public function getEstadoProductoDetail(){\n \t\t\n \t\treturn isset (Producto::$estados[$this->estado]) ? Producto::$estados[$this->estado] : 'no definido';\n \t\t\n \t}", "title": "" }, { "docid": "1d436c20f3911f0409500b8a87380a50", "score": "0.60480195", "text": "public function get_estado()\n {\n return $this->estado;\n }", "title": "" }, { "docid": "753fc0d05978929a93d44cb02c56daa8", "score": "0.603284", "text": "public function getValuation()\n {\n return $this->valuation;\n }", "title": "" }, { "docid": "2d8618b9b93cd1ba0266db74b85ff142", "score": "0.6013967", "text": "public function getEstado()\n\t {\n\t return $this->estado;\n\t }", "title": "" }, { "docid": "a8420c57dfa41f863ca26d25d1e34642", "score": "0.6012123", "text": "public function getEstado(){\n \treturn $this->Estado;\n\t}", "title": "" }, { "docid": "f6852782968e32c8924fe06a6c3db9e4", "score": "0.6011893", "text": "public function getValue() {}", "title": "" }, { "docid": "f6852782968e32c8924fe06a6c3db9e4", "score": "0.6011893", "text": "public function getValue() {}", "title": "" }, { "docid": "f6852782968e32c8924fe06a6c3db9e4", "score": "0.6011893", "text": "public function getValue() {}", "title": "" }, { "docid": "1b04b2e057c168c2972663043cf2f4c6", "score": "0.6003542", "text": "public function getValorVenda()\n {\n return $this->valorVenda;\n }", "title": "" }, { "docid": "bb997a8891c3482472b24b28b2269ffd", "score": "0.59987617", "text": "public function getState() {\n return $this->Stato;\n }", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.5988098", "text": "public function getValue();", "title": "" }, { "docid": "54545dc874444f44160170b718035e2a", "score": "0.5981098", "text": "public function getSexe_acteur()\n {\n return $this->sexe_acteur;\n }", "title": "" }, { "docid": "d1ca60e0705b5cea1d856587183835d5", "score": "0.59561336", "text": "public function getDescripcionUltimoEstado(){\n return $this->ultimoEstadoOrdenTrabajo->estado->descripcion;\n }", "title": "" }, { "docid": "a1c9a215e95eacf6e6782c140a48d02a", "score": "0.5943152", "text": "public function getValorInclusaoMenosEstorno() {\n return ($this->valorInclusao - $this->valorEstorno);\n }", "title": "" }, { "docid": "7fd5f8e6787a751ceaef0fa144b3d98c", "score": "0.59011203", "text": "private function costoTot(){\n if ($this->disponibile == 'Disponibile'){\n return $this->prezzo_unitario * $this->quantita;\n } else{\n return 'Prezzo totale non disponibile';\n }\n }", "title": "" }, { "docid": "13b30d26a98c58b9b8e4d7d6ed1b1f6e", "score": "0.5900857", "text": "public static function estadoServicio()\n {\n $estadoServicio = new StdClass();\n $nowStr = Carbon::now()->toDateTimeString();\n\n $vigentes = Alerta::where('inicia_el', '<=', $nowStr)\n ->where('finaliza_el', '>=', $nowStr)\n ->take(1)\n ->get()\n ->count();\n\n $futuras = Alerta::where('inicia_el', '>=', $nowStr)\n ->take(1)\n ->get()\n ->count();\n\n $estadoServicio->vigente = ($vigentes > 0 ? 'Algunos barrios afectados' : 'Funcionando normalmente');\n $estadoServicio->vigente_has_alertas = $vigentes > 0;\n $estadoServicio->futuro = ($futuras > 0 ? 'Algunos barrios afectados' : 'Sin inconvenientes');\n $estadoServicio->futuro_has_alertas = $futuras > 0;\n\n return $estadoServicio;\n }", "title": "" }, { "docid": "8f45d2f54fe3aa7a9ee438e54773e477", "score": "0.5898754", "text": "function getValorBaseCalculo();", "title": "" }, { "docid": "fac49b1363be3f33520afc79830c5e15", "score": "0.58950067", "text": "public function getValue(){\n\t\treturn $this->svalue;\n\t}", "title": "" }, { "docid": "136ded7b662cb1a34dbdf61f528a437c", "score": "0.5892623", "text": "public function getValue() : float {\n return $this -> value;\n }", "title": "" }, { "docid": "5084187165b272b26855d4820e9c34df", "score": "0.5873783", "text": "public function getCosto_E()\n {\n return $this->costo_e\n ;\n }", "title": "" }, { "docid": "3b52a1338f81ef20c6fcc7acbe187792", "score": "0.58723676", "text": "public function getPointVal() {\n $this->layout = \"\";\n $sessionstaffcheck = $this->Session->read('staff');\n $pointval = (($sessionstaffcheck['staffaccess']['AccessStaff']['base_value'] * $_POST['dollar_val']) / 100) * 50;\n echo number_format($pointval, 2, '.', '');\n\n exit();\n }", "title": "" }, { "docid": "d960836863cbdd342087b9e3fee6b46d", "score": "0.5868849", "text": "public function getAtivo()\n {\n return $this->ativo;\n }", "title": "" }, { "docid": "d960836863cbdd342087b9e3fee6b46d", "score": "0.5868849", "text": "public function getAtivo()\n {\n return $this->ativo;\n }", "title": "" }, { "docid": "d960836863cbdd342087b9e3fee6b46d", "score": "0.5868849", "text": "public function getAtivo()\n {\n return $this->ativo;\n }", "title": "" }, { "docid": "d960836863cbdd342087b9e3fee6b46d", "score": "0.5868849", "text": "public function getAtivo()\n {\n return $this->ativo;\n }", "title": "" }, { "docid": "d960836863cbdd342087b9e3fee6b46d", "score": "0.5868849", "text": "public function getAtivo()\n {\n return $this->ativo;\n }", "title": "" }, { "docid": "d960836863cbdd342087b9e3fee6b46d", "score": "0.5868849", "text": "public function getAtivo()\n {\n return $this->ativo;\n }", "title": "" }, { "docid": "d960836863cbdd342087b9e3fee6b46d", "score": "0.5868849", "text": "public function getAtivo()\n {\n return $this->ativo;\n }", "title": "" }, { "docid": "d960836863cbdd342087b9e3fee6b46d", "score": "0.5868849", "text": "public function getAtivo()\n {\n return $this->ativo;\n }", "title": "" }, { "docid": "8cdb92a567d9613384f48d365486545b", "score": "0.5866258", "text": "public function getEstadoC()\n {\n return $this->estadoC;\n }", "title": "" }, { "docid": "f10967cad53b64e837ff0d8c64a5a836", "score": "0.58649194", "text": "public function getValue(): float\n {\n return $this->get('Value');\n }", "title": "" }, { "docid": "cef49221aa5e1c376f05fa95129c05e3", "score": "0.5857704", "text": "public function getSacado()\r\n {\r\n return $this->sacado;\r\n }", "title": "" }, { "docid": "39a2c29d15fe0a70bdb76ba1a153355f", "score": "0.58537495", "text": "public function getInformativo()\n {\n return $this->informativo;\n }", "title": "" }, { "docid": "34874c728585121e90150b7de39b1766", "score": "0.5853233", "text": "public function getValue() { return $this->data['value']; }", "title": "" }, { "docid": "d4e82585bad15f2c0c9db72458721633", "score": "0.5848867", "text": "public function getEstados(){\n\t\t$sql = \"SELECT id_estado, estado FROM estado ORDER BY estado\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t}", "title": "" }, { "docid": "82337a2726c0a12ff342bc7399d07963", "score": "0.5837763", "text": "public function getCost()\n\t{\n\t\treturn $this->attributes['valor'];\n\t}", "title": "" }, { "docid": "5c1ede3fae347c693b46fda84736644c", "score": "0.58246773", "text": "public function getStatutSejour() {\r\n return $this->statutSejour;\r\n }", "title": "" }, { "docid": "83429678a959694a9f0959f6a87179f7", "score": "0.581118", "text": "public static function getEscalaEstendido( ) {\n\t\t$escala = array(\n\t\t\t\t\"10\", \"9.98\", \"9.91\", \"9.81\", \"9.66\",\n\t\t\t\t\"9.47\", \"9.24\", \"8.97\", \"8.66\", \"8.31\",\n\t\t\t\t\"7.93\", \"7.52\", \"7.07\", \"6.59\", \"6.09\",\r\n\t\t\t\t\"5.56\", \"5.00\", \"4.42\", \"3.83\", \"3.21\",\n\t\t\t\t\"2.59\", \"1.95\", \"1.31\", \"0.70\", \"0\",\n\t\t\t\tEscalaLikert::NEUTRO\n\t\t);\r\n\r\n\t\treturn $escala;\n\t}", "title": "" }, { "docid": "19bc9e0b67dda300842b750ded172b10", "score": "0.5811084", "text": "public function getVarEstado()\n {\n return $this->varEstado;\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "f3535846beb6fd5c5c469f59d10f4c8b", "score": "0.0", "text": "public function index()\n {\n $pagename='Data Coba';\n $data=Coba::all();\n return view('admin.coba.index', compact('data', 'pagename')); \n }", "title": "" } ]
[ { "docid": "d37ee75c4feac8dcd7712d902a70bf82", "score": "0.7607344", "text": "public function listAction()\n {\n \t/**\n \t * @todo return a paginated and ordered list, selecting only valid elements (move valid clause to rowset)\n \t */\n \t$this->view->resources = $this->_table->fetchAll(null, null, 15);\n }", "title": "" }, { "docid": "de80270cda7dc6348112d1542c1c3b6a", "score": "0.7491118", "text": "public function listingAction() {\r\n\r\n\t\t// Search Params\r\n\r\n\t\t// Do the show thingy\r\n\t\t\t// Get an array of friend ids\r\n\t\t\t// Get stuff\r\n\t\t\t// unset($values['show']);\r\n\r\n\t\t// Get blog paginator\r\n\r\n\t\t// Render\r\n\t\t$this -> _helper -> content -> setNoRender() -> setEnabled();\r\n\t}", "title": "" }, { "docid": "7a3b535f1a43231cd882da50772ec5ee", "score": "0.74615455", "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\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign(['success' => true, 'data' => $result]);\n }", "title": "" }, { "docid": "8e2e0cd6669d378062a560c70954d431", "score": "0.74168706", "text": "public function indexAction(): void\n {\n $limit = (int) $this->Request()->getParam('limit', 1000);\n $offset = (int) $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "c11d55ce36b9b6bf39c0094bfe5d0fd7", "score": "0.7369403", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->config['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\n\n //add url parameter as hidden input in the search form\n $urlParameters = $this->getUrlParameters('search');\n $this->request->request->set('extraParameters', $urlParameters);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, array('paginator' => $paginator));\n\n if (method_exists($this, $customMethodName = 'create'.$this->entity['name'].'SearchForm')) {\n $searchForm = $this->{$customMethodName}();\n } else {\n $searchForm = $this->createSearchForm();\n }\n\n return $this->render($this->entity['templates']['list'], array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'searchForm' => $searchForm->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ));\n }", "title": "" }, { "docid": "e008dc293c8e1bdcbf38634c0f67a5d1", "score": "0.7354826", "text": "public function listAction() {\r\n\t\t// Preload info\r\n\r\n\r\n\t\t// Search Params\r\n\r\n\r\n\t\t// Get paginator\r\n\t\t// Render\r\n\t\t$this -> _helper -> content -> setNoRender() -> setEnabled();\r\n\t}", "title": "" }, { "docid": "e508f26cee6b6110b5e315b37bf01715", "score": "0.73057467", "text": "public function actionList()\n {\n $entity = $this->getEntity();\n if (!$entity->canList()) {\n $this->setEntityFlash('error', 'Unable to list {name}.');\n $this->redirectParent();\n }\n $this->render('list', array(\n 'entity' => $entity,\n ));\n }", "title": "" }, { "docid": "109b33b70bf69a93460d062b2f83502f", "score": "0.7226076", "text": "public function index()\n {\n $resources = $this->objStoreResource->getAllResource(auth()->id());\n return view('home.resource.index',compact('resources'));\n }", "title": "" }, { "docid": "68f3dc8f909d1dfb5a37b582d41cec68", "score": "0.719963", "text": "public function index()\n {\n\n extract($this->getResourceNames());\n\n $items = $modelPath::sortable()->paginate();\n \n\n\n return $this->compileView($resourceMultiple . '.index', [$resourceMultiple => $items]);\n }", "title": "" }, { "docid": "97f3caf6ecee75a55fbfadca2b98a829", "score": "0.7182086", "text": "protected function index()\n {\n $categories = Listing::paginate(10);\n return ListingResource::collection($categories);\n }", "title": "" }, { "docid": "d7820004a578ddc16d57dff08d715ef0", "score": "0.713195", "text": "public function showResource()\n\t{\n\t\treturn view('resources.list')->with('resources', Resources::all());\n\t}", "title": "" }, { "docid": "9ee2301bbe5ddd99bc48b5c1f13682d6", "score": "0.7125178", "text": "public static function list()\n {\n $books = Book::findAll();\n\n // 2. Return/include de la view\n include(__DIR__ . '/../views/books/list.php');\n }", "title": "" }, { "docid": "db3decb51890b80d45fe4f716c97523a", "score": "0.71218187", "text": "public function list() {\n\t\t$this->protectIt( 'read' ); \n\t\tsetTitle( 'Listagem' );\n\t\t\n\t\t// Carrega o grid\n\t\tview( 'grid/grid' );\n\t}", "title": "" }, { "docid": "7a45345cbd9a9dd304c36c4a494e5375", "score": "0.71166694", "text": "public function index()\n {\n return $this->response->paginator(\n $this->filterQuery()->orderBy('id', 'desc')->paginate(request('limit', 10)),\n $this->transformer,\n ['key' => $this->resource_key]\n );\n }", "title": "" }, { "docid": "7ca504ed4a4a2ab91d9d42ce768fbca1", "score": "0.7111673", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $resources = $em->getRepository('AppBundle:Resource')->findAll();\n\n return $this->render('resource/index.html.twig', array(\n 'resources' => $resources,\n ));\n }", "title": "" }, { "docid": "260bd7b6f859caf980dd2ec389de158f", "score": "0.70988476", "text": "public function listAction()\n {\n $this->users->denyAccessToPage('admin');\n \n $all = $this->users->findAll();\n $status = $this->users->IsAuthenticated();\n \n $this->theme->setTitle(\"Visa alla användare\");\n $this->views->add('users/list-all', [\n 'users' => $all,\n 'title' => \"Visa alla användare\",\n 'status' => $status,\n ], 'main');\n \n $this->views->add('users/users-sidebar', [], 'rsidebar');\n }", "title": "" }, { "docid": "3ff8464571003af8b9340bbfec1e3e20", "score": "0.7088415", "text": "public static function listing()\n {\n echo new \\UMS\\Views\\Standard('listing.phtml');\n }", "title": "" }, { "docid": "24716f78fa1798ecee7344c0553e427b", "score": "0.70843154", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, array('paginator' => $paginator));\n\n $parameters = array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n );\n\n return $this->render('@VortexginWebBundle/EasyAdmin/list.html.twig', $parameters); \n }", "title": "" }, { "docid": "f882d8455ca2c120342f2b2b1a1c2565", "score": "0.70281464", "text": "public function index()\n {\n $resources = DB::table('admin_resource')\n ->get()\n ->toArray();\n return view('admin.resource.index',compact('resources'));\n }", "title": "" }, { "docid": "ceecc69a5c7cd4cd8ab66be42cbae5ba", "score": "0.6991042", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if (! $this->data['crud']->ajaxTable()) {\n $this->data['entries'] = $this->data['crud']->getEntries();\n }\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\t\t//return view('bcrud::list', $this->data);\n }", "title": "" }, { "docid": "a7c37722ff451d4806db867c3084436e", "score": "0.6983112", "text": "public function listing() {\r\n\r\n\t\t// Get the list of incidents from the database\r\n\t\t$incidents = $this->incident_model->list_all();\r\n\r\n\t\t// Prepare the data for the page\r\n\t\t$data = array(\r\n\t\t\t\t'title' => 'Listing of Incidents',\r\n\t\t\t\t'view' => 'incident/list',\r\n\t\t\t\t'incident_listing' => $this->incident_model->list_all()\r\n\t\t\t);\r\n\r\n\t\t// Load the view\r\n\t\t$this->load->view('main_template', $data);\r\n\r\n\t}", "title": "" }, { "docid": "36e3954f88638a9532a787d2cc444a30", "score": "0.6979115", "text": "function listAction() {\n $existing_api = _factory('sitemin_api_model_api')->get_gateway();\n $rs['api'] = $existing_api;\n $rs['_token'] = defaultHelper::page_hash_set('api,list');\n $rs['tpl'] = '/sitemin/api/view/_api_list.phtml';\n $rs['TITLE'] = 'API LIST';\n return array('view' => '/sitemin/view/index.phtml', 'data' => array('rs' => $rs));\n }", "title": "" }, { "docid": "970e35836b9768276ac32a7f819d569f", "score": "0.6969622", "text": "public function index()\n {\n return \"Here is the listing page.\";\n }", "title": "" }, { "docid": "e04c1be5ce440db436266eabe923599a", "score": "0.6958369", "text": "public function index() {\n\t\tSession::set(\"list_refer\", $_SERVER['REQUEST_URI']);\n\t\t$this->set_order();\n\t\t$this->display_action_name = 'List Items';\n\t\t$this->all_rows = $this->model->tree();\n\n\t\tif(!$this->all_rows) $this->all_rows = array();\n\t\t$this->filter_block_partial = $this->render_partial(\"filter_block\");\n\t\t$this->list = $this->render_partial(\"list\");\n\t}", "title": "" }, { "docid": "a4e3ca4a3d5bf61db50faf86a8841ea7", "score": "0.6958334", "text": "public function index()\n {\n return view('admin::resource.index');\n }", "title": "" }, { "docid": "61e25f17bfcad7555516a67f6d445d1a", "score": "0.6940597", "text": "public function indexAction()\n {\n $this->listentriesAction();\n }", "title": "" }, { "docid": "7f07ef0085f42180361c2986a0c246bc", "score": "0.6919749", "text": "public function index () {\n\t\t$this->showAll();\n\t}", "title": "" }, { "docid": "aa6c01f133b8fa50888c5287d810e174", "score": "0.69041467", "text": "public static function list() {\n $books = Book::findAll();\n\n // 2. Return/include de la view\n include( __DIR__ . '/../views/books/list.php');\n\n }", "title": "" }, { "docid": "cdbe57e5f68037a7d673227250684866", "score": "0.68880165", "text": "public function index()\n {\n return SpecializationResource::collection(Spec::paginate(10));\n }", "title": "" }, { "docid": "ce119cc9f5dd3ee1904e1fd10c2e5f4f", "score": "0.68733615", "text": "public function _list()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\n\t\t$oAwardModel = new model_award();\n\t\t$tAwards = $oAwardModel->findAll();\n\n\t\t$oView = new _view('awards::list');\n\t\t$oView->tAwards = $tAwards;\n\n\t\t$this->oLayout->add('work', $oView);\n\t}", "title": "" }, { "docid": "5cbfcb7b405ab167a69ee36809e4e4c6", "score": "0.687026", "text": "public function index()\n {\n // Get items\n // $items = Item::orderBy('type', 'asc')->paginate(5);\n $items = Item::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of items as a resource\n return (ItemResource::collection($items))->response()->setStatusCode(200);\n }", "title": "" }, { "docid": "3880db888810873a15926adf0aeab153", "score": "0.68675166", "text": "public function action_list()\n {\n $model = Request::$current->param('model');\n $this->template->main->content = Model_Annex_Content::show_list($model);\n }", "title": "" }, { "docid": "0c8e64e28536e6fe176ead46e1742dc1", "score": "0.6852622", "text": "public function list()\n\t{\n\t\tglobal $venus;\n\t\t$this->prepare_items();\n\n\t\t$venus->plugins->run($this->prefix . 'list', $this);\n\t}", "title": "" }, { "docid": "fdd2aa08ee39ff613dfb2d2d853d735e", "score": "0.683835", "text": "public function index()\n {\n $this->checkPermission('shg_management_view');\n try {\n $data = $this->service->viewAllPartOne();\n $data = ShgListingResource::collection($data);\n\n return $this->respondWithSuccess($data);\n } catch (\\Throwable $th) {\n\n return $this->respondWithError($th);\n }\n }", "title": "" }, { "docid": "e5f507dbbe2411d3908a15f2210bc3ea", "score": "0.6836425", "text": "public function listAction() {\n $this->view->books = R::getAll('SELECT * FROM book WHERE title = :title', [':title' => 'Nodejs']);\n\n $this->render('list');\n }", "title": "" }, { "docid": "f29709817ec3db2d44ad77fdc0a55269", "score": "0.6829548", "text": "public function _index()\n\t{\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "4b8e52b6fdf81afdda958487f24d56b3", "score": "0.68279797", "text": "public function listAction()\n {\n $catalog = $this->container->get('catalog');\n\n $book_list = $catalog->listBooks();\n\n return [\n 'list' => $book_list,\n ];\n }", "title": "" }, { "docid": "0745910a7b8ed31535e75cefd27b7b8c", "score": "0.6801322", "text": "public function showAllAction()\n {\n //find all recipes in database\n $recipes = $this->getDoctrine()->getRepository('AppBundle:Recipe')->findAll();\n\n // show all recipes as links(it is set in Twig)\n return ['recipes' => $recipes];\n }", "title": "" }, { "docid": "41b8938878fc471b8e628e34cd112379", "score": "0.68005955", "text": "public function index(): ListResourceCollection\n {\n return new ListResourceCollection(TodoList::paginate(10));\n }", "title": "" }, { "docid": "d3a3617a0e0a9e2771655b1532f470c2", "score": "0.6792327", "text": "public function index()\n\t{\n\t\treturn BookResource::collection(Book::paginate(10));\n\t\t\n\t}", "title": "" }, { "docid": "6040a050b581e9888004ec972d7e09a0", "score": "0.6788249", "text": "public function listentriesAction()\n {\n // use app/MyFirstBlog/_templates/list.phtml for viewing\n $viewAllEntries = new View('list.phtml');\n $entries = $this->em->entry->getAll();\n\n // assign data to the template\n $viewAllEntries->assign('entries', $entries);\n\n echo $this->loadMainView($viewAllEntries);\n }", "title": "" }, { "docid": "8a85663335231f3143dcbf588b19dbfa", "score": "0.67871946", "text": "public function index()\n {\n $substances = $this->model->paginate();\n return $this->getView(__FUNCTION__ , compact('substances'));\n }", "title": "" }, { "docid": "1d602c01714319f06611ab4c66abd251", "score": "0.6786255", "text": "public function index()\n {\n //Retrieve all podcasts, ordered in descending order by their id value\n $podcasts = Podcast::orderBy('id', 'desc')->paginate(15);\n //Return the list of podcasts as a collection of PodcastResource instances\n return PodcastResource::collection($podcasts);\n }", "title": "" }, { "docid": "49c1d78d94eec140cbd39c5a0665f7cf", "score": "0.67806053", "text": "public function index()\n {\n // Get modules\n $modules = Module::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of modules as a resource\n return ModuleResource::collection($modules);\n }", "title": "" }, { "docid": "b8bbd5c4b2b076654ec4820cf0f4f302", "score": "0.67777556", "text": "public function index()\n {\n return ResponseHelper::findSuccess(\n 'Items',\n ItemResource::collection(Item::all())\n );\n }", "title": "" }, { "docid": "d73771ef09d730c6579f2a991515d849", "score": "0.67710793", "text": "public function index()\n {\n $loans = Loan::paginate();\n return LoanResource::collection($loans);\n }", "title": "" }, { "docid": "cdf88fbb286dc19c1ad1e099d34c24cd", "score": "0.67550325", "text": "public function indexAction() {\n $this->view->headTitle('List Student');\n\n $currentPageNumber = $this->getParam(\"page\", 1);\n $itemPerPage = $this->getParam(\"size\", 3);\n\n $paginator = $this->__factoryPaginator($currentPageNumber, $itemPerPage);\n $this->view->listStudents = $paginator;\n }", "title": "" }, { "docid": "a558183236ee0a06301b5345bfbe3fe1", "score": "0.67493373", "text": "public function index()\n {\n $companies = Company::paginate();\n\n return $this->resp->ok(eRespCode::C_LISTED_200_00, new CompaniesPaginationResourceCollection($companies));\n }", "title": "" }, { "docid": "79a7d6352cec8f118d68b28508fa7a97", "score": "0.6742735", "text": "public function index()\n {\n $lists = user()->lists()->get();\n\n return ListResource::collection($lists);\n }", "title": "" }, { "docid": "5f95d2756a5e123a83fb7c11ebb43128", "score": "0.6726971", "text": "public function showList()\n\t{\n\t\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\t\tHTML_showTableHeading($I18N_objectStorageObjectName, $I18N_description, $I18N_status/*, $I18N_action*/);\n\t\tforeach ($this->foundObjects as $object)\n\t\t\tHTML_showTableRow($this->getCOSName($object), $this->getCOSDescription($object), $this->getCOSStatusHumanReadable($object)/*, $this->getCOSStatus($object)*/);\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "a69ac66edc8a557759a001c94242c947", "score": "0.6707937", "text": "function list() {\n global $app;\n $sth = $this->PDO->prepare(\"SELECT * FROM person\");\n $sth->execute();\n $result = $sth->fetchAll(\\PDO::FETCH_ASSOC);\n $app->render('default.php', [\"data\" => $result], 200);\n }", "title": "" }, { "docid": "7199baaacb728985be1992dbc56397e3", "score": "0.6706126", "text": "public function getIndex()\r\n { \r\n $response = $this->modelService->getAll();\r\n\r\n //return resources listing view\r\n return view(\\OogleeUConfig::get('config.user_index.index'), compact('response'));\r\n }", "title": "" }, { "docid": "61a33e299a8771fe4e3edd28a88e59b8", "score": "0.6694361", "text": "public function index()\n {\n $studentRecords = $this->studentRepository->getAllStudentRecords();\n return StudentResource::collection($studentRecords);\n }", "title": "" }, { "docid": "d79dbba2d57614ef830362a19c63a970", "score": "0.66864055", "text": "public function index()\n {\n return $this->view('list', [\n 'elements' => $this->service->index()\n ]);\n }", "title": "" }, { "docid": "f87e4c930a716211a968b3d9cc7f28cb", "score": "0.6679537", "text": "public function listAction()\n {\n $data = array(\n 'red',\n 'green',\n 'blue',\n 'yellow'\n );\n\n $request = $this->getRequest();\n $acceptHeader = $request->getHeader('Accept');\n\n $this->view->assign(\n array(\n 'data' => $data\n )\n );\n }", "title": "" }, { "docid": "daba699beaeef91359ed7b10313414c0", "score": "0.6675206", "text": "public function index()\n {\n $this->checkPermission(\"admin_permission_management\");\n $items = $this->service->getAll();\n\n $items = ApiResource::collection($items);\n\n return $this->respondWithSuccess($items);\n }", "title": "" }, { "docid": "5278e85997fa12c693ce5b7a9a5f2e24", "score": "0.6659221", "text": "public function index() {\n\t\treturn ClientResource::collection(Client::paginate(15));\n\t}", "title": "" }, { "docid": "601280f6c7a8fe1284080c1c22a3e447", "score": "0.6654493", "text": "public function index()\n {\n // Get Accounts\n $accounts = Account::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of Accounts as a resource\n return AccountResource::collection($accounts);\n }", "title": "" }, { "docid": "aa14178a7d612bc110499d18b35cfe1c", "score": "0.6653656", "text": "public function index()\n {\n return TodoResource::collection($this->todoRepository->findAll());\n }", "title": "" }, { "docid": "da0cc4a612f27e870e1a151346a2b1e3", "score": "0.66501856", "text": "public function index()\n {\n $sub_brand_details = SubBrandDetails::paginate(10);\n return SubBrandDetailsResource::collection($sub_brand_details);\n }", "title": "" }, { "docid": "d1c36ec734b04a00b0316be8705fdc95", "score": "0.6647826", "text": "public function defaultAction()\n {\n $this->listing();\n }", "title": "" }, { "docid": "d9dcf3302214d3795a06e4d23822d158", "score": "0.66456574", "text": "public function index()\n {\n $this->setDefaultData();\n $this->paginate = [\n 'contain' => ['RegisteredUsers', 'Listings'],\n 'conditions' => ['RegisteredUsers.username'\n => $this->Auth->user()['username']]\n ];\n $sellingLists = $this->paginate($this->SellingLists);\n\n $this->set(compact('sellingLists'));\n $this->set('_serialize', ['sellingLists']);\n }", "title": "" }, { "docid": "875081e376ab728c3750171aff9d42f9", "score": "0.6645129", "text": "public function index()\n {\n $items = $this->item->paginate(10);\n\n return $this->response->view('admin.item.index', [\n 'items' => $items\n ]);\n }", "title": "" }, { "docid": "e2eacd814cad9b8205ce83c08f3b5e18", "score": "0.6644318", "text": "public function showAllAction()\n {\n $title = \"Product overview\";\n $page = $this->app->page;\n $db = $this->app->db;\n\n $this->connection();\n $sql = \"SELECT * FROM product;\";\n $res = $db->executeFetchAll($sql);\n\n $data = [\n \"res\" => $res,\n \"check\" => \"check\"\n ];\n\n // $page->add(\"flash\", [], \"hej\");\n $page->add(\"products/header\");\n $page->add(\"products/show-all\", $data);\n\n return $page->render([\n \"title\" => $title,\n ]);\n }", "title": "" }, { "docid": "7ba8d3b39da88e11faeb12313b1810c2", "score": "0.6642726", "text": "public function index()\n {\n return view('pages.listing-list', [ 'listings' => Listing::all() ]);\n }", "title": "" }, { "docid": "2e266895b57f5ca532a4517799527c81", "score": "0.6637523", "text": "public function index()\n {\n $this->authorize('viewAny', Article::class);\n return ArticleResource::collection(Article::paginate(10));\n }", "title": "" }, { "docid": "c7312e7e8966df50b49658cf582ce6ec", "score": "0.66348624", "text": "public function index()\n {\n return ScreenResource::collection(Screen::orderby('created_at','desc')->paginate(10));\n }", "title": "" }, { "docid": "ddd89648877f652ca4fa01f7cfa10b0c", "score": "0.6634571", "text": "public function index()\n {\n return \\response()->json($this->listing->all());\n }", "title": "" }, { "docid": "db782cdc73caf0645a9287f4d968586b", "score": "0.66271836", "text": "public function actionList()\n {\n $dataProvider = Event::getEventsForView();\n return $this->render('list', ['listDataProvider' => $dataProvider]);\n }", "title": "" }, { "docid": "9d24fae63c3b76b647f11d2a4ee6986d", "score": "0.6619498", "text": "public function listAction() {\n $this->layout('layout/json');\n\n $sSystemKey = $_REQUEST['systemkey'];\n\n # get list label from query\n $sLang = 'en_US';\n if(isset($_REQUEST['lang'])) {\n $sLang = $_REQUEST['lang'];\n }\n\n // translating system\n $translator = new Translator();\n $aLangs = ['en_US','de_DE'];\n foreach($aLangs as $sLoadLang) {\n if(file_exists(__DIR__.'/../../../oneplace-translation/language/'.$sLoadLang.'.mo')) {\n $translator->addTranslationFile('gettext', __DIR__.'/../../../oneplace-translation/language/'.$sLang.'.mo', 'skeleton', $sLoadLang);\n }\n }\n\n $translator->setLocale($sLang);\n\n try {\n $oInstanceTbl = CoreController::$oServiceManager->get(\\OnePlace\\Instance\\Model\\InstanceTable::class);\n } catch(\\RuntimeException $e) {\n echo 'could not load instances';\n return false;\n }\n\n try {\n $oInstance = $oInstanceTbl->getSingle($sSystemKey,'instance_apikey');\n } catch(\\RuntimeException $e) {\n echo 'could not find your instance sorry';\n return false;\n }\n\n try {\n $oTag = CoreController::$aCoreTables['core-tag']->select(['tag_key'=>'category']);\n $oTag = $oTag->current();\n } catch(\\RuntimeException $e) {\n echo 'could not load tag';\n return false;\n }\n\n try {\n $oEntityTag = CoreController::$aCoreTables['core-entity-tag']->select(['tag_idfs'=>$oTag->Tag_ID,'entity_form_idfs'=>'article-single','tag_value'=>'Store Item']);\n $oEntityTag = $oEntityTag->current();\n } catch(\\RuntimeException $e) {\n echo 'could not load entity tag';\n return false;\n }\n\n try {\n $oArticleTbl = CoreController::$oServiceManager->get(\\OnePlace\\Article\\Model\\ArticleTable::class);\n $oItemsDB = $oArticleTbl->fetchAll(false,['multi_tag'=>$oEntityTag->Entitytag_ID]);\n } catch(\\RuntimeException $e) {\n echo 'could not load article';\n return false;\n }\n\n try {\n $aFields = $this->getFormFields('article-single');\n $oItemsDB = $oArticleTbl->fetchAll(false,['multi_tag'=>$oEntityTag->Entitytag_ID]);\n } catch(\\RuntimeException $e) {\n echo 'could not load article';\n return false;\n }\n\n $aItems = [];\n\n if(count($oItemsDB) > 0) {\n foreach($oItemsDB as $oItem) {\n $aPublicItem = ['id'=>$oItem->getID()];\n # add all fields to item\n foreach($aFields as $oField) {\n switch($oField->type) {\n case 'multiselect':\n # get selected\n $oTags = $oItem->getMultiSelectField($oField->fieldkey);\n $aTags = [];\n foreach($oTags as $oTag) {\n $aTags[] = ['id'=>$oTag->id,'label'=>$translator->translate($oTag->text,'skeleton',$sLang)];\n }\n $aPublicItem[$oField->fieldkey] = $aTags;\n break;\n case 'select':\n # get selected\n $oTag = $oItem->getSelectField($oField->fieldkey);\n if($oTag) {\n if (property_exists($oTag, 'tag_value')) {\n $aPublicItem[$oField->fieldkey] = ['id' => $oTag->id, 'label' => $translator->translate($oTag->tag_value,'skeleton',$sLang)];\n } else {\n $aPublicItem[$oField->fieldkey] = ['id' => $oTag->getID(), 'label' => $translator->translate($oTag->getLabel(),'skeleton',$sLang)];\n }\n }\n break;\n case 'text':\n case 'date':\n case 'textarea':\n case 'currency':\n $aPublicItem[$oField->fieldkey] = $translator->translate($oItem->getTextField($oField->fieldkey),'skeleton',$sLang);\n break;\n default:\n break;\n }\n }\n $aItems[] = $aPublicItem;\n }\n }\n\n $aReturn = ['state'=>'success','message'=>'welcome '.$oInstance->getLabel(),'category'=>$oEntityTag->tag_value,'items'=>$aItems];\n echo json_encode($aReturn);\n\n return false;\n }", "title": "" }, { "docid": "fbeb130c8eeb567e7fad3c7305600c0c", "score": "0.66142017", "text": "public function index()\n {\n $this->authorize('list', Client::class);\n\n return $this->ok($this->repo->paginate($this->request->all()));\n }", "title": "" }, { "docid": "dd6a998d3bb458c37ae44d961b97d40b", "score": "0.6612911", "text": "public function index()\n {\n //get contacts \n $contacts = Contacts::all();\n\n //return collection of contacts as a resource\n return ContactsResource::collection($contacts);\n }", "title": "" }, { "docid": "cb2a32c859addaec7f6f5ede08ff0730", "score": "0.66128945", "text": "public function index()\n {\n $responds = Respond::all();\n return RespondForListResource::collection($responds);\n }", "title": "" }, { "docid": "1a54ebc6660394a2c42a760823c26a75", "score": "0.66118765", "text": "public function index()\n {\n //Get works\n $works = Work::paginate(15);\n \n //Return collection of works as a resource\n return WorkResource::collection($works);\n }", "title": "" }, { "docid": "5c88cf68eb91b67ee61edf19f3f2ae11", "score": "0.6608679", "text": "public function index()\n {\n $inven = Inventory::paginate(15);\n\n return InventoryResource::collection($inven);\n }", "title": "" }, { "docid": "68fd86bd147479dce20ee02a8707173a", "score": "0.6592657", "text": "public function index()\n {\n //\n return CardResource::collection($this->cardRepo->getAll());\n }", "title": "" }, { "docid": "42a6f7bb31023e697bf6d8fe877d4585", "score": "0.658499", "text": "public function index()\n {\n $items = Item::all();\n return $this->sendData('list', $items, 200);\n }", "title": "" }, { "docid": "209ce25a3fdacd16972a8a7301eac167", "score": "0.6584275", "text": "public function listAction()\n {\n $entities = $this->get('trip.repository')->findActive(5);\n\n return $this->render('TripBundle:Trip:list_block.html.twig', array(\n 'entities' => $entities,\n 'list_length' => 5,\n ));\n }", "title": "" }, { "docid": "c6efa0ee8e5b46e919fc3043bad53b51", "score": "0.65816754", "text": "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate());\n }", "title": "" }, { "docid": "28b9b7b045b952a1e51b3daabb3db025", "score": "0.65804577", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n//\t\t\tif (!isset($this->request->get['parent_id'])) $this->request->get['parent_id'] = '0';\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "679aeb0a886968964597db4d52db9f05", "score": "0.65769154", "text": "public function action_list() {\n\t\tKohana::$log->add(Kohana::DEBUG,'Executing Controller_Admin_Photo::action_list');\n\n\t\t// Build request\n\t\t$query = DB::select();\n\n\t\tif(isset($_POST['terms']))\n\t\t{\n\t\t\t$query->where('title','like',\"%\".$_POST['terms'].\"%\");\n\t\t\t$query->or_where('subtitle','like',\"%\".$_POST['terms'].\"%\");\n\t\t}\n\n\t\t$photos = Sprig::factory('photo')->load($query, FALSE);\n\n\n\t\tif(Request::$is_ajax)\n\t\t{\n\t\t\t// return a json encoded HTML table\n $this->request->response = json_encode(\n\t\t\t\tView::factory('admin/photo/list_tbody')\n\t\t\t\t\t->bind('photos', $photos)\n ->render()\n );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// return the full page\n\t\t\t$this->template->content = View::factory('admin/photo/list')\n\t\t\t\t->set('tbody', View::factory('admin/photo/list_tbody')\n\t\t\t\t\t->bind('photos', $photos)\n\t\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "bb496e1f3376022c7114e22d5ed48267", "score": "0.6573981", "text": "public function index()\n\t{\n\t\t$this->getItem();\n\t}", "title": "" }, { "docid": "e99878c1a0eff5bcf7bf12ed5c8ef9d5", "score": "0.65716714", "text": "public function show()\n {\n return view('listing::show');\n }", "title": "" }, { "docid": "423da9caffc6ac8f568bcebdebf9afbe", "score": "0.65662223", "text": "public function listAction()\n {\n $this->view->users = UserCatalog::getInstance()->getActives();\n $this->setTitle('List the User');\n }", "title": "" }, { "docid": "2d21f0bc716b4c176e994f7636cae49f", "score": "0.65646654", "text": "public function index()\n {\n $branches = Branch::paginate(15);\n return BranchResource::collection($branches);\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "367f38d2314314134a538ae223f4cd5d", "score": "0.6560926", "text": "public function index () {\n permiss ( 'user.list' );\n\n $data = $this->entity\n ->with(['role'])\n ->where('id', '<>', \\Auth::id())\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "title": "" }, { "docid": "32b26e83b4a0ac1871cecd5a10eb2445", "score": "0.65592414", "text": "public function actionList()\r\n {\r\n $option = $this->getParams();\r\n $table = $this->getTableName($option);\r\n $model = $this->model($table);\r\n\r\n $list = $model->all(\r\n function ($ar) use ($table, $model, $option) {\r\n return $model->handleActiveRecord($ar, $table, $option);\r\n },\r\n null,\r\n Yii::$app->params['use_cache']\r\n );\r\n\r\n $this->success($list);\r\n }", "title": "" }, { "docid": "04afb7d77b84ccf4a4dd5ac14fa2c226", "score": "0.6552952", "text": "public function index()\n { \n $this->paginate = [\n 'order' => ['Firms.name' => 'ASC'],\n 'maxLimit' => 20\n ];\n $firms = $this->paginate($this->Firms);\n\n $this->set(compact('firms'));\n }", "title": "" }, { "docid": "6463720c82b75c6c9ffdb8fa297632ea", "score": "0.65498865", "text": "public function index()\n\t{\n $inventaries = Inventary::orderBy('updated_at', 'desc')->paginate(12);\n return view(self::$prefixView . 'lists', compact('inventaries'));\n\t}", "title": "" }, { "docid": "04cfd6b456f88347b94d80eedaf2f138", "score": "0.65456504", "text": "public function index()\n {\n return new FormatResourceCollection(Format::paginate(12));\n }", "title": "" }, { "docid": "4b7799b0d4a4b471dbc995e613462306", "score": "0.6540187", "text": "public function listAction()\n {\n return new Response(\n json_encode([\n [\n 'id' => 1,\n 'title' => 'First Post on Vox',\n 'author' => 'Mario Rossi',\n 'author_id' => 1,\n 'excerpt' => \"Here we are! Finally this is my first post on Vox and I am so happy that...\",\n 'content' => \"Here we are! Finally this is my first post on Vox and I am so happy that this is my lorem ipsum bla bla bla bla!\",\n 'date' => \"08/01/2015\"\n ],\n [\n 'id' => 2,\n 'title' => 'And yes, this is my second post!',\n 'author' => 'Lukas Schneider',\n 'author_id' => 2,\n 'excerpt' => \"Well this is already my second post and so you already know that...\",\n 'content' => \"Well this is already my second post and so you already know that, in terms of being my second post,\n this is exactly what is says it is: my second, incredibly well written and fantastimagically published post!\",\n 'date' => \"09/02/2015\"\n ]\n ]),\n 200,\n 'application/json'\n );\n }", "title": "" }, { "docid": "7bf076a0c3e59596e2f2d0bcbed69f85", "score": "0.65379655", "text": "public function index()\n {\n $artigos = Artigo::paginate(15);\n return ArtigoResource::collection($artigos);\n }", "title": "" }, { "docid": "3ce1999f8313263a55f4c0a4a6d107fc", "score": "0.6527433", "text": "public function index()\n\t{\n\t\tif(!$this->permission->has_permission(\"specialization_viewall\")){\n\t\t\techo \"No permissions\";\n\t\t\treturn;\n\t\t}\n\n\t\t// Get all specialization from db\n\t\t$specialization = $this->SpecializationModel->GetAll();\n\n\t\t// Define data array\n\t\t$data = array(\n\t\t\t\"specialization_list\" => $specialization\n\t\t);\n\n\t\t// Load specialization view\n\t\t$this->layout->view('manage_details/specialization/specialization',$data);\n\t}", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "0e0fe48e1d16e1503e2b168a9374594b", "score": "0.6524685", "text": "public function index()\n {\n $todos = $this->todo->fetchPaginated();\n\n if ($todos->count() > 0) {\n return $this->respondWithPaginatedData($todos);\n }\n return $this->respondWithNoContent();\n }", "title": "" }, { "docid": "c21960757730e605b84ad99c7f97a9e0", "score": "0.6521291", "text": "public function index() {\n\n // 1. Récupérer les cars\n\n $cars = $this->container->getCarManager()->findAll();\n\n // 2. Afficher les cars\n echo $this->container->getTwig()->render('cars/index.html.twig', [\n 'cars' => $cars\n ]);\n }", "title": "" }, { "docid": "b1dec5f0dac45e2b14cc0f57d1289acb", "score": "0.65199256", "text": "public function index()\n {\n //\n\t\t\t\t// $resources = Resource::all();\n\t\t\t\t// $resources = $resources->sortByDesc('creation_date');\n\t\t\t\t// return response()->json($resources->values()->all());\n\n\t\t\t\treturn response()->json(Resource::orderBy('creation_date', 'desc')->get());\n }", "title": "" } ]
9cd63f1c746a7f694885863757614a33
object to string function
[ { "docid": "a80b328224cc26ef9fcfba0f9494aaaa", "score": "0.7534112", "text": "public function __toString()\n\t{\n\t\treturn (string)\\GlobalFunction::objectToString($this, get_object_vars($this));\n\t}", "title": "" } ]
[ { "docid": "27ca34f60d41e1eba739aa30ab2b0c65", "score": "0.76242864", "text": "function __toString();", "title": "" }, { "docid": "27ca34f60d41e1eba739aa30ab2b0c65", "score": "0.76242864", "text": "function __toString();", "title": "" }, { "docid": "27ca34f60d41e1eba739aa30ab2b0c65", "score": "0.76242864", "text": "function __toString();", "title": "" }, { "docid": "27ca34f60d41e1eba739aa30ab2b0c65", "score": "0.76242864", "text": "function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "33cff69cbabb6b6ea61b9578c5c6c066", "score": "0.753004", "text": "public function __toString();", "title": "" }, { "docid": "dc5e51f99d3631ed0a3b954bbc145aba", "score": "0.743984", "text": "abstract public function objectToString($object, $options = null);", "title": "" }, { "docid": "34f3413d5f27a93def0b1cf094d6f790", "score": "0.7432229", "text": "public function toString();", "title": "" }, { "docid": "34f3413d5f27a93def0b1cf094d6f790", "score": "0.7432229", "text": "public function toString();", "title": "" }, { "docid": "34f3413d5f27a93def0b1cf094d6f790", "score": "0.7432229", "text": "public function toString();", "title": "" }, { "docid": "34f3413d5f27a93def0b1cf094d6f790", "score": "0.7432229", "text": "public function toString();", "title": "" }, { "docid": "34f3413d5f27a93def0b1cf094d6f790", "score": "0.7432229", "text": "public function toString();", "title": "" }, { "docid": "34f3413d5f27a93def0b1cf094d6f790", "score": "0.7432229", "text": "public function toString();", "title": "" }, { "docid": "34f3413d5f27a93def0b1cf094d6f790", "score": "0.7432229", "text": "public function toString();", "title": "" }, { "docid": "34f3413d5f27a93def0b1cf094d6f790", "score": "0.7432229", "text": "public function toString();", "title": "" }, { "docid": "af561352109f14858c6277bfed9e7ec5", "score": "0.7431666", "text": "function toString();", "title": "" }, { "docid": "af561352109f14858c6277bfed9e7ec5", "score": "0.7431666", "text": "function toString();", "title": "" }, { "docid": "de3084e252f02c7750caec5bd14e61fd", "score": "0.72230595", "text": "public abstract function __toString();", "title": "" }, { "docid": "de3084e252f02c7750caec5bd14e61fd", "score": "0.72230595", "text": "public abstract function __toString();", "title": "" }, { "docid": "457b1625bb7134b971cc87f4f8b33487", "score": "0.71975505", "text": "public function __toString(): string {}", "title": "" }, { "docid": "457b1625bb7134b971cc87f4f8b33487", "score": "0.71975505", "text": "public function __toString(): string {}", "title": "" }, { "docid": "542866fcbaf61a6bffb258541dfbfb06", "score": "0.7195934", "text": "public function __toString() : string;", "title": "" }, { "docid": "542866fcbaf61a6bffb258541dfbfb06", "score": "0.7195934", "text": "public function __toString() : string;", "title": "" }, { "docid": "542866fcbaf61a6bffb258541dfbfb06", "score": "0.7195934", "text": "public function __toString() : string;", "title": "" }, { "docid": "ae1eb3a8a41c4cc7de7ee43900709ed3", "score": "0.7195334", "text": "public function toString(): string;", "title": "" }, { "docid": "ae1eb3a8a41c4cc7de7ee43900709ed3", "score": "0.7195334", "text": "public function toString(): string;", "title": "" }, { "docid": "ae1eb3a8a41c4cc7de7ee43900709ed3", "score": "0.7195334", "text": "public function toString(): string;", "title": "" }, { "docid": "ae1eb3a8a41c4cc7de7ee43900709ed3", "score": "0.7195334", "text": "public function toString(): string;", "title": "" }, { "docid": "08d98c03f4607b1a411831140a27262b", "score": "0.7193144", "text": "abstract function __toString();", "title": "" }, { "docid": "08d98c03f4607b1a411831140a27262b", "score": "0.7193144", "text": "abstract function __toString();", "title": "" }, { "docid": "e9fb19076bad37b0794d3b258995f6d0", "score": "0.71903145", "text": "public function objectToString($object, $options = null);", "title": "" }, { "docid": "5c68edd99ad000cbc665398e80e3c686", "score": "0.71324813", "text": "public function __toString(): string;", "title": "" }, { "docid": "5c68edd99ad000cbc665398e80e3c686", "score": "0.71324813", "text": "public function __toString(): string;", "title": "" }, { "docid": "5c68edd99ad000cbc665398e80e3c686", "score": "0.71324813", "text": "public function __toString(): string;", "title": "" }, { "docid": "5c68edd99ad000cbc665398e80e3c686", "score": "0.71324813", "text": "public function __toString(): string;", "title": "" }, { "docid": "5c68edd99ad000cbc665398e80e3c686", "score": "0.71324813", "text": "public function __toString(): string;", "title": "" }, { "docid": "5c68edd99ad000cbc665398e80e3c686", "score": "0.71324813", "text": "public function __toString(): string;", "title": "" }, { "docid": "5c68edd99ad000cbc665398e80e3c686", "score": "0.71324813", "text": "public function __toString(): string;", "title": "" }, { "docid": "5c68edd99ad000cbc665398e80e3c686", "score": "0.71324813", "text": "public function __toString(): string;", "title": "" }, { "docid": "5c68edd99ad000cbc665398e80e3c686", "score": "0.71324813", "text": "public function __toString(): string;", "title": "" }, { "docid": "5c68edd99ad000cbc665398e80e3c686", "score": "0.71324813", "text": "public function __toString(): string;", "title": "" }, { "docid": "5c68edd99ad000cbc665398e80e3c686", "score": "0.71324813", "text": "public function __toString(): string;", "title": "" }, { "docid": "5c68edd99ad000cbc665398e80e3c686", "score": "0.71324813", "text": "public function __toString(): string;", "title": "" }, { "docid": "02ea1a04420bf4fb9e97149875b05f95", "score": "0.7109328", "text": "public function asString();", "title": "" }, { "docid": "141ccf8a72e93efaeb29937cffa68d89", "score": "0.709941", "text": "public function __toString()\n\t{\n\t\t$result = 'Object: '.get_class( $this ).\" {\\n\";\n\t\tforeach ( $this->getFields() as $name => $value )\n\t\t{\n\t\t\t$result .= sprintf( \"\\t%-20s%s\\n\", $name, is_scalar($value) ? $value : json_encode($value) );\n\t\t}\n\t\t$result .= \"}\\n\";\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "87d7e68771808dbc898d5ac556080991", "score": "0.70890766", "text": "public function __toString() : string\n {\n $fields = [];\n foreach ($this->fields as $name => $syntax) {\n $fields[] = \"{$name}: {$syntax}\";\n }\n $fields = implode(', ', $fields);\n return \"Object {{$fields}} separated by '{$this->separator}'\";\n }", "title": "" }, { "docid": "9e0b6c796cba8b24b216fe09cd9881eb", "score": "0.70840466", "text": "public function __toString():string;", "title": "" }, { "docid": "cd911da322557fe0b83fbff1b701ea48", "score": "0.7043499", "text": "public function __toString () {}", "title": "" }, { "docid": "cd911da322557fe0b83fbff1b701ea48", "score": "0.7043499", "text": "public function __toString () {}", "title": "" }, { "docid": "cd911da322557fe0b83fbff1b701ea48", "score": "0.7043499", "text": "public function __toString () {}", "title": "" }, { "docid": "cd911da322557fe0b83fbff1b701ea48", "score": "0.7043499", "text": "public function __toString () {}", "title": "" }, { "docid": "cd911da322557fe0b83fbff1b701ea48", "score": "0.7043499", "text": "public function __toString () {}", "title": "" }, { "docid": "cd911da322557fe0b83fbff1b701ea48", "score": "0.7043499", "text": "public function __toString () {}", "title": "" }, { "docid": "cd911da322557fe0b83fbff1b701ea48", "score": "0.7043499", "text": "public function __toString () {}", "title": "" }, { "docid": "cd911da322557fe0b83fbff1b701ea48", "score": "0.7043499", "text": "public function __toString () {}", "title": "" }, { "docid": "cd911da322557fe0b83fbff1b701ea48", "score": "0.7043499", "text": "public function __toString () {}", "title": "" }, { "docid": "cd911da322557fe0b83fbff1b701ea48", "score": "0.7043499", "text": "public function __toString () {}", "title": "" }, { "docid": "cd911da322557fe0b83fbff1b701ea48", "score": "0.7043499", "text": "public function __toString () {}", "title": "" }, { "docid": "cd911da322557fe0b83fbff1b701ea48", "score": "0.7043499", "text": "public function __toString () {}", "title": "" }, { "docid": "cd911da322557fe0b83fbff1b701ea48", "score": "0.7043499", "text": "public function __toString () {}", "title": "" }, { "docid": "cd911da322557fe0b83fbff1b701ea48", "score": "0.7043499", "text": "public function __toString () {}", "title": "" }, { "docid": "cd911da322557fe0b83fbff1b701ea48", "score": "0.7043499", "text": "public function __toString () {}", "title": "" }, { "docid": "d763841d34d32079c140fe1ece0439a3", "score": "0.7039575", "text": "public function toString() : string;", "title": "" }, { "docid": "8bceaf5ec3692fa0978d730687128f8b", "score": "0.70107836", "text": "public function __toString() {}", "title": "" }, { "docid": "8bceaf5ec3692fa0978d730687128f8b", "score": "0.70107836", "text": "public function __toString() {}", "title": "" }, { "docid": "8bceaf5ec3692fa0978d730687128f8b", "score": "0.70107836", "text": "public function __toString() {}", "title": "" }, { "docid": "8bceaf5ec3692fa0978d730687128f8b", "score": "0.70107836", "text": "public function __toString() {}", "title": "" }, { "docid": "8bceaf5ec3692fa0978d730687128f8b", "score": "0.70107836", "text": "public function __toString() {}", "title": "" } ]
73d8bd5876bf5232809802f6302e236c
Funcion que actualiza la causal de exclusion para los estudinates que incurren en perdidad de calidad de estudiante
[ { "docid": "140d5852f84f2e8264cc7478663c14da", "score": "0.0", "text": "function actualizarCausal(){\n\t\t$variables=array('proyecto'=>$this->proyecto,\n 'anio'=> $this->anio,\n 'periodo'=>$this->periodo,\n 'estudiante'=>$this->codigoEstudiante,\n 'causal'=>$this->causal,\n 'porcentaje'=>$this->porcentaje,\n 'matriculas'=>$this->numMatriculas\n );\n\t\t\t\t\t\t \n\t\t$cadena_sql=$this->sql->cadena_sql('actualizarCausal',$variables);\n\t\t$resultado=$this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"\");\n\t\t\n\t\treturn true;\n\t}", "title": "" } ]
[ { "docid": "35fa99512c67f15944f3f34dae6ff1c0", "score": "0.5745194", "text": "function revisaEstadoPreventivosPorHoras( $preventivos )\n {\n $cantPreventivos = sizeof( $preventivos );\n for ($i=0; $i<$cantPreventivos; $i++)\n {\n $lecturaActual = $this->getLecturaActual( $preventivos[$i]['id_equipo'] );\n //dump( $lecturaActual, 'Lectura Actual' );\n //dump( $preventivos[$i]['ultima_lectura'], 'Ultima lectura' );\n //dump( $preventivos[$i]['cantidad'], 'cantidad' );\n //dump( $preventivos[$i]['critico1'], 'critico' );\n\n\n //1er caso: lecturaactual - ultimalectura >= cantidad => estado vencido\n if (($lecturaActual - $preventivos[$i]['ultima_lectura']) >= $preventivos[$i]['cantidad'])\n {\n if ($preventivos[$i]['estadoprev'] != 'VE')\n {\n $this->cambiaEstadoPreventivo( $preventivos[$i]['prevId'], 'VE' );\n $preventivos[$i]['estadoprev'] = 'VE';\n }\n }\n\n //2do caso: lecturaactual - ultimalectura < cantidad => estado en curso\n if (($lecturaActual - $preventivos[$i]['ultima_lectura']) < $preventivos[$i]['cantidad'])\n {\n //3er caso: > cantidad => estado critico\n if (($lecturaActual - $preventivos[$i]['ultima_lectura']) > $preventivos[$i]['cantidad'])\n {\n if ($preventivos[$i]['estadoprev'] != 'CR')\n {\n $this->cambiaEstadoPreventivo( $preventivos[$i]['prevId'], 'CR' );\n $preventivos[$i]['estadoprev'] = 'CR';\n }\n }\n else // si no es critico => esta en curso\n {\n if ($preventivos[$i]['estadoprev'] != 'C')\n {\n $this->cambiaEstadoPreventivo( $preventivos[$i]['prevId'], 'C' );\n $preventivos[$i]['estadoprev'] = 'C';\n }\n }\n }\n }\n return $preventivos;\n }", "title": "" }, { "docid": "66d1e576ff94e008d25be4d998ae8bb7", "score": "0.57184386", "text": "function avances($sContrato,$sNumeroOrden,$sIdConvenio,$dIdFecha,$sIdTurno,$sParamSeguridad){\n $sqlStatus = \"SELECT lStatus, sIdConvenio \n FROM reportediario \n WHERE sContrato = '$sContrato' AND dIdFecha = '$dIdFecha' \n AND sNumeroOrden = '$sNumeroOrden' AND sIdTurno = '$sIdTurno'\";\n $resultStatus = mysql_query($sqlStatus);\n if($rowStatus = mysql_fetch_array($resultStatus))\n {\n if(!isset($sIdConvenio)){\n if($rowStatus['sIdConvenio'] ==\"Pendiente\"){\n $lContinua=true;\n }\n else{\n $lContinua=false;\n $sIdConvenio = $rowStatus['sIdConvenio'];\n }\n }\n else{\n $lContinua = true;\n }\n \n }\n if($lContinua){\n // Partidas canceladas ....\n // Avance por Plataforma ... \n $sqlPlataforma = \"SELECT SUM(( b.dAvance * a.dPonderado) / 100 ) as dAvance \n FROM actividadescanceladas b \n INNER JOIN actividadesxorden a ON (b.sContrato = a.sContrato AND b.sNumeroOrden = a.sNumeroOrden AND \n a.sIdConvenio = '$sIdConvenio' AND b.sWbs = a.sWbs AND b.sNumeroActividad = a.sNumeroActividad) \n WHERE b.sContrato = '$sContrato' AND b.sNumeroOrden = '$sNumeroOrden' AND b.dIdFecha = '$dIdFecha' \n GROUP BY b.sNumeroOrden\";\n $resultPlataforma = mysql_query($sqlPlataforma);\n if($rowPlataforma = mysql_fetch_array($resultPlataforma)){\n $dAvancePlataforma = $dAvancePlataforma + $rowPlataforma['dAvance'];\n }\n if($sParamSeguridad = 'Avanzada'){ #Tipo de Seguridad\n $sqlContrato = \"SELECT a.sNumeroActividad, a.dPonderado, a.dCantidadAnexo, Sum(b.dCantidad) as dCantidad From actividadescanceladas b \n INNER JOIN actividadesfcanceladas af ON (af.sContrato = b.sContrato And af.dIdFecha = b.dIdFecha And af.lAfectaContrato = 'Si') \n INNER JOIN actividadesxanexo a ON (b.sContrato = a.sContrato And a.sIdConvenio = '$sIdConvenio' And b.sNumeroActividad = a.sNumeroActividad and a.sTipoActividad = 'Actividad')\n WHERE b.sContrato = '$sContrato' and b.dIdFecha = '$dIdFecha' group by b.sNumeroActividad\";\n $resultContrato = mysql_query($sqlContrato);\n while($rowContrato=mysql_fetch_array($resultContrato)){\n $sqlAuxiliar = \"SELECT sum(dCantidad) as dAcumulado \n FROM bitacoradeactividades \n WHERE sContrato = '$sContrato' And sNumeroActividad = '\".$rowContrato['sNumeroActividad'].\"' \n AND dIdFecha <= '$dIdFecha \n GROUP BY sNumeroActividad\";\n $resultAuxiliar = mysql_query($sqlAuxiliar);\n $dAvancePartida = 0 ;\n if($rowAuxiliar = mysql_fetch_array($resutAuxiliar)){\n If (($rowAuxiliar['dAcumulado'] - $rowContrato['dCantidad']) >= $rowContrato['dCantidadAnexo'])\n $dAvancePartida = 0;\n Else{\n If ($rowAuxiliar['dAcumulado'] > $rowContrato['dCantidadAnexo'])\n $dAvancePartida = (($rowContrato['dCantidadAnexo'] - ($rowAuxiliar['dAcumulado'] - $rowContrato['dCantidad'])) * 100) / $rowContrato['dCantidadAnexo'];\n Else\n $dAvancePartida = ($rowContrato['dCantidad'] * 100) / $rowContrato['dCantidadAnexo'] ;\n $dAvanceObra = $dAvanceObra + ($dAvancePartida * $rowContrato['dPonderado']) ;\n }\n }\n }\n }#Fin Tipo de Seguridad\n // Avance de Partidas Reportadas ....\n // por Plataforma\n $sqlPlataforma =\"SELECT Sum(( b.dAvance * a.dPonderado) / 100 ) as dAvance From bitacoradeactividades b \n INNER JOIN actividadesxorden a ON (b.sContrato = a.sContrato AND b.sNumeroOrden = a.sNumeroOrden \n AND a.sIdConvenio = '$sIdConvenio' AND b.sWbs = a.sWbs And b.sNumeroActividad = a.sNumeroActividad) \n WHERE b.sContrato = '$sContrato' and b.dIdFecha = '$dIdFecha' And b.sNumeroOrden = '$sNumeroOrden'\n GROUP BY b.sNumeroOrden\" ;\n $resultPlataforma = mysql_query($sqlPlataforma);\n If ($resultPlataforma = mysql_fetch_array($resultPlataforma)) \n $dAvancePlataforma = $dAvancePlataforma + $rowPlataforma['dAvance'] ;\n // Por Contrato de Partidas reportadas en bitacora\n // Por Contrato de Partidas reportadas por Alcances\n if($sParamSeguridad = 'Avanzada'){\n $sqlContrato=\"Select a.sNumeroActividad, a.dCantidadAnexo, a.dPonderado, Sum(b.dCantidad) as dCantidad From bitacoradeactividades b \n INNER JOIN actividadesxanexo a ON (b.sContrato = a.sContrato And a.sIdConvenio = '$sIdConvenio' \n AND b.sNumeroActividad = a.sNumeroActividad and a.sTipoActividad = 'Actividad') \n WHERE b.sContrato = '$sContrato' and b.dIdFecha = '$dIdFecha' And b.lAlcance = 'No' \n GROUP BY b.sNumeroActividad \n ORDER BY a.iItemOrden\";\n $resultContrato = mysql_query($sqlContrato);\n while ($rowContrato = mysql_fetch_array($resultContrato))\n {\n $sqlAuxiliar=\"SELECT sum(dCantidad) as dAcumulado From bitacoradeactividades \n WHERE sContrato = '$sContrato' And sNumeroActividad = '\".$rowContrato['sNumeroActividad'].\"' \n AND dIdFecha <= '$dIdFecha' Group By sNumeroActividad\";\n $dAvancePartida = 0 ;\n $resultAuxiliar = mysql_query($sqlAuxiliar);\n if($rowAuxiliar = mysql_fetch_array($resultAuxiliar)){\n If(($rowAuxiliar['dAcumulado'] - $rowContrato['dCantidad']) >= $rowContrato['dCantidadAnexo']) \n $dAvancePartida = 0;\n else\n If ($rowAuxiliar['dAcumulado'] > $rowContrato['dCantidadAnexo'] )\n $dAvancePartida = (($rowContrato['dCantidadAnexo'] - ($rowAuxiliar['dAcumulado'] - $rowContrato['dCantidad'])) * 100) / $rowContrato['dCantidadAnexo'];\n Else\n $dAvancePartida = ($rowContrato['dCantidad'] * 100) / $rowContrato['dCantidadAnexo'] ;\n } \n $dAvanceObra = $dAvanceObra + ($dAvancePartida * $rowContrato['dPonderado']) ;\n }\n $sqlContrato=\"SELECT a.sNumeroActividad, a.dCantidadAnexo, a.dPonderado, b.iFase, Sum(b.dCantidad) AS dCantidad \n FROM bitacoradealcances b \n INNER JOIN actividadesxanexo a ON (b.sContrato = a.sContrato AND a.sIdConvenio = '$sIdConvenio' \n AND b.sNumeroActividad = a.sNumeroActividad AND a.sTipoActividad ='Actividad') \n WHERE b.sContrato = '$sContrato' AND b.dIdFecha = '$dIdFecha' \n GROUP BY b.sNumeroActividad, b.iFase order by a.iItemOrden, b.iFase\";\n $resultContrato = mysql_query($sqlContrato);\n while($rowContrato = mysql_fetch_array($resultContrato))\n {\n $sqlAuxiliar = \"SELECT Sum(b.dCantidad) as dCantidad, a.dAvance \n FROM bitacoradealcances b\n INNER JOIN alcancesxactividad a ON (b.sContrato = a.sContrato AND b.sNumeroActividad = a.sNumeroActividad \n AND b.iFase = a.iFase) \n WHERE b.sContrato = '$sContrato' And b.sNumeroActividad = '\".$rowContrato['sNumeroActividad'].\"' \n AND b.iFase = '\".$rowContrato['iFase'].\"' And b.dIdFecha <= '$dIdFecha' \n GROUP BY b.sNumeroActividad\" ;\n\n $dAvancePartida = 0 ;\n $resultAuxiliar = mysql_query($sqlAuxiliar);\n if($rowAuxiliar = mysql_fetch_array($resultAuxiliar))\n {\n $dAvancePartida = $rowAuxiliar['dCantidad'] ;\n If ( $dAvancePartida - $rowContrato['dCantidad'] >= $rowContrato['dCantidadAnexo'] )\n $dAvancePartida = 0;\n else{\n If ($dAvancePartida > $rowContrato['dCantidadAnexo'] )\n $dAvancePartida = (($rowContrato['dCantidadAnexo'] - ( $dAvancePartida - $rowContrato['dCantidad'])) * $rowAuxiliar['dAvance']) / $rowContrato['dCantidadAnexo'];\n else\n $dAvancePartida = ($rowContrato['dCantidad'] * $rowAuxiliar['dAvance']) / $rowContrato['dCantidadAnexo'] ;\n }\n }\n $dAvanceObra = $dAvanceObra + ($dAvancePartida * $rowContrato['dPonderado']) ;\n }\n $dAvanceObra = $dAvanceObra / 100 ;\n }\n // Almacenamiento de Avances ...\n // Primero se ajusta tanto el avance x programa de trabajo ...\n If ($lParamMultiple)\n {\n $sqlAuxiliar = \"SELECT sum(dAvance) AS dAvance \n FROM avancesglobalesxorden \n WHERE sContrato = '$sContrato' AND sIdConvenio = '$sIdConvenio' AND dIdFecha < '$dIdFecha' \n AND sNumeroOrden = '$sNumeroOrden' \n GROUP BY sNumeroOrden\";\n $resultAuxiliar = mysql_query(sqlAuxiliar);\n if($rowAuxiliar = mysql_fetch_array($resultAuxiliar))\n If ( ($rowAuxiliar['dAvance'] + $dAvancePlataforma ) > 100 )\n $dAvancePlataforma = 100 - $rowAuxiliar['dAvance'] ;\n\n $sqlAuxiliar =\"INSERT INTO avancesglobalesxorden (sContrato, sNumeroOrden, dIdFecha, sIdConvenio, sIdTurno, dAvance) \n Values ('$sContrato,'$sNumeroOrden,'$dIdFecha','$sIdConvenio, 'A', '$dAvancePlataforma')\n ON DUPLICATE KEY UPDATE dAvance = '$dAvancePlataforma'\" ;\n $resultAuxiliar = mysql_query($sqlAuxiliar);\n }\n // Avances del Contrato ...\n If ($sParamSeguridad = 'Avanzada')\n {\n $sqlAuxiliar = \"SELECT sum(dAvance) as dAvance \n FROM avancesglobalesxorden \n WHERE sContrato = '$sContrato' and sIdConvenio = '$sIdConvenio' \n AND dIdFecha < '$dIdFecha' and sNumeroOrden = '' \n GROUP BY sContrato\";\n $resultAuxiliar = mysql_query($sqlAuxiliar);\n if($rowAuxiliar = mysql_fetch_array($resultAuxiliar))\n If ( ($rowAuxiliar['dAvance'] + $dAvanceObra ) > 100 )\n $dAvanceObra = 100 - $rowAuxiliar['dAvance'] ;\n\n $sqlAuxiliar = \"INSERT INTO avancesglobalesxorden (sContrato, sNumeroOrden, dIdFecha, sIdConvenio, sIdTurno, dAvance) \n VALUES ('$sContrato', '', '$dIdFecha', '$sIdConvenio', 'A', '$dAvanceObra')\n ON DUPLICATE KEY UPDATE dAvance='$dAvanceObra'\";\n $resultAuxiliar = mysql_query($sqlAuxiliar);\n }\n }\n \n $Result = $dAvanceObra ;\n return $Result = round($Result*10000)/10000;\n}", "title": "" }, { "docid": "72bc2fd353f156e129b5e335db11927a", "score": "0.56566334", "text": "public function calcularDisponibilidadSalas()\n {\n $salas = Sala::all();\n foreach ($salas as $sala)\n {\n $idSala = $sala -> idSala;\n $reservas = DB::table('reservas')->where([\n ['sala_id', '=', $idSala]])->get();\n $cambio = 0;\n foreach ($reservas as $reserva)\n {\n $fechaActual = Carbon::now();\n $fechaInicio = $reserva -> fecha_inicio;\n $fechaFin = $reserva -> fecha_fin;\n $difMin = $fechaActual -> diffInSeconds($fechaInicio);\n $difMax = $fechaActual -> diffInSeconds($fechaFin);\n if ($difMin > 0 && $difMax < 0)\n {\n $cambio = 1;\n }\n }\n if ($cambio == 1)\n {\n $sala -> estado = \"Ocupada\";\n $sala -> save();\n }\n else\n {\n $sala -> estado = \"Disponible\";\n $sala -> save();\n }\n }\n }", "title": "" }, { "docid": "7f4b10102371ca058ec8dd5dd1707d90", "score": "0.5511497", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed135_sequencial = ($this->ed135_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed135_sequencial\"]:$this->ed135_sequencial);\n $this->ed135_anoinicial = ($this->ed135_anoinicial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed135_anoinicial\"]:$this->ed135_anoinicial);\n $this->ed135_anofinal = ($this->ed135_anofinal == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed135_anofinal\"]:$this->ed135_anofinal);\n $this->ed135_quantidadedias = ($this->ed135_quantidadedias == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed135_quantidadedias\"]:$this->ed135_quantidadedias);\n }else{\n $this->ed135_sequencial = ($this->ed135_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed135_sequencial\"]:$this->ed135_sequencial);\n }\n }", "title": "" }, { "docid": "959ee8b0c9db938f29490baea0a78f33", "score": "0.549643", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->vc29_i_dose = ($this->vc29_i_dose == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"vc29_i_dose\"]:$this->vc29_i_dose);\n $this->vc29_i_codigo = ($this->vc29_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"vc29_i_codigo\"]:$this->vc29_i_codigo);\n $this->vc29_i_vacina = ($this->vc29_i_vacina == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"vc29_i_vacina\"]:$this->vc29_i_vacina);\n $this->vc29_i_material = ($this->vc29_i_material == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"vc29_i_material\"]:$this->vc29_i_material);\n }else{\n $this->vc29_i_codigo = ($this->vc29_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"vc29_i_codigo\"]:$this->vc29_i_codigo);\n }\n }", "title": "" }, { "docid": "4c73ce7c3a4dfc9bbc4505c0b7d4189a", "score": "0.5482435", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->y08_codigo = ($this->y08_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_codigo\"]:$this->y08_codigo);\n $this->y08_nota = ($this->y08_nota == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_nota\"]:$this->y08_nota);\n $this->y08_inscr = ($this->y08_inscr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_inscr\"]:$this->y08_inscr);\n if($this->y08_dtlanc == \"\"){\n $this->y08_dtlanc_dia = ($this->y08_dtlanc_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_dtlanc_dia\"]:$this->y08_dtlanc_dia);\n $this->y08_dtlanc_mes = ($this->y08_dtlanc_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_dtlanc_mes\"]:$this->y08_dtlanc_mes);\n $this->y08_dtlanc_ano = ($this->y08_dtlanc_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_dtlanc_ano\"]:$this->y08_dtlanc_ano);\n if($this->y08_dtlanc_dia != \"\"){\n $this->y08_dtlanc = $this->y08_dtlanc_ano.\"-\".$this->y08_dtlanc_mes.\"-\".$this->y08_dtlanc_dia;\n }\n }\n $this->y08_notain = ($this->y08_notain == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_notain\"]:$this->y08_notain);\n $this->y08_notafi = ($this->y08_notafi == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_notafi\"]:$this->y08_notafi);\n $this->y08_numcgm = ($this->y08_numcgm == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_numcgm\"]:$this->y08_numcgm);\n $this->y08_obs = ($this->y08_obs == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_obs\"]:$this->y08_obs);\n $this->y08_login = ($this->y08_login == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_login\"]:$this->y08_login);\n $this->y08_quantsol = ($this->y08_quantsol == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_quantsol\"]:$this->y08_quantsol);\n $this->y08_quantlib = ($this->y08_quantlib == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_quantlib\"]:$this->y08_quantlib);\n $this->y08_cancel = ($this->y08_cancel == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_cancel\"]:$this->y08_cancel);\n if($this->y08_dataliberacaografica == \"\"){\n $this->y08_dataliberacaografica_dia = ($this->y08_dataliberacaografica_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_dataliberacaografica_dia\"]:$this->y08_dataliberacaografica_dia);\n $this->y08_dataliberacaografica_mes = ($this->y08_dataliberacaografica_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_dataliberacaografica_mes\"]:$this->y08_dataliberacaografica_mes);\n $this->y08_dataliberacaografica_ano = ($this->y08_dataliberacaografica_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_dataliberacaografica_ano\"]:$this->y08_dataliberacaografica_ano);\n if($this->y08_dataliberacaografica_dia != \"\"){\n $this->y08_dataliberacaografica = $this->y08_dataliberacaografica_ano.\"-\".$this->y08_dataliberacaografica_mes.\"-\".$this->y08_dataliberacaografica_dia;\n }\n }\n if($this->y08_datarecebimentocontribuinte == \"\"){\n $this->y08_datarecebimentocontribuinte_dia = ($this->y08_datarecebimentocontribuinte_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_datarecebimentocontribuinte_dia\"]:$this->y08_datarecebimentocontribuinte_dia);\n $this->y08_datarecebimentocontribuinte_mes = ($this->y08_datarecebimentocontribuinte_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_datarecebimentocontribuinte_mes\"]:$this->y08_datarecebimentocontribuinte_mes);\n $this->y08_datarecebimentocontribuinte_ano = ($this->y08_datarecebimentocontribuinte_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_datarecebimentocontribuinte_ano\"]:$this->y08_datarecebimentocontribuinte_ano);\n if($this->y08_datarecebimentocontribuinte_dia != \"\"){\n $this->y08_datarecebimentocontribuinte = $this->y08_datarecebimentocontribuinte_ano.\"-\".$this->y08_datarecebimentocontribuinte_mes.\"-\".$this->y08_datarecebimentocontribuinte_dia;\n }\n }\n if($this->y08_datalimitesolicitada == \"\"){\n $this->y08_datalimitesolicitada_dia = ($this->y08_datalimitesolicitada_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_datalimitesolicitada_dia\"]:$this->y08_datalimitesolicitada_dia);\n $this->y08_datalimitesolicitada_mes = ($this->y08_datalimitesolicitada_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_datalimitesolicitada_mes\"]:$this->y08_datalimitesolicitada_mes);\n $this->y08_datalimitesolicitada_ano = ($this->y08_datalimitesolicitada_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_datalimitesolicitada_ano\"]:$this->y08_datalimitesolicitada_ano);\n if($this->y08_datalimitesolicitada_dia != \"\"){\n $this->y08_datalimitesolicitada = $this->y08_datalimitesolicitada_ano.\"-\".$this->y08_datalimitesolicitada_mes.\"-\".$this->y08_datalimitesolicitada_dia;\n }\n }\n if($this->y08_datalimiteliberada == \"\"){\n $this->y08_datalimiteliberada_dia = ($this->y08_datalimiteliberada_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_datalimiteliberada_dia\"]:$this->y08_datalimiteliberada_dia);\n $this->y08_datalimiteliberada_mes = ($this->y08_datalimiteliberada_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_datalimiteliberada_mes\"]:$this->y08_datalimiteliberada_mes);\n $this->y08_datalimiteliberada_ano = ($this->y08_datalimiteliberada_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_datalimiteliberada_ano\"]:$this->y08_datalimiteliberada_ano);\n if($this->y08_datalimiteliberada_dia != \"\"){\n $this->y08_datalimiteliberada = $this->y08_datalimiteliberada_ano.\"-\".$this->y08_datalimiteliberada_mes.\"-\".$this->y08_datalimiteliberada_dia;\n }\n }\n }else{\n $this->y08_codigo = ($this->y08_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y08_codigo\"]:$this->y08_codigo);\n }\n }", "title": "" }, { "docid": "1a2d65e53a12601275e9350bd3171408", "score": "0.547088", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed219_i_codigo = ($this->ed219_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed219_i_codigo\"]:$this->ed219_i_codigo);\n if($this->ed219_d_dataacao == \"\"){\n $this->ed219_d_dataacao_dia = ($this->ed219_d_dataacao_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed219_d_dataacao_dia\"]:$this->ed219_d_dataacao_dia);\n $this->ed219_d_dataacao_mes = ($this->ed219_d_dataacao_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed219_d_dataacao_mes\"]:$this->ed219_d_dataacao_mes);\n $this->ed219_d_dataacao_ano = ($this->ed219_d_dataacao_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed219_d_dataacao_ano\"]:$this->ed219_d_dataacao_ano);\n if($this->ed219_d_dataacao_dia != \"\"){\n $this->ed219_d_dataacao = $this->ed219_d_dataacao_ano.\"-\".$this->ed219_d_dataacao_mes.\"-\".$this->ed219_d_dataacao_dia;\n }\n }\n if($this->ed219_d_datafim == \"\"){\n $this->ed219_d_datafim_dia = ($this->ed219_d_datafim_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed219_d_datafim_dia\"]:$this->ed219_d_datafim_dia);\n $this->ed219_d_datafim_mes = ($this->ed219_d_datafim_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed219_d_datafim_mes\"]:$this->ed219_d_datafim_mes);\n $this->ed219_d_datafim_ano = ($this->ed219_d_datafim_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed219_d_datafim_ano\"]:$this->ed219_d_datafim_ano);\n if($this->ed219_d_datafim_dia != \"\"){\n $this->ed219_d_datafim = $this->ed219_d_datafim_ano.\"-\".$this->ed219_d_datafim_mes.\"-\".$this->ed219_d_datafim_dia;\n }\n }\n if($this->ed219_d_datainicio == \"\"){\n $this->ed219_d_datainicio_dia = ($this->ed219_d_datainicio_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed219_d_datainicio_dia\"]:$this->ed219_d_datainicio_dia);\n $this->ed219_d_datainicio_mes = ($this->ed219_d_datainicio_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed219_d_datainicio_mes\"]:$this->ed219_d_datainicio_mes);\n $this->ed219_d_datainicio_ano = ($this->ed219_d_datainicio_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed219_d_datainicio_ano\"]:$this->ed219_d_datainicio_ano);\n if($this->ed219_d_datainicio_dia != \"\"){\n $this->ed219_d_datainicio = $this->ed219_d_datainicio_ano.\"-\".$this->ed219_d_datainicio_mes.\"-\".$this->ed219_d_datainicio_dia;\n }\n }\n $this->ed219_i_rota = ($this->ed219_i_rota == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed219_i_rota\"]:$this->ed219_i_rota);\n $this->ed219_i_aluno = ($this->ed219_i_aluno == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed219_i_aluno\"]:$this->ed219_i_aluno);\n $this->ed219_i_usuario = ($this->ed219_i_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed219_i_usuario\"]:$this->ed219_i_usuario);\n }else{\n $this->ed219_i_codigo = ($this->ed219_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed219_i_codigo\"]:$this->ed219_i_codigo);\n }\n }", "title": "" }, { "docid": "20e690b06b59a141f8bb42f528793b35", "score": "0.5469906", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed23_i_codigo = ($this->ed23_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed23_i_codigo\"]:$this->ed23_i_codigo);\n $this->ed23_i_rechumanoescola = ($this->ed23_i_rechumanoescola == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed23_i_rechumanoescola\"]:$this->ed23_i_rechumanoescola);\n $this->ed23_i_numero = ($this->ed23_i_numero == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed23_i_numero\"]:$this->ed23_i_numero);\n $this->ed23_i_regimetrabalho = ($this->ed23_i_regimetrabalho == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed23_i_regimetrabalho\"]:$this->ed23_i_regimetrabalho);\n $this->ed23_i_areatrabalho = ($this->ed23_i_areatrabalho == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed23_i_areatrabalho\"]:$this->ed23_i_areatrabalho);\n $this->ed23_i_disciplina = ($this->ed23_i_disciplina == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed23_i_disciplina\"]:$this->ed23_i_disciplina);\n }else{\n $this->ed23_i_codigo = ($this->ed23_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed23_i_codigo\"]:$this->ed23_i_codigo);\n }\n }", "title": "" }, { "docid": "7058877f078881ffaf08abcd3c31241f", "score": "0.5450911", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed101_i_codigo = ($this->ed101_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed101_i_codigo\"]:$this->ed101_i_codigo);\n $this->ed101_i_aluno = ($this->ed101_i_aluno == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed101_i_aluno\"]:$this->ed101_i_aluno);\n $this->ed101_i_turmaorig = ($this->ed101_i_turmaorig == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed101_i_turmaorig\"]:$this->ed101_i_turmaorig);\n $this->ed101_i_turmadest = ($this->ed101_i_turmadest == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed101_i_turmadest\"]:$this->ed101_i_turmadest);\n $this->ed101_t_obs = ($this->ed101_t_obs == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed101_t_obs\"]:$this->ed101_t_obs);\n if($this->ed101_d_data == \"\"){\n $this->ed101_d_data_dia = ($this->ed101_d_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed101_d_data_dia\"]:$this->ed101_d_data_dia);\n $this->ed101_d_data_mes = ($this->ed101_d_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed101_d_data_mes\"]:$this->ed101_d_data_mes);\n $this->ed101_d_data_ano = ($this->ed101_d_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed101_d_data_ano\"]:$this->ed101_d_data_ano);\n if($this->ed101_d_data_dia != \"\"){\n $this->ed101_d_data = $this->ed101_d_data_ano.\"-\".$this->ed101_d_data_mes.\"-\".$this->ed101_d_data_dia;\n }\n }\n $this->ed101_c_tipo = ($this->ed101_c_tipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed101_c_tipo\"]:$this->ed101_c_tipo);\n }else{\n $this->ed101_i_codigo = ($this->ed101_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed101_i_codigo\"]:$this->ed101_i_codigo);\n }\n }", "title": "" }, { "docid": "15262b004a348f4e2105e0018185e8a8", "score": "0.54448676", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->y116_id = ($this->y116_id == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y116_id\"]:$this->y116_id);\n $this->y116_tipodocumento = ($this->y116_tipodocumento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y116_tipodocumento\"]:$this->y116_tipodocumento);\n $this->y116_codigografica = ($this->y116_codigografica == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y116_codigografica\"]:$this->y116_codigografica);\n $this->y116_idusuario = ($this->y116_idusuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y116_idusuario\"]:$this->y116_idusuario);\n $this->y116_inscricaomunicipal = ($this->y116_inscricaomunicipal == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y116_inscricaomunicipal\"]:$this->y116_inscricaomunicipal);\n if($this->y116_datalancamento == \"\"){\n $this->y116_datalancamento_dia = ($this->y116_datalancamento_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y116_datalancamento_dia\"]:$this->y116_datalancamento_dia);\n $this->y116_datalancamento_mes = ($this->y116_datalancamento_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y116_datalancamento_mes\"]:$this->y116_datalancamento_mes);\n $this->y116_datalancamento_ano = ($this->y116_datalancamento_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y116_datalancamento_ano\"]:$this->y116_datalancamento_ano);\n if($this->y116_datalancamento_dia != \"\"){\n $this->y116_datalancamento = $this->y116_datalancamento_ano.\"-\".$this->y116_datalancamento_mes.\"-\".$this->y116_datalancamento_dia;\n }\n }\n $this->y116_quantidadesolicitada = ($this->y116_quantidadesolicitada == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y116_quantidadesolicitada\"]:$this->y116_quantidadesolicitada);\n $this->y116_quantidadeLiberada = ($this->y116_quantidadeLiberada == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y116_quantidadeLiberada\"]:$this->y116_quantidadeLiberada);\n $this->y116_status = ($this->y116_status == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y116_status\"]:$this->y116_status);\n $this->y116_observacao = ($this->y116_observacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y116_observacao\"]:$this->y116_observacao);\n $this->y116_codigoaidof = ($this->y116_codigoaidof == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y116_codigoaidof\"]:$this->y116_codigoaidof);\n }else{\n $this->y116_id = ($this->y116_id == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y116_id\"]:$this->y116_id);\n }\n }", "title": "" }, { "docid": "c9b9966275eafd3b309c37af72c29ebf", "score": "0.54403794", "text": "public function setOverdues(){\n\n //data atual\n $now = now();\n\n //obtem as entradas não pagas\n $entries = BillEntry::whereIn('status', [\n 'pendent'\n ])->get();\n\n //obtem os boletos emitidos\n $bankSlips = BankSlip::whereIn('status', [\n 'pendent'\n ])->get();\n\n //atualiza as entradas\n if($entries and count($entries)){\n foreach ($entries as $entry){\n\n //pega o vencimento\n $due = $entry->due->format('Y-m-d');\n\n if($now->gt($due)){\n\n $entry->update([\n 'status' => 'overdue'\n ]);\n\n }\n }\n }\n\n //atualiza os boletos\n if(!empty($bankSlips)){\n foreach ($bankSlips as $bankSlip){\n\n //pega o vencimento do boelto\n $due = now($bankSlip->due)->format('Y-m-d');\n\n if($now->gt($due)){\n\n $bankSlip->update([\n 'status' => 'overdue'\n ]);\n\n }\n }\n }\n\n print \"success\";\n\n }", "title": "" }, { "docid": "f1c3991984cadb2432a9d1ebd675ff65", "score": "0.54374534", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->o150_sequencial = ($this->o150_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o150_sequencial\"]:$this->o150_sequencial);\n $this->o150_instit = ($this->o150_instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o150_instit\"]:$this->o150_instit);\n $this->o150_proximonumero = ($this->o150_proximonumero == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o150_proximonumero\"]:$this->o150_proximonumero);\n }else{\n $this->o150_sequencial = ($this->o150_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o150_sequencial\"]:$this->o150_sequencial);\n }\n }", "title": "" }, { "docid": "95c338c4a2c9739c95350915ec9250f8", "score": "0.542895", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed227_i_usuario = ($this->ed227_i_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed227_i_usuario\"]:$this->ed227_i_usuario);\n $this->ed227_i_alunopassagem = ($this->ed227_i_alunopassagem == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed227_i_alunopassagem\"]:$this->ed227_i_alunopassagem);\n $this->ed227_i_valorpassagem = ($this->ed227_i_valorpassagem == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed227_i_valorpassagem\"]:$this->ed227_i_valorpassagem);\n $this->ed227_i_qtde = ($this->ed227_i_qtde == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed227_i_qtde\"]:$this->ed227_i_qtde);\n if($this->ed227_d_datainicio == \"\"){\n $this->ed227_d_datainicio_dia = ($this->ed227_d_datainicio_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed227_d_datainicio_dia\"]:$this->ed227_d_datainicio_dia);\n $this->ed227_d_datainicio_mes = ($this->ed227_d_datainicio_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed227_d_datainicio_mes\"]:$this->ed227_d_datainicio_mes);\n $this->ed227_d_datainicio_ano = ($this->ed227_d_datainicio_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed227_d_datainicio_ano\"]:$this->ed227_d_datainicio_ano);\n if($this->ed227_d_datainicio_dia != \"\"){\n $this->ed227_d_datainicio = $this->ed227_d_datainicio_ano.\"-\".$this->ed227_d_datainicio_mes.\"-\".$this->ed227_d_datainicio_dia;\n }\n }\n if($this->ed227_d_datafim == \"\"){\n $this->ed227_d_datafim_dia = ($this->ed227_d_datafim_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed227_d_datafim_dia\"]:$this->ed227_d_datafim_dia);\n $this->ed227_d_datafim_mes = ($this->ed227_d_datafim_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed227_d_datafim_mes\"]:$this->ed227_d_datafim_mes);\n $this->ed227_d_datafim_ano = ($this->ed227_d_datafim_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed227_d_datafim_ano\"]:$this->ed227_d_datafim_ano);\n if($this->ed227_d_datafim_dia != \"\"){\n $this->ed227_d_datafim = $this->ed227_d_datafim_ano.\"-\".$this->ed227_d_datafim_mes.\"-\".$this->ed227_d_datafim_dia;\n }\n }\n if($this->ed227_d_datacad == \"\"){\n $this->ed227_d_datacad_dia = ($this->ed227_d_datacad_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed227_d_datacad_dia\"]:$this->ed227_d_datacad_dia);\n $this->ed227_d_datacad_mes = ($this->ed227_d_datacad_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed227_d_datacad_mes\"]:$this->ed227_d_datacad_mes);\n $this->ed227_d_datacad_ano = ($this->ed227_d_datacad_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed227_d_datacad_ano\"]:$this->ed227_d_datacad_ano);\n if($this->ed227_d_datacad_dia != \"\"){\n $this->ed227_d_datacad = $this->ed227_d_datacad_ano.\"-\".$this->ed227_d_datacad_mes.\"-\".$this->ed227_d_datacad_dia;\n }\n }\n $this->ed227_i_codigo = ($this->ed227_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed227_i_codigo\"]:$this->ed227_i_codigo);\n }else{\n $this->ed227_i_codigo = ($this->ed227_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed227_i_codigo\"]:$this->ed227_i_codigo);\n }\n }", "title": "" }, { "docid": "f098dc5fa8a3472d41d76b239114c5d5", "score": "0.54189014", "text": "function set_nuevo_acuedo_automat($condicion_post) {\n// echo\"<pre>\";print_r($condicion_post);exit;\n $this->conectar();\n\n // -------------------- datos de acuerdo segun fecha maxima ------------ \n $query1 = $this->consulta(\"SELECT * FROM\n acuerdos\n WHERE acuerdos.dnic='\" . $condicion_post['dni_a'] . \"'\n ORDER BY acuerdos.fecha_verificacion DESC\n LIMIT 1\");\n $datos1 = array();\n while ($row = mysql_fetch_array($query1)) {\n $datos1[] = $row;\n }\n // -------------------- la minima fecha para poder actualizar ------------ \n $query2 = $this->consulta(\"SELECT MIN(acuerdos.fecha_verificacion) as minfecha\n FROM\n acuerdos\n WHERE acuerdos.dnic='\" . $condicion_post['dni_a'] . \"' \");\n $datos2 = array();\n while ($row = mysql_fetch_array($query2)) {\n $datos2[] = $row;\n }\n // -------------------- contamos cuantos acuerdo tiene la persona ------------ \n $query3 = $this->consulta(\"SELECT COUNT(acuerdos.idacuerdos) as cont\n FROM\n acuerdos\n WHERE acuerdos.dnic='\" . $condicion_post['dni_a'] . \"' \");\n $datos3 = array();\n while ($row = mysql_fetch_array($query3)) {\n $datos3[] = $row;\n }\n $fe = $datos1[0]['fecha_verificacion'];\n if ($datos1[0]['frecuencia_msj'] == 'DIARIO') {\n $fe2 = date(\"Y-m-d\", strtotime($fe . \"+ 1 day\"));\n } elseif ($datos1[0]['frecuencia_msj'] == 'SEMANAL') {\n $fe2 = date(\"Y-m-d\", strtotime($fe . \"+ 1 week\"));\n } elseif ($datos1[0]['frecuencia_msj'] == 'QUINCENAL') {\n $fe2 = date(\"Y-m-d\", strtotime($fe . \"+ 15 day\"));\n } elseif ($datos1[0]['frecuencia_msj'] == 'MENSUAL') {\n $fe2 = date(\"Y-m-d\", strtotime($fe . \"+ 1 month\"));\n } else {\n echo \"<script>alert(NO APLICA PARA ACUERDOS)</script>\";\n }\n\n\n\n\n if ($datos3[0][cont] == 3) {\n // -------------------- ejecutamos la actualizacion ------------ \n $query = $this->consulta(\"UPDATE `acuerdos` SET `idpersonal`=\" . $_SESSION['idpersonal'] . \", `dnic`='\" . $condicion_post['dni_a'] . \"',\"\n . \"`dnip`='\" . $_SESSION['dnipersonal'] . \"',\"\n . \" `acuerdos`='\" . $datos1[0]['acuerdos'] . \"',\"\n . \" `fecha_verificacion`='\" . $fe2 . \"', `fecha_visita`='\" . $datos1[0]['fecha_verificacion'] . \"',\"\n . \"`calificacion`='', `frecuencia_msj`='\" . $datos1[0]['frecuencia_msj'] . \"', `hora`='\" . $datos1[0]['hora'] . \"',`pagoen`='\" . $datos1[0]['pagoen'] . \"',`fuente`='\" . $datos1[0]['fuente'] . \"'\"\n . \"WHERE (`dnic`='\" . $condicion_post['dni_a'] . \"' and `fecha_verificacion`='\" . $datos2[0]['minfecha'] . \"')\");\n } else {\n $query = $this->consulta(\"INSERT INTO `acuerdos` (`idpersonal`, `dnic`, `dnip`, `acuerdos`,`fecha_verificacion`,`fecha_visita`,`calificacion`,`frecuencia_msj`,`hora`,`pagoen`,`fuente`)\"\n . \" VALUES ('\" . $_SESSION['idpersonal'] . \"', '\" . $condicion_post['dni_a'] . \"',\"\n . \"'\" . $_SESSION['dnipersonal'] . \"',\"\n . \" '\" . utf8_decode($datos1[0]['acuerdos']) . \"',\"\n . \" '\" . $fe2 . \"', '\" . $datos1[0]['fecha_verificacion'] . \"',\"\n . \"'', '\" . $datos1[0]['frecuencia_msj'] . \"', '\" . $datos1[0]['hora'] . \"', '\" . $datos1[0]['pagoen'] . \"','\" . $datos1[0]['fuente'] . \"')\");\n }\n //----------------------------poner datos a la nueva tabla acuerdo_pago\n // -------------------- buscamos si el dni esta o no ------------ \n $querya_p1 = $this->consulta(\" SELECT\n COUNT(acuerdo_pago.dni) as midni\n FROM\n acuerdo_pago\n WHERE acuerdo_pago.dni='\" . $condicion_post['dni_a'] . \"' \");\n $datosa_p1 = array();\n while ($row = mysql_fetch_array($querya_p1)) {\n $datosa_p1[] = $row;\n }\n\n if ($datosa_p1[0]['midni'] == 1) {\n\n $query = $this->consulta(\" UPDATE `acuerdo_pago` SET `fecha_visita`='\" . $datos1[0]['fecha_verificacion'] . \"',\n `fecha_verif`='\" . $fe2 . \"', `acuerdo`='\" . $datos1[0]['acuerdos'] . \"',\n `fuente`='\" . $datos1[0]['fuente'] . \"', `frecuencia_msg`='\" . $datos1[0]['frecuencia_msj'] . \"',\n `hora`='\" . $datos1[0]['hora'] . \"', `pagoen`='\" . $datos1[0]['pagoen'] . \"' WHERE `dni`='\" . $condicion_post['dni_a'] . \"' \");\n } else {\n $query = $this->consulta(\"INSERT INTO `acuerdo_pago` (`dni`, `fecha_visita`, `fecha_verif`, `acuerdo`, `fuente`, `frecuencia_msg`, `hora`, `pagoen`)\n VALUES ('\" . $condicion_post['dni_a'] . \"' , '\" . $datos1[0]['fecha_verificacion'] . \"', '\" . $fe2 . \"', '\" . $datos1[0]['acuerdos'] . \"', '\" . $datos1[0]['fuente'] . \"', '\" . $datos1[0]['frecuencia_msj'] . \"', '\" . $datos1[0]['hora'] . \"','\" . $datos1[0]['pagoen'] . \"')\");\n }\n\n\n $this->disconnect();\n }", "title": "" }, { "docid": "0064a6e3d23d52e67dc7c06ebda8818a", "score": "0.5400106", "text": "public function cancelar_incidencia($incidencia){\n\n $sql = \"SELECT * FROM incidencias WHERE id_incidencia = \".$incidencia->id_incidencia .\" and (status_pds = 'En proceso' or status_pds='Alta realizada')\";\n $query = $this->db->query($sql);\n $aux = $query->row();\n if(!empty($aux)) {\n\n /*Desasignar el material de la incidencia para que pase a almacen de nuevo*/\n $almacen=true;\n $type_incidencia=$this->tienda_model->get_type_incidencia($incidencia->id_incidencia);\n if(strtolower($type_incidencia['title'])==strtolower(RAZON_PARADA))\n $almacen=false;\n // Borramos el material asignado\n if($almacen)\n $this->desasignar_material($incidencia->id_incidencia,\"todo\",$almacen);\n\n /*Ponemos la posición en Alta*/\n if(!empty($incidencia->id_devices_pds)) {\n $sql = \"UPDATE devices_pds SET status='Alta' WHERE id_devices_pds = \" . $incidencia->id_devices_pds;\n $query = $this->db->query($sql);\n }\n\n /*Actualizamos el estado de la incidencia*/\n $sql = \"UPDATE incidencias set status_pds='Cancelada' , status='Cancelada' where id_incidencia=\" . $incidencia->id_incidencia;\n $query = $this->db->query($sql);\n /**\n * Guardar incidcencia en el histórico\n */\n $data = array(\n 'fecha' => date('Y-m-d H:i:s'),\n 'id_incidencia' => $incidencia->id_incidencia,\n 'id_pds' => $incidencia->id_pds,\n 'description' => NULL,\n 'agent' => $this->session->userdata('sfid'),\n 'status_pds' => 'Cancelada',\n 'status' => 'Cancelada'\n );\n\n $this->tienda_model->historico($data);\n }else\n if($incidencia->status_pds=='En visita'){\n return -1;\n }else {\n if($incidencia->status_pds=='Finalizada'){\n return -2;\n }else\n return 0;\n }\n\n return $aux;\n }", "title": "" }, { "docid": "9fc9d4010e5b2de419e02f413fb80da4", "score": "0.53993106", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->cm33_sequencial = ($this->cm33_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm33_sequencial\"]:$this->cm33_sequencial);\n $this->cm33_processo = ($this->cm33_processo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm33_processo\"]:$this->cm33_processo);\n $this->cm33_sepultamento = ($this->cm33_sepultamento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm33_sepultamento\"]:$this->cm33_sepultamento);\n $this->cm33_isencao = ($this->cm33_isencao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm33_isencao\"]:$this->cm33_isencao);\n if($this->cm33_datalanc == \"\"){\n $this->cm33_datalanc_dia = ($this->cm33_datalanc_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm33_datalanc_dia\"]:$this->cm33_datalanc_dia);\n $this->cm33_datalanc_mes = ($this->cm33_datalanc_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm33_datalanc_mes\"]:$this->cm33_datalanc_mes);\n $this->cm33_datalanc_ano = ($this->cm33_datalanc_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm33_datalanc_ano\"]:$this->cm33_datalanc_ano);\n if($this->cm33_datalanc_dia != \"\"){\n $this->cm33_datalanc = $this->cm33_datalanc_ano.\"-\".$this->cm33_datalanc_mes.\"-\".$this->cm33_datalanc_dia;\n }\n }\n if($this->cm33_datainicio == \"\"){\n $this->cm33_datainicio_dia = ($this->cm33_datainicio_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm33_datainicio_dia\"]:$this->cm33_datainicio_dia);\n $this->cm33_datainicio_mes = ($this->cm33_datainicio_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm33_datainicio_mes\"]:$this->cm33_datainicio_mes);\n $this->cm33_datainicio_ano = ($this->cm33_datainicio_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm33_datainicio_ano\"]:$this->cm33_datainicio_ano);\n if($this->cm33_datainicio_dia != \"\"){\n $this->cm33_datainicio = $this->cm33_datainicio_ano.\"-\".$this->cm33_datainicio_mes.\"-\".$this->cm33_datainicio_dia;\n }\n }\n if($this->cm33_datafim == \"\"){\n $this->cm33_datafim_dia = ($this->cm33_datafim_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm33_datafim_dia\"]:$this->cm33_datafim_dia);\n $this->cm33_datafim_mes = ($this->cm33_datafim_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm33_datafim_mes\"]:$this->cm33_datafim_mes);\n $this->cm33_datafim_ano = ($this->cm33_datafim_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm33_datafim_ano\"]:$this->cm33_datafim_ano);\n if($this->cm33_datafim_dia != \"\"){\n $this->cm33_datafim = $this->cm33_datafim_ano.\"-\".$this->cm33_datafim_mes.\"-\".$this->cm33_datafim_dia;\n }\n }\n $this->cm33_percentual = ($this->cm33_percentual == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm33_percentual\"]:$this->cm33_percentual);\n $this->cm33_obs = ($this->cm33_obs == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm33_obs\"]:$this->cm33_obs);\n }else{\n $this->cm33_sequencial = ($this->cm33_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cm33_sequencial\"]:$this->cm33_sequencial);\n }\n }", "title": "" }, { "docid": "0ffefaa6958af84cf927650deb516729", "score": "0.53858745", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->am07_sequencial = ($this->am07_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"am07_sequencial\"]:$this->am07_sequencial);\n $this->am07_empreendimento = ($this->am07_empreendimento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"am07_empreendimento\"]:$this->am07_empreendimento);\n $this->am07_cgm = ($this->am07_cgm == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"am07_cgm\"]:$this->am07_cgm);\n }else{\n $this->am07_sequencial = ($this->am07_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"am07_sequencial\"]:$this->am07_sequencial);\n }\n }", "title": "" }, { "docid": "c64c99fed0c91fd7dede63174081f77d", "score": "0.53812844", "text": "function cambioStatusSuspenciones(){\n\t// para test puede pasar como parametro una fecha\n\t$clientes = getClientesDesactivarSuspension();\n\tif (!empty($clientes)) {\n\t\tforeach ($clientes as $key => $cliente) {\n\t\t\tupdateSuspensionOpcionesCliente($cliente->cliente_id, 0, 0);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "6993692b2d2aefa9ba5b3b36dc0314fc", "score": "0.5378831", "text": "public function ArmeTemporalSubCuentas($TipoReporte,$FechaFinal,$FechaInicial,$CentroCostos,$EmpresaPro,$Vector){\n \n $Condicion=\" WHERE Fecha<='$FechaFinal'\";\n if($CentroCostos<>\"ALL\"){\n $Condicion.=\" AND idCentroCosto='$CentroCostos'\";\n }\n if($EmpresaPro<>\"ALL\"){\n $Condicion.=\" AND idEmpresa='$EmpresaPro'\";\n }\n $Clase=0;\n $this->obCon->VaciarTabla(\"estadosfinancieros_mayor_temporal\");\n $sql=\"SELECT `CuentaPUC` AS Cuenta,NombreCuenta AS NombreCuenta ,sum(`Neto`) as TotalCuenta FROM `vista_estado_resultados_anio` $Condicion GROUP BY `CuentaPUC` ORDER BY `CuentaPUC`\";\n $Consulta=$this->obCon->Query($sql);\n \n while($DatosMayor=$this->obCon->FetchArray($Consulta)){\n if($DatosMayor[\"Cuenta\"]>0){\n $Cuenta=$DatosMayor[\"Cuenta\"];\n if($TipoReporte==\"Corte\"){\n $SaldoAnterior=0;\n }else{\n $SaldoAnterior=$this->obCon->Sume(\"vista_estado_resultados_anio\", \"Neto\", \"WHERE Fecha<'$FechaInicial' AND `CuentaPUC`='$Cuenta'\");\n }\n $Clase=substr($DatosMayor[\"Cuenta\"], 0, 1);\n //$DatosCuenta=$this->obCon->DevuelveValores(\"cuentas\", \"idPUC\", $DatosMayor[\"Cuenta\"]);\n $tab=\"estadosfinancieros_mayor_temporal\";\n $NumRegistros=7;\n $Columnas[0]=\"FechaCorte\"; $Valores[0]=$FechaFinal;\n $Columnas[1]=\"Clase\"; $Valores[1]=$Clase;\n $Columnas[2]=\"CuentaPUC\"; $Valores[2]=$DatosMayor[\"Cuenta\"];\n $Columnas[3]=\"NombreCuenta\"; $Valores[3]=$DatosMayor[\"NombreCuenta\"];\n $Columnas[4]=\"Neto\"; $Valores[4]=$DatosMayor[\"TotalCuenta\"]-$SaldoAnterior;\n $Columnas[5]=\"SaldoAnterior\"; $Valores[5]=$SaldoAnterior;\n $Columnas[6]=\"SaldoFinal\"; $Valores[6]=$DatosMayor[\"TotalCuenta\"];\n $this->obCon->InsertarRegistro($tab,$NumRegistros,$Columnas,$Valores);\n }\n }\n \n $Activos=$this->obCon->Sume(\"estadosfinancieros_mayor_temporal\", \"Neto\", \"WHERE Clase='1'\");\n $Pasivos=$this->obCon->Sume(\"estadosfinancieros_mayor_temporal\", \"Neto\", \"WHERE Clase='2'\");\n $Patrimonio=$this->obCon->Sume(\"estadosfinancieros_mayor_temporal\", \"Neto\", \"WHERE Clase='3'\");\n $Ingresos=$this->obCon->Sume(\"estadosfinancieros_mayor_temporal\", \"Neto\", \"WHERE Clase='4'\");\n $GastosOperativos=$this->obCon->Sume(\"estadosfinancieros_mayor_temporal\", \"Neto\", \"WHERE Clase='5'\");\n $CostosVentas=$this->obCon->Sume(\"estadosfinancieros_mayor_temporal\", \"Neto\", \"WHERE Clase='6'\");\n $CostosProduccion=$this->obCon->Sume(\"estadosfinancieros_mayor_temporal\", \"Neto\", \"WHERE Clase='7'\");\n \n $TotalClases[1]=$Activos;\n $TotalClases[2]=$Pasivos*(-1); //Es naturaleza credito por lo tanto debe multiplicarse por -1\n $TotalClases[3]=$Patrimonio*(-1);\n $TotalClases[4]=$Ingresos*(-1);\n $TotalClases[5]=$GastosOperativos;\n $TotalClases[6]=$CostosVentas;\n $TotalClases[7]=$CostosProduccion;\n $TotalClases[\"RE\"]=($TotalClases[1]-$TotalClases[2]-$TotalClases[3])*(-1);//resultado del ejercicio\n $TotalClases[\"UB\"]=$TotalClases[4]-$TotalClases[6]-$TotalClases[7];//Utilidad Bruta\n $TotalClases[\"UO\"]=$TotalClases[\"UB\"]-$TotalClases[5]; //Utilidad de la Operacion\n \n return($TotalClases);\n }", "title": "" }, { "docid": "5d41c08eb7b0183a4697a26d271d2146", "score": "0.5359171", "text": "function recalcularUnEstudiante()\n {\n $codEstudiante=$_REQUEST['codEstudiante'];\n $this->recalcularEstudiante($codEstudiante);\n $estudiantes=array($codEstudiante);\n $this->generarReporte($estudiantes);\n }", "title": "" }, { "docid": "25a78519c963c4f4216db1becae16268", "score": "0.535236", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->l19_sequencial = ($this->l19_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l19_sequencial\"]:$this->l19_sequencial);\n $this->l19_liclicitemorigem = ($this->l19_liclicitemorigem == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l19_liclicitemorigem\"]:$this->l19_liclicitemorigem);\n $this->l19_liclicitemreserva = ($this->l19_liclicitemreserva == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l19_liclicitemreserva\"]:$this->l19_liclicitemreserva);\n }else{\n $this->l19_sequencial = ($this->l19_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"l19_sequencial\"]:$this->l19_sequencial);\n }\n }", "title": "" }, { "docid": "aaa081ee86207fa381f7f72cbc255697", "score": "0.53495127", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->c75_codlan = ($this->c75_codlan == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c75_codlan\"]:$this->c75_codlan);\n $this->c75_numemp = ($this->c75_numemp == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c75_numemp\"]:$this->c75_numemp);\n if($this->c75_data == \"\"){\n $this->c75_data_dia = ($this->c75_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c75_data_dia\"]:$this->c75_data_dia);\n $this->c75_data_mes = ($this->c75_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c75_data_mes\"]:$this->c75_data_mes);\n $this->c75_data_ano = ($this->c75_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c75_data_ano\"]:$this->c75_data_ano);\n if($this->c75_data_dia != \"\"){\n $this->c75_data = $this->c75_data_ano.\"-\".$this->c75_data_mes.\"-\".$this->c75_data_dia;\n }\n }\n }else{\n $this->c75_codlan = ($this->c75_codlan == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c75_codlan\"]:$this->c75_codlan);\n }\n }", "title": "" }, { "docid": "d5acaf5204fd7d046f5f466971de45ba", "score": "0.5347442", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->sd27_i_codigo = ($this->sd27_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd27_i_codigo\"]:$this->sd27_i_codigo);\n $this->sd27_i_rhcbo = ($this->sd27_i_rhcbo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd27_i_rhcbo\"]:$this->sd27_i_rhcbo);\n $this->sd27_i_undmed = ($this->sd27_i_undmed == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd27_i_undmed\"]:$this->sd27_i_undmed);\n $this->sd27_b_principal = ($this->sd27_b_principal == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd27_b_principal\"]:$this->sd27_b_principal);\n $this->sd27_c_situacao = ($this->sd27_c_situacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd27_c_situacao\"]:$this->sd27_c_situacao);\n }else{\n $this->sd27_i_codigo = ($this->sd27_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd27_i_codigo\"]:$this->sd27_i_codigo);\n }\n }", "title": "" }, { "docid": "5bf0646f45d4e2d741f6c1ae92e7fa1c", "score": "0.5346015", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->q53_sequencial = ($this->q53_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q53_sequencial\"]:$this->q53_sequencial);\n $this->q53_issnotaavulsa = ($this->q53_issnotaavulsa == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q53_issnotaavulsa\"]:$this->q53_issnotaavulsa);\n if($this->q53_dtservico == \"\"){\n $this->q53_dtservico_dia = ($this->q53_dtservico_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q53_dtservico_dia\"]:$this->q53_dtservico_dia);\n $this->q53_dtservico_mes = ($this->q53_dtservico_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q53_dtservico_mes\"]:$this->q53_dtservico_mes);\n $this->q53_dtservico_ano = ($this->q53_dtservico_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q53_dtservico_ano\"]:$this->q53_dtservico_ano);\n if($this->q53_dtservico_dia != \"\"){\n $this->q53_dtservico = $this->q53_dtservico_ano.\"-\".$this->q53_dtservico_mes.\"-\".$this->q53_dtservico_dia;\n }\n }\n }else{\n $this->q53_sequencial = ($this->q53_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q53_sequencial\"]:$this->q53_sequencial);\n }\n }", "title": "" }, { "docid": "9eae63cca6fd3d90a99095837bbcab16", "score": "0.53352535", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed121_sequencial = ($this->ed121_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed121_sequencial\"]:$this->ed121_sequencial);\n $this->ed121_progressaoparcialalunomatricula = ($this->ed121_progressaoparcialalunomatricula == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed121_progressaoparcialalunomatricula\"]:$this->ed121_progressaoparcialalunomatricula);\n $this->ed121_nota = ($this->ed121_nota === \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed121_nota\"]:$this->ed121_nota);\n $this->ed121_faltas = ($this->ed121_faltas == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed121_faltas\"]:$this->ed121_faltas);\n $this->ed121_resultadofinal = ($this->ed121_resultadofinal == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed121_resultadofinal\"]:$this->ed121_resultadofinal);\n }else{\n $this->ed121_sequencial = ($this->ed121_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed121_sequencial\"]:$this->ed121_sequencial);\n }\n }", "title": "" }, { "docid": "3a71453e053008c5e28956a849720d6e", "score": "0.532529", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->k00_numcgm = ($this->k00_numcgm == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_numcgm\"]:$this->k00_numcgm);\n if($this->k00_dtoper == \"\"){\n $this->k00_dtoper_dia = ($this->k00_dtoper_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_dtoper_dia\"]:$this->k00_dtoper_dia);\n $this->k00_dtoper_mes = ($this->k00_dtoper_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_dtoper_mes\"]:$this->k00_dtoper_mes);\n $this->k00_dtoper_ano = ($this->k00_dtoper_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_dtoper_ano\"]:$this->k00_dtoper_ano);\n if($this->k00_dtoper_dia != \"\"){\n $this->k00_dtoper = $this->k00_dtoper_ano.\"-\".$this->k00_dtoper_mes.\"-\".$this->k00_dtoper_dia;\n }\n }\n $this->k00_receit = ($this->k00_receit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_receit\"]:$this->k00_receit);\n $this->k00_hist = ($this->k00_hist == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_hist\"]:$this->k00_hist);\n $this->k00_valor = ($this->k00_valor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_valor\"]:$this->k00_valor);\n if($this->k00_dtvenc == \"\"){\n $this->k00_dtvenc_dia = ($this->k00_dtvenc_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_dtvenc_dia\"]:$this->k00_dtvenc_dia);\n $this->k00_dtvenc_mes = ($this->k00_dtvenc_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_dtvenc_mes\"]:$this->k00_dtvenc_mes);\n $this->k00_dtvenc_ano = ($this->k00_dtvenc_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_dtvenc_ano\"]:$this->k00_dtvenc_ano);\n if($this->k00_dtvenc_dia != \"\"){\n $this->k00_dtvenc = $this->k00_dtvenc_ano.\"-\".$this->k00_dtvenc_mes.\"-\".$this->k00_dtvenc_dia;\n }\n }\n $this->k00_numpre = ($this->k00_numpre == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_numpre\"]:$this->k00_numpre);\n $this->k00_numpar = ($this->k00_numpar == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_numpar\"]:$this->k00_numpar);\n $this->k00_numtot = ($this->k00_numtot == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_numtot\"]:$this->k00_numtot);\n $this->k00_numdig = ($this->k00_numdig == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_numdig\"]:$this->k00_numdig);\n $this->k00_conta = ($this->k00_conta == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_conta\"]:$this->k00_conta);\n if($this->k00_dtpaga == \"\"){\n $this->k00_dtpaga_dia = ($this->k00_dtpaga_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_dtpaga_dia\"]:$this->k00_dtpaga_dia);\n $this->k00_dtpaga_mes = ($this->k00_dtpaga_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_dtpaga_mes\"]:$this->k00_dtpaga_mes);\n $this->k00_dtpaga_ano = ($this->k00_dtpaga_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_dtpaga_ano\"]:$this->k00_dtpaga_ano);\n if($this->k00_dtpaga_dia != \"\"){\n $this->k00_dtpaga = $this->k00_dtpaga_ano.\"-\".$this->k00_dtpaga_mes.\"-\".$this->k00_dtpaga_dia;\n }\n }\n }else{\n }\n }", "title": "" }, { "docid": "10c0f12273ae54873a255f9d1012fe21", "score": "0.53250974", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->sd108_sequencial = ($this->sd108_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd108_sequencial\"]:$this->sd108_sequencial);\n $this->sd108_cgs_und = ($this->sd108_cgs_und == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd108_cgs_und\"]:$this->sd108_cgs_und);\n $this->sd108_caddocumento = ($this->sd108_caddocumento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd108_caddocumento\"]:$this->sd108_caddocumento);\n }else{\n }\n }", "title": "" }, { "docid": "a2be69077e22f2a9847de099aa1f744f", "score": "0.5324879", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->me14_i_codigo = ($this->me14_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me14_i_codigo\"]:$this->me14_i_codigo);\n $this->me14_f_peso = ($this->me14_f_peso == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me14_f_peso\"]:$this->me14_f_peso);\n $this->me14_f_altura = ($this->me14_f_altura == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me14_f_altura\"]:$this->me14_f_altura);\n $this->me14_i_aluno = ($this->me14_i_aluno == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me14_i_aluno\"]:$this->me14_i_aluno);\n $this->me14_i_ano = ($this->me14_i_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me14_i_ano\"]:$this->me14_i_ano);\n $this->me14_i_mes = ($this->me14_i_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me14_i_mes\"]:$this->me14_i_mes);\n $this->me14_i_periodocalendario = ($this->me14_i_periodocalendario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me14_i_periodocalendario\"]:$this->me14_i_periodocalendario);\n if($this->me14_d_data == \"\"){\n $this->me14_d_data_dia = ($this->me14_d_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me14_d_data_dia\"]:$this->me14_d_data_dia);\n $this->me14_d_data_mes = ($this->me14_d_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me14_d_data_mes\"]:$this->me14_d_data_mes);\n $this->me14_d_data_ano = ($this->me14_d_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me14_d_data_ano\"]:$this->me14_d_data_ano);\n if($this->me14_d_data_dia != \"\"){\n $this->me14_d_data = $this->me14_d_data_ano.\"-\".$this->me14_d_data_mes.\"-\".$this->me14_d_data_dia;\n }\n }\n }else{\n $this->me14_i_codigo = ($this->me14_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"me14_i_codigo\"]:$this->me14_i_codigo);\n }\n }", "title": "" }, { "docid": "927f8684ea4e8d3764c668a48b278cb8", "score": "0.5318181", "text": "public function contar_anuncios_provincia_excepto() {\n\t\t$barcelona = 8;\n\t\t$madrid = 28;\n\t\t$vizcaya = 48;\n $data = array();\n\t\t$res_1 = mysql_query(\"SELECT COUNT(*) FROM anuncios WHERE activo = 1 AND ((provincia <> \" . $barcelona . \" AND provincia <> \" . $madrid . \" AND provincia <> \" . $vizcaya . \") OR \" . $this->get_todas_las_provincias_condition() . \") order by timestamp DESC\");\n\n $row_1 = mysql_fetch_array($res_1);\n\n $res_2 = mysql_query(\"SELECT COUNT(*) FROM anuncios WHERE activo = 1 AND provincia = 0 order by timestamp DESC\");\n\n $row_2 = mysql_fetch_array($res_2);\n\n return $row_1[0] + $row_2[0];\n }", "title": "" }, { "docid": "90e458cde45ef685702bc838afc5e3fc", "score": "0.5315764", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->q02_inscr = ($this->q02_inscr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_inscr\"]:$this->q02_inscr);\n $this->q02_numcgm = ($this->q02_numcgm == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_numcgm\"]:$this->q02_numcgm);\n $this->q02_memo = ($this->q02_memo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_memo\"]:$this->q02_memo);\n $this->q02_tiplic = ($this->q02_tiplic == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_tiplic\"]:$this->q02_tiplic);\n $this->q02_fanta = ($this->q02_fanta == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_fanta\"]:$this->q02_fanta);\n $this->q02_regjuc = ($this->q02_regjuc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_regjuc\"]:$this->q02_regjuc);\n $this->q02_inscmu = ($this->q02_inscmu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_inscmu\"]:$this->q02_inscmu);\n $this->q02_obs = ($this->q02_obs == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_obs\"]:$this->q02_obs);\n if($this->q02_dtcada == \"\"){\n $this->q02_dtcada_dia = ($this->q02_dtcada_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_dtcada_dia\"]:$this->q02_dtcada_dia);\n $this->q02_dtcada_mes = ($this->q02_dtcada_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_dtcada_mes\"]:$this->q02_dtcada_mes);\n $this->q02_dtcada_ano = ($this->q02_dtcada_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_dtcada_ano\"]:$this->q02_dtcada_ano);\n if($this->q02_dtcada_dia != \"\"){\n $this->q02_dtcada = $this->q02_dtcada_ano.\"-\".$this->q02_dtcada_mes.\"-\".$this->q02_dtcada_dia;\n }\n }\n if($this->q02_dtinic == \"\"){\n $this->q02_dtinic_dia = ($this->q02_dtinic_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_dtinic_dia\"]:$this->q02_dtinic_dia);\n $this->q02_dtinic_mes = ($this->q02_dtinic_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_dtinic_mes\"]:$this->q02_dtinic_mes);\n $this->q02_dtinic_ano = ($this->q02_dtinic_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_dtinic_ano\"]:$this->q02_dtinic_ano);\n if($this->q02_dtinic_dia != \"\"){\n $this->q02_dtinic = $this->q02_dtinic_ano.\"-\".$this->q02_dtinic_mes.\"-\".$this->q02_dtinic_dia;\n }\n }\n if($this->q02_dtbaix == \"\"){\n $this->q02_dtbaix_dia = ($this->q02_dtbaix_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_dtbaix_dia\"]:$this->q02_dtbaix_dia);\n $this->q02_dtbaix_mes = ($this->q02_dtbaix_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_dtbaix_mes\"]:$this->q02_dtbaix_mes);\n $this->q02_dtbaix_ano = ($this->q02_dtbaix_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_dtbaix_ano\"]:$this->q02_dtbaix_ano);\n if($this->q02_dtbaix_dia != \"\"){\n $this->q02_dtbaix = $this->q02_dtbaix_ano.\"-\".$this->q02_dtbaix_mes.\"-\".$this->q02_dtbaix_dia;\n }\n }\n $this->q02_capit = ($this->q02_capit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_capit\"]:$this->q02_capit);\n $this->q02_cep = ($this->q02_cep == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_cep\"]:$this->q02_cep);\n }else{\n $this->q02_inscr = ($this->q02_inscr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q02_inscr\"]:$this->q02_inscr);\n }\n }", "title": "" }, { "docid": "94bf7501a0b2eab3b6081f3d6063850e", "score": "0.53134274", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->tr11_id = ($this->tr11_id == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr11_id\"]:$this->tr11_id);\n $this->tr11_idveiculo = ($this->tr11_idveiculo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr11_idveiculo\"]:$this->tr11_idveiculo);\n if($this->tr11_dtnasc == \"\"){\n $this->tr11_dtnasc_dia = ($this->tr11_dtnasc_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr11_dtnasc_dia\"]:$this->tr11_dtnasc_dia);\n $this->tr11_dtnasc_mes = ($this->tr11_dtnasc_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr11_dtnasc_mes\"]:$this->tr11_dtnasc_mes);\n $this->tr11_dtnasc_ano = ($this->tr11_dtnasc_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr11_dtnasc_ano\"]:$this->tr11_dtnasc_ano);\n if($this->tr11_dtnasc_dia != \"\"){\n $this->tr11_dtnasc = $this->tr11_dtnasc_ano.\"-\".$this->tr11_dtnasc_mes.\"-\".$this->tr11_dtnasc_dia;\n }\n }\n $this->tr11_idhabilitacao = ($this->tr11_idhabilitacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr11_idhabilitacao\"]:$this->tr11_idhabilitacao);\n $this->tr11_sexo = ($this->tr11_sexo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr11_sexo\"]:$this->tr11_sexo);\n }else{\n $this->tr11_id = ($this->tr11_id == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr11_id\"]:$this->tr11_id);\n }\n }", "title": "" }, { "docid": "335cca059441e16a928577cb44fcbfaa", "score": "0.5307414", "text": "function aplicarAcuerdo2011004(){\n\n\t\t$vecesMotivo1=0;\n\t\t$vecesMotivo2=0;\n $tres=0;\n if ($this->estadoEstudiante=='A'||$this->estadoEstudiante=='B')\n {\n $this->estadoEstudiante='B';\n }else\n {\n $this->estadoEstudiante='J';\n }\n if(isset($this->estudiantesPrueba[$this->codigoEstudiante]))\n {\n foreach($this->estudiantesPrueba[$this->codigoEstudiante] as $anioperiodo=>$motivo)\n {\n if($motivo['PROMEDIO'][0]<320&&$anioperiodo>20111)\n {\n $vecesMotivo1++;\n }\n if(strpos($motivo['MOTIVO'][0],'2')!== false&&$anioperiodo>20111)\n {\n $vecesMotivo2++;\n }\n }\n }\n\t\tif(($vecesMotivo1>=4)||($vecesMotivo2>=4)){\n\t\t\t$this->estadoEstudiante='U';\n if($vecesMotivo1>=4)\n {$this->causal+=100;}\n if($vecesMotivo2>=4)\n {$this->causal+=20;}\n\t\t}\n\t\tif(isset($this->EspacioPerdidoMotivoPrueba[$this->codigoEstudiante]))\n {\n foreach($this->EspacioPerdidoMotivoPrueba[$this->codigoEstudiante] as $clave=>$numeroVeces)\n {\n //se busca el total de veces q tiene espacio perdido en todos los periodos incluido el actual\n if($numeroVeces==3)\n {\n $setenta=$this->validarSetentaPorciento($this->codigoEstudiante);\n if(!$setenta)\n {\n $this->estadoEstudiante='U';\n $tres++;\n }\n }elseif($numeroVeces>=4)\n {\n $this->estadoEstudiante='U';\n $tres++;\n }\n }\n }\n if($tres>0){$this->causal+=3;}\n if($this->renovaciones=='ok')\n {\n \n }else\n {\n $this->causal+=5000;\n $this->estadoEstudiante='U';\n }\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d13d4cf2ba19c507138fce83ab0328cd", "score": "0.5300472", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed127_i_codigo = ($this->ed127_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed127_i_codigo\"]:$this->ed127_i_codigo);\n $this->ed127_i_progmatricula = ($this->ed127_i_progmatricula == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed127_i_progmatricula\"]:$this->ed127_i_progmatricula);\n $this->ed127_i_usuario = ($this->ed127_i_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed127_i_usuario\"]:$this->ed127_i_usuario);\n if($this->ed127_d_data == \"\"){\n $this->ed127_d_data_dia = ($this->ed127_d_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed127_d_data_dia\"]:$this->ed127_d_data_dia);\n $this->ed127_d_data_mes = ($this->ed127_d_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed127_d_data_mes\"]:$this->ed127_d_data_mes);\n $this->ed127_d_data_ano = ($this->ed127_d_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed127_d_data_ano\"]:$this->ed127_d_data_ano);\n if($this->ed127_d_data_dia != \"\"){\n $this->ed127_d_data = $this->ed127_d_data_ano.\"-\".$this->ed127_d_data_mes.\"-\".$this->ed127_d_data_dia;\n }\n }\n $this->ed127_i_ano = ($this->ed127_i_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed127_i_ano\"]:$this->ed127_i_ano);\n $this->ed127_i_nconvoca = ($this->ed127_i_nconvoca == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed127_i_nconvoca\"]:$this->ed127_i_nconvoca);\n $this->ed127_i_nparticipa = ($this->ed127_i_nparticipa == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed127_i_nparticipa\"]:$this->ed127_i_nparticipa);\n $this->ed127_i_nfaltajust = ($this->ed127_i_nfaltajust == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed127_i_nfaltajust\"]:$this->ed127_i_nfaltajust);\n $this->ed127_i_nfaltanjust = ($this->ed127_i_nfaltanjust == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed127_i_nfaltanjust\"]:$this->ed127_i_nfaltanjust);\n }else{\n $this->ed127_i_codigo = ($this->ed127_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed127_i_codigo\"]:$this->ed127_i_codigo);\n }\n }", "title": "" }, { "docid": "c1ef7f2e78c251111a58f56d1136884b", "score": "0.52997774", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->c24_sequencial = ($this->c24_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c24_sequencial\"]:$this->c24_sequencial);\n $this->c24_codigo = ($this->c24_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c24_codigo\"]:$this->c24_codigo);\n $this->c24_descricao = ($this->c24_descricao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c24_descricao\"]:$this->c24_descricao);\n }else{\n $this->c24_sequencial = ($this->c24_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c24_sequencial\"]:$this->c24_sequencial);\n }\n }", "title": "" }, { "docid": "27492929f54af0f9312a538b109f9e11", "score": "0.52893144", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed136_sequencial = ($this->ed136_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed136_sequencial\"]:$this->ed136_sequencial);\n $this->ed136_diario = ($this->ed136_diario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed136_diario\"]:$this->ed136_diario);\n $this->ed136_procavalalternativa = ($this->ed136_procavalalternativa == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed136_procavalalternativa\"]:$this->ed136_procavalalternativa);\n }else{\n $this->ed136_sequencial = ($this->ed136_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed136_sequencial\"]:$this->ed136_sequencial);\n }\n }", "title": "" }, { "docid": "360fea7bc7c58cce5f2c24564064c06d", "score": "0.52849907", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->rh172_sequencial = ($this->rh172_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh172_sequencial\"]:$this->rh172_sequencial);\n $this->rh172_tipoasse = ($this->rh172_tipoasse == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh172_tipoasse\"]:$this->rh172_tipoasse);\n $this->rh172_rubricaprevidencia = ($this->rh172_rubricaprevidencia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh172_rubricaprevidencia\"]:$this->rh172_rubricaprevidencia);\n $this->rh172_rubricaprovento = ($this->rh172_rubricaprovento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh172_rubricaprovento\"]:$this->rh172_rubricaprovento);\n $this->rh172_rubricapensao = ($this->rh172_rubricapensao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh172_rubricapensao\"]:$this->rh172_rubricapensao);\n $this->rh172_rubricairrf = ($this->rh172_rubricairrf == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh172_rubricairrf\"]:$this->rh172_rubricairrf);\n $this->rh172_rubricaparceladeducao = ($this->rh172_rubricaparceladeducao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh172_rubricaparceladeducao\"]:$this->rh172_rubricaparceladeducao);\n $this->rh172_instit = ($this->rh172_instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh172_instit\"]:$this->rh172_instit);\n $this->rh172_rubricamolestia = ($this->rh172_rubricamolestia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh172_rubricamolestia\"]:$this->rh172_rubricamolestia);\n }else{\n $this->rh172_sequencial = ($this->rh172_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh172_sequencial\"]:$this->rh172_sequencial);\n }\n }", "title": "" }, { "docid": "e7057043bec2dbbd79de0e0bd6ff927f", "score": "0.5276291", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->rh110_sequencial = ($this->rh110_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_sequencial\"]:$this->rh110_sequencial);\n $this->rh110_rhferias = ($this->rh110_rhferias == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_rhferias\"]:$this->rh110_rhferias);\n $this->rh110_dias = ($this->rh110_dias == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_dias\"]:$this->rh110_dias);\n if($this->rh110_datainicial == \"\"){\n $this->rh110_datainicial_dia = ($this->rh110_datainicial_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_datainicial_dia\"]:$this->rh110_datainicial_dia);\n $this->rh110_datainicial_mes = ($this->rh110_datainicial_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_datainicial_mes\"]:$this->rh110_datainicial_mes);\n $this->rh110_datainicial_ano = ($this->rh110_datainicial_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_datainicial_ano\"]:$this->rh110_datainicial_ano);\n if($this->rh110_datainicial_dia != \"\"){\n $this->rh110_datainicial = $this->rh110_datainicial_ano.\"-\".$this->rh110_datainicial_mes.\"-\".$this->rh110_datainicial_dia;\n }\n }\n if($this->rh110_datafinal == \"\"){\n $this->rh110_datafinal_dia = ($this->rh110_datafinal_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_datafinal_dia\"]:$this->rh110_datafinal_dia);\n $this->rh110_datafinal_mes = ($this->rh110_datafinal_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_datafinal_mes\"]:$this->rh110_datafinal_mes);\n $this->rh110_datafinal_ano = ($this->rh110_datafinal_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_datafinal_ano\"]:$this->rh110_datafinal_ano);\n if($this->rh110_datafinal_dia != \"\"){\n $this->rh110_datafinal = $this->rh110_datafinal_ano.\"-\".$this->rh110_datafinal_mes.\"-\".$this->rh110_datafinal_dia;\n }\n }\n $this->rh110_observacao = ($this->rh110_observacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_observacao\"]:$this->rh110_observacao);\n $this->rh110_anopagamento = ($this->rh110_anopagamento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_anopagamento\"]:$this->rh110_anopagamento);\n $this->rh110_mespagamento = ($this->rh110_mespagamento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_mespagamento\"]:$this->rh110_mespagamento);\n $this->rh110_diasabono = ($this->rh110_diasabono == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_diasabono\"]:$this->rh110_diasabono);\n $this->rh110_pagaterco = ($this->rh110_pagaterco == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_pagaterco\"]:$this->rh110_pagaterco);\n $this->rh110_tipoponto = ($this->rh110_tipoponto == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_tipoponto\"]:$this->rh110_tipoponto);\n if($this->rh110_periodoespecificoinicial == \"\"){\n $this->rh110_periodoespecificoinicial_dia = ($this->rh110_periodoespecificoinicial_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_periodoespecificoinicial_dia\"]:$this->rh110_periodoespecificoinicial_dia);\n $this->rh110_periodoespecificoinicial_mes = ($this->rh110_periodoespecificoinicial_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_periodoespecificoinicial_mes\"]:$this->rh110_periodoespecificoinicial_mes);\n $this->rh110_periodoespecificoinicial_ano = ($this->rh110_periodoespecificoinicial_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_periodoespecificoinicial_ano\"]:$this->rh110_periodoespecificoinicial_ano);\n if($this->rh110_periodoespecificoinicial_dia != \"\"){\n $this->rh110_periodoespecificoinicial = $this->rh110_periodoespecificoinicial_ano.\"-\".$this->rh110_periodoespecificoinicial_mes.\"-\".$this->rh110_periodoespecificoinicial_dia;\n }\n }\n if($this->rh110_periodoespecificofinal == \"\"){\n $this->rh110_periodoespecificofinal_dia = ($this->rh110_periodoespecificofinal_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_periodoespecificofinal_dia\"]:$this->rh110_periodoespecificofinal_dia);\n $this->rh110_periodoespecificofinal_mes = ($this->rh110_periodoespecificofinal_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_periodoespecificofinal_mes\"]:$this->rh110_periodoespecificofinal_mes);\n $this->rh110_periodoespecificofinal_ano = ($this->rh110_periodoespecificofinal_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_periodoespecificofinal_ano\"]:$this->rh110_periodoespecificofinal_ano);\n if($this->rh110_periodoespecificofinal_dia != \"\"){\n $this->rh110_periodoespecificofinal = $this->rh110_periodoespecificofinal_ano.\"-\".$this->rh110_periodoespecificofinal_mes.\"-\".$this->rh110_periodoespecificofinal_dia;\n }\n }\n $this->rh110_situacao = ($this->rh110_situacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_situacao\"]:$this->rh110_situacao);\n }else{\n $this->rh110_sequencial = ($this->rh110_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh110_sequencial\"]:$this->rh110_sequencial);\n }\n }", "title": "" }, { "docid": "aa970e3e44c66ed1843949e719557b8e", "score": "0.5271199", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->as04_sequencial = ($this->as04_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as04_sequencial\"]:$this->as04_sequencial);\n if($this->as04_dataentrevista == \"\"){\n $this->as04_dataentrevista_dia = ($this->as04_dataentrevista_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as04_dataentrevista_dia\"]:$this->as04_dataentrevista_dia);\n $this->as04_dataentrevista_mes = ($this->as04_dataentrevista_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as04_dataentrevista_mes\"]:$this->as04_dataentrevista_mes);\n $this->as04_dataentrevista_ano = ($this->as04_dataentrevista_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as04_dataentrevista_ano\"]:$this->as04_dataentrevista_ano);\n if($this->as04_dataentrevista_dia != \"\"){\n $this->as04_dataentrevista = $this->as04_dataentrevista_ano.\"-\".$this->as04_dataentrevista_mes.\"-\".$this->as04_dataentrevista_dia;\n }\n }\n $this->as04_rendafamiliar = ($this->as04_rendafamiliar == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as04_rendafamiliar\"]:$this->as04_rendafamiliar);\n if($this->as04_dataatualizacao == \"\"){\n $this->as04_dataatualizacao_dia = ($this->as04_dataatualizacao_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as04_dataatualizacao_dia\"]:$this->as04_dataatualizacao_dia);\n $this->as04_dataatualizacao_mes = ($this->as04_dataatualizacao_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as04_dataatualizacao_mes\"]:$this->as04_dataatualizacao_mes);\n $this->as04_dataatualizacao_ano = ($this->as04_dataatualizacao_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as04_dataatualizacao_ano\"]:$this->as04_dataatualizacao_ano);\n if($this->as04_dataatualizacao_dia != \"\"){\n $this->as04_dataatualizacao = $this->as04_dataatualizacao_ano.\"-\".$this->as04_dataatualizacao_mes.\"-\".$this->as04_dataatualizacao_dia;\n }\n }\n $this->as04_aparelhoeletricocontinuo = ($this->as04_aparelhoeletricocontinuo == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as04_aparelhoeletricocontinuo\"]:$this->as04_aparelhoeletricocontinuo);\n }else{\n $this->as04_sequencial = ($this->as04_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"as04_sequencial\"]:$this->as04_sequencial);\n }\n }", "title": "" }, { "docid": "28fc68fdb46bbcc94809bf01a6226c0d", "score": "0.5270193", "text": "function atualizacampos($exclusao = false) {\n\n if ($exclusao == false) {\n $this->k00_numpre = ($this->k00_numpre == \"\" ? @$GLOBALS [\"HTTP_POST_VARS\"] [\"k00_numpre\"] : $this->k00_numpre);\n $this->k00_inscr = ($this->k00_inscr == \"\" ? @$GLOBALS [\"HTTP_POST_VARS\"] [\"k00_inscr\"] : $this->k00_inscr);\n $this->k00_perc = ($this->k00_perc == \"\" ? @$GLOBALS [\"HTTP_POST_VARS\"] [\"k00_perc\"] : $this->k00_perc);\n } else {\n $this->k00_numpre = ($this->k00_numpre == \"\" ? @$GLOBALS [\"HTTP_POST_VARS\"] [\"k00_numpre\"] : $this->k00_numpre);\n $this->k00_inscr = ($this->k00_inscr == \"\" ? @$GLOBALS [\"HTTP_POST_VARS\"] [\"k00_inscr\"] : $this->k00_inscr);\n }\n }", "title": "" }, { "docid": "73ed30ed187222a7a9e4f381e2e4206b", "score": "0.52649915", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->rh203_sequencial = ($this->rh203_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh203_sequencial\"]:$this->rh203_sequencial);\n $this->rh203_rhdirfgeracaopessoalpensionista = ($this->rh203_rhdirfgeracaopessoalpensionista == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh203_rhdirfgeracaopessoalpensionista\"]:$this->rh203_rhdirfgeracaopessoalpensionista);\n $this->rh203_rhdirfgeracaodadospessoalvalor = ($this->rh203_rhdirfgeracaodadospessoalvalor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh203_rhdirfgeracaodadospessoalvalor\"]:$this->rh203_rhdirfgeracaodadospessoalvalor);\n }else{\n $this->rh203_sequencial = ($this->rh203_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh203_sequencial\"]:$this->rh203_sequencial);\n }\n }", "title": "" }, { "docid": "892baa33082db591709423424e76e9e4", "score": "0.52479994", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->t63_codcor = ($this->t63_codcor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"t63_codcor\"]:$this->t63_codcor);\n $this->t63_codbem = ($this->t63_codbem == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"t63_codbem\"]:$this->t63_codbem);\n $this->t63_valcor = ($this->t63_valcor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"t63_valcor\"]:$this->t63_valcor);\n $this->t63_deprec = ($this->t63_deprec == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"t63_deprec\"]:$this->t63_deprec);\n }else{\n $this->t63_codcor = ($this->t63_codcor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"t63_codcor\"]:$this->t63_codcor);\n $this->t63_codbem = ($this->t63_codbem == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"t63_codbem\"]:$this->t63_codbem);\n }\n }", "title": "" }, { "docid": "cdd07e2d1be3f606c27c15636dbb2594", "score": "0.52371883", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->sd10_i_procedimento = ($this->sd10_i_procedimento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_i_procedimento\"]:$this->sd10_i_procedimento);\n $this->sd10_c_sala = ($this->sd10_c_sala == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_c_sala\"]:$this->sd10_c_sala);\n $this->sd10_f_valor = ($this->sd10_f_valor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_f_valor\"]:$this->sd10_f_valor);\n $this->sd10_f_servico = ($this->sd10_f_servico == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_f_servico\"]:$this->sd10_f_servico);\n $this->sd10_f_anestesia = ($this->sd10_f_anestesia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_f_anestesia\"]:$this->sd10_f_anestesia);\n $this->sd10_f_material = ($this->sd10_f_material == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_f_material\"]:$this->sd10_f_material);\n $this->sd10_f_contraste = ($this->sd10_f_contraste == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_f_contraste\"]:$this->sd10_f_contraste);\n $this->sd10_f_filme = ($this->sd10_f_filme == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_f_filme\"]:$this->sd10_f_filme);\n $this->sd10_f_gesso = ($this->sd10_f_gesso == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_f_gesso\"]:$this->sd10_f_gesso);\n $this->sd10_f_quimio = ($this->sd10_f_quimio == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_f_quimio\"]:$this->sd10_f_quimio);\n $this->sd10_f_dialise = ($this->sd10_f_dialise == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_f_dialise\"]:$this->sd10_f_dialise);\n $this->sd10_f_sadtrat = ($this->sd10_f_sadtrat == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_f_sadtrat\"]:$this->sd10_f_sadtrat);\n $this->sd10_f_sadtpc = ($this->sd10_f_sadtpc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_f_sadtpc\"]:$this->sd10_f_sadtpc);\n $this->sd10_f_sadtout = ($this->sd10_f_sadtout == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_f_sadtout\"]:$this->sd10_f_sadtout);\n $this->sd10_f_outro = ($this->sd10_f_outro == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_f_outro\"]:$this->sd10_f_outro);\n $this->sd10_f_filme2 = ($this->sd10_f_filme2 == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_f_filme2\"]:$this->sd10_f_filme2);\n $this->sd10_f_total = ($this->sd10_f_total == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_f_total\"]:$this->sd10_f_total);\n }else{\n $this->sd10_i_procedimento = ($this->sd10_i_procedimento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"sd10_i_procedimento\"]:$this->sd10_i_procedimento);\n }\n }", "title": "" }, { "docid": "b1fba195bf602eab29e6ed292746a036", "score": "0.5217787", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->q01_anousu = ($this->q01_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q01_anousu\"]:$this->q01_anousu);\n $this->q01_inscr = ($this->q01_inscr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q01_inscr\"]:$this->q01_inscr);\n $this->q01_cadcal = ($this->q01_cadcal == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q01_cadcal\"]:$this->q01_cadcal);\n $this->q01_recei = ($this->q01_recei == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q01_recei\"]:$this->q01_recei);\n $this->q01_numpre = ($this->q01_numpre == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q01_numpre\"]:$this->q01_numpre);\n $this->q01_valor = ($this->q01_valor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q01_valor\"]:$this->q01_valor);\n $this->q01_manual = ($this->q01_manual == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q01_manual\"]:$this->q01_manual);\n }else{\n $this->q01_anousu = ($this->q01_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q01_anousu\"]:$this->q01_anousu);\n $this->q01_inscr = ($this->q01_inscr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q01_inscr\"]:$this->q01_inscr);\n $this->q01_cadcal = ($this->q01_cadcal == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q01_cadcal\"]:$this->q01_cadcal);\n $this->q01_recei = ($this->q01_recei == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q01_recei\"]:$this->q01_recei);\n $this->q01_numpre = ($this->q01_numpre == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"q01_numpre\"]:$this->q01_numpre);\n }\n }", "title": "" }, { "docid": "bd6fa2a8d83448761c25735974486c2f", "score": "0.52138966", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed37_i_codigo = ($this->ed37_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed37_i_codigo\"]:$this->ed37_i_codigo);\n $this->ed37_c_descr = ($this->ed37_c_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed37_c_descr\"]:$this->ed37_c_descr);\n $this->ed37_c_tipo = ($this->ed37_c_tipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed37_c_tipo\"]:$this->ed37_c_tipo);\n $this->ed37_i_menorvalor = ($this->ed37_i_menorvalor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed37_i_menorvalor\"]:$this->ed37_i_menorvalor);\n $this->ed37_i_maiorvalor = ($this->ed37_i_maiorvalor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed37_i_maiorvalor\"]:$this->ed37_i_maiorvalor);\n $this->ed37_i_variacao = ($this->ed37_i_variacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed37_i_variacao\"]:$this->ed37_i_variacao);\n $this->ed37_c_minimoaprov = ($this->ed37_c_minimoaprov == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed37_c_minimoaprov\"]:$this->ed37_c_minimoaprov);\n $this->ed37_c_parecerarmaz = ($this->ed37_c_parecerarmaz == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed37_c_parecerarmaz\"]:$this->ed37_c_parecerarmaz);\n $this->ed37_i_escola = ($this->ed37_i_escola === 0 ? @$GLOBALS[\"HTTP_POST_VARS\"][\"ed37_i_escola\"]:$this->ed37_i_escola);\n }else{\n $this->ed37_i_codigo = ($this->ed37_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed37_i_codigo\"]:$this->ed37_i_codigo);\n }\n }", "title": "" }, { "docid": "2c2bfdf1d9aa73b57083479b3650a309", "score": "0.5213764", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->e07_sequencial = ($this->e07_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e07_sequencial\"]:$this->e07_sequencial);\n $this->e07_formatransmissao = ($this->e07_formatransmissao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e07_formatransmissao\"]:$this->e07_formatransmissao);\n $this->e07_empagemov = ($this->e07_empagemov == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e07_empagemov\"]:$this->e07_empagemov);\n }else{\n $this->e07_sequencial = ($this->e07_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e07_sequencial\"]:$this->e07_sequencial);\n }\n }", "title": "" }, { "docid": "c4afd9a61ad320ac323134eefb985864", "score": "0.52109677", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->k144_sequencial = ($this->k144_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k144_sequencial\"]:$this->k144_sequencial);\n $this->k144_placaixa = ($this->k144_placaixa == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k144_placaixa\"]:$this->k144_placaixa);\n $this->k144_numeroprocesso = ($this->k144_numeroprocesso == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k144_numeroprocesso\"]:$this->k144_numeroprocesso);\n }else{\n $this->k144_sequencial = ($this->k144_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k144_sequencial\"]:$this->k144_sequencial);\n }\n }", "title": "" }, { "docid": "5bd699bff54e7ff8fc4e2898531d29e1", "score": "0.5210568", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->e73_sequencial = ($this->e73_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e73_sequencial\"]:$this->e73_sequencial);\n $this->e73_autori = ($this->e73_autori == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e73_autori\"]:$this->e73_autori);\n $this->e73_sequen = ($this->e73_sequen == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e73_sequen\"]:$this->e73_sequen);\n $this->e73_pcprocitem = ($this->e73_pcprocitem == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e73_pcprocitem\"]:$this->e73_pcprocitem);\n }else{\n $this->e73_sequencial = ($this->e73_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e73_sequencial\"]:$this->e73_sequencial);\n $this->e73_sequen = ($this->e73_sequen == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e73_sequen\"]:$this->e73_sequen);\n }\n }", "title": "" }, { "docid": "b4472773fd16ac61dfab0278878c63dc", "score": "0.5210268", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->y11_codvist = ($this->y11_codvist == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y11_codvist\"]:$this->y11_codvist);\n $this->y11_codigo = ($this->y11_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y11_codigo\"]:$this->y11_codigo);\n $this->y11_codi = ($this->y11_codi == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y11_codi\"]:$this->y11_codi);\n $this->y11_numero = ($this->y11_numero == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y11_numero\"]:$this->y11_numero);\n $this->y11_compl = ($this->y11_compl == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y11_compl\"]:$this->y11_compl);\n }else{\n $this->y11_codvist = ($this->y11_codvist == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y11_codvist\"]:$this->y11_codvist);\n }\n }", "title": "" }, { "docid": "f75f3a9fdc89e727d4eed46dc43b3280", "score": "0.5207553", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->m75_codmatestoqueitem = ($this->m75_codmatestoqueitem == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m75_codmatestoqueitem\"]:$this->m75_codmatestoqueitem);\n $this->m75_codmatunid = ($this->m75_codmatunid == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m75_codmatunid\"]:$this->m75_codmatunid);\n $this->m75_quant = ($this->m75_quant == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m75_quant\"]:$this->m75_quant);\n $this->m75_quantmult = ($this->m75_quantmult == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m75_quantmult\"]:$this->m75_quantmult);\n }else{\n $this->m75_codmatestoqueitem = ($this->m75_codmatestoqueitem == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"m75_codmatestoqueitem\"]:$this->m75_codmatestoqueitem);\n }\n }", "title": "" }, { "docid": "e131331decb7dca24b86190f02a174e3", "score": "0.5206282", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->at40_sequencial = ($this->at40_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_sequencial\"]:$this->at40_sequencial);\n $this->at40_responsavel = ($this->at40_responsavel == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_responsavel\"]:$this->at40_responsavel);\n $this->at40_descr = ($this->at40_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_descr\"]:$this->at40_descr);\n if($this->at40_diaini == \"\"){\n $this->at40_diaini_dia = ($this->at40_diaini_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_diaini_dia\"]:$this->at40_diaini_dia);\n $this->at40_diaini_mes = ($this->at40_diaini_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_diaini_mes\"]:$this->at40_diaini_mes);\n $this->at40_diaini_ano = ($this->at40_diaini_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_diaini_ano\"]:$this->at40_diaini_ano);\n if($this->at40_diaini_dia != \"\"){\n $this->at40_diaini = $this->at40_diaini_ano.\"-\".$this->at40_diaini_mes.\"-\".$this->at40_diaini_dia;\n }\n }\n if($this->at40_diafim == \"\"){\n $this->at40_diafim_dia = ($this->at40_diafim_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_diafim_dia\"]:$this->at40_diafim_dia);\n $this->at40_diafim_mes = ($this->at40_diafim_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_diafim_mes\"]:$this->at40_diafim_mes);\n $this->at40_diafim_ano = ($this->at40_diafim_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_diafim_ano\"]:$this->at40_diafim_ano);\n if($this->at40_diafim_dia != \"\"){\n $this->at40_diafim = $this->at40_diafim_ano.\"-\".$this->at40_diafim_mes.\"-\".$this->at40_diafim_dia;\n }\n }\n $this->at40_previsao = ($this->at40_previsao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_previsao\"]:$this->at40_previsao);\n $this->at40_tipoprevisao = ($this->at40_tipoprevisao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_tipoprevisao\"]:$this->at40_tipoprevisao);\n $this->at40_horainidia = ($this->at40_horainidia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_horainidia\"]:$this->at40_horainidia);\n $this->at40_horafim = ($this->at40_horafim == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_horafim\"]:$this->at40_horafim);\n $this->at40_progresso = ($this->at40_progresso == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_progresso\"]:$this->at40_progresso);\n $this->at40_prioridade = ($this->at40_prioridade == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_prioridade\"]:$this->at40_prioridade);\n $this->at40_obs = ($this->at40_obs == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_obs\"]:$this->at40_obs);\n $this->at40_autorizada = ($this->at40_autorizada == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_autorizada\"]:$this->at40_autorizada);\n $this->at40_tipo = ($this->at40_tipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_tipo\"]:$this->at40_tipo);\n $this->at40_ativo = ($this->at40_ativo == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_ativo\"]:$this->at40_ativo);\n $this->at40_urgente = ($this->at40_urgente == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_urgente\"]:$this->at40_urgente);\n }else{\n $this->at40_sequencial = ($this->at40_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"at40_sequencial\"]:$this->at40_sequencial);\n }\n }", "title": "" }, { "docid": "e76a2120dae57bf064f9acb4c19c3036", "score": "0.520523", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->k41_cadtipoparc = ($this->k41_cadtipoparc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k41_cadtipoparc\"]:$this->k41_cadtipoparc);\n $this->k41_arretipo = ($this->k41_arretipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k41_arretipo\"]:$this->k41_arretipo);\n if($this->k41_vencini == \"\"){\n $this->k41_vencini_dia = ($this->k41_vencini_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k41_vencini_dia\"]:$this->k41_vencini_dia);\n $this->k41_vencini_mes = ($this->k41_vencini_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k41_vencini_mes\"]:$this->k41_vencini_mes);\n $this->k41_vencini_ano = ($this->k41_vencini_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k41_vencini_ano\"]:$this->k41_vencini_ano);\n if($this->k41_vencini_dia != \"\"){\n $this->k41_vencini = $this->k41_vencini_ano.\"-\".$this->k41_vencini_mes.\"-\".$this->k41_vencini_dia;\n }\n }\n if($this->k41_vencfim == \"\"){\n $this->k41_vencfim_dia = ($this->k41_vencfim_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k41_vencfim_dia\"]:$this->k41_vencfim_dia);\n $this->k41_vencfim_mes = ($this->k41_vencfim_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k41_vencfim_mes\"]:$this->k41_vencfim_mes);\n $this->k41_vencfim_ano = ($this->k41_vencfim_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k41_vencfim_ano\"]:$this->k41_vencfim_ano);\n if($this->k41_vencfim_dia != \"\"){\n $this->k41_vencfim = $this->k41_vencfim_ano.\"-\".$this->k41_vencfim_mes.\"-\".$this->k41_vencfim_dia;\n }\n }\n }else{\n $this->k41_cadtipoparc = ($this->k41_cadtipoparc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k41_cadtipoparc\"]:$this->k41_cadtipoparc);\n $this->k41_arretipo = ($this->k41_arretipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k41_arretipo\"]:$this->k41_arretipo);\n }\n }", "title": "" }, { "docid": "8ce1e030340221ed2ec25db0048171e4", "score": "0.5196256", "text": "function atualizacampos($exclusao = false)\n {\n if ($exclusao == false) {\n $this->r11_instit = ($this->r11_instit == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_instit\"] : $this->r11_instit);\n $this->r11_anousu = ($this->r11_anousu == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_anousu\"] : $this->r11_anousu);\n $this->r11_mesusu = ($this->r11_mesusu == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_mesusu\"] : $this->r11_mesusu);\n $this->r11_codaec = ($this->r11_codaec == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_codaec\"] : $this->r11_codaec);\n $this->r11_natest = ($this->r11_natest == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_natest\"] : $this->r11_natest);\n $this->r11_cdfpas = ($this->r11_cdfpas == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_cdfpas\"] : $this->r11_cdfpas);\n $this->r11_cdactr = ($this->r11_cdactr == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_cdactr\"] : $this->r11_cdactr);\n $this->r11_peactr = ($this->r11_peactr == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_peactr\"] : $this->r11_peactr);\n $this->r11_pctemp = ($this->r11_pctemp == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_pctemp\"] : $this->r11_pctemp);\n $this->r11_pcterc = ($this->r11_pcterc == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_pcterc\"] : $this->r11_pcterc);\n $this->r11_fgts12 = ($this->r11_fgts12 == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_fgts12\"] : $this->r11_fgts12);\n $this->r11_cdcef = ($this->r11_cdcef == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_cdcef\"] : $this->r11_cdcef);\n $this->r11_cdfgts = ($this->r11_cdfgts == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_cdfgts\"] : $this->r11_cdfgts);\n if ($this->r11_ultger == \"\") {\n $this->r11_ultger_dia = ($this->r11_ultger_dia == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_ultger_dia\"] : $this->r11_ultger_dia);\n $this->r11_ultger_mes = ($this->r11_ultger_mes == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_ultger_mes\"] : $this->r11_ultger_mes);\n $this->r11_ultger_ano = ($this->r11_ultger_ano == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_ultger_ano\"] : $this->r11_ultger_ano);\n if ($this->r11_ultger_dia != \"\") {\n $this->r11_ultger = $this->r11_ultger_ano . \"-\" . $this->r11_ultger_mes . \"-\" . $this->r11_ultger_dia;\n }\n }\n if ($this->r11_ultfec == \"\") {\n $this->r11_ultfec_dia = ($this->r11_ultfec_dia == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_ultfec_dia\"] : $this->r11_ultfec_dia);\n $this->r11_ultfec_mes = ($this->r11_ultfec_mes == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_ultfec_mes\"] : $this->r11_ultfec_mes);\n $this->r11_ultfec_ano = ($this->r11_ultfec_ano == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_ultfec_ano\"] : $this->r11_ultfec_ano);\n if ($this->r11_ultfec_dia != \"\") {\n $this->r11_ultfec = $this->r11_ultfec_ano . \"-\" . $this->r11_ultfec_mes . \"-\" . $this->r11_ultfec_dia;\n }\n }\n $this->r11_arredn = ($this->r11_arredn == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_arredn\"] : $this->r11_arredn);\n $this->r11_sald13 = ($this->r11_sald13 == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_sald13\"] : $this->r11_sald13);\n if ($this->r11_datai == \"\") {\n $this->r11_datai_dia = ($this->r11_datai_dia == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_datai_dia\"] : $this->r11_datai_dia);\n $this->r11_datai_mes = ($this->r11_datai_mes == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_datai_mes\"] : $this->r11_datai_mes);\n $this->r11_datai_ano = ($this->r11_datai_ano == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_datai_ano\"] : $this->r11_datai_ano);\n if ($this->r11_datai_dia != \"\") {\n $this->r11_datai = $this->r11_datai_ano . \"-\" . $this->r11_datai_mes . \"-\" . $this->r11_datai_dia;\n }\n }\n if ($this->r11_dataf == \"\") {\n $this->r11_dataf_dia = ($this->r11_dataf_dia == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_dataf_dia\"] : $this->r11_dataf_dia);\n $this->r11_dataf_mes = ($this->r11_dataf_mes == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_dataf_mes\"] : $this->r11_dataf_mes);\n $this->r11_dataf_ano = ($this->r11_dataf_ano == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_dataf_ano\"] : $this->r11_dataf_ano);\n if ($this->r11_dataf_dia != \"\") {\n $this->r11_dataf = $this->r11_dataf_ano . \"-\" . $this->r11_dataf_mes . \"-\" . $this->r11_dataf_dia;\n }\n }\n $this->r11_fecha = ($this->r11_fecha == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_fecha\"] : $this->r11_fecha);\n $this->r11_ultreg = ($this->r11_ultreg == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_ultreg\"] : $this->r11_ultreg);\n $this->r11_codipe = ($this->r11_codipe == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_codipe\"] : $this->r11_codipe);\n $this->r11_mes13 = ($this->r11_mes13 == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_mes13\"] : $this->r11_mes13);\n $this->r11_tbprev = ($this->r11_tbprev == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_tbprev\"] : $this->r11_tbprev);\n $this->r11_confer = ($this->r11_confer == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_confer\"] : $this->r11_confer);\n $this->r11_valor = ($this->r11_valor == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_valor\"] : $this->r11_valor);\n $this->r11_dtipe = ($this->r11_dtipe == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_dtipe\"] : $this->r11_dtipe);\n $this->r11_implan = ($this->r11_implan == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_implan\"] : $this->r11_implan);\n $this->r11_subpes = ($this->r11_subpes == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_subpes\"] : $this->r11_subpes);\n $this->r11_rubmat = ($this->r11_rubmat == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_rubmat\"] : $this->r11_rubmat);\n $this->r11_eleina = ($this->r11_eleina == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_eleina\"] : $this->r11_eleina);\n $this->r11_elepen = ($this->r11_elepen == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_elepen\"] : $this->r11_elepen);\n $this->r11_rubnat = ($this->r11_rubnat == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_rubnat\"] : $this->r11_rubnat);\n $this->r11_rubdec = ($this->r11_rubdec == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_rubdec\"] : $this->r11_rubdec);\n $this->r11_qtdcal = ($this->r11_qtdcal == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_qtdcal\"] : $this->r11_qtdcal);\n $this->r11_palime = ($this->r11_palime == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_palime\"] : $this->r11_palime);\n $this->r11_altfer = ($this->r11_altfer == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_altfer\"] : $this->r11_altfer);\n $this->r11_ferias = ($this->r11_ferias == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_ferias\"] : $this->r11_ferias);\n $this->r11_fer13 = ($this->r11_fer13 == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_fer13\"] : $this->r11_fer13);\n $this->r11_ferant = ($this->r11_ferant == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_ferant\"] : $this->r11_ferant);\n $this->r11_fer13o = ($this->r11_fer13o == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_fer13o\"] : $this->r11_fer13o);\n $this->r11_fer13a = ($this->r11_fer13a == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_fer13a\"] : $this->r11_fer13a);\n $this->r11_ferabo = ($this->r11_ferabo == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_ferabo\"] : $this->r11_ferabo);\n $this->r11_feabot = ($this->r11_feabot == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_feabot\"] : $this->r11_feabot);\n $this->r11_feradi = ($this->r11_feradi == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_feradi\"] : $this->r11_feradi);\n $this->r11_fadiab = ($this->r11_fadiab == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_fadiab\"] : $this->r11_fadiab);\n $this->r11_recalc = ($this->r11_recalc == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_recalc\"] : $this->r11_recalc);\n $this->r11_pagaab = ($this->r11_pagaab == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_pagaab\"] : $this->r11_pagaab);\n $this->r11_fersal = ($this->r11_fersal == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_fersal\"] : $this->r11_fersal);\n $this->r11_vtprop = ($this->r11_vtprop == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_vtprop\"] : $this->r11_vtprop);\n $this->r11_desliq = ($this->r11_desliq == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_desliq\"] : $this->r11_desliq);\n $this->r11_propae = ($this->r11_propae == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_propae\"] : $this->r11_propae);\n $this->r11_propac = ($this->r11_propac == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_propac\"] : $this->r11_propac);\n $this->r11_codestrut = ($this->r11_codestrut == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_codestrut\"] : $this->r11_codestrut);\n $this->r11_geracontipe = ($this->r11_geracontipe == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_geracontipe\"] : $this->r11_geracontipe);\n $this->r11_13ferias = ($this->r11_13ferias == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_13ferias\"] : $this->r11_13ferias);\n $this->r11_pagarferias = ($this->r11_pagarferias == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_pagarferias\"] : $this->r11_pagarferias);\n $this->r11_vtfer = ($this->r11_vtfer == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_vtfer\"] : $this->r11_vtfer);\n $this->r11_vtcons = ($this->r11_vtcons == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_vtcons\"] : $this->r11_vtcons);\n $this->r11_vtmpro = ($this->r11_vtmpro == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_vtmpro\"] : $this->r11_vtmpro);\n $this->r11_localtrab = ($this->r11_localtrab == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_localtrab\"] : $this->r11_localtrab);\n if ($this->r11_databaseatra == \"\") {\n $this->r11_databaseatra_dia = ($this->r11_databaseatra_dia == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_databaseatra_dia\"] : $this->r11_databaseatra_dia);\n $this->r11_databaseatra_mes = ($this->r11_databaseatra_mes == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_databaseatra_mes\"] : $this->r11_databaseatra_mes);\n $this->r11_databaseatra_ano = ($this->r11_databaseatra_ano == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_databaseatra_ano\"] : $this->r11_databaseatra_ano);\n if ($this->r11_databaseatra_dia != \"\") {\n $this->r11_databaseatra = $this->r11_databaseatra_ano . \"-\" . $this->r11_databaseatra_mes . \"-\" . $this->r11_databaseatra_dia;\n }\n }\n $this->r11_rubpgintegral = ($this->r11_rubpgintegral == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_rubpgintegral\"] : $this->r11_rubpgintegral);\n $this->r11_conver = ($this->r11_conver == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_conver\"] : $this->r11_conver);\n $this->r11_concatdv = ($this->r11_concatdv == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_concatdv\"] : $this->r11_concatdv);\n $this->r11_infla = ($this->r11_infla == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_infla\"] : $this->r11_infla);\n $this->r11_baseipe = ($this->r11_baseipe == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_baseipe\"] : $this->r11_baseipe);\n $this->r11_txadm = ($this->r11_txadm == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_txadm\"] : $this->r11_txadm);\n $this->r11_modanalitica = ($this->r11_modanalitica == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_modanalitica\"] : $this->r11_modanalitica);\n $this->r11_viravalemes = ($this->r11_viravalemes == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_viravalemes\"] : $this->r11_viravalemes);\n $this->r11_histslip = ($this->r11_histslip == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_histslip\"] : $this->r11_histslip);\n $this->r11_mensagempadraotxt = ($this->r11_mensagempadraotxt == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_mensagempadraotxt\"] : $this->r11_mensagempadraotxt);\n $this->r11_recpatrafasta = ($this->r11_recpatrafasta == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_recpatrafasta\"] : $this->r11_recpatrafasta);\n $this->r11_relatoriocontracheque = ($this->r11_relatoriocontracheque == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_relatoriocontracheque\"] : $this->r11_relatoriocontracheque);\n $this->r11_relatorioempenhofolha = ($this->r11_relatorioempenhofolha == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_relatorioempenhofolha\"] : $this->r11_relatorioempenhofolha);\n $this->r11_relatoriocomprovanterendimentos = ($this->r11_relatoriocomprovanterendimentos == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_relatoriocomprovanterendimentos\"] : $this->r11_relatoriocomprovanterendimentos);\n $this->r11_relatoriotermorescisao = ($this->r11_relatoriotermorescisao == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_relatoriotermorescisao\"] : $this->r11_relatoriotermorescisao);\n $this->r11_geraretencaoempenho = ($this->r11_geraretencaoempenho == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_geraretencaoempenho\"] : $this->r11_geraretencaoempenho);\n $this->r11_percentualipe = ($this->r11_percentualipe == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_percentualipe\"] : $this->r11_percentualipe);\n if ($this->r11_datainiciovigenciarpps == \"\") {\n $this->r11_datainiciovigenciarpps_dia = ($this->r11_datainiciovigenciarpps_dia == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_datainiciovigenciarpps_dia\"] : $this->r11_datainiciovigenciarpps_dia);\n $this->r11_datainiciovigenciarpps_mes = ($this->r11_datainiciovigenciarpps_mes == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_datainiciovigenciarpps_mes\"] : $this->r11_datainiciovigenciarpps_mes);\n $this->r11_datainiciovigenciarpps_ano = ($this->r11_datainiciovigenciarpps_ano == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_datainiciovigenciarpps_ano\"] : $this->r11_datainiciovigenciarpps_ano);\n if ($this->r11_datainiciovigenciarpps_dia != \"\") {\n $this->r11_datainiciovigenciarpps = $this->r11_datainiciovigenciarpps_ano . \"-\" . $this->r11_datainiciovigenciarpps_mes . \"-\" . $this->r11_datainiciovigenciarpps_dia;\n }\n }\n $this->r11_sistemacontroleponto = ($this->r11_sistemacontroleponto == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_sistemacontroleponto\"] : $this->r11_sistemacontroleponto);\n $this->r11_baseconsignada = ($this->r11_baseconsignada == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_baseconsignada\"] : $this->r11_baseconsignada);\n $this->r11_abonoprevidencia = ($this->r11_abonoprevidencia == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_abonoprevidencia\"] : $this->r11_abonoprevidencia);\n $this->r11_compararferias = ($this->r11_compararferias == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_compararferias\"] : $this->r11_compararferias);\n $this->r11_baseferias = ($this->r11_baseferias == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_baseferias\"] : $this->r11_baseferias);\n $this->r11_basesalario = ($this->r11_basesalario == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_basesalario\"] : $this->r11_basesalario);\n $this->r11_suplementar = ($this->r11_suplementar == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_suplementar\"] : $this->r11_suplementar);\n $this->r11_rubricasubstituicaoatual = ($this->r11_rubricasubstituicaoatual == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_rubricasubstituicaoatual\"] : $this->r11_rubricasubstituicaoatual);\n $this->r11_rubricasubstituicaoanterior = ($this->r11_rubricasubstituicaoanterior == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_rubricasubstituicaoanterior\"] : $this->r11_rubricasubstituicaoanterior);\n $this->r11_rubricaescalaferias = ($this->r11_rubricaescalaferias == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_rubricaescalaferias\"] : $this->r11_rubricaescalaferias);\n $this->r11_baserrarendimentostributaveis = ($this->r11_baserrarendimentostributaveis == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_baserrarendimentostributaveis\"] : $this->r11_baserrarendimentostributaveis);\n $this->r11_baserraprevidenciasocial = ($this->r11_baserraprevidenciasocial == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_baserraprevidenciasocial\"] : $this->r11_baserraprevidenciasocial);\n $this->r11_baserrapensaoalimenticia = ($this->r11_baserrapensaoalimenticia == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_baserrapensaoalimenticia\"] : $this->r11_baserrapensaoalimenticia);\n $this->r11_baserrairrf = ($this->r11_baserrairrf == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_baserrairrf\"] : $this->r11_baserrairrf);\n $this->r11_baserraparcelaisenta = ($this->r11_baserraparcelaisenta == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_baserraparcelaisenta\"] : $this->r11_baserraparcelaisenta);\n $this->r11_tabelavaloresrra = ($this->r11_tabelavaloresrra == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_tabelavaloresrra\"] : $this->r11_tabelavaloresrra);\n $this->r11_basefgintegral = ($this->r11_basefgintegral == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_basefgintegral\"] : $this->r11_basefgintegral);\n $this->r11_basefgparcial = ($this->r11_basefgparcial == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_basefgparcial\"] : $this->r11_basefgparcial);\n } else {\n $this->r11_instit = ($this->r11_instit == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_instit\"] : $this->r11_instit);\n $this->r11_anousu = ($this->r11_anousu == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_anousu\"] : $this->r11_anousu);\n $this->r11_mesusu = ($this->r11_mesusu == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"r11_mesusu\"] : $this->r11_mesusu);\n }\n }", "title": "" }, { "docid": "29b2c4951f9a41faebb80a914a5e18e6", "score": "0.5194549", "text": "public static function posiblesIncidentes(Carbon $fecha, $arrayIncidencias)\n {\n $arrayPosibles= Persona::select('personas.id','personas.nombre')->where('activo','=','1')\n ->orderBy('personas.nombre')\n ->get(); /* continuar que aparezcan todos menos externos en esa fecha */\n\n $arrayExternos=Externo::select('persona_externos.idpersona','persona_externos.desde','persona_externos.hasta')\n ->where([['persona_externos.desde','<=',$fecha->format('Y-m-d')],['persona_externos.hasta','=',null]])\n ->orwhere([['persona_externos.desde','<=',$fecha->format('Y-m-d')],['persona_externos.hasta','>=',$fecha->format('Y-m-d')]])\n ->get();\n\n $new = $arrayPosibles->filter(function($persona) use($arrayExternos, $fecha) \n {\n $sw=1;\n foreach ($arrayExternos as $persona2)\n {\n if ($persona->id == $persona2->idpersona) {\n \n if ((is_null($persona2->hasta)) and ($persona2->desde <= $fecha)) {\n $sw=0;\n }\n else {\n if (($persona2->desde <= $fecha) and ($persona2->hasta >= $fecha)) {\n\n $sw=0;\n }\n else {\n $persona->hasta =$persona2->desde->subDay(1);\n }\n\n }\n }\n \n }\n return $sw;\n });\n \n \n\n $arrayPosibles=$new;\n /* eliminamos los que ya estén en incidencias */\n $new = $arrayPosibles->filter(function($persona) use($arrayIncidencias, $fecha) \n {\n $sw=1;\n foreach ($arrayIncidencias as $persona2)\n {\n if ($persona->id == $persona2->idpersona) {\n \n if ((is_null($persona2->hasta)) and ($persona2->desde <= $fecha)) {\n $sw=0;\n }\n else {\n // dd($persona2->desde.' - '.$persona2->hasta.' ->'.$fecha);\n if (($persona2->desde <= $fecha) and ($persona2->hasta >= $fecha)) {\n $sw=0;\n }\n else {\n $persona->hasta =$persona2->desde->subDay(1);\n }\n\n }\n }\n \n }\n return $sw;\n });\n \n \n\n //$new=$arrayPosibles;\n\n return $new;\n\n }", "title": "" }, { "docid": "5a9dd643e8a8d47da2928d9f5783b499", "score": "0.519192", "text": "function set_nuevo_acuedo($condicion_post) {\n // echo\"<pre>\";print_r($condicion_post);exit;\n $this->conectar();\n\n // -------------------- datos de acuerdo segun fecha maxima ------------ \n $query1 = $this->consulta(\"SELECT * FROM\n acuerdos\n WHERE acuerdos.dnic='\" . $condicion_post['dni_a'] . \"'\n ORDER BY acuerdos.fecha_verificacion DESC\n \");\n $datos1 = array();\n $conta = -1;\n while ($row = mysql_fetch_array($query1)) {\n $conta = $conta + 1;\n $datos1[] = $row;\n // echo $datos1[''.$conta.'']['fecha_verificacion'];\n if ($datos1['' . $conta . '']['fecha_verificacion'] == $_REQUEST['fecha_limite']) {\n echo 'la fecha reepite';\n exit;\n }\n }\n\n\n // -------------------- la minima fecha para poder actualizar ------------ \n $query2 = $this->consulta(\"SELECT MIN(acuerdos.fecha_verificacion) as minfecha\n FROM\n acuerdos\n WHERE acuerdos.dnic='\" . $condicion_post['dni_a'] . \"' \");\n $datos2 = array();\n while ($row = mysql_fetch_array($query2)) {\n $datos2[] = $row;\n }\n // -------------------- contamos cuantos acuerdo tiene la persona ------------ \n $query3 = $this->consulta(\"SELECT COUNT(acuerdos.idacuerdos) as cont\n FROM\n acuerdos\n WHERE acuerdos.dnic='\" . $condicion_post['dni_a'] . \"' \");\n $datos3 = array();\n while ($row = mysql_fetch_array($query3)) {\n $datos3[] = $row;\n }\n\n if ($datos3[0][cont] == 3) {\n // -------------------- ejecutamos la actualizacion ------------ \n\n\n $query = $this->consulta(\"UPDATE `acuerdos` SET `idpersonal`=\" . $_SESSION['idpersonal'] . \",`dnic`= '\" . $condicion_post['dni_a'] . \"',\"\n . \" `dnip`='\" . $_SESSION['dnipersonal'] . \"', `acuerdos`='\" . $condicion_post['txtacuerdo'] . \"',\"\n . \" `fecha_verificacion`='\" . $condicion_post['fecha_limite'] . \"',`fecha_visita`='\" . $condicion_post['fecha_visita'] . \"',\"\n . \"`calificacion`='',`frecuencia_msj`='\" . $condicion_post['frecuencia_msg'] . \"',`hora`='\" . $condicion_post['hora'] . \"',`pagoen`='\" . $condicion_post['pagoen'] . \"',`fuente`='\" . $condicion_post['idpersonal'] . \"'\"\n . \" WHERE (`dnic`='\" . $condicion_post['dni_a'] . \"' and `fecha_verificacion`='\" . $datos2[0]['minfecha'] . \"')\");\n } else {\n\n $query = $this->consulta(\"INSERT INTO `acuerdos` (`idpersonal`, `dnic`, `dnip`, `acuerdos`,`fecha_verificacion`,`fecha_visita`,`frecuencia_msj`,`hora`,`pagoen`,`fuente`)\"\n . \"VALUES (\" . $_SESSION['idpersonal'] . \", '\" . $condicion_post['dni_a'] . \"',\"\n . \" '\" . $_SESSION['dnipersonal'] . \"', '\" . utf8_decode($condicion_post['txtacuerdo']) . \"',\"\n . \" '\" . $condicion_post['fecha_limite'] . \"','\" . $condicion_post['fecha_visita'] . \"',\"\n . \"'\" . $condicion_post['frecuencia_msg'] . \"','\" . $condicion_post['hora'] . \"','\" . $condicion_post['pagoen'] . \"','\" . $condicion_post['idpersonal'] . \"')\");\n }\n //----------------------------poner datos a la nueva tabla acuerdo_pago\n // -------------------- buscamos si el dni esta o no ------------ \n\n\n $querya_p1 = $this->consulta(\" SELECT\n COUNT(acuerdo_pago.dni) as midni\n FROM\n acuerdo_pago\n WHERE acuerdo_pago.dni='\" . $condicion_post['dni_a'] . \"' \");\n $datosa_p1 = array();\n while ($row = mysql_fetch_array($querya_p1)) {\n $datosa_p1[] = $row;\n }\n\n\n $porciones = explode(\"_\", $condicion_post['idpersonal']);\n echo $porciones[0]; // porción1\n echo $porciones[1]; // porción2\n\n if ($datosa_p1[0]['midni'] == 1) {\n\n $query = $this->consulta(\" UPDATE `acuerdo_pago` SET `fecha_visita`='\" . $condicion_post['fecha_visita'] . \"',\n `fecha_verif`='\" . $condicion_post['fecha_limite'] . \"', `acuerdo`='\" . $condicion_post['txtacuerdo'] . \"',\n `fuente`='\" . $porciones[0] . \"', `frecuencia_msg`='\" . $condicion_post['frecuencia_msg'] . \"',\n `hora`='\" . $condicion_post['hora'] . \"', `pagoen`='\" . $condicion_post['pagoen'] . \"', `idpersonal`='\" . $porciones[1] . \"',`asignador`='\" . $_SESSION['idpersonal'] . \"' WHERE `dni`='\" . $condicion_post['dni_a'] . \"' \");\n } else {\n $query = $this->consulta(\"INSERT INTO `acuerdo_pago` (`dni`, `fecha_visita`, `fecha_verif`, `acuerdo`, `fuente`, `frecuencia_msg`, `hora`, `pagoen`,`idpersonal`,`asignador`)\n VALUES ('\" . $condicion_post['dni_a'] . \"' , '\" . $condicion_post['fecha_visita'] . \"',\n '\" . $condicion_post['fecha_limite'] . \"', '\" . utf8_decode($condicion_post['txtacuerdo']) . \"', '\" . $condicion_post['idpersonal'] . \"',\n '\" . $condicion_post['frecuencia_msg'] . \"', '\" . $condicion_post['hora'] . \"',\n '\" . $condicion_post['pagoen'] . \"','\" . $porciones[1] . \"','\" . $_SESSION['idpersonal'] . \"')\");\n }\n\n $this->disconnect();\n }", "title": "" }, { "docid": "779a6ab65a77019223f3ebc25e9581df", "score": "0.5170459", "text": "public function getDisciplinasACursar($id_periodo, $ignore=true) {\n\n $cod_disciplinas_cursar = array();\n $cod_disciplinas_cursada = array();\n $cod_disciplinas_fila = array();\n $cod_disciplinas_ingnorar = array();\n\n foreach (TbdisciplinaIgnoradaPeer::doSelect(new Criteria()) as $tbdisciplinaIgnorada) {\n $cod_disciplinas_ingnorar[] = $tbdisciplinaIgnorada->getCodDisciplina();\n }\n\n $cod_disciplinas_cursada = $this->getDisciplinasCursadas();\n $cod_disciplinas_fila = $this->getDisciplinasIntbfila($id_periodo);\n $cod_disciplinas_equivalentes = $this->getDisciplinasEquivalentesCursadas();\n\n $criteria = new Criteria();\n $criteria->add(TbcurriculodisciplinasPeer::COD_DISCIPLINA, $cod_disciplinas_cursada, Criteria::NOT_IN);\n $criteria->addAnd(TbcurriculodisciplinasPeer::COD_DISCIPLINA, $cod_disciplinas_fila, Criteria::NOT_IN);\n $criteria->addAnd(TbcurriculodisciplinasPeer::COD_DISCIPLINA, $cod_disciplinas_equivalentes, Criteria::NOT_IN);\n if (!$ignore) {\n $criteria->addAnd(TbcurriculodisciplinasPeer::COD_DISCIPLINA, $cod_disciplinas_ingnorar, Criteria::NOT_IN);\n }\n $criteria->addAnd(TbcurriculodisciplinasPeer::ID_VERSAO_CURSO, $this->id_versao_curso);\n $criteria->addAnd(TbcurriculodisciplinasPeer::ID_CARATER, 1);\n $criteria->addAscendingOrderByColumn(TbcurriculodisciplinasPeer::COD_DISCIPLINA);\n $result = TbcurriculodisciplinasPeer::doSelect($criteria);\n $dis = new Tbcurriculodisciplinas();\n foreach ($result as $dis) {\n $cod_disciplinas_cursar[$dis->getCodDisciplina()] = $dis->getCodDisciplina();\n }\n\n if (strlen(strstr($this->getTbcursoversao()->getDescricao(), 'LETRAS - LITERATURA')) > 0) {\n $materias_ing = array('LT113A', 'LT114A', 'AACC01');\n $materias_esp = array('LT113C', 'LT114C', 'AACC01');\n if (in_array('LT113A', $cod_disciplinas_cursada) || in_array('LT113A', $cod_disciplinas_fila)) {\n foreach ($materias_esp as $mat) {\n unset($cod_disciplinas_cursar[$mat]);\n }\n }\n if (in_array('LT113C', $cod_disciplinas_cursada) || in_array('LT113C', $cod_disciplinas_fila)) {\n foreach ($materias_ing as $mat) {\n unset($cod_disciplinas_cursar[$mat]);\n }\n }\n }\n if (strlen(strstr($this->getTbcursoversao()->getDescricao(), 'GEOGRAFIA')) > 0 || strlen(strstr($this->getTbcursoversao()->getDescricao(), 'COMUNICACAO SOCIAL')) > 0) {\n $materias_ing = array('LT179A', 'LT180A');\n $materias_esp = array('LT179C', 'LT180C');\n $materias_fra = array('LT179B', 'LT180B');\n\n if (in_array('LT179A', $cod_disciplinas_cursada) || in_array('LT179A', $cod_disciplinas_fila)) {\n foreach (array_merge($materias_esp, $materias_fra)as $mat) {\n unset($cod_disciplinas_cursar[$mat]);\n }\n }\n if (in_array('LT179C', $cod_disciplinas_cursada) || in_array('LT179C', $cod_disciplinas_fila)) {\n sfContext::getInstance()->getLogger()->alert('esp');\n foreach (array_merge($materias_ing, $materias_fra) as $mat) {\n unset($cod_disciplinas_cursar[$mat]);\n }\n }\n if (in_array('LT179B', $cod_disciplinas_cursada) || in_array('LT179B', $cod_disciplinas_fila)) {\n sfContext::getInstance()->getLogger()->alert('fra');\n foreach (array_merge($materias_esp, $materias_ing) as $mat) {\n unset($cod_disciplinas_cursar[$mat]);\n }\n }\n }\n\n unset($cod_disciplinas_cursar['RI1000']);\n\n return $cod_disciplinas_cursar;\n }", "title": "" }, { "docid": "e615a05330710ede8166905c41a0e79b", "score": "0.51661956", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->y57_codauto = ($this->y57_codauto == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y57_codauto\"]:$this->y57_codauto);\n $this->y57_receit = ($this->y57_receit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y57_receit\"]:$this->y57_receit);\n $this->y57_descr = ($this->y57_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y57_descr\"]:$this->y57_descr);\n $this->y57_valor = ($this->y57_valor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y57_valor\"]:$this->y57_valor);\n }else{\n $this->y57_codauto = ($this->y57_codauto == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y57_codauto\"]:$this->y57_codauto);\n $this->y57_receit = ($this->y57_receit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"y57_receit\"]:$this->y57_receit);\n }\n }", "title": "" }, { "docid": "26b600c58281e3013c460123201f1404", "score": "0.5165311", "text": "function abonnements_optimiser_base_disparus($flux){\n\n\t//Offres d'abonnement à la poubelle\n\tsql_delete(\"spip_abonnements_offres\", \"statut='poubelle' AND maj < \".$flux['args']['date']);\n\n\t//Supprimer les abonnements lies à une offre d'abonnement inexistante\n\t$res = sql_select(\"DISTINCT abonnements.id_abonnements_offre\",\"spip_abonnements AS abonnements\n\t\t\t\t\t\tLEFT JOIN spip_abonnements_offres AS offres\n\t\t\t\t\t\tON abonnements.id_abonnements_offre=offres.id_abonnements_offre\",\"offres.id_abonnements_offre IS NULL\");\n\twhile ($row = sql_fetch($res))\n\t\tsql_delete(\"spip_abonnements\", \"id_abonnements_offre=\".$row['id_abonnements_offre']);\n\n\t//Abonnements à la poubelle\n\tsql_delete(\"spip_abonnements\", \"statut='poubelle' AND maj < \".$flux['args']['date']);\n\n\tinclude_spip('action/editer_liens');\n\t$flux['data'] += objet_optimiser_liens(array('abonnement'=>'*'),'*');\n\treturn $flux;\n}", "title": "" }, { "docid": "81bf0fc7910b9591dbd342978b9acb38", "score": "0.5157985", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->r47_anousu = ($this->r47_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r47_anousu\"]:$this->r47_anousu);\n $this->r47_mesusu = ($this->r47_mesusu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r47_mesusu\"]:$this->r47_mesusu);\n $this->r47_regist = ($this->r47_regist == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r47_regist\"]:$this->r47_regist);\n $this->r47_rubric = ($this->r47_rubric == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r47_rubric\"]:$this->r47_rubric);\n $this->r47_valor = ($this->r47_valor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r47_valor\"]:$this->r47_valor);\n $this->r47_quant = ($this->r47_quant == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r47_quant\"]:$this->r47_quant);\n $this->r47_lotac = ($this->r47_lotac == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r47_lotac\"]:$this->r47_lotac);\n $this->r47_instit = ($this->r47_instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r47_instit\"]:$this->r47_instit);\n }else{\n $this->r47_anousu = ($this->r47_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r47_anousu\"]:$this->r47_anousu);\n $this->r47_mesusu = ($this->r47_mesusu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r47_mesusu\"]:$this->r47_mesusu);\n $this->r47_regist = ($this->r47_regist == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r47_regist\"]:$this->r47_regist);\n $this->r47_rubric = ($this->r47_rubric == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r47_rubric\"]:$this->r47_rubric);\n }\n }", "title": "" }, { "docid": "8b567f115a93cebb94046ff42f1517e9", "score": "0.51569223", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->k00_numbco = ($this->k00_numbco == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_numbco\"]:$this->k00_numbco);\n $this->k15_codbco = ($this->k15_codbco == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k15_codbco\"]:$this->k15_codbco);\n $this->k15_codage = ($this->k15_codage == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k15_codage\"]:$this->k15_codage);\n $this->codret = ($this->codret == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"codret\"]:$this->codret);\n if($this->dtarq == \"\"){\n $this->dtarq_dia = ($this->dtarq_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"dtarq_dia\"]:$this->dtarq_dia);\n $this->dtarq_mes = ($this->dtarq_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"dtarq_mes\"]:$this->dtarq_mes);\n $this->dtarq_ano = ($this->dtarq_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"dtarq_ano\"]:$this->dtarq_ano);\n if($this->dtarq_dia != \"\"){\n $this->dtarq = $this->dtarq_ano.\"-\".$this->dtarq_mes.\"-\".$this->dtarq_dia;\n }\n }\n if($this->dtpago == \"\"){\n $this->dtpago_dia = ($this->dtpago_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"dtpago_dia\"]:$this->dtpago_dia);\n $this->dtpago_mes = ($this->dtpago_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"dtpago_mes\"]:$this->dtpago_mes);\n $this->dtpago_ano = ($this->dtpago_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"dtpago_ano\"]:$this->dtpago_ano);\n if($this->dtpago_dia != \"\"){\n $this->dtpago = $this->dtpago_ano.\"-\".$this->dtpago_mes.\"-\".$this->dtpago_dia;\n }\n }\n $this->vlrpago = ($this->vlrpago == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"vlrpago\"]:$this->vlrpago);\n $this->vlrjuros = ($this->vlrjuros == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"vlrjuros\"]:$this->vlrjuros);\n $this->vlrmulta = ($this->vlrmulta == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"vlrmulta\"]:$this->vlrmulta);\n $this->vlracres = ($this->vlracres == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"vlracres\"]:$this->vlracres);\n $this->vlrdesco = ($this->vlrdesco == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"vlrdesco\"]:$this->vlrdesco);\n $this->vlrtot = ($this->vlrtot == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"vlrtot\"]:$this->vlrtot);\n $this->cedente = ($this->cedente == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"cedente\"]:$this->cedente);\n $this->vlrcalc = ($this->vlrcalc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"vlrcalc\"]:$this->vlrcalc);\n $this->idret = ($this->idret == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"idret\"]:$this->idret);\n $this->classi = ($this->classi == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"classi\"]:$this->classi);\n $this->k00_numpre = ($this->k00_numpre == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_numpre\"]:$this->k00_numpre);\n $this->k00_numpar = ($this->k00_numpar == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"k00_numpar\"]:$this->k00_numpar);\n $this->convenio = ($this->convenio == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"convenio\"]:$this->convenio);\n $this->instit = ($this->instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"instit\"]:$this->instit);\n if($this->dtcredito == \"\"){\n $this->dtcredito_dia = ($this->dtcredito_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"dtcredito_dia\"]:$this->dtcredito_dia);\n $this->dtcredito_mes = ($this->dtcredito_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"dtcredito_mes\"]:$this->dtcredito_mes);\n $this->dtcredito_ano = ($this->dtcredito_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"dtcredito_ano\"]:$this->dtcredito_ano);\n if($this->dtcredito_dia != \"\"){\n $this->dtcredito = $this->dtcredito_ano.\"-\".$this->dtcredito_mes.\"-\".$this->dtcredito_dia;\n }\n }\n }else{\n $this->idret = ($this->idret == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"idret\"]:$this->idret);\n }\n }", "title": "" }, { "docid": "d0bc080e82a4a28f708f24c4ee67aa64", "score": "0.5156071", "text": "public function elim($time, $comp, $GL_ACCOUNT, $INTERCO, $COSTCENTER) {\n $temp = \"\";\n $bts = substr($time, -2);\n $year = substr($time, 0, 4);\n $year_lalu = $year - 1;\n for ($i = 1; $i <= $bts; $i++) {\n $month = \"0$i\";\n $month = substr($month, -2);\n if ($i != $bts) {\n $tmbhn = \",\";\n } else {\n $tmbhn = \"\";\n }\n $time_between = \"$temp '$year.$month' $tmbhn\";\n $temp = $time_between;\n }\n //jadikan tahun menjadi tahan lalu\n $time_between1 = str_replace($year, $year_lalu, $temp);\n if ($COSTCENTER == \"\") {\n $cc = \"\";\n } else {\n $cc = \"COSTCENTER_COMPONENT = '$COSTCENTER' AND\";\n }\n if ($comp == \"\") {\n $compy = \"\";\n } else {\n $compy = \"COMPANY IN ($comp) AND\";\n }\n if ($INTERCO == \"\") {\n $inter = \"\";\n } else {\n $inter = \"INTERCO IN ($INTERCO) AND\";\n }\n $where = \"C.AUDITTRAIL = M.AUDITTRAIL AND\n M.PARENTH1 = 'ADJUSTMENT' AND \n CATEGORY = 'ACT' AND\n $cc\n DOCUMENT_TYPE = 'NO_DOC' AND\n FLOW = 'CLOSING' AND\n GL_ACCOUNT $GL_ACCOUNT AND\n $compy\n $inter\n\t\tCURRENCY = 'IDR' AND\n SCOPE = 'S_GCEMENT' AND\";\n $sql = \"SELECT\n (SELECT SUM(AMOUNT) from CONSOLIDATION C, M_AUDITTRAIL M where $where FISCAL_YEAR_PERIOD IN ('$time')) as ACT,\n (SELECT SUM(AMOUNT) from CONSOLIDATION C, M_AUDITTRAIL M where $where FISCAL_YEAR_PERIOD IN ('$year_lalu.$month')) as ACT_LALU,\n (SELECT SUM(AMOUNT) from CONSOLIDATION C, M_AUDITTRAIL M where $where FISCAL_YEAR_PERIOD IN ($time_between)) as ACT1,\n (SELECT SUM(AMOUNT) from CONSOLIDATION C, M_AUDITTRAIL M where $where FISCAL_YEAR_PERIOD IN ($time_between1)) as ACT_LALU1\n FROM CONSOLIDATION where ROWNUM <= 1\";\n return $sql;exit;\n $dt = $this->db->query($sql);\n return $dt->row();\n }", "title": "" }, { "docid": "cb9870a67b1c39775699b0138a38f615", "score": "0.51556057", "text": "function eliminarEstudiantesCambioEstado() {\r\n foreach ($this->historicoEstudiantes as $numHistorico=>$historico)\r\n {\r\n $borrar=2;\r\n foreach ($this->datosEstudiantes as $numEstudiante=>$estudiante)\r\n {\r\n if ($historico['CODIGO']==$estudiante['CODIGO'])\r\n {\r\n $datosEstudiante=$this->crearArregloEstudiante($estudiante);\r\n $borrar=0;\r\n if($historico['ESTADO']==$estudiante['ESTADO'])\r\n {\r\n $borrar=1;\r\n }\r\n if($borrar==1)\r\n {\r\n //cambia estado\r\n $estado=$this->aplicarCambioEstado($datosEstudiante);\r\n if ($estado>=1)\r\n {\r\n //registra reglamento\r\n $reglamento=$this->registrarReglamento($datosEstudiante);\r\n if ($reglamento>=1)\r\n {}else\r\n {\r\n $this->mensaje[]=\"No se pudo registrar datos de reglamento de \".$estudiante['CODIGO'];\r\n }\r\n }else\r\n {\r\n $this->mensaje[]=\"No se pudo registrar cambiar estado de \".$estudiante['CODIGO'];\r\n } \r\n unset ($this->datosEstudiantes[$numEstudiante]);\r\n }else\r\n {\r\n //registra reglamento\r\n $reglamento=$this->registrarReglamento($datosEstudiante);\r\n if ($reglamento>=1)\r\n {\r\n\r\n }else\r\n {\r\n $this->mensaje[]=\"No se pudo registrar datos de reglamento de \".$estudiante['CODIGO'];\r\n }\r\n unset ($this->datosEstudiantes[$numEstudiante]);\r\n }\r\n unset ($datosEstudiante); \r\n }else\r\n {}\r\n }\r\n }\r\n }", "title": "" }, { "docid": "8152c7df485f5b7f64fc9b0cab735533", "score": "0.514359", "text": "function opcion__purgar_auditoria()\n\t{\n\t\t$tiempo = $this->manejador_interface->dialogo_ingresar_texto('Ingrese el periodo de datos a mantener (meses)', false);\n\t\t$this->modelo->purgar_auditoria($tiempo);\n\t}", "title": "" }, { "docid": "8152c7df485f5b7f64fc9b0cab735533", "score": "0.514359", "text": "function opcion__purgar_auditoria()\n\t{\n\t\t$tiempo = $this->manejador_interface->dialogo_ingresar_texto('Ingrese el periodo de datos a mantener (meses)', false);\n\t\t$this->modelo->purgar_auditoria($tiempo);\n\t}", "title": "" }, { "docid": "0c2f8011dcc9a058b2a9712810a7267a", "score": "0.51349896", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->db108_sequencial = ($this->db108_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db108_sequencial\"]:$this->db108_sequencial);\n $this->db108_avaliacaogruporesposta = ($this->db108_avaliacaogruporesposta == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db108_avaliacaogruporesposta\"]:$this->db108_avaliacaogruporesposta);\n $this->db108_avaliacaoresposta = ($this->db108_avaliacaoresposta == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db108_avaliacaoresposta\"]:$this->db108_avaliacaoresposta);\n }else{\n $this->db108_sequencial = ($this->db108_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db108_sequencial\"]:$this->db108_sequencial);\n }\n }", "title": "" }, { "docid": "1242c28f30b71c4b17e9d906a93bf646", "score": "0.5129181", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->db115_sequencial = ($this->db115_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db115_sequencial\"]:$this->db115_sequencial);\n $this->db115_workflowativ = ($this->db115_workflowativ == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db115_workflowativ\"]:$this->db115_workflowativ);\n $this->db115_codigo = ($this->db115_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db115_codigo\"]:$this->db115_codigo);\n $this->db115_ordem = ($this->db115_ordem == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db115_ordem\"]:$this->db115_ordem);\n }else{\n $this->db115_sequencial = ($this->db115_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db115_sequencial\"]:$this->db115_sequencial);\n }\n }", "title": "" }, { "docid": "9fe4c29411ef1ad37f673e4adc977d69", "score": "0.5111984", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ob18_codigo = ($this->ob18_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ob18_codigo\"]:$this->ob18_codigo);\n $this->ob18_codobraenvioreg = ($this->ob18_codobraenvioreg == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ob18_codobraenvioreg\"]:$this->ob18_codobraenvioreg);\n $this->ob18_codhabite = ($this->ob18_codhabite == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ob18_codhabite\"]:$this->ob18_codhabite);\n }else{\n $this->ob18_codigo = ($this->ob18_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ob18_codigo\"]:$this->ob18_codigo);\n }\n }", "title": "" }, { "docid": "e1f99fd2fdaefc948c308f2dc38c8e81", "score": "0.5110704", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->it05_guia = ($this->it05_guia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"it05_guia\"]:$this->it05_guia);\n $this->it05_frente = ($this->it05_frente == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"it05_frente\"]:$this->it05_frente);\n $this->it05_fundos = ($this->it05_fundos == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"it05_fundos\"]:$this->it05_fundos);\n $this->it05_direito = ($this->it05_direito == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"it05_direito\"]:$this->it05_direito);\n $this->it05_esquerdo = ($this->it05_esquerdo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"it05_esquerdo\"]:$this->it05_esquerdo);\n $this->it05_itbisituacao = ($this->it05_itbisituacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"it05_itbisituacao\"]:$this->it05_itbisituacao);\n }else{\n $this->it05_guia = ($this->it05_guia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"it05_guia\"]:$this->it05_guia);\n }\n }", "title": "" }, { "docid": "9aeee44db64a7f4e4cf488011fa89005", "score": "0.51105565", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->tr10_id = ($this->tr10_id == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr10_id\"]:$this->tr10_id);\n $this->tr10_idacidente = ($this->tr10_idacidente == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr10_idacidente\"]:$this->tr10_idacidente);\n $this->tr10_idvitima = ($this->tr10_idvitima == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr10_idvitima\"]:$this->tr10_idvitima);\n $this->tr10_nome = ($this->tr10_nome == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr10_nome\"]:$this->tr10_nome);\n $this->tr10_sexo = ($this->tr10_sexo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr10_sexo\"]:$this->tr10_sexo);\n $this->tr10_idade = ($this->tr10_idade == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr10_idade\"]:$this->tr10_idade);\n $this->tr10_situacao = ($this->tr10_situacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr10_situacao\"]:$this->tr10_situacao);\n }else{\n $this->tr10_id = ($this->tr10_id == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"tr10_id\"]:$this->tr10_id);\n }\n }", "title": "" }, { "docid": "3053d2eff2344aebd629f93c30c7f09f", "score": "0.51095545", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->r57_instit = ($this->r57_instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r57_instit\"]:$this->r57_instit);\n $this->r57_anousu = ($this->r57_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r57_anousu\"]:$this->r57_anousu);\n $this->r57_mesusu = ($this->r57_mesusu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r57_mesusu\"]:$this->r57_mesusu);\n $this->r57_codrel = ($this->r57_codrel == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r57_codrel\"]:$this->r57_codrel);\n $this->r57_regist = ($this->r57_regist == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r57_regist\"]:$this->r57_regist);\n }else{\n $this->r57_instit = ($this->r57_instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r57_instit\"]:$this->r57_instit);\n $this->r57_anousu = ($this->r57_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r57_anousu\"]:$this->r57_anousu);\n $this->r57_mesusu = ($this->r57_mesusu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r57_mesusu\"]:$this->r57_mesusu);\n $this->r57_codrel = ($this->r57_codrel == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r57_codrel\"]:$this->r57_codrel);\n $this->r57_regist = ($this->r57_regist == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r57_regist\"]:$this->r57_regist);\n }\n }", "title": "" }, { "docid": "c33abf646d59149866845f6d3810cbc5", "score": "0.5104117", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->o64_codseqimpmov = ($this->o64_codseqimpmov == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o64_codseqimpmov\"]:$this->o64_codseqimpmov);\n $this->o64_codimpmov = ($this->o64_codimpmov == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o64_codimpmov\"]:$this->o64_codimpmov);\n $this->o64_exercicio = ($this->o64_exercicio == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o64_exercicio\"]:$this->o64_exercicio);\n $this->o64_valor = ($this->o64_valor == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o64_valor\"]:$this->o64_valor);\n $this->o64_proces = ($this->o64_proces == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o64_proces\"]:$this->o64_proces);\n }else{\n $this->o64_codseqimpmov = ($this->o64_codseqimpmov == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"o64_codseqimpmov\"]:$this->o64_codseqimpmov);\n }\n }", "title": "" }, { "docid": "69d62b6ce4a055c407970c4059cd6fe6", "score": "0.50994575", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->sequencial = ($this->sequencial == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"sequencial\"] : $this->sequencial);\n $this->departamento = ($this->departamento == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"departamento\"] : $this->departamento);\n $this->ativo = ($this->ativo == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"ativo\"] : $this->ativo);\n $this->principal = ($this->principal == \"f\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"principal\"] : $this->principal);\n $this->numcgm = ($this->numcgm == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"numcgm\"] : $this->numcgm);\n $this->titulo = ($this->titulo == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"titulo\"] : $this->titulo);\n }else{\n $this->sequencial = ($this->sequencial == \"\" ? @$GLOBALS[\"HTTP_POST_VARS\"][\"sequencial\"]:$this->sequencial);\n }\n }", "title": "" }, { "docid": "d74d8da581079ef2d2172ab6b3228a38", "score": "0.5097937", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->e83_codtipo = ($this->e83_codtipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e83_codtipo\"]:$this->e83_codtipo);\n $this->e83_descr = ($this->e83_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e83_descr\"]:$this->e83_descr);\n $this->e83_conta = ($this->e83_conta == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e83_conta\"]:$this->e83_conta);\n $this->e83_codmod = ($this->e83_codmod == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e83_codmod\"]:$this->e83_codmod);\n $this->e83_convenio = ($this->e83_convenio == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e83_convenio\"]:$this->e83_convenio);\n $this->e83_sequencia = ($this->e83_sequencia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e83_sequencia\"]:$this->e83_sequencia);\n $this->e83_codigocompromisso = ($this->e83_codigocompromisso == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e83_codigocompromisso\"]:$this->e83_codigocompromisso);\n }else{\n $this->e83_codtipo = ($this->e83_codtipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e83_codtipo\"]:$this->e83_codtipo);\n }\n }", "title": "" }, { "docid": "b9097a0cb1afad2c9a0ce97a4a3eb06c", "score": "0.50978714", "text": "function aplicarAcuerdo1993027(){\n if ($this->estadoEstudiante=='A'||$this->estadoEstudiante=='B')\n {\n $this->estadoEstudiante='B';\n }else\n {\n $this->estadoEstudiante='J';\n }\n\t\tif(isset($this->EspacioPerdidoMotivoPrueba[$this->codigoEstudiante]))\n {\n foreach($this->EspacioPerdidoMotivoPrueba[$this->codigoEstudiante] as $clave=>$numeroVeces)\n {\n //se busca el total de veces q tiene espacio perdido en todos los periodos incluido el actual\n if($numeroVeces==3)\n {\n $setenta=$this->validarSetentaPorciento($this->codigoEstudiante);\n if(!$setenta)\n {\n $this->estadoEstudiante='Z';\n $this->causal=3;\n }\n }elseif($numeroVeces>=4)\n {\n $this->estadoEstudiante='Z';\n $this->causal=3;\n }\n }\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1aa1070acf9179823d1f666e70414c15", "score": "0.50840616", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed82_i_codigo = ($this->ed82_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed82_i_codigo\"]:$this->ed82_i_codigo);\n $this->ed82_c_nome = ($this->ed82_c_nome == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed82_c_nome\"]:$this->ed82_c_nome);\n $this->ed82_c_abrev = ($this->ed82_c_abrev == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed82_c_abrev\"]:$this->ed82_c_abrev);\n $this->ed82_c_mantenedora = ($this->ed82_c_mantenedora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed82_c_mantenedora\"]:$this->ed82_c_mantenedora);\n $this->ed82_c_email = ($this->ed82_c_email == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed82_c_email\"]:$this->ed82_c_email);\n $this->ed82_c_rua = ($this->ed82_c_rua == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed82_c_rua\"]:$this->ed82_c_rua);\n $this->ed82_i_numero = ($this->ed82_i_numero == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed82_i_numero\"]:$this->ed82_i_numero);\n $this->ed82_c_complemento = ($this->ed82_c_complemento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed82_c_complemento\"]:$this->ed82_c_complemento);\n $this->ed82_c_bairro = ($this->ed82_c_bairro == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed82_c_bairro\"]:$this->ed82_c_bairro);\n $this->ed82_i_cep = ($this->ed82_i_cep == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed82_i_cep\"]:$this->ed82_i_cep);\n $this->ed82_i_censomunic = ($this->ed82_i_censomunic == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed82_i_censomunic\"]:$this->ed82_i_censomunic);\n $this->ed82_i_censouf = ($this->ed82_i_censouf == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed82_i_censouf\"]:$this->ed82_i_censouf);\n $this->ed82_i_censodistrito = ($this->ed82_i_censodistrito == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed82_i_censodistrito\"]:$this->ed82_i_censodistrito);\n $this->ed82_pais = ($this->ed82_pais == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed82_pais\"]:$this->ed82_pais);\n }else{\n $this->ed82_i_codigo = ($this->ed82_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed82_i_codigo\"]:$this->ed82_i_codigo);\n }\n }", "title": "" }, { "docid": "0ce2d78174cf4a81de83cdec27e046b4", "score": "0.50809455", "text": "function recalcularUnEstudiante()\n {\n $this->barraProgreso();\n $codEstudiante=$_REQUEST['codEstudiante'];\n $this->estudiantes=$this->verificarAcuerdo004($codEstudiante);\n if (!is_array($this->estudiantes))\n {\n echo \"El estudiante no está acogido al acuerdo 004.\";exit;\n }\n else{\n echo \"<script>callprogress('100','1','1')</script>\"; //llamo a la función JS(JavaScript) para actualizar el progreso\n flush(); //con esta funcion hago que se muestre el resultado de inmediato y no espere a terminar todo el bucle\n ob_flush();\n usleep (300); \n $this->procesarEstudiante($this->estudiantes[0]);\n }\t\n \n //presenta reporte de proceso ejecutado\n $this->presentarReporteProceso();\n\n\t\treturn true; \n }", "title": "" }, { "docid": "c0fead0edb3978c6207ecaca62620789", "score": "0.5080596", "text": "public function guardarEstadisticaNegacion($clave_insumo_medico,$almacen_id,$cantidad_negada)\n {\n\n $negacion_resusitada = 0;\n $precios = (object) $this->conseguirPrecio($clave_insumo_medico);\n $insumo = Insumo::datosUnidosis()->where('clave',$clave_insumo_medico)->first();\n $cantidad_x_envase = $insumo->cantidad_x_envase;\n\n // Si no existe registro para resusitar, se comprueba existencia de registro activo\n $negacion = NegacionInsumo::where('almacen_id',$almacen_id)->where('clave_insumo_medico',$clave_insumo_medico)->first();\n if(!$negacion)\n {\n // Busqueda de registro de negación a resusitar para el insumo negado\n $negacion = DB::table('negaciones_insumos')->where('clave_insumo_medico',$clave_insumo_medico)->where('deleted_at','!=',NULL)->first();\n // Si existe registro muerto se resusita\n if($negacion)\n {\n DB::update(\"update negaciones_insumos set deleted_at = null where id = '\".$negacion->id.\"'\");\n $negacion_resusitada = 1;\n } \n }\n\n $negacion_insumo = NULL;\n $almacen = Almacen::find($almacen_id);\n ///*************************************************************************************************\n // Encontrar ultima entrada al almacen del insumo negado\n $ultima_entrada = NULL;\n $cantidad_entrada = 0;\n $cantidad_entrada_unidosis = 0;\n\n $ultima_entrada_insumo = DB::table('movimientos')\n ->join('movimiento_insumos', 'movimientos.id', '=', 'movimiento_insumos.movimiento_id')\n ->select('movimientos.*', 'movimiento_insumos.clave_insumo_medico', 'movimiento_insumos.cantidad', 'movimiento_insumos.cantidad_unidosis')\n ->where('movimientos.almacen_id',$almacen_id)\n ->where('movimiento_insumos.clave_insumo_medico',$clave_insumo_medico)\n ->where('movimientos.tipo_movimiento_id',1)\n ->where('movimientos.deleted_at',NULL)\n ->orderBy('created_at','DESC')\n ->first();\n\n if($ultima_entrada_insumo)\n {\n $ultima_entrada = $ultima_entrada_insumo->created_at;\n $cantidad_entrada = $ultima_entrada_insumo->cantidad;\n $cantidad_entrada_unidosis = $ultima_entrada_insumo->cantidad_unidosis;\n }\n ///**************************************************************************************************************************\n $cantidad_negada = $cantidad_negada;\n $cantidad_negada_unidosis = ($cantidad_negada * $cantidad_x_envase);\n \n // Si existe registro de negación de insumo ( activo ó resusitado )\n if($negacion)\n { \n $negacion_insumo = NegacionInsumo::find($negacion->id);\n\n if($negacion_resusitada == 1)\n {\n $negacion_insumo->fecha_inicio = date(\"Y-m-d\");\n $negacion_insumo->fecha_fin = date(\"Y-m-d\");\n $negacion_insumo->cantidad_acumulada = $cantidad_negada;\n $negacion_insumo->cantidad_acumulada_unidosis = $cantidad_negada_unidosis;\n $negacion_insumo->ultima_entrada = $ultima_entrada;\n $negacion_insumo->cantidad_entrada = $cantidad_entrada;\n $negacion_insumo->cantidad_entrada_unidosis = $cantidad_entrada_unidosis;\n\n }else{\n $negacion_insumo->cantidad_acumulada = $negacion_insumo->cantidad_acumulada + $cantidad_negada;\n $negacion_insumo->cantidad_acumulada_unidosis = $negacion_insumo->cantidad_acumulada_unidosis + $cantidad_negada_unidosis;\n $negacion_insumo->fecha_fin = date(\"Y-m-d\");\n $negacion_insumo->ultima_entrada = $ultima_entrada;\n $negacion_insumo->cantidad_entrada = $cantidad_entrada;\n $negacion_insumo->cantidad_entrada_unidosis = $cantidad_entrada_unidosis; \n }\n\n $negacion_insumo->save(); \n \n }else{\n $negacion_insumo = new NegacionInsumo;\n\n $negacion_insumo->clave_insumo_medico = $clave_insumo_medico;\n $negacion_insumo->clues = $almacen->clues;\n $negacion_insumo->almacen_id = $almacen_id;\n $negacion_insumo->tipo_insumo = $precios->tipo_insumo_id;\n $negacion_insumo->fecha_inicio = date(\"Y-m-d\");\n $negacion_insumo->fecha_fin = date(\"Y-m-d\");\n $negacion_insumo->cantidad_acumulada = $cantidad_negada;\n $negacion_insumo->cantidad_acumulada_unidosis = $cantidad_negada_unidosis;\n $negacion_insumo->ultima_entrada = $ultima_entrada;\n $negacion_insumo->cantidad_entrada = $cantidad_entrada;\n $negacion_insumo->cantidad_entrada_unidosis = $cantidad_entrada_unidosis;\n\n $negacion_insumo->save();\n }\n \n\n\n\n\n }", "title": "" }, { "docid": "5bbd63077ae8d03ffc07631d37faaa21", "score": "0.505773", "text": "public function impuestos(){\r\n\t\t\t$total = $this->porte_con_iva()-$this->porte_sin_iva();\r\n\t\t\treturn $total;\r\n\t\t}", "title": "" }, { "docid": "8d7809b8dc6edc1b263e95b689a99d9d", "score": "0.5057023", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->c88_sequencial = ($this->c88_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c88_sequencial\"]:$this->c88_sequencial);\n $this->c88_inventario = ($this->c88_inventario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c88_inventario\"]:$this->c88_inventario);\n if($this->c88_data == \"\"){\n $this->c88_data_dia = ($this->c88_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c88_data_dia\"]:$this->c88_data_dia);\n $this->c88_data_mes = ($this->c88_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c88_data_mes\"]:$this->c88_data_mes);\n $this->c88_data_ano = ($this->c88_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c88_data_ano\"]:$this->c88_data_ano);\n if($this->c88_data_dia != \"\"){\n $this->c88_data = $this->c88_data_ano.\"-\".$this->c88_data_mes.\"-\".$this->c88_data_dia;\n }\n }\n $this->c88_usuario = ($this->c88_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c88_usuario\"]:$this->c88_usuario);\n $this->c88_estornado = ($this->c88_estornado == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c88_estornado\"]:$this->c88_estornado);\n }else{\n $this->c88_sequencial = ($this->c88_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"c88_sequencial\"]:$this->c88_sequencial);\n }\n }", "title": "" }, { "docid": "b41e6dbdd14d28dc84cd3cd0c96f195f", "score": "0.505559", "text": "public function updateSemaforos(){\n $startDate = new Carbon(\"last week monday\", \"America/Mexico_City\");\n $endDate = new Carbon(\"last sunday\", \"America/Mexico_City\");\n\n //\n $semaforos = Semaforo::with('metricas')->with('cuenta')->get();\n $cuentas = Cuentas::get();\n\n if(isset($cuentas)){\n foreach ($cuentas as $cuenta){\n $count_semaforo =0;\n $semaforos = Semaforo::where('cuenta_id', $cuenta->id)->with('metricas')->get();\n\n if(isset($semaforos)){\n foreach ($semaforos as $semaforo){\n\n $metrica = $semaforo->metricas->clave;\n\n try{\n //Guardo la ejecución del query en una variable\n $analyticsData = LaravelAnalytics::setSiteId($cuenta->siteId)->performQuery(\n $startDate,\n $endDate,\n $metrica\n );\n }catch (\\Exception $e){\n\n }\n\n $resultado=$analyticsData->rows[0][0];\n $condicion = $semaforo->condicion;\n\n $parametro = $semaforo->parametro;\n\n if($condicion == 1){\n //menor que\n if($resultado > $parametro){\n $count_semaforo++;\n $semaforo->estado = 1;\n $semaforo->obtained = $resultado=$analyticsData->rows[0][0];\n $semaforo->save();\n }else{\n $semaforo->estado = 0;\n $semaforo->obtained = $resultado=$analyticsData->rows[0][0];\n $semaforo->save();\n }\n }else if($condicion == 2){\n //mayor que\n if($resultado < $parametro){\n $count_semaforo++;\n $semaforo->estado = 1;\n $semaforo->obtained = $resultado=$analyticsData->rows[0][0];\n $semaforo->save();\n }else{\n $semaforo->estado = 0;\n $semaforo->obtained = $resultado=$analyticsData->rows[0][0];\n $semaforo->save();\n }\n }else if($condicion == 3){\n //igual que\n if($resultado != $parametro){\n $count_semaforo++;\n $semaforo->estado = 1;\n $semaforo->obtained = $resultado=$analyticsData->rows[0][0];\n $semaforo->save();\n }else{\n $semaforo->estado = 0;\n $semaforo->obtained = $resultado=$analyticsData->rows[0][0];\n $semaforo->save();\n }\n }\n\n }\n }\n\n if($count_semaforo < count($semaforos)*0.5){\n //Verde\n $cuenta->semaforo_state = 0;\n $cuenta->save();\n }else if($count_semaforo < count($semaforos)*0.7){\n //Amarillo\n $cuenta->semaforo_state = 1;\n $cuenta->save();\n }else if($count_semaforo < count($semaforos)){\n //Rojo\n $cuenta->semaforo_state = 2;\n $cuenta->save();\n }\n }\n }\n return response()->json(['success' => true]);\n }", "title": "" }, { "docid": "08b036f3123ed9fd9e703c7e392da75d", "score": "0.50532454", "text": "function restaInventario($articulo,$deposito,$proyecto,$cantidad) {\n\t\t$model=new Inventario();\n\n\t\t$conditions = array(\n\t\t\t'Inventario.IdArticulo' => $articulo,\n\t\t\t'Inventario.IdDeposito' => $deposito,\n\t\t\t'Inventario.IdProyecto' => $proyecto\n\t\t);\n\t\t//Tomo el inventario\n\t\t$inventario = $model->find('first',array('conditions' => $conditions));\n\t\t//resto\n\t\t$total = $inventario['Inventario']['Disponibilidad'] - $cantidad;\n\t\t//Valida que total no sea menor a 0\n\t\tif ($total < 0){\n\t\t\t$total = 0;\n\t\t}\n\n//\t\tif ( (!empty($proyecto)) && $total < 1){\n\t\tif ($total < 1){\n\t\t\t//Si no tengo stock en el proyecto o en el deposito lo borro\n\t\t\t$model->deleteAll($conditions);\n\t\t} else {\n\t\t\t//Actualizo el stock\n\t\t\t$model->updateAll(array('Disponibilidad'=>$total), $conditions);\n\t\t}\n\t}", "title": "" }, { "docid": "41761f0e32b6645444f3d87edda60a33", "score": "0.50406283", "text": "function vaciarColaEventosNT(){\n\t\t$conditions = array(\"enviado\" => 0);\n\t\t\t\n\t\t$eventos_a_enviar = $this->getColaEventosNT($conditions);\n\t\t$cant_eventos_enviados =0;\n\t\tforeach($eventos_a_enviar as $envio){\n\t\t\t$res = $this->generarEvento_DestinoRemoto($envio[\"id_instancia_remota\"],$envio[\"id_pedido\"],$envio[\"codigo_evento_local\"],$envio[\"observaciones\"],$envio[\"rol_local\"], $envio[\"nombre_archivo\"], $envio[\"id\"]);\n\t\t\tif (is_a($res, \"WS_Exception\")){\n\t\t\t\t//no hago nada. tampoco sumo $cant_eventos_enviados porq el evento no se pudo generar remotamente\n\t\t }elseif (is_a($res, \"Celsius_Exception\"))\n\t\t\t\treturn $res;\n\t\t\telse\n\t\t\t\t$cant_eventos_enviados++;\n\t\t}\n\t\treturn $cant_eventos_enviados;\n\t\t\n\t}", "title": "" }, { "docid": "f49562e128a232746fc4de3f052f8bee", "score": "0.50404274", "text": "function Reducir_Inventario($Id_Sucursal,$Id_Producto,$Valor_Descuento,$total_existencia){\r\n\t\t$reduccion = $total_existencia - $Valor_Descuento ;\r\n\t\techo $Id_Producto.\" Inventario : \".$total_existencia . \" - \".$Valor_Descuento. \" = \". ($total_existencia-$Valor_Descuento);\r\n\t\techo \"<br>\";\r\n\t\t$this->sucursales_model->setReduccionInventario($Id_Sucursal,$Id_Producto,$reduccion);\t\t\r\n\t}", "title": "" }, { "docid": "2ce9a27ca9093052158a06d20db35c59", "score": "0.50373554", "text": "private function verificaconsistencialotes(){\n\t$retorno=true;\n\t/*var_dump($this->oldAttributes);\nvar_dump($this->attributes);*/\n\t//var_dump($this->loteslifo);die();\n\t//VAR_DUMP($this->totallote);VAR_DUMP($this->getstockregistro());\n\tif($this->totallote > 0){\n\t\t$diferenciacantidad=abs($this->totallote-$this->getstockregistro());\n //VAR_DUMP($diferenciacantidad);die();\n\t\tif($diferenciacantidad/$this->getstockregistro() > $this->almacen->tolstockres){\n\t\t\t//echo 'La sumatoria del stock ('.$matriz[0]['scant'].') del lote no coincide con el stock ('.$valor.'=>'.$this->getstockregistro().') del registro inventario ('.$this->id.') ';die();\n\t\t\t//VAR_DUMP($this->almacen->tolstockres);VAR_DUMP($diferenciacantidad/$this->getstockregistro());\n\t\t\tMiFactoria::Mensaje('error',$this->identidada().' La sumatoria del stock ('.$this->totallote.') del lotes no coincide con el stock ('.$this->getstockregistro().') del registro inventario ('.$this->id.') ');\n\t\t\t$retorno=false;\n\t\t}\n\t\t/*$punitlotes=$this->lotescosteado/$this->totallote;\n\t\t$diferenciapunit=abs($this->punit-$punitlotes);\n\t\tif($diferenciapunit/$this->punit > 0.001 ){\n\t\t\t//echo 'El precio unitario ('.$preciounitario.') del inventario, no coincide con el precio unitario ('.$this->punit.') calculado del lote del registro inventario ('.$this->id.') ';die();\n\t\t\tMiFactoria::Mensaje('error','El precio unitario ('.$this->punit.') del inventario, no coincide con el precio unitario ('.$punitlotes.') calculado del lote del registro inventario ('.$this->id.') ');\n\t\t\t$retorno=false;\n\t\t}*/\n\t} else{\n\t\tif( $this->getstockregistro()>0 ){$retorno=false;}\n\t}\n\treturn $retorno;\n}", "title": "" }, { "docid": "3abc2e9262d77731c73f89dcbc51f68a", "score": "0.50357723", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->p90_emiterecib = ($this->p90_emiterecib == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"p90_emiterecib\"]:$this->p90_emiterecib);\n $this->p90_alteracgmprot = ($this->p90_alteracgmprot == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"p90_alteracgmprot\"]:$this->p90_alteracgmprot);\n $this->p90_valcpfcnpj = ($this->p90_valcpfcnpj == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"p90_valcpfcnpj\"]:$this->p90_valcpfcnpj);\n $this->p90_impusuproc = ($this->p90_impusuproc == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"p90_impusuproc\"]:$this->p90_impusuproc);\n $this->p90_debiaber = ($this->p90_debiaber == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"p90_debiaber\"]:$this->p90_debiaber);\n $this->p90_taxagrupo = ($this->p90_taxagrupo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"p90_taxagrupo\"]:$this->p90_taxagrupo);\n $this->p90_histpadcert = ($this->p90_histpadcert == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"p90_histpadcert\"]:$this->p90_histpadcert);\n $this->p90_despachoob = ($this->p90_despachoob == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"p90_despachoob\"]:$this->p90_despachoob);\n $this->p90_minchardesp = ($this->p90_minchardesp == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"p90_minchardesp\"]:$this->p90_minchardesp);\n $this->p90_andatual = ($this->p90_andatual == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"p90_andatual\"]:$this->p90_andatual);\n $this->p90_traminic = ($this->p90_traminic == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"p90_traminic\"]:$this->p90_traminic);\n $this->p90_modelcapaproc = ($this->p90_modelcapaproc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"p90_modelcapaproc\"]:$this->p90_modelcapaproc);\n $this->p90_imprimevar = ($this->p90_imprimevar == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"p90_imprimevar\"]:$this->p90_imprimevar);\n $this->p90_instit = ($this->p90_instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"p90_instit\"]:$this->p90_instit);\n $this->p90_impdepto = ($this->p90_impdepto == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"p90_impdepto\"]:$this->p90_impdepto);\n $this->p90_db_documentotemplate = ($this->p90_db_documentotemplate == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"p90_db_documentotemplate\"]:$this->p90_db_documentotemplate);\n }else{\n }\n }", "title": "" }, { "docid": "e039c0fa78edade8f811664494d1bbe3", "score": "0.503563", "text": "public static function TraerCantidadPatenteIngresoFechas($patenteAux,$desde,$hasta)\n {\n $objetoAccesoDatos = AccesoDatos::dameUnObjetoAcceso();\n if ($desde !=\"\" && $hasta == \"\") {\n $consulta = $objetoAccesoDatos->RetornarConsulta(\"SELECT COUNT(*) as cantVisita FROM estacionados WHERE patente=:patente AND `fechaHoraIngreso` >=:desde\");\n $consulta->bindValue(\":desde\", $desde, PDO::PARAM_STR);\n $consulta->bindValue(\":patente\", $patenteAux, PDO::PARAM_STR);\n }\n if ($desde ==\"\"&& $hasta !=\"\") {\n $consulta = $objetoAccesoDatos->RetornarConsulta(\"SELECT COUNT(*) as cantVisita FROM estacionados WHERE patente=:patente AND`fechaHoraIngreso` <=:hasta\");\n $consulta->bindValue(\":hasta\", $hasta, PDO::PARAM_STR);\n $consulta->bindValue(\":patente\", $patenteAux, PDO::PARAM_STR);\n }\n if ($desde !=\"\" && $hasta !=\"\") {\n $consulta = $objetoAccesoDatos->RetornarConsulta(\"SELECT COUNT(*) as cantVisita FROM estacionados WHERE patente=:patente AND `fechaHoraIngreso` BETWEEN :desde AND :hasta\");\n $consulta->bindValue(\":desde\", $desde, PDO::PARAM_STR);\n $consulta->bindValue(\":hasta\", $hasta, PDO::PARAM_STR);\n $consulta->bindValue(\":patente\", $patenteAux, PDO::PARAM_STR);\n }\n if ($desde ==\"\" && $hasta ==\"\") {\n $ahora= date(\"Y-m-d 23:59:59\");\n $consulta = $objetoAccesoDatos->RetornarConsulta(\"SELECT COUNT(*) as cantVisita FROM estacionados WHERE patente=:patente AND `fechaHoraIngreso` <=:hasta\");\n $consulta->bindValue(\":hasta\", $ahora, PDO::PARAM_STR);\n $consulta->bindValue(\":patente\", $patenteAux, PDO::PARAM_STR);\n } \n $consulta->setFetchMode(PDO::FETCH_ASSOC);\n $consulta->execute();\n if($consulta->rowCount() == 0){\n return false; \n }\n return $consulta->fetchAll();\n }", "title": "" }, { "docid": "14f047beae28e012de1282e6d15fc12e", "score": "0.50256604", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->x24_matric = ($this->x24_matric == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x24_matric\"]:$this->x24_matric);\n $this->x24_exerc = ($this->x24_exerc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x24_exerc\"]:$this->x24_exerc);\n $this->x24_mes = ($this->x24_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x24_mes\"]:$this->x24_mes);\n $this->x24_nome = ($this->x24_nome == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x24_nome\"]:$this->x24_nome);\n $this->x24_codrua = ($this->x24_codrua == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x24_codrua\"]:$this->x24_codrua);\n $this->x24_nomerua = ($this->x24_nomerua == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x24_nomerua\"]:$this->x24_nomerua);\n $this->x24_numero = ($this->x24_numero == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x24_numero\"]:$this->x24_numero);\n $this->x24_complemento = ($this->x24_complemento == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x24_complemento\"]:$this->x24_complemento);\n $this->x24_zona = ($this->x24_zona == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x24_zona\"]:$this->x24_zona);\n $this->x24_rota = ($this->x24_rota == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x24_rota\"]:$this->x24_rota);\n $this->x24_pagina = ($this->x24_pagina == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x24_pagina\"]:$this->x24_pagina);\n $this->x24_nrohidro = ($this->x24_nrohidro == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"x24_nrohidro\"]:$this->x24_nrohidro);\n }else{\n }\n }", "title": "" }, { "docid": "565f4a193a8b2cda9c5565f872af8468", "score": "0.50204307", "text": "function ciar_ec_non_gere_dans_descendance($id_rubrique){\n\t$return = false;\n\t\n\t$id_rubrique = intval($id_rubrique);\n\tif ($id_rubrique>0){\n\t\t$where = sql_in('id_rubrique', ciar_descendance($id_rubrique));\n\t\t$result = sql_select(\"*\",\"spip_ciar_rubriques_protection\", $where.\" AND acces_restreint='_acces_indiv'\",\"\",\"\");\n\t\twhile ($row = sql_fetch($result)) {\n\t\t\tif (!autoriser('ecmodifier','rubrique',$row['id_rubrique'])) {\n\t\t\t\t$return = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $return;\n}", "title": "" }, { "docid": "68becc57782f94fc2c06e022cc96c101", "score": "0.5017014", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->e35_sequencial = ($this->e35_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e35_sequencial\"]:$this->e35_sequencial);\n $this->e35_numemp = ($this->e35_numemp == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e35_numemp\"]:$this->e35_numemp);\n $this->e35_usuario = ($this->e35_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e35_usuario\"]:$this->e35_usuario);\n $this->e35_hora = ($this->e35_hora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e35_hora\"]:$this->e35_hora);\n if($this->e35_data == \"\"){\n $this->e35_data_dia = ($this->e35_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e35_data_dia\"]:$this->e35_data_dia);\n $this->e35_data_mes = ($this->e35_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e35_data_mes\"]:$this->e35_data_mes);\n $this->e35_data_ano = ($this->e35_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e35_data_ano\"]:$this->e35_data_ano);\n if($this->e35_data_dia != \"\"){\n $this->e35_data = $this->e35_data_ano.\"-\".$this->e35_data_mes.\"-\".$this->e35_data_dia;\n }\n }\n $this->e35_tipo = ($this->e35_tipo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e35_tipo\"]:$this->e35_tipo);\n $this->e35_situacao = ($this->e35_situacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e35_situacao\"]:$this->e35_situacao);\n }else{\n $this->e35_sequencial = ($this->e35_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"e35_sequencial\"]:$this->e35_sequencial);\n }\n }", "title": "" }, { "docid": "96a59182cca1a553552084c173fdc6cd", "score": "0.5011991", "text": "function cancel_reservation_invoices($res_id) {\n db_query(\"UPDATE invoice SET status=\".INV_STATUS_CANCELLED.\" WHERE status >= \".INV_STATUS_DRAFT.\" AND status <= \".INV_STATUS_SENT.\" AND res_id=$res_id\"); \n}", "title": "" }, { "docid": "c4a90a6a4412d7d05af35b940baa4657", "score": "0.50110275", "text": "function organizarNotasPorEstudiante(){\n\t\tforeach($this->notasPerdidas as $clave=>$valor){\n\t\t\t$this->registroNotasPerdidasPorEstudiante[$valor['COD_ESTUDIANTE']][$valor['COD_ASIGNATURA']][$valor['ANIOPERIODO']][]=$valor['NOTA'];\n\t\t}\n\t}", "title": "" }, { "docid": "c49fe6f8067a6262e4f35254eb5395f8", "score": "0.50091267", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->v71_sequencial = ($this->v71_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v71_sequencial\"]:$this->v71_sequencial);\n $this->v71_id_usuario = ($this->v71_id_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v71_id_usuario\"]:$this->v71_id_usuario);\n $this->v71_inicial = ($this->v71_inicial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v71_inicial\"]:$this->v71_inicial);\n $this->v71_processoforo = ($this->v71_processoforo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v71_processoforo\"]:$this->v71_processoforo);\n if($this->v71_data == \"\"){\n $this->v71_data_dia = ($this->v71_data_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v71_data_dia\"]:$this->v71_data_dia);\n $this->v71_data_mes = ($this->v71_data_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v71_data_mes\"]:$this->v71_data_mes);\n $this->v71_data_ano = ($this->v71_data_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v71_data_ano\"]:$this->v71_data_ano);\n if($this->v71_data_dia != \"\"){\n $this->v71_data = $this->v71_data_ano.\"-\".$this->v71_data_mes.\"-\".$this->v71_data_dia;\n }\n }\n $this->v71_anulado = ($this->v71_anulado == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v71_anulado\"]:$this->v71_anulado);\n }else{\n $this->v71_sequencial = ($this->v71_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"v71_sequencial\"]:$this->v71_sequencial);\n }\n }", "title": "" }, { "docid": "dc5ee75c249db9448566065f0f767c6c", "score": "0.5000416", "text": "public function contadoresEst($establecimiento_id)\n {\n //$dia_actual = date(\"d\"); //j Día del mes sin ceros iniciales 1 a 31\n //d Día del mes, 2 dígitos con ceros iniciales 01 a 31\n ///$mes_actual = date(\"m\");\n //$anio_actual = date(\"Y\");\n\n $pedidos_curso = \\App\\Ruta::where('establecimiento_id',$establecimiento_id)\n ->where('despachado',1)\n ->whereHas('pedido', function ($query) {\n $query->where('estado_pago','aprobado');\n })\n ->where(DB::raw('DAY(created_at)'),DB::raw('DAY(now())'))\n ->where(DB::raw('MONTH(created_at)'),DB::raw('MONTH(now())'))\n ->where(DB::raw('YEAR(created_at)'),DB::raw('YEAR(now())'))\n ->count();\n\n $pedidos_finalizados = \\App\\Ruta::where('establecimiento_id',$establecimiento_id)\n ->where('despachado',2)\n ->whereHas('pedido', function ($query) {\n $query->where('estado_pago','aprobado');\n })\n ->where(DB::raw('DAY(created_at)'),DB::raw('DAY(now())'))\n ->where(DB::raw('MONTH(created_at)'),DB::raw('MONTH(now())'))\n ->where(DB::raw('YEAR(created_at)'),DB::raw('YEAR(now())'))\n ->count();\n\n $pagos_registrados = \\App\\Pago::where('establecimiento_id',$establecimiento_id)\n ->where(DB::raw('DAY(created_at)'),DB::raw('DAY(now())'))\n ->where(DB::raw('MONTH(created_at)'),DB::raw('MONTH(now())'))\n ->where(DB::raw('YEAR(created_at)'),DB::raw('YEAR(now())'))\n ->count();\n\n $rutas_pedidos = \\App\\Ruta::select('id', 'pedido_id', 'establecimiento_id')\n ->where('establecimiento_id',$establecimiento_id)\n ->whereHas('pedido', function ($query) {\n $query->where('estado_pago','aprobado');\n })\n ->where(DB::raw('DAY(created_at)'),DB::raw('DAY(now())'))\n ->where(DB::raw('MONTH(created_at)'),DB::raw('MONTH(now())'))\n ->where(DB::raw('YEAR(created_at)'),DB::raw('YEAR(now())'))\n ->get();\n\n $aux = [];\n for ($i=0; $i < count($rutas_pedidos); $i++) { \n array_push($aux, $rutas_pedidos[$i]->pedido_id);\n }\n\n $pedidos = \\App\\Pedido::select('id', 'usuario_id', 'repartidor_id')\n //->with('productos')\n ->with(['productos' => function ($query) use ($establecimiento_id){\n $query->where('establecimiento_id', $establecimiento_id);\n }])\n ->whereIn('id',$aux)\n ->get();\n\n $dinero_recaudado = 0;\n for ($i=0; $i <count($pedidos) ; $i++) { \n for ($j=0; $j < count($pedidos[$i]->productos) ; $j++) { \n $dinero_recaudado += $pedidos[$i]->productos[$j]->pivot->precio_unitario * \n $pedidos[$i]->productos[$j]->pivot->cantidad;\n }\n }\n\n return response()->json(['pedidos_curso'=>$pedidos_curso,\n 'pedidos_finalizados'=>$pedidos_finalizados,\n 'pagos_registrados'=>$pagos_registrados,\n 'dinero_recaudado'=>$dinero_recaudado], 200);\n\n }", "title": "" }, { "docid": "a5fadacfe7215ff72c6973ab50f72cf3", "score": "0.4984746", "text": "public function foundIndicador():void{\n foreach ($this->estudiantes as $estudiante){\n $isFound = false;\n foreach ($this->indicadores->getIndicadores() as $indicador){\n if (count($this->getNotaExist($estudiante,$indicador)) > 0){\n $isFound = true;\n }\n }\n if (!$isFound){\n $this->estudiante = $estudiante;\n $this->createNotaAndDefinitivaAndInasistencia($this->estudiante);\n }\n }\n }", "title": "" }, { "docid": "7523276705b06b4b64af64d4bc357656", "score": "0.49791658", "text": "function descontarSaldoClientes(){\n\t$clientes = getClientesActivos();\n\t\n\tif (!empty($clientes)) {\n\t\tforeach ($clientes as $key => $cliente) {\n\t\t\t$variacion = getCostoVariationID($cliente->producto_id);\n\t\t\t$adicionales = unserialize(getIngredientesAdicionales($cliente->cliente_id));\n\n\t\t\t$porCobrar = $variacion->costoSemanal + $adicionales['total_adicionales'];\n\t\t\t$saldoFinal = $cliente->saldo - $porCobrar;\n\t\t\tif($porCobrar <= $cliente->saldo){\n\t\t\t\tupdateSaldoCliente($cliente->cliente_id, $saldoFinal);\n\t\t\t\tstoreCanastaAlCorteCliente($cliente, $variacion, $adicionales);\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "7aa92b02d0759ee5caf869cb349ac61e", "score": "0.49763295", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->j52_matric = ($this->j52_matric == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_matric\"]:$this->j52_matric);\n $this->j52_idcons = ($this->j52_idcons == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_idcons\"]:$this->j52_idcons);\n $this->j52_ano = ($this->j52_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_ano\"]:$this->j52_ano);\n $this->j52_area = ($this->j52_area == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_area\"]:$this->j52_area);\n $this->j52_areap = ($this->j52_areap == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_areap\"]:$this->j52_areap);\n if($this->j52_dtlan == \"\"){\n $this->j52_dtlan_dia = ($this->j52_dtlan_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_dtlan_dia\"]:$this->j52_dtlan_dia);\n $this->j52_dtlan_mes = ($this->j52_dtlan_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_dtlan_mes\"]:$this->j52_dtlan_mes);\n $this->j52_dtlan_ano = ($this->j52_dtlan_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_dtlan_ano\"]:$this->j52_dtlan_ano);\n if($this->j52_dtlan_dia != \"\"){\n $this->j52_dtlan = $this->j52_dtlan_ano.\"-\".$this->j52_dtlan_mes.\"-\".$this->j52_dtlan_dia;\n }\n }\n $this->j52_codigo = ($this->j52_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_codigo\"]:$this->j52_codigo);\n $this->j52_numero = ($this->j52_numero == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_numero\"]:$this->j52_numero);\n $this->j52_compl = ($this->j52_compl == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_compl\"]:$this->j52_compl);\n if($this->j52_dtdemo == \"\"){\n $this->j52_dtdemo_dia = ($this->j52_dtdemo_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_dtdemo_dia\"]:$this->j52_dtdemo_dia);\n $this->j52_dtdemo_mes = ($this->j52_dtdemo_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_dtdemo_mes\"]:$this->j52_dtdemo_mes);\n $this->j52_dtdemo_ano = ($this->j52_dtdemo_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_dtdemo_ano\"]:$this->j52_dtdemo_ano);\n if($this->j52_dtdemo_dia != \"\"){\n $this->j52_dtdemo = $this->j52_dtdemo_ano.\"-\".$this->j52_dtdemo_mes.\"-\".$this->j52_dtdemo_dia;\n }\n }\n $this->j52_idaument = ($this->j52_idaument == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_idaument\"]:$this->j52_idaument);\n }else{\n $this->j52_matric = ($this->j52_matric == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_matric\"]:$this->j52_matric);\n $this->j52_idcons = ($this->j52_idcons == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"j52_idcons\"]:$this->j52_idcons);\n }\n }", "title": "" }, { "docid": "7580ca9613faf45ef4d4a3ba9380b9a3", "score": "0.4969411", "text": "public function search_schedule(Request $request){//busca el horario del medico para agendar cita\n // dd($request->id);\n $employe = Employe::with('schedule')->where('id', $request->id)->first();\n // dd($employe->schedule);\n $available = collect([]);\n // dd($available);\n if (!is_null($employe)) {\n if (!is_null($employe->schedule)) {\n foreach ($employe->schedule as $schedule) {\n $date[] = new Carbon('next ' . $schedule->day);\n $quota[] = $schedule->quota;\n }\n\n for ($i = 0; $i < count($date); $i++) {\n /**\n * El 12 del ciclo for j,\n * hace referencia a 12 semanas que es la mayor\n * anticipacion a la q se puede tener una cita\n */\n for ($j= 0; $j < 12; $j++) {\n $citesToday = Reservation::whereDate('date', $date[$i])->where('approved', '!=', null)->get()->count();\n if ($citesToday < $quota[$i]) {\n $available->push((Carbon::create($date[$i]->year, $date[$i]->month, $date[$i]->day)));\n $prueba [] = array((Carbon::create($date[$i]->year, $date[$i]->month, $date[$i]->day)));\n }\n $date[$i] = $date[$i]->addWeek();\n }\n }\n\n $total = $available->first()->diffInDays($available->last());\n // dd($total);\n $not = collect([]);\n $min = Carbon::create($available->min()->year, $available->min()->month, $available->min()->day)->addDay();\n\n for ($i=0; $i <$total ; $i++) {\n $not->push(Carbon::create($min->year, $min->month, $min->day));\n $min->addDay();\n }\n\n $diff = $not->diff($available);\n\n $diff = $diff->map(function($d)\n {\n return $d->format('m/d/Y');\n });\n\n foreach ($diff as $d) {\n $dates[] = $d;\n }\n\n return response()->json([\n 'employe' => $employe,\n 'available' => $available,\n 'start' => $available->min()->format('m/d/Y'),\n 'end' => $available->max()->format('m/d/Y'),\n 'diff' => $dates,\n 'prueba' => $prueba,\n ]);\n\n }else{\n return response()->json([\n 'message' => 'Medico sin horario',\n ]);\n }\n }else{\n return response()->json([\n 'message' => 'Medico no encontrado',\n ]);\n }\n }", "title": "" }, { "docid": "bf664c8c70aad803dacd546a6bd9c3bc", "score": "0.49570066", "text": "public function cleanupCalculate() {\n\t\tif ( $this->attr_data->type == 'dollar'\n\t\t\t&& ! empty( $this->workArea()->largest_line_id ) \n\t\t\t) { \n\t\t\t$order = $this->engine->getOrderDiscount($this->discount_id);\n\t\t\t$us = \\Models\\DiscountEngine::price_round($this->__getEndSumShouldEqualAmount());\n\t\t\tif ( $order != $us ) {\n\t\t\t\t$this->engine->setLineDiscount(\n\t\t\t\t\t$this->workArea()->largest_line_id,\n\t\t\t\t\t$this->discount_id,\n\t\t\t\t\t\\Models\\DiscountEngine::price_round(\n\t\t\t\t\t\t$this->engine->getLineDiscount($this->workArea()->largest_line_id,$this->discount_id)\n\t\t\t\t\t\t+ ($us - $order)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c59ee9d4d64ccd4c7e06da398a257fd1", "score": "0.49559808", "text": "public function calculaCuentaRegresiva($p,$bundleActual) {\n \n $comienzo=$p->getComienzo();\n $tiemporeal=$p->getTiemporeal();\n $fa=new \\DateTime(\\date(\"d-m-Y G:i:s\"));\n\n //renombro los tipos de tiempo para puder hacer la sumatoria\n if($p->getTipotiempo()==1)$tt='day';\n else if($p->getTipotiempo()==2)$tt='hour';\n else if($p->getTipotiempo()==3)$tt='minute';\n \n //sumo el tiempo estimado a la fecha de comienzo para saber el tota\n $tiempoestimado = strtotime ( '+'.$p->getTiempoestimado().' '.$tt , strtotime ( $comienzo->format(\"d-m-Y G:i:s\") ) ) ;\n\n //si hay un tiempo real\n if($tiemporeal!=null){\n \n \n //sumo el tiempo utilizado a la fecha actual y obtengo el utilizado\n $tiemporeal= explode(\"-\", $tiemporeal);\n $diasegundo=$tiemporeal[0]*86400;\n $horasegundo=$tiemporeal[1]*3600;\n $minutosegundo=$tiemporeal[2]*60;\n $segundototal=$diasegundo+$horasegundo+$minutosegundo+$tiemporeal[3];\n\n $tiempoconsumido = strtotime ( '+'.$segundototal.' second' , strtotime ( $fa->format(\"d-m-Y G:i:s\") ) ) ;\n\n\n //si la actividad ya se ha retrasado coloco 0 en la cuenta regresiva\n if($tiempoconsumido>$tiempoestimado)\n $cuentaregresiva=\"00-00-00-00\";\n else{\n\n //convierto ambas fecha para poder hacer un diff\n $tiempoestimado = date ( 'Y-m-d G:i:s' , $tiempoestimado );\n $tiempoestimado=new \\DateTime($tiempoestimado);\n\n $tiempoconsumido = date ( 'Y-m-d G:i:s' , $tiempoconsumido );\n $tiempoconsumido=new \\DateTime($tiempoconsumido);\n \n $intervalo=$tiempoestimado->diff($tiempoconsumido);\n\n $cuentaregresiva=str_pad($intervalo->d,2,\"0\",STR_PAD_LEFT).'-'.str_pad($intervalo->h,2,\"0\",STR_PAD_LEFT).'-'.str_pad($intervalo->i,2,\"0\",STR_PAD_LEFT).'-'.str_pad($intervalo->s,2,\"0\",STR_PAD_LEFT);\n }\n } else{\n \n //aca calculo el tiempo transcurrido cuando la actividad no ha sido pausada\n //calculo el tiempo estimado sumando el tiempo de la actividad a la fecha de comienzo\n //luego hago un dif entre el tiempo estimado y la fecha actual\n\n $tiempoactual=strtotime ( $fa->format(\"d-m-Y G:i:s\") );\n \n if($tiempoactual>$tiempoestimado)\n $cuentaregresiva=\"00-00-00-00\";\n else{\n \n $tiempoestimado = date ( 'Y-m-d G:i:s' , $tiempoestimado );\n $tiempoestimado=new \\DateTime($tiempoestimado);\n\n $intervalo=$tiempoestimado->diff($fa);\n\n $cuentaregresiva=str_pad($intervalo->d,2,\"0\",STR_PAD_LEFT).'-'.str_pad($intervalo->h,2,\"0\",STR_PAD_LEFT).'-'.str_pad($intervalo->i,2,\"0\",STR_PAD_LEFT).'-'.str_pad($intervalo->s,2,\"0\",STR_PAD_LEFT);\n }\n \n }\n return $cuentaregresiva;\n \n }", "title": "" }, { "docid": "642cb0d0c04e4df82753fcbbe9c1f305", "score": "0.49557444", "text": "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->db148_sequencial = ($this->db148_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db148_sequencial\"]:$this->db148_sequencial);\n $this->db148_nome = ($this->db148_nome == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db148_nome\"]:$this->db148_nome);\n $this->db148_descricao = ($this->db148_descricao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db148_descricao\"]:$this->db148_descricao);\n $this->db148_formula = ($this->db148_formula == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db148_formula\"]:$this->db148_formula);\n $this->db148_ambiente = ($this->db148_ambiente == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db148_ambiente\"]:$this->db148_ambiente);\n }else{\n $this->db148_sequencial = ($this->db148_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"db148_sequencial\"]:$this->db148_sequencial);\n }\n }", "title": "" }, { "docid": "e923c92a7e88e3ac5f95a131f9b946e3", "score": "0.49531126", "text": "function validarFechaVacacion(){\n //echoo($_REQUEST);\n //$ID_PDECLARACION = $_REQUEST['id_pdeclaracion'];\n $PERIODO = $_REQUEST['periodo'];\n $id_trabajador = $_REQUEST['id_trabajador'];\n $anio = getFechaPatron($PERIODO, 'Y');\n \n $inicio = getFechaPatron($_REQUEST['fecha_inicio'], \"Y-m-d\") ;\n $fin = getFechaPatron($_REQUEST['fecha_fin'], \"Y-m-d\"); \n $rangoDeFecha =rangoDeFechas($inicio, $fin, \"Y-m-d\");\n \n // buscar id_pdeclaracion UNICO POR ANIO.\n $daov = new VacacionDao();\n $id_pdeclaracion_vacacion_base = $daov->getPdeclaracionBase($id_trabajador,$anio); \n \n $data = $daov->fechasDevacacionesTrabajador($id_trabajador, $id_pdeclaracion_vacacion_base/*$ID_PDECLARACION*/); \n $flag = false;\n \n \n for($i=0;$i<count($data);$i++){\n $rangoFechaVd = rangoDeFechas($data[$i]['fecha_inicio'], $data[$i]['fecha_fin'], \"Y-m-d\");\n $counter_rangoDeFecha = count($rangoDeFecha);\n \n $diferencia = array_diff($rangoDeFecha, $rangoFechaVd);\n $counter_diferencia = count($diferencia);\n \n if($counter_rangoDeFecha != $counter_diferencia){\n $flag = true;\n break;\n } \n\n }\n \n \n if($flag){\n $response->rpta = false;\n $response->mensaje = \"El rango de las fechas enviadas.\\ncoincide con una fecha de vacacion ya registrada.\\ncorrija los datos\"; \n\n }else{\n $response->rpta = true;\n $response->mensaje =\"no existen\";\n }\n \n return $response; \n}", "title": "" }, { "docid": "da7d45c035e4dd175926b0975354c6d3", "score": "0.49527577", "text": "public function cashClosure($date) {\n// $date = Carbon::parse($date);\n $cajas = Caja::all();\n $compras = CompraVenta::join('compras','compras.id_compra_venta', '=', 'compras_ventas.id')\n ->where('nulo',0)\n ->whereBetween('fecha_hora', [$date . ' 00:00:00', $date . ' 23:59:59']);\n $ventas = CompraVenta::join('ventas','ventas.id_compra_venta', '=', 'compras_ventas.id')\n ->where('nulo',0)\n ->whereBetween('fecha_hora', [$date . ' 00:00:00', $date . ' 23:59:59']);\n// $_totalCompras = $_totalCreditos = $_totalDepositos = $_totalRetiros = 0;\n foreach ($cajas as $caja) {\n $compras_copy_1 = clone $compras;\n $compras_copy_2 = clone $compras;\n $compras_copy_3 = clone $compras;\n $ventas_copy_1 = clone $ventas;\n $ventas_copy_2 = clone $ventas;\n $ventas_copy_3 = clone $ventas;\n $caja->totalCompras = $compras_copy_1->where('caja_id',$caja->id)\n ->where('tipo','co')\n ->get()->sum('total');\n $pagos = 0;\n $compras_copy_2 = $compras_copy_2->where('caja_id',$caja->id)\n ->where('tipo','co')\n ->get();\n foreach ($compras_copy_2 as $value) {\n $pagos += $value->pagos->sum('cuota');\n }\n $caja->totalCompras -= $pagos;\n /*$caja->totalCreditosCompras = $compras_copy_2->where('caja_id',$caja->id)\n ->where('tipo','cr')\n ->get()->sum('total');*/\n $compras_copy_3 = $compras_copy_3->where('caja_id',$caja->id)\n ->where('tipo','cr')\n ->get();\n $total = 0;\n foreach ($compras_copy_3 as $compra) {\n $total += $compra->pagos()\n ->whereBetween('pagos.fecha_hora', [$date . ' 00:00:00', $date . ' 23:59:59'])\n ->get()->sum('cuota');\n }\n $caja->totalPagosCompras = $total;\n\n $caja->totalVentas = $ventas_copy_1->where('caja_id',$caja->id)\n ->where('tipo','co')\n ->get()->sum('total');\n /*$caja->totalCreditosVentas = $ventas_copy_2->where('caja_id',$caja->id)\n ->where('tipo','cr')\n ->get()->sum('total');*/\n $ventas_copy_3 = $ventas_copy_3->where('caja_id',$caja->id)\n ->where('tipo','cr')\n ->get();\n $total = 0;\n foreach ($ventas_copy_3 as $venta) {\n $total += $venta->pagos->sum('cuota');\n }\n $caja->totalPagosVentas = $total;\n\n $_caja = $caja->cuentas()\n ->wherePivot('fecha_hora','>=',$date . ' 00:00:00')\n ->wherePivot('fecha_hora','<=',$date . ' 23:59:59');\n $caja_copy_1 = clone $_caja;\n $caja_copy_2 = clone $_caja;\n\n $caja->totalDepositos = $caja_copy_1->wherePivot('tipo','d')->get()->sum('pivot.monto');\n $caja->totalRetiros = $caja_copy_2->wherePivot('tipo','r')->get()->sum('pivot.monto');\n }\n $compras = CompraVenta::join('compras','compras.id_compra_venta', '=', 'compras_ventas.id')\n ->where('nulo',0)\n ->where('fecha_hora','>',$date . ' 23:59:59');\n $ventas = CompraVenta::join('ventas','ventas.id_compra_venta', '=', 'compras_ventas.id')\n ->where('nulo',0)\n ->where('fecha_hora','>',$date . ' 23:59:59');\n foreach ($cajas as $caja) {\n $compras_copy_1 = clone $compras;\n $compras_copy_2 = clone $compras;\n $compras_copy_3 = clone $compras;\n $ventas_copy_1 = clone $ventas;\n $ventas_copy_2 = clone $ventas;\n $ventas_copy_3 = clone $ventas;\n $caja->_totalCompras = $compras_copy_1->where('caja_id',$caja->id)\n ->where('tipo','co')\n ->get()->sum('total');\n $pagos = 0;\n $compras_copy_2 = $compras_copy_2->where('caja_id',$caja->id)\n ->where('tipo','co')\n ->get();\n foreach ($compras_copy_2 as $value) {\n $pagos += $value->pagos->sum('cuota');\n }\n $caja->_totalCompras -= $pagos;\n /*$caja->_totalCreditosCompras = $compras_copy_2->where('caja_id',$caja->id)\n ->where('tipo','cr')\n ->get()->sum('total');*/\n $compras_copy_3 = $compras_copy_3->where('caja_id',$caja->id)\n ->where('tipo','cr')\n ->get();\n $total = 0;\n foreach ($compras_copy_3 as $compra) {\n $total += $compra->pagos()->where('pagos.fecha_hora','>',$date . ' 23:59:59')->get()->sum('cuota');\n }\n $caja->_totalPagosCompras = $total;\n\n $caja->_totalVentas = $ventas_copy_1->where('caja_id',$caja->id)\n ->where('tipo','co')\n ->get()->sum('total');\n /*$caja->_totalCreditosVentas = $ventas_copy_2->where('caja_id',$caja->id)\n ->where('tipo','cr')\n ->get()->sum('total');*/\n $ventas_copy_3 = $ventas_copy_3->where('caja_id',$caja->id)\n ->where('tipo','cr')\n ->get();\n $total = 0;\n foreach ($ventas_copy_3 as $venta) {\n $total += $venta->pagos->sum('cuota');\n }\n $caja->_totalPagosVentas = $total;\n\n $_caja = $caja->cuentas()\n ->wherePivot('fecha_hora','>',$date . ' 23:59:59');\n $caja_copy_1 = clone $_caja;\n $caja_copy_2 = clone $_caja;\n\n $caja->_totalDepositos = $caja_copy_1->wherePivot('tipo','d')->get()->sum('pivot.monto');\n $caja->_totalRetiros = $caja_copy_2->wherePivot('tipo','r')->get()->sum('pivot.monto');\n }\n $outputData = [];\n foreach ($cajas as $caja) {\n $ganancias = $caja->_totalVentas+$caja->_totalPagosVentas;\n $inversion = $caja->_totalCompras+$caja->_totalPagosCompras;\n $efectivo_ajustado_fecha = $caja->efectivo - $ganancias + $inversion + $caja->_totalRetiros - $caja->_totalDepositos;\n\n $comprasEfectivo = $caja->totalCompras + $caja->totalPagosCompras;\n $ventasEfectivo = $caja->totalVentas + $caja->totalPagosVentas;\n $prepareOutputData = [\n 'compras' => $comprasEfectivo,\n 'ventas' => $ventasEfectivo,\n 'depositos' => $caja->totalDepositos,\n 'retiros' => $caja->totalRetiros,\n 'efectivo_inicio_caja' => $efectivo_ajustado_fecha-$ventasEfectivo\n +$comprasEfectivo-$caja->totalDepositos+$caja->totalRetiros,\n 'efectivo_caja' => $efectivo_ajustado_fecha,\n ];\n array_push($outputData, $prepareOutputData);\n }\n// $cajas->comprasVentas;\n /*$compras = CompraVenta::join('compras', 'compras.id_compra_venta', '=', 'compras_ventas.id')\n ->whereBetween('fecha_hora', [$date . ' 00:00:00', $date . ' 23:59:59']);*/\n /*$cajas = Caja::join('compras_ventas','compras_ventas.caja_id', '=', 'cajas.id')\n ->where('nulo',0)\n ->whereBetween('fecha_hora', [$date . ' 00:00:00', $date . ' 23:59:59']);*/\n return response()->json($outputData);\n }", "title": "" } ]
a55ec8f7b640b254ed014aea1eb69904
Setzt den Wert aus dem Formular
[ { "docid": "13db36756abc97dc55084084415472c3", "score": "0.5449095", "text": "function fset($bez, $val = \"\")\r\n\t{\r\n\t\tglobal $myRequest;\r\n\t\tif ($val == \"\")\r\n\t\t{\r\n\t\t\t$val = $bez;\r\n\t\t}\r\n\t\t$this->props[$bez] = $myRequest->get($this->formid.$val);\r\n\t}", "title": "" } ]
[ { "docid": "b161e004eba02d15b98f8b71e449433e", "score": "0.6667054", "text": "public function set($name, $form){ }", "title": "" }, { "docid": "58865a8057560e91222abe65dcc66c3c", "score": "0.6625846", "text": "function setFromForm(){\n\t\t$this->setId(getVar(\"id\"));\n\t\t$this->setNumber(getVar(\"number\"));\n\t}", "title": "" }, { "docid": "0e338245724cc1528fec99e43eb25a59", "score": "0.66179055", "text": "public function setFormFields();", "title": "" }, { "docid": "a2d6d34f230c743d767d097776c16a24", "score": "0.63860345", "text": "function form_init_data()\r\n {\r\n $this->set_hidden_element_value('_action', FT_ACTION_UPDATE) ;\r\n $this->set_hidden_element_value('swimmerid', $this->getSwimmerId()) ;\r\n\r\n $swimmer = new Swimmer() ;\r\n $swimmer->LoadSwimmerById($this->getSwimmerId()) ;\r\n\r\n $this->set_element_value('First Name', $swimmer->getSwimmerFirstName()) ;\r\n $this->set_element_value('Middle Name', $swimmer->getSwimmerMiddleName()) ;\r\n $this->set_element_value('Last Name', $swimmer->getSwimmerLastName()) ;\r\n $this->set_element_value('Gender', $swimmer->getGender()) ;\r\n $this->set_element_value('USS', $swimmer->getUSS()) ;\r\n $this->set_element_value('USS New', $swimmer->getUSSNew()) ;\r\n\r\n $date = $swimmer->getBirthDate(false) ;\r\n $this->set_element_value('Birth Date', array('year' => substr($date, 4, 4),\r\n 'month' => substr($date, 0, 2), 'day' => substr($date, 2, 2))) ;\r\n }", "title": "" }, { "docid": "cb32859876b3ecf5ab8021c7361252f4", "score": "0.6376699", "text": "function setForm($form)\r\n {\r\n $this->Form = $form;\r\n }", "title": "" }, { "docid": "f0191b2ae67497d23d4e1df93f3d87e3", "score": "0.6368502", "text": "public function _set_fields()\n\t{\n\t\t$this->form_data->id_suratmasuk_data = '';\n\t\t$this->form_data->nosurat = '';\n\t\t$this->form_data->tglsurat = '';\n\t\t$this->form_data->pengirim = '';\n\t\t$this->form_data->tujuan = '';\n\t\t$this->form_data->perihal = '';\n\t\t$this->form_data->jenissurat = '';\n\t\t$this->form_data->sifatsurat = '';\n\t\t$this->form_data->file = '';\n\t}", "title": "" }, { "docid": "b0f68e3963f08098ca74e912c29bdc2c", "score": "0.631612", "text": "public function erzeugeFormular()\n\t{\n\t\t//neues Model-Objekt für Datenfluss erstellen:\n $spModel = new stundenplanModel();\n\n //Daten aus DB holen:\n\t\t$studiengaenge = $spModel->getStudiengaenge();\n\t\t\n\t\t/* \trendert die Seite und gibt die geholten Daten an den View weiter,\n\t\t\tum dort dem Nutzer die Auswahl eines Studiengangs und Fachsemesters zu ermöglichen\n\t\t*/\n $this->View->render('stundenplan/formular', array('studiengaenge' => $studiengaenge));\n\t}", "title": "" }, { "docid": "aeb1b1d644d8555101f03b33dd41c521", "score": "0.6302413", "text": "public function fillForm()\n {\n $array = array('title' => $this->object->getTitle(),\n 'desc' => $this->object->getDescription(),\n 'loc' => array('latitude' => $this->object->getLatitude(), 'longitude' => $this->object->getLongitude(), 'zoom' => 15));\n $this->setValuesByArray($array);\n }", "title": "" }, { "docid": "ba791ca33786afa4893fb9c7bf2c67f5", "score": "0.62850344", "text": "public function _setFormElements() {\n\t\t$this->Location->setFormElements();\n\t}", "title": "" }, { "docid": "24a49eebfd9f3b5ad8ff215c96d16ee4", "score": "0.6221674", "text": "function setBuch() {\n\n // Auf ID pruefen\n $this->checkId();\n\n // Auf Formdaten pruefen\n $this->checkFormdata();\n\n // Insert oder update?\n if($this->getId() > 0) {\n\n // Bohne (DB-Eintrag) laden\n $buch = R::load('books', $this->getId());\n\n }\n else {\n\n // Bohne (DB-Eintrag) vorbereiten ;)\n $buch = R::dispense('books');\n\n }\n\n // Neue Werte setzen\n $values = $this->getFormdata();\n $buch->title = $values['title'];\n $buch->subtitle = $values['subtitle'];\n $buch->author = $values['author'];\n $buch->isbn = $values['isbn'];\n $buch->text = $values['text'];\n $buch->lent = $values['lent'];\n\n // Bohne (DB-Eintrag) speichern (oder updaten)\n // Je nachdem, ob ein vorhandenes geladen wurde\n // oder ein neues \"dispensed\" wurde.\n $this->setId( R::store($buch) );\n\n // ID zurueck geben Rueckgabe\n return $this->getId();\n exit;\n\n }", "title": "" }, { "docid": "2374852bc4e61e9f9d7798d123d39719", "score": "0.61834615", "text": "public function set_default_value(){\n\t\tparent::set_default_value();\n $this->set_view('sarung/admin/index');\n $this->set_min_power( 100 );\n\t\t$this->set_title('Ujian Santri register');\n\t\t$this->set_body_attribute( \" class='admin admin_sarung_body' \" );\n $this->set_table_name('ujiansantri');\n //! for url\n $this->set_url_this_dele($this->get_url_admin_sarung().\"/ujis/eventdel\" );\n $this->set_url_this_edit($this->get_url_admin_sarung().\"/ujis/eventedit\");\n $this->set_url_this_add ($this->get_url_admin_sarung().\"/ujis/eventadd\" );\n $this->set_url_this_view($this->get_url_admin_sarung().\"/ujis\");\t\t\n\t\t//@ \n\t\t$this->set_model_obj( new Ujis_Model());\n //! special\n $this->set_foto_folder($this->base_url().\"/foto\");\n\t}", "title": "" }, { "docid": "ab832abc30967f9330b8f180f4a60edf", "score": "0.61703956", "text": "protected function _fillForm()\r\n {\r\n }", "title": "" }, { "docid": "1d04238fbf87c081e233f001969bbea4", "score": "0.615822", "text": "public abstract function setForm($form);", "title": "" }, { "docid": "1535d1710530961b894614191d7c03d1", "score": "0.6147681", "text": "function setForm($arg0) {\n\t\t$this->form = $arg0;\n\t}", "title": "" }, { "docid": "d2b92525428a61c368722c2f2efcb67b", "score": "0.6124429", "text": "public function set()\n\t{\n\t}", "title": "" }, { "docid": "546c5128d82456af0af11d75f454a202", "score": "0.61202013", "text": "public function setForm() {\n\t\t$translator = Zend_Registry::get('Zend_Translate');\n\t\t$this->setMethod('post');\n\n\t\t$this->addRoles();\n\t\t$this->addSubmitButton();\n\n\t\t$this->addDisplayGroup( $this->displayGroupArray, 'updatePermission',array('legend' => 'updatePermission'));\n\t\t$this->getDisplayGroup('updatePermission')->setDecorators(array(\n 'FormElements',\n 'Fieldset', \n\t\t));\n\t}", "title": "" }, { "docid": "16b12f005d3f065063ebd25f4a18771a", "score": "0.61033857", "text": "function setForm( &$object )\r\n {\r\n if( is_a( $object, \"eZForm\" ) )\r\n {\r\n $this->Form = $object;\r\n }\r\n }", "title": "" }, { "docid": "5e5458f05b103468b2d4ac2065326c21", "score": "0.6058158", "text": "function set(){\n \t$this->estado=\"logueado\";\n \t$this->usuario=$this->fila['email'];\n \t$this->id=$this->fila['IdPersona'];\n \t$this->nombre=$this->fila['nombre'];\n }", "title": "" }, { "docid": "0290a32b6698367748b41b3b9a28a214", "score": "0.60120904", "text": "private function _set_fields()\n {\n\t @$this->form_data->filter_survey = '';\n @$this->form_data->filter_question = '';\n }", "title": "" }, { "docid": "525cf49da75f3f545e86e506c47c7487", "score": "0.6009606", "text": "public static function steekWisselGeldIn() {\r\n MuntDAO::update(self::$wisselgeldAantal);\r\n }", "title": "" }, { "docid": "515dcfa6bfe74195b7d22b78b6774ae2", "score": "0.5997809", "text": "public function set()\n {\n }", "title": "" }, { "docid": "6cd520e494fa64d29201ddf8619c7aaf", "score": "0.5994712", "text": "protected function setElement() {}", "title": "" }, { "docid": "32a62170aac3d0519e8c3dd11923bae6", "score": "0.59907156", "text": "public function setForm() {\n\t\t$this->setMethod('post');\n\n\t\t$this->addBank();\n\t\t$this->addCreditCards();\n\t\t$this->addNonWorkIncome();\n\t\t$this->addCreditProblems();\n\n\t\tif( $this->getIsSkippable() ) {\n\t\t\t$this->addSkipButton();\n\t\t}\n\t\t$this->addSubmitButton();\n\t\t$this->setLegend('applicantCreditHistory');\n\t\t$this->setFormTranslator();\n\t\t$this->setDisplayGroup();\n\t}", "title": "" }, { "docid": "444f9eb2f9bd2121eea6bb5ffba3f483", "score": "0.5988247", "text": "public function setJumlahKaki($jumlahKaki)\n {\n //$this->jumlahKursi = $jumlahKursi;\n $this->jumlahKaki = $jumlahKaki;\n //Method\n}", "title": "" }, { "docid": "373a5d5e00cba2747b5f858b3e664ba9", "score": "0.5969438", "text": "public function lbForm(){\n\t\t$this->field = array();\n\t}", "title": "" }, { "docid": "95ba0d52629663331d6f22f7ef2816a6", "score": "0.5964001", "text": "public function setForm(Form $form){\n\t\t$this->form = $form;\n\t}", "title": "" }, { "docid": "86a3fdffdd6f04457903ac04659358b2", "score": "0.5953686", "text": "public function set();", "title": "" }, { "docid": "088c1dbd924af70b68aeedcafc144f91", "score": "0.59385055", "text": "private function settInn() {\n\n // SQL-spørring med parametre for bruk i prepared statement.\n $sql = \"\n INSERT INTO medlem (fornavn, etternavn, adresse, postnummer, telefonnummer, epost, passord)\n VALUES (?, ?, ?, ?, ?, ?, ?);\n \";\n\n // Verdiene som skal settes inn i databasen.\n $verdier = [\n $this->fornavn,\n $this->etternavn,\n $this->adresse,\n $this->postnummer,\n $this->telefonnummer,\n $this->epost,\n $this->passord\n ];\n\n // Kobler til databasen og utfører spørringen.\n $con = new Database();\n $res = $con->spørring($sql, $verdier);\n\n // Henter medlemsnummer fra nyinnsatt rad og fjerner passordet fra objektet.\n $this->medlemsnummer = $res->insert_id;\n $this->passord = null;\n }", "title": "" }, { "docid": "e0f7a1fdb467a75c0593a0242d8ec184", "score": "0.59276205", "text": "abstract protected function setFields();", "title": "" }, { "docid": "d7ec3b7f7c82fb4abbba7ff52f682f2a", "score": "0.5927385", "text": "public function setElement() {}", "title": "" }, { "docid": "0683b2525de318f77ebbf0399ff45467", "score": "0.5924441", "text": "private function _set_fields()\n\t{\n \n\t\t$this->form_data->cat_id = 0;\n $this->form_data->cat_layout_type = 0;\n\t\t$this->form_data->cat_name = '';\n\n\t\t$this->form_data->filter_cat_name = '';\n $this->form_data->account_mail_layout = '';\n $this->form_data->password_mail_layout = '';\n\n\t}", "title": "" }, { "docid": "e339e15f34633798b2c50b3f17fea7fe", "score": "0.59164506", "text": "public function setModel();", "title": "" }, { "docid": "f7c53486daa2da6d53543d37123fc9de", "score": "0.58844644", "text": "function setWesen($wesen = 'Ernst')\n\t{\n\t\t$this->_wesen = $wesen;\n\t}", "title": "" }, { "docid": "f62778d7b9d4c56fe9d080ec41ef0150", "score": "0.58740765", "text": "public function erzeugeFormular() \n\t {\n\t\t//neues Model-Objekt für Datenfluss erstellen:\n $rpModel = new raumplanModel();\n\n //Daten aus DB holen:\n\t\t$vorlesungsraeume = $rpModel->getVorlesungsraeume();\n\t\t$laborraeume = $rpModel->getLaborraeume();\n\t\t\n\t\t/* \trendert die Seite und gibt die geholten Daten mit 2 Subarrays an den View weiter,\n\t\t\tum dort dem Nutzer die Auswahl eines Raumes zu ermöglichen\n\t\t*/\n $this->View->render('raumplan/formular', array('vorlesungsraeume' => $vorlesungsraeume, 'laborraeume' => $laborraeume));\n\t }", "title": "" }, { "docid": "d018a45c9a4e1beecbc52b16b79c62f5", "score": "0.5863342", "text": "public function setForm( Form $form ) {\n\t\t$this->form = $form;\n\t}", "title": "" }, { "docid": "d018a45c9a4e1beecbc52b16b79c62f5", "score": "0.5863342", "text": "public function setForm( Form $form ) {\n\t\t$this->form = $form;\n\t}", "title": "" }, { "docid": "ab20739d9542c74e04a506d698eed305", "score": "0.58479804", "text": "public function setmerk_kenderaan($value);", "title": "" }, { "docid": "dc5bf67074545db1f25bdc37a7297c00", "score": "0.58248246", "text": "function setFormData() {\n\t\t$aFormData = $this->getList('name = ' . $this->quote($this->_formName));\n\t\tppi_dump($aFormData); exit;\n\t\tif(count($aFormData) > 0) {\n\t\t\t$aFormData \t\t\t\t= $aFormData[0];\n\t\t\t$this->_storageTable \t= $aFormData['table'];\n\t\t\t$this->_description \t= $aFormData['description'];\n\t\t\t$this->_submitText \t\t= $aFormData['submit_text'];\n\t\t\t$this->_formID \t\t\t= $aFormData['id'];\n\t\t} else {\n\t\t\tthrow new PPI_Exception('Form: '.$this->_formName . ' doesn\\'t exist');\n\t\t}\n\t}", "title": "" }, { "docid": "5b4ea68b0fba69dccad04b8d34f999a0", "score": "0.5806381", "text": "function alterForm();", "title": "" }, { "docid": "8ab1c286b24a6f5d2b8b5f2d3b652795", "score": "0.5762324", "text": "public function setForm($form)\n {\n $this->form = $form;\n }", "title": "" }, { "docid": "25fe6c77fddac02a534c368cc8a7c401", "score": "0.57534635", "text": "public function setForm( $form )\n\t{\n\t\t$this->setAttribute( \"form\", $form );\n\t}", "title": "" }, { "docid": "2536c29304a40ce46bb45677b8a33184", "score": "0.5720803", "text": "public function action_BandEdit() {\n // 1. walidacja id osoby do edycji\n\n if ($this->validateEdit()) {\n try {\n // 2. odczyt z bazy danych osoby o podanym ID (tylko jednego rekordu)\n $record = App::getDB()->get(\"bands\", \"*\", [\n \"idband\" => $this->form->idband\n ]);\n // 2.1 jeśli osoba istnieje to wpisz dane do obiektu formularza\n $this->form->idband = $record['idband'];\n $this->form->name = $record['name'];\n $this->form->musictype = $record['musictype'];\n $this->form->ishired = $record['ishired'];\n } catch (\\PDOException $e) {\n Utils::addErrorMessage('Wystąpił błąd podczas odczytu rekordu');\n if (App::getConf()->debug)\n Utils::addErrorMessage($e->getMessage());\n }\n }\n\n // 3. Wygenerowanie widoku\n $this->generateView();\n }", "title": "" }, { "docid": "59ce30020967990db5318405a5fa38b0", "score": "0.57148963", "text": "function form_init_data()\n {\n // Initialize the form fields\n\n $this->set_hidden_element_value('_swimmeetid', $this->getMeetId()) ;\n $this->set_hidden_element_value('_eventgroupid', $this->getEventGroupId()) ;\n $this->set_hidden_element_value('_action', WPST_ACTION_EVENTS_ADD) ;\n $this->set_element_value('Event Group', $this->getEventGroupId()) ;\n }", "title": "" }, { "docid": "99c1f8096ebe83b54f3e609bc021c110", "score": "0.56985825", "text": "public function setFields()\n {\n $this->fields = array(\n\n 'name'\t=> array(\n 'type'\t=> 'text',\n 'label'\t=> 'Name',\n 'rule'\t=> 'required'\n ),\n\n 'domain'\t=> array(\n 'type'\t=> 'select',\n 'label'\t=> 'Domain',\n 'rule'\t=> 'required',\n 'option' => $this->getRegisterDomains()\n ),\n\n 'description'\t=> array(\n 'type'\t=> 'textarea',\n 'label'\t=> 'Description'\n ),\n\n 'shared_by_force' => array(\n 'type' => 'checkboxGroup',\n 'label' => 'Shared By Force',\n 'checkbox_label' => $this->getModules()\n ),\n );\n\n $this->submit = array('submit' => array(\n 'value' => t('global.save'),\n ));\n }", "title": "" }, { "docid": "038122c7ddd551d541418c372e364d7d", "score": "0.56791246", "text": "public function setNombre($nombre)\n{\n$this->_nombre = $nombre;\n}", "title": "" }, { "docid": "44abc24408f176f990d3c78341924883", "score": "0.5661979", "text": "private function setFormFields()\n\t{\n\t\tforeach ($this->formFieldList as $field)\n\t\t{\n\t\t\t$this->GetWizard()->SetVar($field, $this->GetWizard()->GetVar($field));\n\t\t}\n\t}", "title": "" }, { "docid": "f079913c41e59d1bf11b70dacfd4a262", "score": "0.5653312", "text": "function setFromForm( $type )\n {\n foreach ($this as $name => $value)\n {\n $val = $_GET[ $name ];\n if( $type == \"POST\" ) $val = $_POST[ $name ];\n if( !empty( $val ) ) $this[ $name ] = $val ;\n }\n }", "title": "" }, { "docid": "b7e4260afeb47c5a7685daf1f558518e", "score": "0.56378144", "text": "function form_init_data()\n {\n $this->set_element_value('Duplicate Event Numbers', WPST_ACTION_IGNORE) ;\n $this->set_element_value(sprintf('Map 0 to minimum Swim Team age (%s)',\n get_option(WPST_OPTION_MIN_AGE)), WPST_YES) ;\n $this->set_element_value(sprintf('Map 0 to maximum Swim Team age (%s)',\n get_option(WPST_OPTION_MAX_AGE)), WPST_YES) ;\n $this->set_hidden_element_value('_eventgroupid', $this->getEventGroupId()) ;\n }", "title": "" }, { "docid": "33e17062bce1629f4028e41ec84a3089", "score": "0.5629861", "text": "function __set($atributo, $valor){\r\n $this->$atributo = $valor;\r\n }", "title": "" }, { "docid": "e091e7f6f94ecbccd332d3a9777a0cff", "score": "0.5624476", "text": "function setLieu($lieu){\n $this->lieu = $lieu;\n }", "title": "" }, { "docid": "41b68560a9954313094b1f975838530b", "score": "0.5602273", "text": "public function setting()\n {\n //\n }", "title": "" }, { "docid": "d128948a801255b2703bdec09b7e25d0", "score": "0.55998766", "text": "function setup_Form_html()\n\t\t\t\t{\n\t\t\t\t\t$this->form_html = ( $this->form_html ? $this->form_html : 'this is the RAW html of the form!' );\n\t\t\t\t}", "title": "" }, { "docid": "481515508ad233e3f2fea21e23b666b7", "score": "0.55959153", "text": "function conf__form_ml (toba_ei_formulario_ml $form_ml){\n \n if(!isset($this->s__id_sede)){ \n $this->s__sede= utf8_decode('Neuquén Capital');\n $this->s__id_sede=$this->dep('datos')->tabla('sede')->get_id_sede();\n }\n \n $form_ml->ef('sede')->set_estado_defecto($this->s__sede);\n \n }", "title": "" }, { "docid": "af44e97a808f0db608b175aedcf27001", "score": "0.5588582", "text": "public function setForm($form)\n {\n $this->_element->setForm($form);\n return parent::setForm($form);\n }", "title": "" }, { "docid": "55ff989ed2de8fbeae978542e04e6a90", "score": "0.5588083", "text": "private function _setValue () {\n $pattern = '/^' . $this->name . '\\d{5}$/';\n $this->_instantiatedValue = $this->value;\n\n if (isSet($_POST['submitbutton'])) {\n if ($this->type === 'address') {\n // 'Fish' for submitted address input (random string appended to name)\n foreach($_POST as $key => $value) {\n if (preg_match($pattern, $key)) { // found match\n $this->_submittedValue = safeParam($key);\n }\n }\n } else {\n $this->_submittedValue = safeParam($this->name, $this->type);\n }\n\n $this->value = $this->_submittedValue; // set to user-supplied value when posting\n }\n }", "title": "" }, { "docid": "7fb53bd136d5bbe391d7cde144492731", "score": "0.55840653", "text": "public function modifierFormule() {\n \tDAL_Formule::modifierFormule(\n \t\t$this->formule_num,\n \t\t$this->formule_nbLeconConduite,\n\t $this->formule_prix,\n\t $this->formule_ticketPrix);\n }", "title": "" }, { "docid": "7940618c5b77364699bd8082c65ef933", "score": "0.55811393", "text": "public function setForm($form)\n {\n\n // set method\n if (isset($form['method'])) {\n $this->_setMethod($form['method']);\n }\n if (isset($form['action'])) {\n $this->_setAction($form['action']);\n }\n if (isset($form['attributes'])) {\n $this->_attr = $form['attributes'];\n }\n if (isset($form['elements'])) {\n $this->_elements = $form['elements'];\n }\n if (isset($form['enctype'])) {\n $this->_enctype = $form['enctype'];\n }\n if (isset($form['renderFormat'])) {\n $this->_renderFormat = $form['renderFormat'];\n }\n }", "title": "" }, { "docid": "ea9fa3f240916d1024a2c7b8b3ad94fe", "score": "0.5577367", "text": "function setCreateur($createur){\n $this->createur = $createur;\n }", "title": "" }, { "docid": "b62c2de58a9d4a53752460db6c444daf", "score": "0.55703294", "text": "public function setWebform(Webform $webform) {\n\t\t$this->webform = $webform;\n\t}", "title": "" }, { "docid": "c9ea8b321854b40aef3543e7e5c98740", "score": "0.55685973", "text": "public function init()\n {\n $this->setMethod('post')\n ->setAttrib('name', 'untaggedForm');\n Zend_Dojo::enableForm($this);\n \n $this->setDecorators(array(\n 'FormElements',\n array('HtmlTag', \n array('tag' => 'dl', 'class' => 'inserat_form')),\n array('Description', array('placement' => 'prepend')),\n 'DijitForm'\n ));\n \n $table_medium = new Application_Model_Printmedium();\n $printmedium['0'] = '(Wähle Printmedium)';\n foreach ($table_medium->getAllMedium() as $key)\n $printmedium[$key['id_printmedium']] = $key['printmedium'];\n \n $table_config = new Application_Model_Config();\n $region['0'] = '(Wähle Region)';\n foreach ($table_config->getAllRegion() as $key)\n $region[$key['id_config']] = $key['region'];\n \n $configuration = Zend_Registry::get('configuration');\n $token = new Zend_Form_Element_Hash('token');\n $token->setSalt(md5(uniqid(rand(), TRUE)));\n $token->setTimeout($configuration->auth->timeout);\n \n $config = new Zend_Form_Element_Hidden('config');\n \n $this->addElement($config, 'config')\n ->addElement($token)\n ->addElement('FilteringSelect','prefered_printmedium',\n array(\n 'label' => 'Printmedium',\n 'multiOptions' => $printmedium)\n )\n ->addElement('FilteringSelect','prefered_region',\n array(\n 'label' => 'Region',\n 'multiOptions' => $region)\n );\n \n }", "title": "" }, { "docid": "1c5395dd980ef364991838eee93a4660", "score": "0.5567013", "text": "function setup_Form_html()\n\t\t\t{\n\t\t\t\t$html = mnml_optioncomponent_twitterfeed();\n\t\t\t\t\n\t\t\t\t$this->form_html = $html;\n\t\t\t}", "title": "" }, { "docid": "44cfb8d9230316c282df04a0d752d04b", "score": "0.55664986", "text": "public function settings( &$form )\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "fc66f5639007544372c0a3813486a855", "score": "0.55641013", "text": "public function form()\n {\n }", "title": "" }, { "docid": "fc66f5639007544372c0a3813486a855", "score": "0.55621046", "text": "public function form()\n {\n }", "title": "" }, { "docid": "7574caafb016dd16a363d112bd4b30c3", "score": "0.5555006", "text": "function form_init_data()\n {\n // Initialize the form fields\n $this->set_hidden_element_value('_action', WPST_ACTION_ADD) ;\n $this->set_element_value('Description', 'Event Group description.') ;\n $this->set_element_value('Status', WPST_ACTIVE) ;\n }", "title": "" }, { "docid": "3a153fef2c63640842e6a04aa2799ad1", "score": "0.55501014", "text": "function __set($atributo, $valor){\n $this->$atributo = $valor;\n }", "title": "" }, { "docid": "9a32b5c04cb2db744b16abf271068897", "score": "0.55474055", "text": "protected function setDocument() \n\t{\n\t\t$isNew = ($this->item->id < 1);\n\t\t$document = JFactory::getDocument();\n\t\t$document->setTitle($isNew ? JText::_('COM_MAPFRANCE_MAP_CREATING') :\n JText::_('COM_MAPFRANCE_MAP_EDITING'));\n\t\t$document->addScript(JURI::root() . $this->script);\n\t\t$document->addScript(JURI::root() . \"/administrator/components/com_mapfrance\"\n\t\t . \"/views/map/submitbutton.js\");\n\t\tJText::script('COM_MAPFRANCE_MAP_ERROR_UNACCEPTABLE');\n\t}", "title": "" }, { "docid": "2a7ba4c353e34a45216bc6c77b4f9cec", "score": "0.5540343", "text": "public function wyswietl(){\n parent::wyswietl();\n }", "title": "" }, { "docid": "d22c634561de5d6024d5f0865449235a", "score": "0.5538358", "text": "function form_init_data()\n {\n $options = new SwimTeamOptions() ;\n $options->loadOptions() ;\n\n // Initialize the form fields\n $this->set_element_value('Enable Verbose Messages', $options->getEnableVerboseMessages()) ;\n $this->set_element_value('Rows to Display', $options->getGDLRowsToDisplay()) ;\n $this->set_element_value('Time Format', $options->getTimeFormat()) ;\n $this->set_element_value('Enable Google Maps', $options->getEnableGoogleMaps()) ;\n $this->set_element_value('Google API Key', $options->getGoogleAPIKey()) ;\n $this->set_element_value('Login Redirect', WPST_NONE) ;\n }", "title": "" }, { "docid": "6b98aee0fc087ed440671f30e2b08d4e", "score": "0.5534633", "text": "function setup_Form_html()\n\t\t\t{\n\t\t\t\t$html =\t'<input type=\"text\" name=\"'. esc_attr($this->name) .'\" value=\"'.mnml_themeoption($this->name, 'attr').'\"/>';\n\t\t\t\t\n\t\t\t\t$this->form_html = $html;\n\t\t\t}", "title": "" }, { "docid": "ae71438d1e729621592a559725b3e1d8", "score": "0.5532307", "text": "function setData($data){\n $this->data = $data;\n }", "title": "" }, { "docid": "cf429051c2023ee7c7734ec0283eaa84", "score": "0.55292827", "text": "public function formEditEstructuraOrganica(){\r\n Obj::run()->View->render();\r\n }", "title": "" }, { "docid": "9e70fee22a8effc1d3873841badfd2c2", "score": "0.5515833", "text": "public function setForm(Form $form)\n {\n $this->form = $form;\n }", "title": "" }, { "docid": "9e70fee22a8effc1d3873841badfd2c2", "score": "0.5515833", "text": "public function setForm(Form $form)\n {\n $this->form = $form;\n }", "title": "" }, { "docid": "9e70fee22a8effc1d3873841badfd2c2", "score": "0.5515833", "text": "public function setForm(Form $form)\n {\n $this->form = $form;\n }", "title": "" }, { "docid": "d6e3b6a71b666e236ca13635cf275842", "score": "0.5494703", "text": "public function setTelefono($p_telefono){\r\n\t$this->telefono=$p_telefono;\r\n}", "title": "" }, { "docid": "440e8038821d222b493734d7b7e04d14", "score": "0.54938114", "text": "function form_init_data()\n {\n $this->set_hidden_element_value('_eventgroupid', $this->getEventGroupId()) ;\n $this->set_hidden_element_value('_action', WPST_ACTION_UPDATE) ;\n\n $eventgroup = new SwimTeamEventGroup() ;\n $eventgroup->loadEventGroupById($this->getEventGroupId()) ;\n\n // Initialize the form fields\n $this->set_element_value('Description', $eventgroup->getEventGroupDescription()) ;\n $this->set_element_value('Status', $eventgroup->getEventGroupStatus()) ;\n }", "title": "" }, { "docid": "83f584b5d9002e0b54591be13fe5b931", "score": "0.54906785", "text": "function setFrmName($strName){\n\t\t\t$this->_frm_name = $strName;\n\t\t\t}", "title": "" }, { "docid": "71da31a300b2fdc1174cb5254ed5630a", "score": "0.5488906", "text": "function __set($name,$value) {\n\t\t// Then we html encode it\n\t\t$v = \"\";\n\t\tif(array_search($name, $this::$NoHTMLEncode, FALSE) || \"Model\" == get_parent_class($name) || $name == \"model\")\n\t\t{\n\t\t\t//dd::Trace(\"Setter NOT HTML Encoding value\");\n\t\t\t$v = $value;\n\t\t}\n\t\telse \n\t\t{\n\t\t\t//dd::Trace(\"Setter HTML Encoding value\");\n\t\t\t$v = Utils::HtmlEncode($value);\t \n\t\t}\n\t\t$this->_template->$name = $v;\n\t}", "title": "" }, { "docid": "7d62263d8e4ab8eb1ff115912b0b5906", "score": "0.5488885", "text": "function fieldForm()\n {\n global $table;\n\n $table->table_column('<b>'.$this->description.': </b>'.$this->_specifyNotNull(), '33%', '', 'right');\n $table->table_column(html_form_PassWordField($this->name, $this->length, $this->maxlength, $this->default), '67%', '', 'left');\n $table->table_nextRowWithColumns();\n }", "title": "" }, { "docid": "0189a6eb7876c6b6f9f757b71e94fb87", "score": "0.5484447", "text": "function reset()\n {\n \t// reset the parent form\n \tparent::reset();\n // initialize the template with dummy values\n $values = array(\n 0,\n date('Y-m-d H:i:s'),\n date('Y-m-d H:i:s', time() + 1800),\n 'Kurzbeschreibung'\n );\n // concatenate and set the values\n $this->_toLog = new TechDivision_Lang_String(implode('/', $values));\n }", "title": "" }, { "docid": "9c09d45450cb788f3932fa8a5d9ffef7", "score": "0.54812926", "text": "public function setDispFields() {}", "title": "" }, { "docid": "5e0ae4bb85167f59829b949dc33ef38a", "score": "0.5480654", "text": "function setJsonRegisterForm(){\n $this->register_form = file_get_contents($this->url . '/api/contest/get/load_form');\n }", "title": "" }, { "docid": "96047d8ce9982ca210f336a31dfc543a", "score": "0.5475442", "text": "function setData($the_spry, $the_name, $the_id, $the_field, $the_table, $the_label, $the_hint, $the_required, $the_size, $the_tooltip, $the_class, $the_action, $the_data, $the_msg_required, $the_noManage, $the_spry_2, $the_name_2, $the_id_2, $the_field_2, $the_table_2, $the_label_2, $the_hint_2, $the_tooltip_2, $the_class_2, $the_data_2, $the_msg_required_2, $the_noManage_2, $thefieldCommun){\n\t\t\t$this->spry = $the_spry; $this->name = $the_name; $this->id = $the_id; $this->field = $the_field; $this->table = $the_table; $this->label = $the_label; $this->hint = $the_hint; $this->required = $the_required; $this->size = $the_size; $this->tooltip = $the_tooltip; $this->class = $the_class; $this->action = $the_action; $this->data = $the_data; $this->msg_required = $the_msg_required; $this->noManage = $the_noManage; $this->spry_2 = $the_spry_2; $this->name_2 = $the_name_2; $this->id_2 = $the_id_2; $this->field_2 = $the_field_2; $this->table_2 = $the_table_2; $this->label_2 = $the_label_2; $this->hint_2 = $the_hint_2; $this->tooltip_2 = $the_tooltip_2; $this->class_2 = $the_class_2; $this->data_2 = $the_data_2; $this->msg_required_2 = $the_msg_required_2; $this->noManage_2 = $the_noManage_2; $this->fieldCommun = $thefieldCommun;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "573ec7527aeed8b3c13319178cb4da32", "score": "0.54751813", "text": "function setNom($nom){\n $this->nom = $nom;\n }", "title": "" }, { "docid": "c3a51312438429d96100f50ed9cabf05", "score": "0.5474616", "text": "function set($data){\n $this->data = $data;\n }", "title": "" }, { "docid": "bcf768da2cf2a159a64b9a6ed87740c0", "score": "0.5472809", "text": "function setData($data)\r\n {\r\n \t$this->_data = $data;\r\n }", "title": "" }, { "docid": "1644d4f3f8e64dd0020ed97c8ad9b655", "score": "0.5468903", "text": "function form_init_data()\n {\n // Initialize the form fields\n\n $this->set_hidden_element_value('_action', WPST_ACTION_EVENTS_LOAD) ;\n\n //if (is_null($this->getMeetId())) wp_die(basename(__FILE__) . '::' . __LINE__) ;\n $this->set_hidden_element_value('_swimmeetid', $this->getMeetId()) ;\n //$this->set_element_value('First Event Number', '1') ;\n }", "title": "" }, { "docid": "cb794c65fe9af81a063b4ac4e07706fc", "score": "0.54662114", "text": "public function setNombre($p_nombre){\r\n\t$this->nombre=$p_nombre;\r\n}", "title": "" }, { "docid": "dba5c362049d42c01818bb7409e9dbba", "score": "0.54652447", "text": "public function setPostedObject();", "title": "" }, { "docid": "a8348449f300a15bb6c6451b1d600fc7", "score": "0.5463586", "text": "public function setEsPadre($padre){\n $this->esPadre = $padre;\n}", "title": "" }, { "docid": "3a945de6d81c546638ff6896ac97cd5d", "score": "0.54597235", "text": "public function __construct()\n {\n $this->form = 'test';//$this->createForm(LandingType::class, $landing);\n $this->view = 'landing';\n }", "title": "" }, { "docid": "89a83671a304cf30bd7fc67a46672fe2", "score": "0.5458228", "text": "protected function form()\n {\n }", "title": "" }, { "docid": "60e5ea5055842ccfc03142580ce252af", "score": "0.5455938", "text": "public function StoreMoonRentalForm() {\n\n }", "title": "" }, { "docid": "cc015a25b6ca2e5603bbf925e645c297", "score": "0.54555285", "text": "function form_init_data()\r\n {\r\n // Initialize the form fields\r\n\r\n $this->set_hidden_element_value(\"_action\", FT_ACTION_ADD) ;\r\n\r\n $this->set_element_value(\"Birth Date\", array(\"year\" => date(\"Y\"),\r\n \"month\" => date(\"m\"), \"day\" => date(\"d\"))) ;\r\n }", "title": "" }, { "docid": "b695b7b3c8658198a38158ec4cde7d35", "score": "0.5455285", "text": "function setFieldValues ()\n {\n $userMapper = new Admin_Model_UserMapper();\n $this->userPartialForm->populate(\n $userMapper->getUserById(\n $this->_candidateData->getUser()\n ->getId()));\n $this->position->setValue(\n $this->_candidateData->getJobPosition() ? $this->_candidateData->getJobPosition()\n ->getId() : '');\n $this->test->setValue(\n ($this->_candidateData->test) ? $this->_candidateData->test->getId() : '');\n $this->dob->setValue(\n ($this->_candidateData->getDateOfBirth()) ? date_format(\n $this->_candidateData->getDateOfBirth(), 'Y-m-d') : '');\n }", "title": "" }, { "docid": "466b41fb3e949040062fce69d3775c0c", "score": "0.54515266", "text": "public function setData()\n {\n }", "title": "" }, { "docid": "b745a197d7040c7c411fc5a947662d14", "score": "0.5449391", "text": "function set_nama($nama)\n {\n $this->nama = $nama;\n }", "title": "" }, { "docid": "9259c485ad5627e9efa142e6a7bbd63c", "score": "0.5448112", "text": "protected function editar()\n {\n }", "title": "" }, { "docid": "9259c485ad5627e9efa142e6a7bbd63c", "score": "0.5448112", "text": "protected function editar()\n {\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "5417e1b43c796f226bd155641223a90d", "score": "0.0", "text": "public function update(Request $request, $id) {\n $foodaka = FoodAka::find($id);\n\n $foodaka->FID = $request->input('FID');\n $foodaka->Name = $request->input('Name');\n $foodaka->save();\n\n return \"Success updating Food Aka #\" . $foodaka->id;\n }", "title": "" } ]
[ { "docid": "ae90a700efd6cf3cd7c51c1c4442503a", "score": "0.7658553", "text": "public function update(ResourceInterface $resource);", "title": "" }, { "docid": "d6a508508d13bb02f2a247e9bf196f78", "score": "0.71877676", "text": "function update ( $id, $resource ) {\r\n\r\n }", "title": "" }, { "docid": "8466495927f3bd478b5fd2d917f45f08", "score": "0.7099208", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9a55d4f96f94897978c13d34337c1901", "score": "0.6808637", "text": "public function update(StoreResource $request, $id)\n {\n $input = $request->all();\n \n $resource = Resource::find($id);\n \n $resource->fill($input);\n \n $resource->save();\n\n // redirect\n Session::flash('message', 'Successfully saved resource!');\n return redirect('resources');\n }", "title": "" }, { "docid": "cce47cfb911f4e7678d10bb61eec6271", "score": "0.6523108", "text": "public function update(Request $request, Resource $resource)\n {\n $this->validate($request, [\n 'name' => 'required|max:255',\n ]);\n \n $resource->update($request->except(['_method', '_token']));\n \n flash('El recurso fue actualizado');\n \n return redirect()->route('resource.index');\n }", "title": "" }, { "docid": "1414dc19f0f4ccb3b9d9b0c2f9754c1a", "score": "0.64248925", "text": "public function update(Request $request, Storage $storage)\n {\n //\n $storage->update($request->all());\n\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "8b641f5e241101e64f479c764289bfd7", "score": "0.64144814", "text": "public function update(Request $request, Resource $resource)\n {\n\n try {\n $this->validate($request, [\n 'name' => 'required|string|unique:resources,name,' . $resource->id,\n 'group' => 'required|exists:groups,id',\n \"description\" => \"nullable|string\"\n ]);\n $resource->name = $request->name;\n $resource->group_id = $request->group;\n $resource->description = $request->description;\n $resource->save();\n session()->flash('flash_success', 'Updated Successfully.');\n return Redirect::route('resources.index');\n } catch (ValidationException $exception) {\n return Redirect::back()->withErrors($exception->errors())->withInput();\n } catch (Exception $e) {\n session()->flash('flash_error', 'Something went wrong');\n return $e->getMessage();\n return Redirect::back();\n }\n }", "title": "" }, { "docid": "d131fb800138c5d8889803afda8ecf7b", "score": "0.62923384", "text": "public function updateResource(){\n\t\t$this->setTitle('Update resource');\n $this->name = $_POST['name'];\n $this->id = $_POST['resource_id'];\n $this->rate = $_POST['rate'];\n $this->description = $_POST['description'];\n $this->type = $_POST['type'];\n $this->loadModel('resource');\n\t\t$this->added_resource = $this->model->updateResources($this->id,$this->name,$this->rate,$this->description,$this->type);\n $this->render('resource/_bewerkt.tpl');\n\t}", "title": "" }, { "docid": "6644414d1c8deb86d17216b9f77e38da", "score": "0.62589455", "text": "public function updateStream($path, $resource, $config = null);", "title": "" }, { "docid": "35958bbf8b0dca0d5dcadddf00962ef1", "score": "0.6193939", "text": "public function update() {\n \t\t//Does the Resource object have an id?\n if ( is_null( $this->id ) ) trigger_error (\"Resource::update(): Attempt to update an Resource object that does not have its ID property set.\", E_USER_ERROR );\n\n\t\t//Update the Resource\n $conn = new mysqli( $DB_HOST, $DB_USERNAME, $DB_PASSWORD, $DB_NAME );\n $sql = \"UPDATE resources SET title=:?, summary=?, url=?, content=?, category=?, is_free=?, is_featured=?, is_favorite=?, date_created=? WHERE id = ?\";\n $st = $conn->prepare ( $sql );\n $st->bind_param( 'sssssiiisi', $this->title, $this->summary, $this->url, $this->content, $this->category, $this->is_free, $this->is_featured, $this->is_favorite, date(\"Y-m-d H:i:s\"), $this->id );\n\n $st->execute();\n $conn = null;\n}", "title": "" }, { "docid": "27fdfad09c0210d824e7b3fabe4e253e", "score": "0.6178334", "text": "public function update(Request $request, $id)\n {\n // if(Auth::user()->admin){\n $storage = Storage::findOrFail($id);\n $storage->name = $request->name;\n $storage->address = $request->address;\n $storage->save();\n Session::flash('success','You successfully updated storage!');\n// }\n// else{\n// Session::flash('error','You do not have enough permission!');\n// }\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "a25688f30a6b62a181559b84d042105c", "score": "0.6148197", "text": "public function update(Request $request, $resource)\n {\n $this->authorize('update', $resource);\n\n $resource->load($this->with);\n\n $this->form()->setModel($resource)->save(function($data,$form) use (&$resource){\n $general = $data->pull('general'); \n $relations = $data->get('relations');\n\n $admin = \\Auth::guard('admin')->user();\n \n $resource->forceFill($general->toArray()); \n\n $this->event('updating', $resource); \n\n $resource->save(); \n\n $this->syncRelations($relations, $resource); \n\n $this->event('updated', $resource); \n\n return $resource;\n }); \n\n $this->checkOwner($resource);\n\n return $this->redirect($request, $resource); \n }", "title": "" }, { "docid": "9a5dcd97258a1dde56734d3bfd713b95", "score": "0.6116463", "text": "public function updateResource(Request $request, $id)\n {\n $validatedData = $request->validate(\n [\n 'title' => 'required',\n 'description' => 'required',\n 'uploadedfile' => 'mimes:flv,mp4,avi,wmv,3gp,mov,mkv,vob'\n ],\n [\n 'title.required' => 'Please enter video title.',\n 'description.required' => 'Please enter description.',\n 'uploadedfile.mimes' => 'Video format not supported.'\n ]\n );\n\n if($file = $request->hasFile('uploadedfile')) {\n \n $file = $request->file('uploadedfile') ; \n $fileName = $file->getClientOriginalName() ;\n $destinationPath = public_path().'/storage/resource' ;\n $file->move($destinationPath,$fileName);\n $resourceUpdate = DB::table('table_resources')->where([\n ['id','=',$id],\n ])->update(array(\n 'title' => $request->title,\n 'description' => $request->description,\n 'url' => $fileName\n ));\n if($resourceUpdate) {\n return redirect()->back()->with('message', 'Resource successfully updated.');\n } else {\n return redirect()->back()->withErrors(['Nothing changed. Please try again.']);\n }\n \n } else {\n $resourceUpdate = DB::table('table_resources')->where([\n ['id','=',$id],\n ])->update(array(\n 'title' => $request->title,\n 'description' => $request->description \n ));\n if($resourceUpdate) {\n return redirect()->back()->with('message', 'Resource successfully updated.');\n } else {\n return redirect()->back()->withErrors(['Nothing changed. Please try again.']);\n }\n\n }\n\n }", "title": "" }, { "docid": "7bfce29a195f384d1bcc21b603c792d2", "score": "0.6033452", "text": "public function update(Request $request, $id){\n\n $this->validate($request, $this->getValidationRules($request), $this->getValidationMessages($request));\n \n if($request->file('image')){\n $rules = [\n 'image' => 'image|mimes:jpg,jpeg,png'\n ];\n\n $this->validate($request, $rules);\n }\n\n \n try {\n $resource = Resource::withTrashed()->findOrFail($id); \n }catch (ModelNotFoundException $e){\n $errors = collect(['El recurso con ID '.$id.' no se encuentra.']);\n return back()\n ->withInput()\n ->with('errors', $errors);\n }\n $this->setResource($resource, $request);\n \n $resource->spaces()->detach();\n $resource->spaces()->attach($request->spaces);\n\n return redirect()->route('resources.index')\n ->with('session_msg', '¡El recurso, se ha editado correctamente!');\n }", "title": "" }, { "docid": "88d2a1e76ebbaa8bd165532adff21092", "score": "0.6013595", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $resource = Resource::where('product_id', $id)->first();\n\n $this->validate(request(), [\n 'category_id' => 'required',\n 'name' => 'required',\n 'short_name' => 'required',\n// 'article' => 'required',\n 'price' => 'required',\n 'collection_id' => 'required',\n 'atribut_id' => 'required',\n ]);\n\n $product->category_id = $request->get('category_id');\n $product->name = $request->get('name');\n $product->short_name = $request->get('short_name');\n// $product->article = $request->get('article');\n $product->price = $request->get('price');\n $product->collection_id = $request->get('collection_id');\n $product->atribut_id = $request->get('atribut_id');\n\n $method = __METHOD__;\n LogFile::ProductLog($product, $method);\n $product->save(); //Сохраняем изменения продукта\n\n return redirect('admin/products')->with('update', 'Продукт обновлен');\n }", "title": "" }, { "docid": "9349dc7f33c6326d0383abd536af6ce3", "score": "0.596908", "text": "public function updated(\n $resource = null,\n array $links = [],\n $meta = null,\n array $headers = []\n ): Response {\n return $this->getResourceResponse($resource, $links, $meta, $headers);\n }", "title": "" }, { "docid": "4e5acd860dcda74c61d836d96050b079", "score": "0.59593076", "text": "public function put(Storage $storage);", "title": "" }, { "docid": "215d42ed153b26bc9b49ae5c5951d499", "score": "0.5955367", "text": "public function update(StoragesUpdateRequest $request, $id)\n {\n $now = \\Carbon\\Carbon::now();\n $storage = Storage::find($id);\n $by_id = Auth::user()->id;\n\n $storage->fill([\n 'maker' => $request->maker,\n 'model_number' => $request->model_number,\n 'serial_number' => $request->serial_number,\n 'size' => $request->size,\n 'types' => $request->types,\n 'supported_os' => $request->supported_os,\n 'recovery_key' => $request->recovery_key,\n 'storage_password' => $request->storage_password,\n 'deleted_at' => $request->deleted_at === \"1\" ? $now : null,\n 'reason' => $request->reason,\n 'updated_by' => $by_id,\n ])\n ->save();\n\n return redirect()->route('storages.show', $storage->id)->with('information', 'レコードを更新しました。');\n }", "title": "" }, { "docid": "da49ecf5dc35b8e5edb8b21644469290", "score": "0.5939757", "text": "public function update(RespondentStoreRequest $request, $id)\n {}", "title": "" }, { "docid": "b96bbe109f16f366cfd72892d0d0be64", "score": "0.5903822", "text": "public function update(Request $Request, Resource $Resource)\n {\n\t\t\t$Actions = ($Request->actions)?:[1];\n\t\t\t$Action = \"0.\" . implode(\"\",array_replace(array_fill(1,max($Actions),0),array_fill_keys($Actions,1)));\n\t\t\t$Request->action = $Action;\n\t\t\t$UpdateArray = []; $Rules = Resource::ValidationRules(); $MyRules = [];\n\t\t\tforeach($Resource->FillableFields() as $Field){\n\t\t\t\tif($Field == \"code\") continue;\n\t\t\t\tif($Request->$Field != $Resource->$Field){\n\t\t\t\t\t$Resource->$Field = $UpdateArray[$Field] = $Request->$Field;\n\t\t\t\t\tif(isset($Rules[$Field])) $MyRules[$Field] = $Rules[$Field];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(empty($UpdateArray)) return redirect()->back()->with([\"info\"=>true,\"type\"=>\"info\",\"text\"=>\"No fields to update.\"]);\n\t\t\t$Validator = Validator::make($UpdateArray,$MyRules,Resource::ValidationMessages());\n\t\t\tif($Validator->fails()) return redirect()->back()->withErrors($Validator);\n\t\t\tif($Resource->status == \"ACTIVE\" && $Resource->save()) return redirect()->route('resource.index')->with([\"info\"=>true,\"type\"=>\"info\",\"text\"=>\"The Resource: \" . $Resource->displayname . \", updated successfully\"]);\n\t\t\treturn view(\"resource.error\");\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "f78906153226222ee5bdfc9d13a06d23", "score": "0.58857", "text": "protected function save($resource) {\n if (isset($resource['public_id'])) {\n $this->collection->update(array('public_id' => $resource['public_id']), $resource, array('upsert' => TRUE));\n }\n }", "title": "" }, { "docid": "99960e81f0d443f90e5e0aa954abd481", "score": "0.5885372", "text": "public function update($id, Request $request) {\n $this->validate($request, isset($this->model->rules_update) ? $this->model->rules_update : $this->model->rules);\n\n ${$this->resource} = $this->model->findOrFail($id);\n\n $fillable_data = array_only($request->all(), $this->model->getFillable());\n\n App::setLocale(Helpers::getLang());\n\n ${$this->resource}->update($fillable_data);\n\n Admin::handleFileUpload('image', ${$this->resource}, 'image');\n\n return Redirect::route($this->view_path . '.index')->with('success', 'yeah');\n }", "title": "" }, { "docid": "a516665e3766b23c94ab33c5940aab8d", "score": "0.5874832", "text": "public function update(UpdateRequest $request, $id)\n {\n $data = $request->all();\n $product = Product::findOrFail($id);\n\n DB::beginTransaction();\n try {\n\n tap($product)->update($data);\n\n if ($request->hasFile('image')) {\n @unlink('products' . $product->image);\n $product->image = time() . '-' . $product->description . '.' . $request->file('image')\n ->getClientOriginalExtension();\n $request->file('image')->move('products', $product->image);\n }\n\n $product->save();\n\n $productResource = new ProductResource($product);\n\n DB::commit();\n return $this->responseSuccess([\n 'message' => trans('response.ProductController.update.success'),\n 'data' => $productResource,\n ]);\n } catch (\\Exception $exception) {\n DB::rollBack();\n return $this->responseError([\n 'message' => trans('response.ProductController.update.error'),\n 'errors' => $exception->getMessage(),\n ], Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n }", "title": "" }, { "docid": "dbe374356cb114ab5e44b198d87b232f", "score": "0.58492017", "text": "public function put($resource, $data){\n $client = new Client([\n 'base_uri' => $this->baseUri\n ]);\n\n //Trim left slashes\n $resource = ltrim($resource,'/');\n\n //Cache miss call to API\n $res = $client->request('PUT', $resource, [\n 'json' => $data,\n 'headers' => [\n 'Authorization' => 'Bearer ' . $this->accessToken,\n 'User-Agent' => env('BASECAMP_AGENT')\n ]\n ]);\n\n //Get JSON payload\n $json = $res->getBody()->getContents();\n\n return json_decode($json);\n }", "title": "" }, { "docid": "0bb389e7c0c131b01dec97c33ec501e0", "score": "0.579422", "text": "public function update(Request $request, $id)\n {\n $resource = MyResource::find($id);\n if ($resource != null) {\n if ($resource->user->id == $request->user()->id || $request->user()->hasRole('Admin')) {\n $request->merge(['module_id' => $request->get('module_id')]);\n $request->validate(['title' => 'required|string', 'description' => 'nullable|string', 'google_drive' => 'nullable|url|max:255', 'publish_year' => 'required|numeric|digits:4|between:2008,' . date('Y'), 'module_id' => 'required|integer|exists:modules,id']);\n $resource->update($request->all());\n\n return redirect()->route('resources.index')\n ->with('success', 'Resource updated successfully');\n }\n return abort(401, 'You\\'re not allowed to edit this resource!');\n }\n return abort('404', 'User not found!');\n }", "title": "" }, { "docid": "7dec035d65557a5fa957575b344e390d", "score": "0.5787175", "text": "protected function saveResource(&$resource) {\n $this->getConfig()->set($resource['key'], $resource['value']);\n\n $resource['id'] = $resource['key'];\n }", "title": "" }, { "docid": "231bf07a63b0a16b02c083ef86c176fd", "score": "0.57833594", "text": "public function update(Request $request, $id)\n {\n $input=$request->file_path;\n if(isset($input)) {\n $File = $this->fileUpload($input);\n }\n else{\n $File = \"course_resource/default.jpg\";\n }\n\n\n $course_resources = CourseResource::whereId($id)->firstOrFail();\n $course_resources->course_id = $request->get('course_id');\n $course_resources->title = $request->get('title');\n $course_resources->description = $request->get('description');\n $course_resources->file_path = $File;\n\n\n $course_resources->save();\n return redirect(action('CourseResourcesController@edit', $course_resources->id))->with('status', 'The file has been updated!');\n }", "title": "" }, { "docid": "611dd800c7185eb18c8f75c9a8595a6c", "score": "0.57606536", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $product->name = $request->name;\n $product->rock = $request->rock;\n $product->weight = $request->weight;\n $product->carat = $request->carat;\n $product->stock = $request->stock;\n $product->price = $request->price;\n $product->color = $request->color;\n $product->category_id =Category::find($request->category_id)->id;\n\n if($request->hasFile(\"image\")){\n //delete old image and save new image\n unlink(storage_path('app/public/productImages/'. $product->src));\n $product->src=$request->image->hashName();\n $request->image->store(\"productImages\",\"public\");\n }\n \n if($product->save()){\n return redirect()->route('products.index');\n }else{\n return view(\"partials.error\");\n }\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": "ab7c78237c36ea0911a0a7aba52fe065", "score": "0.5722473", "text": "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $body = json_encode($json);\n $request = new Request('PUT', '/entities', [], $body);\n $response = $this->send($request);\n return $response;\n }", "title": "" }, { "docid": "94a50f00a1fdfc16d75925e06f8f3ece", "score": "0.5718023", "text": "public function update($resource, $id, array $data = [], array $fileData = [],\n array $options = []\n ) {\n $request = new Request(Request::UPDATE, $resource);\n $request->setId($id)\n ->setContent($data)\n ->setFileData($fileData)\n ->setOption($options);\n return $this->execute($request);\n }", "title": "" }, { "docid": "8d0a97cdf24a3e49996a055c1d6f9ee9", "score": "0.5674049", "text": "public function put($data);", "title": "" }, { "docid": "dd89d251e44d4f4288498c4f3fcdbd27", "score": "0.5669232", "text": "public function update(StoreQuestionRequest $request, Question $question)\n {\n $question->update($request->all());\n return (new QuestionResource($question))->response()->setStatusCode(Response::HTTP_OK);\n }", "title": "" }, { "docid": "07d0f77b1ff351c39ea339ec0c30336e", "score": "0.5668569", "text": "public function update(Request $request, $id)\n {\n $product=Product::find($id);\n $photo=$product->photo;\n if($request->file('photo')){\n $photo=$request->file('photo')->store('public/products');\n \\Storage::delete($product->photo);\n \n \n }\n $product->name=$request->name;\n $product->category_id=$request->category;\n $product->subcategory_id=$request->subcategory;\n $product->description=$request->description;\n $product->photo=$photo;\n $product->price=$request->price;\n $product->quantity=10;\n $product->update();\n notify()->success('Product Update Successfully!');\n return redirect('/product');\n }", "title": "" }, { "docid": "50feec899487537246234315718a4677", "score": "0.56560737", "text": "public function updated(Octocat $resource)\n {\n session()->flash('title', $resource->name);\n session()->flash('message', \"Octocat successfully updated\");\n session()->flash('type', 'success');\n }", "title": "" }, { "docid": "6310b8a0a92465d8b22379c86deeecd7", "score": "0.564211", "text": "public function put($resource, array $parameters = [], $headers = [])\n {\n return $this->request('PUT', $resource, [\n 'form_params' => $parameters,\n 'headers' => $headers,\n ]);\n }", "title": "" }, { "docid": "d31fe3056f944a65fa9ec19317300e44", "score": "0.5622648", "text": "public function update(Request $request)\n {\n \t$validator = Validator::make($request->all(), [\n 'title' => 'required',\n 'id' => 'required',\n 'url' => 'required'\n ]);\n if ($validator->fails()) {\n return redirect(route('manage-contractor-resources-edit', $request->id))\n ->withErrors($validator)\n ->withInput();\n }\n\n $info['title'] = $request->title;\n $info['url'] = $request->url;\n $info['chapter'] = $request->chapter;\n $info['description'] = $request->description;\n $id = $info['id'] =$request->id;\n if(!$id){ \n $request->session()->flash('error', \"Nothing to update (or) unable to update.\");\n return redirect(route('manage-contractor-resources'))->withInput();\n }\n if((new ContractorResource)->updateContractorResource($info)) {\n $request->session()->flash('success', \"Contractor Resource Updated Successfully.\");\n return redirect(route('manage-contractor-resources'));\n } else { \n $request->session()->flash('error', \"Nothing to update (or) unable to update.\");\n return redirect(route('manage-contractor-resources'))->withInput();\n }\n }", "title": "" }, { "docid": "45805699e2ef60790309007e165386e9", "score": "0.5617589", "text": "public function update(Request $request, $id)\n {\n if(count($request->all()) == 0)\n {\n return redirect()->route('home');\n }\n $item = Item::where('id', $id)->first();\n \n if($item)\n { $this->validate($request, [\n 'itemDescription' => ['required']\n ]); \n $item->itemDescription = $request->get('itemDescription');\n $item->inventoryID = $request->get('inventoryID');\n if($request->file('select_file'))\n { \n $this->validate($request, ['select_file' => 'image|mimes:jpeg,png,jpg,gif|max:2048']);\n $image = $request->file('select_file');\n $path = $image->store('stock', 's3');\n\n $item->photoUploadLink = $path;\n }\n $item->save();\n return redirect()->route('stock')->with('success','Stock was successfully updated.');\n }\n else{\n return redirect()->route('stock')->with('error','Unfortunately an error has occurred.');\n }\n }", "title": "" }, { "docid": "0ca7ba7cd4456dc2a52499c097eb460d", "score": "0.5611832", "text": "public function update(Request $request, Memory $memory)\n {\n \n }", "title": "" }, { "docid": "28ac32d59483ead96eb99c3920d2d977", "score": "0.56017566", "text": "public function update( Request $request, $id ) {\n if ( $request->hasFile( 'newphoto' ) ) {\n\n $file = $request->file( 'newphoto' );\n $file_name = time() . '.' . $file->extension();\n $file->move( public_path( 'backend/supplier/' ), $file_name );\n\n $supplier = Supplier::find( $id );\n\n $oldPhoto = $supplier->photo;\n\n if ( $oldPhoto ) {\n $photo_url = $oldPhoto;\n $part = explode( '/', $photo_url );\n $slicedArr = array_slice( $part, 3 );\n $photoStr = implode( '/', $slicedArr );\n unlink( $photoStr );\n }\n\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->address = $request->address;\n $supplier->phone = $request->phone;\n $supplier->shopname = $request->shopname;\n $supplier->photo = asset( \"backend/supplier/{$file_name}\" );\n $supplier->save();\n return $request;\n } else {\n $supplier = Supplier::find( $id );\n\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->address = $request->address;\n $supplier->phone = $request->phone;\n $supplier->shopname = $request->shopname;\n $supplier->photo = $request->photo;\n $supplier->save();\n return $request;\n }\n }", "title": "" }, { "docid": "a9e48624384796f4304eebd40f4ae1bc", "score": "0.5599046", "text": "public function update()\n {\n $id = Input::get('id');\n $obj = Product::find($id);\n if ($obj == null) {\n return view('404');\n }\n $obj->name = Input::get('name');\n $obj->images = Input::get('images');\n $obj->description = Input::get('description');\n $obj->price = Input::get('price');\n $obj->save();\n return redirect('/admin/product');\n }", "title": "" }, { "docid": "feafa85fd136a8bfa7378058dbef8934", "score": "0.55935574", "text": "public function update(StoreQuestion $request, Question $question)\n {}", "title": "" }, { "docid": "5583a1a1065b5e63099c0ebbfcc38083", "score": "0.55854446", "text": "public function modifyResource($uri,\n $sparql = \"\",\n $headers = [],\n $transaction = \"\") {\n $options = [];\n\n // Set content.\n $options['body'] = $sparql;\n\n // Set headers.\n $options['headers'] = $headers;\n $options['headers']['Content-Type'] = 'application/sparql-update';\n\n // Ensure uri takes transaction into account.\n $uri = $this->prepareUri($uri, $transaction);\n\n $response = $this->client->request(\n 'PATCH',\n $uri,\n $options\n );\n\n return null;\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "15b871253c843a97a53c3d5984ec74b9", "score": "0.5576059", "text": "public function update(Request $request, $id)\n {\n //\n $this->validate($request, [\n 'name' => 'required',\n 'price' => 'required',\n 'image_url' => 'image|nullable|max:1999'\n ]);\n\n $product = Product::find($id);\n $product->name = $request->input('name');\n $product->price = $request->input('price');\n $product->groups = $request->input('groups');\n $product->stocks = $request->input('stocks');\n $product->description = $request->input('description');\n //to handle file in updload this way if no new image added the image \n //wont be updated.\n if ($request->hasFile('image_url')){\n //to get the filename with ext\n $file = $request->file('image_url')->getClientOriginalName();\n //get file name\n $filename = pathinfo($file, PATHINFO_FILENAME);\n //get extensiopn\n $ext = $request->file('image_url')->getClientOriginalExtension();\n //new filename\n $fileNameToStore = $filename.'_'.time().'.'.$ext;\n #upload\n $path = $request->file('image_url')->storeAs('public/images', $fileNameToStore);\n }else{\n $fileNameToStore = $product->image_url;\n }\n $product->image_url= $fileNameToStore;\n $product->save();\n\n return redirect('/');\n }", "title": "" }, { "docid": "d30de7511ec7de74e32f94e01d31fafe", "score": "0.5566411", "text": "public function update(Request $r, $id){\n $prk = Portkey::find($id);\n $prk->name = $r->name;\n \n if(isset($r->image)){\n Storage::disk('portkeyMap')->delete($prk->image);\n $path = $r->file('image')->store('', 'portkeyMap');\n $prk->image = $path;\n }\n $prk->save();\n return redirect()->route('portkey.index');\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": "8f8dacf3ca2fb2c9044973cfcebc7c92", "score": "0.555745", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if(!empty($request->input('tags'))){\n $product->tags()->sync($request->input('tags'));\n }else {\n $product->tags()->detach();\n }\n\n //gestion sup image\n if($request->input('delete_picture')=='true'){\n if(!is_null($product->picture)) {\n Storage::delete($product->picture->uri);\n $product->picture->delete();\n }\n }\n\n //gestion de la modification image\n if(!is_null($request->file('thumbnail'))){\n if(!is_null($product->picture)) {\n Storage::delete($product->picture->uri);\n $product->picture->delete();\n }\n\n $im = $request->file('thumbnail');\n $ext = $im->getClientOriginalExtension();\n $uri = str_random(12).'.'.$ext;\n $picture = Picture::create([\n 'uri' => $uri,\n 'type' => $ext,\n 'size' => $im->getClientSize(),\n 'product_id' => $product->id\n ]);\n\n $request->file('thumbnail')->move(env('UPLOAD_PATH','./uploads'), $picture->uri);\n\n }\n\n $product->update($request->all());\n return redirect('product')->with(['message'=>'success']);\n }", "title": "" }, { "docid": "603c333c3d11c6ec2de9c240d7fa4363", "score": "0.55474466", "text": "public function update(Request $request, $id)\n {\n $image = $request->file('image')->store('product', 'public');\n $product = Product::find($id);\n\n $product->nombre = $request->input('nombre');\n $product->descripcion = $request->input('descripcion');\n $product->precio = $request->input('precio');\n $product->stock = $request->input('stock');\n $product->category_id = $request->input('category_id');\n $product->image = $image;\n \n $product->save();\n\n return redirect(\"/$product->id/showProduct\"); \n }", "title": "" }, { "docid": "7412cf8d4f3cd118bf4c8ef71352185b", "score": "0.5544467", "text": "public function update(Request $request, Restify $restify)\n {\n //\n }", "title": "" }, { "docid": "4c0ab51ecbeaff3788498a88d8e05dde", "score": "0.55394554", "text": "public function update($id) {\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": "45a4f9a4a649b70b7c4d70ad32264661", "score": "0.5530422", "text": "public function update(Request $request,$id)\n { \n $slider = Slider::find($id);\n //start image upload\n if($request->file('image') != \"\"){\n $_IMAGE = $request->file('image');\n $name = time().$_IMAGE->getClientOriginalName();\n $uploadPath = 'public/frontend/images/main-slider/';\n $_IMAGE->move($uploadPath,$name);\n $_imageUrl = $uploadPath.$name;\n\n //delete previous image\n if(!empty($slider->image)){\n try{\n unlink(\"$slider->image\");\n }\n catch(\\Exception $e){\n\n }\n finally{\n $flag = true; \n }\n }\n //store updated image\n $slider->image = $_imageUrl;\n\n }\n //end image upload\n $slider->type = $request->type;\n $slider->title = $request->title;\n $slider->sub_title = $request->sub_title;\n $slider->redirect_link = $request->redirect_link;\n $slider->active = $request->active;\n $slider->slider_order = $request->slider_order;\n $slider->save();\n\n return redirect('/admin/sliders')->with('success',' Data Updated');\n }", "title": "" }, { "docid": "0b10222182779f95692d101f822f75b6", "score": "0.55273986", "text": "public function update(Request $request, $id)\n {\n\n $slider=Slider::findorfail($id);\n $this->validate($request,[\n \"title\"=>\"required|max:100\",\n \"image\"=>\"nullable|image\"\n ]);\n\n $slider->name=$request->get(\"title\");\n if($request->hasFile(\"image\")){\n $old_location=public_path(\"images/slider/\".$slider->image_url);\n if(file_exists($old_location))\n unlink($old_location);\n\n $dblocation=uniqid(true).'.png';\n $location=public_path('images/slider/'.$dblocation);\n $file=$request->file(\"image\");\n Image::make($file)->encode(\"png\")->save($location);\n $slider->image_url=$dblocation;\n }\n\n $slider->save();\n Session::flash(\"success\",\"Slider has been updated\");\n\n return redirect()->back();\n\n\n }", "title": "" }, { "docid": "122628d1e06ea888611a75c166b89b4c", "score": "0.552677", "text": "public function patch($data) {\n if (isset($data['id']) && !is_numeric($data['id'])) {\n // Throw an error....\n return new ResourceResponse(\n [\n 'error' => t('You must provide an valid ID when updating a resource.'),\n ],\n ResourceResponse::HTTP_BAD_REQUEST\n );\n }\n $file_system_access_entity = entity_load('file_system_access', $data['id']);\n if (empty($file_system_access_entity)) {\n return new ResourceResponse(\n [\n 'error' => t('Resource not found.'),\n ],\n 404\n );\n }\n if (isset($data['entity_id']) && is_numeric($data['entity_id'])) {\n $file_system_access_entity->set('entity_id', $data['entity_id']);\n }\n if (isset($data['entity_type'])) {\n $file_system_access_entity->set('entity_type', $data['entity_type']);\n }\n if (isset($data['can_view']) && in_array($data['can_view'], [0, 1])) {\n $file_system_access_entity->set('can_view', $data['can_view']);\n }\n if (isset($data['can_write']) && in_array($data['can_write'], [0, 1])) {\n $file_system_access_entity->set('can_write', $data['can_write']);\n }\n if (isset($data['notify_of_upload']) && in_array($data['notify_of_upload'], [0, 1])) {\n $file_system_access_entity->set('notify_of_upload', $data['notify_of_upload']);\n }\n if (isset($data['user_id'])) {\n $file_system_access_entity->set('user_id', ['target_id' => $data['user_id']]);\n }\n // Save the FileSystemAccess Entity.\n $file_system_access_entity->save();\n // Return reponse.\n return new ModifiedResourceResponse(NULL, 202);\n }", "title": "" }, { "docid": "a82e18d865c6a0f13355d38c12c144b4", "score": "0.5523652", "text": "public function updateFilepath(){\n if(!empty($this->originalResource)){\n $this->setFilepath($this->getOriginalResource()->getIdentifier());\n }\n }", "title": "" }, { "docid": "c2ba30e945f68db8e69ec9299a2bf860", "score": "0.55200166", "text": "public function setResource($resource){\n $this->resource = $resource;\n }", "title": "" }, { "docid": "66fbae8975fea1c3ac6a3142735e3664", "score": "0.55114806", "text": "public function update(Request $request, $id)\n {\n $lens = Lens::find($id);\n\n File::delete(str_replace('public','storage',$lens->image));\n\n $lens->delete();\n\n $path = $request->file('image')->store('public');\n\n $lens = Lens::create($request->all());\n\n $lens->image = $path;\n $lens->update();\n\n return redirect()->route('lens.index');\n }", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "70d4983ca950042ec52182066262a01f", "score": "0.55057055", "text": "public function update(Request $request, Product $product)\n {\n \n $product->name = $request->name;\n $product->price = $request->price;\n $product->description = $request->description;\n $product->featured = $request->featured;\n $product->image = $request->image;\n $product->category_id = $request->category_id;\n $product->brand_id = $request->brand_id;\n\n $product->save();\n\n return response([\n 'data' => new ProductResource($product)\n ],Response::HTTP_CREATED);\n }", "title": "" }, { "docid": "a1981e95d8e1e839e57300bff0e83269", "score": "0.5500746", "text": "abstract public function update_storage_site();", "title": "" }, { "docid": "012a18ea3549362ce2727f6242b46f5a", "score": "0.5497882", "text": "public function update(UpdateProductRequest $request, $id)\n {\n $products = Product::find($id);\n $path = null;\n $requestData = $request->all();\n if ($request->file('image')) {\n $path = $request->file('image')->store('public');\n @unlink('storage/'. $products->image);\n }\n if($request->hasFile('image')) {\n //\\File::delete($events->image);\n $requestData['image'] = $path;\n// $requestData['image'] = IdomNotification::uploadAndResize($request->file('image'));\n }\n\n\n\n\n// dd($data);\n $products->update($requestData);\n// $idoms->update($requestData);\n\n return redirect('/admin/products')->with('success','Item update successfully!');\n }", "title": "" }, { "docid": "631ec05d06376fc3d4e4c009809fbc97", "score": "0.54973245", "text": "public function update(SliderRequestUpdate $request, $id)\n {\n $slider=Slider::find($id);;\n $slider->TituloSlider=$request->TituloSlider;\n $slider->DescripcionSlider=$request->DescripcionSlider;\n $slider->EstadoSlider=$request->EstadoSlider;\n\n if ($request->file('file')) {\n \n Storage::disk('s3')->delete('sliders/'.$slider->file_name);\n\n $nameFile = $request->file('file');\n \n $newName = time().rand().'.'.$nameFile->getClientOriginalExtension();\n #Amazon\n\n $path = $nameFile->storeAs('sliders', $newName,'s3');\n Storage::disk('s3')->setVisibility($path, 'public');\n \n $slider->file_url=Storage::disk('s3')->url($path);\n $slider->file=$nameFile->getClientOriginalName();\n $slider->file_name=$newName;\n $slider->file_type=$nameFile->getClientOriginalExtension();\n\n }\n\n \n # $slider->file_url\n $slider->update();\n\n return $slider;\n }", "title": "" }, { "docid": "5ec7d4d96d210f32e09b80058c55a490", "score": "0.5496931", "text": "public function update(Request $request, $id){\n $product = Product::find($id);\n // dd($product);\n if($product){\n if($request->description){\n $product->description = $request->description;\n }\n if($request->name){\n $product->name = $request->name;\n }\n if($request->qty){\n $product->qty = $request->qty;\n }\n if($request->price){\n $product->price = $request->price;\n }\n if ($request->hasFile('image')) {\n $img_src = $request->file('image')->store('public/images');\n $product->image_src = $img_src;\n }\n\n return $product->save() ? 'product updated!' : 'could not update the product';\n }else{\n return 'product not found';\n }\n \n }", "title": "" }, { "docid": "ba09590827a6c41287d661376548ea80", "score": "0.5494963", "text": "public function update(Request $request, $client, $resource)\n\t{\n\t\t$resource = Resource::findBySlug($client, $resource);\n\n\t\tif (!$resource) {\n\t\t\treturn response(view('resources.404'), 404);\n\t\t}\n\n\t\t$resource->load('client');\n\t\t$client = $resource->client;\n\n\t\t$this->authorize('manage', $resource);\n\n\t\t$this->validate($request, [\n\t\t\t'name' => ['required', 'max:255'],\n\t\t\t'slug' => [\n\t\t\t\t'required',\n\t\t\t\t'max:255',\n\t\t\t\t'alpha_dash',\n\t\t\t\t'unique:resources,slug,'.$request->input('slug', $resource->slug).',slug,client_id,'.$resource->client->id,\n\t\t\t\t'not_in:create,destroy,edit,prune'\n\t\t\t],\n\t\t\t// 'metadata' => ['array'],\n\n\t\t\t'attachments' => ['array'],\n\t\t\t'uploads' => ['array'],\n\n\t\t\t'type' => ['required'],\n\n\t\t\t'client' => ['required', 'exists:clients,id'],\n\n\t\t\t'tags' => ['array'],\n\t\t\t'tags.*' => ['exists:tags,id'],\n\t\t]);\n\n\t\tif (($newClient = $request->input('client', $resource->client->id)) != $resource->client->id) {\n\t\t\t$client = Client::find($newClient);\n\t\t\t$resource->client()->associate($client);\n\t\t}\n\n\t\t$resource->name = $request->input('name');\n\t\t$resource->slug = $request->input('slug');\n\t\t$resource->metadata = $request->input('metadata', []);\n\n\t\t$attachments = $request->input('attachments', []);\n\n\t\tif ($request->hasFile('uploads')) {\n\t\t\t$uploads = $request->file('uploads');\n\t\t\t$attachments = array_merge($attachments, $uploads);\n\t\t}\n\n\t\t$resource->attachments = $attachments;\n\n\t\t// set type\n\t\tif (!($type = ResourceType::findBySlug($request->input('type')))) {\n\t\t\t$type = ResourceType::create([\n\t\t\t\t'name' => $request->input('type'),\n\t\t\t\t'slug' => str_slug($request->input('type')),\n\t\t\t]);\n\t\t}\n\n\t\t$resource->type()->associate($type);\n\n\t\t$resource->save();\n\n\t\t$resource->tags()->sync($request->input('tags', []));\n\n\t\treturn redirect()->route('clients.resources.show', ['client' => $resource->client->url, 'resource' => $resource->url])\n\t\t\t->with('alert-success', 'Resource updated!');\n\t}", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "96e3e53de207d1c0165b2f8d9b2e8bd8", "score": "0.5492371", "text": "public function update(Request $request, $id)\n {\n $book = Book::findOrFail($id);\n $path = Storage::putfile('public',$request->file('image'));\n $url = Storage::url($path);\n\n $book->title = $request->title;\n $book->price = $request->price;\n $book->image = $url;\n $book->subject = $request->subject;\n $book->author = $request->author;\n $book->pub_house = $request->pub_house;\n $book->description = $request->description;\n $book->update();\n\n return redirect()->route('land_page');\n }", "title": "" }, { "docid": "f34e0cee27ed61fcc8d340527f1d9673", "score": "0.5490983", "text": "#[Put('/{slug}', middleware: ['auth', 'can:update,slug'])]\n #[Operation(tags: ['Articles'], security: 'BearerToken')]\n #[RequestBody(factory: UpdateArticleRequestBody::class)]\n #[Response(factory: SingleArticleResponse::class, statusCode: 200)]\n #[Response(factory: ErrorValidationResponse::class, statusCode: 422)]\n public function update(Article $slug, UpdateArticleRequest $request): SingleArticleResource\n {\n $slug->update($request->input('article'));\n\n return new SingleArticleResource($slug->loadCount('favoritedBy'));\n }", "title": "" }, { "docid": "4d408504ca6fc63ae1c9b25f108a04b1", "score": "0.5490762", "text": "public function update(Request $request, $id)\n {\n $item = Item::find($id);\n $item->fill($request->all())->save();\n\n //file upload\n if($request->file('image_img')){\n $path = Storage::disk('public')->put('images/photos' , $request->file('image_img'));\n $item->fill(['image_img' => asset($path)])->save();\n }\n\n //tags\n $item->tags()->sync($request->get('tags'));\n\n return redirect()->route('item.index')->with('flash','Article actualizado correctamente.');\n }", "title": "" }, { "docid": "2f3b20927c08bdb57df533acda52a1fe", "score": "0.5490345", "text": "public function update(Request $request) {\n $this->validateItemInput($request);\n \n $item = Db::get()\n ->find(\n $this->classCall, $request->attributes->get('id')\n );\n if (!($item instanceof $this->classCall)) {\n $response = new Response('Trying to update non existing item.');\n $response->setStatusCode(400);\n return $response;\n }\n $oldPath = $item->path;\n $item->update($request->request->all());\n if ($oldPath !== $item->path) {\n $item->path = $this->getUniquePath($item->path);\n }\n Db::get()->persist($item);\n return $item;\n }", "title": "" }, { "docid": "eb69ca57c3bde9f06755b1a82e717baa", "score": "0.54793954", "text": "public function update(Request $request, $id)\n {\n $item = Item::findOrFail($id);\n \n $currentPhoto = $item->photo;\n if ($request->photo != $currentPhoto) {\n $name = time().'.' . explode('/',explode(':', substr($request->photo, 0, strpos($request->photo, ';')))[1])[1];\n\n \\Image::make($request->photo)->save(public_path('/img/item/').$name);\n $request->merge(['photo' => $name]);\n\n $itemPhoto = public_path('/img/item/').$currentPhoto;\n if (file_exists($itemPhoto)) {\n @unlink($itemPhoto);\n }\n }\n $item->update($request->all());\n \n return ['message' => 'Updated Success'];\n }", "title": "" }, { "docid": "ceac6ee3c36ec0367a2b9490feebe7a9", "score": "0.5478989", "text": "public function update(Request $request, $id)\n {\n\n $requestData = $request->all();\n $imagePaths = [];\n\n if ($request->hasFile('path')) {\n for ( $index = 0; $index < sizeof( $requestData['path']); $index++) {\n $imagePath = 'storage/' . $request->file('path')[$index]\n ->store('uploads', 'public');\n array_push($imagePaths, $imagePath);\n }\n }\n $image = Image::findOrFail($id);\n\n if (sizeof($imagePaths) === 0) {\n $requestData['path'] = $image->path;\n $image->update($requestData);\n }\n else {\n $oldImagePath = $image->path;\n $oldImagePath = str_replace(\"storage/\",storage_path('') . '/app/public/' , $oldImagePath);\n\n foreach ($imagePaths as $imagePath){\n\n $requestData['path'] = $imagePath;\n $image->update($requestData);\n }\n\n if(File::exists($oldImagePath)){\n File::delete($oldImagePath);\n }\n }\n\n\n\n return redirect('images/' . $request->get('post_id'))->with('flash_message', 'Image updated!');\n }", "title": "" }, { "docid": "6dbe9a80c3cc7c4c7214a73b919cb78b", "score": "0.54670787", "text": "public function update($request);", "title": "" }, { "docid": "2840f4acb2ccb4170d4557d937e25de4", "score": "0.5465156", "text": "public function update(Request $request, $id)\n {\n $data = Image::find($id);\n $all = $request->all();\n if(is_null($data))\n return response()->json(['error' => 'Resource introuvable'], 404);\n else\n {\n if(isset($all['url']))\n {\n $name = File::image($all['url']);\n if($name)\n {\n $all['url'] = $name;\n }else $all['url'] = $data->url;\n }\n\n $data->update($all);\n $data->categories()->sync($request->categories);\n $data->tags()->sync($request->tags);\n\n return response()->json(new ImageResource($data), 200);\n }\n }", "title": "" }, { "docid": "9080726c97000b95123e3a3548679cb5", "score": "0.5464735", "text": "public function update(Request $request, $id)\n {\n $this->slider = $this->slider->find($id);\n $rule =$this->slider->getRules('update');\n $request->validate($rule);\n $data = $request->except('image');\n\n if($request->image){\n $image_name = uploadImage($request->image,'slider','500x300');\n if($image_name){\n $data['image'] = $image_name;\n if($this->slider->image!= ''){\n deleteImage($this->slider->image,'slider');\n };\n }\n }\n $update = $this->slider->update($data);\n if($update){\n request()->session()->flash('success','Product has been updated');\n }else {\n request()->session()->flash('error','Product has not Been updated');\n\n }\n return redirect()->route('slider.index');\n\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "536db9f9519d6601d2b49cdcde95f013", "score": "0.5458005", "text": "public function update(Request $request, $id)\n {\n //\n $this->validate($request,[\n 'id_manufacture' => 'required',\n 'asset_tag' => 'required',\n 'id_category' => 'required',\n 'order_number' => 'required',\n 'qty' => 'required',\n 'min_qty' => 'required',\n 'id_location' => 'required'\n ]);\n $input = $request->all();\n $asset = Assets::find($id);\n if(!empty($input['image'])){\n Storage::delete(public_path('storage'),$asset->image);\n $input['image'] = time().'.'.$request->image->getClientOriginalExtension();\n $request->image->move(public_path('storage/assets/'), $input['image']);\n }else {\n $input = array_except($input, array('image'));\n }\n $input['created_by'] = Auth::user()->name;\n $asset->update($input);\n return redirect()->route('assets.index')->with(['success' => 'Asset updated successfully', 'class' => 'close']);\n }", "title": "" }, { "docid": "db3837780a308513dc99c922897e898e", "score": "0.54579574", "text": "public function update()\n {\n $this->delete();\n $this->save();\n }", "title": "" }, { "docid": "5f36cdc3217c7c251089de9b1597e8a0", "score": "0.54572374", "text": "public static function put(string $resource, array $body = []) {\r\n $response = self::getClient()->request(\r\n \"PUT\",\r\n self::createUrl($resource),\r\n self::createHeaders(!empty($body)),\r\n NullStripper::strip($body)\r\n );\r\n\r\n if (!self::isSuccessful($response)) {\r\n self::handleFailure($response);\r\n }\r\n return self::handleSuccess($response);\r\n }", "title": "" }, { "docid": "8f4a12a4a3962d1da8617ab2c1add338", "score": "0.5455601", "text": "public function update(Request $request, Product $product)\n {\n if($request->image != NULL) {\n #Image uploading\n $storedPath = $request->file('image')->store('public/products'); \n }\n \n \n #Update the current product\n $product->update([\n 'title' => $request->title,\n 'body' => $request->body,\n 'price' => auth()->user()->id == $product->user_id ? $request->price : $product->price,\n 'category' => $request->category,\n 'image_path' => $request->image != NULL ? $storedPath : $product->image_path,\n 'status' => $request->status\n ]);\n\n #Return back to list page\n return redirect('/products');\n }", "title": "" }, { "docid": "19323452d4f8b1e3cc766b966234512d", "score": "0.54551905", "text": "public function update($obj) {\n }", "title": "" }, { "docid": "236d64bd92646776ec0d62483983f6b1", "score": "0.5442009", "text": "public function update($id, $data)\n {\n try {\n $this->logger->info(\"Trying to update resource in database table\");\n $this->checkId($id);\n\n $putValues = $this->putValues($id, $data);\n\n $query = \"UPDATE guest.student SET name = :name, surname = :surname, indexno = :indexno, address = :address WHERE id = :id\";\n $stmt = $this->conn->prepare($query);\n\n $stmt->bindParam(\":id\", $id);\n $stmt->bindParam(\":name\", $putValues[\"name\"]);\n $stmt->bindParam(\":surname\", $putValues[\"surname\"]);\n $stmt->bindParam(\":indexno\", $putValues[\"indexno\"]);\n $stmt->bindParam(\":address\", $putValues[\"address\"]);\n\n $stmt->execute();\n echo \"Resource successfully updated\";\n $this->logger->info(\"Updating resource successful in database table\");\n\n } catch (InvalidIdException $e) {\n $this->logger->warning(\"ID doesn't exist in database table\");\n echo \"Error: \" . $e->getMessage();\n } catch (\\Exception $e) {\n $this->logger->warning(\"Error updating resource in database table\");\n echo \"Error updating resource: \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "a098fb5d396525d0b997679afe399e81", "score": "0.54363286", "text": "public function update(Request $request, $id)\n {\n\n $product = $this->productRepo->getById($id);\n $request_data = $request->except(['_method', '_token', 'photo', 'product_cats', 'ar', 'en']);\n\n $locale = $request->only('ar', 'en');\n $cats = $request->product_cats;\n\n\n if ($request->hasFile('photo')) {\n /*delete old photo*/\n $oldPath = public_path('/images/products/' . $product->photo);\n $oldThumbPPath = public_path('/images/products/thumb/' . $product->photo);\n File::delete($oldPath, $oldThumbPPath);\n\n $image = $this->upload($request->photo, 'products', true);\n $request_data['photo'] = $image;\n\n }\n\n $this->productRepo->updateData($id, $request_data, $locale, $cats);\n\n return redirect()->route('products.index')->with('update', 'data updated successfully');\n\n\n }", "title": "" }, { "docid": "78c9828cfb522a8b15c9e25aecac3a44", "score": "0.54266506", "text": "public function update(Request $request, $id)\n {\n $order = Order::findOrFail($id);\n $previous_qty = $order->quantity;\n $order->user_id = auth()->id();\n $order->product_id = $request['product_id'];\n $order->quantity = $request['quantity'];\n\n if ($order->save()) {\n Inventory::where('product_id', $order->product_id)->decrement('quantity', $order->quantity);\n Inventory::where('product_id', $order->product_id)->increment('quantity', $previous_qty);\n return new OrderResource($order);\n }\n }", "title": "" }, { "docid": "ecf201c555a1f2a407beb441493f659d", "score": "0.5425398", "text": "public function update(Request $request, $id)\n {\n //\n // dd($request);\n $this->validate($request, [\n 'name' => 'required',\n 'price' => 'required',\n 'point' => 'required',\n 'category' => 'required',\n 'image' => 'image|mimes:jpeg,png,jpg,gif|max:2048',\n ]);\n $new_name = \"\";\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $new_name = time() . '.' . $image->getClientOriginalExtension();\n Image::make($image)->resize(450, 400)->save(public_path('picture/product/' . $new_name));\n $out_of_stock = Out_of_stock::find($id);\n $out_of_stock->name = $request->get('name');\n $out_of_stock->price = $request->get('price');\n $out_of_stock->point = $request->get('point');\n $out_of_stock->category = $request->get('category');\n $oldpruductname = $out_of_stock->picture;\n $out_of_stock->picture = $new_name;\n Storage::delete('product/'.$oldpruductname);\n } else {\n $out_of_stock = Out_of_stock::find($id);\n $out_of_stock->name = $request->get('name');\n $out_of_stock->price = $request->get('price');\n $out_of_stock->point = $request->get('point');\n $out_of_stock->category = $request->get('category');\n }\n\n $out_of_stock->save();\n return back()->with('success', 'Edit data success');\n }", "title": "" }, { "docid": "4da53910fe95b40fc7708d69a5bc4caf", "score": "0.54252774", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'sub_title' => 'required',\n 'image' => 'required|mimes:jpeg,bmp,png'\n ]);\n $slider = Slider::find($id);\n $image = $request->file('image');\n $filename = $image->getClientOriginalName();\n $filename = time(). '.' . $filename;\n $path = 'upload/slider/'.$filename;\n $storage = Storage::disk('s3');\n $storage->put($path, fopen($image, 'r+'), 'public');\n\n $slider->title = $request->title;\n $slider->sub_title = $request->sub_title;\n $slider->image = $path;\n $slider->save();\n Toastr::success('Slider Successefully Updated!', 'Success', [\"positionClass\" =>\"toast-top-right\"]);\n return redirect()->route('slider.index');\n }", "title": "" }, { "docid": "a4ae1c30e150f5cf694572b68551bd23", "score": "0.5425028", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'title'=>'required',\n 'content'=>'required',\n 'date'=>'required',\n 'image'=>'required|image',\n ]);\n $product = Product::find($id);\n $product->edit($request->all());\n $product -> uploadImage($request->file('image'));\n $product->setCategory($request->get('category_id'));\n $product->toggleStock($request->get('in_stock'));\n\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "f08541062169cb53c21e52b58cdb2dcd", "score": "0.5424735", "text": "public function update(Request $request, $id)\n {\n //\n $id = $request->id;\n $store_edit = Store::find($id);\n $store_edit->store_name = $request->store_name;\n $store_edit->store_tel = $request->store_tel;\n $store_edit->store_type_id = $request->store_type;\n $store_edit->store_lineid = $request->store_line;\n $store_edit->store_contact = $request->store_contact;\n $store_edit->store_address = $request->store_address;\n $store_edit->store_detail = $request->store_detail;\n $store_edit->store_status = $request->store_status;\n $store_edit->store_tax_contact = $request->store_tax_contact;\n $store_edit->store_tax_name = $request->store_tax_name;\n $store_edit->store_tax_id = $request->store_tax_id;\n $store_edit->confirm = $request->confirm;\n $store_edit->store_lat = $request->store_lat;\n $store_edit->store_lng = $request->store_lng;\n $tmp = '';\n if($request->check_list){\n foreach($request->check_list as $key => $item){\n if($key == 0){\n $tmp = $item;\n }\n else{\n $tmp = $item.','.$tmp;\n } \n }\n }\n $store_edit->store_promotion = $tmp;\n $store_edit->store_status = $request->store_status;\n\n\n if($request->hasFile('storeimage')){\n Storage::disk('do_spaces')->delete('stores/'.$store_edit->store_image); \n $newFileName = uniqid().'.'.$request->storeimage->extension();//gen name\n $imageStore = $request->file('storeimage');\n $t = Storage::disk('do_spaces')->put('stores/'.$newFileName, file_get_contents($imageStore), 'public');\n $store_edit->store_image = $newFileName;\n }\n if($request->hasFile('storeimageline')){\n Storage::disk('do_spaces')->delete('stores/'.$store_edit->store_lineid_image);\n $newFileName = uniqid().'.'.$request->storeimageline->extension();//gen name\n $imageStoreLine = $request->file('storeimageline');\n $t = Storage::disk('do_spaces')->put('stores/'.$newFileName, file_get_contents($imageStoreLine), 'public');\n $store_edit->store_lineid_image = $newFileName;\n }\n if($request->hasFile('storeimagetax')){\n Storage::disk('do_spaces')->delete('stores/'.$store_edit->store_tax_image);\n $newFileName = uniqid().'.'.$request->storeimagetax->extension();//gen name\n $imageStoreTax = $request->file('storeimagetax');\n $t = Storage::disk('do_spaces')->put('stores/'.$newFileName, file_get_contents($imageStoreTax), 'public');\n $store_edit->store_tax_image = $newFileName;\n }\n $store_edit->save();\n return redirect()->route('store.index')->with('feedback' ,'แก้ไขข้อมูลเรียบร้อยแล้ว');\n }", "title": "" }, { "docid": "2ed05e577c404795cab2b1dde733d75c", "score": "0.5418497", "text": "public function update(Request $request, $id)\n {\n $datos = $request->except('_token','_method');\n\n if ($request->hasFile('foto')) {\n $artista = Artista::findOrfail($id);\n Storage::delete('public/uploads/'.$artista->id.'/'. $artista->foto);\n $datos['foto'] = $request->file('foto')->getClientOriginalName();\n $request->file('foto')->storeAs('public/uploads/'.$artista->id, $datos['foto']);\n }\n\n Artista::where('id','=',$id)->update($datos);\n return redirect('artista');\n }", "title": "" }, { "docid": "da9aacaea3d57116c579322deaba3198", "score": "0.5416959", "text": "public function update(Request $request, $id)\n {\n try {\n $result = $this->model->find($id);\n\n if ($result) {\n $inputs = $request->except('_token');\n\n if ($request->hasFile('image')) {\n $fileName = time() . '.' . $request->image->getClientOriginalExtension();\n $file = $request->file('image');\n\n Storage::put($this->dishImageStoragePath . $fileName, file_get_contents($file), 'public');\n\n $inputs['image'] = $fileName;\n\n if (isset($result->image) && $result->image) {\n if (Storage::exists($this->dishImageStoragePath . $result->image)) {\n Storage::delete($this->dishImageStoragePath . $result->image);\n }\n }\n }\n\n $isSaved = $result->update($inputs);\n\n if ($isSaved) {\n return redirect($this->moduleRoute)->with(\"success\", __($this->moduleName . \" updated!\"));\n }\n }\n return redirect($this->moduleRoute)->with(\"error\", __(\"Something went wrong, please try again later.\"));\n } catch (\\Exception $e) {\n return redirect($this->moduleRoute)->with('error', $e->getMessage());\n }\n }", "title": "" }, { "docid": "9909c434dfa1fa2de013b52dc098057a", "score": "0.54166603", "text": "public function updateProduct();", "title": "" }, { "docid": "83fd3d73dd82fcaecb92e078c534bdfe", "score": "0.54161036", "text": "public function update(Request $request, $id)\n {\n $data = array();\n $data['status'] = $request->status;\n \n \n $image = $request->newphoto;\n\n if ($image) {\n $position = strpos($image, ';');\n $sub = substr($image, 0, $position);\n $ext = explode('/', $sub)[1];\n\n $name = time().\".\".$ext;\n $img = Image::make($image)->resize(240,200);\n $upload_path = 'backend/supplier/';\n $image_url = $upload_path.$name;\n $success = $img->save($image_url);\n \n if ($success) {\n $data['photo'] = $image_url;\n $img = DB::table('patients')->where('id',$id)->first();\n $image_path = $img->photo;\n $done = unlink($image_path);\n $user = DB::table('patients')->where('id',$id)->update($data);\n }\n \n }else{\n $oldphoto = $request->photo;\n $data['photo'] = $oldphoto;\n $user = DB::table('patients')->where('id',$id)->update($data);\n }\n }", "title": "" }, { "docid": "fa90d4335b5457d60aed5f93219c9fb9", "score": "0.5414578", "text": "function update($resource_id,$options)\n\t{\n\t\t//allowed fields\n\t\t$valid_fields=array(\n\t\t\t//'resource_id',\n\t\t\t//'survey_id',\n\t\t\t'dctype',\n\t\t\t'title',\n\t\t\t'subtitle',\n\t\t\t'author',\n\t\t\t'dcdate',\n\t\t\t'country',\n\t\t\t'language',\n\t\t\t//'id_number',\n\t\t\t'contributor',\n\t\t\t'publisher',\n\t\t\t'rights',\n\t\t\t'description',\n\t\t\t'abstract',\n\t\t\t'toc',\n\t\t\t'subjects',\n\t\t\t'filename',\n\t\t\t'dcformat',\n\t\t\t'changed');\n\n\t\t//add date modified\n\t\t$options['changed']=date(\"U\");\n\t\t\t\t\t\n\t\t//remove slash before the file path otherwise can't link the path to the file\n\t\tif (isset($options['filename']))\n\t\t{\n\t\t\tif (substr($options['filename'],0,1)=='/')\n\t\t\t{\n\t\t\t\t$options['filename']=substr($options['filename'],1,255);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//pk field name\n\t\t$key_field='resource_id';\n\t\t\n\t\t$update_arr=array();\n\n\t\t//build update statement\n\t\tforeach($options as $key=>$value)\n\t\t{\n\t\t\tif (in_array($key,$valid_fields) )\n\t\t\t{\n\t\t\t\t$update_arr[$key]=$value;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//update db\n\t\t$this->db->where($key_field, $resource_id);\n\t\t$result=$this->db->update('resources', $update_arr); \n\t\t\n\t\treturn $result;\t\t\n\t}", "title": "" }, { "docid": "cc834cb0ddf4d709f9b0966aeba0c395", "score": "0.5407511", "text": "public function update(Request $request, Product $product)\n {\n\n if (Auth::id()==$product->user_id) {\n $product->update($request->all());\n\n return response([\n 'data'=>new ProductResource($product)\n ],Response::HTTP_CREATED); \n }\n\n \nelse {\n return response([\n 'error'=>'product doesnt belong to current user'\n ],Response::HTTP_NOT_FOUND); \n}\n // return response()->json(new ProductResource($product), 200); \n\n \n\n \n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "4121be4d75a05b019dd224ca68ebb4ad", "score": "0.0", "text": "public function index(Request $request)\n {\n $restaurant = Restaurant::findOrFail($request->restaurant);\n return view('backend.foodType.list_foodTypes',compact('restaurant'));\n }", "title": "" } ]
[ { "docid": "d4a0ecd8566af1bfd9231147ca1e458f", "score": "0.7474584", "text": "public function list()\n {\n try {\n $result = $this->get_all();\n $this->response($result);\n } catch (Exception $e) {\n $this->response(array(\n \"message\" => $e->getMessage()\n ), ERROR_CODE);\n }\n }", "title": "" }, { "docid": "6126929dc3b0a4f22ee22cc3ad8d6a7b", "score": "0.74220824", "text": "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "title": "" }, { "docid": "4c31098007bd884125e38a924a90b409", "score": "0.7371856", "text": "public function index()\n {\n $resources = Resource::paginate(10);\n return view('admin.resource.index', [\n 'resources' => $resources\n ]);\n }", "title": "" }, { "docid": "8fa6c385e83466b77bd15a6b86ea32e2", "score": "0.7302786", "text": "public function index()\n {\n $this->_create_list();\n $this->_display();\n\n }", "title": "" }, { "docid": "dd0281461ff38e01dc7daaf263a98684", "score": "0.7268293", "text": "function index() {\n $this->getList();\n }", "title": "" }, { "docid": "0e6388aacce7838ee1c78178d8108829", "score": "0.7265982", "text": "public function index(){\n\t\t\t$this->list();\n\t\t}", "title": "" }, { "docid": "90f60a2d2b3c2500e55bda8c3ba362da", "score": "0.7190978", "text": "public function index()\n {\n $resources = $this->resourceRepository->all();\n\n return $this->sendResponse($resources->toArray(), \"Resources retrieved successfully\");\n }", "title": "" }, { "docid": "9af36ef65a801a9d1ba3b391202f1180", "score": "0.7120287", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(20);\n return view('resource.index')->withResources($resources);\n }", "title": "" }, { "docid": "43a0ac0c5c36c0a0b193022ebde4ce89", "score": "0.7083483", "text": "public function index()\n {\n $config['tableName'] = trans('app.Resources list');\n $config['ignore'] = ['id', 'count', 'created_at', 'updated_at', 'deleted_at'];\n $config['list'] = MBResources::get()->toArray();\n $config['delete'] = 'app.resources.destroy';\n return view('admin.adminList',$config);\n }", "title": "" }, { "docid": "19fc4ced7c3387dd13afa92c5a8afae5", "score": "0.70549417", "text": "public function do_list()\r\n\t{\r\n\t\t$sorter = array(\r\n\t\t\t'name' => \"sorter\",\r\n\t\t\t'default' => 'name ASC',\r\n\t\t\t'options' => array(\r\n\t\t\t\t\"name ASC\" => \"Name\",\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t$result = $this->model->get_records(array(\r\n\t\t\t'conditionset' => array(\r\n\t\t\t),\r\n\t\t\t'sorter' => $sorter,\r\n\t\t\t'limit' => 10\r\n\t\t\t));\r\n\r\n\t\tinclude($this->get_path(self::ACTION_TYPE_LIST));\r\n\t}", "title": "" }, { "docid": "1855faa3b08cf438cac0964b9903bf8a", "score": "0.7013115", "text": "public function index()\n {\n $this->getListingService()\n ->setOrder($this->getOrder())\n ->setPagination($this->getPagination())\n ->getFilters()->add($this->getSearchFilter());\n $this->set(\n [\n $this->getEntityNamePlural() => $this->getListingService()\n ->getList(),\n 'pagination' => $this->getListingService()->getPagination()\n ]\n );\n }", "title": "" }, { "docid": "2e0ed72eb13150f2559131309e8f93b1", "score": "0.6999293", "text": "public function listing ()\n {\n // Fetch all questions\n $cacheID = 'listing';\n if (!$this->data['questions'] = $this->zf_cache->load($cacheID)) {\n $this->data['questions'] = $this->question_model->get_with_users();\n $this->zf_cache->save($this->data['questions'], $cacheID, array('all_questions'));\n }\n \n // Load view\n $this->load_view('questions/listing');\n }", "title": "" }, { "docid": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.698912", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "c93e1e2d6b3b2e51a961fef1bdfbb734", "score": "0.6985367", "text": "public function index()\n {\n //\n $pagesize = 20;\n $query = DataResource::orderBy('listorder','desc');\n $list = $query->paginate($pagesize);\n return view('admin.resources',['data'=>$list,'url'=>$this->url]);\n }", "title": "" }, { "docid": "18cd5639adcca5b283e7352aa46af4de", "score": "0.69576323", "text": "public function index()\n {\n $this->userCollectListing('0', 'ALL');\n }", "title": "" }, { "docid": "e31e9a0c7b3d2a9b4bc1a2880b844a81", "score": "0.69216424", "text": "public function indexAction()\n {\n $resource = $this->repo->all();\n if (!$resource) {\n return $this->errorNotFound('Resource not found');\n }\n return $this->apiOk($resource);\n }", "title": "" }, { "docid": "eed18db8f9e2d6b6fa328a727bce13ea", "score": "0.6883624", "text": "public function listingAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SettingContentBundle:Page')->findBy(array(),array('name' => 'asc'));\n\n return $this->render('SettingContentBundle:Page:index.html.twig', array(\n 'pagination' => $entities,\n ));\n }", "title": "" }, { "docid": "a753301d8fa92e6902db5a211f69a62a", "score": "0.688052", "text": "public function indexAction()\n {\n if($categoryId = $this->request->getQuery('categoryId')){\n $resource = $this->repo->all($categoryId);\n }else {\n $resource = $this->repo->all();\n }\n if (!$resource) {\n return $this->errorNotFound('Resource not found');\n }\n return $this->apiOk($resource);\n }", "title": "" }, { "docid": "22231d816d7e2f1e58fb69799b2104dc", "score": "0.6864743", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "060b373609f7e0db718e407076c66e1d", "score": "0.6862013", "text": "public function indexAction()\n {\n $this->tag->setTitle(__('Firewalls'));\n // Available sort to choose\n $this->filter->add('in_array', function($value) {\n return in_array($value, ['name', 'name DESC', 'status', 'status DESC']) ? $value : null;\n });\n\n // Get networks and prepare pagination\n $paginator = new Paginator([\n \"data\" => Firewalls::find(['order' => $this->request->getQuery('order', 'in_array', 'id', true)]),\n \"limit\" => $this->request->getQuery('limit', 'int', 20, true),\n \"page\" => $this->request->getQuery('page', 'int', 1, true)\n ]);\n\n $this->view->setVars([\n 'pagination' => $paginator->getPaginate(),\n ]);\n }", "title": "" }, { "docid": "06987da1b6d89d3d1c996205e8a37e46", "score": "0.6860847", "text": "public function index()\n {\n //$records = Category::paginate();\n $records = Category::all();\n //return CategoryResource::collection($records);\n return $this->showAll($records);\n }", "title": "" }, { "docid": "0473d264241dfecb205046df754f7ad1", "score": "0.68566513", "text": "public function index() {\n $resources = static::$resource::orderBy(static::$orderBy)->paginate(static::$pageSize);\n return view($this->getView('index'), [static::$varName[1] ?? $this->getResourcePluralName() => $resources]);\n }", "title": "" }, { "docid": "ac3d7b3949ed4508eaeabfca96b1ae5e", "score": "0.68193215", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $extFilters = $this->request->query->get('ext_filters');\n if(isset($extFilters['entity.gallery'])) {\n $dql = 'entity.gallery = ' . $extFilters['entity.gallery'];\n $this->entity['list']['dql_filter'] = $dql;\n }\n \n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, ['paginator' => $paginator]);\n\n $parameters = [\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'batch_form' => $this->createBatchForm($this->entity['name'])->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ];\n\n return $this->executeDynamicMethod('render<EntityName>Template', ['list', $this->entity['templates']['list'], $parameters]);\n }", "title": "" }, { "docid": "e4a0d12ede1642140b2b2864bea7bde8", "score": "0.68148345", "text": "public function show_list();", "title": "" }, { "docid": "8e473fb8d57781fcbb301d794e4638b7", "score": "0.68072057", "text": "public function listResources();", "title": "" }, { "docid": "a63fe3d362e9ed8bdeb8c498c0f70dc8", "score": "0.68070567", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n //dump($todos);\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "title": "" }, { "docid": "ae6ac1129584c76c474a8718bca91c33", "score": "0.6777383", "text": "public function ListView() {\n $this->Render();\n }", "title": "" }, { "docid": "e33620f9e0602f70ef6cab4f1bdb2610", "score": "0.6769549", "text": "public function index()\n\t{\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "a62c8fb3c6a39b17143e4f99a44215eb", "score": "0.6743264", "text": "public function index()\n {\n // Get Products\n $products = Product::paginate(15);\n\n // Return collection of products as a resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "3cb20d494ffa4e3923d82dc428173efe", "score": "0.6741688", "text": "public function listAction()\n {\n $date = array();\n $date['year'] = $this->_getParam('year', null);\n $date['month'] = $this->_getParam('month', null);\n $date['day'] = $this->_getParam('day', null);\n\n $model = $this->_getPhotoModel();\n\n $by = $this->_getParam('by', null);\n if ($by == 'taken_at') {\n $entries = $model->fetchEntriesByTakenAt($date, $this->_getParam('page', 1));\n } else {\n $entries = $model->fetchEntriesByCreated($date, $this->_getParam('page', 1));\n }\n $this->view->paginator = $entries;\n }", "title": "" }, { "docid": "1791d7d351176ff2ce62051654642a7d", "score": "0.6741663", "text": "public function indexAction()\n {\n $this->render('lists/index', array(\n 'title' => 'Todo Lists',\n 'lists' => TodoList::all()\n ));\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.674076", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "f1af362b177db60f1aa234951fb3dd26", "score": "0.67405367", "text": "public function listAction()\r\n {\r\n\r\n return array(\r\n 'items' => $this->getMapper()->findAll()\r\n );\r\n }", "title": "" }, { "docid": "1ad218b37000705f13503d05f42e31f8", "score": "0.6728095", "text": "public function listing(){\n //appelle constructeur produit\n }", "title": "" }, { "docid": "e875f9f43f0899fd4868233dc7733127", "score": "0.67262083", "text": "public function index()\n {\n //\n $loan = Loan::all();\n return LoanResource::collection($loan);\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.6723516", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.6723516", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.6723516", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "8bc383be0c0551987008cc1e903dfb3e", "score": "0.6714433", "text": "function listing(){ \n $data['title'] = 'Senarai Selenggaraan';\n $this->_render_page($data);\n }", "title": "" }, { "docid": "d5baeaa346c5c7d82493b224630a04fd", "score": "0.6693072", "text": "public function list()\n {\n return view('list', [\n 'component' => 'data-list',\n 'title' => 'Assets',\n 'create_url' => 'assets/create',\n 'count' => Asset::count(),\n 'columns' => [\n 'Path' => 'path',\n ],\n 'rows' => Asset::paginate(10)\n ]);\n }", "title": "" }, { "docid": "ec97d24c4e19a5128b0e53c5846b9bf5", "score": "0.6692183", "text": "public function index()\n {\n return $this->getList();\n\n }", "title": "" }, { "docid": "ff020d8354464758e72e91a912f20d8e", "score": "0.66906744", "text": "public function actionList()\n {\n $list = $this->viewList('car');\n $imgs = ImageModel::load('img/car/logo/');\n return $this->render('list',compact('list','imgs'));\n }", "title": "" }, { "docid": "ffb17c08a85c1385b784beb46e5b3ade", "score": "0.66859806", "text": "public function index()\n {\n $artists = Artist::orderBy('sort', 'asc')->get();\n\n return ArtistResource::collection($artists);\n }", "title": "" }, { "docid": "7ee6025c5609ac52b9b1dbb4db5ac2f3", "score": "0.66848135", "text": "public function index()\n\t{\n\t\tlist_details();\n\t}", "title": "" }, { "docid": "350cb7824776140ada3444d8b63c2b9a", "score": "0.6683759", "text": "public function actionList() {\n \n $allartists = array();\n $allartists = Artist::getArtistList();\n $role = Role::getRoles();\n \n require_once(ROOT . '/views/lists/artistlist.php');\n }", "title": "" }, { "docid": "10a81357fb2912f13e91cd4d9b24c4d0", "score": "0.6682944", "text": "public function listAction()\n {\n $contentObject = $this->configurationManager->getContentObject();\n $header = $contentObject->data['header'];\n\n $this->view->assign('header', $header);\n $this->view->assign('plays', $this->playRepository->findAll());\n }", "title": "" }, { "docid": "e499e3e7f1a366ffebb6385468f3a0c5", "score": "0.66767603", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $lists = $em->getRepository('HunterBundle:Lists')->findAll();\n\n return $this->render('lists/index.html.twig', array(\n 'lists' => $lists,\n ));\n }", "title": "" }, { "docid": "b4ab065b5e289a80de47b28c29b12ba7", "score": "0.66687995", "text": "public function index()\n {\n /* authorization */\n $this->authorize('viewAny', Family::class);\n\n $families = Family::all();\n /* return resource collection */\n return FamilyResource::collection($families);\n }", "title": "" }, { "docid": "fc34d7bf0a8503064964866cc73ae555", "score": "0.6662874", "text": "function action_ResourceList()\n {\n\n $this->view = 'ResourceList';\n }", "title": "" }, { "docid": "91774d2a4f88a022706d4cc72b2fb4b9", "score": "0.6661785", "text": "public function _index() {\n\t\t$datas = DAO::getAll ( $this->model );\n\t\techo $this->_getResponseFormatter ()->get ( $datas );\n\t}", "title": "" }, { "docid": "473597c1b0826e1810587ecd7042a12d", "score": "0.66609246", "text": "public function actionIndex()\n {\n $searchModel = new ResourcemanagementSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "68a18d7d7744ddf6d10c85166d9a9672", "score": "0.6657232", "text": "public function listing($arguments);", "title": "" }, { "docid": "3768e67b371a22f226e966a98bb745f7", "score": "0.66527843", "text": "public static function list()\n {\n $data = [];\n $data[\"products\"] = DefaultModel::getProducts();\n\n View::createRoot(\"product-list\", $data)->render();\n }", "title": "" }, { "docid": "f186543d4e229fe60c320d197652a0ac", "score": "0.66488373", "text": "public function index()\n {\n return BookResource::collection(Book::paginate());\n }", "title": "" }, { "docid": "7fe029aedf53dcfabf4dbd68136e211f", "score": "0.6647886", "text": "public function index()\n {\n $items = Item::all();\n return ItemResource::Collection($items);\n }", "title": "" }, { "docid": "6e0e97799dea5e1f1424a0ed54835cae", "score": "0.66469675", "text": "public function index()\n {\n $products = Product::paginate();\n\t\treturn new ListCollection($products);\n }", "title": "" }, { "docid": "12d65a6c55f0fff8b933565f6365be6c", "score": "0.6637314", "text": "public function index() {\n return $this->showAll();\n }", "title": "" }, { "docid": "862f0847ab763608409837b536150716", "score": "0.663524", "text": "public function indexAction()\r\n\t{\r\n\t\t$this->view->mainTitle = \"Listado de Plantillas\";\r\n\t\t$this->view->errors = $this->_helper->flashMessenger->getMessages();\r\n\t\t\r\n\t\t$nombre = $this->getParam(\"nombre\");\r\n\t\t$plantillas = $this->getRepository()->find($nombre);\r\n\t\t\r\n\t\t$this->view->plantillas = $plantillas;\r\n\t}", "title": "" }, { "docid": "a3074d45fbccf32cdbe6810d56d21449", "score": "0.66271347", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $projects =$this->service->retrieveAllInvestmentProjects($page);\n $this->view->projects = $projects;\n $this->view->paginator = $this->service->getPaginator($page);\n $this->view->role = Zend_Auth::getInstance()->getIdentity()->roleName;\n }", "title": "" }, { "docid": "39fb2eb38215d01e980796dd191b4bc2", "score": "0.66252124", "text": "public function index()\n {\n // needs to return multiple articles\n // so we use the collection method\n return ArticleListResource::collection(Article::all());\n }", "title": "" }, { "docid": "77b2fcb12774bae3c68bc3f546be203d", "score": "0.6623038", "text": "public function list ()\n {\n $products = Product::all();\n\n View::load('home', [\n 'products' => $products\n ]);\n\n }", "title": "" }, { "docid": "7eb3e9d73404c31d887de34e0e543165", "score": "0.6619889", "text": "public function index()\n {\n $streams = Streams::paginate(15);\n\n return StreamsResource::collection($streams);\n }", "title": "" }, { "docid": "a10012db405ad2f58017047d7c5955a3", "score": "0.6614244", "text": "public function index()\n {\n // get articles\n $articles = Article::paginate(15);\n\n // return collection of articles as a ressource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "c5562ea22267c67b7e362d148ab229b0", "score": "0.66133827", "text": "public function index ()\n {\n $data = Category::paginate(15);\n\n return $this->display( [ 'data' => $data ] );\n }", "title": "" }, { "docid": "4e546e7736c944aa032aaf9b866565c0", "score": "0.6611853", "text": "public function indexAction() {\n\t\t$this->view->assign('staticLists', $this->staticListService->listAll());\n\t}", "title": "" }, { "docid": "2d2195ebc523704e7f178bd9b4556f73", "score": "0.66103095", "text": "public function index()\n\t{\n\t\t//\n\t\t$resources = \\App\\Resource::with('category')->get();\n\t\treturn view('viewResource',['resources' => $resources ]);\n\t}", "title": "" }, { "docid": "a14d9338522a9ff2dff64321e93eddd2", "score": "0.6605357", "text": "public function listAction() {\n\t\t\t$this->view->assign('tags', $this->tagRepository->findAll());\n\t\t}", "title": "" }, { "docid": "1fe94a4f4bf96984fb89ede920f77850", "score": "0.66015273", "text": "public function index()\n {\n \t$listings = Listing::orderBy( 'created_at', 'desc' )->get();\n return view( '/listings',compact( 'listings' ) );\n }", "title": "" }, { "docid": "8654188b350eeb0d720961a0f868517e", "score": "0.6600411", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n\n\t\t//GET SUBJECT AND OTHER SETTINGS\n $this->view->list = Engine_Api::_()->core()->getSubject('list_listing');\n\t\t$settings_api = Engine_Api::_()->getApi('settings', 'core');\n\t\t$this->view->show_featured = $settings_api->getSetting('list.feature.image', 1);\n\t\t$this->view->featured_color = $settings_api->getSetting('list.featured.color', '#0cf523');\n\t\t$this->view->show_sponsered = $settings_api->getSetting('list.sponsored.image', 1);\n\t\t$this->view->sponsored_color = $settings_api->getSetting('list.sponsored.color', '#fc0505');\n\t\t\n //GET VIEWER AND CHECK VIEWER CAN EDIT PHOTO OR NOT\n $viewer = Engine_Api::_()->user()->getViewer();\n\t\t$this->view->can_edit = $this->view->list->authorization()->isAllowed($viewer, \"edit\");\n }", "title": "" }, { "docid": "c6630fa3ab4d194924045c2530a6eaf3", "score": "0.6594772", "text": "public function listAction()\n {\n $model = $this->_owApp->selectedModel;\n $translate = $this->_owApp->translate;\n $store = $this->_erfurt->getStore();\n $resource = $this->_owApp->selectedResource;\n $ac = $this->_erfurt->getAc();\n $params = $this->_request->getParams();\n $limit = 20;\n\n $rUriEncoded = urlencode((string)$resource);\n $mUriEncoded = urlencode((string)$model);\n $feedUrl = $this->_config->urlBase . \"history/feed?r=$rUriEncoded&mUriEncoded\";\n\n $this->view->headLink()->setAlternate($feedUrl, 'application/atom+xml', 'History Feed');\n\n // redirecting to home if no model/resource is selected\n if (\n empty($model) ||\n (\n empty($this->_owApp->selectedResource) &&\n empty($params['r']) &&\n $this->_owApp->lastRoute !== 'instances'\n )\n ) {\n $this->_abort('No model/resource selected.', OntoWiki_Message::ERROR);\n }\n\n // getting page (from and for paging)\n if (!empty($params['page']) && (int) $params['page'] > 0) {\n $page = (int) $params['page'];\n } else {\n $page = 1;\n }\n\n // enabling versioning\n $versioning = $this->_erfurt->getVersioning();\n $versioning->setLimit($limit);\n\n if (!$versioning->isVersioningEnabled()) {\n $this->_abort('Versioning/History is currently disabled', null, false);\n }\n\n $singleResource = true;\n // setting if class or instances\n if ($this->_owApp->lastRoute === 'instances') {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = $translate->_('Versions for elements of the list');\n\n $listHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('List');\n $listName = \"instances\";\n if ($listHelper->listExists($listName)) {\n $list = $listHelper->getList($listName);\n $list->setStore($store);\n } else {\n $this->_owApp->appendMessage(\n new OntoWiki_Message('something went wrong with the list of instances', OntoWiki_Message::ERROR)\n );\n }\n\n $query = clone $list->getResourceQuery();\n $query->setLimit(0);\n $query->setOffset(0);\n //echo htmlentities($query);\n\n $results = $model->sparqlQuery($query);\n $resourceVar = $list->getResourceVar()->getName();\n\n $resources = array();\n foreach ($results as $result) {\n $resources[] = $result[$resourceVar];\n }\n //var_dump($resources);\n\n $historyArray = $versioning->getHistoryForResourceList(\n $resources,\n (string) $this->_owApp->selectedModel,\n $page\n );\n //var_dump($historyArray);\n\n $singleResource = false;\n } else {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = sprintf($translate->_('Versions for %1$s'), $title);\n\n $historyArray = $versioning->getHistoryForResource(\n (string)$resource,\n (string)$this->_owApp->selectedModel,\n $page\n );\n }\n\n if (sizeof($historyArray) == ( $limit + 1 )) {\n $count = $page * $limit + 1;\n unset($historyArray[$limit]);\n } else {\n $count = ($page - 1) * $limit + sizeof($historyArray);\n }\n\n $idArray = array();\n $userArray = $this->_erfurt->getUsers();\n $titleHelper = new OntoWiki_Model_TitleHelper();\n // Load IDs for rollback and Username Labels for view\n foreach ($historyArray as $key => $entry) {\n $idArray[] = (int) $entry['id'];\n if (!$singleResource) {\n $historyArray[$key]['url'] = $this->_config->urlBase . \"view?r=\" . urlencode($entry['resource']);\n $titleHelper->addResource($entry['resource']);\n }\n\n if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->anonymousUser) {\n $userArray[$entry['useruri']] = 'Anonymous';\n } else if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->superAdmin) {\n $userArray[$entry['useruri']] = 'SuperAdmin';\n } else if (is_array($userArray[$entry['useruri']])) {\n if (isset($userArray[$entry['useruri']]['userName'])) {\n $userArray[$entry['useruri']] = $userArray[$entry['useruri']]['userName'];\n } else {\n $titleHelper->addResource($entry['useruri']);\n $userArray[$entry['useruri']] = $titleHelper->getTitle($entry['useruri']);\n }\n }\n }\n $this->view->userArray = $userArray;\n $this->view->idArray = $idArray;\n $this->view->historyArray = $historyArray;\n $this->view->singleResource = $singleResource;\n $this->view->titleHelper = $titleHelper;\n\n if (empty($historyArray)) {\n $this->_owApp->appendMessage(\n new OntoWiki_Message(\n 'No history for the selected resource(s).',\n OntoWiki_Message::INFO\n )\n );\n }\n\n if ($this->_erfurt->getAc()->isActionAllowed('Rollback')) {\n $this->view->rollbackAllowed = true;\n // adding submit button for rollback-action\n $toolbar = $this->_owApp->toolbar;\n $toolbar->appendButton(\n OntoWiki_Toolbar::SUBMIT,\n array('name' => $translate->_('Rollback changes'), 'id' => 'history-rollback')\n );\n $this->view->placeholder('main.window.toolbar')->set($toolbar);\n } else {\n $this->view->rollbackAllowed = false;\n }\n\n // paging\n $statusBar = $this->view->placeholder('main.window.statusbar');\n // the normal page_param p collides with the generic-list param p\n OntoWiki_Pager::setOptions(array('page_param'=>'page'));\n $statusBar->append(OntoWiki_Pager::get($count, $limit));\n\n // setting view variables\n $url = new OntoWiki_Url(array('controller' => 'history', 'action' => 'rollback'));\n\n $this->view->placeholder('main.window.title')->set($windowTitle);\n\n $this->view->formActionUrl = (string) $url;\n $this->view->formMethod = 'post';\n // $this->view->formName = 'instancelist';\n $this->view->formName = 'history-rollback';\n $this->view->formEncoding = 'multipart/form-data';\n }", "title": "" }, { "docid": "e16b7bcfc7e0c35a6d0ecf74b30d6a20", "score": "0.6587904", "text": "public function index()\n {\n $title = $this->title($this->modelName);\n $modelName = $this->modelName;\n $model = $this->model;\n $listStatus = $this->listStatus;\n $models = Bank::paginate(10);\n return view('bank.lists.index', compact('title', 'models', 'modelName', 'model', 'listStatus'));\n }", "title": "" }, { "docid": "c4bb31a9775a0e667ef62e4f3a23aeab", "score": "0.6563005", "text": "public function listAction() {\n $this->_datatable();\n return array();\n }", "title": "" }, { "docid": "b9b300aec37bbe88214d2c466b083d07", "score": "0.656141", "text": "public function index()\n {\n // Obtengo los resultados\n $results = Result::all();\n\n // Lo devuelvo como un recurso\n return ResultResource::collection($results);\n }", "title": "" }, { "docid": "e840f12f97ea99ca01a90a9ec9cad7ca", "score": "0.65604496", "text": "public function index()\n {\n return BookResource::collection(Book::with('authors')->paginate(25));\n }", "title": "" }, { "docid": "19e51010afc5a8251ed229fa24e89b84", "score": "0.65540445", "text": "public function index()\n {\n $items = Item::search()->paginate(10);\n return view('item.list', compact('items'));\n }", "title": "" }, { "docid": "25bbf4f08be5c7ace0982ed3e61db475", "score": "0.65523857", "text": "public function list()\n {\n //\n }", "title": "" }, { "docid": "25bbf4f08be5c7ace0982ed3e61db475", "score": "0.65523857", "text": "public function list()\n {\n //\n }", "title": "" }, { "docid": "451b54ad54f4267a96a3c9a18faae916", "score": "0.6551622", "text": "function index()\n {\n $this->listArticles();\n }", "title": "" }, { "docid": "7335a64fbf88651c9293fc7e0bf1a4a1", "score": "0.65479755", "text": "public function getIndex()\r\n { \r\n $response = $this->modelService->getAll();\r\n //return resources listing view\r\n return view(\\OogleeBConfig::get('config.post_index.index'), compact('response'));\r\n }", "title": "" }, { "docid": "ea133c7a5d450c0580ac1c613df4b59d", "score": "0.65477294", "text": "public function index()\n {\n //Get Movies\n $movies = Movie::paginate(15);\n\n //return collection of movies as a resource\n return MovieResource::collection($movies);\n }", "title": "" }, { "docid": "83b5665a886532759f6d6fd3177eb43d", "score": "0.65454674", "text": "public function actionList()\n\t{\n\t\t$this->subLayout = \"@humhub/views/layouts/_sublayout\";\n\t\t$data = Desire::getAll(10);\n\t\t$articles = $data['articles'];\n\t\t$count = $data['count'];\n\n\n\n\t\treturn $this->render('list', [\n\t\t\t'articles' => $articles,\n\t\t\t'count' => $count,\n\t\t\t'ajaxUrl' => '/desire/desire/list-ajax?sort='.Yii::$app->request->get('sort'),\n\t\t]);\n\t}", "title": "" }, { "docid": "bc892b43167344bb7550a0e63635634f", "score": "0.6541187", "text": "public function index()\n {\n $students = Student::all();\n return StudentResource::collection($students);\n \n }", "title": "" }, { "docid": "46a4b83443e6a7cb9ed2604a7ba376d3", "score": "0.65395916", "text": "public function viewList(): void\n {\n $model = self::fetchModel($this->request->get(self::PARAM_MODEL_NAME));\n $this->response->set(Mvc::TEMPLATE, 'manager');\n $this->response->set(Mvc::CONTEXT, $this->request->get(Mvc::CONTEXT));\n $this->response->set(Mvc::VIEW, $this->request->get(Mvc::VIEW));\n $this->response->set('config', $this->getCrudConfig($model));\n $content = FrontendHelper::parseFile('/var/www/_dev/vendor/noxkiwi/crud/frontend/view/crudfrontend/list.php');\n $this->response->set('content', $content);\n $this->response->set(self::PARAM_MODEL_NAME, $this->modelName);\n }", "title": "" }, { "docid": "f0e979747234803271be38ea6cd3396e", "score": "0.65392786", "text": "public function index()\n\t{\n\t\t$categories = Category::paginate(5);\n\t\treturn CategoryResource::collection($categories);\n\t}", "title": "" }, { "docid": "e08fd6cadf8c20cad7196e73194fba35", "score": "0.65371805", "text": "public function index()\n {\n return $this->service->showAll();\n }", "title": "" }, { "docid": "2a2a07c1f7a2727a0de83a5fa87aabaa", "score": "0.65370184", "text": "public function index()\n {\n $books=Book::paginate(10);\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.6528118", "text": "public function list()\n {\n }", "title": "" }, { "docid": "68de2d9bace6b0d21d880e30663096bd", "score": "0.6525407", "text": "public function index()\n {\n return response([\n 'listas' => \\App\\Http\\Resources\\ListaResource::collection(\n Lista::where('user_id', auth()->id())->get()\n ),\n 'message' => 'Listado com sucesso.'\n ], 200);\n }", "title": "" }, { "docid": "de74480294a1123dacaf091a018a43f7", "score": "0.65251106", "text": "public function _index(){\n\t $this->_list();\n\t}", "title": "" }, { "docid": "3a2bf5049606c1975209783c9d992936", "score": "0.6520308", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $recipes = $em->getRepository('AppBundle:Recipe')->findAll();\n\n return $this->render('@frontend/recipe/list.html.twig', array(\n 'recipes' => $recipes\n ));\n }", "title": "" }, { "docid": "976cbb5be4594e239e987a2fbcbe8b3a", "score": "0.65139616", "text": "public function index()\n {\n return FieldResource::collection(Field::paginate());\n }", "title": "" }, { "docid": "f2cedab0962de588e01c1716c1790aad", "score": "0.65061677", "text": "public function index()\n {\n // return Response::json(request()->route(), 200);\n $action = \"SHOW \" . $this->page;\n try {\n $search = request()->get(\"search\");\n $isPaging = request()->exists(\"page\");\n\n $model = $this->model::query();\n\n // If admin searches for any name\n if (!empty($search)) {\n $model = $model->whereName($search);\n }\n\n if (isset($this->loadParam['read'])) {\n if(isset($this->loadParam['read']['with'])) {\n $withs = explode(',', $this->loadParam['read']['with']);\n foreach ($withs as $with) {\n $model = $model->with($with);\n }\n }\n }\n\n // Provide based on paging or not\n if ($isPaging) {\n $model = $model\n ->orderBy('id', 'desc')->paginate();\n } else {\n $model = $model\n ->orderBy('id', 'desc')->get();\n }\n\n // If permission has data\n if ($model) {\n $this->lg($this->page . ' list shown', 'info', $action, 200);\n return response()->json($model);\n } else {\n $this->lg($this->page . ' list not found', 'warning', $action, 404);\n return response()->json(\"Not found\", 404);\n }\n } catch (\\Exception $e) {\n $this->lg($e, 'error', $action, 500);\n return response()->json($this->experDifficulties, 500);\n }\n }", "title": "" }, { "docid": "1c0c0aefcfbef26445ad6c95b7c7f60c", "score": "0.6501086", "text": "public function index()\n {\n $listings = $this->listings->paginate(15);\n\n return view('backend.listings.index',compact('listings'));\n }", "title": "" }, { "docid": "ef707fce78cb544fb65c0a4e38796dff", "score": "0.6500603", "text": "private function showList(): void\n {\n $msg = \"Welcome customer, to view the product list type: list\\n\";\n echo $msg;\n while ($command = $this->getInput() !== 'list') {\n echo $msg;\n };\n $products = Route::goTo('list');\n $this->products = $products;\n foreach ($this->products as $product) {\n echo $product->toString() . \"\\n\";\n }\n }", "title": "" }, { "docid": "a281ecc70e3d52bd2ee1e4bfba8e1724", "score": "0.64979064", "text": "public function index()\n {\n return SongResource::collection(Song::all()->sortByDesc('created_at'));\n }", "title": "" }, { "docid": "7f844292b4038bfed459f1130c7632dd", "score": "0.6496267", "text": "public function listAction()\n {\n $this->view->assign('articles', $this->repository->findForListPlugin($this->settings, $this->getData()));\n }", "title": "" }, { "docid": "9169a301a1e687b391dc420a75819c41", "score": "0.6486813", "text": "public function index()\n {\n $products = $this->allResources($this->productRepository);\n\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "228d685d5f1d86518c57ce853ccd52ef", "score": "0.64858836", "text": "public function listAction() {\n\t\t$literatures = $this->literatureRepository->findAll();\n\t\t$this->view->assign('literatures', $literatures);\n\t}", "title": "" }, { "docid": "e4ed0c12368721c8003fa5e2056a624b", "score": "0.6479145", "text": "public function indexAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n \n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BricksSiteBundle:ExternalResource')->findBy(\n array(),\n array('title' => 'ASC')\n );\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "d4e011bbb309b20dccd6a637cae8b802", "score": "0.6474716", "text": "public function index()\n {\n return response(TodoResource::collection(Todo::all()), 200);\n }", "title": "" }, { "docid": "4fd86802c0e99ac5730657aa6336550f", "score": "0.6472207", "text": "public function index()\n {\n $company = Company::paginate(10);\n\n return CompanyResources::collection($company);\n }", "title": "" } ]
666f4d694fd044aa018933799a2eca7b
Router Requests are not made to methods directly The request will be for an "object". this simply maps the object and method to the correct Controller method.
[ { "docid": "1bd1783eb610252388d0c3e47983874a", "score": "0.0", "text": "public function router($resource, array $arguments)\n {\n // If no (or an invalid) format is given, auto detect the format\n if (is_null($this->format) or ! array_key_exists($this->format, $this->_supported_formats))\n {\n // auto-detect the format\n $this->format = array_key_exists(\\Input::extension(), $this->_supported_formats) ? \\Input::extension() : $this->_detect_format();\n }\n\n //Check method is authorized if required\n if (\\Config::get('rest.auth') == 'basic')\n {\n $valid_login = $this->_prepare_basic_auth();\n }\n elseif (\\Config::get('rest.auth') == 'digest')\n {\n $valid_login = $this->_prepare_digest_auth();\n }\n elseif (\\Config::get('rest.auth') == 'locked')\n {\n $valid_login = false;\n }\n\n //If the request passes auth then execute as normal\n if(\\Config::get('rest.auth') == '' or $valid_login)\n {\n // If they call user, go to $this->post_user();\n $controller_method = strtolower(\\Input::method()) . '_' . $resource;\n\n // Fall back to action_ if no rest method is provided\n if ( ! method_exists($this, $controller_method))\n {\n $controller_method = 'action_'.$resource;\n }\n\n // If method is not available, set status code to 404\n if (method_exists($this, $controller_method))\n {\n return call_user_func_array(array($this, $controller_method), $arguments);\n }\n else\n {\n $this->response->status = $this->no_method_status;\n return;\n }\n }\n else\n {\n $this->response(array('status'=> 0, 'error'=> 'Not Authorized'), 401);\n }\n }", "title": "" } ]
[ { "docid": "785dcb039cecffdad46b46e9f5290f66", "score": "0.6682225", "text": "public static function map($_url,$_obj) {\n\t\tforeach (explode('|',self::HTTP_Methods) as $_method) {\n\t\t\tif (method_exists($_obj,$_method))\n\t\t\t\tself::route(\n\t\t\t\t\tstrtoupper($_method).' '.$_url,array($_obj,$_method)\n\t\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "9f73be08766803bd7d48ce4ef54230da", "score": "0.66191477", "text": "public function objectRouteClass();", "title": "" }, { "docid": "76953ef6de3da19a72c5a61699f401b6", "score": "0.6602852", "text": "function route () {\n\t\tif (!method_exists($this->controller, $this->method)) {\n\t\t\t$this->controller = 'AppController';\n\t\t\t$this->method = 'four_zero_four';\n\t\t}\n\n\t\t// set controller object\n\t\t$controller_object = new $this->controller();\n\n\t\tif (!empty($this->params)) {\n\t\t\t// params not empty, call method with them\n\t\t\t@call_user_func_array([$controller_object, $this->method], $this->params);\n\t\t}\n\t\telse {\n\t\t\t// call method with no params\n\t\t\t@call_user_func([$controller_object, $this->method]);\n\t\t}\n\t}", "title": "" }, { "docid": "4e886cf33263fb25751c2fa48e3586b7", "score": "0.6531854", "text": "public function _dispatch($request)\n\t{\n\t\t$this->_data = $_POST;\n\t\t$args = array();\n\t\t\n\t\ttry {\n\t\t\t$method = new ReflectionMethod($this, $request['action']);\n\t\t\tif (!$method->isPublic()) {\n\t\t\t\tAtomik::trigger404();\n\t\t\t}\n\t\t\t\n\t\t\t$docBlock = $method->getDocComment();\n\t\t\tif (preg_match_all('/@route (.+)$/m', $docBlock, $matches)) {\n\t\t\t\t/* default route parameters */\n\t\t\t\t$default = array(\n\t\t\t\t\t'controller' => $request['controller'], \n\t\t\t\t\t'action' => $request['action']\n\t\t\t\t);\n\t\t\t\t/* fetching optional parameters to the method to add them to\n\t\t\t\t * the default array */\n\t\t\t\tforeach ($method->getParameters() as $param) {\n\t\t\t\t\tif ($param->isOptional()) {\n\t\t\t\t\t\t$default[$param->getName()] = $param->getDefaultValue();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* route base */\n\t\t\t\t$base = $request['controller'] . '/' . $request['action'] . '/';\n\t\t\t\t\n\t\t\t\t/* building routes */\n\t\t\t\t$routes = array();\n\t\t\t\tfor ($i = 0, $c = count($matches[0]); $i < $c; $i++) {\n\t\t\t\t\t$routes[$base . $matches[1][$i]] = $default;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* re-routing request */\n\t\t\t\tif (($request = Atomik::route(Atomik::get('request_uri'), $_GET, $routes)) === false) {\n\t\t\t\t\tAtomik::trigger404();\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t/* building method parameters using request params */\n\t\t\tforeach ($method->getParameters() as $param) {\n\t\t\t\tif (array_key_exists($param->getName(), $request)) {\n\t\t\t\t\t$args[] = $request[$param->getName()];\n\t\t\t\t} else if (!$param->isOptional()) {\n\t\t\t\t\tthrow new Exception('Missing parameter ' . $param->getName());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t/* do not stop if __call() exist, so it allows us to trap method calls */\n\t\t\tif (!method_exists($this, '__call')) {\n\t\t\t\tAtomik::trigger404();\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->_params = $request;\n\t\t\n\t\t$this->_before();\n\t\tcall_user_func_array(array($this, $request['action']), $args);\n\t\t$this->_after();\n\t\t\n\t\t/* gets the instance properties and sets them in the global scope for the view */\n\t\t$vars = array();\n\t\tforeach (get_object_vars($this) as $name => $value) {\n\t\t\tif (substr($name, 0, 1) != '_') {\n\t\t\t\t$vars[$name] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "5b3b337567c2f931ce41239ff3bf8170", "score": "0.647391", "text": "public function dispatch()\n {\n if ($this->_controllers == 'serv') {\n // so this is a request ...\n $controllerClassName = 'PHPMVC\\Controllers\\Serv\\\\' . ucfirst($this->_action);\n if (!class_exists($controllerClassName)) {\n $controllerClassName = $this->_controllers = self::NOT_FOUND_CONTROLLER;\n $actionName = $this->_action . 'Action';\n } else {\n $actionName = @$this->_params[0] . 'Action';\n\n if (!method_exists($controllerClassName, $actionName)) {\n $actionName = $this->_action = self::NOT_FOUND_ACTION;\n $controllerClassName = $this->_controllers = self::NOT_FOUND_CONTROLLER;\n }\n }\n\n } /**\n * If its not a service then use this\n * (\"/serv/file_name_/action_name_without_using_action\")\n */\n\n else {\n $controllerClassName = 'PHPMVC\\Controllers\\\\' . ucfirst($this->_controllers) . 'Controller';\n\n if (!class_exists($controllerClassName)) {\n $controllerClassName = $this->_controllers = self::NOT_FOUND_CONTROLLER;\n }\n $actionName = $this->_action . 'Action';\n\n if (!method_exists($controllerClassName, $actionName)) {\n $actionName = $this->_action = self::NOT_FOUND_ACTION;\n $controllerClassName = $this->_controllers = self::NOT_FOUND_CONTROLLER;\n }\n }\n\n $object = new $controllerClassName();\n $object->setController($this->_controllers);\n $object->setAction($this->_action);\n $object->setParams($this->_params);\n $object->setLanguage($this->_language);\n $object->setRegistry($this->registry);\n $object->$actionName();\n\n }", "title": "" }, { "docid": "08e61244af27f2798ff0369aaac9649d", "score": "0.64677036", "text": "public function map()\n {\n // If the url variable is passed we parse URL.\n // Otherwise default values are used.\n if (isset($_GET['url'])) {\n $this->extractRouteParams();\n }\n\n // Creates a new controller object based on the supplied parameters\n $controllerName = $this->_controller;\n $this->_controller .= 'Controller';\n\n // Verify that controller exist\n if (!class_exists($this->_controller)) {\n throw new Exception('The controller requested doesn&#39;t exist. Please check URL.');\n }\n\n $controller = new $this->_controller($controllerName, $this->_action);\n\n // Execute the init() method of the controller if exists\n if (method_exists($controller, 'init')) {\n $controller->init();\n }\n\n // If exists invoke the method defined in the URL\n if (method_exists($controller, $this->_action)) {\n $controller->{$this->_action}($this->_urlParams);\n } else {\n\t\t\t// As a fallback use index method as action instead\n\t\t\t// and action variable as method parameters.\n\t\t\t// That will cover URLs like: domain.com/news/name-of-the-news\n\t\t\t$controller = new $this->_controller($controllerName, 'index');\n\t\t\t$controller->{'index'}($this->_action);\n }\n }", "title": "" }, { "docid": "6e1e564408d2ff656af1845fc7076a87", "score": "0.63928556", "text": "public function route() {\n\n try {\n \n $obj = APIFactory::init($this->parsed_path[0]);\n echo $this->getAction($obj, $this->parsed_path);\n \n } catch(UndefinedActionException $e) { \n\n echo $e->getMessage();\n\n } catch(Exception $e) {\n\n echo $e->getMessage();\n\n }\n }", "title": "" }, { "docid": "47ea7b0c5274d9b7c79cdab58d427d75", "score": "0.63170004", "text": "public function routeRequest() {\n\t\t\t\n\t\t\t$controllerName = DMInput::getFileName('controller', 'default');\n\t\t\t$requestType = DMInput::getFileName('type', false);\n\t\t\t\n\t\t\tif ($controllerName != '') {\n\t\t\t\tif ($requestType) {\n\t\t\t\t\t$controllerPath = \"controllers\" . DS . $controllerName . \".\" . $requestType . \".php\";\n\t\t\t\t} else {\n\t\t\t\t\t$controllerPath = \"controllers\" . DS . $controllerName . \".php\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (file_exists($controllerPath)) {\n\t\t\t\t\trequire_once($controllerPath);\n\t\t\t\t\t\n\t\t\t\t\tif ($requestType) {\n\t\t\t\t\t\t$controllerClass = ucfirst($controllerName) . 'JsonController';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$controllerClass = ucfirst($controllerName) . 'Controller';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$controller = new $controllerClass();\n\t\t\t\t\t\n\t\t\t\t\t$task = DMInput::getString('task', 'display');\n\t\t\t\t\t$controller->execute($task);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new DMException(\"Controller \" . $controllerName . \" does not exist\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "7d43bfc1352b0e2bf77debfd2e7aa35f", "score": "0.6255832", "text": "public function run(): void\n {\n $route = $this->getFirstRoute();\n\n $params = $this->route_parser->getParams($route);\n\n $request = new Request($params);\n $request->setCurrentRoute($route['route']);\n\n foreach ($this->middleware as $middleware) {\n $middleware($request);\n }\n\n $class_method = $route['method'];\n $class = $route['class'];\n $object = new $class();\n\n $object->$class_method($request);\n }", "title": "" }, { "docid": "7e18b04a0dbdb0b3afcd55a41b639987", "score": "0.6160082", "text": "function resolve(){\n $methodDictionary = $this->{strtoupper($this->request->requestMethod)};\n $formatedRoute = $this->formatRoute($this->request->requestUri);\n $method = $methodDictionary[$formatedRoute];\n\n if(is_null($method)) {\n $this->defaultRequestHandler();\n return;\n }\n\n echo call_user_func_array($method, array($this->request));\n }", "title": "" }, { "docid": "16fbc077b6f5f1ab89103bd6987d7526", "score": "0.61336637", "text": "public static function dispatch()\n {\n // Melde alle Fehler außer E_NOTICE\n //error_reporting(E_ALL & ~E_NOTICE);\n\n $controllerName = UriParser::getControllerName().'Controller';\n $className = 'App\\\\Controller\\\\'.$controllerName;\n $methodName = UriParser::getMethodName();\n\n // Eine neue Instanz des Controllers wird erstellt und die gewünschte\n // Methode darauf aufgerufen.\n $controller = new $className();\n $controller->$methodName();\n }", "title": "" }, { "docid": "74de81bf33dc44ce2c1a0a7dc96a5ba7", "score": "0.6086985", "text": "public function route() {\n\t\t$action = $this->validateAction();\n\t\tif (method_exists($this, str_replace('-', '', $action))) {\n\t\t\t$this->$action();\n\t\t} else {\n\t\t\t$this->error($action);\n\t\t}\n\t}", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.60539156", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.60539156", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.60539156", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.60539156", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.60539156", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.60539156", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.60539156", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.60539156", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.60539156", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.60539156", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.60539156", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "b4a833492731bd16ca1b4c7ea25eb2c9", "score": "0.60463023", "text": "public function route()\n\t{\n\t\t$this->request = $this->getRequest();\n\n\t\t$controller_name = 'app\\controllers\\Controller' . ucfirst($this->request->getController());\n\t\t$action_name = 'Action'.ucfirst($this->request->getAction());\n\n\t\tif(!class_exists($controller_name)){\n\t\t\tthrow new NotFoundException('Not found route: ' . $this->request->getPath());\n\t\t}\n\n\t\t$controller = new $controller_name;\n\n\t\tif(method_exists($controller, $action_name)){\n\t\t\t$response = $controller->$action_name();\n\t\t\treturn $response ? $response : static::app()->response;\n\t\t} else {\n\t\t\tthrow new NotFoundException('Not found route: ' . $this->request->getPath());\n\t\t}\n\t}", "title": "" }, { "docid": "713224f70e47eb3e7d136993d0f99a9a", "score": "0.6041796", "text": "public function getMetthod(){\n\n switch ( $_SERVER['REQUEST_METHOD'] ) {\n case 'GET':\n $this->addRoute('GET');\n break;\n\n case 'POST':\n $this->addRoute('POST');\n break;\n\n case 'PUT':\n $this->addRoute('PUT');\n break;\n } \n }", "title": "" }, { "docid": "e51b8f6fc7a22010dfbaaf572a9348f0", "score": "0.6014457", "text": "public function __invoke(Request $request, Response $response, $next){\n\n //recupera o objeto da rota\n $route = $request->getAttribute('route');\n\n if(!is_null($route)){\n\n //itera os objetos mapeados\n foreach ($this->mapping as $k => $model){\n\n //recupera o parâmetro da rota que foi mapeado\n $mapped = $route->getArgument($k);\n\n //verifica se o objeto foi mapeado na rota e se ele existe no banco de dados\n if(!empty($mapped)){\n\n //localiza o objeto no banco\n $obj = $model::find($mapped);\n\n if($obj){\n\n //adiciona o objeto ao container\n $this->container[$k] = function() use($obj){\n return $obj;\n };\n\n }else{\n\n //obtem as propriedades da model via reflection\n try {\n $name = (new \\ReflectionClass($model))->getProperty('mapping');\n } catch (\\ReflectionException $e) {\n $name = 'object';\n }\n\n //retorna o erro de objeto inválido\n return ($request->isGet()) ? $this->container->view->render($response, 'layouts/error.twig', [\n 'error' => \"O {$name} selecionado é inválido.\"\n ]) : $response->withStatus(400)->withJson([\n 'result' => false,\n 'error' => \"O {$name} selecionado é inválido.\"\n ]);\n }\n\n }\n }\n\n }\n\n //salva o método de requisição atual\n $this->container['method'] = function () use($request){\n return $request->getMethod();\n };\n\n //continua a stack\n return $next($request, $response);\n\n }", "title": "" }, { "docid": "87f1dfabd0794aaffa8869c1ac718100", "score": "0.6005476", "text": "public function processApi(){\n $func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquestMethod'])));\n if((int)method_exists($this,$func) > 0)\n $this->$func();\n else\n $this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n }", "title": "" }, { "docid": "24cbce6e43aa9ace2bb1c6bbd2097ee4", "score": "0.5977262", "text": "public function route()\n {\n }", "title": "" }, { "docid": "d79eace494e84fb4b30c58d7e844036c", "score": "0.595497", "text": "protected function handleMethod()\n {\n try {\n parent::$method = new ReflectionMethod(parent::$view->name, Request::$method);\n } catch(Exception $e) {\n self::jump(405);\n }\n }", "title": "" }, { "docid": "98cc0e7fd36c4c24717c6c0b63bd8a7d", "score": "0.59523916", "text": "private static function dispatch()\n {\n if (is_null(self::$controller) && is_null(self::$method)) {\n $controller = self::$namespace . DEFAULT_CONTROLLER;\n $method = DEFAULT_METHOD;\n } else {\n $controller = self::$namespace . self::$controller;\n $method = self::$method;\n }\n\n require_once ('.' . CONTROLLERS_PATH . self::$subdirectory . $controller . '.php');\n\n if (method_exists(new $controller, $method)) {\n return (call_user_func_array([new $controller(), $method], self::$parameters));\n } else {\n return Errors::trigger(app_path() . 'routes.php', \"Method '$method' does not exist in '$controller' class.\", 1);\n }\n }", "title": "" }, { "docid": "fce9ee5f5e78c22a6931f3b8e4737b5f", "score": "0.5938872", "text": "abstract public function mapRequest($request);", "title": "" }, { "docid": "475ded1ea49ab6f6f6f2383f3fe76595", "score": "0.5937384", "text": "public function processApi() {\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['request'])));\n if ((int) method_exists($this, $func) > 0)\n $this->$func();\n else\n $this->response('', 404); // If the method not exist with in this class, response would be \"Page not found\".\n }", "title": "" }, { "docid": "25d8cb0e543b7e988e8bd8711c1af88b", "score": "0.59327006", "text": "public function route(\\IRequest $request)\n {\n list($controller, $action, $params) = $this\n ->processRequestToRoute($request);\n \n $this->_controller = $this->findControllerByName($controller);\n $this->_action = $this->_controller->findActionByName($action);\n $this->_action->setParameters($params);\n }", "title": "" }, { "docid": "e5d6336ca794a975c9b073e8013dfb50", "score": "0.5923", "text": "public function requestHandler()\n\t{\n\t\t$this->library('common');\n\t\t$this->common->getParams();\n\t\t$sMethod = ($this->common->getParam('req') != \"\" ) ? $this->common->getParam('req') : \"\";\n\t\t$this->$sMethod();\n\t}", "title": "" }, { "docid": "db1c573556a5796c30e9ff0e5ea54f6a", "score": "0.5922324", "text": "public function dispatch()\n {\n $router = $this->__loadRouter();\n\n $routerParams = $router->parse();\n\n try {\n $controller = $this->__loadController($routerParams);\n } catch (Exception $e) {\n echo $e->getMessage();\n die;\n }\n\n $params = [];\n if (!empty($routerParams['params'])) {\n $params = $routerParams['params'];\n }\n\n $response = $controller->{$routerParams['action']}(...$params);\n }", "title": "" }, { "docid": "2abedeeebe677964cd6b20a09110653d", "score": "0.5920019", "text": "public function run()\n {\n $this->get('/', array($this, 'dispatchController'));\n $this->map('(/:module(/:controller(/:action(/:params+))))', array($this, 'dispatchController'))\n ->via('GET', 'POST')\n ->name('default');\n parent::run();\n }", "title": "" }, { "docid": "54d0307bd476a2c1e3fe07483ca6f28b", "score": "0.5917415", "text": "private function resolveRequest(){\n\t\t$controllers_dir = puppy::getAppDir().'controllers';\n\t\t$path_segments = explode('/', $this->getPathInfo());\n\t\t\n\t\t$controller_location = null;\n\t\t$controller_name = null;\n\t\t$action_name = null;\n\t\t\n\t\t//build path to controller\n\t\t$build_path = $controllers_dir;\n\t\tforeach($path_segments as $k => $dir){\n\t\t\t$build_path = $build_path.'/'.$dir;\n\t\t\tif(file_exists($build_path.\"/\")){\n\t\t\t\tif(is_dir($build_path)){\n\t\t\t\t\t$controller_location = $build_path;\n\t\t\t\t\tif(is_file($build_path.'/'.$dir.'.php')){\n\t\t\t\t\t\t$controller_name = $dir;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$action_name = $dir;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//call action\n\t\tif(file_exists($controller_location.'/'.$controller_name.'.php')){\n\t\t\t//wrap require in try catch to state file has error\n\t\t\trequire_once($controller_location.'/'.$controller_name.'.php');\n\t\t\t$controller = new $controller_name();\n\t\t\tif($action_name !== null)\n\t\t\t\t$controller->$action_name();\n\t\t}\n\t}", "title": "" }, { "docid": "faf4170b952a1648a55d132eff396485", "score": "0.5915374", "text": "public function action() {\n\t\tif( ! $this->request_method )\n\t\t\treturn false;\n\t\tswitch ($this->request_method) {\n\t\t\tcase 'read':\n\t\t\t\t$this->read();\t\t\t\t\t\n\t\t\tbreak;\t\t\t\t\n\t\t\tcase 'create':\t\n\t\t\t\t$this->create();\t\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 'update':\n\t\t\t\t$this->update();\t\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 'delete':\n\t\t\t\t$this->delete();\t\t\t\t\t\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "e8f129e9b95c3a8c07e0a68c707b14bc", "score": "0.5901409", "text": "public function requestAction()\n {\n }", "title": "" }, { "docid": "aca5cf5ee867cbfe0c7c68d502fc6577", "score": "0.58978283", "text": "function route($request) {\n\t\t$controller = $request->uri(0);\n\t\t$action = $request->uri(1);\n\n\t\tif(!class_exists($controller) || !is_callable([$controller, $action])){\n\t\t\t$controller = 'BadRequest';\n\t\t\t$action = 'not_found';\n\t\t}\n\n\t\t$c = new $controller($request);\n\t\tcall_user_func_array([$c, $action], []);\n\t}", "title": "" }, { "docid": "32f7c7c77a5ec7eed06bf72251e42f60", "score": "0.5879876", "text": "public function mapRoute()\r\n {\r\n $env = $this->stash['env'];\r\n $method = $env['method'];\r\n $path = $env['path_info'];\r\n\r\n $routes = $this->routes;\r\n\r\n $handler = null;\r\n $params = [];\r\n\r\n $routesMatchMethod = $routes[$method];\r\n foreach ($routesMatchMethod as $route) {\r\n list($url, $handler) = $route;\r\n\r\n $urlRexp = preg_replace('#\\{(\\w+)\\}#', '([^/]+)', $url);\r\n $urlRexp = '@^' . $urlRexp . '$@';\r\n\r\n if (preg_match($urlRexp, $path, $matched)) {\r\n $params = count($matched) > 1 ? $matched[1] : [];\r\n break;\r\n } else {\r\n continue;\r\n }\r\n }\r\n\r\n if ($handler) {\r\n \r\n } else {\r\n echo \"404 Not found.\";\r\n }\r\n }", "title": "" }, { "docid": "be7248e7967aa020fd3e9ee3ee9edae0", "score": "0.5876276", "text": "public function request_handler(){\r\n\t\t$route = new Router;\r\n\t\t$session = new Session;\r\n\t\t$segments = $route->urlRoute();\r\n\t\t#check if controller/action exist\r\n\t\t#if not use default_controller / default_action\r\n\t\tif( count($segments) == 0 || count($segments) == 1 ){\r\n\t\t\tinclude_class_method( default_controller , default_action );\r\n\t\t}else{\r\n\t\t#if controller/action exist in the url\r\n\t\t#then check the controller if it's existed in the file\r\n\t\t\tif( file_exists( CONTROLLER_DIR . $segments[0] . CONT_EXT ) )\r\n\t\t\t{\r\n\t\t\t\t#check for segments[1] = actions\r\n\t\t\t\t#if segments[1] exist, logically segments[0] which is the controller is also exist!!\r\n\t\t\t\t//if( isset($segments[1]) ){\r\n\t\t\t\t\tinclude_class_method( $segments[0], $segments[1] . 'Action' );\r\n\t\t\t\t//}\r\n\t\t\t}else{\r\n\t\t\t\terrorHandler(CONTROLLER_DIR . $segments[0] . CONT_EXT);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5d91bf564e90fb3b56760180c2b0dc45", "score": "0.5874439", "text": "public function route() {\n // get request URI\n $current_module = '';\n $request = $this->getRequest();\n \t$routes = array();\n\t$routes_array = explode('/', $request);\n\tforeach($routes_array as $route)\n\t{\n if(trim($route) != '')\n $routes[] = $route;\n\t}\n\n // create module instance\n if (isset($routes[0])) {\n $current_module = ucfirst($routes[0]);\n $current_method = 'index';\n $module_file = self::APPS_MODULES_DIR.$current_module.'/'.$current_module.'.php';\n if (!file_exists($module_file)) {\n header($_SERVER[\"SERVER_PROTOCOL\"].\" 404 Not Found\", true, 404);\n throw new \\Exception('Module '.$current_module.' not found, please check if its already installed yet.');\n exit();\n } else {\n require_once $module_file;\n $this->{$current_module} = new $current_module($this->config);\n }\n } else {\n // try last chance to load default module\n $current_module = ucfirst($this->config['default_module']);\n $module_file = self::APPS_MODULES_DIR.$current_module.'/'.$current_module.'.php';\n if (!file_exists($module_file)) {\n header($_SERVER[\"SERVER_PROTOCOL\"].\" 404 Not Found\", true, 404);\n throw new \\Exception('Default module '.$current_module.' not found, please check if its already installed yet.');\n exit();\n } else {\n require_once $module_file;\n $this->{$current_module} = new $current_module($this->config);\n }\n }\n\n // call method or class of module\n $args = $routes;\n if (isset($routes[1])) {\n // call method\n $current_method = $routes[1];\n\t $tmp_module = ucfirst($current_method);\n\t // check if it also a class\n\t $class_file = self::APPS_MODULES_DIR.$current_module.'/'.$tmp_module.'.php';\n\t if (file_exists($class_file)) {\n\t\trequire_once $class_file;\n\t\t$this->{$tmp_module} = new $tmp_module;\n \t\t// get arguments\n\t\tif (isset($routes[2])) {\n\t\t $tmp_method = $routes[2];\n\t\t if (!method_exists($this->{$tmp_module}, $tmp_method)) {\n\t\t\theader($_SERVER[\"SERVER_PROTOCOL\"].\" 404 Not Found\", true, 404);\n\t\t\tthrow new \\Exception('Method '.$tmp_method.' not found on module '.$tmp_module);\n\t\t\texit();\n\t\t }\n\t\t // get arguments\n\t\t if (isset($routes[3])) {\n\t\t\tunset($args[0], $args[1], $args[2]);\n\t\t\tcall_user_func_array(array($this->{$tmp_module}, $tmp_method), $args);\n\t\t } else {\n\t\t\t$this->{$current_module}->{$current_method}();\n\t\t }\n\t\t} else {\n\t\t $this->{$tmp_module}->index();\n\t\t}\n\t } else {\n\t\t// check method\n\t\tif (!method_exists($this->{$current_module}, $current_method)) {\n\t\t header($_SERVER[\"SERVER_PROTOCOL\"].\" 404 Not Found\", true, 404);\n\t\t throw new \\Exception('Method '.$current_method.' not found on module '.$current_module);\n\t\t exit();\n\t\t}\n\t\t// get arguments\n\t\tif (isset($routes[2])) {\n\t\t unset($args[0], $args[1]);\n\t\t call_user_func_array(array($this->{$current_module}, $current_method), $args);\n\t\t} else {\n\t\t $this->{$current_module}->{$current_method}();\n\t\t}\n\t }\n } else {\n // check method\n if (!method_exists($this->{$current_module}, 'index')) {\n header($_SERVER[\"SERVER_PROTOCOL\"].\" 404 Not Found\", true, 404);\n throw new \\Exception('Default method \"index\" not found on module '.$current_module);\n exit();\n }\n $this->{$current_module}->index();\n }\n\n\t// get all views and load it\n\t$views = $this->{$current_module}->getModuleViews();\n\techo implode('', $views);\n }", "title": "" }, { "docid": "2104278b5405961e0cfedee5d65b4671", "score": "0.58702284", "text": "public function __invoke(Request $request): mixed;", "title": "" }, { "docid": "1f78645439552dc2b1aefe0877a16fb2", "score": "0.5860533", "text": "public static function mapRequest($dataObject);", "title": "" }, { "docid": "1e5a52d46de70651a6ceb77d317c11df", "score": "0.58581793", "text": "private function _router($controller, $method, $parameter)\n\t{\n\t\t$controller->{$method}($parameter);\n\t}", "title": "" }, { "docid": "07a7732cda8da3a284b2d2126c139021", "score": "0.58484274", "text": "public function executeRoute() {\n \n $className = $this->controller;\n $methodName = $this->method;\n \n $instance = new $className;\n \n $fullClassInstanceWithMethod = $instance->$methodName($this->args);\n\n return $fullClassInstanceWithMethod;\n }", "title": "" }, { "docid": "bced86d701b83f954b577da216da8566", "score": "0.58481795", "text": "function _route()\n\t{\n\t\t$this->get()->ALL();\n\t\t$this->post('delete')->ALL();\n\t}", "title": "" }, { "docid": "fa1d2ea4a3f05754cabbf2cb1e3c0ead", "score": "0.5845376", "text": "public function __invoke(Request $request): Response;", "title": "" }, { "docid": "e565b58c4f4f9a44252679c37b641c3b", "score": "0.5833774", "text": "public function __invoke(): void\n {\n // $route = $this->app()->route();\n // $controller = $route->controllerName(new Method('GET'))->toString();\n // if ($controller) {\n // $this->invoke($controller);\n // // $this->app()->response()->setContent(null);\n // // if (CLI) {\n // // Console::style()->block($this->app()->response()->statusString(), 'STATUS', 'fg=black;bg=green', ' ', true);\n // // }\n // }\n }", "title": "" }, { "docid": "11289e24248f68dbfa40234cd2e2e3e7", "score": "0.5812558", "text": "public function createRouteObject();", "title": "" }, { "docid": "283fa5aaf4ac076e72493f4a4f252944", "score": "0.5805651", "text": "function __construct(){\n\t\t$this->request = new Request();\n\t\tRouter::parse($this->request->url,$this->request);\n\t\t$controller = $this->loadController();\n\t\tif(!in_array($this->request->action , array_diff(get_class_methods($controller), get_class_methods('Controller')))){\n\t\t\t$this->error('<hr/>Le controller '.$this->request->controller.' n\\'a pas de méthode '.$this->request->action);\n\t\t}\n\t\tcall_user_func_array(array($controller,$this->request->action),$this->request->params);\n\t\t$controller->render($this->request->action);\n\t}", "title": "" }, { "docid": "fa754b582b4216bc31c0dd6d261e35ce", "score": "0.5800965", "text": "function __construct()\n\t{\n\t\t$this->request = new Request();\n\t\tRouter::parse($this->request->url, $this->request);\n\n\t\t$controller = $this->loadController();\n\n\t\tif(!in_array($this->request->action, get_class_methods($controller))) // allows to list methods from a class\n\t\t{\n\t\t\t$this->error('Le controller ' . $this->request->controller . ' n\\'a pas de méthode ' . $this->request->action); // error message if method not found\n\t\t}\n\n\t\tcall_user_func_array(array($controller, $this->request->action), $this->request->params); // allows to call a controller / action / parameters\n\t\t$controller->render($this->request->action); // method from Controller class\n\t}", "title": "" }, { "docid": "4de31b835a918b365612717e38396e2d", "score": "0.57972467", "text": "public function processApi(){\n\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t$this->$func();\n\t\telse\n\t\t\t$this->response('',404);\t// If the method not exist with in this class, response would be \"Page not found\".\n\t}", "title": "" }, { "docid": "d0a079fbd257079079906e3a552ab63f", "score": "0.5794293", "text": "public function processApi() {\n\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['rquest'])));\n\n if ((int) method_exists($this, $func) > 0) {\n $this->$func();\n } else {\n $this->response('Method not Found', 404); // If the method not exist with in this class, response would be \"Page not found\".*/\n\t}\n\n }", "title": "" }, { "docid": "0fbe18ea21f9e6d86e1a6a437d86301d", "score": "0.5792372", "text": "public function start() {\n\n $controller = ucfirst($this->routes[0]);\n\n // Storing the method name if it is called else assign null.\n\n $method = isset($this->routes[1]) ? $this->routes[1] : null;\n\n // Stroing the parameter if it is passed else assign null.\n\n $parameter = isset($this->routes[2]) ? $this->routes[2] : null;\n \n // Requiring parent class of controller and model.\n\n require_once ROOT . '/system/core/Controller.php';\n require_once ROOT . '/system/core/Model.php';\n\n $this->auto_load();\n\n // Instanitaing an object of the controller class.\n\n $obj = new $controller();\n\n // If method was called also parameter was passed.\n\n if(!(is_null($method)) && !((is_null($parameter)))) {\n\n $obj->$method($parameter);\n }\n\n // If method was called but the parameter was null.\n\n else {\n \n $obj->$method();\n }\n }", "title": "" }, { "docid": "f30724d650f1a0c22fb791cdfb1306e5", "score": "0.57905954", "text": "public function template_redirect()\n\t{\n\t\t// Start the routing\n\t\t$this->router = new Router;\n\n\t\t// Not in the area, ignore.\n\t\tif (! $this->router->isApiRequest()) return;\n\n\t\t// Check to see if there's an appropriate API controller + method \n\t\t$controller = $this->router->getController();\n\n\t\tif (! $this->isControllerActive($controller))\n\t\t\treturn $this->applicationError(404);\n\n\t\t// Let's call the controller\n\t\t$controllers = $this->allControllers();\n\n\t\t// Controller doesn't exist anymore? Not found.\n\t\tif (! isset($controllers[$controller]))\n\t\t\treturn $this->applicationError(404);\n\n\t\t$arguments = $this->router->getArguments();\n\t\t$method = $this->router->getMethod();\n\n\t\t$object = $controllers[$controller]['object'];\n\n\t\tif (! method_exists($object, $method)) :\n\t\t\t// Missing exception\n\t\t\tif (! method_exists($object, 'missingMethodException'))\n\t\t\t\treturn $this->applicationError(404);\n\n\t\t\t$method = 'missingMethodException';\n\t\tendif;\n\n\t\t// Determine Authentication\n\t\t$Authentication = Authentication::Instance();\n\n\t\tif (! $Authentication->determineRequestAccess())\n\t\t\treturn $this->applicationError(403, 'Invalid credentials.');\n\n\t\tdo_action('wp-rest-api-before-method-call', array($controller, $method, $arguments));\n\n\t\t// Hook onto this request\n\t\tdo_action('wp-rest-api-controller-'.$controller, compact('method', 'arguments'));\n\t\tdo_action('wp-rest-api-controller-'.$controller.'-method-'.$method, $arguments);\n\n\t\t// Do the response here\n\t\t$response = call_user_func_array(array($object, $method), $arguments);\n\n\t\tif (! ( $response instanceof \\WpRest\\Response ) AND !( $response instanceof \\Symfony\\Component\\HttpFoundation ) )\n\t\t\t$response = \\WpRest\\Response::make($response);\n\n\t\t$response->send();\n\n\t\tdo_action('wp-rest-api-after-method-call', array($controller, $method, $arguments));\n\n\t\t// Anddddddd we stop here!\n\t\texit;\n\t}", "title": "" }, { "docid": "605d50308023693a26292dd8e53c9ad9", "score": "0.5785313", "text": "public function objectAction()\n {\n $action = $this->getRequest()->get('action');\n $response = null;\n\n switch(key($action)) {\n case '_boolean':\n $this->processBooleanAction($action);\n break;\n case 'batch':\n $response = $this->processBatchAction();\n break;\n default:\n $data = array();\n $this->extractActionData($action, $data);\n\n if (count($data) > 0 && $this->getActions()->has($data[0])) {\n $this->getSecurityManager()->allowOr403($data[0]);\n $method = 'execute'.$data[0];\n $this->$method(count($data) > 1 ? $data[1] : null);\n }\n }\n\n return null !== $response ? $response : $this->getRedirectToListResponse();\n }", "title": "" }, { "docid": "d767c0d21415394cda4e583506d4b82a", "score": "0.5772243", "text": "public function resolve(): void\n {\n $path = $this->request->path();\n $method = $this->request->method();\n $handler = $this->routes[$method][$path] ?? false;\n\n if (!$handler) {\n $this->response->showNotFoundPage();\n return;\n }\n\n [$controller, $method] = $handler;\n\n (new $controller())->$method($this->request);\n }", "title": "" }, { "docid": "2314e84f1a667fc16d82296c2a997f55", "score": "0.5764157", "text": "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "title": "" }, { "docid": "2314e84f1a667fc16d82296c2a997f55", "score": "0.5764157", "text": "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "title": "" }, { "docid": "2314e84f1a667fc16d82296c2a997f55", "score": "0.5764157", "text": "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "title": "" }, { "docid": "af36dd4ba5e9b01a804f6d46ca78587f", "score": "0.5750367", "text": "private static function map_to_class_and_method($class_method,$uri){\n if(empty($uri)){\n $class = DEFAULT_CONTROLLER;\n $method = \"index\";\n }else{\n $class = $class_method[0];\n $method = $class_method[1];\n }\n\n //acl check - grant or deny access\n $grantAccess = self::hasAccess($class,$method);\n\n if(!$grantAccess){\n $class = ACCESS_RESTRICTED;\n $method = ACCESS_RESTRICTED_METHOD;\n }\n $class = \"\\app\\controllers\\\\\".ucfirst($class);\n $controller_obj = new $class($class,$method);\n $queryParams = [];\n\n if(method_exists($class,$method)){\n call_user_func_array([$controller_obj,$method],$queryParams);\n }else{\n die('That method does not exist in the controller '.$class);\n }\n }", "title": "" }, { "docid": "6e4b062a1bbda7c030706af1d9170b79", "score": "0.5729449", "text": "public function processApi() {\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['rquest'])));\n if ((int) method_exists($this, $func) > 0)\n $this->$func();\n else\n $this->response('', 404);\n// If the method not exist with in this class, response would be \"Page not found\".\n }", "title": "" }, { "docid": "c847f67e88a2bde955a65b2e3ae5800e", "score": "0.57265", "text": "public function processApi() {\n\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\tif((int)method_exists($this,$func) > 0)\n\t\t$this->$func();\n\t\telse\n\t\t$this->response('',404);\n\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t}", "title": "" }, { "docid": "4f58d49f0eb0aab9bfee35f765e51335", "score": "0.57250017", "text": "public function processApi(){\n $func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n if((int)method_exists($this,$func) > 0)\n $this->$func();\n else\n $this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n }", "title": "" }, { "docid": "12ebd2c438cf02c28d64901a009acf80", "score": "0.57247895", "text": "public function Action($__request) {\n\t\n\t\t}", "title": "" }, { "docid": "e29811f64b85aff73dbc7d834e9c5743", "score": "0.57224196", "text": "public function treatRequest($request)\n\t{\n\t\treturn $this->{$this->METHODMAP[$request->getMethod()]}($request);\n\t}", "title": "" }, { "docid": "1bc2fb7094b085bb5202ba5b5a5602b3", "score": "0.57148653", "text": "public function FrontControllerRoute() {\n\t\t// Step 1\n\t\t// Take current url and divide it in controller, method and parameters\n\t\t$this->request = new CRequest($this->config['base_url']);\n\t\t$this->request->Init();\n\t\t$controller = $this->request->controller;\n\t\t$method = $this->request->method;\n\t\t$arguments = $this->request->arguments;\n\n\t\t$controllerExists = isset($this->config['controllers'][$controller]);\n\t\t$controllerEnabled = false;\n\t\t$className = false;\n\t\t$classExists = false;\n\n\t\tif($controllerExists){\n\t\t\t$controllerEnabled = ($this->config['controllers'][$controller]['enabled'] == true);\n\t\t\t$className = $this->config['controllers'][$controller]['class'];\n\t\t\t$classExists = class_exists($className);\n\t\t}\n\n\n\n\t\t// Step 2\n\t\t// Check if there is a callable method in the controller class, if then call it\n\n\t\tif($controllerExists && $controllerEnabled && $classExists){\n\t\t\t$rc = new ReflectionClass($className);\n\t\t\tif($rc->implementsInterface('IController')){\n\t\t\t\tif($rc->hasMethod($method)){\n\t\t\t\t\t$controllerObj = $rc->newInstance();\n\t\t\t\t\t$methodObj = $rc->getMethod($method);\n\t\t\t\t\t$methodObj->invokeArgs($controllerObj, $arguments);\n\t\t\t\t} else {\n\t\t\t\t\tdie(\"404. \" . get_class() . ' error: Controller does not contain method.');\n\t\t\t\t}\n\t } else {\n\t \tdie('404. ' . get_class() . ' error: Controller does not implement interface IController.');\n\t\t\t\t}\n\t\t} else { \n\t\t\tdie('404. Page is not found.');\n\t\t}\n\t\n\n\n\t\t$this->data['debug'] = \"REQUEST_URI - {$_SERVER['REQUEST_URI']}\\n\";\n\t\t$this->data['debug'] .= \"SCRIPT_NAME - {$_SERVER['SCRIPT_NAME']}\\n\";\n\t}", "title": "" }, { "docid": "aadf43d709b7553a11079b6ad9c442cd", "score": "0.5714079", "text": "public function processApi()\n {\n $func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['mode'])));\n if((int)method_exists($this,$func) > 0)\n {\n $this->$func();\n } \n else\n {\n $data = array('code' => \"404\", 'status' => \"failure\", \"msg\" => \"requested method not available\", \"data\" => array());\n $this->response($this->json($data)); \n }\n \n // If the method not exist with in this class, response would be \"Page not found\".\n }", "title": "" }, { "docid": "3f4db85920eecc6dc7586413d9ad2dba", "score": "0.57130903", "text": "public function dispatch() {\n if ($this->dispatching == null) {\n\n $this->dispatching = $this->router->getMatchedRoutes($this->request->getPath());\n }\n\n // Dispatch array is not empty\n while (!empty($this->dispatching)) {\n\n // Get the next available dispatch\n $dispatching = array_shift($this->dispatching);\n\n // Get the controller namespace\n $namespace = '\\modules\\\\' . $dispatching['module'] . '\\controllers\\\\' . $dispatching['controller'];\n\n // The controller does not exist\n if (class_exists($namespace) === false) {\n\n continue;\n }\n\n // Set the request vars\n $this->request->setVar(array_diff_key($dispatching, array_flip(['module', 'controller', 'action'])));\n // Set the dispatcher dispatched values\n $this->dispatched = array_intersect_key($dispatching, array_flip(['module', 'controller', 'action']));\n\n $controller = new $namespace($this->request, $this, $this->container);\n\n // We have a POST action defined\n if ($this->request->isPost() &&\n method_exists($controller, $this->getBaseActionName() . Router::ACTION_POST_SUFFIX)) {\n\n // Set the correct dispatching/dispatched action\n $dispatching['action'] = $this->dispatched['action'] = $this->getBaseActionName() . Router::ACTION_POST_SUFFIX;\n\n // A default controller action cannot be found\n } else if ($this->request->isGet() && method_exists($controller, $dispatching['action']) === false) {\n\n continue;\n }\n\n // Set the controller was forwarded to false\n $this->controllerWasForwarded = false;\n\n // The controller has a pre method defined\n if (method_exists($controller, 'pre')) {\n\n $controller->pre();\n }\n\n // The controller was forwarded\n if ($this->controllerWasForwarded === true) {\n\n continue;\n }\n\n $controller->{$dispatching['action']}();\n\n // The action was forwarded\n if ($this->controllerWasForwarded === true) {\n\n continue;\n }\n\n // The controller has a post method defined\n if (method_exists($controller, 'post')) {\n\n $controller->post();\n }\n\n // The action was forwarded\n if ($this->controllerWasForwarded === true) {\n\n continue;\n }\n\n // Render the view and set the response body\n $controller->getResponse()->setBody($controller->getView()->render());\n\n return;\n }\n\n // Empty the dispatched array so dispatcher not resolved event can switch to a different module if needed\n $this->dispatched = ['module' => '', 'controller' => '', 'action' => ''];\n\n $this->eventManager->emit($this->container->get('event', ['dispatcher:notResolved', $this]));\n $this->dispatch();\n }", "title": "" }, { "docid": "5e4ba97485006faa6fb195f96d015686", "score": "0.57115686", "text": "public static function dispatch(&$request) {\r\n // inizializziamo la sessione\r\n session_start();\r\n\r\n if (isset($request[\"page\"])) {\r\n switch ($request[\"page\"]) {\r\n case \"master\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"accesso\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"rimuovi\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"rimuovicode\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"rimuovicodeid\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"inserisci\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"inseriscicode\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"logincode\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"mappa\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"mappacode\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"totaleprodotti\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"totaleprodotticode\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"contatta\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"contattacode\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"contattaleggi\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"contattaleggiform\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"documentazione\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n case \"logout\":\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n break;\r\n default:\r\n self::write404();\r\n break;\r\n }\r\n } else {\r\n $request[\"page\"] = \"master\";\r\n $controller = new SimpleController();\r\n $controller->handleInput($request);\r\n echo '<script language=javascript>document.location.href=\"index.php?page=master\"</script>';\r\n }\r\n }", "title": "" }, { "docid": "af210751be342ffc8eeb8d8cca521761", "score": "0.5703021", "text": "public static function launch()\n {\n $routes = require_once(__DIR__ . '/../config/routes.php');\n $request = (isset($_GET['route']) && !empty($_GET['route'])) ? htmlspecialchars($_GET['route']) : 'home';\n if(substr($request, -1) == '/') {\n $request = substr($request, 0, -1);\n }\n \n $request = explode('/', $request);\n \n $first = false;\n\n foreach($routes as $route)\n {\n $parts = explode('/', $route[1]);\n \n if(!$first)\n {\n $request[1] = $request[0];\n $request[0] = '/';\n $first = true;\n }\n\n if($request[1] == $parts[1] && $_SERVER['REQUEST_METHOD'] == $route[0])\n { \n if(count($request) == count($parts))\n {\n $request = array_values(array_filter($request));\n $i = 0;\n foreach($parts as $part)\n {\n $part = str_replace('{', '', $part);\n $part = str_replace('}', '', $part);\n if($part != $request[$i]) $_GET[$part] = $request[$i];\n $i++;\n }\n \n $request = $route;\n break;\n }\n }\n }\n \n $request_methods = ['GET', 'POST', 'PUT'];\n\n if ($_SERVER['REQUEST_METHOD'] == $request[0]) \n {\n $controller = 'Controller\\\\' . ucfirst($request[2]);\n if(class_exists($controller))\n {\n $controller = new $controller();\n \n if(method_exists($controller, $request[3]))\n {\n echo $controller->{$request[3]}();\n }else\n {\n echo json_encode(['success' => false, 'error' => 'controllerMethodNotFound', 'name' => $request[3]]);\n }\n }else\n {\n echo json_encode(['success' => false, 'error' => 'controllerNotFound', 'name' => ucfirst($request[2])]);\n }\n }else\n {\n echo json_encode(['success' => false, 'error' => '403']);\n }\n }", "title": "" }, { "docid": "cb38a5fa7c8b8d8d6163e8d22b7def49", "score": "0.57008135", "text": "public function submit()\n {\n $uriParam = isset($_SERVER[\"REQUEST_URI\"]) ? $_SERVER[\"REQUEST_URI\"] : '/';\n // loop through each uri and find the one that matches the route\n foreach($this->_uri as $key => $value)\n {\n if(preg_match(\"#^$value$#\", $uriParam))\n {\n $useMethod = $this->_method[$key];\n new $useMethod();\n }\n }\n }", "title": "" }, { "docid": "aa51b5df3420c86925edb94988a1e4dc", "score": "0.56991", "text": "public function __construct()\n {\n $this->HTTPMethod = $_SERVER['REQUEST_METHOD'];\n //Auflösen des Pfades (und Instantiieren des API-Objektes)\n $this->pathResolver();\n //Die jeweilige Behandlung auswählen:\n switch ($this->HTTPMethod) {\n case 'GET':\n $this->APIObj->isGET();\n break;\n case 'POST':\n $this->APIObj->isPOST();\n break;\n case 'PUT':\n $this->APIObj->isPUT();\n break;\n case 'DELETE':\n $this->APIObj->isDELETE();\n break;\n default:\n $this->error();\n }\n }", "title": "" }, { "docid": "20feec0ccf979b24cf97c958acfb1f39", "score": "0.56971073", "text": "protected function initMethod() {\r\n\t/* By default GET */\r\n \r\n\t$this->method = 'GET';\r\n\tarray_walk_recursive($_GET, function(&$v, &$k) {\r\n $v = filter_var(str_replace(chr(0), '', $v), FILTER_UNSAFE_RAW);\r\n });\r\n\t$this->params = $_GET;\r\n\r\n\tif ($_SERVER['REQUEST_METHOD'] == 'POST') {\r\n\t $this->method = 'POST';\r\n\t array_walk_recursive($_POST, function(&$v, &$k) {\r\n $v = filter_var(str_replace(chr(0), '', $v), FILTER_UNSAFE_RAW);\r\n });\r\n\t $this->params = array_merge($this->params, $_POST);\r\n \r\n\t} elseif ($_SERVER['REQUEST_METHOD'] == 'PUT') {\r\n\t $this->method = 'PUT';\r\n\t parse_str(file_get_contents(\"php://input\"), $_PUT);\r\n\t array_walk_recursive($_PUT, function(&$v, &$k) {\r\n $v = filter_var(str_replace(chr(0), '', $v), FILTER_UNSAFE_RAW);\r\n });\r\n\t $this->params = array_merge($this->params, $_PUT);\r\n \r\n\t} elseif ($_SERVER['REQUEST_METHOD'] == 'DELETE') {\r\n\t $this->method = 'DELETE';\r\n\t parse_str(file_get_contents(\"php://input\"), $_DELETE);\r\n\t array_walk_recursive($_DELETE, function(&$v, &$k) {\r\n $v = filter_var(str_replace(chr(0), '', $v), FILTER_UNSAFE_RAW);\r\n });\r\n\t $this->params = array_merge($this->params, $_DELETE);\r\n\t}\r\n }", "title": "" }, { "docid": "65c37a5b908dd41315f31de26c517447", "score": "0.56953216", "text": "public static function route() {\n\n $url = self::getUrl();\n\n // Ignore any query string in the url.\n $url = explode('?', $url);\n $url = reset($url);\n\n $params = explode(\"/\", $url);\n\n // Try to reach a Controller for testing purposes.\n /*\n $controllerName = ucfirst(array_shift($params));\n\n // Default to IndexController if a controller is not specified.\n if (empty($controllerName)) {\n $controllerName = \"Index\";\n }\n */\n $controllerName = \"Source\";\n\n $controllerPath = \"\\\\Controllers\\\\\" . $controllerName . \"Controller\";\n\n //Check if specified Controller exists\n if (class_exists($controllerPath)) {\n\n //Continue on with getting Action.\n $controllerAction = array_shift($params);\n\n //Default to indexAction if no specified action.\n if (empty($controllerAction)) {\n $controllerAction = \"index\";\n }\n\n //If Action in Controller exists, do it.\n if (method_exists($controllerPath, $controllerAction)) {\n Route::getController($controllerPath, $controllerAction);\n }\n\n //In the case the Controller exists, but their Action does not.\n else {\n Route::getController($controllerPath, \"index\");\n }\n }\n\n //If controller doesn't exist, route to error message\n else {\n Route::error();\n }\n }", "title": "" }, { "docid": "f6b06922a3d1c26c216fb6cf92f1f2f4", "score": "0.56942296", "text": "public function processApi()\r\n\t{\r\n\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\r\n\t\tif((int)method_exists($this, $func) > 0)\r\n\t\t{\r\n\t\t\t$this->$func();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->response('',404);\r\n\t\t}\r\n\t\t// If the method not exist with in this class, reponse would be \"Page not found\".\r\n\t}", "title": "" }, { "docid": "a075a1b144edf106cc2cf915d4ba234b", "score": "0.56898594", "text": "public function run ()\n\t\t{\n\t\t\t$uri = $this->getURI ();\n\t\t\t\n\t\t\tforeach ($this->routes as $uriPattern => $path) \n\t\t\t{\n\n\t\t\t\tif ( preg_match ( \"~$uriPattern~\", $uri) )\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$internalRoute = preg_replace(\"~$uriPattern~\", $path, $uri);\n\n\t\t\t\t\t//Определяем контроллер, action(действие), параметры\n\t\t\t\t\t$segments = explode ( '/', $internalRoute );\n\n\t\t\t\t\t$controllerName = array_shift ( $segments ) . 'Controller';\n\t\t\t\t\t$controllerName = ucfirst ( $controllerName );\n\n\t\t\t\t\t$actionName = 'action' . ucfirst ( array_shift ( $segments ) );\n\n\t\t\t\t\t$parameters = $segments;\n\t\t\t\t\t\n\n\t\t\t\t\t$controllerFile = ROOT . '/controllers/' . \n\t\t\t\t\t\t$controllerName . '.php';\n\n\t\t\t\t\t\n\t\t\t\t\tif ( file_exists ( $controllerFile ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tinclude_once ( $controllerFile );\n\t\t\t\t\t}\n\n\t\t\t\t\t//Create new obj, that is call need method (that is action)\n\n\t\t\t\t\t$controllerObject = new $controllerName;\n\n\t\t\t\t\t// echo $controllerName.\" \".$actionName;\n\t\t\t\t\t/**\n\t\t\t\t\t * Calling need method ($actionName) a certain class ($contollerObject)\n\t\t\t\t\t * with given ($paramets) параметрами\n\t\t\t\t\t */\n\t\t\t\t\tif(method_exists($controllerObject, $actionName)) {\n\t\t\t\t\t\t$result = call_user_func_array (\n\t\t\t\t\t\t\t array ( $controllerObject, $actionName ), \n\t\t\t\t\t\t\t $parameters \n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\trequire_once ROOT . '/views/error/error404.html';\n\t\t\t\t\t}\t\n\t\t\t\n\n\t\t\t\t\t//if method of controller is successeful, finish working router\n\t\t\t\t\tif ( $result != null )\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t} \n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "f0c5188a664a5acd3bfb3d4ce83d3321", "score": "0.56869066", "text": "public function processApi() {\n $func = strtolower ( trim ( str_replace ( \"/\", \"\", $_REQUEST ['req'] ) ) );\n if (( int ) method_exists ( $this, $func ) > 0)\n $this->$func ();\n else\n $this->sendResponse ( 404, json_encode ( array (\n 'error' => true,\n 'message' => 'Not Found' \n ) ) );\n // If the method not exist with in this class, response would be \"Page not found\".\n }", "title": "" }, { "docid": "44527d68ec1d85dd5673b17be1987112", "score": "0.56857187", "text": "private function _callControllerMethod()\n {\n $length = count($this->_url);\n\n // Make sure the method we are calling exists\n if ($length > 1) {\n if (!method_exists($this->_controller, $this->_url[1])) {\n //! error\n }\n }\n //var_dump($this->_controller);\n // Determine what to load\n switch ($length) {\n /*case 3:\n //Controller->Method(Param1, Param2)\n $this->_controller->{$this->_url[1]}($this->_url[2]);\n break;\n*/\n case 2:\n //Controller->Method(Param1, Param2)\n //$this->_controller->{$this->_url[1]}();\n $this->_controller->index($this->_url[1]);\n break;\n\n default:\n $this->_controller->index();\n break;\n }\n }", "title": "" }, { "docid": "088e12a4070162d2602fc0d695c3093e", "score": "0.5685103", "text": "public function dispatch()\n {\n switch ($this->getActionType() . $this->getOperation()) {\n /* Create */\n case self::ACTION_TYPE_ENTITY . self::OPERATION_CREATE:\n // Creation of objects is possible only when working with collection\n $this->_critical(self::RESOURCE_METHOD_NOT_IMPLEMENTED);\n break;\n case self::ACTION_TYPE_COLLECTION . self::OPERATION_CREATE:\n // If no of the methods(multi or single) is implemented, request body is not checked\n if (!$this->_checkMethodExist('_create') && !$this->_checkMethodExist('_multiCreate')) {\n $this->_critical(self::RESOURCE_METHOD_NOT_IMPLEMENTED);\n }\n // If one of the methods(multi or single) is implemented, request body must not be empty\n $requestData = $this->getRequest()->getBodyParams();\n if (empty($requestData)) {\n $this->_critical(self::RESOURCE_REQUEST_DATA_INVALID);\n }\n // The create action has the dynamic type which depends on data in the request body\n if ($this->getRequest()->isAssocArrayInRequestBody()) {\n $this->_errorIfMethodNotExist('_create');\n $filteredData = $this->getFilter()->in($requestData);\n if (empty($filteredData)) {\n $this->_critical(self::RESOURCE_REQUEST_DATA_INVALID);\n }\n $newItemLocation = $this->_create($filteredData);\n $this->getResponse()->setHeader('Location', $newItemLocation);\n } else {\n $this->_errorIfMethodNotExist('_multiCreate');\n $filteredData = $this->getFilter()->collectionIn($requestData);\n $this->_multiCreate($filteredData);\n $this->_render($this->getResponse()->getMessages());\n $this->getResponse()->setHttpResponseCode(Mage_Api2_Model_Server::HTTP_MULTI_STATUS);\n }\n break;\n /* Retrieve */\n case self::ACTION_TYPE_ENTITY . self::OPERATION_RETRIEVE:\n $this->_errorIfMethodNotExist('_retrieve');\n $retrievedData = $this->_retrieve();\n $filteredData = $this->getFilter()->out($retrievedData);\n $this->_render($filteredData);\n break;\n case self::ACTION_TYPE_COLLECTION . self::OPERATION_RETRIEVE:\n $this->_errorIfMethodNotExist('_retrieveCollection');\n $retrievedData = $this->_retrieveCollection();\n $filteredData = $this->getFilter()->collectionOut($retrievedData);\n $this->_render($filteredData);\n break;\n /* Update */\n case self::ACTION_TYPE_ENTITY . self::OPERATION_UPDATE:\n $this->_errorIfMethodNotExist('_update');\n $requestData = $this->getRequest()->getBodyParams();\n if (empty($requestData)) {\n $this->_critical(self::RESOURCE_REQUEST_DATA_INVALID);\n }\n $filteredData = $this->getFilter()->in($requestData);\n if (empty($filteredData)) {\n $this->_critical(self::RESOURCE_REQUEST_DATA_INVALID);\n }\n $this->_update($filteredData);\n break;\n case self::ACTION_TYPE_COLLECTION . self::OPERATION_UPDATE:\n $this->_errorIfMethodNotExist('_multiUpdate');\n $requestData = $this->getRequest()->getBodyParams();\n if (empty($requestData)) {\n $this->_critical(self::RESOURCE_REQUEST_DATA_INVALID);\n }\n $filteredData = $this->getFilter()->collectionIn($requestData);\n $this->_multiUpdate($filteredData);\n $this->_render($this->getResponse()->getMessages());\n $this->getResponse()->setHttpResponseCode(Mage_Api2_Model_Server::HTTP_MULTI_STATUS);\n break;\n /* Delete */\n case self::ACTION_TYPE_ENTITY . self::OPERATION_DELETE:\n $this->_errorIfMethodNotExist('_delete');\n $this->_delete();\n break;\n case self::ACTION_TYPE_COLLECTION . self::OPERATION_DELETE:\n $this->_errorIfMethodNotExist('_multiDelete');\n $requestData = $this->getRequest()->getBodyParams();\n if (empty($requestData)) {\n $this->_critical(self::RESOURCE_REQUEST_DATA_INVALID);\n }\n $this->_multiDelete($requestData);\n $this->getResponse()->setHttpResponseCode(Mage_Api2_Model_Server::HTTP_MULTI_STATUS);\n break;\n default:\n $this->_critical(self::RESOURCE_METHOD_NOT_IMPLEMENTED);\n break;\n }\n }", "title": "" }, { "docid": "4e9e85090e64d895fb6636b723bc3f59", "score": "0.5681031", "text": "public function map()\n {\n $this->mapApiRoutes();\n }", "title": "" }, { "docid": "edee9d3b26e25c342c1e2e01ea5ce083", "score": "0.56794065", "text": "public function processApi()\n {\n $data = array('404'=>'requested method not available');\n $func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['mode'])));\n if((int)method_exists($this,$func) > 0)\n $this->$func();\n else\n $this->response($this->json($data),'404');\n // If the method not exist with in this class, response would be \"Page not found\".\n }", "title": "" }, { "docid": "1b68af98b665e93f304b0d0f6f84873e", "score": "0.5678143", "text": "public function dispatch() {\r\n\r\n\r\n $controller = $this->controller;\r\n $method = $this->method;\r\n $params = $this->params;\r\n\r\n\r\n $worker = new $controller();\r\n $worker->$method($params);\r\n\r\n unset($_SERVER['REQUEST_URI']);\r\n unset($this->url);\r\n\r\n }", "title": "" }, { "docid": "446dab8d4683ef1cdcf18cf17183a804", "score": "0.5668326", "text": "public function dispatch ()\n {\n $matchCount = $diffCount = 0;\n $matches = $differs = array();\n\n foreach ($this->routes as $id => $route) {\n if (preg_match(\"#^{$route}$#\", $this->request)) {\n $matchCount++;\n $matches[$id] = $route;\n } else {\n $diffCount++;\n $differs[$id] = $route;\n }\n }\n\n if (count($matches) <= 0) {\n http_response_code(404);\n echo \"<h1>404</h1>\";\n throw new \\Exception(\"No route was found for: {$this->request}\");\n die;\n } elseif (count($matches) > 1) {\n http_response_code(500);\n die(\"Looks like there is a problem trying to find the right location... Stupid devs....\");\n } elseif (count($matches) === 1) {\n foreach ($matches as $id => $match) {\n $request = explode('/', $this->request);\n $slugs = explode('/', $match);\n\n foreach ($slugs as $key => $slug) {\n if ($slug == '.+') {\n array_push($this->args, $request[$key]);\n }\n }\n\n call_user_func_array($this->methods[$id], $this->args);\n }\n }\n }", "title": "" }, { "docid": "ea94d3a81a9ce0dae0be05406c56b623", "score": "0.5658529", "text": "public function dispatch($request) {\n $this->request = $request;\n $this->id = $request->id;\n $this->params = $request->params;\n\n if ($request->isRestful() ) {\n return $this->dispatchRestful();\n }\n if ($request->action) {\n return $this->{$request->action}();\n }\n }", "title": "" }, { "docid": "2777a76bd9e136e0c9bc18f116374fb7", "score": "0.5655653", "text": "public function handleRouting(){\n\t\t$request = ControllerRequest::getInstance();\n\t\t$soapRawRequest = $request->getRawBody();\n\t\t$domDocument = new DOMDocument();\n\t\t$xmlValidation = @$domDocument->loadXML($soapRawRequest);\n\t\tif($xmlValidation==false){\n\t\t\t$soapException = new SoapException('SOAP Envelope mal formado. '.$php_errormsg);\n\t\t\t$soapException->setFaultCode('Sender');\n\t\t\tthrow $soapException;\n\t\t}\n\n\t\tif(isset($_SERVER['HTTP_SOAPACTION'])){\n\t\t\t$soapAction = str_replace(\"\\\"\", \"\", $_SERVER['HTTP_SOAPACTION']);\n\t\t} else {\n\t\t\tif(isset($_SERVER['CONTENT_TYPE'])){\n\t\t\t\tif(preg_match('/action=\"(.+)\"/', $_SERVER['CONTENT_TYPE'], $matches)){\n\t\t\t\t\t$soapAction = $matches[1];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new SoapException('No se indicó la acción SOAP a ejecutar');\n\t\t\t}\n\t\t}\n\n\t\t$soapAction = explode('#', $soapAction);\n\t\tforeach($domDocument->getElementsByTagNameNS($soapAction[0], $soapAction[1]) as $domElement){\n\t\t\t$parameters = array();\n\t\t\tforeach($domElement->childNodes as $actionParam){\n\t\t\t\tif($actionParam->nodeType==1){\n\t\t\t\t\t$paramType = $actionParam->getAttributeNS($this->_xmlSchemaNamespace, 'type');\n\t\t\t\t\tif($paramType=='ns2:Map'){\n\t\t\t\t\t\t$parameters[] = $this->_getXSIMap($actionParam);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif($paramType=='SOAP-ENC:Array'||$paramType=='enc:Array'){\n\t\t\t\t\t\t\t$parameters[] = $this->_decodeSoapArray($actionParam);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$parameters[] = $this->_decodeXSDType($paramType, $actionParam->nodeValue);\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\tRouter::setAction($soapAction[1]);\n\t\t\tRouter::setParameters($parameters);\n\t\t}\n\t}", "title": "" }, { "docid": "72f76b24bc751a2872dc7be79c9fe7be", "score": "0.56358826", "text": "public function map()\n {\n parent::mapApiRoutes();\n\n parent::mapWebRoutes();\n\n $this->mapAdminRoutes();\n\n $this->mapManagerRoutes();\n }", "title": "" }, { "docid": "b947dc4dde4a36bf9605612963c17843", "score": "0.5635174", "text": "public function run()\n {\n if ($_GET)\n {\n $class = isset($_GET['class']) ? $_GET['class'] : NULL;\n $method = isset($_GET['method']) ? $_GET['method'] : NULL;\n \n if ($class)\n {\n $object = $class == get_class($this) ? $this : new $class;\n if (is_callable(array($object, $method) ) )\n {\n call_user_func(array($object, $method), $_REQUEST);\n }\n }\n else if (function_exists($method))\n {\n call_user_func($method, $_REQUEST);\n }\n }\n }", "title": "" }, { "docid": "2b61932bbd0748691457a067d0f0647e", "score": "0.5631815", "text": "public function map()\n {\n $this->mapApiRoutes();\n\n $this->mapWebRoutes();\n\n $this->mapAdminRoutes();\n\n $this->mapBrokerRoutes();\n\n $this->mapImportAgencyRoutes();\n\n $this->mapExportAgencyRoutes();\n\n $this->mapSponsorRoutes();\n\n //\n }", "title": "" }, { "docid": "6e16584eb11f922134503b90947d145b", "score": "0.56189823", "text": "public function getRequestObject();", "title": "" }, { "docid": "9c422ef722ab226b40570e9da5dfb71f", "score": "0.5617197", "text": "public function api() {\n \t$method = $_SERVER['REQUEST_METHOD'];\n $request = array_filter(explode('/', str_replace('api/', '', $this->requestUri)));\n $object = $request[1];\n\n if ($request[1] == 'service') {\n \n switch ($request[2]) {\n\n case 'switch-account':\n break;\n\n case 'switch-project':\n $_SESSION['project'] = $_POST['project'];\n $this->project->id = $_SESSION['project'];\n break;\n\n case 'load-funnel':\n $data = $this->loadFunnel($request[3]);\n echo json_encode($data);\n break;\n }\n\n exit();\n }\n\n elseif ($method == 'GET' && empty($request[1])) {\n $processor = $object . '/getlist';\n }\n\n elseif ($method == 'GET' && is_numeric($request[2])) {\n if ($object == 'funnel') {\n $data = $this->getFunnel($request[2]);\n }\n else {\n $data = array('id' => $request[2]);\n $processor = $object . '/get';\n }\n\n echo json_encode($data);\n exit();\n }\n\n elseif ($method == 'POST' && count($request) == 1) {\n $payload = json_decode(@file_get_contents('php://input'), true);\n if (!empty($_POST)) {\n $payload = $_POST;\n }\n $processor = $object . '/create';\n }\n\n elseif ($method == 'POST' && count($request) != 1) {\n $processor = $object . '/' . $request[2];\n }\n\n elseif ($method == 'PUT') {\n parse_str(@file_get_contents(\"php://input\"), $payload);\n $processor = $object . '/update';\n }\n\n elseif ($method == 'DELETE') {\n $data = array('id' => $request[2]);\n $processor = $object . '/delete';\n }\n\n $response = $this->modx->runProcessor($processor, $data);\n\n if ($response->isError()) {\n return $response->getMessage();\n }\n else {\n $object = $response->getObject();\n if (is_object($object)) {\n $json = json_encode($data->toArray());\n }\n else {\n $json = array();\n }\n }\n\n echo $json;\n \texit();\n }", "title": "" }, { "docid": "fd743f4ad072ddc9001ee41aade50067", "score": "0.5616304", "text": "public function __construct() {\n $this->setRoutes(array(\n 'user' => 'getAllUsers',\n 'user/:userId' => 'getCertainUser',\n 'fixName/:variableName' => 'anotherMethod'\n ));\n }", "title": "" }, { "docid": "3b4423c67e2e2593f6ee1d87e8c25b5b", "score": "0.5610311", "text": "public function call()\n {\n if (is_string($this->callable)) {\n $params = explode('#', $this->callable);\n $controller = Router::$controllersPath . $params[0];\n $controller = new $controller;\n extract($this->globals);\n $this->callMiddleware();\n\n call_user_func_array([$controller, $params[1]], $this->matches);\n } else {\n $this->callMiddleware();\n call_user_func_array($this->callable, $this->matches);\n }\n\n return request();\n }", "title": "" }, { "docid": "ea3b25ae63364abf18eb325f7364e345", "score": "0.5606866", "text": "public function invoke(&$controller, Http_Request &$request, Http_Response &$response);", "title": "" }, { "docid": "29d4dbe068037898fbed6963eae89b4f", "score": "0.560594", "text": "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['action'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',204);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "title": "" }, { "docid": "674843e28e95aa990e5cf6ddf1e8fb0a", "score": "0.5602661", "text": "public static function route();", "title": "" }, { "docid": "444c5971e8d79150ccb10c1b1d03d70e", "score": "0.5591833", "text": "public static function dispatch()\r\n\t{\r\n\t\t/**\r\n\t\t * Controllernames and methods saved in an array. It's solved manually to prevent that too many ressources are used to\r\n\t\t * scan every controller if the method exists etc.\r\n\t\t */\r\n\t\t$validControllerNames = array(\t\"Album\"\t\t\t=> array(\"index\",\"create\",\"doCreate\", \"edit\", \"doEdit\", \"delete\", \"doDelete\"),\r\n\t\t\t\t\t\t\t\t\t \t\"Albums\"\t\t=> array(\"index\"),\r\n\t\t\t\t\t\t\t\t\t \t\"Home\" \t\t\t=> array(\"index\"),\r\n\t\t\t\t\t\t\t\t\t \t\"Login\"\t\t\t=> array(\"index\",\"doLogin\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Logout\"\t\t=> array(\"index\",\"doLogout\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Photo\"\t\t\t=> array(\"index\", \"edit\", \"doEdit\", \"delete\", \"doDelete\", \"addTo\", \"doAddTo\"),\r\n\t\t\t\t\t\t\t\t\t \t\"Photos\"\t\t=> array(\"index\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Register\"\t\t=> array(\"index\",\"doRegister\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Search\"\t\t=> array(\"index\"),\r\n\t\t\t\t\t\t\t\t\t \t\"Upload\"\t\t=> array(\"index\",\"doUpload\"),\r\n\t\t\t\t\t\t\t\t\t\t\"User\"\t\t\t=> array(\"index\", \"edit\", \"doEdit\", \"delete\", \"doDelete\", \"changepw\", \"doChangepw\"),\r\n\t\t\t\t\t\t\t\t\t\t\"Error\"\t\t\t=> array(\"index\"));\r\n\r\n\t\t// Make an array of the data in the url, separated by \"/\"\r\n\t\t$url = explode('/', trim($_SERVER['REQUEST_URI'], '/'));\r\n\r\n\t\t// controllername which is setted in the url.\r\n\t\tif (!empty($url[0])) {\r\n\r\n\t\t\t// controllername exists\r\n\t\t\tif(array_key_exists(ucfirst($url[0]),$validControllerNames)) {\r\n\t\t\t\t$controllerName = ucfirst($url[0]);\r\n\r\n\t\t\t\t// Check if method exist and else call the index method of the controller.\r\n\t\t\t\tif (!empty($url[1]) && in_array($url[1],$validControllerNames[$controllerName])) {}\r\n\t\t\t\t$method \t\t= (!empty($url[1]) && in_array($url[1],$validControllerNames[$controllerName])) ? $url[1] : 'index';\r\n\t\t\t\t$args \t\t\t= array_slice($url, 2);\r\n\r\n\t\t\t} else {\r\n\t\t\t\t$controllerName = 'Error';\r\n\t\t\t\t$method \t\t= 'index';\r\n\t\t\t\t$args \t\t\t= array();\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t$controllerName = 'Home';\r\n\t\t\t$method \t\t= 'index';\r\n\t\t\t$args \t\t\t= array();\r\n\t\t}\r\n\r\n\t\t// Add controller and create object\r\n\t\trequire_once (\"controllers/\".$controllerName.\"Controller.php\");\r\n $controllerName = $controllerName.\"Controller\";\r\n\t\t$controller = new $controllerName();\r\n\t\tcall_user_func_array(array($controller, $method), $args);\r\n\r\n\t\t// Removes the useless Controllers and valid controller name array to save resources\r\n\t\tunset($controller);\r\n\t\tunset($validControllerNames);\r\n\t}", "title": "" }, { "docid": "e97d6eec0380296977ebca5d752e3690", "score": "0.55860525", "text": "private static function run_method($object, $method)\n\t{\n\t\t$args = explode('/', Request::uri());\n\t\tunset($args[0], $args[1]);\n\t\t\n\t\t$body = call_user_func_array(array($object, $method), $args);\n\t\t$status = 200;\n\t\t$content = 'text/html';\n\t\t\n\t\t// A custom content type/status code can be set by returning\n\t\t// an array in your method. The first item is the content, the second the\n\t\t// status code and the third the content type\n\t\tif ( is_array($body) )\n\t\t{\n\t\t\t$status = isset($body[1]) ? $body[1] : 200;\n\t\t\t$content = isset($body[2]) ? $body[2] : 'text/html';\n\t\t\t$body = isset($body[0]) ? $body[0] : NULL;\n\t\t}\n\n\t\t$status = Request::server_protocol() . ' ' . self::$http_messages[$status];\n\n\t\treturn array('body' => $body, 'status' => $status, 'content_type' => $content);\n\t}", "title": "" }, { "docid": "60f79a3679b13238be15828ee2ed9b58", "score": "0.5579342", "text": "public function handleRequest()\n {\n $route = $this->router->match();\n\n if ($route) {\n $controllerName = $route['target']['controllerName'];\n $methodName = $route['target']['methodName'];\n\n $controller = new $controllerName();\n\n $controller->$methodName($route['params']);\n } else {\n header(\"HTTP:1.0 404 not Found\");\n echo json_encode([\n \"error_code\" => 404,\n \"reason\" => \"page not found\"\n ]);\n }\n }", "title": "" } ]
2d3f85ba54f5196740f3954e42db8c1b
Creates a ButtonGroup object, adds it to the groups list and returns a reference to it
[ { "docid": "be1cbf2ec68ccbd34ed6c6812319a7f6", "score": "0.8413516", "text": "public function &createButtongroup()\n {\n return $this->addButtongroup($this->factory->create('Bootstrap\\Buttongroups\\ButtonGroup'));\n }", "title": "" } ]
[ { "docid": "157be78b0a0a2a59fe726c2af34ebc47", "score": "0.7058121", "text": "public function addGroup(){\r\n\t\t$item = new abo_group();\r\n\t\t$this->items[] = $item;\r\n\t\treturn $item;\r\n\t}", "title": "" }, { "docid": "476de7b539ee545758c55bd3a6b7a0e5", "score": "0.6969808", "text": "public function &addButtongroup(ButtonGroup $buttongroup) {\n\n $uniqeid = uniqid('btntoolbar_btngrp_');\n $this->groups[$uniqeid] = $buttongroup;\n\n return $this->groups[$uniqeid];\n }", "title": "" }, { "docid": "36bbf23b0a775b244f5884aad6be5415", "score": "0.6460356", "text": "public function addGroup(RToolbarButtonGroup $group)\n\t{\n\t\t$this->groups[] = $group;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ab9825e4c2f6adb717c94b33642b3868", "score": "0.62861216", "text": "public function isButtonGroup()\n {\n $this->wrap('div', ['class' => 'btn-group']);\n return $this;\n }", "title": "" }, { "docid": "fbb0063af701ac307318037de531e8be", "score": "0.6031579", "text": "public function BuildListGroupActionsButton()\n\t{\n\t\t$this->oList->AddGroupActionTable(array());\n\n\t\treturn ($this);\n\t}", "title": "" }, { "docid": "15ec4ed663ddbcb5238d7f53c433ec89", "score": "0.60042965", "text": "public function getToolbar()\n\t{\n\t\t$group = new RToolbarButtonGroup;\n\n\t\t$save = RToolbarBuilder::createSaveButton('object.apply');\n\t\t$saveAndClose = RToolbarBuilder::createSaveAndCloseButton('object.save');\n\t\t$saveAndNew = RToolbarBuilder::createSaveAndNewButton('object.save2new');\n\t\t$save2Copy = RToolbarBuilder::createSaveAsCopyButton('object.save2copy');\n\n\n\t\t$group->addButton($save)\n\t\t\t->addButton($saveAndClose)\n\t\t\t->addButton($saveAndNew)\n\t\t\t->addButton($save2Copy);\n\n\t\tif (empty($this->item->id))\n\t\t{\n\t\t\t$cancel = RToolbarBuilder::createCancelButton('object.cancel');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$cancel = RToolbarBuilder::createCloseButton('object.cancel');\n\t\t}\n\n\t\t$group->addButton($cancel);\n\n\t\t$toolbar = new RToolbar;\n\t\t$toolbar->addGroup($group);\n\n\t\treturn $toolbar;\n\t}", "title": "" }, { "docid": "1562e24a73a35a93d936d395d25e68e7", "score": "0.596406", "text": "protected function getGroupButtonToolbarRenderer()\n {\n $buttonToolbar = new ButtonToolBar();\n $hasEditRight = $this->is_allowed(WeblcmsRights::EDIT_RIGHT);\n\n if ($hasEditRight)\n {\n $buttonToolbar->addItem(\n new Button(\n $this->getTranslator()->trans('SubscribePlatformGroupUsers', [], Manager::context()),\n new FontAwesomeGlyph('group'),\n $this->get_url(\n array(\n self::PARAM_ACTION => self::ACTION_SUBSCRIBE_PLATFORM_GROUP_USERS,\n self::PARAM_COURSE_GROUP => $this->getCurrentCourseGroup()->getId()\n )\n ),\n ToolbarItem::DISPLAY_ICON_AND_LABEL\n )\n );\n\n $buttonToolbar->addItem(\n new Button(\n $this->getTranslator()->trans('QuickUsersSubscriberComponent', [], Manager::context()),\n new FontAwesomeGlyph('superpowers'),\n $this->get_url(\n array(\n self::PARAM_ACTION => self::ACTION_QUICK_USERS_SUBSCRIBER,\n self::PARAM_COURSE_GROUP => $this->getCurrentCourseGroup()->getId()\n )\n ),\n ToolbarItem::DISPLAY_ICON_AND_LABEL\n )\n );\n }\n\n $this->getCourseGroupDecoratorsManager()->addCourseGroupSubscriptionActions(\n $buttonToolbar, $this->getCurrentCourseGroup(), $this->getUser(), $hasEditRight\n );\n\n return new ButtonToolBarRenderer($buttonToolbar);\n }", "title": "" }, { "docid": "77daf79dfcd82f7de296d7881fc56503", "score": "0.5950848", "text": "abstract public function createGroup( $group );", "title": "" }, { "docid": "ba7030a154a8caa1e53d97ac45ab55db", "score": "0.58553165", "text": "public function add_button( $field_groups ) {\n\n\t\t// Geolocation fields group.\n\t\t$field_groups[] = array(\n\t\t\t'name' => 'gfgeo_geolocation_fields',\n\t\t\t'label' => __( 'Geolocation Fields', 'gfgeo' ),\n\t\t\t'fields' => apply_filters( 'gfgeo_field_buttons', array(), $field_groups ),\n\t\t);\n\n\t\treturn $field_groups;\n\t}", "title": "" }, { "docid": "c4cc44d10fe03ae291d06fc1cee912f3", "score": "0.58224344", "text": "public function newGroup()\r\n {\r\n \t$group = $this->groupManager->createGroup();\r\n \t//$badge = $this->badgeManager->saveBadge($badge);\r\n \r\n \treturn new NewGroupBuilder($group);\r\n }", "title": "" }, { "docid": "ea5a3fde39b562a1ae54694a588ce50a", "score": "0.5744148", "text": "function CreateButtons(){}", "title": "" }, { "docid": "5b905dfa6768ef6b5512a7eba1bf1793", "score": "0.55928457", "text": "public function join_button( $button ) {\n\t\tglobal $groups_template;\n\n\t\tif ( empty( $groups_template->group->need_request ) || 'leave_group' == $button['id'] ) {\n\t\t\treturn $button;\n\t\t}\n\n\t\t// Difficult to filter BuddyPress ajax functions, so disabling them.\n\n\t\tif ( $groups_template->group->is_invited ) {\n\t\t\t$button = array(\n\t\t\t\t'id' => 'accept_invite',\n\t\t\t\t'component' => 'groups',\n\t\t\t\t'must_be_logged_in' => true,\n\t\t\t\t'block_self' => false,\n\t\t\t\t'wrapper_class' => 'no-ajax ' . $groups_template->group->status,\n\t\t\t\t'wrapper_id' => 'groupbutton-' . $groups_template->group->id,\n\t\t\t\t'link_href' => add_query_arg( 'redirect_to', bp_get_group_permalink( $groups_template->group ), bp_get_group_accept_invite_link( $groups_template->group ) ),\n\t\t\t\t'link_text' => __( 'Accept Invitation', 'altctrl-public-group' ),\n\t\t\t\t'link_title' => __( 'Accept Invitation', 'altctrl-public-group' ),\n\t\t\t\t'link_class' => 'group-button accept-invite',\n\t\t\t);\n\t\t} elseif ( $groups_template->group->is_pending ) {\n\t\t\t$button = array(\n\t\t\t\t'id' => 'membership_requested',\n\t\t\t\t'component' => 'groups',\n\t\t\t\t'must_be_logged_in' => true,\n\t\t\t\t'block_self' => false,\n\t\t\t\t'wrapper_class' => 'no-ajax pending ' . $groups_template->group->status,\n\t\t\t\t'wrapper_id' => 'groupbutton-' . $groups_template->group->id,\n\t\t\t\t'link_href' => bp_get_group_permalink( $groups_template->group ),\n\t\t\t\t'link_text' => __( 'Request Sent', 'altctrl-public-group' ),\n\t\t\t\t'link_title' => __( 'Request Sent', 'altctrl-public-group' ),\n\t\t\t\t'link_class' => 'group-button pending membership-requested',\n\t\t\t);\n\t\t} elseif ( ! is_super_admin() ) {\n\t\t\t$button = array(\n\t\t\t\t'id' => 'request_membership',\n\t\t\t\t'component' => 'groups',\n\t\t\t\t'must_be_logged_in' => true,\n\t\t\t\t'block_self' => false,\n\t\t\t\t'wrapper_class' => 'no-ajax ' . $groups_template->group->status,\n\t\t\t\t'wrapper_id' => 'groupbutton-' . $groups_template->group->id,\n\t\t\t\t'link_href' => wp_nonce_url( bp_get_group_permalink( $groups_template->group ) . 'request-membership', 'groups_request_membership' ),\n\t\t\t\t'link_text' => __( 'Request Membership', 'altctrl-public-group' ),\n\t\t\t\t'link_title' => __( 'Request Membership', 'altctrl-public-group' ),\n\t\t\t\t'link_class' => 'group-button request-membership',\n\t\t\t);\n\t\t}\n\n\t\treturn $button;\n\t}", "title": "" }, { "docid": "374197c1d994131b5b66812ab6bcffb7", "score": "0.55705076", "text": "public function htmlButtonGroups($identifier, $elements = array(), $asIcons = false) {\n\t\treturn $this->addHtmlComponent(new HtmlButtonGroups($identifier, $elements, $asIcons));\n\t}", "title": "" }, { "docid": "d732f2d5172be95ef72e87419c89560b", "score": "0.55251414", "text": "public function addButton(): PushButton {\n\t\treturn $this->m_add;\n\t}", "title": "" }, { "docid": "9c014ce96c5bec19dfb637e5d9028ab2", "score": "0.5502201", "text": "public function buttonGroup($name, array $collection, array $rowAttributes = array())\n {\n $selectedValue = $this->formFor->getValue($name);\n $content = '';\n foreach ($collection as $value => $text) {\n $btnAttributes = array(\n 'data-value' => $value,\n 'class' => 'btn btn-large' . ($value === $selectedValue ? ' active' : ''),\n );\n $content .= $this->formFor->button($name, $text, $btnAttributes);\n }\n\n $divAttributes = array(\n 'class' => 'btn-group masked-radio',\n 'data-toggle' => 'buttons-radio',\n 'data-field' => $name,\n );\n\n return $this->_row($name, Html::tag('div', $divAttributes, $content, false), $rowAttributes);\n }", "title": "" }, { "docid": "4e1849b97433643ec192e713d005f380", "score": "0.5485128", "text": "public function createGroup(Group $parentGroup = null);", "title": "" }, { "docid": "8c833763243585b5916b967085acc405", "score": "0.54809505", "text": "protected function add_add_buttons() {\n $mform = $this->_form;\n $buttonarray = array();\n $buttonarray[0] = $mform->createElement('submit', 'submitbutton', get_string('next', 'enrol_metabulk'));\n $buttonarray[1] = $mform->createElement('cancel');\n $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);\n $mform->closeHeaderBefore('buttonar');\n }", "title": "" }, { "docid": "7744696e848c075e398aa105f858ce7d", "score": "0.5467256", "text": "public function toGroup($method, $parameters)\n {\n\n// Disregards if the method isn't \"group\"\n if ($method != 'group') {\n return false;\n }\n\n // Create opener\n $group = new Form\\Group(\n $this->app,\n array_get($parameters, 0, null),\n array_get($parameters, 1, null)\n );\n\n // Set custom group as true\n Form\\Group::$opened = true;\n\n // Set custom group reference\n Form\\Group::$openGroup = $group;\n\n return $group;\n }", "title": "" }, { "docid": "31ca6cc3d0f363d0cc9b7be267e49574", "score": "0.544866", "text": "private function createButtonsTab()\n {\n $tab = $this->createTab(\n 'socialbuttons_tab',\n '__socialbuttons_tab__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 150]);\n\n $fieldSet1 = $this->createFieldSet(\n 'socialbutton-column1Field_set',\n '__socialbuttons_tab_column__',\n ['attributes' => $attributes]\n );\n\n $fieldSet1->addElement(\n $this->createTextField(\n 'emzSocialMediaFacebookLink',\n '__social_facebook_link__',\n '',\n ['attributes' => ['lessCompatible' => false]]\n )\n );\n\n $fieldSet1->addElement(\n $this->createTextField(\n 'emzSocialMediaInstagramLink',\n '__social_instagram_link__',\n '',\n ['attributes' => ['lessCompatible' => false]]\n )\n );\n\n $fieldSet1->addElement(\n $this->createTextField(\n 'emzSocialMediaTwitterLink',\n '__social_twitter_link__',\n '',\n ['attributes' => ['lessCompatible' => false]]\n )\n );\n\n $fieldSet1->addElement(\n $this->createTextField(\n 'emzSocialMediaPinterestLink',\n '__social_pinterest_link__',\n '',\n ['attributes' => ['lessCompatible' => false]]\n )\n );\n\n $fieldSet1->addElement(\n $this->createTextField(\n 'emzSocialMediaYoutubeLink',\n '__social_youtube_link__',\n '',\n ['attributes' => ['lessCompatible' => false]]\n )\n );\n\n $fieldSet1->addElement(\n $this->createTextField(\n 'emzSocialMediaGooglePlusLink',\n '__social_googleplus_link__',\n '',\n ['attributes' => ['lessCompatible' => false]]\n )\n );\n\n $tab->addElement($fieldSet1);\n\n return $tab;\n }", "title": "" }, { "docid": "1e2c308c3d7d849e3cd28ee6fdfe161d", "score": "0.5438793", "text": "public function createGroup()\n\t{\n\t\t// Check for the permission\n\t\trequirePermission(\"canAddGroups\");\n\n\t\t$data[\"title\"] = $this->input->post(\"title\");\n\n\t\tif(!$data['title'])\n\t\t{\n\t\t\tdie(\"UI.alert('The fields can\\'t be empty')\");\n\t\t}\n\n\t\t$this->items_model->addGroup($data);\n\n\t\t$this->cache->delete('store_items.cache');\n\n\t\t// Add log\n\t\t$this->logger->createLog('Added item group', $data[\"title\"]);\n\n\t\t$this->plugins->onCreateGroup($data['title']);\n\n\t\tdie('window.location.reload(true)');\n\t}", "title": "" }, { "docid": "59add16cab476bbec98d422999259466", "score": "0.5416608", "text": "function _createGroup()\n {\n global $_ARRAYLANG;\n\n if (isset($_POST['access_create_group'])) {\n $objFWUser = \\FWUser::getFWUserObject();\n if (!empty($_POST['access_group_type']) && in_array($_POST['access_group_type'], $objFWUser->objGroup->getTypes())) {\n $this->_modifyGroup();\n return;\n } else {\n self::$arrStatusMsg['error'][] = $_ARRAYLANG['TXT_ACCESS_SELECT_A_VALID_GROUP_TYPE'];\n }\n }\n\n $this->_objTpl->addBlockfile('ACCESS_GROUP_TEMPLATE', 'module_access_group_create', 'module_access_group_create.html');\n\n $this->_objTpl->setVariable(array(\n 'TXT_ACCESS_CREATE_GROUP' => $_ARRAYLANG['TXT_ACCESS_CREATE_GROUP'],\n 'TXT_ACCESS_CREATE_GROUP_TYPE_QUESTION' => $_ARRAYLANG['TXT_ACCESS_CREATE_GROUP_TYPE_QUESTION'],\n 'TXT_ACCESS_FRONTEND_DESC' => $_ARRAYLANG['TXT_ACCESS_FRONTEND_DESC'],\n 'TXT_ACCESS_BACKEND_DESC' => $_ARRAYLANG['TXT_ACCESS_BACKEND_DESC'],\n 'TXT_ACCESS_CANCEL' => $_ARRAYLANG['TXT_ACCESS_CANCEL'],\n 'TXT_ACCESS_NEXT' => $_ARRAYLANG['TXT_ACCESS_NEXT']\n ));\n\n $this->_pageTitle = $_ARRAYLANG['TXT_ACCESS_CREATE_NEW_USER_GROUP'];\n\n $this->_objTpl->parse('module_access_group_create');\n }", "title": "" }, { "docid": "6e2a5a982db5ace64a920c2c7dbb903e", "score": "0.53852767", "text": "public function addGroup($group);", "title": "" }, { "docid": "6e2a5a982db5ace64a920c2c7dbb903e", "score": "0.53852767", "text": "public function addGroup($group);", "title": "" }, { "docid": "39995cdabde6ee907ee024c4fe036ab7", "score": "0.53707737", "text": "function groups_register_profile_buttons($group) {\n\n\t$actions = array();\n\n\t// group owners\n\tif ($group->canEdit()) {\n\t\t// edit and invite\n\t\t$url = elgg_get_site_url() . \"groups/edit/{$group->getGUID()}\";\n\t\t$actions[$url] = 'groups:edit';\n\t\t$url = elgg_get_site_url() . \"groups/invite/{$group->getGUID()}\";\n\t\t$actions[$url] = 'groups:invite';\n\t}\n\n\t// group members\n\tif ($group->isMember(elgg_get_logged_in_user_entity())) {\n\t\tif ($group->getOwnerGUID() != elgg_get_logged_in_user_guid()) {\n\t\t\t// leave\n\t\t\t$url = elgg_get_site_url() . \"action/groups/leave?group_guid={$group->getGUID()}\";\n\t\t\t$url = elgg_add_action_tokens_to_url($url);\n\t\t\t$actions[$url] = 'groups:leave';\n\t\t}\n\t} elseif (elgg_is_logged_in()) {\n\t\t// join - admins can always join.\n\t\t$url = elgg_get_site_url() . \"action/groups/join?group_guid={$group->getGUID()}\";\n\t\t$url = elgg_add_action_tokens_to_url($url);\n\t\tif ($group->isPublicMembership() || $group->canEdit()) {\n\t\t\t$actions[$url] = 'groups:join';\n\t\t} else {\n\t\t\t// request membership\n\t\t\t$actions[$url] = 'groups:joinrequest';\n\t\t}\n\t}\n\n\tif ($actions) {\n\t\tforeach ($actions as $url => $text) {\n\t\t\telgg_register_menu_item('title', array(\n\t\t\t\t'name' => $text,\n\t\t\t\t'href' => $url,\n\t\t\t\t'text' => elgg_echo($text),\n\t\t\t\t'link_class' => 'elgg-button elgg-button-action',\n\t\t\t));\n\t\t}\n\t}\n}", "title": "" }, { "docid": "f4fd213fca281b86a90ee7d79b532d7e", "score": "0.53575057", "text": "public function create()\n {\n Breadcrumbs::register('admin-group-create', function ($breadcrumbs) {\n $breadcrumbs->parent('admin-group');\n $breadcrumbs->push('添加用户组', route('admin.group.create'));\n });\n\n return view('admin.rbac.groups.create');\n }", "title": "" }, { "docid": "3694a5b73f02d663d9dec93a44a5318f", "score": "0.5346341", "text": "public function create()\n {\n $breadcrumb = array();\n return view('admin.group.create')\n ->with('page_title','Groups')\n ->with('breadcrumb',$this->breadcrumb)\n ->with('listing',$this->listing);\n }", "title": "" }, { "docid": "aa3686c8c09405d0fe68684daf91ee6e", "score": "0.53283346", "text": "public function createFieldInGroup()\n {\n // Gather commands\n $commands = array();\n\n // Find field groups\n $groups = craft()->fields->getAllGroups();\n if ($groups) {\n foreach ($groups as $group) {\n $commands[] = array(\n 'name' => $group->name,\n 'url' => UrlHelper::getUrl('settings/fields/new?groupId=' . $group->id)\n );\n }\n }\n\n return $commands;\n }", "title": "" }, { "docid": "3a75841e646be95177336ad0b6665a56", "score": "0.5326143", "text": "function register_new_button($buttons)\n {\n array_push($buttons, $this->btn_arr[\"Seperator\"], $this->btn_arr[\"Name\"]);\n return $buttons;\n }", "title": "" }, { "docid": "a400a0a142e3995e8fe29606dc5d797f", "score": "0.53116447", "text": "function addGroup($key, $caption='', $link='')\n\t{\n\t\tif(! array_key_exists($key, $this->_toolbar))\n\t\t{\n\n\t \t$newGroup\t= new stdClass();\n\t\t\t$newGroup->caption\t= $caption;\n\t\t\t$newGroup->link\t\t= $link;\n\t\t\t$newGroup->view\t\t= array();\n\t\t\t$newGroup->child\t= array(\n\t\t\t\t\t\t\t\t\t'prepend'\t=> array(),\n\t\t\t\t\t\t\t\t\t'append'\t=> array()\n\t\t\t\t\t\t\t\t\t);\n\t\t\n\t\t\t$this->_toolbar[strtoupper($key)]\t= $newGroup;\n\t\t}\n\t}", "title": "" }, { "docid": "c84eb379c7c5bd2d911f45c00aaa7b6e", "score": "0.5308316", "text": "function Group()\r\n {\r\n\r\n }", "title": "" }, { "docid": "53be5075ed8e7f77fe6e788ffeed1542", "score": "0.5288197", "text": "protected function getGroupButtonToolbarRenderer(Group $group)\n {\n $buttonToolbar = new ButtonToolBar();\n\n $courseManagementRights = CourseManagementRights::getInstance();\n\n $isAllowed = $courseManagementRights->is_allowed_for_platform_group(\n CourseManagementRights::TEACHER_DIRECT_SUBSCRIBE_RIGHT,\n $group->getId(),\n $this->get_course_id());\n\n if (! $this->isGroupSubscribed($group->getId()) && ($this->getUser()->is_platform_admin() || $isAllowed))\n {\n $buttonToolbar->addItem(\n new Button(\n $this->getTranslation('SubscribeGroup'),\n '',\n $this->get_url(\n array(\n self::PARAM_ACTION => self::ACTION_SUBSCRIBE_GROUPS,\n self::PARAM_OBJECTS => $group->getId())),\n ToolbarItem::DISPLAY_ICON_AND_LABEL,\n false,\n 'btn-success'));\n }\n\n return new ButtonToolBarRenderer($buttonToolbar);\n }", "title": "" }, { "docid": "cfa905572451dced27a22bb9799856be", "score": "0.52820265", "text": "public function getGroupCreateHelper()\n {\n return new AdminGroupCreateHelper();\n }", "title": "" }, { "docid": "1b4cbcf7aa60b92a341f92609715f10b", "score": "0.52802724", "text": "public static function create($group) {\n return new static($group);\n }", "title": "" }, { "docid": "81b67700773a64cfc07439fe24a30a60", "score": "0.52782744", "text": "public function tabGroup($options = [])\n {\n $element = new TabGroup();\n $element->addOptions($options);\n $this->add($element);\n $this->open($element);\n return $this;\n }", "title": "" }, { "docid": "56d1094f628612bb6b4405cdce4c2a0b", "score": "0.52506983", "text": "public function actionCreateGroup() {\n $model = new Group;\n if (isset($_POST['Group'])) {\n $model->attributes = $_POST['Group'];\n $model->user_id = Yii::app()->user->id;\n if ($model->save()) {\n if (isset($_POST['GroupUser'])) {\n foreach ($_POST['GroupUser']['user_id'] as $i => $gu) {\n $model_user = new GroupUser;\n $model_user->user_id = $gu;\n $model_user->connection_id = $_POST['GroupUser']['connection_id'][$i];\n $model_user->group_id = $model->id;\n $model_user->role = 1; //admin\n $model_user->save(false);\n }\n }\n if (isset($_POST['GroupInvitee'])) {\n foreach ($_POST['GroupInvitee']['user_id'] as $i => $gu) {\n $model_invitee = new GroupInvitee;\n $model_invitee->user_id = $gu;\n $model_invitee->group_id = $model->id;\n $model_invitee->save(false);\n }\n }\n Yii::app()->user->setFlash(\"done\", \"Your group has been created successfully.\");\n $this->redirect(array('editGroup', 'id' => $model->id));\n }\n }\n $this->render('group-form', array('model' => $model, 'model_users' => array(), 'model_invitee' => array()));\n }", "title": "" }, { "docid": "08ab6ea0b8670e54ca9b3dc555704cb1", "score": "0.52075547", "text": "public function create() {\r\n\t\tif(!$this->Accounts_model->checkLogin())\r\n\t\t\treturn;\r\n\r\n\t\t// Check for button POST data\r\n\t\tif($this->input->post('submit_create_group')) {\r\n\t\t\t// Rules\r\n\t\t\t$this->form_validation->set_rules('group_name', 'Group Name', 'trim|required|min_length[1]|max_length[32]|alpha_dash');\r\n\t\t\t$this->form_validation->set_rules('parent_group_dropdown', 'Parent Group', 'trim|required|is_natural');\r\n\t\t\t\r\n\t\t\tif($this->form_validation->run() == FALSE) {\r\n\t\t\t\t$this->session->set_flashdata('error_message', validation_errors());\r\n\t\t\t\tredirect('groups');\r\n\t\t\t} else {\r\n\t\t\t\t// Add group to the database\r\n\t\t\t\t$group_id = $this->Groups_model->createGroup($this->input->post('group_name'), $this->input->post('parent_group_dropdown'), $this->session->userdata('account_id'));\r\n\t\t\t\tif($group_id == 0) {\r\n\t\t\t\t\t// Add to db failed\r\n\t\t\t\t\t$this->session->set_flashdata('error_message', 'Could not add group to database');\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Redirect to view page\r\n\t\t\t\t\t$this->session->set_flashdata('status_message', 'Group has been created successfully');\r\n\t\t\t\t\tredirect('groups/view/' . $group_id);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->session->set_flashdata('error_message', 'You must fill in the form to create a group!');\r\n\t\t}\r\n\t\t\r\n\t\t// Send them to the groups page:\r\n\t\tredirect('groups');\r\n\t}", "title": "" }, { "docid": "d06ea13de3febd3685ede2cb4e67c166", "score": "0.5207305", "text": "public function actionCreate()\n {\n $model = new GroupsForm();\n $isNewRecord = true;\n $project_id = Yii::$app->request->get('project_id');\n $model->project_id = isset($project_id) ? $project_id : null;\n\n if ($model->load(Yii::$app->request->post())) {\n $groupModel = $model->save();\n return $this->redirect(['view', 'id' => $groupModel->id]);\n } else {\n return $this->render('groups', [\n 'model' => $model,\n 'isNewRecord' => $isNewRecord,\n ]);\n }\n }", "title": "" }, { "docid": "39d52f21fef0b75f2ee1b04aab5bf155", "score": "0.51963395", "text": "public function actionCreate()\n {\n $model = $this->propertyGroupService->getForm();\n\n if ($model->load(App::$app->request->post()) && $model->validate()) {\n $propertyGroup = $this->propertyGroupService->save($model);\n App::$app->getSession()->setFlash('success', Yii::t('catalog', 'Properties group successful created'));\n\n if (!App::$app->request->post('here-btn')) {\n return $this->redirect(['index']);\n } else {\n return $this->redirect(['update', 'id' => $propertyGroup->id]);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "63f0e88a7771e80925e6fc5fa6ac1cfb", "score": "0.51956916", "text": "public function getGroup() {\n\t\treturn new Group($this->group);\n\t}", "title": "" }, { "docid": "673fff3fbdddac6b916e69ec38605b59", "score": "0.51947397", "text": "public function can_make_new_group()\n {\n $group = 'test-group';\n\n $instance = Asset::make($group);\n\n $this->assertNotNull(Asset::get($group));\n $this->assertNotNull($instance);\n\n $this->assertEmpty(Asset::get($group)->css());\n $this->assertEmpty($instance->css());\n\n $this->assertEmpty(Asset::get($group)->js());\n $this->assertEmpty($instance->js());\n }", "title": "" }, { "docid": "88e4339b37ea1eebdb52e374d641d8b6", "score": "0.5186289", "text": "public function buttonGroup($options, \\Closure $c)\n {\n list($classes, $id, $attributes) = $this->parseStandardOptions($options, 'btn-group', true);\n\n $output = \"<div {$classes} {$id} {$attributes}>\\n\";\n\n $output .= $this->runClosure($c);\n\n $output .= \"</div>\\n\";\n\n return $output;\n }", "title": "" }, { "docid": "1b3ad3d5defd4f6856f1a2e4b84bafd7", "score": "0.5177578", "text": "public function create()\n {\n $comboPlaces = Place::toCombo();\n \n return view('groups.create', compact('group', 'comboPlaces'));\n }", "title": "" }, { "docid": "b1e2aa722ccbb1767b9bb18d3e25d5ea", "score": "0.5171964", "text": "public function create()\n {\n return view('menuBuilder::group.create');\n }", "title": "" }, { "docid": "1eb8c3c26ebad1b237a1762daf5ea934", "score": "0.5160303", "text": "public function lblGroupId_Create($strControlId = null) {\n\t\t\t$this->lblGroupId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblGroupId->Name = QApplication::Translate('Group');\n\t\t\t$this->lblGroupId->Text = ($this->objSmartGroup->Group) ? $this->objSmartGroup->Group->__toString() : null;\n\t\t\t$this->lblGroupId->Required = true;\n\t\t\treturn $this->lblGroupId;\n\t\t}", "title": "" }, { "docid": "02445f9cba15c9d37f0faac0ba61fe97", "score": "0.51487887", "text": "public function lblGroupId_Create($strControlId = null) {\n\t\t\t$this->lblGroupId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblGroupId->Name = QApplication::Translate('Group');\n\t\t\t$this->lblGroupId->Text = ($this->objSmsMessage->Group) ? $this->objSmsMessage->Group->__toString() : null;\n\t\t\t$this->lblGroupId->Required = true;\n\t\t\treturn $this->lblGroupId;\n\t\t}", "title": "" }, { "docid": "7a08554580b92c8247c4ec6b1c7824d8", "score": "0.51425123", "text": "public function renderButtonGroup($body)\n {\n // Get all hidden inputs <input type=\"hidden\" ...>\n $inputs = [];\n if (preg_match_all('/<input\\s+([^>]*)>/i', $body, $inputmatches, PREG_SET_ORDER)) {\n foreach ($inputmatches as $inputmatch) {\n $body = str_replace($inputmatch[0], '', $body);\n if (preg_match('/\\s+type\\s*=\\s*[\\'\"]hidden[\\'\"]/i', $inputmatch[0])) { // Match type='hidden'\n $inputs[] = $inputmatch[0];\n }\n }\n }\n // Get all buttons <div class=\"btn-group ...\">...</div>\n $btns = [];\n if (preg_match_all('/<div\\s+class\\s*=\\s*[\\'\"]btn-group([^\\'\"]*)[\\'\"]([^>]*)>([\\s\\S]*?)<\\/div\\s*>/i', $body, $btnmatches, PREG_SET_ORDER)) {\n foreach ($btnmatches as $btnmatch) {\n $body = str_replace($btnmatch[0], '', $body);\n $btns[] = $btnmatch[0];\n }\n }\n $links = '';\n // Get all links/buttons <a ...>...</a> and <button ...>...</button>\n if (preg_match_all('/<(a|button)([^>]*)>([\\s\\S]*?)<\\/(a|button)\\s*>/i', $body, $matches, PREG_SET_ORDER)) {\n foreach ($matches as $match) {\n $tag = $match[1];\n if (preg_match('/\\s+class\\s*=\\s*[\\'\"]([\\s\\S]*?)[\\'\"]/i', $match[2], $submatches)) { // Match class='class'\n $class = $submatches[1];\n $attrs = str_replace($submatches[0], '', $match[2]);\n } else {\n $class = '';\n $attrs = $match[2];\n }\n $caption = $match[3];\n PrependClass($class, 'btn btn-default'); // Prepend button classes\n if ($this->ButtonClass != \"\") {\n AppendClass($class, $this->ButtonClass);\n }\n $attrs = ' class=\"' . $class . '\" ' . $attrs;\n $link = '<' . $tag . $attrs . '>' . $caption . '</' . $tag . '>';\n $links .= $link;\n }\n }\n if ($links != \"\") {\n $btngroup = '<div class=\"btn-group btn-group-sm ew-btn-group\">' . $links . '</div>';\n } else {\n $btngroup = \"\";\n }\n foreach ($btns as $btn) {\n $btngroup .= $btn;\n }\n foreach ($inputs as $input) {\n $btngroup .= $input;\n }\n return $btngroup;\n }", "title": "" }, { "docid": "a1e65cc75f865b64004e2462cd8abc37", "score": "0.511829", "text": "public function groupCreate() {\n\n $this->form_validation->set_rules('Name', 'Name', 'required');\n\n if (!empty($_POST)) {\n if ($this->form_validation->run($this) == FALSE) {\n showMessage(validation_errors(), '', 'r');\n } else {\n\n $sql = \"INSERT INTO shop_rbac_group (type, name) VALUES(\" . $this->db->escape($_POST['type']) . \",\" . $this->db->escape($_POST['Name']) . \")\";\n $this->db->query($sql);\n\n $idNewGroup = $this->db->insert_id();\n\n $sql = \"INSERT INTO shop_rbac_group_i18n (id, description, locale) VALUES(\" . $idNewGroup . \", \" . $this->db->escape($_POST['Description']) . \", '\" . MY_Controller::getCurrentLocale() . \"' ) \";\n\n $this->db->query($sql);\n\n if ($_POST['Privileges']) {\n $idPrivilege = implode(',', $_POST['Privileges']);\n $sql = \"UPDATE shop_rbac_privileges SET group_id = \" . $idNewGroup . \" WHERE id IN(\" . $idPrivilege . \")\";\n $this->db->query($sql);\n }\n\n showMessage('Группа создана');\n if ($_POST['action'] == 'tomain')\n pjax('/admin/rbac/groupEdit/' . $idNewGroup);\n if ($_POST['action'] == 'tocreate')\n pjax('/admin/rbac/groupCreate');\n if ($_POST['action'] == 'toedit')\n pjax('/admin/rbac/groupEdit/' . $idNewGroup);\n }\n } else {\n\n $sqlModel = 'SELECT SRP.id, SRP.name, SRP.group_id, SRPI.title, SRPI.description\n FROM shop_rbac_privileges SRP\n INNER JOIN shop_rbac_privileges_i18n SRPI ON SRPI.id = SRP.id WHERE SRPI.locale = \"' . MY_Controller::getCurrentLocale() . '\" ORDER BY SRP.name ASC';\n $model = $this->db->query($sqlModel);\n\n $this->template->add_array(array(\n 'model' => $model,\n 'privileges' => $model->result(),\n ));\n\n $this->template->show('groupCreate', FALSE);\n }\n }", "title": "" }, { "docid": "7532511643a2bc2dae64f01bd64f8a3d", "score": "0.5114108", "text": "public function create()\n {\n //\n return view('admin.home.add_groups');\n }", "title": "" }, { "docid": "db1b6e52ce64fc516408b2942411812e", "score": "0.5107523", "text": "public function create()\n {\n return view('admin.item-groups.create');\n }", "title": "" }, { "docid": "df301d534e4dda4e9b084b09d3b0215b", "score": "0.5102496", "text": "function CreateButtons($flags=null){}", "title": "" }, { "docid": "479d728ef0ad36c8e871fcc48facd5bf", "score": "0.5100237", "text": "public function lstGroup_Create($strControlId = null, QQCondition $objCondition = null, $objOptionalClauses = null) {\n\t\t\t$this->lstGroup = new QListBox($this->objParentObject, $strControlId);\n\t\t\t$this->lstGroup->Name = QApplication::Translate('Group');\n\t\t\t$this->lstGroup->Required = true;\n\t\t\tif (!$this->blnEditMode)\n\t\t\t\t$this->lstGroup->AddItem(QApplication::Translate('- Select One -'), null);\n\n\t\t\t// Setup and perform the Query\n\t\t\tif (is_null($objCondition)) $objCondition = QQ::All();\n\t\t\t$objGroupCursor = Group::QueryCursor($objCondition, $objOptionalClauses);\n\n\t\t\t// Iterate through the Cursor\n\t\t\twhile ($objGroup = Group::InstantiateCursor($objGroupCursor)) {\n\t\t\t\t$objListItem = new QListItem($objGroup->__toString(), $objGroup->Id);\n\t\t\t\tif (($this->objSmartGroup->Group) && ($this->objSmartGroup->Group->Id == $objGroup->Id))\n\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t$this->lstGroup->AddItem($objListItem);\n\t\t\t}\n\n\t\t\t// Return the QListBox\n\t\t\treturn $this->lstGroup;\n\t\t}", "title": "" }, { "docid": "ba474c22394e483c39fb5729a120e010", "score": "0.50947607", "text": "public static final function createButton() \n\t{\n\t\treturn self::createElement('button');\n\t}", "title": "" }, { "docid": "85ce8ba0626f3043f833d55d2fc536ab", "score": "0.5091091", "text": "function createGroup($options){\n $url=$this->url.'chatgroups';\n $header=array($this->getToken());\n $body=json_encode($options);\n $result=$this->postCurl($url, $body, $header);\n return $result;\n }", "title": "" }, { "docid": "5f515e3a8aaa9c5ea08b4d7bda3fd4c8", "score": "0.5090049", "text": "function button_radio_group($btns, $active = array(), $prefix = '', $main_params = array()){\n\t$ci =& get_instance();\n\n\t$classes = isset($main_params['classes']) ? $main_params['classes'] : array();\n\t$classes[] = 'btn-group';\n\n\t$output = '<div class=\"' . implode(' ', $classes) . '\" data-toggle=\"buttons-radio\">';\n\tforeach($btns as $key => $params){\n\t\t$classes = array();\n\t\tif ($key === $active){\n\t\t\t$classes[] = 'active';\n\t\t}\n\t\t$btn_params = array(\n\t\t\t'id' => $prefix . '-' . $key,\n\t\t\t'data-key' => $key,\n\t\t\t'class' => 'btn ' . implode(' ', $classes),\n\t\t);\n\n\t\t// set label\n\t\tif (isset($params['label'])){\n\t\t\t$label = $ci->lang->line($params['label']) ? $ci->lang->line($params['label']) : $params['label'];\n\t\t}else{\n\t\t\t$label = $ci->lang->line($key) ? $ci->lang->line($key) : $key;\n\t\t}\n\n\t\tif (isset($params['icon']) && isset($main_params['no_label']) && $main_params['no_label'] === true){\n\t\t\t$btn_params['rel'] = 'tooltip';\n\t\t\t$btn_params['title'] = $label;\n\t\t\t$btn_params['data-placement'] = 'bottom';\n\t\t\t$label = '<i class=\"' . $params['icon'] . '\"></i>';\n\t\t}else if (isset($params['icon'])){\n\t\t\tif (isset($main_params['responsive']) && $main_params['responsive'] === true){\n\t\t\t\t$label = '<i class=\"' . $params['icon'] . '\"></i><span class=\"hidden-phone\">' . nbs() . $label . '</span>';\n\t\t\t}else{\n\t\t\t\t$label = '<i class=\"' . $params['icon'] . '\"></i>' . nbs() . $label;\n\t\t\t}\n\t\t}\n\n\t\t$btn_params['content'] = $label;\n\t\t$output .= form_button($btn_params);\n\t}\n\t$output .= '</div>';\n\treturn $output;\n}", "title": "" }, { "docid": "6c4a466d846acd1c8c0b559fbada097f", "score": "0.5069831", "text": "function createAdGroup($campaign_id, $adGroup_name, $bid, $status)\r\n{\r\n global $session;\r\n global $campaign_id;\r\n $id = AddAdGroup::run(new AdWordsServices(), $session, $campaign_id, $adGroup_name, $bid, $status);\r\n return $id;\r\n}", "title": "" }, { "docid": "4085b165c102cd1283e3af12dc4a9234", "score": "0.5066383", "text": "protected function getButtonToolbarRenderer()\n {\n if (! isset($this->buttonToolbarRenderer))\n {\n $buttonToolbar = new ButtonToolBar($this->get_url());\n $commonActions = new ButtonGroup();\n \n $commonActions->addButton(\n new Button(\n Translation::get('Create', null, Utilities::COMMON_LIBRARIES), \n Theme::getInstance()->getCommonImagePath('Action/Create'), \n $this->get_url(array(self::PARAM_ACTION => self::ACTION_CREATE))));\n \n $buttonToolbar->addButtonGroup($commonActions);\n $this->buttonToolbarRenderer = new ButtonToolBarRenderer($buttonToolbar);\n }\n \n return $this->buttonToolbarRenderer;\n }", "title": "" }, { "docid": "1f40c3286ea99ca2fc2fcb4ed7fa3c81", "score": "0.50633776", "text": "public function lstGroup_Create($strControlId = null, QQCondition $objCondition = null, $objOptionalClauses = null) {\n\t\t\t$this->lstGroup = new QListBox($this->objParentObject, $strControlId);\n\t\t\t$this->lstGroup->Name = QApplication::Translate('Group');\n\t\t\t$this->lstGroup->Required = true;\n\t\t\tif (!$this->blnEditMode)\n\t\t\t\t$this->lstGroup->AddItem(QApplication::Translate('- Select One -'), null);\n\n\t\t\t// Setup and perform the Query\n\t\t\tif (is_null($objCondition)) $objCondition = QQ::All();\n\t\t\t$objGroupCursor = Group::QueryCursor($objCondition, $objOptionalClauses);\n\n\t\t\t// Iterate through the Cursor\n\t\t\twhile ($objGroup = Group::InstantiateCursor($objGroupCursor)) {\n\t\t\t\t$objListItem = new QListItem($objGroup->__toString(), $objGroup->Id);\n\t\t\t\tif (($this->objSmsMessage->Group) && ($this->objSmsMessage->Group->Id == $objGroup->Id))\n\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t$this->lstGroup->AddItem($objListItem);\n\t\t\t}\n\n\t\t\t// Return the QListBox\n\t\t\treturn $this->lstGroup;\n\t\t}", "title": "" }, { "docid": "a43bc1ab0c025936e18170d34fe292a3", "score": "0.5060474", "text": "protected function addContentBlockGroup()\n {\n /** @var ContentBlockGroupInterface $group */\n $group = $this->contentBlockGroupInterfaceFactory->create();\n $group->setCode('fisheye')\n ->setName('Fisheye')\n ->setIcon('<i class=\"fa fa-chevron-down\"></i>')\n ->setSortOrder('50');\n $this->contentBlockGroupRepository->save($group);\n }", "title": "" }, { "docid": "5c1730588600b3de457b371fdb7449b9", "score": "0.50347453", "text": "public function create()\n {\n return view('dashboard.admin.addgroup');\n }", "title": "" }, { "docid": "a7227e42f6b6ed583648366428de7e28", "score": "0.50312185", "text": "public function addAction()\n\t{\n\t\t$form\t= $this->getGroupForm();\n\t\t$group\t= new Group();\n\t\t/** @var Request $request */\n\t\t$request= $this->getRequest();\n\t\t$flashMessenger = $this->flashMessenger();\n\n\t\t$form->bind($group);\n\n\t\tif ($request->isPost()) {\n\t\t\t$form->setData($request->getPost());\n\n\t\t\tif ($form->isValid()) {\n//\t\t\t\t$group->exchangeArray($form->getData());\n\n\t\t\t\ttry {\n\t\t\t\t\t$storageData= $form->getData(FormInterface::VALUES_AS_ARRAY);\n\t\t\t\t\t$idGroup\t = $this->getTable()->save($storageData);\n\n\t\t\t\t\t$flashMessenger->addSuccessMessage($this->translate('saved_group'));\n\n\t\t\t\t\treturn $this->redirectTo('edit', $idGroup);\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\t$flashMessenger->addErrorMessage($e->getMessage());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$flashMessenger->addErrorMessage($this->translate('form_invalid'));\n\t\t\t}\n\t\t}\n\n\t\t$form->setAttribute('action', $this->makeUrl('group', 'add'));\n\n\t\treturn $this->getAjaxView(array(\n\t\t\t'form' \t\t=> $form,\n\t\t\t'lockLists'\t=> array(),\n\t\t\t'title'\t\t=> $this->translate('group_add', 'Libadmin'),\n\t\t), 'libadmin/group/edit');\n\t}", "title": "" }, { "docid": "24de2729d5a5aa5416193cf63481d871", "score": "0.5026579", "text": "public function create()\n {\n return view('back_end.group.create');\n }", "title": "" }, { "docid": "025f176072b8e677dd7014c6251ffc06", "score": "0.50241673", "text": "function pl_buttongroup_shortcode( $atts, $content = null ) {\n\n\t\t$content = str_replace( '<br />', '', str_replace( '<br>', '', $content ) );\n\n \treturn sprintf( '<div class=\"btn-group\">%s</div>', do_shortcode( $content ) );\n\n\t}", "title": "" }, { "docid": "99ced7258700ba32a4269ff9bee39258", "score": "0.5016371", "text": "public function addGroupBy($groupBy){\n\t\t$this->groupBy[]=$groupBy;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7bdedd0e6682632eff884d7d1492b0e4", "score": "0.50160646", "text": "public function setGroup( $group ) {\n\t\t$this->groups->append( $group );\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "db9ddf161c5da6701556eb8292cd706a", "score": "0.5013877", "text": "public function add_group()\n\t{\n\t\tif($this->CI->input->post('name') == FALSE)\n\t\t{\n\t\t\tshow_error('You must have a name for your new group!');\n\t\t\treturn false;\n\t\t}\n\n\t\t$name = $this->CI->input->post('name');\n\n\t\t//Add group\n\t\t$this->CI->db->set(\"name\", $name)->insert('group');\n\n\t\t//Get the groupid of the latest group\n\t\t$res = $this->CI->db->select('MAX(id) as id')\n\t\t\t\t->from('group')\n\t\t\t\t->get();\n\n\t\t$row = $res->row();\n\t\t$g_id = $row->id;\n\n\t\t//Set that user as the admin of that group\n\t\t$this->CI->db->set('group_id', $g_id)\n\t\t\t->set('user_id', $this->CI->session->userdata('uid'))\n\t\t\t->set('is_admin', 1)\n\t\t\t->insert('group_users_link');\n\n\t}", "title": "" }, { "docid": "fd05f7adafb1f5d2ed8ebad0ca677e85", "score": "0.50117576", "text": "public function addNewGroup() {\n global $Db;\n\n $sql = \"INSERT INTO groups (group_name, company_id)\n VALUES (\n '$this->group_name',\n $this->company_id\n )\";\n\n $Db->query($sql);\n\n $get_last_insert = \"SELECT group_id FROM groups ORDER BY group_id DESC LIMIT 1\";\n $req = $Db->query($get_last_insert);\n $res = $req->fetch();\n return($res['group_id']);\n\n }", "title": "" }, { "docid": "742e0376cc8f65119c0ac87ad8479ea7", "score": "0.5006457", "text": "function _group()\n {\n global $_ARRAYLANG;\n\n $this->_objTpl->loadTemplatefile('module_access_group.html');\n\n $this->_objTpl->setVariable(array(\n 'TXT_ACCESS_OVERVIEW' => $_ARRAYLANG['TXT_ACCESS_OVERVIEW'],\n 'TXT_ACCESS_CREATE_NEW_USER_GROUP' => $_ARRAYLANG['TXT_ACCESS_CREATE_NEW_USER_GROUP']\n ));\n\n switch ($_REQUEST['tpl']) {\n case 'create':\n $this->_createGroup();\n break;\n\n case 'modify':\n $this->_modifyGroup();\n break;\n\n case 'changeStatus':\n $this->changeGroupStatus();\n break;\n\n case 'delete':\n $this->_deleteGroup();\n break;\n\n default:\n $this->_groupList();\n break;\n }\n }", "title": "" }, { "docid": "f9bce015e8c14f69973ba1c072500755", "score": "0.49989983", "text": "public function ItemGroup(Request $request){\n\n\t\t$title = 'Add Item Group';\n\n\t\t$itemgroup_code = $request->old('itemgroup_code');\n\t\t$itemgroup_name = $request->old('itemgroup_name');\n\t\t$itemgroup_id = $request->old('id');\n\t\t$group_block = $request->old('group_block');\n\n\t\t$button='Save';\n\n \t$action='/form-itemgroup-save';\n\n\t\treturn view('admin.item_group',compact('title','itemgroup_code','itemgroup_name','itemgroup_id','group_block','action','button'));\n\n\t}", "title": "" }, { "docid": "8d14a1d19c6345224fb4a99da9fbf540", "score": "0.49906495", "text": "protected function createGroup($group): void\n\t{\n\t\tif (!$this->componentGroups->has($group)) {\n\t\t\t$response = $this->managementClient->post('spaces/'.config('storyblok.space_id').'/component_groups', [\n\t\t\t\t'component_group' => [\n\t\t\t\t\t'name' => $group\n\t\t\t\t]\n\t\t\t]);\n\t\t\t$this->componentGroups = $this->componentGroups->merge(collect($response->getBody())->keyBy('name'));\n\n\t\t\t$this->command->info('Created group: ' . $group);\n\t\t} else {\n\t\t\t$this->command->warn($group. 'component group already exists');\n\t\t}\n\t}", "title": "" }, { "docid": "63293a2d9bf2cec0ff27eb24efd7aaac", "score": "0.49894258", "text": "function AddButton($button_id, $label, wxBitmap $bitmap, $help_string, wxRibbonButtonKind $kind=null, $button_id, $label, wxBitmap $bitmap, wxBitmap $bitmap_small=null, wxBitmap $bitmap_disabled=null, wxBitmap $bitmap_small_disabled=null, wxRibbonButtonKind $kind=null, $help_string=wxEmptyString){}", "title": "" }, { "docid": "d45e3826b97d40931f7354d613a3711f", "score": "0.4978372", "text": "public function buildDomainGroupObject(PSGroup $psGroup)\n\t{\n\t\t$group = new Group(array(\n\t\t\t'parentId' => $psGroup->parentId\n\t\t));\n\t\t\n\t\treturn $group;\t\t\n\t}", "title": "" }, { "docid": "b5f401022d45500191d78a18f3a68a93", "score": "0.4970407", "text": "public function create_group()\n\t{\n\t\t$this->data['title'] = $this->lang->line('create_group_title');\n\n\t\tif (!$this->xannia_auth->logged_in() || !$this->xannia_auth->is_admin())\n\t\t{\n\t\t\tredirect('auth', 'refresh');\n\t\t}\n\n\t\t// validate form input\n\t\t$this->form_validation->set_rules('group_name', $this->lang->line('create_group_validation_name_label'), 'trim|required|alpha_dash');\n\n\t\tif ($this->form_validation->run() === TRUE)\n\t\t{\n\t\t\t$new_group_id = $this->xannia_auth->create_group($this->input->post('group_name'), $this->input->post('description'));\n\t\t\tif ($new_group_id)\n\t\t\t{\n\t\t\t\t// check to see if we are creating the group\n\t\t\t\t// redirect them back to the admin page\n\t\t\t\t$this->session->set_flashdata('message', $this->xannia_auth->messages());\n\t\t\t\tredirect(\"auth\", 'refresh');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// display the create group form\n\t\t\t// set the flash data error message if there is one\n\t\t\t$this->data['message'] = (validation_errors() ? validation_errors() : ($this->xannia_auth->errors() ? $this->xannia_auth->errors() : $this->session->flashdata('message')));\n\n\t\t\t$this->data['group_name'] = array(\n\t\t\t\t'name' => 'group_name',\n\t\t\t\t'id' => 'group_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('group_name'),\n\t\t\t);\n\t\t\t$this->data['description'] = array(\n\t\t\t\t'name' => 'description',\n\t\t\t\t'id' => 'description',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('description'),\n\t\t\t);\n\n\t\t\t$this->_render_page('auth/create_group', $this->data);\n\t\t}\n\t}", "title": "" }, { "docid": "2f72c47a2eee0a1f59625a3a89400062", "score": "0.4966028", "text": "function comparaison_add_group($newgroupname, $courseid) {\n $newgroup = new stdClass();\n $newgroup->name = $newgroupname;\n $newgroup->courseid = $courseid;\n $newgroup->lang = current_language();\n return groups_create_group($newgroup);\n}", "title": "" }, { "docid": "b6f1635334735802345ffb23729bad55", "score": "0.4961043", "text": "public function actionCreate()\n {\n $model = new Group();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "c335f95afc8ef46abe306ac1ff628123", "score": "0.4960348", "text": "public function actionCreate()\n {\n $request = Yii::app()->request;\n $notify = Yii::app()->notify;\n $group = new CampaignGroup();\n\n $group->customer_id = (int)Yii::app()->customer->getId();\n\n if ($request->isPostRequest && ($attributes = (array)$request->getPost($group->modelName, array()))) {\n $group->attributes = $attributes;\n $group->customer_id = Yii::app()->customer->getId();\n if (!$group->save()) {\n $notify->addError(Yii::t('app', 'Your form has a few errors, please fix them and try again!'));\n } else {\n $notify->addSuccess(Yii::t('app', 'Your form has been successfully saved!'));\n }\n\n Yii::app()->hooks->doAction('controller_action_save_data', $collection = new CAttributeCollection(array(\n 'controller'=> $this,\n 'success' => $notify->hasSuccess,\n 'group' => $group,\n )));\n\n if ($collection->success) {\n $this->redirect(array('campaign_groups/update', 'group_uid' => $group->group_uid));\n }\n }\n\n $this->setData(array(\n 'pageMetaTitle' => $this->data->pageMetaTitle . ' | '. Yii::t('campaigns', 'Create new group'),\n 'pageHeading' => Yii::t('campaigns', 'Create new campaign group'),\n 'pageBreadcrumbs' => array(\n Yii::t('campaigns', 'Campaigns') => $this->createUrl('campaigns/index'),\n Yii::t('campaigns', 'Groups') => $this->createUrl('campaign_groups/index'),\n Yii::t('app', 'Create new'),\n )\n ));\n\n $this->render('form', compact('group'));\n }", "title": "" }, { "docid": "39ba1707550c57b608299d2cf2915f78", "score": "0.49571472", "text": "public function actionCreate()\n {\n $model = new KpiGroup();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n $model->published = '1';\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "a967bc2eb41d407249a1930d722161fb", "score": "0.49483037", "text": "public function lblGrowthGroups_Create($strControlId = null, $strGlue = ', ') {\n\t\t\t$this->lblGrowthGroups = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lstGrowthGroups->Name = QApplication::Translate('Growth Groups');\n\t\t\t\n\t\t\t$objAssociatedArray = $this->objGrowthGroupStructure->GetGrowthGroupArray();\n\t\t\t$strItems = array();\n\t\t\tforeach ($objAssociatedArray as $objAssociated)\n\t\t\t\t$strItems[] = $objAssociated->__toString();\n\t\t\t$this->lblGrowthGroups->Text = implode($strGlue, $strItems);\n\t\t\treturn $this->lblGrowthGroups;\n\t\t}", "title": "" }, { "docid": "92e2c0d8ef784747e30cc6f09f78c64d", "score": "0.49465", "text": "public function renderButtonGroup($body)\n\t{\n\n\t\t// Get all hidden inputs <input type=\"hidden\" ...>\n\t\t$inputs = [];\n\t\tif (preg_match_all('/<input\\s+([^>]*)>/i', $body, $inputmatches, PREG_SET_ORDER)) {\n\t\t\tforeach ($inputmatches as $inputmatch) {\n\t\t\t\t$body = str_replace($inputmatch[0], '', $body);\n\t\t\t\tif (preg_match('/\\s+type\\s*=\\s*[\\'\"]hidden[\\'\"]/i', $inputmatch[0])) // Match type='hidden'\n\t\t\t\t\t$inputs[] = $inputmatch[0];\n\t\t\t}\n\t\t}\n\n\t\t// Get all buttons <div class=\"btn-group ...\">...</div>\n\t\t$btns = [];\n\t\tif (preg_match_all('/<div\\s+class\\s*=\\s*[\\'\"]btn-group([^\\'\"]*)[\\'\"]([^>]*)>([\\s\\S]*?)<\\/div\\s*>/i', $body, $btnmatches, PREG_SET_ORDER)) {\n\t\t\tforeach ($btnmatches as $btnmatch) {\n\t\t\t\t$body = str_replace($btnmatch[0], '', $body);\n\t\t\t\t$btns[] = $btnmatch[0];\n\t\t\t}\n\t\t}\n\t\t$links = '';\n\n\t\t// Get all links/buttons <a ...>...</a> and <button ...>...</button>\n\t\tif (preg_match_all('/<(a|button)([^>]*)>([\\s\\S]*?)<\\/(a|button)\\s*>/i', $body, $matches, PREG_SET_ORDER)) {\n\t\t\tforeach ($matches as $match) {\n\t\t\t\t$tag = $match[1];\n\t\t\t\tif (preg_match('/\\s+class\\s*=\\s*[\\'\"]([\\s\\S]*?)[\\'\"]/i', $match[2], $submatches)) { // Match class='class'\n\t\t\t\t\t$class = $submatches[1];\n\t\t\t\t\t$attrs = str_replace($submatches[0], '', $match[2]);\n\t\t\t\t} else {\n\t\t\t\t\t$class = '';\n\t\t\t\t\t$attrs = $match[2];\n\t\t\t\t}\n\t\t\t\t$caption = $match[3];\n\t\t\t\tPrependClass($class, 'btn btn-default'); // Prepend button classes\n\t\t\t\tif ($this->ButtonClass != \"\")\n\t\t\t\t\tAppendClass($class, $this->ButtonClass);\n\t\t\t\t$attrs = ' class=\"' . $class . '\" ' . $attrs;\n \t\t\t\t$link ='<' . $tag . $attrs . '>' . $caption . '</' . $tag . '>';\n\t\t\t\t$links .= $link;\n\t\t\t}\n\t\t}\n\t\tif ($links != \"\")\n\t\t\t$btngroup = '<div class=\"btn-group btn-group-sm ew-btn-group\">' . $links . '</div>';\n\t\telse\n\t\t\t$btngroup = \"\";\n\t\tforeach ($btns as $btn)\n\t\t\t$btngroup .= $btn;\n\t\tforeach ($inputs as $input)\n\t\t\t$btngroup .= $input;\n\t\treturn $btngroup;\n\t}", "title": "" }, { "docid": "db5590d864f7d89d4aca9bd4792a8cfc", "score": "0.49356413", "text": "function add_group($group_name) \n {\n $group_name = strtolower( $group_name );\n $new_group = $this->GROUPS[$group_name]; \n if ( empty($new_group) ) \n { \n $this->GROUPS[$group_name] = array(); \n } \n else\n {\n $this->Error( \"Group $group_name exists\");\n }\n }", "title": "" }, { "docid": "0be02f3045d6db64877e74855926a146", "score": "0.49242106", "text": "public function createAdGroups(array $params = [])\n {\n return $this->httpPost('/sb/v4/adGroups', $params, [],false,$this->header);\n }", "title": "" }, { "docid": "b837dd437d05372f205a4f6f7276f557", "score": "0.49217862", "text": "public function postCreate(ProductGroupRequest $request, BaseHttpResponse $response)\n {\n $product = $this->productgroupRepository->createOrUpdate(array_merge($request->input(), [\n 'user_id' => Auth::user()->getKey(),\n 'featured' => $request->input('featured', false),\n 'is_default' => $request->input('is_default', false),\n ]));\n\n event(new CreatedContentEvent(PRODUCT_GROUP_MODULE_SCREEN_NAME, $request, $product));\n\n return $response\n ->setPreviousUrl(route('product.groups.list'))\n ->setNextUrl(route('product.groups.edit', $product->id))\n ->setMessage(trans('core.base::notices.create_success_message'));\n }", "title": "" }, { "docid": "729dcd77bbebe3392a52006d1dc3c449", "score": "0.49212164", "text": "public function create()\n {\n \n $this->view->title = 'Create New Flexible Group';\n return $this->view('flexigroup.create');\n }", "title": "" }, { "docid": "09454d15357863e81177dfe0fa6da41a", "score": "0.4918347", "text": "public function actionCreate () {\n\t\t$this->pageTitle = Yii::t('GroupsModule.common', 'Создание группы');\n\t\t$this->breadcrumbs[] = Yii::t('GroupsModule.common', 'Создание группы');\n\n\t\t$model = new Group();\n\t\t$this->performAjaxValidation($model);\n\n\t\tif ( isset($_POST['Group']) ) {\n\t\t\t$model->attributes = $_POST['Group'];\n\t\t\t$valid = $model->validate();\n\n\t\t\tif ( $valid ) {\n\t\t\t\t$transaction = Yii::app()->getDb()->beginTransaction();\n\n\t\t\t\ttry {\n\t\t\t\t\t$model->save(false);\n\n\t\t\t\t\t$groupUser = new GroupUser();\n\t\t\t\t\t$groupUser->idUser = Yii::app()->getUser()->getId();\n\t\t\t\t\t$groupUser->idGroup = $model->getId();\n\t\t\t\t\t$groupUser->status = GroupUser::STATUS_APPROVED;\n\t\t\t\t\t$groupUser->save(false);\n\n\t\t\t\t\t$transaction->commit();\n\n\t\t\t\t\tYii::app()->user->setFlash(User::FLASH_SUCCESS,\n\t\t\t\t\t\tYii::t('GroupsModule.common', 'Группа создана успешно'));\n\t\t\t\t\t$this->redirect($model->getUrl());\n\n\t\t\t\t} catch ( Exception $e ) {\n\t\t\t\t\t$transaction->rollBack();\n\n\t\t\t\t\tYii::log($e->getMessage(), CLogger::LEVEL_ERROR);\n\t\t\t\t\tYii::app()->getUser()->setFlash(User::FLASH_ERROR,\n\t\t\t\t\t\tYii::t('GroupsModule.common',\n\t\t\t\t\t\t\t'При создании группы возникли проблемы, пожалуйста, попробуйте позже.'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->render('form',\n\t\t\tarray(\n\t\t\t 'model' => $model,\n\t\t\t));\n\t}", "title": "" }, { "docid": "60425da297f79eba10e93d34620bfed0", "score": "0.4916606", "text": "public function create()\n {\n return View('cms.group.create', [\n ]);\n }", "title": "" }, { "docid": "af0ba1af6a2c411c868605fd7254ec0f", "score": "0.49153033", "text": "public function create_group()\n {\n $this->data['title'] = $this->lang->line('create_group_title');\n\n if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n {\n redirect('auth', 'refresh');\n }\n\n // validate form input\n $this->form_validation->set_rules('group_name', $this->lang->line('create_group_validation_name_label'), 'trim|required|alpha_dash');\n\n if ($this->form_validation->run() === TRUE)\n {\n $new_group_id = $this->ion_auth->create_group($this->input->post('group_name'), $this->input->post('description'));\n if ($new_group_id)\n {\n // check to see if we are creating the group\n // redirect them back to the admin page\n $this->session->set_flashdata('message', $this->ion_auth->messages());\n redirect(\"auth\", 'refresh');\n }\n }\n else\n {\n // display the create group form\n // set the flash data error message if there is one\n $this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n $this->data['group_name'] = array(\n 'name' => 'group_name',\n 'id' => 'group_name',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('group_name'),\n );\n $this->data['description'] = array(\n 'name' => 'description',\n 'id' => 'description',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('description'),\n );\n\n $this->_render_page('auth' . DIRECTORY_SEPARATOR . 'create_group', $this->data);\n }\n }", "title": "" }, { "docid": "2baffed65262eb961f0e9e28f95f554e", "score": "0.491503", "text": "public function actionCreate()\n {\n $model = new UserGroup;\n\n if (isset($_POST['UserGroup'])) {\n $authList = $_POST['UserGroup']['authList'];\n if (empty($authList)) {\n $this->json_alert(1, '请选择授权列表');\n }\n $model->attributes = $_POST['UserGroup'];\n $model->created = time();\n $model->authList = addslashes($authList);\n $model->updated = time();\n $model->createUser = Yii::app()->getUser()->getId();\n if ($model->save()) {\n Yii::app()->user->setFlash('success', '创建成功');\n $this->json_alert(0, '创建成功');\n }\n $error = $model->getErrors();\n $this->json_alert(1, current(current($error)));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "3d9e16804a8355a22dfb53fea1dd0f82", "score": "0.4910687", "text": "public function createGroup(\n $name = null\n ) {\n\n //the base uri for api requests\n $_queryBuilder = Configuration::$BASEURI;\n \n //prepare query string for API call\n $_queryBuilder = $_queryBuilder.'/api/1.0/admin/groups';\n\n //process optional query parameters\n APIHelper::appendUrlWithQueryParameters($_queryBuilder, array (\n 'name' => $name,\n ));\n\n //validate and preprocess url\n $_queryUrl = APIHelper::cleanUrl($_queryBuilder);\n\n //prepare headers\n $_headers = array (\n 'user-agent' => 'APIMATIC 2.0'\n );\n\n //call on-before Http callback\n $_httpRequest = new HttpRequest(HttpMethod::POST, $_headers, $_queryUrl);\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest);\n }\n\n //and invoke the API call request to fetch the response\n $response = Request::post($_queryUrl, $_headers);\n\n $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body);\n $_httpContext = new HttpContext($_httpRequest, $_httpResponse);\n\n //call on-after Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnAfterRequest($_httpContext);\n }\n\n //handle errors defined at the API level\n $this->validateResponse($_httpResponse, $_httpContext);\n\n return $response->body;\n }", "title": "" }, { "docid": "085e6eec19523fa2a5fb036a02460cd8", "score": "0.4905916", "text": "public function addGroupBy($element)\n {\n $this->m_groupbys[] = $element;\n\n return $this;\n }", "title": "" }, { "docid": "14a77b07078b7ac3e78265df1b8cf0a6", "score": "0.4895866", "text": "public function newAction(Request $request)\n {\n \t$groupManager = $this->get('fos_user.group_manager');\n $group = $groupManager->createGroup('');\n\n $form = $this->createForm('spbar_user_group', $group);\n\n $form->handleRequest($request);\n\n \tif ($form->isValid()) {\n\t\t $groupManager->updateGroup($group);\n $this->addFlash('success', \"New group {$group->getName()} has been successfully added.\"); \n\n\t\t return $this->redirectToRoute('sp_user_group_index');\n\t\t}\n\n $breadcrumbs = $this->container->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addRouteItem(\"Dashboard\", \"adminIndexPage\");\n $breadcrumbs->addRouteItem(\"Group\", \"sp_user_group_index\");\n $breadcrumbs->addItem(\"New\"); \n\n return $this->render('SpBarUserBundle:Backend/Group:new.html.twig', array(\n 'form' => $form->createview(),\n 'page_title' => \"Add User Group\"\n ));\n }", "title": "" }, { "docid": "6e2454287823e65b0422c7a6f5b04946", "score": "0.4895413", "text": "public function add() {\n\t\t$this->set('permissions', $this->Group->Permission->find('list', array('fields' => array('permission_code', 'permission_desc'))));\n\n\t\tif ($this->request->is('post')) {\n\t\t\tif ($this->Group->save($this->request->data)) {\n\t\t\t\t$this->Session->setFlash('New group added.');\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash('Unable to add group.');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9ce972a88fb782a5409ab94dbd568008", "score": "0.48935908", "text": "public function create()\n {\n return view('group.create', []);\n }", "title": "" }, { "docid": "2e09a68afb35481a31f491ca1dc8b893", "score": "0.48924178", "text": "public function groups_manager_can_add_user_to_group()\n {\n $this->loginAsGroupsManager();\n $user = factory(User::class)->create();\n $group = factory(Group::class)->create();\n $response = $this->post('/api/v1/group/' . $group->id . '/user/' . $user->id);\n\n $response->assertSuccessful();\n\n// $response->dump();\n\n $this->assertDatabaseHas('groupables', [\n 'group_id' => $group->id,\n 'groupable_id' => $user->id,\n 'groupable_type' => User::class,\n ]);\n\n }", "title": "" }, { "docid": "f672bf2549b9fb8c80944aa724753d21", "score": "0.4890913", "text": "public function createGroup()\n {\n $owner = new Role();\n $owner->name = 'owner';\n $owner->display_name = 'Project Owner'; // optional\n $owner->description = 'User is the owner of a given project'; // optional\n $owner->save();\n\n $admin = new Role();\n $admin->name = 'admin';\n $admin->display_name = 'User Administrator'; // optional\n $admin->description = 'User is allowed to manage and edit other users'; // optional\n $admin->save();\n }", "title": "" }, { "docid": "008ef529f7fdbbad48db131285206452", "score": "0.4887952", "text": "function button_anchor_group($btns, $active = array(), $main_params = array()){\n\t$ci =& get_instance();\n\n\t$classes = isset($main_params['classes']) ? $main_params['classes'] : array();\n\t$classes[] = 'btn-group';\n\t$output = '<div class=\"' . implode(' ', $classes) . '\">';\n\n\tforeach($btns as $key => $params){\n\t\t$classes = isset($params['classes']) ? $params['classes'] : array();\n\t\tif (in_array($key, $active)){\n\t\t\t$classes[] = 'active';\n\t\t}\n\t\t$btn_params = array(\n\t\t\t'class' => 'btn ' . implode(' ', $classes),\n\t\t);\n\n\t\t// set label\n\t\tif (isset($params['label'])){\n\t\t\t$label = $ci->lang->line($params['label']) ? $ci->lang->line($params['label']) : $params['label'];\n\t\t}else{\n\t\t\t$label = $ci->lang->line($key) ? $ci->lang->line($key) : $key;\n\t\t}\n\n\t\tif (isset($params['icon']) && isset($main_params['no_label']) && $main_params['no_label'] === true){\n\t\t\t$btn_params['rel'] = 'tooltip';\n\t\t\t$btn_params['title'] = $label;\n\t\t\t$btn_params['data-placement'] = 'bottom';\n\t\t\t$label = '<i class=\"' . $params['icon'] . '\"></i>';\n\t\t}else if (isset($params['icon'])){\n\t\t\t$label = '<i class=\"' . $params['icon'] . '\"></i>' . nbs() . $label;\n\t\t}\n\n\t\tif (isset($params['route'])){\n\t\t\t$output .= anchor($params['route'], $label, $btn_params);\n\t\t}else{\n\t\t\t$btn_params['class'] .= ' no-click';\n\t\t\t$output .= internal_anchor('', $label, $btn_params);\n\t\t}\n\t}\n\t$output .= '</div>';\n\treturn $output;\n}", "title": "" }, { "docid": "f17f0f07bb4ab493b70281b851ae00f6", "score": "0.48877344", "text": "public function lstGrowthGroups_Create($strControlId = null, QQCondition $objCondition = null, $objOptionalClauses = null) {\n\t\t\t$this->lstGrowthGroups = new QListBox($this->objParentObject, $strControlId);\n\t\t\t$this->lstGrowthGroups->Name = QApplication::Translate('Growth Groups');\n\t\t\t$this->lstGrowthGroups->SelectionMode = QSelectionMode::Multiple;\n\n\t\t\t// We need to know which items to \"Pre-Select\"\n\t\t\t$objAssociatedArray = $this->objGrowthGroupStructure->GetGrowthGroupArray();\n\n\t\t\t// Setup and perform the Query\n\t\t\tif (is_null($objCondition)) $objCondition = QQ::All();\n\t\t\t$objGrowthGroupCursor = GrowthGroup::QueryCursor($objCondition, $objOptionalClauses);\n\n\t\t\t// Iterate through the Cursor\n\t\t\twhile ($objGrowthGroup = GrowthGroup::InstantiateCursor($objGrowthGroupCursor)) {\n\t\t\t\t$objListItem = new QListItem($objGrowthGroup->__toString(), $objGrowthGroup->GroupId);\n\t\t\t\tforeach ($objAssociatedArray as $objAssociated) {\n\t\t\t\t\tif ($objAssociated->GroupId == $objGrowthGroup->GroupId)\n\t\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t}\n\t\t\t\t$this->lstGrowthGroups->AddItem($objListItem);\n\t\t\t}\n\n\t\t\t// Return the QListControl\n\t\t\treturn $this->lstGrowthGroups;\n\t\t}", "title": "" }, { "docid": "0f31c48eefb3c5f366d456a75dfef01b", "score": "0.48815346", "text": "function registerTheButton($buttons) {\n array_push($buttons, \"|\", \"mybutton\");\n return $buttons;\n }", "title": "" }, { "docid": "d1750d1c89e0b2e04f3f5889b66b5a94", "score": "0.4879098", "text": "function create_group() {\n $this->data['title'] = $this->lang->line('create_group_title');\n\n if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin()) {\n redirect('auth', 'refresh');\n }\n\n //validate form input\n $this->form_validation->set_rules('group_name', $this->lang->line('create_group_validation_name_label'), 'required|alpha_dash|xss_clean');\n $this->form_validation->set_rules('description', $this->lang->line('create_group_validation_desc_label'), 'xss_clean');\n\n if ($this->form_validation->run() == TRUE) {\n $new_group_id = $this->ion_auth->create_group($this->input->post('group_name'), $this->input->post('description'));\n if ($new_group_id) {\n // check to see if we are creating the group\n // redirect them back to the admin page\n $this->session->set_flashdata('message', 'grupo creado');\n redirect(\"auth\", 'refresh');\n }\n } else {\n //display the create group form\n //set the flash data error message if there is one\n $this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n $this->data['group_name'] = array(\n 'name' => 'group_name',\n 'id' => 'group_name',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('group_name'),\n );\n $this->data['description'] = array(\n 'name' => 'description',\n 'id' => 'description',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('description'),\n );\n $this->data['nombre'] = $this->ion_auth->user()->row()->username;\n $this->data['template'] = 'auth/create_group';\n\n $this->_render_page('template/template', $this->data);\n }\n }", "title": "" }, { "docid": "ed9d2f88d9ae5d048c2843b3bc0ef223", "score": "0.48771223", "text": "public function render()\n {\n $this->addAriaAttributes([\n 'role' => 'group',\n 'aria-label' => 'Button group'\n ]);\n\n if ($this->toggle) {\n $this->addClass('btn-group-toggle');\n $this->addDataAttribute('data-toggle', 'buttons');\n }\n\n if ($this->size) {\n $this->addClass(\"btn-group-{$this->size}\");\n }\n\n if ($this->vertical) {\n $this->replaceClass('btn-group', 'btn-group-vertical');\n }\n\n return view()->first(['bootstrap-blade::button-group', 'bootstrap-blade::default']);\n }", "title": "" }, { "docid": "890bcdd68b2cc14fd8e530656b49761f", "score": "0.4875094", "text": "public function addGroup($prefix, $callback)\n {\n $group = new Routes($this, $prefix, $callback);\n\n return $group;\n }", "title": "" }, { "docid": "74f598cbff32f511035375423755adfe", "score": "0.487145", "text": "public function create()\n {\n \treturn view('addGroup');\n }", "title": "" } ]
f03bec9051f1548cdd12f79a56960a84
For internal only. DO NOT USE IT.
[ { "docid": "7bf7988478abb8419e8e95c65e18d289", "score": "0.0", "text": "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"ZoneId\",$param) and $param[\"ZoneId\"] !== null) {\n $this->ZoneId = $param[\"ZoneId\"];\n }\n\n if (array_key_exists(\"ZoneName\",$param) and $param[\"ZoneName\"] !== null) {\n $this->ZoneName = $param[\"ZoneName\"];\n }\n\n if (array_key_exists(\"OriginalNameServers\",$param) and $param[\"OriginalNameServers\"] !== null) {\n $this->OriginalNameServers = $param[\"OriginalNameServers\"];\n }\n\n if (array_key_exists(\"NameServers\",$param) and $param[\"NameServers\"] !== null) {\n $this->NameServers = $param[\"NameServers\"];\n }\n\n if (array_key_exists(\"Status\",$param) and $param[\"Status\"] !== null) {\n $this->Status = $param[\"Status\"];\n }\n\n if (array_key_exists(\"Type\",$param) and $param[\"Type\"] !== null) {\n $this->Type = $param[\"Type\"];\n }\n\n if (array_key_exists(\"Paused\",$param) and $param[\"Paused\"] !== null) {\n $this->Paused = $param[\"Paused\"];\n }\n\n if (array_key_exists(\"CnameSpeedUp\",$param) and $param[\"CnameSpeedUp\"] !== null) {\n $this->CnameSpeedUp = $param[\"CnameSpeedUp\"];\n }\n\n if (array_key_exists(\"CnameStatus\",$param) and $param[\"CnameStatus\"] !== null) {\n $this->CnameStatus = $param[\"CnameStatus\"];\n }\n\n if (array_key_exists(\"Tags\",$param) and $param[\"Tags\"] !== null) {\n $this->Tags = [];\n foreach ($param[\"Tags\"] as $key => $value){\n $obj = new Tag();\n $obj->deserialize($value);\n array_push($this->Tags, $obj);\n }\n }\n\n if (array_key_exists(\"Resources\",$param) and $param[\"Resources\"] !== null) {\n $this->Resources = [];\n foreach ($param[\"Resources\"] as $key => $value){\n $obj = new Resource();\n $obj->deserialize($value);\n array_push($this->Resources, $obj);\n }\n }\n\n if (array_key_exists(\"CreatedOn\",$param) and $param[\"CreatedOn\"] !== null) {\n $this->CreatedOn = $param[\"CreatedOn\"];\n }\n\n if (array_key_exists(\"ModifiedOn\",$param) and $param[\"ModifiedOn\"] !== null) {\n $this->ModifiedOn = $param[\"ModifiedOn\"];\n }\n\n if (array_key_exists(\"Area\",$param) and $param[\"Area\"] !== null) {\n $this->Area = $param[\"Area\"];\n }\n\n if (array_key_exists(\"VanityNameServers\",$param) and $param[\"VanityNameServers\"] !== null) {\n $this->VanityNameServers = new VanityNameServers();\n $this->VanityNameServers->deserialize($param[\"VanityNameServers\"]);\n }\n\n if (array_key_exists(\"VanityNameServersIps\",$param) and $param[\"VanityNameServersIps\"] !== null) {\n $this->VanityNameServersIps = [];\n foreach ($param[\"VanityNameServersIps\"] as $key => $value){\n $obj = new VanityNameServersIps();\n $obj->deserialize($value);\n array_push($this->VanityNameServersIps, $obj);\n }\n }\n\n if (array_key_exists(\"ActiveStatus\",$param) and $param[\"ActiveStatus\"] !== null) {\n $this->ActiveStatus = $param[\"ActiveStatus\"];\n }\n\n if (array_key_exists(\"AliasZoneName\",$param) and $param[\"AliasZoneName\"] !== null) {\n $this->AliasZoneName = $param[\"AliasZoneName\"];\n }\n\n if (array_key_exists(\"IsFake\",$param) and $param[\"IsFake\"] !== null) {\n $this->IsFake = $param[\"IsFake\"];\n }\n\n if (array_key_exists(\"LockStatus\",$param) and $param[\"LockStatus\"] !== null) {\n $this->LockStatus = $param[\"LockStatus\"];\n }\n }", "title": "" } ]
[ { "docid": "b4e425e88b336f2040e816b9d78c807f", "score": "0.62662613", "text": "protected function __init__() { }", "title": "" }, { "docid": "a3eb963b3bde986e3dc549f04288d8ac", "score": "0.6091158", "text": "protected function main() {}", "title": "" }, { "docid": "a3eb963b3bde986e3dc549f04288d8ac", "score": "0.60892534", "text": "protected function main() {}", "title": "" }, { "docid": "a3eb963b3bde986e3dc549f04288d8ac", "score": "0.60892534", "text": "protected function main() {}", "title": "" }, { "docid": "2cc59f62bc7e5ec3bcad82dff8fdcb15", "score": "0.59983325", "text": "public function refuel() {\n\t}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.5989886", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.5989418", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.5989418", "text": "protected function init() {}", "title": "" }, { "docid": "e6edfc644597e0970ebb34ec3c414efe", "score": "0.5938086", "text": "private function init()\n\t{\n\t}", "title": "" }, { "docid": "dd152fcaf9c3b056c55ddae6060148e5", "score": "0.5937393", "text": "final private function __construct(){}", "title": "" }, { "docid": "dd152fcaf9c3b056c55ddae6060148e5", "score": "0.5937393", "text": "final private function __construct(){}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.59168774", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.59168774", "text": "final private function __construct() {}", "title": "" }, { "docid": "d3aa595ffb7ce86dcc30335e19b82b3e", "score": "0.58692926", "text": "protected function afterCreation() {}", "title": "" }, { "docid": "a7387e3ef5d883c6abbad049ecab76e5", "score": "0.5866724", "text": "protected function __process () {}", "title": "" }, { "docid": "bf14095236a1885b30a3e95e0632dde9", "score": "0.58581203", "text": "protected function _init() {}", "title": "" }, { "docid": "49408f41d8398b3aeff5a81399e9ac79", "score": "0.57917774", "text": "protected function fixSelf() {}", "title": "" }, { "docid": "e91b6c3cb8d98cd3a7a8577b85a46de5", "score": "0.57571244", "text": "final private function __construct() {\n\t}", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.5752271", "text": "protected function initialize() {}", "title": "" }, { "docid": "3d18bdfc2f5f9d640c05ddd39a45b95f", "score": "0.5749929", "text": "private function init() {\n\t}", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.5749856", "text": "protected function initialize() {}", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.5749856", "text": "protected function initialize() {}", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.5749856", "text": "protected function initialize() {}", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.5749856", "text": "protected function initialize() {}", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.5749647", "text": "protected function initialize() {}", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.5748303", "text": "protected function initialize() {}", "title": "" }, { "docid": "ea0db09f4336a2572e994ff745c2ff4a", "score": "0.5748239", "text": "private function __construct(){\n\t\t\n\t}", "title": "" }, { "docid": "ea0db09f4336a2572e994ff745c2ff4a", "score": "0.5748239", "text": "private function __construct(){\n\t\t\n\t}", "title": "" }, { "docid": "81342d8534e6f083d83fbae3cbf1ce9d", "score": "0.57456315", "text": "final private function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "8b5cd06d16587a8887c31d65ac3a997e", "score": "0.57317454", "text": "private function __construct()\r\n\t\t{\r\n\r\n\t\t}", "title": "" }, { "docid": "c6456eb1b7e18bf0b3aab668698b8004", "score": "0.57273006", "text": "protected function afterInit() {}", "title": "" }, { "docid": "2c7f310971e413362d9c3e9fc45f752c", "score": "0.571247", "text": "private function __construct() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "303c6463401e09821159820390808780", "score": "0.5694139", "text": "final private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "0e59379112512b1f4fc1b3ae6ccaa830", "score": "0.5680823", "text": "private function __construct () {}", "title": "" }, { "docid": "ff54d4a3eb63785cb1b4785cfd97e874", "score": "0.5668897", "text": "public function inscribirse()\n {\n }", "title": "" }, { "docid": "879f8fcf2f0e8ee3fd4ee61e782629e8", "score": "0.5635043", "text": "protected function __construct()\t{}", "title": "" }, { "docid": "a7e0095bc79d8ef626d0c12e3785ed14", "score": "0.5629717", "text": "protected function _initialitation() {\n }", "title": "" }, { "docid": "028b1b6f9aa345bc3a5a12d3ddb7794d", "score": "0.5627771", "text": "private function __construct() \n\t{}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5627174", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5623714", "text": "private function __construct() {}", "title": "" }, { "docid": "87478a429c66c2fda0aae29acc7769a9", "score": "0.5608697", "text": "private function initialize() : void {}", "title": "" }, { "docid": "4b9a73e08a620b798d91c831ff6af9d4", "score": "0.5608384", "text": "private function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "d0e9fda02a97d24e383fbdf94e011202", "score": "0.56028765", "text": "final private function __construct()\n {}", "title": "" }, { "docid": "789a63c9ed270017763babe6eaffd5e8", "score": "0.55865216", "text": "public function init() {\n\t\t\n\t}", "title": "" }, { "docid": "fb4c3f07ec66dc085096bd8483bf3da6", "score": "0.55803376", "text": "private final function __construct(){}", "title": "" }, { "docid": "fb76b3a53fbc9e552595fb36e96cdb87", "score": "0.5579109", "text": "private function __construct() {\n\t\n\t}", "title": "" }, { "docid": "8cf0f1e2117d3299a2d7409aff2a3e32", "score": "0.557694", "text": "private function __construct()\n\t{}", "title": "" }, { "docid": "2dffeb401c4f31667910b1e1e823a704", "score": "0.55498374", "text": "private function _construct()\r\n\t{}", "title": "" }, { "docid": "35a989971fd97ebb52684ea399df48de", "score": "0.5530328", "text": "final protected function __construct() {\n\n }", "title": "" }, { "docid": "2e74b32ba9658bccb84b76412099d2bd", "score": "0.5524996", "text": "public function init()\n {\t\t\t\n }", "title": "" }, { "docid": "0e6e864e80a98aa08db362cf9785424f", "score": "0.55225515", "text": "protected function init()\n {}", "title": "" }, { "docid": "9b4c1873a4542dbf73eb500d2c7bdbc0", "score": "0.5521981", "text": "private function __construct () {\n\t}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5518067", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5518067", "text": "private function __construct(){}", "title": "" } ]
834eeb2fb90d6cc67375a4680f896076
Initialize the options page
[ { "docid": "48452a69cf58fba6cec3e08fcb9dec0b", "score": "0.0", "text": "public function page_init() {\n register_setting( 'bii_instagram', 'bii_instagram' );\n\n add_settings_section(\n 'bii_instagram_oauth',\n __( 'Authentication', 'bii-instagram' ),\n array( &$this, 'print_oauth_section_info' ),\n 'bii-instagram'\n );\n add_settings_field(\n 'bii_instagram_client_id',\n __( 'Client ID', 'bii-instagram' ),\n array( &$this, 'create_textfield' ),\n 'bii-instagram',\n 'bii_instagram_oauth',\n array( 'code' => true, 'name' => 'client_id' )\n );\n add_settings_field(\n 'bii_instagram_client_secret',\n __( 'Client Secret', 'bii-instagram' ),\n array( &$this, 'create_textfield' ),\n 'bii-instagram',\n 'bii_instagram_oauth',\n array( 'code' => true, 'name' => 'client_secret', 'type' => 'password' )\n );\n }", "title": "" } ]
[ { "docid": "0584556176943d2c23294e0d6ab773ef", "score": "0.7791236", "text": "public function options_page() {\n\t\t$this->render_settings();\n\t}", "title": "" }, { "docid": "632eb38403c0b1aa92539856192cb5b9", "score": "0.7736577", "text": "public function init() {\t\t\n\t\t$this->options = new NHP_Options(\r\n\t\t\tarray(), array(\r\n\t\t\t\t\t'opt_name' => $this->cpt_slug . '-configuration',\r\n\t\t\t\t\t'page_slug' => $this->cpt_slug . '-configuration',\r\n\t\t\t\t\t'menu_title' => __( 'Configuration', WPcpt::$domain ),\r\n\t\t\t\t\t'page_title' => __( 'Configuration', WPcpt::$domain ),\r\n\t\t\t\t\t'page_cap' => 'manage_options',\r\n\t\t\t\t\t'dev_mode' => WP_DEBUG,\r\n\t\t\t\t\t'show_import_export' => false,\r\n\t\t\t\t\t'page_type' => 'submenu',\r\n\t\t\t\t\t'page_parent' => 'edit.php?post_type=' . $this->cpt_slug,\r\n\t\t\t) );\n\t}", "title": "" }, { "docid": "7b75f10743ee20129e693f383b650259", "score": "0.7646629", "text": "public function optionsPage()\r\n {\r\n $this->updateOptions();\r\n include_once($this->path . '/views/options.php');\r\n }", "title": "" }, { "docid": "03875dfc75a4fa58519fd9f04e046323", "score": "0.76429075", "text": "protected function initOptions()\n {\n }", "title": "" }, { "docid": "6bed2c20373a9c1e5d5536c32497a5a4", "score": "0.76241493", "text": "public function add_options_page()\n {\n }", "title": "" }, { "docid": "df7a620eab9fb5721af85e070cafa051", "score": "0.75792146", "text": "public static function init()\n\t{\n\t\t$self = new self;\n\t\tadd_action('init', [$self, 'registerOptionsPage']);\n\t}", "title": "" }, { "docid": "d26a645400142b114091d5ac850c63c3", "score": "0.7544033", "text": "public function init()\n {\n global $kong_helpdesk_options;\n $this->options = $kong_helpdesk_options;\n }", "title": "" }, { "docid": "dba55d6b5d01a150fc6ca7087422c27b", "score": "0.75033283", "text": "public function options_page_init(){\n\t\t\tadd_options_page(__('Breaking News options', 'text-domain'), __('Breaking News', 'text-domain'), 'manage_options', 'breakingnews', [ $this, 'options_page_content']);\n\t\t}", "title": "" }, { "docid": "404e009c15aa252911ea4a55172f6675", "score": "0.74657696", "text": "public function initializePage()\n\t{\n\t\tadd_menu_page('Thema opties', 'Thema opties', 'manage_options', 'theme-options');\n\t}", "title": "" }, { "docid": "1b1b80aeca2b209f1f45631ad37cc8ad", "score": "0.73898506", "text": "public function initialize_settings_page()\n {\n }", "title": "" }, { "docid": "f6464cf4a9f55222d82210d10791e797", "score": "0.7349272", "text": "public function render_options_page() {\r\n\r\n\t\tinclude( Views::load_view( TBSC_OPTIONS_PLUGIN_DIR . 'src/views/options-page/options-page.php' ) );\r\n\r\n\t}", "title": "" }, { "docid": "fa3de13abd7ee6eb7501c81441a1db3d", "score": "0.73376024", "text": "public function init() {\n\t\t$this->add_options_page( 'Theme options' );\n\n\t\t$this->has(\n\t\t\t$this->build('theme_options', [\n\t\t\t\t'style' => 'seamless',\n\t\t\t])\n\t\t\t\t->addTab( 'General' )\n\t\t\t\t->addFields( $this->general_tab() )\n\t\t\t\t->addTab( 'Socials Links' )\n\t\t\t\t->addFields( $this->socials_tab() )\n\t\t\t\t->addTab( '404 Page' )\n\t\t\t\t->addFields( $this->page_404_tab() )\n\t\t\t\t->setLocation( 'options_page', '==', 'acf-options-theme-options' )\n\t\t);\n\t}", "title": "" }, { "docid": "14f504624c945a2f3b8863cbab4fb021", "score": "0.7326851", "text": "public function setup_options_page() {\n\t\tacf_add_options_sub_page( [\n\t\t\t'page_title' \t=> _x( 'Promotions', 'Promotions page title in WP Admin', 'my-listing' ),\n\t\t\t'menu_title'\t=> _x( 'Promotions', 'Promotions menu title in WP Admin', 'my-listing' ),\n\t\t\t'menu_slug' \t=> 'theme-promotions-settings',\n\t\t\t'capability'\t=> 'manage_options',\n\t\t\t'redirect'\t\t=> false,\n\t\t\t'parent_slug' => 'case27/tools.php',\n\t\t] );\n\t}", "title": "" }, { "docid": "ae138cf6411b313f08b39a6209ab0fb7", "score": "0.73181987", "text": "function init_integrated_options() {\n\t\t$this->permalink_sections();\n\n\t}", "title": "" }, { "docid": "c3812dd4dcdb98bb1164f61177385e94", "score": "0.7229463", "text": "function initlab_options_page() {\n add_menu_page(\n __('init Lab Options', 'initlab-addons'),\n __('init Lab', 'initlab-addons'),\n 'manage_options',\n 'initlab',\n 'initlab_options_page_html'\n );\n}", "title": "" }, { "docid": "39dad2ca49fd3f9e8c913510f1cd1576", "score": "0.7212394", "text": "public function _init() {\n parent::_init();\n if(empty($this->options))\n \t $this->options = [];\n \tif (empty($this->options['class']))\n \t $this->options['class'] = '';\n \t$this->add_option($this->options['class'], 'btn');\n }", "title": "" }, { "docid": "06c7c59f47fa341ca7eaf88a2ea38b7e", "score": "0.7207014", "text": "public function create_options_page() {\n print '<div class=\"wrap\">';\n screen_icon();\n printf( '<h2>%s</h2>', __( 'Instagram Settings', 'bii-instagram' ) );\n print '<form method=\"post\" action=\"options.php\">';\n settings_fields( 'bii_instagram' );\n do_settings_sections( 'bii-instagram' );\n submit_button();\n print '</form>';\n print '</div>';\n }", "title": "" }, { "docid": "cad837b92f2fb4dc71c2615a27e6126b", "score": "0.71860826", "text": "public function options_init() {\n\t\t\tglobal $allowedtags;\n\t\t\t$allowedtags['p'] = array();\n\t\t\t$this->allowedtags = $allowedtags;\n\n\t\t // set options equal to defaults\n\t\t $this->_options = get_option( $this->options_group[0]['options_name'] );\n\t\t if ( false === $this->_options ) {\n\t\t\t\t$this->_options = $this->get_defaults();\n\t\t }\n\t\t if ( isset( $_GET['undo'] ) && !isset( $_GET['settings-updated'] ) && is_array( $this->get_option('previous') ) ) {\n\t\t \t$this->_options = $this->get_option('previous');\n\t\t }\n\t\t update_option( $this->options_group[0]['options_name'], $this->_options );\t\t\n\t\t \n\t\t}", "title": "" }, { "docid": "050e6edd453d7991fe4073d7700e9085", "score": "0.71667373", "text": "public static function _options_page(){\n\t\tif( isset($_POST['urls']) ){\n\t\t\tself::updateUrls($_POST['urls']);\n\t\t}\n\t\t\n\t\t$vars = (object) array();\n\t\t$vars->messages = implode( \"\\n\", self::$messages );\n\t\t$vars->path = self::$path;\n\t\t$vars->urls = self::getUrls();\n\t\tself::render( 'admin', $vars );\n\t}", "title": "" }, { "docid": "f48ab46931373edc0760864e81c1c277", "score": "0.71553975", "text": "function __construct(){\n\t\t$this->options();\n\t}", "title": "" }, { "docid": "ab5aa12c885356d23fa4cc019b8c0ff7", "score": "0.7141569", "text": "public function view_option_page() {\n\t\tinclude_once plugin_dir_path( __FILE__ ) . 'options.php';\n\t}", "title": "" }, { "docid": "55c323d4c52c0830f46cc608f2d046b6", "score": "0.71224076", "text": "function init() {\n $this.getAdminOptions();\n }", "title": "" }, { "docid": "b420f71d535dbbfc698b88a911981ff6", "score": "0.71161664", "text": "protected function get_options()\n\t{}", "title": "" }, { "docid": "7a45c96557442b84c0d3a6dc8d99c8a8", "score": "0.7099136", "text": "function adminOptions() {\r\n\t\t\tTrackTheBookView::render('admin-options');\r\n\t\t}", "title": "" }, { "docid": "daaaea5533877267762e3941979fd542", "score": "0.7075927", "text": "public function init() {\n\t\t\t$this->register_post_type();\n\t\t\t$this->acf_add_options_pages();\n\t\t\tdo_action('acf_options_page/init');\n\t\t}", "title": "" }, { "docid": "83f56ea374618ac794bce3cfbbdce5e6", "score": "0.7069852", "text": "function options_page(){\r\n include($this->plugin_dir.'/include/options-page.php');\r\n }", "title": "" }, { "docid": "f11fcc809012b208ecdd9f0f48183b59", "score": "0.70532495", "text": "public static function init_options_page() {\n\n\t\t$option_page = acf_add_options_page([\n\t\t\t'page_title' => __('Theme Options', 'sage'),\n\t\t\t'menu_title' => 'Theme Options',\n\t\t\t'menu_slug' => 'theme-options',\n\t\t\t'capability' => 'edit_posts',\n\t\t\t'redirect' => true,\n\t\t\t'icon_url' => false,\n\t\t\t'position' => 40,\n\t\t\t'autoload' => true\n\t\t]);\n\n\t\treturn $option_page;\n\t}", "title": "" }, { "docid": "342b099d20df3d7ab37af35deefb5837", "score": "0.70405406", "text": "public function options_load();", "title": "" }, { "docid": "2b7f37bcfbd5221d3e96c07f93b04e33", "score": "0.70093256", "text": "public function init_option() {\n\t\tglobal $wpdb;\n\n\t\t$sections = array(\n\t\t\tarray(\n\t\t\t\t'id' => 'wp_price_chart_opt',\n\t\t\t\t'title' => __( 'General', 'wp-reviews-insurance' )\n\t\t\t),\n\t\t);\n\n\t\t// Get List Symbol\n\t\t$symbol_list = $wpdb->get_results( \"SELECT SYMBOL_ID, SYMBOL FROM {$wpdb->prefix}socks_symbol\", ARRAY_A );\n\t\t$list = array();\n\t\tforeach ( $symbol_list as $r ) {\n\t\t\t$list[ $r['SYMBOL_ID'] ] = $r['SYMBOL'];\n\t\t}\n\n\t\t$fields = array(\n\t\t\t'wp_price_chart_opt' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'default_symbol',\n\t\t\t\t\t'label' => __( 'Default Symbol', 'wedevs' ),\n\t\t\t\t\t'desc' => __( 'Use [price-chart] ShortCode in WordPress', 'wedevs' ),\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'options' => $list\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'chart_height',\n\t\t\t\t\t'label' => __( 'Chart Height', 'wp-reviews-insurance' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => '130',\n\t\t\t\t\t'desc' => '',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'default_show_ago',\n\t\t\t\t\t'label' => __( 'Show ago Hour (default)', 'wp-reviews-insurance' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => '5',\n\t\t\t\t\t'desc' => '',\n\t\t\t\t),\n\t\t\t),\n\n\t\t);\n\n\t\t$this->setting = new SettingAPI();\n\n\t\t//set sections and fields\n\t\t$this->setting->set_sections( $sections );\n\t\t$this->setting->set_fields( $fields );\n\n\t\t//initialize them\n\t\t$this->setting->admin_init();\n\t}", "title": "" }, { "docid": "ab978e1ec0baee70b900b58ac2121670", "score": "0.69897705", "text": "public static function options_page()\n\t\t\t{\n\t\t\t\tif (!current_user_can('manage_options'))\n\t\t\t\t{\n\t\t\t\t\twp_die( __('You do not have sufficient permissions to access this page.') );\n\t\t\t\t}\n\t\n\t\t\t\t$plugin_id = HE_PLUGINOPTIONS_ID;\n\t\t\t\t// display options page\n\t\t\t\tinclude(self::file_path('options.php'));\n\t\t\t}", "title": "" }, { "docid": "70decd801e1e970b073395b59bb24e77", "score": "0.6966132", "text": "protected function _init() {\n\n\t\t$options = new SBTT_Options();\n\t\t$this->addOptionsPage(\n\t\t\t__( 'Scroll Back to Top Settings', $this->textDomain() ),\n\t\t\t__( 'Scroll Back to Top', $this->textDomain() ),\n\t\t\t$options\n\t\t);\n\t}", "title": "" }, { "docid": "49000e62f65ed042412dc4951fb6db3b", "score": "0.69429934", "text": "public function __construct($options = array()){ \r\n $this->setOptions($options);\r\n }", "title": "" }, { "docid": "6048d3ad71ccc9a452ce391bbcbab3be", "score": "0.6938273", "text": "function wassupoptions() {\n\t\t//# initialize class variables with current options \n\t\t//# or with defaults if none\n\t\t$this->loadSettings();\n\t}", "title": "" }, { "docid": "a51638eb31a6150656823310a19e756b", "score": "0.69330734", "text": "public function adminPluginOptionsPage()\n {\n echo $this->_loadView('admin-settings-page');\n }", "title": "" }, { "docid": "ac0963184770ae7723a63c842983c0d3", "score": "0.6927648", "text": "function of_option_setup()\t{\n\t\n\tglobal $of_options, $options_machine;\n\t\n\t$options_machine = new Options_Machine($of_options);\n\t\t\n\tif (!get_option(OPTIONS)){\n\t\t\n\t\t$defaults = (array) $options_machine->Defaults;\n\t\tupdate_option(OPTIONS,$defaults);\n\t\tgenerate_options_css($defaults); \n\t\t\n\t}\n\t\n\t\n}", "title": "" }, { "docid": "b66b21300a35064dd91748d0a9995781", "score": "0.6922709", "text": "protected function initOptions()\n {\n $this->options = array_merge([\n 'class' => 'small-box'\n ], $this->options);\n $this->theme || $this->theme = 'info';\n Html::addCssClass($this->options, 'bg-'.$this->theme);\n\n $this->linkOptions = array_merge([\n 'class' => 'small-box-footer'\n ], $this->linkOptions);\n }", "title": "" }, { "docid": "643edaacc7e028e19a00a2e7e4c6d541", "score": "0.6920066", "text": "public function options() {}", "title": "" }, { "docid": "bd6fcde4adf6803ee3b6820ff4ef2081", "score": "0.6890006", "text": "function civ_slider_options_page(){\n add_options_page('Civ Slider Options', 'Civ Slider Options', 8, 'civ_slider', 'civ_slider_options');\n}", "title": "" }, { "docid": "1ee6428ec3bca084b8ae32cf6abaf1b5", "score": "0.6871689", "text": "function pm_initialize_options() {\n if( false == get_option( 'pm_display_options' ) ) {\n add_option( 'pm_display_options' );\n } // end if \n \n // First, we register a section. This is necessary since all future options must belong to a \n add_settings_section( \n 'general_settings_section',\t\t\t// ID used to identify this section and with which to register options \n 'Display Options',\t\t\t\t\t// Title to be displayed on the administration page \n 'pm_general_options_callback',\t\t// Callback used to render the description of the section \n 'pm_display_options'\t\t\t\t// Page on which to add this section of options \n ); \n \n // Next, we'll introduce the fields for toggling the visibility of content elements. \n add_settings_field( \n 'walled_garden',\t\t\t\t\t// ID used to identify the field throughout the theme \n 'Walled Garden',\t\t\t\t\t// The label to the left of the option interface element \n 'pm_toggle_walled_garden_callback',\t// The name of the function responsible for rendering the option interface \n 'pm_display_options',\t\t\t\t// The page on which this option will be displayed \n 'general_settings_section',\t\t\t// The name of the section to which this field belongs \n array(\t\t\t\t\t\t\t\t// The array of arguments to pass to the callback. In this case, just a description. \n 'Require users to be logged-in to access the site.' \n ) \n ); \n\n // Finally, we register the fields with WordPress \n register_setting( \n 'pm_display_options', \n 'pm_display_options' \n ); \n \n}", "title": "" }, { "docid": "d571ab4a16ff560d5229c7283e0fe24d", "score": "0.6869235", "text": "public function options();", "title": "" }, { "docid": "d571ab4a16ff560d5229c7283e0fe24d", "score": "0.6869235", "text": "public function options();", "title": "" }, { "docid": "d571ab4a16ff560d5229c7283e0fe24d", "score": "0.6869235", "text": "public function options();", "title": "" }, { "docid": "d571ab4a16ff560d5229c7283e0fe24d", "score": "0.6869235", "text": "public function options();", "title": "" }, { "docid": "d571ab4a16ff560d5229c7283e0fe24d", "score": "0.6869235", "text": "public function options();", "title": "" }, { "docid": "67bd790a999b07be974777a44923fc8c", "score": "0.6858422", "text": "function add_options_page() {\n\t\tadd_options_page(\n\t\t\t'AdControl',\n\t\t\t'AdControl',\n\t\t\t'manage_options',\n\t\t\t'adcontrol',\n\t\t\tarray( $this, 'options_page' )\n\t\t);\n\t}", "title": "" }, { "docid": "246a3a12322f70fcc31c85cf32fad2c5", "score": "0.6853664", "text": "public function get_options()\n {\n }", "title": "" }, { "docid": "c7b6a393a486512583e2f812bb0838f7", "score": "0.6844704", "text": "public function page_init()\n {\n register_setting(\n 'my_option_group', // Option group\n 'linkedin_api_option', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n 'Request Settings', // Title\n array(), // Callback\n 'my-setting-admin' // Page\n );\n\n add_settings_field(\n 'redirect_url', // ID\n 'Redirect URL', // Title\n array( $this, 'redirect_url_callback' ), // Callback\n 'my-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'client_id',\n 'Client ID',\n array( $this, 'client_id_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'client_secret',\n 'Client Secret',\n array( $this, 'client_secret_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'authorization_code',\n 'Authorization Code For An Access Token',\n array( $this, 'authorization_code_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'access_token',\n 'Access Token',\n array( $this, 'access_token_callback' ),\n 'my-setting-admin',\n 'setting_section_id'\n );\n\n }", "title": "" }, { "docid": "43907b1aca613cd212189659b4f4ea2d", "score": "0.68413526", "text": "public function add_options_page() {\n add_options_page(\n __( 'Instagram Settings', 'bii-instagram' ),\n __( 'Instagram', 'bii-instagram' ),\n 'manage_options',\n 'bii-instagram',\n array( &$this, 'create_options_page' )\n );\n }", "title": "" }, { "docid": "943150b262ad9e7fbbcca577742933ea", "score": "0.6827923", "text": "function zdtw_init_menu() {\n add_options_page(\n 'Zing Design Testimonials',\n 'ZD Testimonials',\n 'manage_options',\n $this->settings_page_id,\n array($this, $this->prefix . '_menu_options_callback')\n );\n }", "title": "" }, { "docid": "0662b5b12a1df639004922af29df5a21", "score": "0.68273395", "text": "function initialize_options()\n\t\t{\n\t\t\tglobal $config;\n\n\t\t\t$defaults = array(\n\t\t\t\t'minimum_age' => 4,\n\t\t\t\t'maximum_age' => 0,\n\t\t\t);\n\t\t\tforeach ($defaults as $option => $default)\n\t\t\t{\n\t\t\t\tif (!isset($config[$option]))\n\t\t\t\t{\n\t\t\t\t\tset_config($option, $default);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8783fcea172f0da1c24a5a2293355417", "score": "0.6825802", "text": "public function page_init()\n {\n register_setting(\n 'sepw_option_group', // Option group\n 'sepw_settings', // Option name\n array($this, 'sanitize') // Sanitize\n );\n\n add_settings_section(\n 'info_section_id',\n __('Guide', 'sepw'),\n array($this, 'print_info_section_info'),\n 'sepw-setting-admin'\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n __('Settings', 'sepw'), // Title\n array($this, 'print_settings_section_info'), // Callback\n 'sepw-setting-admin' // Page\n );\n\n add_settings_section(\n 'generate_section_id',\n __('Create Pricelist', 'sepw'),\n array($this, 'print_generate_section_info'),\n 'sepw-setting-admin'\n );\n\n add_settings_field(\n 'product_fields',\n __('Filters', 'sepw'),\n array($this, 'product_fields_callback'),\n 'sepw-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'images_size',\n __('Thumbnail size', 'sepw'),\n array($this, 'images_size_callback'),\n 'sepw-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'cache_lifetime',\n __('Update Frequency', 'sepw'),\n array($this, 'cache_lifetime_callback'),\n 'sepw-setting-admin',\n 'setting_section_id'\n );\n }", "title": "" }, { "docid": "b4d431bcccd54f00001b333e6f539399", "score": "0.6802677", "text": "public function add_options_page() {\n add_options_page($this->title, $this->title, 'manage_options', $this->page, array(&$this, 'display_options_page'));\n }", "title": "" }, { "docid": "dc841f9afa4a2432a27755bb8413dade", "score": "0.67859644", "text": "public function adminInit()\n {\n if (true === isset($_GET['page'])) {\n switch ($_GET['page']) {\n case 'gf_settings':\n // add our settings page to the Gravity Forms settings menu\n RGForms::add_settings_page('BitPay Payments', array($this, 'optionsAdmin'));\n break;\n default:\n // not used\n }\n }\n }", "title": "" }, { "docid": "9f30b64dbb0e55dfd4b3740e95755cd3", "score": "0.6785566", "text": "function owa_options_page() {\r\n\t\r\n\t$owa = owa_getInstance();\r\n\t\r\n\t$params = array();\r\n\t$params['view'] = 'base.options';\r\n\t$params['subview'] = 'base.optionsGeneral';\r\n\techo $owa->handleRequest($params);\r\n\t\r\n\treturn;\r\n}", "title": "" }, { "docid": "eba250f0cfcf4dc08b46422da620c917", "score": "0.67645615", "text": "public function settings_page_init() {\n $this->registration();\n $this->sections();\n }", "title": "" }, { "docid": "bc162633cd302e9c87c298e46a62442f", "score": "0.6764268", "text": "protected function init()\r\n {\r\n parent::init();\r\n\r\n foreach ($this->options as $name => $value) {\r\n switch ($name) {\r\n case 'query':\r\n if (!is_array($value)) {\r\n $value = array(array('query' => $value));\r\n }\r\n $this->addQueries($value);\r\n break;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "3d639565b5adb7a21a171eabccae6e78", "score": "0.67617947", "text": "public function acf_wpi_option_page() {\n\t\t// Prevent init acf wpi options if acf/acf-pro not activated.\n\t\tif ( ! class_exists( 'acf' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tacf_add_options_page(\n\t\t\tarray(\n\t\t\t\t'page_title' => __( 'ACF Wpi Options', 'acf_wpi' ),\n\t\t\t\t'menu_slug' => 'acf_wpi_options_page',\n\t\t\t\t'parent_slug' => 'options-general.php',\n\t\t\t)\n\t\t);\n\t\tModuleLoader::get_instance()->register_options_container();\n\t}", "title": "" }, { "docid": "bad967a7d8c0ff4038aabeb88a3976e6", "score": "0.67499477", "text": "function optionsframework_options() {\n\t\t$options_pages = array(); \n\t\t$options_pages_obj = get_pages('sort_column=post_parent,menu_order');\n\t\t$options_pages[''] = 'Select a page:';\n\t\tforeach ($options_pages_obj as $page):\n\t\t\t$options_pages[$page->ID] = $page->post_title;\n\t\tendforeach;\n\t\n\t\t// If using image radio buttons, define a directory path\n\t\t$imagepath = get_template_directory_uri() . '/lib/assets/images/icons/';\n\t\n\t\t$options = array();\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('General Settings', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Favicon', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('To upload your favicon to the site, simply add the URL to it or upload and select it using the Upload button here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_custom_favicon',\n\t\t\t'type' \t\t=> 'upload');\n\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('RSS Link', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Add in the URL of your RSS feed here to overwrite the defaut WordPress ones.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_rss',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Custom CSS', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Not 100% happy with our lovely styles? Here you can add some custom CSS if you require minor changes to the ones we\\'ve created. We won\\'t be offended, honest :)', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_custom_css',\n\t\t\t'type' \t\t=> 'textarea');\t\n\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Google Analytics (or custom Javascript)', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If you\\'re hooked up with Google Analytics you can paste the Javascript includes for it here (without the script tags). Or alternatively if you just want some custom Javascript added on top of ours, add that here too.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_custom_js',\n\t\t\t'type' \t\t=> 'textarea');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Breadcrumb Trail?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the breadcrumb trail on all pages in the header.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_breadcrumbs',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Application Form ID', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_application_form_id',\n\t\t\t'desc'\t\t=> 'If you have added an applcation form for the jobs section of your site using the Contact Form & plugin, you can add the ID of the form here for it to be pulled out automatically.',\n\t\t\t'std' \t\t=> '',\n\t\t\t'type' \t\t=> 'text');\t\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Header', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Custom Logo', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('To upload a custom logo, simply add the URL to it or upload and select it using the Upload button here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_custom_logo',\n\t\t\t'type' \t\t=> 'upload');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Header Text', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_header_text',\n\t\t\t'des'\t\t=> 'You can add some text to the header if you like. Keep it short and sweet mind; nobody likes a waffler :)',\n\t\t\t'std' \t\t=> '',\n\t\t\t'type' \t\t=> 'text');\t\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Contact Telephone', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your contact telephone number here to go in the header.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_header_phone',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Footer', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __('Copyright Text', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter the text for your copyright here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_footer_copyright',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Hide FrogsThemes Link?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will hide our link :\\'( <--sad face', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_hide_ft_link',\n\t\t\t'std' \t\t=> '0',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Blog', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Style', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Select if you prefer the blog to be as a list or in masonry.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_blog_style',\n\t\t\t'options' \t=> array('list' => __('List', 'frogsthemes'), 'masonry' => __('Masonry', 'frogsthemes')),\n\t\t\t'std'\t\t=> 'list',\n\t\t\t'type' \t\t=> 'select');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Share Links?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the share links on all posts.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_share_links',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Author Box?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the author box on all posts.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_author',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Next/Previous Links?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the next/previous post links on all posts.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_next_prev',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Related Posts?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the related posts section. These are related by tag.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_related_posts',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Slider', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Speed of Transition', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter the speed you would like the transition to be in milliseconds (1000 = 1 second).', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_speed',\n\t\t\t'std'\t\t=> '600',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Pause Time', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter the time you would like the gallery to pause between transitions in milliseconds (1000 = 1 second).', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_pause',\n\t\t\t'std'\t\t=> '7000',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Auto Start?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will automatically start the gallery.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_auto_start',\n\t\t\t'std' \t\t=> '0',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Auto Loop?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will automatically loop through the gallery.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_loop',\n\t\t\t'std' \t\t=> '0',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t/*\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Animation Type', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Select which effect you would like to use when going between slides.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_transition',\n\t\t\t'options' \t=> array('fade' => __('Fade', 'frogsthemes'), 'slide' => __('Slide', 'frogsthemes')),\n\t\t\t'std'\t\t=> 'fade',\n\t\t\t'type' \t\t=> 'select');\n\t\t*/\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Connections', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Facebook URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full Facebook URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_facebook',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Twitter URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full Twitter URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_twitter',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Google+ URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full Google+ URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_google_plus',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'LinkedIn URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full LinkedIn URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_linkedin',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Pinterest URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full Pinterest URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_pinterest',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'YouTube URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full YouTube URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_youtube',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Twitter API Options', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Twitter API', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('To use the Twitter API, you need to sign up for an <a href=\"https://dev.twitter.com/apps\" target=\"_blank\">app with Twitter</a>.', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'info');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Consumer Key', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'consumer_key',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Consumer Secret', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'consumer_secret',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Access Token', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'access_token',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Access Token Secret', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'access_token_secret',\n\t\t\t'type' \t\t=> 'text');\n\t\n\t\treturn apply_filters('optionsframework_options', $options);\n\t}", "title": "" }, { "docid": "f35e1ed7a56c8ccd4830f1d36705d2db", "score": "0.67416537", "text": "public function renderOptions() {\n $tab \t\t= sienna_mikado_get_admin_tab();\n $active_page \t= sienna_mikado_framework()->mkdOptions->getAdminPageFromSlug($tab);\n $current_theme \t= wp_get_theme();\n\n if ($active_page == null) return;\n ?>\n <div class=\"mkdf-options-page mkdf-page\">\n\n <?php $this->getHeader($current_theme->get('Name'), $current_theme->get('Version')); ?>\n\n <div class=\"mkdf-page-content-wrapper\">\n <div class=\"mkdf-page-content\">\n <div class=\"mkdf-page-navigation mkdf-tabs-wrapper vertical left clearfix\">\n\n <?php $this->getPageNav($tab); ?>\n <?php $this->getPageContent($active_page, $tab); ?>\n\n\n </div> <!-- close div.mkdf-page-navigation -->\n\n </div> <!-- close div.mkdf-page-content -->\n\n </div> <!-- close div.mkdf-page-content-wrapper -->\n\n </div> <!-- close div.mkd-options-page -->\n\n <a id='back_to_top' href='#'>\n <span class=\"fa-stack\">\n <span class=\"fa fa-angle-up\"></span>\n </span>\n </a>\n <?php }", "title": "" }, { "docid": "680070f8d065dc7c9b4abdd724e25cc9", "score": "0.6740199", "text": "protected function initOptions()\n {\n if ($this->kcfinder) {\n $this->registerKCFinder();\n }\n\n $options = [];\n switch ($this->preset) {\n case 'custom':\n $preset = null;\n break;\n case 'basic':\n case 'full':\n case 'standard':\n $preset = 'presets/' . $this->preset . '.php';\n break;\n default:\n $preset = 'presets/standard.php';\n }\n if ($preset !== null) {\n $options = require($preset);\n }\n $this->clientOptions = ArrayHelper::merge($options, $this->clientOptions);\n }", "title": "" }, { "docid": "a6558685fcb1aee52a036ac8f44431fe", "score": "0.673274", "text": "function initialize () {\n $this->set_openingtag(\"<OPTION[attributes]>\");\n\t$this->set_closingtag(\"</OPTION>\");\n }", "title": "" }, { "docid": "440e0d59c614eac07f0a89f4a238e41b", "score": "0.672875", "text": "public function add_options_page() {\n $this->options_page = add_menu_page( $this->title, $this->title, 'manage_options', self::$key, array( $this, 'admin_page_display' ) );\n }", "title": "" }, { "docid": "b5d7a1cdabe2eacec0c61e0fde10a007", "score": "0.6725678", "text": "function add_options_page() {\n\t\t\t\tif ( function_exists('add_theme_page') ) {\n\t\t\t\t \tadd_theme_page( 'Cap &amp; Run', 'Cap &amp; Run', 'manage_options', \n\t\t\t\t\t\t\t\t\tbasename(__FILE__), array(&$this, 'options_page') );\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "be8a70b09690da131199e6cb188401a2", "score": "0.6713681", "text": "public function __construct() {\n\t\t$this->ryte_option = $this->get_option();\n\t}", "title": "" }, { "docid": "4425234d43ded35e1241f6d8b7bcb337", "score": "0.6707605", "text": "public function acf_options_page() { \n\n\t\t\t// Check ACF Admin OK\n\t\t\tif ( ! $this->admin_acf_active() ) { return; }\n\n\t\t\t// Check Options Page OK \n\t\t\tif ( ! function_exists('acf_add_options_page') ) { return; }\n\t\t\t\n\t\t\t// Add Options Page\n\t\t\t$parent = acf_add_options_page( [ \n\t\t\t\t'title' => apply_filters( 'ipress_acf_title', 'iPress' ), \n\t\t\t\t'capability' => 'manage_options', \n\t\t\t] ); \n\n\t\t\t// Set Options Page Subpages\n\t\t\t$subpages = apply_filters( 'ipress_acf_pages', [] );\n\t \n\t\t\t// Add Subpages? \n\t\t\tif ( $subpages ) {\n\t\t\t\tforeach ( $subpages as $k=>$v ) {\n\t\t\t\t\tacf_add_options_sub_page( $v );\n\t\t\t\t} \n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f820595bceb8715fe656b627a29a32fa", "score": "0.6702299", "text": "public function init() {\n\t\tadd_action( 'admin_menu', array( $this, 'add_options_page' ) );\n\t\tadd_action( 'admin_init', array( $this, 'settings_page_init' ) );\n\t}", "title": "" }, { "docid": "a223e583cbbe6d3408d18a09a18668c0", "score": "0.66943496", "text": "public function add_options_page() {\n $this->options_page = add_menu_page( $this->title, $this->title, 'manage_options', $this->key, array( $this, 'admin_page_display' ) );\n }", "title": "" }, { "docid": "40f52e3a06afe59c794b8025f899dd7f", "score": "0.668735", "text": "public function options_page()\n\t\t{\n\t\t\tif (!@include 'options-page.php'):\n\t\t\t\tprintf(__('<div id=\"message\" class=\"updated fade\"><p>The options page for the <strong>Mailgun</strong> plugin cannot be displayed. The file <strong>%s</strong> is missing. Please reinstall the plugin.</p></div>',\n\t\t\t\t\t'mailgun'), dirname(__FILE__) . '/options-page.php');\n\t\t\tendif;\n\t\t}", "title": "" }, { "docid": "cacd45510cb5a83e73f9eeb245679be8", "score": "0.668549", "text": "protected function _initOptions()\n\t{\n\t\t\n\t\t$this->options = array_merge( [\n\t\t\t'role' => 'dialog',\n\t\t\t'tabindex' => false,\n\t\t], $this->options );\n\t\t\n\t\tHtml::addCssClass( $this->options, [ 'type' => 'fade modal' ] );\n\t\t\n\t\tif( is_array( $this->clientOptions ) ) {\n\t\t\t$this->clientOptions = array_merge( [ 'show' => false ], $this->clientOptions );\n\t\t}\n\t\t\n\t\tif( is_array( $this->url ) ) {\n\t\t\t$this->url = Url::to( $this->url );\n\t\t}\n\t\t\n\t\tif( is_array( $this->closeButton ) ) {\n\t\t\t\n\t\t\t$this->closeButton = array_merge( [\n\t\t\t\t'data-dismiss' => 'modal',\n\t\t\t\t'aria-hidden' => 'true',\n\t\t\t\t'class' => 'close',\n\t\t\t], $this->closeButton );\n\t\t\t\n\t\t}\n\t\t\n\t\tif( is_array( $this->toggleButton ) ) {\n\t\t\t\n\t\t\t$this->toggleButton = array_merge( [\n\t\t\t\t'data-toggle' => 'modal',\n\t\t\t], $this->toggleButton );\n\t\t\t\n\t\t\tif( !isset( $this->toggleButton['data-target'] ) && !isset( $this->toggleButton['href'] ) ) {\n\t\t\t\t$this->toggleButton['data-target'] = '#' . $this->options['id'];\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "04b5a71b8bcda2a00a22d1f542fcdbbe", "score": "0.6676629", "text": "public function init(array $options);", "title": "" }, { "docid": "5971054afad15ea0ac17cbc0165e55f0", "score": "0.666319", "text": "function options() {\n\t\tif ( ! current_user_can( 'manage_options' ) )\t{\n\t\t\twp_die( __( 'You do not have sufficient permissions to access this page.' ) );\n\t\t}\n\t\tinclude WP_PLUGIN_DIR . '/qoorate/admin_options_page.php';\n\t}", "title": "" }, { "docid": "f71562b000fbd5706a4f129189188494", "score": "0.6661778", "text": "public function create_options_page() {\r\n\r\n\t\tadd_menu_page(\r\n\t\t\t$this->settings['heading'],\r\n\t\t\t$this->settings['menu_title'],\r\n\t\t\t'edit_theme_options',\r\n\t\t\t$this->settings['page_slug'],\r\n\t\t\tarray( $this, 'render_options_page' ),\r\n\t\t\t$this->settings['dashicon'],\r\n\t\t\t999 // Place at the bottom of the dash menu\r\n\t\t);\r\n\r\n\t}", "title": "" }, { "docid": "c9722f7839fc16794821fdf89217ee2b", "score": "0.66487646", "text": "public function admin_options() {\n\n\t\t\t?>\n\t\t\t<h3>ATOS</h3>\n\t\t\t<p><?php _e('Acceptez les paiements par carte bleue grâce à Atos.', 'woothemes'); ?></p>\n\t\t\t<p><?php _e('Plugin créé par David Fiaty', 'woothemes'); ?> - <a href=\"http://www.cmsbox.fr\">http://www.cmsbox.fr</a></p>\n\t\t\t<table class=\"form-table\">\n\t\t\t<?php\n\t\t\t\t// Generate the HTML For the settings form.\n\t\t\t\t$this->generate_settings_html();\n\t\t\t?>\n\t\t\t</table><!--/.form-table-->\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "1773730dbe2c63b1ac8fdbec55e3d41c", "score": "0.6637806", "text": "public function option_page() {\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\twp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'top-story' ) );\n\t\t}\n\n\t\tinclude_once( \"{$this->plugin->dir_path}/templates/option-page.php\" );\n\t}", "title": "" }, { "docid": "47e30c16aea9b117109db826fc4a2918", "score": "0.66328585", "text": "function setOptions() {\n\n\t\t\t/*\n\t\t\t\tOPTION TYPES:\n\t\t\t\t- checkbox: name, id, desc, std, type\n\t\t\t\t- radio: name, id, desc, std, type, options\n\t\t\t\t- text: name, id, desc, std, type\n\t\t\t\t- colorpicker: name, id, desc, std, type\n\t\t\t\t- select: name, id, desc, std, type, options\n\t\t\t\t- textarea: name, id, desc, std, type, options\n\t\t\t*/\n\n\t\t\t$this->options = array(\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Custom Logo Image <span>insert your custom logo image in the header</span>', 'titan'),\n\t\t\t\t\t\"type\" => \"subhead\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Enable custom logo image', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_logo\",\n\t\t\t\t\t\"desc\" => __('Check to use a custom logo in the header.', 'titan'),\n\t\t\t\t\t\"std\" => \"false\",\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Logo URL', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_logo_img\",\n\t\t\t\t\t\"desc\" => sprintf( __( 'Upload an image or enter an URL for your image.', 'titan' ), '<code>' . STYLESHEETPATH . '/images/</code>' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"upload\" => true,\n\t\t\t\t\t\"class\" => \"logo-image-input\",\n\t\t\t\t\t\"type\" => \"upload\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Logo image <code>&lt;alt&gt;</code> tag', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_logo_img_alt\",\n\t\t\t\t\t\"desc\" => __('Specify the <code>&lt;alt&gt;</code> tag for your logo image.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Display tagline', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_tagline\",\n\t\t\t\t\t\"desc\" => __('Check to show your tagline below your logo.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Follow Icons <span>control the follow icons in the top right of your header</span>', 'titan' ),\n\t\t\t\t\t\"type\" => \"subhead\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Enable Twitter', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_twitter_toggle\",\n\t\t\t\t\t\"desc\" => __( 'Hip to Twitter? Check this box.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Enable Facebook', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_facebook_toggle\",\n\t\t\t\t\t\"desc\" => __( 'Check this box to show a link to your Facebook page.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Enable Flickr', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_flickr_toggle\",\n\t\t\t\t\t\"desc\" => __( 'Check this box to show a link to Flickr.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Enable email', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_email_toggle\",\n\t\t\t\t\t\"desc\" => __( 'Check this box to show a link to email updates.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Disable all', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_follow_disable\",\n\t\t\t\t\t\"desc\" => __( 'Check this box to hide all follow icons (including RSS). This option overrides any other settings.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Twitter link', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_follow_twitter\",\n\t\t\t\t\t\"desc\" => __( 'Enter your twitter link here.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Facebook link', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_follow_facebook\",\n\t\t\t\t\t\"desc\" => __( 'Enter your Facebook link.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Flickr link', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_follow_flickr\",\n\t\t\t\t\t\"desc\" => __( 'Enter your Flickr link.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Email link', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_feed_email\",\n\t\t\t\t\t\"desc\" => __( 'Enter your email updates link.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Homepage Notice <span>display a notice on your homepage</span>', 'titan'),\n\t\t\t\t\t\"type\" => \"subhead\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Enable homepage notice', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_custom_notice\",\n\t\t\t\t\t\"desc\" => __('Check this box to use a custom notice on the home page.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Custom notice', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_notice_content\",\n\t\t\t\t\t\"desc\" =>\t __('The content of your custom notice.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"textarea\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t\"rows\" => \"3\",\n\t\t\t\t\t\t\"cols\" => \"50\") ),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Sidebar Sidebox <span>customize your sidebox</span>', 'titan'),\n\t\t\t\t\t\"type\" => \"subhead\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Disable sidebox', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_sidebox\",\n\t\t\t\t\t\"desc\" => __('Check this box to disable the sidebar sidebox.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Custom code', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_sidebox_custom_code\",\n\t\t\t\t\t\"desc\" => __('Check this box to use custom code for the sidebox.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Custom code content', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_sidebox_custom_code_content\",\n\t\t\t\t\t\"desc\" => __('Must use properly formatted XHTML/HTML.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"textarea\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t\"rows\" => \"7\",\n\t\t\t\t\t\t\"cols\" => \"70\") ),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Sidebar Adbox <span>control ads in your sidebar</span>', 'titan'),\n\t\t\t\t\t\"type\" => \"subhead\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Enable adbox', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_adbox\",\n\t\t\t\t\t\"desc\" => __('Check this box to enable the sidebar adbox.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Ad 1 file name', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_adurl_1\",\n\t\t\t\t\t\"desc\" => __( sprintf( __( 'Upload your image to the %s directory.' ), '<code>' . STYLESHEETPATH . '/images/sidebar/</code>' ), 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Ad 1 link', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_adlink_1\",\n\t\t\t\t\t\"desc\" => __('Link for the first ad', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Ad 1 alt tag', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_adalt_1\",\n\t\t\t\t\t\"desc\" => __('Alt tag for the first ad', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Ad 2 file name', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_adurl_2\",\n\t\t\t\t\t\"desc\" => __( sprintf( __( 'Upload your image to the %s directory.' ), '<code>' . STYLESHEETPATH . '/images/sidebar/</code>' ), 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Ad 2 link', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_adlink_2\",\n\t\t\t\t\t\"desc\" => __('Link for the second ad', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Ad 2 alt tag', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_adalt_2\",\n\t\t\t\t\t\"desc\" => __('Alt tag for the second ad', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Footer <span>customize your footer</span>', 'titan'),\n\t\t\t\t\t\"type\" => \"subhead\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('About', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_about\",\n\t\t\t\t\t\"desc\" => __('Something about you or your business.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"textarea\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t\"rows\" => \"6\",\n\t\t\t\t\t\t\"cols\" => \"80\") ),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Flickr link', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_flickr\",\n\t\t\t\t\t\"desc\" => __('Create a Flickr badge. At the end of the process extract the URL and paste here.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"textarea\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t\"rows\" => \"2\",\n\t\t\t\t\t\t\"cols\" => \"80\") ),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Copyright notice', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_copyright_name\",\n\t\t\t\t\t\"desc\" => __('Your name or the name of your business.', 'titan'),\n\t\t\t\t\t\"std\" => __('Your Name Here', 'titan'),\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Stats code', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_stats_code\",\n\t\t\t\t\t\"desc\" => __( sprintf( __( 'If you would like to use Google Analytics or any other tracking script in your footer just paste it here. The script will be inserted before the closing %s tag.' ), '<code>&#60;/body&#62;</code>' ), 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"type\" => \"textarea\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t\"rows\" => \"5\",\n\t\t\t\t\t\t\"cols\" => \"40\") ),\n\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "df2c4bf03dc2c08b08a4d2dcf9aa2bb3", "score": "0.6624976", "text": "function options() {\n require( TEMPLATE_PATH . \"/options.php\" );\n}", "title": "" }, { "docid": "89ba41badaac0d5b141c2d5068032126", "score": "0.66230065", "text": "public function register_options(){\n\t\tparent::register_options();\n\t\t//$orgzr = \\WBF\\modules\\options\\Organizer::getInstance();\n\t\t//Do stuff...\n\t}", "title": "" }, { "docid": "6bfff3cc0e7f8f07c08fe9ae83a6a15e", "score": "0.66205907", "text": "public function __construct( $option = 'academic_nav_widget' )\n {\n\t self::$option = $option;\n $this->links = $this->get_links();\n }", "title": "" }, { "docid": "024d3f0351c3d8006f5790a3c9d0027f", "score": "0.66201067", "text": "function cmh_add_options_page() {\r\n\tadd_options_page('Correct My Headings Options Page', 'Correct My Headings', 'manage_options', __FILE__, 'cmh_render_form');\r\n}", "title": "" }, { "docid": "2a2836f71f83a2ec1a4b12cb00de1e90", "score": "0.66131413", "text": "function rkt_options_page() {\n require('tmpl/options.tmpl.php');\n}", "title": "" }, { "docid": "0012731a5171b4f1d505d8eb970320f3", "score": "0.66129667", "text": "public function load_options() {\n\t\t$this->disable_hash = get_option( 'health-check-disable-plugin-hash', null );\n\t\t$this->allowed_plugins = get_option( 'health-check-allowed-plugins', array() );\n\t\t$this->default_theme = ( 'yes' === get_option( 'health-check-default-theme', 'yes' ) ? true : false );\n\t\t$this->active_plugins = $this->get_unfiltered_plugin_list();\n\t\t$this->current_theme = get_option( 'health-check-current-theme', false );\n\t}", "title": "" }, { "docid": "62d19b8ac6bea833894b0307b87eb7ea", "score": "0.6593925", "text": "function init()\n\t{\n $this->defineAttribute('ajaxController', false, 'org.glizycms.contents.controllers.autocomplete.ajax.PagePicker', COMPONENT_TYPE_STRING);\n $this->defineAttribute('type', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('protocol', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('makeLink', false, false, COMPONENT_TYPE_BOOLEAN);\n\t\t$this->defineAttribute('multiple',\tfalse, \tfalse,\tCOMPONENT_TYPE_BOOLEAN);\n $this->defineAttribute('queryString', false, __Config::get('glizycms.pagePicker.queryStringEnabled'), COMPONENT_TYPE_BOOLEAN);\n\t\tparent::init();\n\n\t}", "title": "" }, { "docid": "240bb4e9c79868613b68859d105e3425", "score": "0.65911466", "text": "public function __construct()\n {\n $this->options = [];\n }", "title": "" }, { "docid": "aca1501f9af27fd63fbae7329647d616", "score": "0.6586829", "text": "public function page_init () {\n foreach ($this->accounts as $key => $account) {\n register_setting('option_group', $account. '_account');\n }\n\n // Add section for the page.\n add_settings_section(\n 'social_accounts', // Id section.\n 'Social account settings', // Title page.\n [$this, 'create_page_info'], // Callback.\n 'settings_social_accounts' // Name of the option page SLUG.\n );\n\n foreach ($this->accounts as $key => $account) {\n $label = ucfirst($account) .' account';\n $function = 'create_'. $account .'_input';\n $account .= '_account';\n \n $this->$function = function ($account) {\n ?>\n <input type=\"text\"\n id=\"<?= $account ?>\"\n name=\"<?= $account ?>\"\n value=\"<?= $this->options[$account] ?>\"\n />\n <?php\n };\n add_settings_field(\n $account,\n $label,\n [$this, $function],\n 'settings_social_accounts',\n 'social_accounts',\n $account\n );\n }\n }", "title": "" }, { "docid": "56fdd1f7cd5166e55ce0bb4a59449af8", "score": "0.658204", "text": "public function initializeAction()\n {\n $this->totalItems = $this->widgetConfiguration['totalItems'];\n $this->itemsOffset = $this->widgetConfiguration['itemsOffset'];\n $this->itemsPerPage = $this->widgetConfiguration['itemsPerPage'];\n $this->maxPaginationLinks = $this->widgetConfiguration['maxPaginationLinks'];\n\n $this->currentPage = intval($this->itemsOffset / $this->itemsPerPage + 1);\n $this->numberOfPages = $this->itemsPerPage > 0 ? ceil($this->totalItems / $this->itemsPerPage) : 0;\n\n ArrayUtility::mergeRecursiveWithOverrule($this->linkConfiguration, $this->widgetConfiguration['linkConfiguration']);\n }", "title": "" }, { "docid": "ca94eb217ca83297d179b316169b39d0", "score": "0.6579755", "text": "function initialize() {\n \t$this->addon = $this->slplus->addon( 'power' );\n $this->settings = new SLP_Settings( array(\n 'name' => SLPLUS_NAME . ' - ' . __( 'Pages' , 'slp-power' ),\n 'form_action' => admin_url() . 'admin.php?page=slp-pages'\n ) );\n SLP_Power_Text_Pages_Tab::get_instance();\n }", "title": "" }, { "docid": "b97b2950ed63410cf4b605bd615a5428", "score": "0.65782565", "text": "public function page_init()\n {\n register_setting(\n 'cementlap_option_group', // Option group\n 'cementlap_option_name', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n 'Cementlap Custom Settings', // Title\n array( $this, 'print_section_info' ), // Callback\n 'cementlap-setting-admin' // Page\n );\n\n\n\n /***** Konténer vége ******/\n\n add_settings_field(\n 'ntd',\n 'Gyártandó termékek ekkor érkezhetnek legkorábban',\n array( $this, 'ntd_callback' ),\n 'cementlap-setting-admin',\n 'setting_section_id'\n );\n add_settings_field(\n 'subtitle',\n 'Advert Sub Title',\n array( $this, 'subtitle_callback' ),\n 'cementlap-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'button_text', // ID\n 'Advert button text', // Title\n array( $this, 'button_text_callback' ), // Callback\n 'cementlap-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'button_url', // ID\n 'Button url', // Title\n array( $this, 'button_url_callback' ), // Callback\n 'cementlap-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'change', // ID\n 'Euro arfolyam', // Title\n array( $this, 'change_callback' ), // Callback\n 'cementlap-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n add_settings_field(\n 'vat', // ID\n 'ÁFA', // Title\n array( $this, 'vat_callback' ), // Callback\n 'cementlap-setting-admin', // Page\n 'setting_section_id' // Section\n );\n\n\n }", "title": "" }, { "docid": "29b27918862ccf8836ae873a244d922c", "score": "0.6578142", "text": "function hundope_settings_init( ) { \n\n\tregister_setting( 'options_page', 'hundope_settings' );\n\t\n//We indicated the title to be description in the options page.\n\tadd_settings_section(\n\t\t'options_page_section', \n\t\t__( 'Description', 'hundope' ), \n\t\t'hundope_settings_section_callback', \n\t\t'options_page'\n\t);\n\n//The code below adds the settings field to make our dropdown menu show up.\n\tadd_settings_field( \n\t\t'hundope_select_field', \n\t\t__( 'Choose a colour from the dropdown:', 'hundope' ), \n\t\t'hundope_select_field_render', \n\t\t'options_page', \n\t\t'options_page_section' \n\t);\n\n}", "title": "" }, { "docid": "461e679756b5442e7504d82da99e100c", "score": "0.6575507", "text": "public function init_settings_page()\n\t\t{\n\n\t\t\t$this->template_header();\n\t\t\t$this->template_body();\n\t\t\t$this->template_footer();\n\n\t\t}", "title": "" }, { "docid": "3381e0013d39a1e2b2e53c326b5a5d1e", "score": "0.65723956", "text": "protected function _construct()\n {\n $this->_init('bundle/option');\n }", "title": "" }, { "docid": "c73ebdcbe8e490677418c7bb734ff15d", "score": "0.65705717", "text": "function initPlugin()\n {\n $this->getAdminOptions();\n }", "title": "" }, { "docid": "196fa707f7b132e7362eb5861ce54da7", "score": "0.65699476", "text": "function abecaf_register_options_page() {\n add_options_page( 'CAF Donations', 'CAF Donations', 'manage_options', 'abe-caf', 'abecaf_options_page' );\n}", "title": "" }, { "docid": "d594e521aba143cd28bedf352a378517", "score": "0.6556739", "text": "public function main_options_page(){\n\t\t$page_base = $this->page_url();\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"wp_lms settings\">\n\t\t\t<h1>GrandPubbah</h1>\n\n\t\t</div>\n\t\t<?\n\t\tob_end_flush();\n\t}", "title": "" }, { "docid": "ba3d5c45d297ef18f35325d8ab3e0139", "score": "0.65542334", "text": "public function page_init()\n { \n register_setting(\n 'ccgr_extras_options', // Group name. Must match the settings_fields function call\n 'cc_restricted_email_domains', // Option name\n array( $this, 'sanitize' ) // Callback function for validation.\n );\n\n add_settings_section(\n 'ccgr_extras_options', // ID for the section\n 'Registration Extras', // Title\n array( $this, 'print_section_info' ), // Callback function. Outputs section description.\n 'ccgr_extras' // Page name. Must match do_settings_section function call.\n ); \n\n add_settings_field(\n 'restricted_domains', // ID for the field\n 'Restricted Email Domains', // Title \n array( $this, 'print_domain_form_field' ), // Callback function. Outputs form field inputs.\n 'ccgr_extras', // Page name. Must match do_settings_section function call.\n 'ccgr_extras_options' // ID of the settings section that this goes into (same as the first argument of add_settings_section). \n );\n\n }", "title": "" }, { "docid": "287e2819ec3c305c313c35fdde12ac89", "score": "0.6539471", "text": "public function page_init() { \n\n\t\t\tif (!get_option('dls_settings_site_id')) {\n\t\t\t\tadd_option('dls_settings_site_id');\n\t\t\t}\n\n\t\t\tif (!get_option('dls_settings_enabled_post_types')) {\n\t\t\t\tadd_option('dls_settings_enabled_post_types');\n\t\t\t}\n\n\t\t\tif (!get_option('dls_settings_replace_host_list')) {\n\t\t\t\tadd_option('dls_settings_replace_host_list');\n }\n\n\t\t\tif (!get_option('dls_settings_auto_redirect_to_admin_page')) {\n\t\t\t\tadd_option('dls_settings_auto_redirect_to_admin_page');\n }\n\n\t\t\tif (!get_option('dls_overwrite_viewable_permalink')) {\n\t\t\t\tadd_option('dls_overwrite_viewable_permalink');\n }\n\n \t\t\tif (!get_option('dls_overwrite_viewable_permalink_host')) {\n\t\t\t\tadd_option('dls_overwrite_viewable_permalink_host');\n\t\t\t}\n \n register_setting( 'my_option_group', 'dls_settings_site_id', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_enabled_post_types', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_replace_host_list', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_auto_redirect_to_admin_page', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_overwrite_viewable_permalink', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_overwrite_viewable_permalink_host', array( $this, 'sanitize' ) );\n\n add_settings_section( 'settings_site_id', 'Site ID', array( $this, 'print_site_id' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Set the site id for this site', array( $this, 'site_id_callback'), 'my-setting-admin', 'settings_site_id' ); \n\n add_settings_section( 'setting_section_id', 'Post types settings', array( $this, 'print_post_types_info' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Select post types', array( $this, 'post_type_callback'), 'my-setting-admin', 'setting_section_id' ); \n\n add_settings_section( 'settings_replace_hosts', 'Hosts to replace', array( $this, 'print_replace_hosts_info' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'List of hosts', array( $this, 'replace_hosts_callback'), 'my-setting-admin', 'settings_replace_hosts' ); \n\n add_settings_section( 'settings_auto_redirect_to_admin', 'Auto redirect to admin page', array( $this, 'print_auto_redirect_to_admin' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Auto redirect to admin page', array( $this, 'auto_redirect_to_admin_callback'), 'my-setting-admin', 'settings_auto_redirect_to_admin' ); \n\n add_settings_section( 'settings_overwrite_viewable_permalink', 'Overwrite the viewable permalink', array( $this, 'print_overwrite_viewable_permalink' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Overwrite the viewable permalink', array( $this, 'overwrite_viewable_permalink_callback'), 'my-setting-admin', 'settings_overwrite_viewable_permalink' ); \n\t\t\tadd_settings_field( 'dls-settings-overwrite_viewable_permalink_host', 'Overwrite the viewable permalink host', array( $this, 'overwrite_viewable_permalink_host_callback'), 'my-setting-admin', 'settings_overwrite_viewable_permalink' ); \n\n\t\t}", "title": "" }, { "docid": "2b592dca91b6be67247d73551b958c57", "score": "0.6537129", "text": "protected function get_registered_options()\n {\n }", "title": "" }, { "docid": "7e4055968e0de23f4a76d70b42c1fb8e", "score": "0.6535553", "text": "public function __construct()\n\t{\n\t\t$this->options = array(\n\t\t\t'class.first' => 'first',\n\t\t\t'class.last' => 'last',\n\t\t\t'class.single' => 'single',\n\t\t);\n\t}", "title": "" }, { "docid": "cd169dfebfae55494d1173fc71dd6a91", "score": "0.6531764", "text": "protected function getOptions() {}", "title": "" }, { "docid": "cd169dfebfae55494d1173fc71dd6a91", "score": "0.6531764", "text": "protected function getOptions() {}", "title": "" }, { "docid": "cd169dfebfae55494d1173fc71dd6a91", "score": "0.65294135", "text": "protected function getOptions() {}", "title": "" }, { "docid": "28275d4be7b2313d353c9cdef6468cf1", "score": "0.65291893", "text": "function init()\n\t{\n\t\tglobal $Options, $User_Options;\n\t\t$Options\t= $this->options\t=\t$this->get( NULL , NULL , TRUE );\n\t\t// Only when aauth is enabled\n\t\tif( Modules::is_active( 'aauth' ) )\n\t\t{\n\t\t\t$User_Options = $this->user_options = $this->get( NULL , $this->events->apply_filters( 'user_id' , 0 ) );\n\t\t}\n\t\t\n\t\t\n\t\t/**\n\t\t * If language is set on dashboard\n\t\t * @since 3.0.5\n\t\t**/\n\t\tif( riake( 'site_language', $Options ) ) {\n\t\t\tget_instance()->config->set_item( 'site_language', $Options[ 'site_language' ] );\n\t\t}\n\n\t\t/** \n\t \t * Load Language\n\t\t**/\n\t\t\n\t\t$this->lang->load( 'system' );\t\n\t}", "title": "" } ]
bcced818dc92c3f34e233766da9171ba
Plug the url match to the $url parameter
[ { "docid": "687c28a12af7c04ce3bcdc84de8f1d84", "score": "0.0", "text": "public function listen(string $url)\n {\n $this->url = $url;\n }", "title": "" } ]
[ { "docid": "f373233575847a1cedb3cdaef0cb6dae", "score": "0.7131871", "text": "public function for_url($url)\n {\n }", "title": "" }, { "docid": "f373233575847a1cedb3cdaef0cb6dae", "score": "0.7131871", "text": "public function for_url($url)\n {\n }", "title": "" }, { "docid": "5f970067a679f427a53c58b346d81def", "score": "0.6571397", "text": "public function matches($url);", "title": "" }, { "docid": "2f7da8bededf1df4c51e9b972b48aa73", "score": "0.6532311", "text": "abstract protected function url_needs_replacing( $url );", "title": "" }, { "docid": "46bcf26ac9f40e750eacb8e316a57211", "score": "0.65174085", "text": "public function onRequestUrl(&$url)\n\t{\n\t\t$this->requestedUrl = '/'.$url; // Pico omits leading slash, we want it\n\t}", "title": "" }, { "docid": "ae1d4230ee7d90065fe3b72c5d441003", "score": "0.6495804", "text": "public function set_url( $url );", "title": "" }, { "docid": "0abaedee8d4eaf50d33fc3c4afa20265", "score": "0.6490027", "text": "abstract public function prepare($url);", "title": "" }, { "docid": "7e30c70812f9652e047378bd6b59a162", "score": "0.6415233", "text": "public function onRequestUrl(&$url)\n\t{\n\t\t$pattern = '/' . $this->config['page_indicator'] . '\\/[0-9]*$/';\n\t\tif (preg_match($pattern, $url)) {\n\t\t\t$page_numbers = explode('/', $url);\n\t\t\t$page_number = $page_numbers[count($page_numbers)-1];\n\t\t\t$this->page_number = $page_number;\n\t\t\tif ($this->config['sub_page']) {\n\t\t\t\t$url = $this->config['page_indicator'];\n\t\t\t} else {\n\t\t\t\t$url = preg_replace($pattern, '', $url);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->page_number = 1;\n\t\t}\n\t}", "title": "" }, { "docid": "3c00f7e02773191dfa2a5baa2cf26e8f", "score": "0.6370524", "text": "public function setUrl ($url);", "title": "" }, { "docid": "6aa998bd2161648ab62dcb4160f79c53", "score": "0.63660127", "text": "function filter_url($filter = array()) {\n\t\tforeach ($filter as $patern ) {\n\t\t\n\t\t\tif ( strpos($this->url_in, $patern) !== FALSE ) {\n\t\t\t\n\t\t\t\tunset($this->get_vars);\n\t\t\t\t$this->url = $this->url_in;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "title": "" }, { "docid": "8003eb734cb1492a54cf4e6843cb15fe", "score": "0.6350886", "text": "public function request_url(&$url)\n\t{\n\t\t$this->path = $this->format($url);\n\t}", "title": "" }, { "docid": "e1f19ab66564b0cb4d221f822f1e7ea1", "score": "0.629055", "text": "public function onRequestUrl(&$url)\n {\n // are we looking for admin?\n if ($url == $this->adminUrl) {\n $this->is_admin = true;\n }\n // are we looking for admin/new?\n if ($url == 'admin/new') {\n $this->doNew();\n }\n // are we looking for admin/open?\n if ($url == 'admin/open') {\n $this->doOpen();\n }\n // are we looking for admin/save?\n if ($url == 'admin/save') {\n $this->doSave();\n }\n // are we looking for admin/delete?\n if ($url == 'admin/delete') {\n $this->doDelete();\n }\n // are we looking for admin/logout?\n if ($url == 'admin/logout') {\n $this->is_logout = true;\n }\n }", "title": "" }, { "docid": "1ed618cdcd83e92c91d823fcd9addac4", "score": "0.62759304", "text": "static function url($url){\n foreach (self::$routes as $value) {\n if(preg_match($value['origin'], $url, $match)){\n foreach ($match as $key => $m) {\n if (!is_numeric($key)) {\n $value['redirect'] = str_replace(\":$key\", $m, $value['redirect']);\n }\n }\n return $value['redirect'];\n }\n }\n return $url;\n }", "title": "" }, { "docid": "e72abe9dec074b66817ef63d7e978e69", "score": "0.62749076", "text": "public function setUrl($url);", "title": "" }, { "docid": "e72abe9dec074b66817ef63d7e978e69", "score": "0.62749076", "text": "public function setUrl($url);", "title": "" }, { "docid": "259ed0c829bc32118952ba5ecd1fa778", "score": "0.6255449", "text": "public function setUrl($url_input){\r\n $this->url=$url_input;\r\n }", "title": "" }, { "docid": "dec62890b8ad93a1b27a3d7f1f9849e2", "score": "0.625153", "text": "public function match($url){\n\n foreach($this->routes as $route => $params){\n if(preg_match($route, $url, $matches)){\n foreach($matches as $key => $match){\n if(is_string($key)){\n $params[$key] = $match;\n }\n }\n $this->params = $params;\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "f6183bdad33b25b1cd59bbda20f4acd4", "score": "0.623092", "text": "public function setUrl($url_input){\n\t\t$this->url=$url_input;\n\t}", "title": "" }, { "docid": "6563761cc8a5ae6970f86a638acab42b", "score": "0.6227342", "text": "function match($url) {\n\t\tif (isset ( $url ['controller'] ) && isset ( $url ['plugin'] ) && $url ['plugin'] != $url ['controller']) {\n\t\t\treturn false;\n\t\t}\n\t\t$this->defaults ['controller'] = $url ['controller'];\n\t\t$result = parent::match ( $url );\n\t\tunset ( $this->defaults ['controller'] );\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c874abdfa64752947a33b38e1295edd0", "score": "0.621222", "text": "public function setUrl(string $url){}", "title": "" }, { "docid": "ace06c2acdab729db828a7bfbc134d9a", "score": "0.6144803", "text": "abstract function source_by_url ($url);", "title": "" }, { "docid": "e8a25896363d8e09b26471fb9eb3ae42", "score": "0.61427647", "text": "private function handleurl()\n {\n $url = explode('/', trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/'), 3);\n if(isset($url[0]) && $url[0] != '') {\n $this->_controller = $url[0];\n }\n if(isset($url[1]) && $url[1] != '') {\n $this->_action = $url[1];\n }\n if(isset($url[2]) && $url[2] != '') {\n $this->_params = explode('/', $url[2]);\n }\n }", "title": "" }, { "docid": "f5205e2ed23bc712b4d6691e3e9a4a42", "score": "0.61396646", "text": "public function get($url) {}", "title": "" }, { "docid": "f5205e2ed23bc712b4d6691e3e9a4a42", "score": "0.61396646", "text": "public function get($url) {}", "title": "" }, { "docid": "5bd828361bb2d7c947508f44ad2fa1cd", "score": "0.6134463", "text": "public function setUrl(){\n\n $this->url = explode('/',URI);\n\n }", "title": "" }, { "docid": "a3cf8823ba7d4d10ddd0df009fd01526", "score": "0.6130167", "text": "private function search_url()\n {\n }", "title": "" }, { "docid": "a3cf8823ba7d4d10ddd0df009fd01526", "score": "0.6129411", "text": "private function search_url()\n {\n }", "title": "" }, { "docid": "2530fdf46f4906301333044d313484d7", "score": "0.6109005", "text": "public function setUrl ($url) {\n\t\t$this->info = parse_url($url);\n\n\t\tif (isset($this->info['query'])) {\n\t\t\tparse_str($this->info['query'], $this->info['query']);\n\t\t}\n\n\t\tif (isset($this->info['path'])) {\n\t\t\t$path = array();\n\n\t\t\tforeach (explode('/', $this->info['path']) as $dir) {\n\t\t\t\tif ($dir !== '') {\n\t\t\t\t\t$path[] = $dir;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->info['path'] = $path;\n\t\t}\n\n\t\t$this->buildUrl();\n\t}", "title": "" }, { "docid": "72f0d9fc5005cc0a03ab6fefd9118a49", "score": "0.60994875", "text": "private function setUrl(): void {\r\n\r\n $this -> url = Router :: url($this -> identifier, $this -> params, $this -> domain);\r\n\r\n $url = new UrlParser($this -> url);\r\n\r\n if(null === $url -> getScheme() && strlen($this -> url) > 0) {\r\n $this -> url = '/' . $this -> url;\r\n }\r\n\r\n if(0 === strlen($this -> url)) {\r\n $this -> url = '/';\r\n }\r\n }", "title": "" }, { "docid": "f63d1d8fb7beb503293170bb09ff2e19", "score": "0.6092321", "text": "abstract public function match(string $url): bool;", "title": "" }, { "docid": "2ea68684788a5d1cc61822fa1c137fb7", "score": "0.6089645", "text": "public function seturl($url){\n $this->url = $url;\n }", "title": "" }, { "docid": "86883129423419ba945300dd4fec2c29", "score": "0.60861266", "text": "public function set_response_url($url);", "title": "" }, { "docid": "3253f7e2287c972851606bca0202f6be", "score": "0.6034919", "text": "public function onRequestUrl( &$url )\n {\n $this->debug_info['onRequestUrl'] = 'url = ' . var_export( $url, TRUE );\n }", "title": "" }, { "docid": "9ae3c209092b460ec75701571e47112b", "score": "0.60055053", "text": "public function set_url($url)\n\t{\n\t\t$this->service_name = $this->detect_service($url);\n\t\tif ($this->service_name !== FALSE)\n\t\t{\n\t\t\t$services = $this->services();\n\t\t\t$this->service = $services[$this->service_name];\n\t\t}\n\t\t\n\t\t$this->url = $this->clean_url($url);\n\t}", "title": "" }, { "docid": "106431c2bbb9ef28564d7741c41dc760", "score": "0.59653896", "text": "private static function processUrl() {\r\n\t\t\r\n\t\tself::$url = preg_replace('#\\#.*$#', '', trim(self::$url));\r\n\t\t\r\n\t\tif (!preg_match('#http://#', self::$url)) self::$url = 'http://' . self::$url;\r\n\t\t\r\n\t\t$services_regexp = array(\r\n\t\t\t'#blip\\.tv.*/file/([0-9]*)#i'\t\t\t\t\t=> 'blip',\r\n\t\t\t'#dailymotion\\.com.*/video/([^_]*)#i'\t\t\t=> 'dailymotion',\r\n\t\t\t'#flickr\\.com.*/photos/[a-zA-Z0-9]*/([^/]*)#'\t=> 'flickr',\r\n\t\t\t'#video\\.google\\..{0,5}/.*[\\?&]docid=([^&]*)#i'\t=> 'googlevideo',\r\n\t\t\t'#imeem\\.com/.*/video/([^/]*)#i'\t\t\t\t=> 'imeem',\r\n\t\t\t'#metacafe\\.com/watch/(.[^/]*)#i'\t\t\t\t=> 'metacafe',\r\n\t\t\t'#myspace\\.com/.*[\\?&]videoid=(.*)#i'\t\t\t=> 'myspace',\r\n\t\t\t'#revver\\.com/video/([^/]*)#i'\t\t\t\t\t=> 'revver',\r\n\t\t\t'#sevenload.com/.*/(videos|episodes)/([^-]*)#i'\t=> 'sevenload',\r\n\t\t\t'#veoh\\.com/.*/([^?&]*)/?#i'\t\t\t\t\t=> 'veoh',\r\n\t\t\t'#vimeo\\.com\\/([0-9]*)[\\/\\?]?#i'\t\t\t\t=> 'vimeo',\r\n\t\t\t'#youtube\\..{0,5}/.*[\\?&]v=([^&]*)#i'\t\t\t=> 'youtube' # TODO: add the support of http://www.youtube.com/v/SToOccPytl8 style URLs\r\n\t\t);\r\n\t\t\r\n\t\tforeach ($services_regexp as $pattern => $service) {\r\n\t\t\tif (preg_match($pattern, self::$url, $matches)) {\r\n\t\t\t\tself::$service = $service;\r\n\t\t\t\tif ($service == 'sevenload') self::$id = $matches[2];\r\n\t\t\t\telse self::$id = $matches[1];\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2e9a4f1fb763750a4832f07e0c6723ee", "score": "0.5940083", "text": "public function __construct($url)\r\n {\r\n // Store url\r\n $this->url = $url;\r\n }", "title": "" }, { "docid": "138e48499c4dc91ab0b696340abfdcaa", "score": "0.5939656", "text": "function parse($url) {\n\t\t$params = parent::parse ( $url );\n\t\tif (! $params) {\n\t\t\treturn false;\n\t\t}\n\t\t$params ['controller'] = $params ['plugin'];\n\t\treturn $params;\n\t}", "title": "" }, { "docid": "5ef18b07d477bf2464d300a2c27696c5", "score": "0.5930993", "text": "private function _getUrl()\n {\n $url = isset($_GET['url']) ? $_GET['url'] : null;\n $url = rtrim($url, '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $this->_url = explode('/', $url);\n }", "title": "" }, { "docid": "d8d7b2f6f7d8e5da0269e76191d00158", "score": "0.5908205", "text": "public function prepareUrl($url) {\n\t\t// if path ended with / for example something/another/ then change it to something/another/index\n//\t\tif (substr($url,-1) == '/') {\n//\t\t\t$url .= 'index';\n//\t\t}\n\n\t\t$url = str_replace('.php', '', trim($url, '/'));\n\t\t$path = $url;\n\t\t$params = array();\n\t\t$urlRules = app()->config('urlRules');\n\t\tif (!empty($urlRules)) {\n\t\t\t// displayedPath Examples: %path/subscribe, subscribe/index, subscribe\n\t\t\tforeach($urlRules as $displayedPath => $systemPath) {\n\t\t\t\t// First of all, compare the number of elements, this is to avoid url something/is opens up displayedPath something/is/wrong page\n\n\t\t\t\t// Split the displayed path: %path / subscribe\n\t\t\t\t$displayedPath_r = explode('/', $displayedPath);\n\n\t\t\t\t// Split the url: mailing-path / subscribe\n\t\t\t\t$url_r = explode('/', $url);\n\n\t\t\t\tif (count($displayedPath_r) == count($url_r)) {\n\t\t\t\t\t// If displayed path has no % and == url, set it as path\n\t\t\t\t\tif (strpos($displayedPath, '%') === false) {\n\t\t\t\t\t\tif ($displayedPath == $url) {\n\t\t\t\t\t\t\t$path = $systemPath;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\terrorLog(\"displayedPath: $displayedPath\" . \" url: $url\");\n\t\t\t\t\t\t\tif (strpos($displayedPath, $url) === 0) {\n\t\t\t\t\t\t\t\t$path = $systemPath;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// for each of displayed path element, compare with url.\n\t\t\t\t\t\t// if all parts are correct, then it is correct.\n\t\t\t\t\t\t$correct = true;\n\t\t\t\t\t\t$params = array();\n\t\t\t\t\t\tforeach($displayedPath_r as $key => $element) {\n\t\t\t\t\t\t\tif (substr($element, 0, 1) == '%') {\n\t\t\t\t\t\t\t\t$params[substr($element, 1)] = $url_r[$key];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tif (!empty($url_r[$key]) && strcmp($element, $url_r[$key]) != 0) {\n\t\t\t\t\t\t\t\t\t$correct = false;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($correct) {\n\t\t\t\t\t\t\t$path = $systemPath;\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\treturn array($path, $params);\n\t}", "title": "" }, { "docid": "1440786b13c5e418338a3ceee0e3eadc", "score": "0.58831173", "text": "public function findByUrl($url);", "title": "" }, { "docid": "1248050ecf6be7d5d30656cbc68c1eed", "score": "0.58769095", "text": "private function _getUrl()\n {\n $url = isset($_GET['url']) ? $_GET['url'] : null;\n $url = rtrim($url, '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $this->_url = explode('/', $url);\n\t\t// ou\n\t\t//$this->_url=explode('/',filter_var(rtrim($_GET['url'],'/')),FILTER_SANITIZE_URL);\n }", "title": "" }, { "docid": "5c1fd1299a941c8e75675fbad27252c3", "score": "0.5860224", "text": "public function setUrl($urlInput){\n\t\t$this->url = $urlInput;\n\t}", "title": "" }, { "docid": "6beedbb2b6c3662511bf3dc55e723450", "score": "0.5855178", "text": "function change_param ($url, $param, $valeur) \n{\n $url = filtre_param($url, $param);\n $url = add_param($url, $param, $valeur);\n //$url = preg_replace ('/(.*)([?&]*)'.$param.'=([^&]*)(.*)/', '/$1$2'.$param.'='.$valeur.'$4/', $url);\n return $url;\n}", "title": "" }, { "docid": "cee834f9badaa418e8e37983070de480", "score": "0.5851431", "text": "public function get($url);", "title": "" }, { "docid": "98b026dddd810cdfd6e851b10ebd2374", "score": "0.5840649", "text": "public function setUrl($url)\n {\n // url must start with '/'\n if('/' !== $url[0]) $url = '/' . $url;\n\n // url should not end with '/'\n if('/' === substr($url, -1)) $url = substr($url, 0, -1);\n\n // set the url\n $this->url = $url;\n \n // set the individual segments\n $segments = explode('/', substr($this->url, 1));\n \n for ($i = 0; $i < count($segments); $i++)\n {\n $seg = $segments[$i];\n \n // wildcard segment (must be end)\n if ($seg == '*')\n {\n $this->addSegment($i, $seg);\n break;\n }\n \n // segment is regex\n if ($seg[0] == '#')\n {\n $this->addSegment($i, $seg);\n continue;\n }\n \n // segment is a constraint\n if (preg_match('/\\{(.*)\\}/', $seg, $matches))\n {\n $this->addSegment($i, '#^' . $this->getConstraint($matches[1]) . '$#');\n continue;\n }\n \n // segment is straight text\n $this->addSegment($i, '#^' . $seg . '$#');\n }\n\n return $this;\n }", "title": "" }, { "docid": "661eb39a48a9e1237ea3c8c926787743", "score": "0.58295995", "text": "public function match($url)\n {\n foreach ($this->routes as $route => $params) {\n // Überprüfe, welche Route mit der URL Matched und speichere sie in eine Variable\n if (preg_match($route, $url, $matches)) {\n\n foreach ($matches as $key => $match) {\n // Wenn der Key ein String ist, dann ist es ein Parameter\n if (is_string($key)) {\n $params[$key] = $match;\n }\n }\n\n $this->params = $params;\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "0e933c80d2f9e95404ef9c973a383b28", "score": "0.5823394", "text": "public function __construct ($url) {\n\t$this->url = $url;\n }", "title": "" }, { "docid": "c4d4770dc9e8f15a5a3aedb822c52f21", "score": "0.58119243", "text": "function __construct ($url) {\n\t\n\t\t$this->url = $url;\n\t\n\t}", "title": "" }, { "docid": "7e96ceb79597aad967a5ca8eeced7a24", "score": "0.5802938", "text": "abstract public function urlQuerystring($url);", "title": "" }, { "docid": "7d4554e0ee6c12c2d6d953212f28bdc1", "score": "0.5800147", "text": "function u_parse_url ($url) {\n ARGS('s', func_get_args());\n return OMap::create(parse_url($url));\n }", "title": "" }, { "docid": "9925c0ed8280fb7ddc67ea36bed5abf3", "score": "0.5799001", "text": "public function __construct($url)\n {\n $this->url = $url;\n }", "title": "" }, { "docid": "9925c0ed8280fb7ddc67ea36bed5abf3", "score": "0.5799001", "text": "public function __construct($url)\n {\n $this->url = $url;\n }", "title": "" }, { "docid": "9925c0ed8280fb7ddc67ea36bed5abf3", "score": "0.5799001", "text": "public function __construct($url)\n {\n $this->url = $url;\n }", "title": "" }, { "docid": "9925c0ed8280fb7ddc67ea36bed5abf3", "score": "0.5799001", "text": "public function __construct($url)\n {\n $this->url = $url;\n }", "title": "" }, { "docid": "9925c0ed8280fb7ddc67ea36bed5abf3", "score": "0.5799001", "text": "public function __construct($url)\n {\n $this->url = $url;\n }", "title": "" }, { "docid": "01e67bfc764431cd5f529b9f522b8f84", "score": "0.57984614", "text": "public function setUrl($url)\n {\n $this->url = $url;\n\n if (substr($this->url, -1, 1) !== '/') {\n $this->url = $this->url . '/';\n }\n\n $this->url_parts = parse_url($this->url);\n\n // workaround for providers that don't use the default .vcf extension\n if (strpos($this->url, \"google.com\"))\n {\n $this->setVcardExtension(\"\");\n }\n }", "title": "" }, { "docid": "bfe455f1fd8bf6353e7c1ec591fb9d18", "score": "0.5796129", "text": "public function __construct ($url) {\n\t\t$this->setUrl($url);\n\t}", "title": "" }, { "docid": "2f706dba77303fe2de1bfe99ba09ac73", "score": "0.57927", "text": "public function get($url)\n {\n }", "title": "" }, { "docid": "8aacf9cf3043823146b5edcae00a77ee", "score": "0.5790068", "text": "public function __construct($url) {\n\t\t$this->url = $url;\n\t}", "title": "" }, { "docid": "09eff486f6746be5d5179c1dfa621d78", "score": "0.5786906", "text": "function zend_set_url_param($url,$param_key,$param_value)\n{\n $url = $url |'';\n $param_value = $param_value | '';\n\n $url_info = parse_url($url);\n $query_string = $url_info['query'];\n $base_url = str_ireplace($query_string, '',$url);\n $query_string_array = split('[&]',$query_string);\n\n $new_url = $base_url;\n if ($param_key && $query_string_array)\n {\n $new_url .=strpos($new_url, '?') !==false ? '': '?';\n\n $query_string_array[] = $param_key.'='.($param_value|'');\n $i = 1;\n\n foreach ($query_string_array as $key_value) {\n if (zend_start_with($key_value,$param_key)) {\n $new_url .= ($i==1?'':'&').$param_key.'='.($param_value|'');\n }else\n {\n $new_url .= ($i==1?'':'&').$key_value;\n }\n\n $i ++;\n }\n\n }else\n {\n $new_url = $url;\n }\n\n\n return $new_url;\n}", "title": "" }, { "docid": "21b791c4d0131be6df3daf50d3ec562a", "score": "0.57821333", "text": "public function __construct($url)\n {\n $this->_url = $url;\n }", "title": "" }, { "docid": "1027ac272c4861024568824ea83b992f", "score": "0.5776593", "text": "private function _handleURL() {\n try {\n $rawurl = isset($_GET['url']) ? $_GET['url'] : null;\n $url = rtrim($rawurl, '/');\n #SwipezLogger::debug(__CLASS__, \"url : \" . $url);\n $filterurl = filter_var($url, FILTER_SANITIZE_URL);\n #SwipezLogger::debug(__CLASS__, \"filterurl : \" . $filterurl);\n\n $this->_url = explode('/', $filterurl);\n $length = count($this->_url);\n\n\n //This block is for root domain level invocation of Siddhivinayak i.e. http://www.Siddhivinayak.in/\n if ($this->_url[0] == \"\") {\n $this->_loadDefaultController();\n return;\n }\n\n\n $firstLevel = $this->_url[0];\n $firstLevel = ucfirst($firstLevel);\n $accessdenied = array(\"Uploads\", \"Images\", \"Css\", \"Js\", \"Fonts\", \"Inc\");\n if (in_array($firstLevel, $accessdenied)) {\n header('Location: /error');\n exit;\n }\n if (substr($rawurl, -1) == \"/\") {\n $redirectUrl = \"/\" . substr_replace($rawurl, \"\", -1);\n header('Location:' . $redirectUrl, TRUE, 301);\n }\n\n switch ($firstLevel) {\n \n case 'Admin':\n $this->_handleAdminURL();\n break;\n case 'Login':\n $this->_handleGenericURL($firstLevel);\n case 'Logout':\n $this->_handleGenericURL($firstLevel);\n break;\n case 'Home':\n $this->_handleGenericURL($firstLevel);\n break;\n case 'Profile':\n $this->_handleGenericURL($firstLevel);\n break;\n default :\n $this->_error();\n break;\n }\n } catch (Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "3ffc9eeff67ac4ae0149a95c1cb4094a", "score": "0.57759845", "text": "static function parse($url, $request) {\n $url = trim($url, '/');\n //This part is reserved for the conversion of the routing system\n //so if we detect any changement in the url, and if it matches the\n //rules defined in the connection function then we do the conversion\n //and we inject the new values for the controller, action and params\n \n foreach(self::$routes as $value){\n if(preg_match($value['catcher'], $url, $match)){\n $request->controller = $value['controller'];\n $request->action = $value['action'];\n $request->params = array();\n foreach ($value['params'] as $k => $v) {\n $request->params[$k] = $match[$k];\n return $request;\n }\n }\n }\n\n $params = explode('/', $url);\n $request->controller = $params[0];\n $request->action = isset($params[1]) ? $params[1] : 'index';\n $request->params = array_slice($params, 2);\n return true;\n }", "title": "" }, { "docid": "98d09a0ce53a4827fcc47c8c6bfbff7b", "score": "0.57620305", "text": "public function modify_url( $url ) {\n\t\t\n\t\t$url = str_replace( 'https://www.wpbeaverbuilder.com/?', 'https://www.wpbeaverbuilder.com/godaddy/?', $url );\n\t\t$url = str_replace( array( 'utm_medium=bb-lite', 'utm_medium=bb-pro' ), 'utm_medium=bb-gd', $url );\n\t\t\n\t\treturn add_query_arg( 'fla', $this->id, $url );\n\t}", "title": "" }, { "docid": "53a60ac7ec74b40305b25376a5a4d2b5", "score": "0.5758324", "text": "public function match($url)\n {\n foreach ($this->routes as $route => $params) {\n if(preg_match($route, $url, $matches)) {\n foreach($matches as $key => $match) {\n if (is_string($key)) {\n $params[$key] = $match;\n }\n }\n $this->params = $params;\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "a0f32252dd4c649b36c7e2bc3b534076", "score": "0.5757619", "text": "function url($url = null, $return = false) {\r\n\t\tif (isset($this->plugin)) {\r\n\t\t\t$base = strip_plugin($this->base, $this->plugin);\r\n\t\t} else {\r\n\t\t\t$base = $this->base;\r\n\t\t}\r\n\r\n\t\tif (empty($url)) {\r\n\t\t\treturn $this->here;\r\n\t\t} elseif($url{0} == '/') {\r\n\t\t\t$output = $base . $url;\r\n\t\t} else {\r\n\t\t\t$output = $base . '/' . Inflector::underscore($this->params['controller']) . '/' . $url;\r\n\t\t}\r\n\r\n\t\treturn $this->output($output, $return);\r\n\t}", "title": "" }, { "docid": "075db5431ae15e2746e7e880151671c0", "score": "0.5747378", "text": "public function __construct($url)\n {\n //\n\t\t$this->url = $url;\n }", "title": "" }, { "docid": "cb267f718a3997f13f08c335a55a7fb8", "score": "0.5745324", "text": "public function setUrlPattern($urlPattern);", "title": "" }, { "docid": "d39e45ac4931d2bd26be24b848490103", "score": "0.5733252", "text": "abstract public function editURL();", "title": "" }, { "docid": "ea8a58465191891b315fc4f74bc498e0", "score": "0.57277954", "text": "public function AddUrlCategoryMatch($url, $cid)\r\n\t{\r\n\t\t$sql = sprintf(\"replace into `url_categories_match`(url,cid) values('%s',%d)\",$url,$cid);\r\n\t\tmysql_query($sql);\r\n\t}", "title": "" }, { "docid": "df984a26a6111341c3b3be2dadc33418", "score": "0.57225746", "text": "abstract public function resolveURL();", "title": "" }, { "docid": "cf434fbb4c4137f3d3701c34339b121a", "score": "0.57142997", "text": "function url_filter($url){\n\treturn true;\n}", "title": "" }, { "docid": "56350fcbf66e9464f8a58d1c99552b17", "score": "0.57138497", "text": "public function setUrl($url='') {\n $this->url = $url;\n }", "title": "" }, { "docid": "72cfbc1473a879975bfc15bd00d0b898", "score": "0.5713748", "text": "abstract public static function url();", "title": "" }, { "docid": "0cc7651b840913e642ba45779ddf6b4f", "score": "0.57038784", "text": "function geoservice_url ($url)\r\n{\tif (preg_match('/^doc(\\d+)/',$url,$match)) \r\n\t{\t$id = intval($match[1]);\r\n\t/*\r\n\t\t$row = spip_fetch_array(spip_query(\"SELECT * FROM spip_documents WHERE id_document=$id LIMIT 0,1\"));\r\n\t\treturn _DIR_IMG.$row['fichier'];\r\n\t*/\r\n\t\tinclude_spip('urls/standard');\r\n\t\treturn (generer_url_document($id));\r\n\t}\r\n\telse return $url;\r\n}", "title": "" }, { "docid": "1ee59d05b328771cc8b84c960b06b499", "score": "0.56941485", "text": "function setUrl($url)\n {\n $this->surl = $url;\n }", "title": "" }, { "docid": "452de1292ab29de4b97d303f8ce435d5", "score": "0.56904036", "text": "public static function format_url($url)\n {\n }", "title": "" }, { "docid": "6a710960070dc0352465183f76ba26c1", "score": "0.5690372", "text": "public function setUrl(string $url): void;", "title": "" }, { "docid": "56c19cb8579096f3ea137d07fcfd39de", "score": "0.5689695", "text": "private function getUrl()\n {\n $this->url = isset($_GET['url']) ? $_GET['url'] : null;\n $this->url = rtrim($this->url, '/');\n $this->url = filter_var($this->url, FILTER_SANITIZE_URL);\n $this->url = explode('/',$this->url);\n }", "title": "" }, { "docid": "de2a14e793f37e5acf04abac353a536f", "score": "0.568854", "text": "protected function match(){\n \n $this->jet->apps = $this->default;\n $this->jet->askedRoute = 'default';\n \n if(!is_array($this->jet->uri_array) || count($this->jet->uri_array) == 0){\n Log::save(\"Empty user uri, render default\");\n return;\n }\n \n $uri = trim(implode('/', $this->jet->uri_array), \"/\");\n \n if(isset($this->routes[$uri])){\n Log::save('Routed url '.$uri);\n\n $this->jet->apps = $this->routes[$uri];\n $this->jet->askedRoute = $uri;\n return;\n }\n \n foreach ($this->parsed_routes as $route => $val){\n if (preg_match('#'.$route.'$#', $uri, $array)){\n Log::save('Routed url '.$route);\n\n $method_args = array();\n foreach($array as $name => $value){\n if(!is_int($name)) $method_args[$name] = $value;\n }\n\n //now, let's rock!\n $this->jet->apps = $this->parsed_routes[$route];\n $this->jet->options = $method_args;\n $this->jet->askedRoute = $uri;\n \n return;\n }\n }\n // third, if no routes look like our uri, try the 404 route\n Log::save('Routed url 404 : '.$uri, Log::WARNING);\n\n // Check if a 404 route exists. If not, render the default route\n if(count($this->error) == 0) return;\n \n $this->jet->apps = $this->error;\n $this->jet->options = array('url' => $uri);\n $this->jet->askedRoute = \"notFound\";\n\n return;\n }", "title": "" }, { "docid": "712ada0f17f8116a3408b98d022afbe0", "score": "0.56770843", "text": "public function setParam(){\n\n $this->param = !empty($this->url[4]) ? $this->url[4] :'';\n\n }", "title": "" }, { "docid": "3200c20e86863563695f44932a8ac4c1", "score": "0.56753165", "text": "function jot_set_url($hook, $type, $url, $params) {\n\t$entity = $params['entity'];\n\tif (is_jot($entity)) {\n\t\treturn \"jot/view/$entity->guid\";\n\t}\n}", "title": "" }, { "docid": "11efb7567dd7b1817b67d7fc70e6a976", "score": "0.5670487", "text": "function add_param ($url, $param, $valeur) \n{\n if ((strpos($url, '&')) !== false || (strpos($url, '?')) !== false) {\n $url .= '&' . $param . '=' . $valeur;\n } else {\n $url .= '?' . $param . '=' . $valeur;\n }\n $recherche = array('/&&/', '/&$/', '/\\?&/');\n $remplace = array('&', '', '?');\n return preg_replace($recherche, $remplace, $url);\n}", "title": "" }, { "docid": "1f91c77336fff83fe8f83a0a7a2a8629", "score": "0.56691754", "text": "function photoboard_notifications_prepare_url( $url ) {\n\n\t\t// If URL has a '?', add an '&'.\n\t\t// Otherwise, add a '?'.\n\t\t$url_status = strpos($url, '?');\n\t\tif ( $url_status === false ) {\n\t\t\t$concate = '?';\n\t\t}\n\t\telse {\n\t\t\t$concate = '&';\n\t\t}\n\n\t\treturn $url . $concate;\n\n\t}", "title": "" }, { "docid": "4b3ce6750311a62124698a9e0fa9664c", "score": "0.5668157", "text": "public function __construct($url) {\n\t\t$this->URL = $url;\n\t}", "title": "" }, { "docid": "31747d1958c31baac945219219037ccb", "score": "0.5664254", "text": "public function setUrl(string $url){\n\t\t$this->url = $url;\n\t}", "title": "" }, { "docid": "11c1372034222877062a8cce06717199", "score": "0.565481", "text": "public function setUrl($url) {\n $this->url = $url;\n }", "title": "" }, { "docid": "2ba5b292f45a82ccc5a18572ac8dc350", "score": "0.5646631", "text": "function handleNewUrl($url, $ch) {\n\tglobal $message;\n\t$effectiveUrl = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);\n\tif ( $effectiveUrl != $url ) {\n\t\t$message .= \"#NEW URL $url is now $effectiveUrl.\" . PHP_EOL;\n\t\t$dbh = PdoManager::getInstance();\n\t\ttry {\n\t\t\t$stmt = $dbh->prepare(\"UPDATE files SET url=:effectiveUrl WHERE url=:url\");\n\t\t\t$stmt->bindParam(':effectiveUrl', $effectiveUrl);\n\t\t\t$stmt->bindParam(':url', $url);\n\n\t\t\tif($stmt->execute()) {\n\t\t\t\t$message .= \"#UPDATE URL Updated \" . $stmt->rowCount() . \" row. SET url=$effectiveUrl WHERE url=$url.\" . PHP_EOL;\n\t\t\t\treturn $effectiveUrl;\n\t\t\t} else {\n\t\t\t\t$message .= \"#UPDATE URL Update failed: SET url=$effectiveUrl WHERE url=$url.\" . PHP_EOL;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\t$message .= \"#UPDATE URL Update failed: SET url=$effectiveUrl WHERE url=$url.\" . PHP_EOL;\n\t\t\t$message .= $e->getMessage() . PHP_EOL;\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\treturn $url;\n}", "title": "" }, { "docid": "152b94a7d2d179bc5f4b7fc3e077d53d", "score": "0.5644015", "text": "protected function configureURL()\n {\n $url = $this->_URL;\n if ($this->requiresOptions()) {\n foreach ($this->Options as $key => $option) {\n $url = preg_replace('/(\\$.*?[^\\/]*)/', $option, $url, 1);\n }\n }\n $url = $this->baseUrl.$url;\n $this->setUrl($url);\n }", "title": "" }, { "docid": "406aaee327d8e6f12d9e2d1bd4c876af", "score": "0.5637533", "text": "function search_url($search_str)\n\t{\n\t\t$this -> db -> like ('url', $search_str);\n\t\t# Only show non-restricted and visible resources \n\t\t$this -> db -> where('restricted', 0);\n\t\t$this -> db -> where('visible', 1);\n\t\t$query = $this -> db -> get('gh_resource');\t\t\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "8903e4d180d41a99b72a6813537ad433", "score": "0.56343085", "text": "public function show($url)\n {\n\n }", "title": "" }, { "docid": "4cec1f87fa9bf847e33daa26853b4f80", "score": "0.5630554", "text": "public function match($url)\n {\n $request = request();\n\n if (isset($this->routes['static'][$url])) {\n $this->action = $this->routes['static'][$url];\n return true;\n }\n\n foreach ($this->routes['dynamic'] as $route => $action) {\n if (preg_match($route, $url, $matches)) {\n $params = [];\n // Get named capture group values\n foreach ($matches as $key => $match) {\n if (is_string($key)) {\n $request->setParam($key, $match);\n }\n }\n\n $this->action = $action;\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "f1d11dcb7e2e3aaa35d6bc63875dea4e", "score": "0.5628697", "text": "public function __construct(string $url) {\n $this->url = $url;\n }", "title": "" }, { "docid": "8ad772b8678c7d72282e9a72b8d527b6", "score": "0.5627857", "text": "private function _prepareUrl()\n {\n $this->searchRequest->queryString = urlencode($this->searchRequest->queryString);\n $this->requestUrl = sprintf($this->urlFormat,$this->searchRequest->queryString);\n }", "title": "" }, { "docid": "551651eab7cfc13601ef84f0a00cd0e0", "score": "0.5626329", "text": "public function amOnUrl($url): void {\n $this->getScenario()->runStep(new \\Codeception\\Step\\Condition('amOnUrl', func_get_args()));\n }", "title": "" }, { "docid": "e19069ad3dc557f6916b20e9a111264e", "score": "0.56161505", "text": "private static function match($url) {\n\t\t$url = preg_replace('/\\/$/', '', $url);\n\n\t\t// look in $routes array and see if $url matches regex of $route\n\t\tforeach (self::$routes as $route => $param) {\n\n\t\t\tif (preg_match($route, $url, $matches)) {\n\n\t\t\t\t// if match found, save array to $params\n\t\t\t\t// e.g.\n\t\t\t\t// [controller]\t=> url0\n\t\t\t\t// [action]\t\t\t=> url1\n\n\t\t\t\tforeach ($matches as $key => $value) {\n\t\t\t\t\tif (is_string($key)) $param[$key] = $value;\n\t\t\t\t}\n\n\t\t\t\tself::$params = $param;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9ec708f69ac179ea2ca710f58f160180", "score": "0.56160957", "text": "abstract function url_by_source ($source);", "title": "" }, { "docid": "367c31f259af447de19c2da7ec2fdadd", "score": "0.5615687", "text": "public static function get($url)\n {\n }", "title": "" }, { "docid": "4234ae63ffa76374531aafd53dc6222b", "score": "0.5604134", "text": "public function show(url $url)\n {\n }", "title": "" }, { "docid": "01463d4f1f24ef9c8fea6af796fb2261", "score": "0.5592527", "text": "function setupURL($url) {\n //with this setup the URL would be\n // http://rooturl.com/controller/function/args\n // where controller is the name of the class, \n // function is the name of a function in that class,\n // args (if any) get passed to that function\n $trimmedUrl = rtrim($url, '/');\n return(explode('/', $trimmedUrl));\n }", "title": "" }, { "docid": "b133156212b8ac530e8b77a47f9945de", "score": "0.5588609", "text": "public function get_by_url($url = null)\n\t{\n\t\tif (empty($url)) $url = '/';\n\t\t$version = i('version',current)['lang']->get();\n\t\t$this->get(array(\n\t\t\t'url' => array(\n\t\t\t\t'%\"'.$version.'___'.str_replace('/','\\\\\\\\/',$url).'\"%', // new format\n\t\t\t\t$url // old format\n\t\t\t),\n\t\t\t'limit()' => 1)\n\t\t);\n\t}", "title": "" } ]
3a3f83af3221972b71c991e62e6ca97f
Remove the WP Time Capsule plugin update notice when the plugin is hidden.
[ { "docid": "0438b9b3e5cf7d1938f55baa100d15d4", "score": "0.63440084", "text": "public function hide_update_notice( $slugs ) {\n\t\t$slugs[] = 'wp-time-capsule/wp-time-capsule.php';\n\t\treturn $slugs;\n\t}", "title": "" } ]
[ { "docid": "5809d3244005ce5790aee0458aafa81b", "score": "0.71702313", "text": "function wp_hide_update() {\n remove_action('admin_notices', 'update_nag', 3);\n}", "title": "" }, { "docid": "68b567c085bc1d4aaf69f527ccdddae2", "score": "0.6792766", "text": "function hypnotherapy_callback_hide_admin_notice() {\n\t\tupdate_option('hypnotherapy_admin_notice', '0');\n\t\texit;\n\t}", "title": "" }, { "docid": "af6b50e351afef5c9a982f0e6d6791b0", "score": "0.66933703", "text": "public function set_showhide() {\n\t\t$hide = isset( $_POST['showhide'] ) && ( 'hide' === $_POST['showhide'] ) ? 'hide' : '';\n\t\tMainWP_Helper::update_option( 'mainwp_time_capsule_hide_plugin', $hide, 'yes' );\n\t\t$information['result'] = 'SUCCESS';\n\t\treturn $information;\n\t}", "title": "" }, { "docid": "93bc3c02c54db1bebbd5a8984db90731", "score": "0.65362155", "text": "function pmpro_update_1_9_4_notice_dismiss() {\n\tif( !empty( $_REQUEST['pmpro_div_notice_hide'] ) ) {\n\t\tupdate_option( 'pmpro_hide_div_notice', 1 );\n\t}\n}", "title": "" }, { "docid": "c2726a398965a3c6b26f3fda63199d8f", "score": "0.6495291", "text": "function dismiss_update_notice() {\r\r\n\t\t// Check the nonce and if not isset the id, just die.\r\r\n\t\tif ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'cf7skins_update_notice' ) ) {\r\r\n\t\t\tdie();\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\t// Set skip interval based on current time\r\r\n\t\tupdate_option( 'cf7skins_update_notice', current_time( 'timestamp' ) + $this->skip_interval );\r\r\n\t\t\r\r\n\t\texit();\r\r\n\t}", "title": "" }, { "docid": "a610c858158861bef83bb1644b327f31", "score": "0.64834076", "text": "function hide_update_notice() {\r\n get_currentuserinfo();\r\n if (!current_user_can('manage_options')) {\r\n remove_action( 'admin_notices', 'update_nag', 3 );\r\n }\r\n}", "title": "" }, { "docid": "0477ce9993a87be5c77cb64bb8f2988c", "score": "0.646897", "text": "public function review_notice() {\n\t\tif ( !get_option( 'sydney_theme_installed_time' ) ) {\n\t\t\tupdate_option( 'sydney_theme_installed_time', time() );\n\t\t}\n\t}", "title": "" }, { "docid": "666e283c15fd5206c9e068ffa19caf76", "score": "0.64167535", "text": "function et_close_extra_notice(){\n\tupdate_option( 'etheme_extra_notice_show', false );\n}", "title": "" }, { "docid": "36fa3847e3263353bce09489c82f0bed", "score": "0.6378904", "text": "function wc_admin_update_130_remove_dismiss_action_from_tracking_opt_in_note()\n {\n }", "title": "" }, { "docid": "4fababaa20b6023b7785f06bd48dfa94", "score": "0.63582647", "text": "public static function hide_notices() {\n\t\t\tif ( isset( $_GET['himalayas-hide-notice'] ) && isset( $_GET['_himalayas_notice_nonce'] ) ) {\n\t\t\t\tif ( ! wp_verify_nonce( $_GET['_himalayas_notice_nonce'], 'himalayas_hide_notices_nonce' ) ) {\n\t\t\t\t\twp_die( __( 'Action failed. Please refresh the page and retry.', 'himalayas' ) );\n\t\t\t\t}\n\n\t\t\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\t\t\twp_die( __( 'Cheatin&#8217; huh?', 'himalayas' ) );\n\t\t\t\t}\n\n\t\t\t\t$hide_notice = sanitize_text_field( $_GET['himalayas-hide-notice'] );\n\t\t\t\tupdate_option( 'himalayas_admin_notice_' . $hide_notice, 1 );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "eb8efbdebcf1f237d99814d03819ea53", "score": "0.6329941", "text": "public function seb_customizer_notice() {\n\t\t$notices = get_option( 'seb_activation_notice' );\n\n\t\tif ( $notices = get_option( 'seb_activation_notice' ) ) {\n\n\t\t\tforeach ( $notices as $notice ) {\n\t\t\t\techo '<div class=\"notice is-dismissible updated\">' . $notice . '</div>';\n\t\t\t}\n\n\t\t\tdelete_option( 'seb_activation_notice' );\n\t\t}\n\t}", "title": "" }, { "docid": "fd27e35367db44786c7910b398602e6b", "score": "0.6310888", "text": "public static function dismiss_admin_notice_on_theme_activation() {\n\t\tthe7_admin_notices()->dismiss_notice( 'the7_auto_deactivation' );\n\t}", "title": "" }, { "docid": "94269d941b23fceb6043d46e240d0e01", "score": "0.62866193", "text": "public function wsh_deactivate_plugin(){\n \twp_clear_scheduled_hook('wsh_task_update_prices');\n }", "title": "" }, { "docid": "88886bf04afb21f8121634ad3523eba2", "score": "0.62863445", "text": "public static function hide_notices() {\r\n\t\tif ( isset( $_GET['mise-hide-notice'] ) && isset( $_GET['_mise_notice_nonce'] ) ) {\r\n\t\t\tif ( ! wp_verify_nonce( sanitize_key($_GET['_mise_notice_nonce'] ), 'mise_hide_notices_nonce' ) ) {\r\n\t\t\t\twp_die( esc_html__( 'Action failed. Please refresh the page and retry.', 'mise' ) );\r\n\t\t\t}\r\n\t\t\tif ( ! current_user_can( 'manage_options' ) ) {\r\n\t\t\t\twp_die( esc_html__( 'Cheatin&#8217; huh?', 'mise' ) );\r\n\t\t\t}\r\n\t\t\t$hide_notice = sanitize_text_field( wp_unslash($_GET['mise-hide-notice'] ));\r\n\t\t\tupdate_option( 'mise_admin_notice_' . $hide_notice, 1 );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f4a92976c26db9db8aa79f9364e8f3e9", "score": "0.62604725", "text": "function wp_ajax_ic_dismissed_notice_handler() {\r\n\t\t\t$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : '';\r\n\t\t\tif($type == 'ic_upgrade_notice'){\r\n\t\t\t\tupdate_option( 'dismissed-' . $type, TRUE );\r\n\t\t\t\tdelete_transient('ic_upgrade_notices_transient');\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "4274e00cc6576ace7bda5cb3cd4a6463", "score": "0.6255466", "text": "public static function plugin_deactivation_notice()\n {\n }", "title": "" }, { "docid": "9863a46022184b8438c370e0b2585573", "score": "0.6252168", "text": "function hgr_admin_notices() {\n\t\t if ($notices= get_option('hgr_admin_notices')) {\n\t\t\tforeach ($notices as $notice) {\n\t\t\t echo \"<div class='updated notice is-dismissible'><p>$notice</p></div>\";\n\t\t\t}\n\t\t\tdelete_option('hgr_admin_notices');\n\t\t }\n\t\t}", "title": "" }, { "docid": "88b4ef3436d8cc5b883b1c19f5465354", "score": "0.6196245", "text": "public function show_notice_to_deactivate_lite() {\n\t\tif ( false === is_plugin_active( 'mailchimp-for-wp/mailchimp-for-wp.php' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t?><div class=\"updated\">\n\t\t\t<p><?php printf( __( '<strong>Welcome to MailChimp for WordPress Pro!</strong> We transfered the settings you had set in the Lite version, please <a href=\"%s\">deactivate it now</a> to prevent problems', 'mailchimp-for-wp' ), admin_url( 'plugins.php#mailchimp-for-wp' ) ); ?></p>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "a128bb78e7907ef44a5dd4381823614f", "score": "0.61852026", "text": "public static function settings_cta_dismiss() {\n\t\tFrmAppHelper::permission_check( 'frm_change_settings' );\n\n\t\tupdate_option( 'frm_lite_settings_upgrade', time(), 'no' );\n\n\t\twp_send_json_success();\n\t}", "title": "" }, { "docid": "5ce85e3097462ad63773fa7fe5dbb183", "score": "0.6166478", "text": "function trt_dismiss_admin_notice() {\n\tglobal $current_user;\n\t$user_id = $current_user->ID;\n\t/* If user clicks to ignore the notice, add that to their user meta */\n\tif ( isset( $_GET['trt_ignore_notice'] ) && '0' === $_GET['trt_ignore_notice'] ) {\n\t\tadd_user_meta( $user_id, 'trt_ignore_notice', 'true', true );\n\t}\n}", "title": "" }, { "docid": "4c57ac5b6c0db38c5d9e9551850bbb31", "score": "0.61618906", "text": "public function show_deactivate_notice() {\n\t\techo '<div class=\"updated\"><p>', esc_html__( 'wpSEO has been deactivated', 'wordpress-seo' ), '</p></div>';\n\t}", "title": "" }, { "docid": "d733eb633adf4ab70a2e520663a69f7a", "score": "0.6153391", "text": "public function remove_avadaredux_notices() {\n\t\tif ( class_exists( 'AvadaReduxFrameworkPlugin' ) ) {\n\t\t\tremove_filter( 'plugin_row_meta', array( AvadaReduxFrameworkPlugin::get_instance(), 'plugin_metalinks' ), null, 2 );\n\t\t\tremove_action( 'admin_notices', array( AvadaReduxFrameworkPlugin::get_instance(), 'admin_notices' ) );\n\t\t\tremove_action( 'admin_notices', array( AvadaReduxFrameworkInstances::get_instance( Avada::get_option_name() ), '_admin_notices' ), 99 );\n\t\t\t// Remove the admin metabox.\n\t\t\tremove_meta_box( 'avadaredux_dashboard_widget', 'dashboard', 'side' );\n\t\t}\n\t}", "title": "" }, { "docid": "78f008c73e56caf187b9ed88cd4d52a1", "score": "0.6120539", "text": "public function hide_automotive_message() {\n\t\t\t$hidden_notices = get_option( \"automotive_hide_messages\" );\n\t\t\t$hidden_notices = ( empty( $hidden_notices ) ? array() : $hidden_notices );\n\n\t\t\t$hidden_notices[] = sanitize_text_field( $_POST['id'] );\n\n\t\t\tupdate_option( \"automotive_hide_messages\", $hidden_notices );\n\t\t}", "title": "" }, { "docid": "c285b73796cb9aaa9344be44dc104e9c", "score": "0.61194074", "text": "function hfcm_plugin_notice_dismissed() {\n $user_id = get_current_user_id();\n\t\t// Checking if user clicked on the Dismiss button\n if ( isset( $_GET['hfcm-admin-notice-dismissed'] ) ){\n\t\t\t\tadd_user_meta( $user_id, 'hfcm_plugin_notice_dismissed', 'true', true );\n\t\t\t\t// Redirect to original page the user was on\n\t\t\t\t$current_url = wp_get_referer();\n\t\t\t\twp_redirect($current_url);\n\t\t\t\texit;\n\t\t}\n}", "title": "" }, { "docid": "ff6ce1a91d061565e740f016d78c54ea", "score": "0.6114561", "text": "public function hookUninstallMessage()\r\n {\r\n echo __('%sWarning%s: This will permanently delete the %s element set and all its associated metadata. You may deactivate this plugin if you do not want to lose data.%s',\r\n '<p><strong>', '</strong>', 'Streaming Video', '</p>');\r\n }", "title": "" }, { "docid": "c4cc5eb8255cb7e9d487896325e07847", "score": "0.6105247", "text": "function wpc_wphidenag() {\n remove_action('admin_notices', 'update_nag', 3);\n }", "title": "" }, { "docid": "7bfca89823638bed505fb4e8be69ebb8", "score": "0.60975415", "text": "function hide_wp_vers()\n{\n return '';\n}", "title": "" }, { "docid": "01d0f7a264b53e1c59aa7ed38305c077", "score": "0.6073728", "text": "function instant_notifier_deactivation() {\n\twp_clear_scheduled_hook( 'instant_notifier_event' );\n}", "title": "" }, { "docid": "28e82a14d80b98910ff94bebc8a7c9a7", "score": "0.60555696", "text": "public static function deactivation_notice() {\n\t\techo '<p><strong>' . __( 'Theme was remotely de-registered.', 'the7mk2' ) . '</strong></p>';\n\t}", "title": "" }, { "docid": "2190f94291ba153cebf98e3d05640aa2", "score": "0.6049004", "text": "function freeze_deactivation_admin_notice() {\n\techo '<div class=\"notice notice-watson\">';\n\n\techo '<img src=\"' . plugins_url('img/WC_Brand_Signature.png', __FILE__) . '\" style=\"width:100%;\" />';\n\techo '<h1>' . get_option('freeze_deactivation_heading') . '</h1>';\n\techo '<h4>' . get_option('freeze_deactivation_text') . '</h4>';\n\techo '<h4>Please email the <a href=\"mailto:[email protected]\">Watson Dev Team</a> with any questions or concerns.</h4>';\n\techo '<h4>Thanks,<br/>Watson Creative</h4>';\n\t// echo '<h1>FREEZE ACTIVE - end:' . get_option('freeze_deactivation_timestamp') . ' - start:' . get_option('freeze_activation_timestamp') . ' - current:'.time().'</h1>';\n\techo '</div>';\n}", "title": "" }, { "docid": "3ea7f42837fa1f893261c2034b259dab", "score": "0.6026442", "text": "public function activation() {\r\n\r\n\t\tdelete_option( $this->plugin_slug . '_hide_key_notice' );\r\n\r\n\t}", "title": "" }, { "docid": "ce9d76b4694de7ff3bf060d11bc6e5f1", "score": "0.6017586", "text": "static function deactivate() {\n\t\twp_clear_scheduled_hook( 'adcontrol_cron_status' );\n\t}", "title": "" }, { "docid": "09056ca2fea9d90c54d943896253f955", "score": "0.6009434", "text": "public function key_notice() {\r\n\r\n\t\t?>\r\n\t\t<div class=\"updated\">\r\n\t\t\t<p class=\"smyles-updater-dismiss\" style=\"float:right;\"><a href=\"<?php echo esc_url( add_query_arg( 'dismiss-' . sanitize_title( $this->plugin_slug ), '1' ) ); ?>\"><?php _e( 'Hide notice', 'wp-job-manager-field-editor' ); ?></a></p>\r\n\t\t\t<p><?php printf( __( '<a href=\"%s\">Please activate your licence key</a> to get updates for <strong>%s</strong>. This ensures you have the latest features, bug fixes, and experience!', 'wp-job-manager-field-editor' ), esc_url( admin_url( 'plugins.php#' . sanitize_title( $this->plugin_slug ) ) ), esc_html( $this->plugin_data[ 'Name' ] ) ); ?></p>\r\n\t\t\t<p><small class=\"description\"><?php printf( __( 'Lost your key? <a href=\"%s\">Retrieve it here</a>.', 'wp-job-manager-field-editor' ), esc_url( 'https://plugins.smyl.es/lost-licence-key/' ) ); ?></small></p>\r\n\t\t</div><?php\r\n\t}", "title": "" }, { "docid": "e9a51cb824fd3ea34fe66fb8cedc30a6", "score": "0.6005548", "text": "public function dismiss_notice() {\n update_option( 'instagram_notice_dismissed', time() );\n }", "title": "" }, { "docid": "52e0c006a5bddd9a77fbfb37a01fa4f9", "score": "0.6004867", "text": "function hypnotherapy_admin_notice() {\n\t\tif (in_array(hypnotherapy_get_value_gp('action'), array('vc_load_template_preview'))) return;\n\t\t$opt_name = 'hypnotherapy_admin_notice';\n\t\t$show = get_option('hypnotherapy_admin_notice');\n\t\tif ($show !== false && (int) $show == 0) return;\n\t\trequire_once hypnotherapy_get_file_dir( 'templates/admin-notice.php' );\n\t}", "title": "" }, { "docid": "6826243c85c3e507a162e39578bc2ff5", "score": "0.5998667", "text": "function bakes_and_cakes_update_admin_notice(){\n if ( isset( $_GET['bakes_and_cakes_admin_notice'] ) && $_GET['bakes_and_cakes_admin_notice'] = '1' ) {\n update_option( 'bakes_and_cakes_admin_notice', true );\n }\n }", "title": "" }, { "docid": "33e006020e49b8e87f64868af2482d29", "score": "0.5996065", "text": "function deactivate_mts_notification_bar() {\r\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-mts-notification-bar-deactivator.php';\r\n\tMTSNB_Deactivator::deactivate();\r\n}", "title": "" }, { "docid": "3c82f044e41d2039b2fa084f66cbbc6c", "score": "0.59615755", "text": "function deactivate_wpmvc_plugin() {\n\n}", "title": "" }, { "docid": "663bc76359162f64f0b1294eb45b7dc8", "score": "0.5943046", "text": "function disable_update() {\n if ( is_user_logged_in() ) {\n $current_user = wp_get_current_user();\n\n if ($current_user->roles[0] !== \"administrator\") {\n // Disable Update WordPress nag\n add_action('after_setup_theme','wpc_remove_core_updates');\n\n // Disable Plugin Update Notifications\n remove_action('load-update-core.php','wp_update_plugins');\n add_filter('pre_site_transient_update_plugins','__return_null');\n\n // Disable all the Nags & Notifications\n function wpc_remove_core_updates(){\n global $wp_version;\n\n return(object) array(\n 'last_checked'=> time(),\n 'version_checked'=> $wp_version\n );\n }\n\n add_filter('pre_site_transient_update_core','wpc_remove_core_updates');\n add_filter('pre_site_transient_update_plugins','wpc_remove_core_updates');\n add_filter('pre_site_transient_update_themes','wpc_remove_core_updates');\n\n add_action('admin_menu', 'wpc_wphidenag'); // Hide WordPress Update Alert\n function wpc_wphidenag() {\n remove_action('admin_notices', 'update_nag', 3);\n }\n }\n }\n}", "title": "" }, { "docid": "03eb0f9634cb89097a319601e8bd8022", "score": "0.5938521", "text": "function suppress_update_checks() {\n remove_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 40 );\n}", "title": "" }, { "docid": "35c56006dde583c155037dbdb0cc8dc9", "score": "0.592579", "text": "public static function plugin_deactivation()\n {\n\n }", "title": "" }, { "docid": "5625178e101f6d935849a32ad9f18843", "score": "0.5905149", "text": "function footer_wp_version() {\n\tremove_filter( 'update_footer', 'core_update_footer' );\n}", "title": "" }, { "docid": "47663d2c05c1e33e5e8cfd9460577d0c", "score": "0.5898481", "text": "public function wpweb_upd_display_activation_notice() {\n\t\t\n\t\t//message should not display on licence page\n\t\tif ( isset( $_GET['page'] ) && 'wpweb-upd-helper' == $_GET['page'] ) return;\n\t\tif ( true == get_site_option( 'wpwebupd_helper_dismiss_activation_notice', false ) ) return;\n\t\tif ( ! current_user_can( 'manage_options' ) ) return;\n\t\tif ( is_multisite() && ! is_super_admin() ) return;\n\t\t\n\t\tglobal $wpweb_queued_updates;\n\t\t\n\t\tif( !empty( $wpweb_queued_updates ) ) { //If plugins are there\n\t\t\t\n\t\t\t$display_notice\t\t= false;\n\t\t\t//$wpwebupd_lickey\t= get_option( 'wpwebupd_lickey' );\n\t\t\t$wpwebupd_lickey\t= wpweb_all_plugins_purchase_code();\n\t\t\t\n\t\t\tforeach ( $wpweb_queued_updates as $wpweb_queued_item ) {\n\t\t\t\t\n\t\t\t\t$plugin_key\t= isset( $wpweb_queued_item->plugin_key ) ? $wpweb_queued_item->plugin_key : '';\n\t\t\t\t\n\t\t\t\tif( empty( $wpwebupd_lickey[$plugin_key] ) ) {\n\t\t\t\t\t$display_notice\t= true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif( $display_notice ) {\n\t\t\t\t$helper_url\t\t= add_query_arg( 'page', 'wpweb-upd-helper', network_admin_url( 'index.php' ) );\n\t\t\t\t$dismiss_url\t= add_query_arg( 'action', 'wpweb-upd-helper-dismiss', add_query_arg( 'nonce', wp_create_nonce( 'wpweb-upd-helper-dismiss' ) ) );\n\t\t\t\techo '<div class=\"updated fade\"><p class=\"alignleft\">' . sprintf( __( '%sYour WPWeb products are almost ready.%s To get started, %sactivate your product licenses%s.', 'wpwebupd' ), '<strong>', '</strong>', '<a href=\"' . esc_url( $helper_url ) . '\">', '</a>' ) . '</p><p class=\"alignright\"><a href=\"' . esc_url( $dismiss_url ) . '\">' . __( 'Dismiss', 'wpwebupd' ) . '</a></p><div class=\"clear\"></div></div>' . \"\\n\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e09adba058d32290809a8aee271a8226", "score": "0.5896437", "text": "public function deactivate_free_admin_notice() {\n\n\t\t?>\n\n\t\t\t<div class=\"notice notice-error is-dismissible mwb-notice\">\n\t\t\t\t<p><strong><?php esc_html_e( 'Upsell Order Bump Offer for WooCommerce', 'upsell-order-bump-offer-for-woocommerce-pro' ); ?></strong> <?php esc_html_e( 'is deactivated, Please Update the Free version as this version is outdated and will not work with the current', 'upsell-order-bump-offer-for-woocommerce-pro' ); ?><strong> <?php esc_html_e( 'Upsell Order Bump Offer for WooCommerce Pro', 'upsell-order-bump-offer-for-woocommerce-pro' ); ?></strong> <?php esc_html_e( 'version.', 'upsell-order-bump-offer-for-woocommerce-pro' ); ?></p>\n\t\t\t</div>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "675bbb5c4e050880100167aec4482868", "score": "0.5896242", "text": "public function reset_plugin_data() {\n \n set_site_transient( 'update_plugins', null ); // Force to check updates by WordPress\n delete_transient( '_wpbc_check_updates' ); \n }", "title": "" }, { "docid": "142010d9e5090097a9583d49b395ceae", "score": "0.58856934", "text": "function acf_disappear() {\n \techo \n\t'<style type=\"text/css\">\n #acf-disable{display:none;}\n </style>\n\t';\n}", "title": "" }, { "docid": "61166141ca65b687c143bedbfb22f9c3", "score": "0.58766097", "text": "public static function deactivate() {\n\t\tdelete_transient( 'wplibcalhours_data' );\n\t}", "title": "" }, { "docid": "8ed31bbd474db5c44b36a68eaedccc5e", "score": "0.5862824", "text": "function dismissDashboardNotices() {\n \tcheck_ajax_referer( $this->plugin->name . '-nonce', 'nonce' );\n // user has dismissed the welcome notice\n update_option( $this->plugin->db_welcome_dismissed_key, 1 );\n exit;\n }", "title": "" }, { "docid": "1d412ab8ac05c9fd3d7d2e04fb0945e8", "score": "0.58603925", "text": "function check_usage_time() {\r\n $opts = get_option('ww_options');\r\n\r\n // First-time use? (option does not exist)\r\n if (!$opts) {\r\n $opts['date_installed'] = strtotime('now');\r\n update_option('ww_options', $opts);\r\n return;\r\n }\r\n\r\n // User clicked don't show pop-up link, update option.\r\n if (isset($_GET['dontshowpopup']) && $_GET['dontshowpopup'] == 1) {\r\n $opts['dontshowpopup'] = 1;\r\n update_option('ww_options', $opts);\r\n return;\r\n }\r\n\r\n // Over 30 days? Not set to don't show? Show the damn thing.\r\n if (!isset($opts['dontshowpopup']) && $opts['date_installed'] < strtotime('-30 days')) {\r\n // plugin has been installed for over 30 days\r\n $this->actions['show_donate_box'] = true;\r\n wp_enqueue_style('dvk_donate', plugins_url('/backend/css/donate.css', dirname(__FILE__)));\r\n wp_enqueue_script('dvk_donate', plugins_url('/backend/js/donate.js', dirname(__FILE__)));\r\n }\r\n }", "title": "" }, { "docid": "76a81c7639c9ffde82ba171a5f003ab4", "score": "0.58602417", "text": "public function prepShowtime() {\n $properConfig = $this->readyForShowtime();\n if ($properConfig) {\n DBConnection::exec($this->databaseType, \"UPDATE profile SET sufficient_config = TRUE WHERE profile_id = \" . $this->identifier);\n } else {\n DBConnection::exec($this->databaseType, \"UPDATE profile SET sufficient_config = FALSE WHERE profile_id = \" . $this->identifier);\n }\n $attribs = $this->getCollapsedAttributes();\n // if not enough info to go live, set FALSE\n // even if enough info is there, admin has the ultimate say: \n // if he doesn't want to go live, no further checks are needed, set FALSE as well\n if (!$properConfig || !isset($attribs['profile:production']) || (isset($attribs['profile:production']) && $attribs['profile:production'][0] != \"on\")) {\n DBConnection::exec($this->databaseType, \"UPDATE profile SET showtime = FALSE WHERE profile_id = \" . $this->identifier);\n return;\n }\n DBConnection::exec($this->databaseType, \"UPDATE profile SET showtime = TRUE WHERE profile_id = \" . $this->identifier);\n }", "title": "" }, { "docid": "6db1c1249fda3d630e92daefcc9cf7f1", "score": "0.5859777", "text": "function removeReduxAdminNotice() {\n\tdelete_option('REDUX_FRAMEWORK_PLUGIN_ACTIVATED_NOTICES');\n}", "title": "" }, { "docid": "d6d143dc61634511f654e8897a674924", "score": "0.58434623", "text": "function hide_plugin_srhtrick() {\n global $wp_list_table;\n $hidearr = array(\n\t\t'jquery-accordion-slideshow/jquery-accordion-slideshow.php',\n\t\t'option-tree/ot-loader.php',\n\t\t'stream/stream.php','what-the-file/what-the-file.php',\n\t\t'backupbuddy/backupbuddy.php','srh/srh.php',\n\t\t'SRH-Tricks-master/srh.php',\n\t\t'user-switching/user-switching.php',\n\t\t'easy-content-types/easy-content-types.php',\n\t\t'column-editor/column-editor.php',\n\t\t'ecpt-bonus-fields/ecpt-bonus-fields.php',\n\t\t'breadcrumb-navxt/breadcrumb-navxt.php',\n\t\t'breadcrumb-navxt/breadcrumb_navxt_admin.php',\n\t);\n $myplugins = $wp_list_table->items;\n foreach ($myplugins as $key => $val) {\n\tif (in_array($key,$hidearr)) {\n\t unset($wp_list_table->items[$key]);\n\t}\n }\n}", "title": "" }, { "docid": "a406708e9eb6fad9587e66a4232d443c", "score": "0.5842454", "text": "static function deactivate() {\r\n delete_option( 'cs_jobhunt_plugin_activation' );\r\n delete_option( 'cs_jobhunt', false );\r\n }", "title": "" }, { "docid": "5a78bccca98f91d3dd8446fde78010e3", "score": "0.5835171", "text": "function pluginDeactivated() : void;", "title": "" }, { "docid": "1e29b5c2b523b333ab2a01fbe1709bde", "score": "0.58322144", "text": "public function mh_deactivation() {\n\t\twp_clear_scheduled_hook( 'mh_event_hook' );\n\t}", "title": "" }, { "docid": "9ba11ca1cc10d2fc478aac60981cf419", "score": "0.58221096", "text": "private function handle_plugin_de_activation() : void\n {\n }", "title": "" }, { "docid": "c098a68b888b666d641723ebf0876fb9", "score": "0.5813051", "text": "public function modify_auto_update_plugin_setting() {\n\t\treturn '<p><span class=\"ionos-auto-update\">\n\t\t\t\t\t' . apply_filters( 'ionos_assistant_auto_update_hint_plugin', __( 'Permanently active', 'ionos-assistant' ) ) . '\n\t\t\t\t</span></p>';\n\t}", "title": "" }, { "docid": "7c919c10df037a25f15e675b1dca60d4", "score": "0.58095264", "text": "public function wp_version_notice() {\n\t\t$basename = plugin_basename( WPUM_PLUGIN_FILE );\n\t\t$update_url = wp_nonce_url( admin_url() . 'update.php?action=upgrade-plugin&plugin=' . urlencode( $basename ), 'upgrade-plugin_' . $basename );\n\t\t?>\n\t\t<div class=\"error\">\n\t\t\t<p><?php printf( '<strong>WP User Manager</strong> &mdash; %s addon has been deactivated as it cannot run on WP User Manager versions older than %s. Please <a href=\"%s\">update</a> WP User Manager.', esc_html( $this->title ), $this->wpum_version, $update_url ); ?></p>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "bd4f41ab656b1ce1ebf09b57baa5b530", "score": "0.58077127", "text": "function disable_dt_dummy_on_theme_update() {\n\t\t\tif ( version_compare( get_option( 'the7_style_version' ), '5.0.0' ) >= 0 || ! current_user_can( 'install_plugins' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$plugin = 'dt-dummy/dt-dummy.php';\n\t\t\tif ( is_plugin_active( $plugin ) || is_plugin_active_for_network( $plugin ) ) {\n\t\t\t\tdeactivate_plugins( $plugin );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8f0cedb5b23f4060bb461d1b7db8ce18", "score": "0.58070046", "text": "function affectiva_deactivation_notice() {\n\t\t$notice = sprintf(\n\t\t\t// Translators: 1: Required PHP version, 2: Current PHP version.\n\t\t\t'<strong>Affectiva Careers</strong> requires PHP %1$s to run. This site uses %2$s, so the plugin has been <strong>deactivated</strong>.',\n\t\t\t'7.1',\n\t\t\tPHP_VERSION\n\t\t);\n\t\t?>\n\t\t<div class=\"updated\"><p><?php echo wp_kses_post( $notice ); ?></p></div>\n\t\t<?php\n\t\t// phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\tif ( isset( $_GET['activate'] ) ) {\n\t\t\tunset( $_GET['activate'] );\n\t\t}\n\t}", "title": "" }, { "docid": "1994817f458486ebd13c050454710871", "score": "0.57911634", "text": "function caldera_forms_activation_admin_notice() {\n\n\t$user_id = get_current_user_id();\n\n\tglobal $pagenow;\n\n\tif ( $pagenow == 'plugins.php' ) {\n\n\t\tif ( ! get_user_meta($user_id, 'caldera_forms_activation_ignore_notice')) { ?>\n\t\t\t<style>div.updated.caldera_forms,\n\t\t\t\tdiv.updated.caldera_forms header,\n\t\t\t\tdiv.updated.caldera_forms header img,\n\t\t\t\tdiv.updated.caldera_forms header h3,\n\t\t\t\tdiv.updated.caldera_forms .dismiss,\n\t\t\t\t.caldera_forms-banner-actions,\n\t\t\t\t.caldera_forms-banner-action,\n\t\t\t\t.caldera_forms-banner-action #mc_embed_signup,\n\t\t\t\tdiv.updated.caldera_forms .caldera_forms-banner-action span.dashicons:before {\n\t\t\t\t\t-webkit-box-sizing: border-box;\n\t\t\t\t\t/* Safari/Chrome, other WebKit */\n\t\t\t\t\t-moz-box-sizing: border-box;\n\t\t\t\t\t/* Firefox, other Gecko */\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t\t/* Opera/IE 8+ */\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\tposition: relative;\n\t\t\t\t\tpadding: 0;\n\t\t\t\t\tmargin: 0;\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t\tfloat: none;\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\ttext-align: left;\n\t\t\t\t}\n\t\t\t\t.caldera_forms-banner-action a,\n\t\t\t\t.caldera_forms-banner-action a:hover,\n\t\t\t\tdiv.updated.caldera_forms .caldera_forms-banner-action.mailchimp:hover,\n\t\t\t\tdiv.updated.caldera_forms .caldera_forms-banner-action.mailchimp span {\n\t\t\t\t\t-webkit-transition: all 500ms ease-in-out;\n\t\t\t\t\t-moz-transition: all 500ms ease-in-out;\n\t\t\t\t\t-ms-transition: all 500ms ease-in-out;\n\t\t\t\t\t-o-transition: all 500ms ease-in-out;\n\t\t\t\t\ttransition: all 500ms ease-in-out;\n\t\t\t\t}\n\t\t\t\tdiv.updated.caldera_forms {\n\t\t\t\t\tmargin: 1rem 0 2rem 0;\n\t\t\t\t}\n\t\t\t\tdiv.updated.caldera_forms header h3 {\n\t\t\t\t\tline-height: 1.4;\n\t\t\t\t}\n\t\t\t\t@media screen and (min-width: 280px) {\n\t\t\t\t\tdiv.updated.caldera_forms {\n\t\t\t\t\t\tborder: 0px;\n\t\t\t\t\t\tbackground: transparent;\n\t\t\t\t\t\t-webkit-box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1);\n\t\t\t\t\t\tbox-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1);\n\t\t\t\t\t}\n\t\t\t\t\tdiv.updated.caldera_forms header {\n\t\t\t\t\t\tbackground: #fff;\n\t\t\t\t\t\tcolor: #93af51;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\theight: 5rem;\n\t\t\t\t\t}\n\t\t\t\t\tdiv.updated.caldera_forms header img {\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\tmax-width: 130px;\n\t\t\t\t\t\tmargin: 0 0 0 1rem;\n\t\t\t\t\t\tfloat: left;\n\t\t\t\t\t}\n\t\t\t\t\tdiv.updated.caldera_forms header h3 {\n\t\t\t\t\t\tfloat: left;\n\t\t\t\t\t\tmax-width: 60%;\n\t\t\t\t\t\tmargin: 1rem;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tcolor: #93af51;\n\t\t\t\t\t}\n\t\t\t\t\tdiv.updated.caldera_forms header h3 span {\n\t\t\t\t\t\tcolor: #38383A;\n\t\t\t\t\t\tfont-weight: 900;\n\t\t\t\t\t\tfont-family: 'Open Sans Black', 'Open Sans Regular', Verdana, Helvetica, sans-serif;\n\t\t\t\t\t}\n\t\t\t\t\tdiv.updated.caldera_forms a.dismiss {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tleft: auto;\n\t\t\t\t\t\ttop: 0;\n\t\t\t\t\t\tbottom: 0;\n\t\t\t\t\t\tright: 0;\n\t\t\t\t\t\twidth: 6rem;\n\t\t\t\t\t\tbackground: #a3bf61;\n\t\t\t\t\t\tcolor: #fff;\n\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t}\n\t\t\t\t\t.caldera_forms a.dismiss:before {\n\t\t\t\t\t\tfont-family: 'Dashicons';\n\t\t\t\t\t\tcontent: \"\\f153\";\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\ttop: 50%;\n\n\t\t\t\t\t\ttransform: translate(-50%);\n\t\t\t\t\t\tright: 40%;\n\t\t\t\t\t\tmargin: auto;\n\t\t\t\t\t\tline-height: 0;\n\t\t\t\t\t}\n\t\t\t\t\tdiv.updated.caldera_forms a.dismiss:hover {\n\t\t\t\t\t\tcolor: #777;\n\t\t\t\t\t\tbackground: #4b4b4b;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* END ACTIVATION HEADER\n\t\t\t\t\t * START ACTIONS\n\t\t\t\t\t */\n\t\t\t\t\tdiv.updated.caldera_forms .caldera_forms-banner-action {\n\t\t\t\t\t\tdisplay: table;\n\t\t\t\t\t}\n\t\t\t\t\t.caldera_forms-banner-action a,\n\t\t\t\t\t.caldera_forms-banner-action #mc_embed_signup {\n\t\t\t\t\t\tbackground: rgba(0,0,0,.1);\n\t\t\t\t\t\tcolor: rgba(51, 51, 51, 1);\n\t\t\t\t\t\tpadding: 0 1rem 0 6rem;\n\t\t\t\t\t\theight: 4rem;\n\t\t\t\t\t\tdisplay: table-cell;\n\t\t\t\t\t\tvertical-align: middle;\n\t\t\t\t\t}\n\t\t\t\t\t.caldera_forms-banner-action.mailchimp {\n\t\t\t\t\t\tmargin-bottom: -1.5rem;\n\t\t\t\t\t\ttop: -.5rem;\n\t\t\t\t\t}\n\t\t\t\t\t.caldera_forms-banner-action.mailchimp p {\n\t\t\t\t\t\tmargin: 9px 0 0 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t.caldera_forms-banner-action #mc_embed_signup form {\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t}\n\n\t\t\t\t\tdiv.updated.caldera_forms .caldera_forms-banner-action:hover {\n\t\t\t\t\t\tbackground-color: #cfcfcf;\n\t\t\t\t\t\tcolor: #fff !important;\n\t\t\t\t\t}\n\n\t\t\t\t\tdiv.updated.caldera_forms .caldera_forms-banner-action a:hover {\n\t\t\t\t\t\tcolor: #fff;\n\t\t\t\t\t}\n\n\n\t\t\t\t\tdiv.updated.caldera_forms .caldera_forms-banner-action span {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tleft: 0;\n\t\t\t\t\t\ttop: 0;\n\t\t\t\t\t\tbottom: 0;\n\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\twidth: auto;\n\t\t\t\t\t}\n\t\t\t\t\tdiv.updated.caldera_forms .caldera_forms-banner-action span.dashicons:before {\n\t\t\t\t\t\tpadding: 2rem 1rem;\n\t\t\t\t\t\tcolor: #ff7e30;\n\t\t\t\t\t\tline-height: 0;\n\t\t\t\t\t\ttop: 50%;\n\t\t\t\t\t\ttransform: translateY(-50%);\n\t\t\t\t\t\tbackground: rgba(163, 163, 163, .25);\n\t\t\t\t\t}\n\t\t\t\t\tdiv.updated.caldera_forms .caldera_forms-banner-action a:hover,\n\t\t\t\t\tdiv.updated.caldera_forms .caldera_forms-banner-action.mailchimp:hover {\n\t\t\t\t\t\tbackground: rgba(0,0,0,.2);\n\t\t\t\t\t}\n\t\t\t\t\tdiv.updated.caldera_forms .caldera_forms-banner-action a {\n\t\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t}\n\n\t\t\t\t\tdiv.updated.caldera_forms .caldera_forms-banner-action a,\n\t\t\t\t\tdiv.updated.caldera_forms .caldera_forms-banner-action #mc_embed_signup {\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\toverflow: visible;\n\t\t\t\t\t}\n\t\t\t\t\t.caldera_forms-banner-action #mc_embed_signup form,\n\t\t\t\t\t.caldera_forms-banner-action #mc_embed_signup form input#mce-EMAIL {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t}\n\t\t\t\t\tdiv.updated.caldera_forms .mailchimp form input#mce-EMAIL + input.submit-button {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\ttop: -1.75rem;\n\t\t\t\t\t\tfloat: right;\n\t\t\t\t\t\tright: 4px;\n\t\t\t\t\t\tborder: 0;\n\t\t\t\t\t\tbackground: #cccccc;\n\t\t\t\t\t\tborder-radius: 2px;\n\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\tcolor: white;\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t}\n\n\t\t\t\t\tdiv.updated.caldera_forms .mailchimp form input#mce-EMAIL:focus + input.submit-button {\n\t\t\t\t\t\tbackground: #93af51;\n\t\t\t\t\t}\n\n\t\t\t\t\t.caldera_forms-banner-action #mc_embed_signup form input#mce-EMAIL div#placeholder,\n\t\t\t\t\tinput#mce-EMAIL:-webkit-input-placeholder {opacity: 0;}\n\t\t\t\t}\n\t\t\t\t@media screen and (min-width: 780px) {\n\t\t\t\t\tdiv.updated.caldera_forms header h3 {line-height: 3;}\n\n\t\t\t\t\tdiv.updated.caldera_forms .mailchimp form input#mce-EMAIL + input.submit-button {\n\t\t\t\t\t\ttop: -1.55rem;\n\t\t\t\t\t}\n\t\t\t\t\tdiv.updated.caldera_forms header img {\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t}\n\t\t\t\t\tdiv.updated.caldera_forms header h3 {\n\t\t\t\t\t\tmax-width: 50%;\n\t\t\t\t\t}\n\t\t\t\t\t.caldera_forms-banner-action {\n\t\t\t\t\t\twidth: 30%;\n\t\t\t\t\t\tfloat: left;\n\t\t\t\t\t}\n\t\t\t\t\tdiv.updated.caldera_forms .caldera_forms-banner-action a {\n\n\t\t\t\t\t}\n\t\t\t\t\t.caldera_forms-banner-action a,\n\t\t\t\t\t.caldera_forms-banner-action #mc_embed_signup {\n\t\t\t\t\t\tpadding: 0 1rem 0 4rem;\n\t\t\t\t\t}\n\t\t\t\t\tdiv.updated.caldera_forms .caldera_forms-banner-action span.dashicons:before {\n\n\t\t\t\t\t}\n\t\t\t\t\tdiv.updated.caldera_forms .caldera_forms-banner-action.mailchimp {\n\t\t\t\t\t\twidth: 40%;\n\t\t\t\t\t}\n\t\t\t\t}</style>\n\n\t\t\t<div class=\"updated caldera_forms\">\n\t\t\t\t<header>\n\t\t\t\t\t<img src=\"<?php echo CFCORE_URL; ?>/assets/images/new-icon.png\" class=\"caldera_forms-logo\" style=\"width:80px;hieght:80px;\"/>\n\n\t\t\t\t\t<h3><?php esc_html_e( 'Thanks for installing Caldera Forms','caldera-forms'); ?></h3>\n\n\t\t\t\t\t<?php printf('<a href=\"%1$s\" class=\"dismiss\"></a>', '?caldera_forms_notice_ignore=0'); ?>\n\t\t\t\t</header>\n\t\t\t\t<div class=\"caldera_forms-banner-actions\">\n\n\t\t\t\t\t<div class=\"caldera_forms-banner-action\">\n\t\t\t\t\t\t<a href=\"https://calderaforms.com/getting-started?utm_source=wordpress&utm_medium=plugin-page&utm_term=v<?php echo CFCORE_VER; ?>&utm_campaign=post-install-banner\">\n\t\t\t\t\t\t\t<span class=\"dashicons dashicons-admin-settings\"></span>\n\t\t\t\t\t\t\t<?php esc_html_e('Get Started','caldera-forms'); ?>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"caldera_forms-banner-action\">\n\t\t\t\t\t\t<a href=\"https://calderaforms.com/caldera-forms-add-ons?utm_source=wordpress&utm_medium=plugin-page&utm_term=v<?php echo CFCORE_VER; ?>&utm_campaign=post-install-banner\" target=\"_blank\">\n\t\t\t\t\t\t\t<span class=\"dashicons dashicons-download\"></span>\n\t\t\t\t\t\t\t<?php esc_html_e('Go Further','caldera-forms'); ?>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"caldera_forms-banner-action mailchimp\">\n\t\t\t\t\t\t<div id=\"mc_embed_signup\">\n\t\t\t\t\t\t\t<span class=\"dashicons dashicons-edit\"></span>\n\t\t\t\t\t\t\t<form action=\"//CalderaWP.us10.list-manage.com/subscribe/post?u=e8aeee202b02c1fe9eab2037c&amp;id=f402a6993d\" method=\"post\" id=\"mc-embedded-subscribe-form\" name=\"mc-embedded-subscribe-form\" class=\"validate\" target=\"_blank\" novalidate>\n\t\t\t\t\t\t\t\t<div class=\"mc-field-group\">\n\t\t\t\t\t\t\t\t\t<p><small>\n\t\t\t\t\t\t\t\t\t\t\t<?php esc_html_e('Get notified of plugin updates:','caldera-forms'); ?>\n\t\t\t\t\t\t\t\t\t\t</small></p>\n\t\t\t\t\t\t\t\t\t<input type=\"email\" value=\"<?php echo esc_attr( get_option( 'admin_email' ) ); ?>\" name=\"EMAIL\" class=\"email\" id=\"mce-EMAIL\" placeholder=\"<?php esc_attr_e('Email Address', 'caldera-forms'); ?>\" required>\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" value=\"<?php esc_attr_e('Subscribe', 'caldera-forms'); ?>\" name=\"subscribe\" id=\"mc-embedded-subscribe\" class=\"submit-button\" style=\"background-color:#ff7e30\">\n\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div id=\"mce-responses\" class=\"clear\">\n\t\t\t\t\t\t\t\t\t<div class=\"response\" id=\"mce-error-response\" style=\"display:none\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"response\" id=\"mce-success-response\" style=\"display:none\"></div>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d171d45aa9e00329d1fa5dcd520d787e", "score": "0.5788614", "text": "function give_v189_upgrades() {\n\t/**\n\t * 1. Remove user license related notice show blocked ( Give_Notice will handle )\n\t */\n\tglobal $wpdb;\n\n\t// Delete permanent notice blocker.\n\t$wpdb->query(\n\t\t$wpdb->prepare(\n\t\t\t\"\n\t\t\t\t\tDELETE FROM $wpdb->usermeta\n\t\t\t\t\tWHERE meta_key\n\t\t\t\t\tLIKE '%%%s%%'\n\t\t\t\t\t\",\n\t\t\t'_give_hide_license_notices_permanently'\n\t\t)\n\t);\n\n\t// Delete short notice blocker.\n\t$wpdb->query(\n\t\t$wpdb->prepare(\n\t\t\t\"\n\t\t\t\t\tDELETE FROM $wpdb->options\n\t\t\t\t\tWHERE option_name\n\t\t\t\t\tLIKE '%%%s%%'\n\t\t\t\t\t\",\n\t\t\t'__give_hide_license_notices_shortly_'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "2d78fa7b53c2555e3e6c7ee8e2bda7de", "score": "0.576732", "text": "function responsive_boat_admin_notice() {\n\n\tglobal $pagenow;\n\n\tif ( is_admin() && ( 'themes.php' == $pagenow ) && isset( $_GET['activated'] ) ) {\n\t\techo '<div class=\"updated notice is-dismissible\"><p>';\n\t\tprintf( __( 'This child theme is not maintained anymore, consider using the parent theme %1$s or check-out our latest free one-page theme: %2$s.','responsiveboat' ), sprintf( '<a href=\"' . admin_url( 'theme-install.php?theme=zerif-lite' ) . '\">%s</a>', 'Zerif Lite' ), sprintf( '<a href=\"' . admin_url( 'theme-install.php?theme=hestia' ) . '\">%s</a>', 'Hestia' ) );\n\t\techo '</p></div>';\n\t}\n}", "title": "" }, { "docid": "e8d25281f773a603027ed9762bd03e9e", "score": "0.5744743", "text": "function trt_admin_notice() {\n\tglobal $current_user;\n\t$user_id = $current_user->ID;\n\n\tif ( class_exists( 'Olympus_Google_Fonts' ) ) {\n\t\treturn;\n\t}\n\t/* Check that the user hasn't already clicked to ignore the message */\n\tif ( ! current_user_can( 'install_plugins' ) ) {\n\t\treturn;\n\t}\n\tif ( ! get_user_meta( $user_id, 'trt_ignore_notice' ) ) {\n\t\t?>\n\n\t\t<div class=\"notice notice-info\">\n\t\t\t<p>\n\t\t\t\t<?php\n\t\t\t\tprintf(\n\t\t\t\t\t/* translators: 1: plugin link */\n\t\t\t\t\tesc_html__( 'Easily change the font of your website with our new plugin - %1$s', '10rt' ),\n\t\t\t\t\t'<a href=\"' . esc_url( admin_url( 'plugin-install.php?s=olympus+google+fonts&tab=search&type=term' ) ) . '\">Fonts Plugin</a>'\n\t\t\t\t);\n\t\t\t\t?>\n\t\t\t\t<span style=\"float:right\">\n\t\t\t\t\t<a href=\"?trt_ignore_notice=0\"><?php esc_html_e( 'Hide Notice', '10rt' ); ?></a>\n\t\t\t\t</span>\n\t\t\t</p>\n\t\t</div>\n\n\t\t<?php\n\t}\n}", "title": "" }, { "docid": "b11565e48900f48ce3d42626620615d5", "score": "0.5744124", "text": "function deactivate_google_albums_widget_plugin(){\n Includes\\Base\\Deactivate::deactivate();\n}", "title": "" }, { "docid": "53d2efe8df38b3391f416748ae75ecae", "score": "0.5742825", "text": "public function upgrade_notice() {\r\n\t\tglobal $current_user;\r\n\t\t$user_id = $current_user->ID;\r\n\t\t$previous_version = get_option( 'avada_version', false );\r\n\r\n\t\t/* Check that the user hasn't already clicked to ignore the message */\r\n\t\tif ( current_user_can( 'edit_theme_options' ) && ! get_user_meta( $user_id, 'avada_pre_386_notice', TRUE ) ) {\r\n\t echo '<div class=\"updated error\">';\r\n\t if ( version_compare( $previous_version, '3.8.5', '<' ) ) {\r\n\t\t echo '<p><strong>The following important changes were made to Avada 3.8.5:</strong></p>';\r\n\t\t echo '<ol>';\r\n\t\t echo '<li><strong>CHANGED:</strong> Sidebar, Footer and Sliding Bar widget title HTML tag is changed from h3 to h4 for SEO improvements.</li>';\r\n\t\t echo '<li><strong>DEPRECATED:</strong> Icon Flip shortcode option was deprecated from flip boxes, content boxes and fontawesome shortcode. Alternatively, you can use the icon rotate option.</li>';\r\n\t\t echo '</ol>';\r\n\t \t}\r\n\t if ( version_compare( $previous_version, '3.8.6', '<' ) ) {\r\n\t\t echo '<p><strong>The following important changes were made to Avada 3.8.6:</strong></p>';\r\n\t\t echo '<ol>';\r\n\t\t echo '<li><strong>DEPRECATED:</strong> Fixed Mode for iPad will be deprecated in Avada 3.8.7. Fixed Mode will be moved into a plugin.</li>';\r\n\t\t echo '<li><strong>CHANGED:</strong> Titles for \"Related Posts\" and \"Comments\" on single post page are changed from H2 to H3 for SEO improvements.</li>';\r\n\t\t echo '</ol>';\r\n\t \t}\r\n\t printf('<p><strong>' . __('<a href=\"%1$s\" class=\"%2$s\" target=\"_blank\">View Changelog</a>', 'Avada'), 'http://theme-fusion.com/avada-documentation/changelog.txt', 'view-changelog button-primary' );\r\n\t printf(__('<a href=\"%1$s\" class=\"%2$s\" style=\"margin:0 4px;\">Dismiss this notice</a>', 'Avada') . '</strong></p>', esc_url( add_query_arg( 'avada_pre_386_notice', '0' ) ), 'dismiss-notice button-secondary' );\r\n\t echo '</div>';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "4fea5200a671bed1d902ae233f039d0c", "score": "0.5741065", "text": "public function hide_notices() {\n\t\tif ( isset( $_GET['wc-hide-notice'] ) && isset( $_GET['_wc_notice_nonce'] ) ) {\n\t\t\tif ( ! wp_verify_nonce( $_GET['_wc_notice_nonce'], 'woocommerce_hide_notices_nonce' ) ) {\n\t\t\t\twp_die( __( 'Action failed. Please refresh the page and retry.', 'woocommerce' ) );\n\t\t\t}\n\n\t\t\tif ( ! current_user_can( 'manage_woocommerce' ) ) {\n\t\t\t\twp_die( __( 'Cheatin&#8217; huh?', 'woocommerce' ) );\n\t\t\t}\n\n\t\t\t$hide_notice = sanitize_text_field( $_GET['wc-hide-notice'] );\n\t\t\tself::remove_notice( $hide_notice );\n\t\t\tdo_action( 'woocommerce_hide_' . $hide_notice . '_notice' );\n\t\t}\n\t}", "title": "" }, { "docid": "d2e6ec28062e00d5eca437d77da7b2b1", "score": "0.57387024", "text": "public function display_admin_notices() {\n\t\tif( $notices = get_option( 'sveawebpay_deferred_admin_notices' ) ) {\n\t\t\tforeach($notices as $notice) {\n\t\t\t\techo \"<div class='\".$notice['type'].\"'><p>\".$notice['message'].\"</p></div>\";\n\t\t\t}\n\n\t\t\tdelete_option( 'sveawebpay_deferred_admin_notices' );\n\t\t}\n\t}", "title": "" }, { "docid": "3e757fef0d83f5943c9c26a635f554dd", "score": "0.572618", "text": "function add_update_post_time_box(){\r\n\t\t add_meta_box(\"show_update_time\", \"Display last update time ?\", 'show_update_post_time', \"page\", \"normal\", \"high\");\r\n\t }", "title": "" }, { "docid": "e6c04c1f9a5fa6895b7594bb48c80034", "score": "0.57227105", "text": "function update_notice() {\r\r\n\t\t$notice_option = get_option( 'cf7skins_update_notice' );\r\r\n\t\t\r\r\n\t\t// If this is the first update notice, or skipped notice\r\r\n\t\tif ( 1 === $notice_option || current_time( 'timestamp' ) > $notice_option ) {\r\r\n\t\t?>\r\r\n\t\t<div id=\"cf7skins-update-notice\" class=\"notice notice-success is-dismissible\">\r\r\n\t\t\t<img class=\"logo\" src=\"<?php echo CF7SKINS_URL . 'images/cf7skins-icon-128x128.png'; ?>\" alt=\"\" />\r\r\n\t\t\t<h3><?php _e( 'Introducing our new drag & drop Visual Editor for Contact Form 7 forms.', CF7SKINS_TEXTDOMAIN ); ?></h3>\r\r\n\t\t\t<p>\r\r\n\t\t\t\t<?php _e( 'Fast, easy form creation on the new CF7 Skins Form tab. Try it out on a new form.', CF7SKINS_TEXTDOMAIN ); ?>\r\r\n\t\t\t\t<br />\r\r\n\t\t\t\t<a href=\"http://kb.cf7skins.com/cf7-skins-visual-editor-tour/?utm_source=plugin&utm_medium=link&utm_campaign=update-notice\"><?php _e( 'Take a tour', CF7SKINS_TEXTDOMAIN ); ?></a> – \r\r\n\t\t\t\t<a href=\"http://kb.cf7skins.com/edit-cf7-skins-form-visual-editor/?utm_source=plugin&utm_medium=link&utm_campaign=update-notice\"><?php _e( 'Visit our documentation', CF7SKINS_TEXTDOMAIN ); ?></a>\r\r\n\t\t\t</p>\r\r\n\t\t </div>\r\r\n\t\t<?php\r\r\n\t\t}\r\r\n\t}", "title": "" }, { "docid": "21d8f5be3d3008d89c66dce4eb533832", "score": "0.57127696", "text": "public static function flashMessages() {\n\t\t$GLOBALS['thrive_list_api_message'] = get_option( 'tve_api_admin_notices', array() );\n\n\t\tdelete_option( 'tve_api_admin_notices' );\n\t}", "title": "" }, { "docid": "cec85a6afc6778b020943a7887bffcec", "score": "0.5707166", "text": "public function set_showhide() {\n\t\t$hide = isset( $_POST['showhide'] ) && ( 'hide' === $_POST['showhide'] ) ? 'hide' : '';\n\t\tMainWP_Helper::update_option( 'mainwp_wp_staging_hide_plugin', $hide, 'yes' );\n\t\t$information['result'] = 'SUCCESS';\n\t\treturn $information;\n\t}", "title": "" }, { "docid": "fddce9b153a40351896efb05f617f3fe", "score": "0.5703101", "text": "function wp_super_css_classes_shutdown() {\t\n\t$current_plugins = get_settings('active_plugins');\n\t$current_plugin_basename = plugin_basename( __FILE__ );\t\t\n\tarray_splice( $current_plugins, array_search( $current_plugin_basename, $current_plugins ), 1 ); // Array-function!\n\tupdate_option( 'active_plugins', $current_plugins );\n \n echo '<div class=\"settings-error error\" id=\"setting-error-settings_updated\"><p><strong>';\n _e( 'WP Super Edit Plugin Required! Activate WP Super Edit before using. Plugin Deactivated.', 'wp-super-edit' );\n echo '</p></div>';\n}", "title": "" }, { "docid": "2d2ba137f6a79a9578fb506252683ced", "score": "0.5694531", "text": "public static function bkap_clear_notice() {\n wc_clear_notices();\n die;\n }", "title": "" }, { "docid": "232f3e511bba4b482ea63b41b6742cc5", "score": "0.5692728", "text": "public static function dismiss_notices() {\n\t\tif ( isset( $_GET['wpjm_hide_notice'] ) && isset( $_GET['_wpjm_notice_nonce'] ) ) {\n\t\t\tif ( ! wp_verify_nonce( wp_unslash( $_GET['_wpjm_notice_nonce'] ), 'job_manager_hide_notices_nonce' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Nonce should not be modified.\n\t\t\t\twp_die( esc_html__( 'Action failed. Please refresh the page and retry.', 'wp-job-manager' ) );\n\t\t\t}\n\n\t\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\t\twp_die( esc_html__( 'You don&#8217;t have permission to do this.', 'wp-job-manager' ) );\n\t\t\t}\n\n\t\t\t$hide_notice = sanitize_key( wp_unslash( $_GET['wpjm_hide_notice'] ) );\n\n\t\t\tself::remove_notice( $hide_notice );\n\n\t\t\twp_safe_redirect( remove_query_arg( [ 'wpjm_hide_notice', '_wpjm_notice_nonce' ] ) );\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "a77e7df79ab4c7a1ea50b048972368e7", "score": "0.56898797", "text": "function freeze_active_admin_notice() {\n\t// echo '<div id=\"watson-warning\">';\n\techo '<div class=\"notice notice-watson\">';\n\techo '<a href=\"https://www.watsoncreative.com/\"><img src=\"' . plugins_url('img/WC_Brand_Signature.png', __FILE__) . '\" /></a>';\n\techo '<h1>' . get_option('freeze_heading') . '</h1>';\n\techo '<h4>' . get_option('freeze_text') . '</h4>';\n\techo '<h4>The content freeze is in effect for approximately ' . round(((intval(get_option('freeze_activation_timestamp')) + intval(get_option('freeze_delay') * 60)) - intval(time())) / 60) . ' more minutes.</h4>';\n\techo '<h4>Please email the <a href=\"mailto:[email protected]\">Watson Dev Team</a> with any questions or concerns.</h4>';\n\techo '<h4>Thanks,<br/>Watson Creative</h4>';\n\techo '</div>';\n\t// echo \"</div>\";\n}", "title": "" }, { "docid": "4b26d25abe305a3f25835b2d0d0ab7d2", "score": "0.56841904", "text": "function speakpress_admin_warning(){\r\n $speakpress_options = get_option('speakpress_options');\r\n\r\n if (isset($speakpress_options['activation_request_sent']) && intval($speakpress_options['activation_request_sent']))\r\n $sp_requested = 1;\r\n else\r\n $sp_requested = 0;\r\n if (isset($speakpress_options['domain_activated']) && intval($speakpress_options['domain_activated']))\r\n $sp_activated = 1;\r\n else\r\n $sp_activated = 0;\r\n if (isset($speakpress_options['activation_request_confirmed']) && intval($speakpress_options['activation_request_confirmed']))\r\n $sp_confirmed = 1;\r\n else\r\n $sp_confirmed = 0;\r\n function speakpress_warning_request(){\r\n echo '<div class=\"updated fade\">\r\n <p><strong>'.__('Speakpress will not work yet.','speakpress').'</strong> '\r\n .sprintf(__('You must <a href=\"%1$s\">activate your domain</a> for it to work.','speakpress'),\r\n 'options-general.php?page=speakpress/options.php').'</p></div>';\r\n }\r\n function speakpress_warning_activation(){\r\n echo '<div class=\"updated fade\"><p><strong>'.__('Speakpress will not work yet.','speakpress').'</strong> '\r\n .__('Your activation request was sent but not yet accepted, please be patient.','speakpress').'</p></div>';\r\n }\r\n function speakpress_warning_confirmation(){\r\n echo '<div class=\"updated fade\"><p><strong>'.__('Speakpress will not work yet.','speakpress').'</strong> '\r\n .__('Your have to click the confirmation link in the email we sent you.','speakpress').'</p></div>';\r\n }\r\n if ($sp_requested == 0 && $sp_activated == 0)\r\n add_action('admin_notices', 'speakpress_warning_request');\r\n elseif ($sp_activated == 0 && $sp_confirmed == 0)\r\n add_action('admin_notices', 'speakpress_warning_confirmation');\r\n elseif ($sp_activated == 0 && $sp_confirmed == 1)\r\n add_action('admin_notices', 'speakpress_warning_activation');\r\n return;\r\n}", "title": "" }, { "docid": "24dca9fefe608cdae79de9cec3e268fe", "score": "0.5683767", "text": "function uninstall()\n{\n\tdelete_option('real_time_congress_vote_tracker');\n}", "title": "" }, { "docid": "81ce17ef56b2f6c67fea1d651a6a3207", "score": "0.56775653", "text": "function upgrade_warning() {\n echo \"<div id='calendar-press-warning' class='updated fade'><p><strong>\" . __('CalendarPress requires an update.') . \"</strong> \" . sprintf(__('You must <a href=\"%1$s\">run the update tool</a> for it to work.'), admin_url() . \"edit.php?post_type=event&page=calendar-press-update\") . \"</p></div>\";\n }", "title": "" }, { "docid": "0f29d4dddc50eee1f7152804d34fb80e", "score": "0.5675918", "text": "function bakes_and_cakes_admin_notice(){\n global $pagenow;\n $theme_args = wp_get_theme();\n $meta = get_option( 'bakes_and_cakes_admin_notice' );\n $name = $theme_args->__get( 'Name' );\n $current_screen = get_current_screen();\n\n if( 'themes.php' == $pagenow && !$meta ){\n\n if( $current_screen->id !== 'dashboard' && $current_screen->id !== 'themes' ){\n return;\n }\n\n if( is_network_admin() ){\n return;\n }\n\n if( ! current_user_can( 'manage_options' ) ){\n return;\n } ?>\n\n <div class=\"welcome-message notice notice-info\">\n <div class=\"notice-wrapper\">\n <div class=\"notice-text\">\n <h3><?php esc_html_e( 'Congratulations!', 'bakes-and-cakes' ); ?></h3>\n <p><?php printf( __( '%1$s is now installed and ready to use. Click below to see theme documentation, plugins to install and other details to get started.', 'bakes-and-cakes' ), esc_html( $name ) ) ; ?></p>\n <p><a href=\"<?php echo esc_url( admin_url( 'themes.php?page=bakes-and-cakes-getting-started' ) ); ?>\" class=\"button button-primary\"><?php esc_html_e( 'Go to the getting started.', 'bakes-and-cakes' ); ?></a></p>\n <p class=\"dismiss-link\"><strong><a href=\"?bakes_and_cakes_admin_notice=1\"><?php esc_html_e( 'Dismiss', 'bakes-and-cakes' ); ?></a></strong></p>\n </div>\n </div>\n </div>\n <?php }\n }", "title": "" }, { "docid": "7dcfe280aca78fb52e81d09a43e4355a", "score": "0.56672275", "text": "function wc_admin_update_0251_remove_unsnooze_action()\n {\n }", "title": "" }, { "docid": "217a4e66b325555dea12d15b07f8c313", "score": "0.5662016", "text": "public function remove_update_nag( $value ) {\n\t\tif ( isset( $_POST['mainwpsignature'] ) ) {\n\t\t\treturn $value;\n\t\t}\n\t\tif ( ! MainWP_Helper::is_updates_screen() ) {\n\t\t\treturn $value;\n\t\t}\n\t\tif ( isset( $value->response['wp-time-capsule/wp-time-capsule.php'] ) ) {\n\t\t\tunset( $value->response['wp-time-capsule/wp-time-capsule.php'] );\n\t\t}\n\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "05b17e935b3cc4d171656b59faa32154", "score": "0.56508696", "text": "function techozoic_show_notice() { ?>\n <div id=\"message\" class=\"updated fade\">\n\t\t<p><?php printf( __( 'Theme activated! This theme contains <a href=\"%s\">theme options</a> and <a href=\"%s\">custom sidebar widgets</a>.<br />&nbsp; See <a href=\"%s\">Change Log</a>.', 'techozoic' ), admin_url( 'themes.php?page=techozoic' ), admin_url( 'widgets.php' ) , get_template_directory_uri() . \"/changelog.php\\\" onclick=\\\"return changelog('\". get_template_directory_uri() .\"/changelog.php')\\\"\") ?></p>\n </div>\n <style type=\"text/css\">#message2, #message0 { display: none; }</style>\n <?php\n}", "title": "" }, { "docid": "75556048f69fe2d417d3ef44642813f0", "score": "0.5649342", "text": "public function admin_notice_upgrade_notice() {\n\t\t\tstatic $notices_shown = array();\n\n\t\t\t$current_screen_id = get_current_screen()->id;\n\t\t\tif ( 'admin_page_learndash_lms_addons' === $current_screen_id ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ( isset( $this->data['updates'] ) ) && ( ! empty( $this->data['updates'] ) ) ) {\n\t\t\t\tforeach ( $this->data['updates'] as $plugin_update ) {\n\t\t\t\t\tif ( isset( $notices_shown[ $plugin_update->slug ] ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( isset( $this->data['plugins'][ $plugin_update->slug ]['upgrade_notice_admin']['content_formatted'] ) ) && ( ! empty( $this->data['plugins'][ $plugin_update->slug ]['upgrade_notice_admin']['content_formatted'] ) ) ) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Filter to allow override of showing the upgrade notice admin\n\t\t\t\t\t\t * banner. By default this will show on all pages.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @since 3.1.4\n\t\t\t\t\t\t * @param boolean true Wether to show the update notice.\n\t\t\t\t\t\t * @return boolean Return true to show.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif ( apply_filters( 'learndash_upgrade_notice_admin_show', true, $plugin_update->slug ) ) {\n\t\t\t\t\t\t\t$notices_shown[ $plugin_update->slug ] = $plugin_update->slug;\n\t\t\t\t\t\t\t?><div class=\"notice notice-error notice-alt is-dismissible ld-plugin-update-notice\"><?php\n\t\t\t\t\t\t\techo wp_kses_post( $this->data['plugins'][ $plugin_update->slug ]['upgrade_notice_admin']['content_formatted'] );\n\t\t\t\t\t\t\t?></div><?php\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}", "title": "" }, { "docid": "fa3d2c71ea0ae9d01897e095ea61cc95", "score": "0.5647423", "text": "public function review_notice() {\n $this->review_dismissal();\n $this->review_prending();\n\n $review_dismissal = get_option( 'rpt_review_dismiss' );\n if ( 'yes' == $review_dismissal ) {\n return;\n }\n\n $activation_time = get_option( 'rpt_active_time' );\n if ( !$activation_time ) {\n $activation_time = time();\n add_option( 'rpt_active_time', $activation_time );\n }\n\n // 1296000 = 15 Days in seconds.\n if ( time() - $activation_time > 1296000 ) {\n add_action( 'admin_notices', array(\n $this,\n 'review_notice_message'\n ) );\n }\n }", "title": "" }, { "docid": "8a6f5f851650501742301e8f64258638", "score": "0.56259894", "text": "static public function deactivate()\n {\n JRP::remove_wp_options();\n }", "title": "" }, { "docid": "f36ecb77c9ab65627bf1ce2380ca745c", "score": "0.5622597", "text": "function easyyoutube_deactivation() {\n\t\t\twp_clear_scheduled_hook('easyyoutube_cron_import');\n\t\t\twp_clear_scheduled_hook('easyyoutube_update_cron_hook');\n\t\t}", "title": "" }, { "docid": "fe4d1cc216ec22496a5844c279750aa6", "score": "0.56195426", "text": "function muplugins_loaded() {\n if ( ! function_exists( 'get_plugins_data' ) ) {\n require_once ABSPATH . 'wp-admin/includes/plugin.php';\n }\n // Deactivate date picker plugin if native date picker is installed\n $date_time_picker_file = 'acf-field-date-time-picker/acf-date_time_picker.php';\n if ( has_native_date_time_picker() && is_plugin_active( $date_time_picker_file ) ) {\n deactivate_plugins( plugin_basename( WP_PLUGIN_DIR . '/' . $date_time_picker_file ) );\n }\n}", "title": "" }, { "docid": "59c21fc82b5b89c9d879d5afc1779922", "score": "0.56168294", "text": "function SMC_deactivatePlugin() {\n}", "title": "" }, { "docid": "81077ec30338e22d800547a17fa6ba9e", "score": "0.5616153", "text": "function pmpro_upgrade_1_9_4_show_div_notice() {\n ?>\n <div class=\"notice notice-warning\">\n <p><?php _e( 'We have detected that you are using a custom checkout page template for Paid Memberships Pro. This was recently changed and may need to be updated in order to display correctly.', 'paid-memberships-pro')?>\n \t<?php _e('If you notice UI issues after upgrading, <a href=\"https://www.paidmembershipspro.com/add-ons/table-layout-plugin-pages/\">see this free add on to temporarily roll back to the table-based layout while you resolve the issues</a>.', 'paid-memberships-pro' ); ?> <a href=\"<?php echo add_query_arg('pmpro_div_notice_hide', '1', $_SERVER['REQUEST_URI']);?>\"><?php _e( 'Dismiss', 'paid-memberships-pro' );?></a></p>\n </div>\n<?php\n}", "title": "" }, { "docid": "0d436dcb96f589772af1854de0c479f3", "score": "0.560907", "text": "function zing_bt_deactivate() {\r\n\twp_clear_scheduled_hook('zing_bt_cron_hook');\r\n}", "title": "" }, { "docid": "a6f731a530f3279b7e614fd0f2ddedd3", "score": "0.5605429", "text": "function wp_clean_plugins_cache($clear_update_cache = \\true)\n{\n}", "title": "" }, { "docid": "faa8e7235ac573b839e8b23b7946107e", "score": "0.5604783", "text": "function public_updates() {\n\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\n\t\t\tremove_action( 'load-update-core.php', 'wp_update_plugins' );\n\t\t\tadd_filter( 'pre_site_transient_update_plugins', array( $this, 'empty_return_function' ) );\n\t\t\twp_clear_scheduled_hook( 'wp_update_plugins' );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "46e766f91b23ba81096eb6ce2d42d594", "score": "0.56036526", "text": "function caldera_forms_notice_ignore() {\n\t$user_id = get_current_user_id();\n\n\tif ( isset($_GET['caldera_forms_notice_ignore']) && '0' == $_GET['caldera_forms_notice_ignore'] ) {\n\t\tadd_user_meta($user_id, 'caldera_forms_activation_ignore_notice', 'true', true);\n\t}\n}", "title": "" }, { "docid": "fb7972780ee4b402c46a86eafffb630e", "score": "0.5602633", "text": "public function init() {\n\t\tif ( 'Y' !== get_option( 'mainwp_wp_staging_ext_enabled' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! $this->is_plugin_installed ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( 'hide' === get_option( 'mainwp_wp_staging_hide_plugin' ) ) {\n\t\t\tadd_filter( 'all_plugins', array( $this, 'all_plugins' ) );\n\t\t\tadd_action( 'admin_menu', array( $this, 'remove_menu' ) );\n\t\t\tadd_filter( 'site_transient_update_plugins', array( &$this, 'remove_update_nag' ) );\n\t\t\tadd_filter( 'mainwp_child_hide_update_notice', array( &$this, 'hide_update_notice' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "31b58520b5540cb38e89b539a5fa9a80", "score": "0.5592092", "text": "function wp_wahlblackout_init() {\n if (current_time('timestamp') >= get_option('wahlblackout_datum_rein') && current_time('timestamp') <= get_option('wahlblackout_datum_raus')) {\n if (!get_option('wahlblackout_cache_leer')) {\n wp_wahlblackout_clearcache();\n add_option('wahlblackout_cache_leer','1');\n }\n\n if (is_admin()) return;\n\n ob_start();\n\n // Own blackout.php? Else use ours :-)\n if ( file_exists( WP_CONTENT_DIR . '/blackout.php' ) )\n include( WP_CONTENT_DIR . '/blackout.php' );\n else\n include('blackout.php');\n\n ob_flush();\n exit();\n }\n elseif (current_time('timestamp') >= get_option('wahlblackout_datum_raus')) {\n wp_wahlblackout_clearcache();\n delete_option('wahlblackout_cache_leer');\n }\n}", "title": "" }, { "docid": "e408172afdb43d903103b2a0a1473cc2", "score": "0.55805445", "text": "function uninstall()\n {\n //When the plugin is uninstalled or deactivation, cleanup the options\n delete_option( WpKuluValleyEmbedAdmin::$option_name );\n }", "title": "" }, { "docid": "2d3f969e8335737678159279d922f4a0", "score": "0.5575566", "text": "function hide_update_notice_to_all_but_admin_users() {\n\tif (!current_user_can('update_core')) {\n\t\tremove_action( 'admin_notices', 'update_nag', 3 );\n\t}\n}", "title": "" }, { "docid": "771ff360322a93c1630993492ebac43b", "score": "0.55746406", "text": "function ah_stop_heartbeat() {\nglobal $pagenow;\nif ($pagenow != 'post.php' && $pagenow != 'post-new.php') wp_deregister_script('heartbeat');\n}", "title": "" }, { "docid": "0420d4f0bd0ca31ccff5538b8384a0d4", "score": "0.5574197", "text": "private static function has_sticky_messages() {\n if ( ! self::$_added_sticky_javascript ) {\n add_action( 'admin_footer', array( 'FS_Admin_Notice_Manager', '_add_sticky_dismiss_javascript' ) );\n }\n }", "title": "" } ]
65b450932c641031938ad8b66477578a
Gets the number of the current row
[ { "docid": "702e8b45beb98bd0f8be0418a55b74ea", "score": "0.0", "text": "public function key() {\r\n return $this->_position;\r\n }", "title": "" } ]
[ { "docid": "0bc9e2676d99931824b8d2e9bba3d8a2", "score": "0.8274653", "text": "public function numRow()\n\t\t{\n\t\t\treturn $this->nrRow;\n\t\t}", "title": "" }, { "docid": "45c8cf60aa968606fab4903c47e702c7", "score": "0.7929784", "text": "public function countRow(): int\n {\n return $this->countRow;\n }", "title": "" }, { "docid": "c0785e8f3af64171de399e2924cb2b1e", "score": "0.7901223", "text": "public function getRowNumber()\n {\n return $this->rowNumber;\n }", "title": "" }, { "docid": "6715d944540e4dd24d86f0ff735b08c6", "score": "0.78275174", "text": "public function getRowsNumber(): int\n {\n return $this->rowsNumber;\n }", "title": "" }, { "docid": "6099d8c36a7a242c686d7e0458282207", "score": "0.77122116", "text": "public function get_row_index() {\n return get_row_index();\n }", "title": "" }, { "docid": "dc3aa25dbf0ad89ad82cf10fb13b33eb", "score": "0.7647036", "text": "function numberRows(){\n\t\treturn $this->_numberRows();\n\t}", "title": "" }, { "docid": "dc3aa25dbf0ad89ad82cf10fb13b33eb", "score": "0.7647036", "text": "function numberRows(){\n\t\treturn $this->_numberRows();\n\t}", "title": "" }, { "docid": "e7421d68b919597572b6836c99e236f3", "score": "0.7589743", "text": "public function key()\n {\n return (int) $this->current_row;\n }", "title": "" }, { "docid": "71d893f8ed9a6493e71ef44696f6e732", "score": "0.7477579", "text": "public function row_count() {\n\t\t// Make sure there are no pending updates.\n\t\t$this->execute();\n\t\t\n\t\t// Run the SQL.\n\t\t$db = LadderDB::factory();\n\t\t$query = $db->query(sprintf(\n\t\t\t'SELECT COUNT(*) FROM %s',\n\t\t\tsql::escape_identifier($this->name)\n\t\t));\n\t\t\n\t\t// Get the value and return.\n\t\t$row = mysql_fetch_row($query);\n\t\treturn (int) $row[0];\n\t}", "title": "" }, { "docid": "736aa473275fd10e947f0efc181e25b4", "score": "0.7436069", "text": "function get_current_row() {\n\t\t$state_data = $state_data = $this->migration_state_manager->set_post_data();\n\n\t\t$current_row = 0;\n\n\t\tif ( ! empty( $state_data['current_row'] ) ) {\n\t\t\t$temp_current_row = trim( $state_data['current_row'] );\n\t\t\tif ( ! empty( $temp_current_row ) ) {\n\t\t\t\t$current_row = (int) $temp_current_row;\n\t\t\t}\n\t\t}\n\n\t\t$current_row = ( 0 > $current_row ) ? 0 : $current_row;\n\n\t\treturn $current_row;\n\t}", "title": "" }, { "docid": "80a939fc63db1178530541b146ff7367", "score": "0.7430345", "text": "public function getRow(): int;", "title": "" }, { "docid": "26d3c4f9ba2f8bcd01b48de274bdacac", "score": "0.74113584", "text": "public function getRowCount()\n {\n return $this->row;\n }", "title": "" }, { "docid": "6f18a36de6ce6e7a9a180da6dead1c30", "score": "0.7308412", "text": "public function fetchNum() {\n if ($this->stored) {\n return $this->stored[$this->current_row];\n } else {\n return $this->fetched;\n }\n }", "title": "" }, { "docid": "9f198b768ae3924e1270950d626ac9ef", "score": "0.72328526", "text": "public function count()\n {\n return $this->iRowCount;\n }", "title": "" }, { "docid": "7b6977ab93962f184110eed359dda450", "score": "0.7191775", "text": "public function NumRows(){\n return $this->NumRows;\n }", "title": "" }, { "docid": "9b7a0aa44430e95cfbd4103a184d9891", "score": "0.7185338", "text": "function GetCurrentRow()\n\t{\n\t\treturn $this->current_row;\n\t}", "title": "" }, { "docid": "e9dac98e86af3fc02852a723915e49aa", "score": "0.71836764", "text": "public function key()\n\t{\n\t\treturn $this->rowCounter;\n\t}", "title": "" }, { "docid": "fbb167258449f98048d66976125e35ad", "score": "0.71528625", "text": "public function getRowCount(){\n $lastRowIndex = 1;\n foreach($this->_cSheet->sheetData->row as $row){\n $lastRowIndex = (int)$row['r'];\n }\n //return count($this->_cSheet->sheetData->row);\n return $lastRowIndex;\n}", "title": "" }, { "docid": "0ae69335e1cfb59fb0eee298beade4d8", "score": "0.7133822", "text": "public function getRowIndex()\n {\n return $this->rowIndex;\n }", "title": "" }, { "docid": "0ae69335e1cfb59fb0eee298beade4d8", "score": "0.7133822", "text": "public function getRowIndex()\n {\n return $this->rowIndex;\n }", "title": "" }, { "docid": "96ad6f1a13eba65409c482865608fde8", "score": "0.7073824", "text": "public function NumRows() {\n\t\treturn $this->_numRows;\n\t}", "title": "" }, { "docid": "272316d6ba25cfd89817868c10f69bd9", "score": "0.7042215", "text": "public function rowCount(): int;", "title": "" }, { "docid": "734ad32ba0298d1f6c5996484299e2c7", "score": "0.7040585", "text": "public function rows(): int\n\t{\n\t\treturn $this->rows;\n\t}", "title": "" }, { "docid": "b9d1527b6bd00ffacbad11f9322c195e", "score": "0.70350075", "text": "public function count()\n {\n return $this->numOfRows;\n }", "title": "" }, { "docid": "5ffc90151bc7d513ea76368f8a61f5d9", "score": "0.69642335", "text": "public function getRowCount()\n {\n return $this->row_count;\n }", "title": "" }, { "docid": "5ffc90151bc7d513ea76368f8a61f5d9", "score": "0.69642335", "text": "public function getRowCount()\n {\n return $this->row_count;\n }", "title": "" }, { "docid": "5e37ab5f16bdf2e6e85bf222f6576ae1", "score": "0.6919917", "text": "public function get_num_rows()\n {\n return $this->__num_rows;\n }", "title": "" }, { "docid": "4fcfd96ea6401149653fef4c595e2a0c", "score": "0.6903932", "text": "function getNumRows() {\n return $this->_result->num_rows;\n }", "title": "" }, { "docid": "1c4840558576fbfa17e85f405ce25ba2", "score": "0.69028676", "text": "function getNRows()\n {\n return $this->nrows;\n }", "title": "" }, { "docid": "71bf938aa14b68f36ecbe98111ceb4d5", "score": "0.68950176", "text": "public function key()\n {\n return $this->iCurrentRow;\n }", "title": "" }, { "docid": "f7af9844a618e25b55e83e2ec3323e27", "score": "0.6887127", "text": "public function rowCount()\n\t{\n\t\treturn $this->_rowCount;\n\t}", "title": "" }, { "docid": "40b7ea60b03e96ef5be9875b138bc5f0", "score": "0.68738276", "text": "public function num_rows();", "title": "" }, { "docid": "75a59a6dfcaac1c8bc7565b1f7e45a44", "score": "0.6840931", "text": "public function num()\n {\n $reqs = $this->select('*')->where(\"status = ?\", \"1\")->fetchAll($this->table);\n \n $num = $this->rows();\n \n return $num;\n }", "title": "" }, { "docid": "70594c3eb9ac79a9c92941a37b70f051", "score": "0.6818008", "text": "public function rowCount()\n\t{\n\t\treturn count( $this->_rows );\n\t}", "title": "" }, { "docid": "d25c2a27b7993ebb88d11193d5df393f", "score": "0.681798", "text": "public function countRows()\n {\n return $this->countRec;\n }", "title": "" }, { "docid": "eb879b75c0c6b6eeb9b74c1d1e628493", "score": "0.68116045", "text": "public function getCurrentRowKey()\n {\n return key($this->data->current());\n }", "title": "" }, { "docid": "ea68267e2b7eaf7b1908de0dac3d1c72", "score": "0.68099326", "text": "public function getRowCount()\n {\n return $this->rowCount;\n }", "title": "" }, { "docid": "268563912ff714264839e52b876b263a", "score": "0.6794149", "text": "public function rowcount(){\n return $this->stmt->rowCount();\n }", "title": "" }, { "docid": "fe9ea523d523157820b9ca5293c0d428", "score": "0.67872155", "text": "public function key() : int\n {\n return $this->numReadRows;\n }", "title": "" }, { "docid": "d2a4e79790dbf42e69b5d30b5e1489b4", "score": "0.67825335", "text": "public function RowCount()\n\t{\n \t\treturn $this->statement->rowCount();\n\t}", "title": "" }, { "docid": "9750d7f2c12f71558bd51ae8ceb49132", "score": "0.67816985", "text": "public function count()\n\t{\n\t\tif ($this->numRows) {\n\t\t\treturn $this->numRows;\n\t\t}\n//\t\t$save = ftell($this->filePointer);\n//\t\t$saveRow = $this->rowCounter;\n\n\t\t$count = 0;\n\t\twhile ($this->valid()) {\n\t\t\t$this->next();\n\t\t\t$count++;\n\t\t}\n\t\t$this->numRows = $count;\n\n//\t\t$fail = fseek($this->filePointer, $save);\n//\t\tdebug('fseek', $fail, $save);\n\t\t$this->rewind();\n//\t\tdebug('fseek', ftell($this->filePointer), $this->feof());\n\t\t//$this->rowCounter = $saveRow;\n\n\t\treturn $this->numRows;\n\t}", "title": "" }, { "docid": "886e505674f5cbcbbf6ed685830cf88e", "score": "0.67416734", "text": "function rowCount()\r\n {\r\n }", "title": "" }, { "docid": "2ae639244131b4c2e2efc6331b6796b1", "score": "0.67325073", "text": "function getline_num() {\n return $this->line_num;\n }", "title": "" }, { "docid": "6e0260188be18bd4f9ca27821e920570", "score": "0.66848725", "text": "function num_rows()\n {\n return @OCIRowCount($this->m_query_id);\n }", "title": "" }, { "docid": "066bee20f1be3eeba6a75f51b3c557dc", "score": "0.6677493", "text": "function Rowcount() { \r\n\t\t\t$Result = $this->Query(\"SELECT FOUND_ROWS() as Row;\"); \r\n\t\t\treturn $Result['0']['Row']; \r\n\t\t}", "title": "" }, { "docid": "b1b0be3d0721764d38f2a7dc79d89aa0", "score": "0.6675842", "text": "public function rowCount(){\n return $this->statement->rowCount();\n }", "title": "" }, { "docid": "03070c710141c0f0f4b42aeff974f2ed", "score": "0.66525364", "text": "abstract protected function num_rows();", "title": "" }, { "docid": "20dc4834ce39d99d679cd0d28dbed716", "score": "0.6649477", "text": "function getColumnNumber() {\n return xml_get_current_column_number($this->parser);\n }", "title": "" }, { "docid": "89d78e120b1ef02ee7c6adcd588368a2", "score": "0.6645454", "text": "public function count() {\n\t\t\treturn (int)sqlite_num_rows($this->result);\n\t\t}", "title": "" }, { "docid": "ba261a2589ca715f3f6b39cbfd2aed97", "score": "0.6644139", "text": "public function key(): int\n {\n if (!$this->valid()) {\n throw new LogicException('Invalid reader state. Check valid() before using key().');\n }\n\n return $this->row_number;\n }", "title": "" }, { "docid": "eed7fbca5efcf4f2b117be4e1b9f96d6", "score": "0.6643686", "text": "public function getNumberOfRows()\r\n {\r\n $this->_getData();\r\n\r\n return $this->_totalEntries;\r\n }", "title": "" }, { "docid": "763041a3bffa70e448bfcad23c3339b3", "score": "0.6641937", "text": "public function getRow() : ?int ;", "title": "" }, { "docid": "75f70daee992504b23fe7483c541fa8c", "score": "0.6627677", "text": "public function getRowCount()\n\t\t{\n\t\t\treturn count($this->rows);\n\t\t}", "title": "" }, { "docid": "75f70daee992504b23fe7483c541fa8c", "score": "0.6627677", "text": "public function getRowCount()\n\t\t{\n\t\t\treturn count($this->rows);\n\t\t}", "title": "" }, { "docid": "beeec13384c5b6a3cd8f011424dde8e9", "score": "0.66250646", "text": "public function getRowCount()\n {\n if (array_key_exists(\"rowCount\", $this->_propDict)) {\n return $this->_propDict[\"rowCount\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "52abffbf8f2df07ede78cc5967fd4d84", "score": "0.66111994", "text": "public function getCurrentRowIndex () {\r\n /* If the file isn't open, this is an error. */\r\n if (!$this->isFileOpen())\r\n return $this->setError(self::ERROR_FILE_NOT_OPENED);\r\n\r\n /* If the worksheet isn't valid, there isn't a row to read. */\r\n if (!isset($this->_worksheet_info[$this->_location_worksheet]))\r\n return $this->setError(self::ERROR_END_OF_FILE);\r\n\r\n /* Get the worksheet info. */\r\n $worksheet_info = $this->_worksheet_info[$this->_location_worksheet];\r\n\r\n /* If the row isn't valid for the worksheet, there isn't one to read. */\r\n if (($this->_location_row < 1) || ($this->_location_row > $worksheet_info['totalRows']))\r\n return $this->setError(self::ERROR_END_OF_WORKSHEET);\r\n\r\n /* Return the current row index. */\r\n return $this->_location_row;\r\n }", "title": "" }, { "docid": "b44317835ddf14fb4ba6ec6083a36c75", "score": "0.6607847", "text": "public function getInd(): int\n {\n return $this->ind;\n }", "title": "" }, { "docid": "608ae920136bf2f88f11b3d0ace0f782", "score": "0.66039926", "text": "public function getNumRows()\n\t{\n\t\t$this->connect();\n\n\t\tif ($this->statement)\n\t\t{\n\t\t\treturn $this->statement->rowCount();\n\t\t}\n\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "90de85320219573bb65e72fc8e7380a3", "score": "0.6603394", "text": "public function rowCount()\n {\n return oci_num_rows($this->_sth);\n }", "title": "" }, { "docid": "07d6557591dcf4c8c382b5ad01debda5", "score": "0.660173", "text": "public function RowCount() {\n return is_null($this->stmt) ? $this->stmt : $this->stmt->rowCount(); // If the statment is empty (execute), it'll be null and return null. Otherwise it will return rows affect by last database change.\n }", "title": "" }, { "docid": "d02e8cff42b35fcb513b5a38fae75d6f", "score": "0.659713", "text": "function lastNumRows() {\n\t\tif ($this->_result) {\n\t\t\treturn @mssql_num_rows($this->_result);\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "8c0a90bd83d072c2aad693d15747c837", "score": "0.6591231", "text": "public function num_rows(){\n\t\t \tif($this->result){\n\t\t \t\t$num = mysqli_num_rows($this->result);\n\n\t\t \t}else{\n\t\t \t\t$num = 0;\n\t\t \t}\n\t\t \treturn $num;\n\t\t }", "title": "" }, { "docid": "1b42c98ff66771cc437ee28d9aebf029", "score": "0.6576676", "text": "function lastNumRows ()\n {\n return $this->_result? $this->_result->RecordCount(): false;\n }", "title": "" }, { "docid": "c2f1029d90db9dec4370292e92fb807d", "score": "0.6575415", "text": "public function rowCount(){\n return $this->stmt->rowCount();\n }", "title": "" }, { "docid": "66b38a1aea05ac721d6cedcb8a68ceae", "score": "0.6574975", "text": "function rowCount() {\n return $this->statement->rowCount();\n }", "title": "" }, { "docid": "2810c9782f5f213db553f09d805d7879", "score": "0.6563939", "text": "public function RowCount() {\n return is_null($this->stmt) ? $this->stmt : $this->stmt->rowCount();\n }", "title": "" }, { "docid": "f297d184e29390ea90aee852809b2f9f", "score": "0.6563736", "text": "public function count()\n {\n return count($this->rows);\n }", "title": "" }, { "docid": "2127b866d3ec6f8795daafe881dc9dee", "score": "0.6559358", "text": "public function count()\n {\n return count($this->_cells);\n }", "title": "" }, { "docid": "2132cf7cd8d7f3434486b8757ee2ec0b", "score": "0.6548989", "text": "function RowsNumber($Table)\n {\n\n\n global $con;\n $numberCol = \"select count(*) from $Table\";\n\n $nColResult = mysqli_query($con,$numberCol);\n\n $ColumnNumber = mysqli_fetch_array($nColResult);\n\n\n return $ColumnNumber[0];\n\n }", "title": "" }, { "docid": "e7026029cecfa1f52a354b1272f3f338", "score": "0.6548964", "text": "function next_row()\n\t{\n\t\t$result = $this->result();\n\t\tif (isset($result[$this->current_row + 1]))\n\t\t{\n\t\t\t++$this->current_row;\n\t\t}\n\t\t\t\t\n\t\treturn $result[$this->current_row];\n\t}", "title": "" }, { "docid": "d29fb091c53c0d140616577d118469c4", "score": "0.65485674", "text": "public function numrows(){\n\n\t\t$this->execute();\n\t\treturn $this->numrows;\n\n\t}", "title": "" }, { "docid": "7e233b216cb9e54707e0a55cc832468e", "score": "0.65481937", "text": "function getNumRows() {\n\t\tif($this->last_result) {\n\t\t\treturn pg_numrows($this->last_result);\n\t\t} else {\n\t\t\treturn 0; // last_result is not a valid result set\n\t\t}\n\t}", "title": "" }, { "docid": "be5212379f8b8396724658ecbb1913e2", "score": "0.65454745", "text": "public function recordCount()\n {\n return $this->numOfRows;\n }", "title": "" }, { "docid": "06c2775e79945f70995c87755a61be92", "score": "0.65401065", "text": "private function obtainNumRows(): int\n {\n $count = 0;\n while (false !== $this->stmt->fetch(PDO::FETCH_NUM)) {\n $count = $count + 1;\n }\n $this->stmt->execute();\n return $count;\n }", "title": "" }, { "docid": "d08784d99c14f0ae5aebc23d33e4f9c0", "score": "0.6527379", "text": "public function rowCount(){\n\t\t return $this->stmt->rowCount();\n\t\t}", "title": "" }, { "docid": "4bd8ebd013bbea26031d18afa8cf3a1d", "score": "0.65212697", "text": "function GetRowCount()\n {\n return ($this->Result ? mysql_num_rows($this->Result) : 0);\n }", "title": "" }, { "docid": "b81033969971eabb8788b55378e6ebea", "score": "0.6520523", "text": "public function num_rows() {\n\t\t\treturn $this->count();\n\t\t}", "title": "" }, { "docid": "a34b872711d6e72ed235cfcfdbfec85c", "score": "0.6518094", "text": "public function rowCount()\n {\n return parent::rowCount();\n }", "title": "" }, { "docid": "55d1afccaa665122ab544aeb9979bbef", "score": "0.65121764", "text": "function getNumberOfRows() {\n\n $numberOfRow = 0;\n foreach ($this->groups as $group) {\n $numberOfRow += $group->getNumberOfRows();\n }\n return $numberOfRow;\n }", "title": "" }, { "docid": "41ff9fc9601a96596bd7268329d6d2d3", "score": "0.6505935", "text": "public function getRowCount(): int\n {\n return $this->preparedStatement->rowCount();\n }", "title": "" }, { "docid": "8687b4b14d6fe9a7dd6cd2a284de56a0", "score": "0.6501737", "text": "public function numPlus()\n {\n $reqs = $this->select('*')->where(\"status = ?\", '0')->fetchAll($this->table);\n \n $num = $this->rows();\n \n return $num;\n }", "title": "" }, { "docid": "60902f2c032d760ef42e02e9d236f19c", "score": "0.64980763", "text": "public function count()\n {\n\t\t$query = clone $this;\n\t\t$query->setColumns('COUNT(*) as rows_count');\n\t\treturn (int)$query->row('rows_count');\n\t}", "title": "" }, { "docid": "5c90e40de7f9a77e8ad7362fae8d8ea8", "score": "0.64967406", "text": "public function rowCount(){\n\t\treturn $this->stmt->rowCount();\n\t}", "title": "" }, { "docid": "1b50cc818eaf05e24f05fff358394840", "score": "0.6492742", "text": "public function getNumCol() {\n return $this->numCol;\n }", "title": "" }, { "docid": "cdabbc349204aeb4124e5dba90b91775", "score": "0.64925945", "text": "public function count()\n\t{\n\t\treturn count($this->rows);\n\t}", "title": "" }, { "docid": "49582d249f0b3c18bddc22c6adf5563e", "score": "0.64911705", "text": "public function num_rows() {\n return count($this->data);\n }", "title": "" }, { "docid": "06b94f798db5cdea9c4f48903cdc3c2c", "score": "0.64828515", "text": "public function rowCount(){\r\n\t\treturn $this->stmt->rowCount();\r\n\t}", "title": "" }, { "docid": "026a042c4517314a1e901c50b36aaf05", "score": "0.6477958", "text": "function getSelectedRowCount() {\r\n\t\t\tif (!isSet($this->privateVars['resultSet'])) return 0;\r\n\t\t\tif (!is_Object($this->privateVars['resultSet'])) return 0;\r\n\t\t\t$rows = $this->privateVars['resultSet']->getNumRows();\r\n\t\t\tif ($rows == -1) $rows = 0;\r\n\t\t\treturn $rows;\r\n\t\t}", "title": "" }, { "docid": "7f5061d770b76c216603e15ddf7e07fb", "score": "0.64710456", "text": "public function rowCount();", "title": "" }, { "docid": "7f5061d770b76c216603e15ddf7e07fb", "score": "0.64710456", "text": "public function rowCount();", "title": "" }, { "docid": "33b49f5c9367d4dfef38b66b0d173d4a", "score": "0.64624166", "text": "public function startRow(): int\n {\n return 2;\n }", "title": "" }, { "docid": "33b49f5c9367d4dfef38b66b0d173d4a", "score": "0.64624166", "text": "public function startRow(): int\n {\n return 2;\n }", "title": "" }, { "docid": "07432b3f1ddfaba64fe9ccf722b15870", "score": "0.64595693", "text": "public function get_row_id() {\n\t\treturn $this->row_id;\n\t}", "title": "" }, { "docid": "66c47fe82ddad24ed36009fddb705ff0", "score": "0.6454595", "text": "public function rowCount()\r\n\t{\r\n\t\t$records = 0;\r\n\t\t$csvfile = file(\"./upload/\".$_GET['filename']);//read entire file into array\r\n\t\tforeach($csvfile as $i =>$k){\r\n\t\t\t$records++;\r\n\t\t}\r\n\t\treturn $records - 2;\t\r\n\t}", "title": "" }, { "docid": "cdb4ef63f95e10650b5cd4c136985758", "score": "0.64545274", "text": "public function rows()\r\n\t{\r\n\t\treturn parent::rowCount();\r\n\t}", "title": "" }, { "docid": "e2ec848b659a456ea88c87eb05d10ba4", "score": "0.645228", "text": "public function key(): self\n {\n return $this->_currentRow;\n }", "title": "" }, { "docid": "2a1d9780ae3d8c0fdda56cefefe2c4de", "score": "0.6447721", "text": "public function getRowsCount()\n {\n return $this->_getResource()->getRowsCount();\n }", "title": "" }, { "docid": "be3644aa6a9f65c0f2d5069059375015", "score": "0.6444659", "text": "public function getRowCount() {\n return sizeof($this->board);\n }", "title": "" }, { "docid": "3f79a862f15a221659b0489d0c4b2d2b", "score": "0.64437896", "text": "function getNumRows() \n {\n return mysql_num_rows($this->_result);\n }", "title": "" }, { "docid": "4e46aa70e5b360915b902416d295524b", "score": "0.6441865", "text": "public function RowsCount(){\n return $this->stmt->rowCount();\n }", "title": "" }, { "docid": "601413a80a36e8e714dedab801db492b", "score": "0.6439767", "text": "function rowCount(){\n return $this->statement->rowCount();\n\n }", "title": "" } ]
bdac5191074519a1c1ba5afb83e44666
Handles outputting an 'title' element
[ { "docid": "b898fbbe86ab4339bedf82f070ecff77", "score": "0.0", "text": "public function render()\n {\n $class = $this->field->args('class');\n\n $args = $this->parse_args($this->type, [\n 'id' => $this->_id(),\n 'desc' => $this->_desc(true),\n 'label' => $this->field->args('label'),\n 'class' => ! empty($class) ? $class : 'button-secondary',\n 'onclick' => $this->field->args('onclick'),\n 'nonce' => $this->field->args('nonce'),\n ]);\n\n $html = sprintf('<button class=\"%s\" id=\"%s\" data-nonce=\"%s\">%s</button>',\n $args['class'],\n $args['id'],\n $args['nonce'],\n $args['label']);\n\n $html .= $args['desc'];\n\n $selector = '#' . $args['id'];\n\n $html .= '<script>';\n $html .= 'jQuery(\"' . $selector . '\").on(\"click\", function(event){event.preventDefault(); ' . $args['onclick'] . '});';\n $html .= '</script>';\n\n return $this->rendered($html);\n }", "title": "" } ]
[ { "docid": "1bc4c1867c20cf67f22f2f71e3856005", "score": "0.79912245", "text": "protected function title()\n\t{\n\t\tif(isset($this->vars['page_title']))\n\t\t{\n\t\t\techo '<title>' . _e($this->vars['page_title']) . '</title>' . \"\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "0342e2293c19dd2f7bb116b7f2a6f377", "score": "0.7906858", "text": "function display_title() {\n }", "title": "" }, { "docid": "e4ad82f39cd483608f1ad2a913c4e932", "score": "0.7897947", "text": "public function getTitle(){\n echo \"<b>Title:</b> \".$this->title . \"<br>\";\n }", "title": "" }, { "docid": "c6204de8ca5cecbcc350dd4fe672e077", "score": "0.771305", "text": "public function c_title($title='') {\r\n $output = FALSE;\r\n if (!empty($title)) $output = '<title>'.$title.'</title>';\r\n return $output;\r\n }", "title": "" }, { "docid": "b81cc2439269c89153d6a3fd73dce9f0", "score": "0.7683634", "text": "function title()\n {\n }", "title": "" }, { "docid": "bc4df5d3dc099476ce93c37827e94ee5", "score": "0.766159", "text": "public function displayTitle(){\n echo $this->title;\n }", "title": "" }, { "docid": "63b3c37513662aca90c65286d81844c9", "score": "0.761215", "text": "abstract public function title();", "title": "" }, { "docid": "63b3c37513662aca90c65286d81844c9", "score": "0.761215", "text": "abstract public function title();", "title": "" }, { "docid": "565ae5ada1a7e79a896826e106dd96ed", "score": "0.75980806", "text": "public function _title(){/* +1 Overload */\n\t\t\t\t$a=func_get_args();\n\t\t\t\tif(isset($this->title)){$this->head(($this->title!==false)?'<title>'.$this->title.((isset($a[0]))?$a[0]:'').'</title>':'');}\n\t\t\t\t}", "title": "" }, { "docid": "fd0fcd3b0003745eee1f1e04613782dc", "score": "0.7592039", "text": "protected abstract function get_title();", "title": "" }, { "docid": "12724c8d406a07bbdc23eb2454907378", "score": "0.7579341", "text": "private function titleHandler(): void\n {\n $chapterDOM = $this->getXmlElement();\n if ($chapterDOM->has('title')) {\n $title = $chapterDOM->firstInDocument('title');\n $this->getModel()->setTitle($title->text());\n $title->remove();\n }\n }", "title": "" }, { "docid": "4d0022da4e58297183ab04f465b67976", "score": "0.7538536", "text": "public function title();", "title": "" }, { "docid": "4d0022da4e58297183ab04f465b67976", "score": "0.7538536", "text": "public function title();", "title": "" }, { "docid": "2a0ccf87fb196cb7c562f16a3cd1390d", "score": "0.74653006", "text": "public function setTitle($title);", "title": "" }, { "docid": "2a0ccf87fb196cb7c562f16a3cd1390d", "score": "0.74653006", "text": "public function setTitle($title);", "title": "" }, { "docid": "2a0ccf87fb196cb7c562f16a3cd1390d", "score": "0.74653006", "text": "public function setTitle($title);", "title": "" }, { "docid": "2a0ccf87fb196cb7c562f16a3cd1390d", "score": "0.74653006", "text": "public function setTitle($title);", "title": "" }, { "docid": "2a0ccf87fb196cb7c562f16a3cd1390d", "score": "0.74653006", "text": "public function setTitle($title);", "title": "" }, { "docid": "7b4e11904388a873a0be2cbcee79929a", "score": "0.745725", "text": "function getTitle() ;", "title": "" }, { "docid": "1e6e911c1e2fe809ba8424a8ca264737", "score": "0.74356914", "text": "function addtitle() {\n\t\t$this->CLASS['hooks']->setHook(\"kr_header\",\"addtitle\",\"start\");\n\t\t$this->addheader(\"<title>\".$this->CLASS['config']->base->title.\"</title>\");\n\t\t$this->CLASS['hooks']->setHook(\"kr_header\",\"addtitle\",\"end\");\n\t}", "title": "" }, { "docid": "e42013ad41bb0e1aa5b9b29cf7861d3b", "score": "0.7426414", "text": "function get_page_title($title){\n ?><title><?php echo $title; ?> | Henry Harvin</title><?php\n }", "title": "" }, { "docid": "6b3b1c0cfc221a26e41e62005489f4b5", "score": "0.7415212", "text": "private function _setTitle()\n {\n return $this->_stringTemplate->format('title', ['title' => $this->title]);\n }", "title": "" }, { "docid": "577fc4b06fb2c8ab6404f44c32f81cb0", "score": "0.7406122", "text": "public function setTitle($title){}", "title": "" }, { "docid": "577fc4b06fb2c8ab6404f44c32f81cb0", "score": "0.7406122", "text": "public function setTitle($title){}", "title": "" }, { "docid": "49c5300d1e46a125704b4e9cde856c7d", "score": "0.7385639", "text": "public function setTitle($_title);", "title": "" }, { "docid": "e6ccbda49c317cc6a661f810a459a612", "score": "0.73747", "text": "function title($title)\n\t{\n\t\treturn $this->set(self::TITLE, $title);\t\n\t}", "title": "" }, { "docid": "af9c34bc22612e05367708e304f970a8", "score": "0.7368022", "text": "public function title_callback()\n {\n printf(\n '<input type=\"text\" id=\"title\" name=\"my_option_name[title]\" value=\"%s\" />',\n isset( $this->options['title'] ) ? esc_attr( $this->options['title']) : ''\n );\n }", "title": "" }, { "docid": "af9c34bc22612e05367708e304f970a8", "score": "0.7368022", "text": "public function title_callback()\n {\n printf(\n '<input type=\"text\" id=\"title\" name=\"my_option_name[title]\" value=\"%s\" />',\n isset( $this->options['title'] ) ? esc_attr( $this->options['title']) : ''\n );\n }", "title": "" }, { "docid": "090e2c9784e1f59948c7993bf5a446a2", "score": "0.73562336", "text": "protected function getTitle()\n {\n }", "title": "" }, { "docid": "885d567f4d3798054655070701826168", "score": "0.7339949", "text": "function thrive_render_title() {\n\t\t?>\n\t\t<title><?php wp_title( '|', true, 'right' ); ?></title>\n\t\t<?php\n\t}", "title": "" }, { "docid": "b7ad645387a44ebd4c12f20911906e97", "score": "0.7339019", "text": "public function printTitle()\n {\n (print($this->current->title)) && $this->reportInfo .= $this->current->title;\n }", "title": "" }, { "docid": "6693bd8ba823a25ab49783505550abeb", "score": "0.7334483", "text": "public function getTitle();", "title": "" }, { "docid": "6693bd8ba823a25ab49783505550abeb", "score": "0.7334483", "text": "public function getTitle();", "title": "" }, { "docid": "6693bd8ba823a25ab49783505550abeb", "score": "0.7334483", "text": "public function getTitle();", "title": "" }, { "docid": "6693bd8ba823a25ab49783505550abeb", "score": "0.7334483", "text": "public function getTitle();", "title": "" }, { "docid": "6693bd8ba823a25ab49783505550abeb", "score": "0.7334483", "text": "public function getTitle();", "title": "" }, { "docid": "6693bd8ba823a25ab49783505550abeb", "score": "0.7334483", "text": "public function getTitle();", "title": "" }, { "docid": "6693bd8ba823a25ab49783505550abeb", "score": "0.7334483", "text": "public function getTitle();", "title": "" }, { "docid": "6693bd8ba823a25ab49783505550abeb", "score": "0.7334483", "text": "public function getTitle();", "title": "" }, { "docid": "6693bd8ba823a25ab49783505550abeb", "score": "0.7334483", "text": "public function getTitle();", "title": "" }, { "docid": "6693bd8ba823a25ab49783505550abeb", "score": "0.7334483", "text": "public function getTitle();", "title": "" }, { "docid": "6693bd8ba823a25ab49783505550abeb", "score": "0.7334483", "text": "public function getTitle();", "title": "" }, { "docid": "6693bd8ba823a25ab49783505550abeb", "score": "0.7334483", "text": "public function getTitle();", "title": "" }, { "docid": "6693bd8ba823a25ab49783505550abeb", "score": "0.7334483", "text": "public function getTitle();", "title": "" }, { "docid": "6693bd8ba823a25ab49783505550abeb", "score": "0.7334483", "text": "public function getTitle();", "title": "" }, { "docid": "6693bd8ba823a25ab49783505550abeb", "score": "0.7334483", "text": "public function getTitle();", "title": "" }, { "docid": "49e29ed3748ab0c1c36bbb61463909e3", "score": "0.733441", "text": "public function get_title();", "title": "" }, { "docid": "a4865b8b1c69a36f8c37d0a40b3db6c8", "score": "0.733057", "text": "public function title_callback()\n {\n printf(\n '<input type=\"text\" id=\"title\" name=\"fi_theme_options[title]\" value=\"%s\" />',\n isset( $this->options['title'] ) ? esc_attr( $this->options['title']) : ''\n );\n }", "title": "" }, { "docid": "21a8ef6a37a7224d2331cd0c17ed1d1b", "score": "0.732749", "text": "public function title($title = null);", "title": "" }, { "docid": "2e5793b9003f417e6f53fc9ee0ff3dde", "score": "0.73170966", "text": "private function _title($title)\n\t{\n\t\t$this->data['title'] = lang($title);\n\t\t\n\t\t$this->ee->view->cp_page_title = lang($title); \n\t\t\n\t\t$this->ee->cp->set_breadcrumb(TAGGABLE_URL, \"Taggable\");\n\t}", "title": "" }, { "docid": "adb85c2d97543582a756371207d10a41", "score": "0.73049945", "text": "public abstract function getTitle();", "title": "" }, { "docid": "adb85c2d97543582a756371207d10a41", "score": "0.73049945", "text": "public abstract function getTitle();", "title": "" }, { "docid": "120f88225f28d070997e7b51f985c807", "score": "0.72943866", "text": "function title(){\n\t\t\techo $mytitle= \"Profile. Car Parking Website\";\n\t\t\t\n\t\t}", "title": "" }, { "docid": "3b2a9cb25c773af41bacf18b60294a37", "score": "0.7289816", "text": "public function title() {\n\tthe_title();\n}", "title": "" }, { "docid": "361ef7fc66e006e27f378595c04fd0b1", "score": "0.7287711", "text": "public function title() {\n if ($this->main_title == \"\") {\n if ($this->page[\"Title\"] == \"\") $this->openpage (\"Title\");\n $this->main_title = $this->page[\"Title\"]->{'display_title'};\n }\n return $this->main_title;\n }", "title": "" }, { "docid": "62b03f3f1d379a2bebe00274600f3f68", "score": "0.7280809", "text": "public function setTitle($title) {$this->title = $title;}", "title": "" }, { "docid": "22f2435f947259aa9279431c6ec48902", "score": "0.72626704", "text": "abstract public function getTitle();", "title": "" }, { "docid": "22f2435f947259aa9279431c6ec48902", "score": "0.72626704", "text": "abstract public function getTitle();", "title": "" }, { "docid": "22f2435f947259aa9279431c6ec48902", "score": "0.72626704", "text": "abstract public function getTitle();", "title": "" }, { "docid": "a2df4eb1fb08cfd6527c7bc6da5d3327", "score": "0.72566354", "text": "public function parseTitle()\n {\n\t $newContent = str_replace('<title>', '<title>'. $this->page->getTitle(), $this->page->getContent() );\n\t $this->page->setContent( $newContent );\n }", "title": "" }, { "docid": "a7292914e8fa4b87a4e561380aa24318", "score": "0.7249863", "text": "function setTitle($title) { $this->title = $title; }", "title": "" }, { "docid": "a7292914e8fa4b87a4e561380aa24318", "score": "0.7249863", "text": "function setTitle($title) { $this->title = $title; }", "title": "" }, { "docid": "f36bc75a1894536bb2d867eebfbd3443", "score": "0.7241231", "text": "function render_title($publication)\r\n {\r\n return htmlspecialchars($publication->get_content_object()->get_title());\r\n }", "title": "" }, { "docid": "a42f8347a1e17e913bfc095349ca31e2", "score": "0.7212833", "text": "function set_title( $title, $style='' )\n {\n $this->title = $this->esc( $title );\n if( strlen( $style ) > 0 )\n $this->title_style = $style;\n }", "title": "" }, { "docid": "d589b065228bf3611c9757500336f565", "score": "0.72078997", "text": "function getTitle() { return $this->_title; }", "title": "" }, { "docid": "7a3972b2ed470a764e44841aacaaf78e", "score": "0.72071356", "text": "function html_title($title, $subtitle = \"\")\n{\n $title = htmlspecialchars($title);\n if ($subtitle != \"\")\n $subtitle = \" <small>\" . htmlspecialchars($subtitle) . \"</small>\";\n\n print(\"<div class=\\\"page-header\\\"><h1>$title$subtitle</h1></div>\\n\");\n}", "title": "" }, { "docid": "9b083d3dde06897f335cd58ca957ee23", "score": "0.72042334", "text": "function szybkikontakt_render_title() {\n\t\t?>\n\t\t<title><?php wp_title( '|', true, 'right' ); ?></title>\n\t\t<?php\n\t}", "title": "" }, { "docid": "132a16163bea2886e2e7918ac76b1414", "score": "0.72005737", "text": "function set_title() {\n\tglobal $metalPet;\n\t$metalPet['title']=ucfirst(str_replace('-', ' ', $metalPet['page'])).$metalPet['title_append'];\n}", "title": "" }, { "docid": "616898c1e6f4b3f9178966e3eb27fc1d", "score": "0.7198559", "text": "function setTitle($title) {\r\r\n\t\t$this->title = $title;\r\r\n\t}", "title": "" }, { "docid": "601a85bde6cd7c1d787d7402eb02e0dd", "score": "0.71979797", "text": "public function setTitle(string $title);", "title": "" }, { "docid": "0488dbaced3341db8633cbd03e5d18d2", "score": "0.71793574", "text": "private function set_title($title = '')\n {\n $title_parts = func_get_args();\n\n if (class_exists('Context')) {\n $title_parts[] = Context::getHeaderLine();\n } else {\n $title_parts[] = $GLOBALS['SessSemName']['header_line'];\n }\n\n $title_parts = array_reverse($title_parts);\n $page_title = implode(' - ', $title_parts);\n\n\n PageLayout::setTitle($page_title);\n }", "title": "" }, { "docid": "61905fb5b8d7f6c34f2a050d9315d46f", "score": "0.71755224", "text": "function yogastudio_wp_title_show() {\n\t\t?><title><?php wp_title( '|', true, 'right' ); ?></title><?php\n\t}", "title": "" }, { "docid": "067f29daca8b60eea265d1af2097e379", "score": "0.7169294", "text": "function _setTitle ($title)\r\n\t{\r\n\t\t# Assign the subject title, replacing a match for {fieldname} with the contents of the fieldname, which must be an 'input' widget type\r\n\t\tif (preg_match_all ('/\\{([^\\}]+)\\}/', $title, $matches)) {\r\n\t\t\t#!# Add more when tested\r\n\t\t\t$supportedWidgetTypes = array ('input', 'email', 'url', 'tel', 'search', 'number', 'range', 'color', 'select', 'radiobuttons');\r\n\t\t\tforeach ($matches[1] as $element) {\r\n\t\t\t\t\r\n\t\t\t\t# Extract any output format specifier\r\n\t\t\t\t$placeholder = $element;\t// Cache this, as $element may get overwritten\r\n\t\t\t\t$outputFormat = 'presented';\r\n\t\t\t\tif (substr_count ($element, '|')) {\r\n\t\t\t\t\tlist ($element, $outputFormat) = explode ('|', $element, 2);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t# Replace this element placeholder in the string\r\n\t\t\t\tif (isSet ($this->elements[$element]) && (in_array ($this->elements[$element]['type'], $supportedWidgetTypes))) {\r\n\t\t\t\t\t$title = str_replace ('{' . $placeholder . '}', $this->elements[$element]['data'][$outputFormat], $title);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t# Return the title\r\n\t\treturn $title;\r\n\t}", "title": "" }, { "docid": "3ccbd19f710fbef3891eabc63f497f00", "score": "0.71629834", "text": "public function title()\n\t{\n\t\t$xml = simplexml_load_string($this->language_xml);\n\t\tprint $xml->html_head->default_title;\n\t}", "title": "" }, { "docid": "d0bc3de9fec9b830e27c9e6789de58a0", "score": "0.71612424", "text": "public function Display($title)\r\n {\r\n //Provjerava zahtijeva li stranica da korisnik bude prijavljen\r\n //Provjera je li korisnik prijavljen\r\n if($this->PageRequiresAuthenticUser() && !$this->UserIsAuthenticated())\r\n $this->BackToLanding();\r\n\r\n print('<!DOCTYPE html>');\r\n print('<html lang=\"hr\">');\r\n //Dohvaca zaglavlje HEAD\r\n print($this->GetHead($title));\r\n print('<body>');\r\n //Dohvaca izbornik za navigaciju\r\n print($this->GetNavigation());\r\n //Dohvaca sadrzaj stranice\r\n print($this->GetContent());\r\n print('</body>');\r\n print('</html>');\r\n }", "title": "" }, { "docid": "34bda898b53e2a150891482b4c3ad0a3", "score": "0.7149396", "text": "public function printTitle()\n {\n $file = $this->postInfo['mainImage'];\n $file_headers = @get_headers($file);\n if(!$file_headers || $file_headers[0] == 'HTTP/1.1 404 Not Found') {\n $exists = false;\n $this->postInfo['mainImage'] = \"https://picsum.photos/1400/1120?t=1\";\n }\n else {\n $exists = true;\n }\n echo '<main>\n <div class=\"single-post active\">\n <div class=\"poster-post\" style=\"background-image:url('.$this->postInfo['mainImage'].');\">\n </div>\n <div class=\"post-content max-width\">\n <h1 class=\"post-title\">' . $this->postInfo['title'] . '</h1>';\n }", "title": "" }, { "docid": "8807d89be95b4442929795a3c130ee6e", "score": "0.71440613", "text": "public static function title( $title ) {\n\t\treturn $GLOBALS[ 'meta_title' ] = '<title>' . $title . '</title>';\n\t}", "title": "" }, { "docid": "5c1889b70b4955d4bc1fac8cf288edca", "score": "0.7138943", "text": "public function render()\n\t{\n\t\treturn sprintf('<title>%s</title>',$this->title);\n\t}", "title": "" }, { "docid": "557213fc8b3af9c77b882ad4710df025", "score": "0.7134259", "text": "function set_title ($title) {\r\n\t\t$this->title = $title;\r\n\t}", "title": "" }, { "docid": "4efd3ee6e1949ef3ef5cf30db144f2fe", "score": "0.71337676", "text": "public function getTitle(){}", "title": "" }, { "docid": "4efd3ee6e1949ef3ef5cf30db144f2fe", "score": "0.71326", "text": "public function getTitle(){}", "title": "" }, { "docid": "4efd3ee6e1949ef3ef5cf30db144f2fe", "score": "0.71326", "text": "public function getTitle(){}", "title": "" }, { "docid": "f743024ba7405cfe9f782a7f9d5f3245", "score": "0.7131431", "text": "function getTitle() {\n\t\tassert(false);\n\t}", "title": "" }, { "docid": "627047955d378a6e5e1f2a4c5e4d6d46", "score": "0.71258473", "text": "protected function header($title) {\n echo $this->output->header();\n echo $this->output->heading($title);\n }", "title": "" }, { "docid": "6ca3e6151060cf9fe383dc7876ba1a86", "score": "0.71227056", "text": "public function title($title = '') {\n\t\t//si no existe title lo creo\n\t\tif ($this->_html->getElementsByTagName('title')->item(0)==null) {\n\t\t\t$this->_title = $this->_head->create('title');\n\t\t} elseif ($this->_title==null) {\n\t\t\t$this->_title = $this->getElementsByTagName('title')->item(0);\n\t\t}\n\t\t$this->_title->text($title, true);\n\t\treturn $this->_title;\n\t}", "title": "" }, { "docid": "8c77f0921d428da0091d74b4085f939d", "score": "0.7121791", "text": "public function setTitle($title)\n {\n $t = $this->dom->getElementsByTagName('title')->item(0);\n if ($t == null) {\n $t = $this->dom->createElement('title');\n $this->getHeadNode()->appendChild($t);\n }\n $t->nodeValue = htmlspecialchars($title);\n }", "title": "" }, { "docid": "b7814264e05dc157347b0b026435e9cd", "score": "0.71162397", "text": "public function setTitle($title)\n\t{\n\t\t$this->_setElement('title', (string) $title);\n\t}", "title": "" }, { "docid": "e90ef886d6bcb9a5b25f2aa12f3d6b50", "score": "0.7113924", "text": "public function get_title() \n {\n return $this->title;\n }", "title": "" }, { "docid": "e06891ca8e5e310a52470c125c4055bd", "score": "0.71136683", "text": "function setTitle($title)\n {\n $this->title = $title;\n }", "title": "" }, { "docid": "b94aea5d02950803b383b2996035c4db", "score": "0.7113387", "text": "function _getTitle() { return $this->title; }", "title": "" }, { "docid": "2e65215aaba801e6ec1350ef9fb424fe", "score": "0.7113368", "text": "public function setTitle($title = 'bootwrap'): void\n {\n $this->title = <<<HEREDOC\n<title>$title</title>\\n\\n\nHEREDOC;\n }", "title": "" }, { "docid": "1ae1c43eac23816d8395be2efb6c09a8", "score": "0.7098925", "text": "protected function getTitle()\n\t{\n\t\treturn '<h1>Meditation Timer</h1>';\n\t}", "title": "" }, { "docid": "861b10f6e359e0dbf313503a30e7f64a", "score": "0.709573", "text": "protected function writeTitle() {\r\n $today = new DateTime();\r\n $title = $this->getDocTitle() . \" (générée le \" \r\n . $today->format('d/m/Y'). \")\";\r\n $this->setStyleTitle();\r\n $this->getSheet()->setCellValue(\r\n 'A'.$this->moveCurrentLine(self::SPACE_WITH_TITLE),$title);\r\n }", "title": "" }, { "docid": "a432065b23f691e11ce7bc8eed22e759", "score": "0.7086858", "text": "protected function getTitle(): string\n\t{\n\t\treturn \\esc_html__('%title%', 'eightshift-libs');\n\t}", "title": "" }, { "docid": "648ef8b24187c6879730e304dd432dc7", "score": "0.7079933", "text": "public function GetTitle() { return $this->title; }", "title": "" }, { "docid": "a3e4d12b6fe9c3b308ca8a3e29b4d500", "score": "0.70774645", "text": "function on_Title(){\n return $this->getTitle(); \n }", "title": "" }, { "docid": "e7e5445e1d0c9a82de46acfe322d2da4", "score": "0.70666885", "text": "public function title($title)\n {\n $node = new Node('title');\n $title = $this->safeCharEncodeText($title);\n $this->nodes['title'] = $node->value($title)->addCdata();\n }", "title": "" }, { "docid": "b2d0b03584d6b840f74335a9e6616a96", "score": "0.70664084", "text": "function getTitle() {\r\r\n\t\treturn $this->title;\r\r\n\t}", "title": "" }, { "docid": "827b9c0ed72f0947483c822c86616faf", "score": "0.70653546", "text": "public function get_title()\n\t{\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "827b9c0ed72f0947483c822c86616faf", "score": "0.70653546", "text": "public function get_title()\n\t{\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "e191f6b44d2b8aa75249eaf47fd6cb24", "score": "0.7063642", "text": "public function setTitle($val){\n $this->title = $val;\n }", "title": "" } ]